{
  "components": {
    "examples": {},
    "headers": {},
    "parameters": {},
    "requestBodies": {},
    "responses": {},
    "schemas": {
      "AIFileDownloadInfo": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AIFileInfo"
          },
          {
            "properties": {
              "downloadUrl": {
                "type": "string"
              }
            },
            "required": [
              "downloadUrl"
            ],
            "type": "object"
          }
        ]
      },
      "AIFileInfo": {
        "properties": {
          "arch": {
            "enum": [
              "upper",
              "lower"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "numberingSystem": {
            "enum": [
              "FDI",
              "ADA"
            ],
            "type": "string"
          },
          "teethRange": {
            "items": {
              "format": "double",
              "type": "number"
            },
            "type": "array"
          },
          "type": {
            "enum": [
              "marginLine",
              "design",
              "scan",
              "scan-marginLine",
              "transformationMatrix",
              "other"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "name"
        ],
        "type": "object"
      },
      "AIFileUploadloadInfo": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AIFileInfo"
          },
          {
            "properties": {
              "uploadUrl": {
                "type": "string"
              }
            },
            "required": [
              "uploadUrl"
            ],
            "type": "object"
          }
        ]
      },
      "ActivityType": {
        "enum": [
          "purchase",
          "ingest",
          "transferCredits",
          "moveAllUsersPlan",
          "moveUserPlan"
        ],
        "type": "string"
      },
      "AnalyticsEventRequestDTO": {
        "additionalProperties": {},
        "properties": {
          "event": {
            "type": "string"
          }
        },
        "required": [
          "event"
        ],
        "type": "object"
      },
      "AnalyticsUserRequestDTO": {
        "additionalProperties": {},
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "email",
          "id"
        ],
        "type": "object"
      },
      "BalanceCheckFailure": {
        "properties": {
          "message": {
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "properties": {
                  "trialStarted": {
                    "enum": [
                      false
                    ],
                    "nullable": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "trialStarted"
                ],
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/TransactionsBalanceDetails"
              }
            ]
          },
          "success": {
            "enum": [
              false
            ],
            "nullable": false,
            "type": "boolean"
          }
        },
        "required": [
          "reason",
          "message",
          "success"
        ],
        "type": "object"
      },
      "BalanceCheckRequestDTO": {
        "$ref": "#/components/schemas/Pick_IngestRequestDTO.transactions_"
      },
      "BalanceCheckResponseDTO": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/BalanceCheckSuccess"
          },
          {
            "$ref": "#/components/schemas/BalanceCheckFailure"
          }
        ]
      },
      "BalanceCheckSuccess": {
        "properties": {
          "inFreeTrial": {
            "type": "boolean"
          },
          "success": {
            "enum": [
              true
            ],
            "nullable": false,
            "type": "boolean"
          }
        },
        "required": [
          "inFreeTrial",
          "success"
        ],
        "type": "object"
      },
      "BaseActivity": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ActivityType"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userEmail": {
            "format": "email",
            "pattern": "^(.+)@(.+)$",
            "type": "string"
          },
          "userFullName": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "userId",
          "userEmail",
          "userFullName"
        ],
        "type": "object"
      },
      "BaseFilterResponse_BaseActivity_": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BaseActivity"
            },
            "type": "array"
          },
          "totalCount": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "totalCount",
          "data"
        ],
        "type": "object"
      },
      "BaseFilterResponse_UserAccountResponse_": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/UserAccountResponse"
            },
            "type": "array"
          },
          "totalCount": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "totalCount",
          "data"
        ],
        "type": "object"
      },
      "BillingEvent": {
        "enum": [
          "surgical_guide_export",
          "stackable_guide_export",
          "crown_export",
          "bridge_export",
          "inlay_onlay_export",
          "veneer_export",
          "splint_export"
        ],
        "type": "string"
      },
      "BillingPackage": {
        "properties": {
          "amount": {
            "format": "double",
            "type": "number"
          },
          "cost": {
            "format": "double",
            "type": "number"
          },
          "discount": {
            "format": "double",
            "type": "number"
          },
          "isMostRecommended": {
            "type": "boolean"
          }
        },
        "required": [
          "discount",
          "amount",
          "cost"
        ],
        "type": "object"
      },
      "BillingPlan": {
        "additionalProperties": false,
        "properties": {
          "bridgePricingThreshold": {
            "format": "double",
            "type": "number"
          },
          "createdAt": {},
          "creditCost": {
            "format": "double",
            "type": "number"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "$ref": "#/components/schemas/BillingPlanKey"
          },
          "name": {
            "type": "string"
          },
          "packages": {
            "items": {
              "$ref": "#/components/schemas/BillingPackage"
            },
            "type": "array"
          },
          "productsEventsPrices": {
            "items": {
              "$ref": "#/components/schemas/ProductsEventsPrice"
            },
            "type": "array"
          },
          "trialExpiryInDays": {
            "format": "double",
            "type": "number"
          },
          "updatedAt": {}
        },
        "required": [
          "id",
          "updatedAt",
          "createdAt",
          "name",
          "key",
          "productsEventsPrices",
          "bridgePricingThreshold",
          "trialExpiryInDays",
          "packages"
        ],
        "type": "object"
      },
      "BillingPlanKey": {
        "enum": [
          "armaCad",
          "tier1",
          "tier2",
          "tier3",
          "free"
        ],
        "type": "string"
      },
      "BillingPlanUpdate": {
        "$ref": "#/components/schemas/Partial_Omit_BillingPlanCreateInput.key__"
      },
      "BillingPlanWithCountries": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BillingPlan"
          },
          {
            "properties": {
              "countries": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "countries"
            ],
            "type": "object"
          }
        ]
      },
      "BillingProduct": {
        "additionalProperties": false,
        "properties": {
          "allowedEvents": {
            "items": {
              "$ref": "#/components/schemas/BillingEvent"
            },
            "type": "array"
          },
          "createdAt": {},
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "$ref": "#/components/schemas/BillingProductKey"
          },
          "name": {
            "type": "string"
          },
          "updatedAt": {}
        },
        "required": [
          "id",
          "updatedAt",
          "createdAt",
          "name",
          "key",
          "allowedEvents"
        ],
        "type": "object"
      },
      "BillingProductKey": {
        "enum": [
          "surgical_guide",
          "stackable_guide",
          "crown",
          "bridge",
          "inlay_onlay",
          "veneer",
          "splint"
        ],
        "type": "string"
      },
      "BridgeExportTransaction": {
        "properties": {
          "bridgeTeethCount": {
            "format": "double",
            "type": "number"
          },
          "event": {
            "enum": [
              "bridge_export"
            ],
            "nullable": false,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "timeStamp": {
            "type": "string"
          }
        },
        "required": [
          "bridgeTeethCount",
          "event"
        ],
        "type": "object"
      },
      "CaseMetaData": {
        "properties": {
          "materialParameters": {
            "items": {
              "properties": {
                "name": {
                  "$ref": "#/components/schemas/MaterialParameter"
                },
                "value": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "value",
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "numberingSystem": {
            "$ref": "#/components/schemas/NumberingSystem"
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "type": "array"
          },
          "transformationMatrices": {
            "properties": {
              "lower": {
                "items": {
                  "items": {
                    "format": "double",
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              "upper": {
                "items": {
                  "items": {
                    "format": "double",
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              }
            },
            "required": [
              "lower",
              "upper"
            ],
            "type": "object"
          }
        },
        "required": [
          "numberingSystem",
          "products",
          "transformationMatrices"
        ],
        "type": "object"
      },
      "Commit": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "$ref": "#/components/schemas/CommitAction"
          },
          "committer": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "latest": {
            "type": "boolean"
          },
          "patientId": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "patientId",
          "workspaceId",
          "committer",
          "action",
          "latest",
          "filesInfo"
        ],
        "type": "object"
      },
      "CommitAction": {
        "enum": [
          "Replace",
          "Merge",
          "AppendOnly"
        ],
        "type": "string"
      },
      "CommitUploadRequestDTO": {
        "$ref": "#/components/schemas/Omit_CommitCreateInput.committer_"
      },
      "CommitUploadResponseDTO": {
        "properties": {
          "commit": {
            "$ref": "#/components/schemas/Commit"
          },
          "failedFiles": {
            "items": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "relativePath": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "relativePath"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "failedFiles",
          "commit"
        ],
        "type": "object"
      },
      "ConfirmPaymentPayloadRequestDTO": {
        "properties": {
          "cost": {
            "format": "double",
            "type": "number"
          },
          "credits": {
            "properties": {
              "quantity": {
                "format": "double",
                "type": "number"
              },
              "unitPrice": {
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "unitPrice",
              "quantity"
            ],
            "type": "object"
          },
          "paymentMethodId": {
            "type": "string"
          }
        },
        "required": [
          "credits",
          "cost",
          "paymentMethodId"
        ],
        "type": "object"
      },
      "ConfirmPaymentPayloadResponseDTO": {
        "properties": {
          "id": {
            "type": "string"
          },
          "noOfCredits": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "noOfCredits",
          "id"
        ],
        "type": "object"
      },
      "CreateCustomerDTO": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "CreateIFFrameTokenDTO": {
        "properties": {
          "cost": {
            "format": "double",
            "type": "number"
          },
          "credits": {
            "properties": {
              "quantity": {
                "format": "double",
                "type": "number"
              },
              "unitPrice": {
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "unitPrice",
              "quantity"
            ],
            "type": "object"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "failURL": {
            "type": "string"
          },
          "okURL": {
            "type": "string"
          }
        },
        "required": [
          "credits",
          "cost",
          "failURL",
          "okURL"
        ],
        "type": "object"
      },
      "CreditGrant": {
        "properties": {
          "available": {
            "format": "double",
            "type": "number"
          },
          "cost": {
            "format": "double",
            "type": "number"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "expired": {
            "type": "boolean"
          },
          "expiredAt": {
            "format": "date-time",
            "type": "string"
          },
          "issuedAt": {
            "format": "date-time",
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "total": {
            "format": "double",
            "type": "number"
          },
          "type": {
            "enum": [
              "purchased",
              "transferred",
              "assigned"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "currency",
          "cost",
          "available",
          "total",
          "expiredAt",
          "issuedAt"
        ],
        "type": "object"
      },
      "Currency": {
        "enum": [
          "TL",
          "USD",
          "EUR",
          "GBP",
          "RUB"
        ],
        "type": "string"
      },
      "Exclude_BillingEvent.bridge_export_": {
        "description": "Exclude from T those types that are assignable to U",
        "enum": [
          "surgical_guide_export",
          "stackable_guide_export",
          "crown_export",
          "inlay_onlay_export",
          "veneer_export",
          "splint_export"
        ],
        "type": "string"
      },
      "ExportTransaction": {
        "properties": {
          "event": {
            "$ref": "#/components/schemas/Exclude_BillingEvent.bridge_export_"
          },
          "id": {
            "type": "string"
          },
          "timeStamp": {
            "type": "string"
          }
        },
        "required": [
          "event"
        ],
        "type": "object"
      },
      "FDITooth": {
        "enum": [
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38,
          41,
          42,
          43,
          44,
          45,
          46,
          47,
          48
        ],
        "type": "number"
      },
      "FileData": {
        "properties": {
          "bucket": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "uploadUrl": {
            "type": "string"
          }
        },
        "required": [
          "uploadUrl",
          "key",
          "bucket",
          "name"
        ],
        "type": "object"
      },
      "FileInfo": {
        "additionalProperties": false,
        "properties": {
          "flags": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "lastUpdated": {
            "format": "date-time",
            "type": "string"
          },
          "relativePath": {
            "type": "string"
          },
          "size": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "hash",
          "relativePath"
        ],
        "type": "object"
      },
      "FileInfoCreateInput": {
        "$ref": "#/components/schemas/Omit_FileInfo.lastUpdated-or-size_"
      },
      "FilterActivitiesRequestDTO": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Omit_BaseFilterRequest.filter_"
          },
          {
            "properties": {
              "filter": {
                "$ref": "#/components/schemas/Partial_ActivityFilter_"
              }
            },
            "required": [
              "filter"
            ],
            "type": "object"
          }
        ]
      },
      "FilterActivitiesResponseDTO": {
        "$ref": "#/components/schemas/BaseFilterResponse_BaseActivity_"
      },
      "FilterUsersRequestDTO": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Omit_BaseFilterRequest.filter_"
          },
          {
            "properties": {
              "filter": {
                "$ref": "#/components/schemas/Partial_UserAccountFilter_"
              }
            },
            "required": [
              "filter"
            ],
            "type": "object"
          }
        ]
      },
      "FilterUsersResponseDTO": {
        "$ref": "#/components/schemas/BaseFilterResponse_UserAccountResponse_"
      },
      "Gender": {
        "enum": [
          "Male",
          "Female",
          "Other"
        ],
        "type": "string"
      },
      "GetAIFilesUploadUrlsResponseDTO": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/FileData"
            },
            "type": "array"
          },
          "taskId": {
            "type": "string"
          }
        },
        "required": [
          "files",
          "taskId"
        ],
        "type": "object"
      },
      "GetCaseDataResponse": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/AIFileDownloadInfo"
            },
            "type": "array"
          },
          "metaData": {
            "$ref": "#/components/schemas/CaseMetaData"
          }
        },
        "required": [
          "files",
          "metaData"
        ],
        "type": "object"
      },
      "GetCustomerBillingInfoResponseDTO": {
        "properties": {
          "creditCost": {
            "format": "double",
            "type": "number"
          },
          "credits": {
            "properties": {
              "available": {
                "format": "double",
                "type": "number"
              },
              "consumed": {
                "format": "double",
                "type": "number"
              },
              "total": {
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "total",
              "consumed",
              "available"
            ],
            "type": "object"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "packages": {
            "items": {
              "$ref": "#/components/schemas/BillingPackage"
            },
            "type": "array"
          },
          "products": {
            "items": {
              "properties": {
                "credits": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "credits",
                "name",
                "id"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "products",
          "packages",
          "credits",
          "creditCost",
          "currency"
        ],
        "type": "object"
      },
      "GetCustomerBillingSettingsResponseDTO": {
        "properties": {
          "creditsTransferExpiryInDays": {
            "format": "double",
            "type": "number"
          },
          "defaultNumberingSystem": {
            "$ref": "#/components/schemas/NumberingSystem"
          },
          "isBillingDisabled": {
            "type": "boolean"
          },
          "paymentMethodSaveLimit": {
            "format": "double",
            "type": "number"
          },
          "paymentPlatform": {
            "enum": [
              "stripe",
              "paytr",
              "none"
            ],
            "type": "string"
          },
          "planDetails": {
            "properties": {
              "bridgePricingThreshold": {
                "format": "double",
                "type": "number"
              },
              "id": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "bridgePricingThreshold",
              "key",
              "id",
              "name"
            ],
            "type": "object"
          },
          "trialExpiryInDays": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "paymentPlatform",
          "trialExpiryInDays",
          "creditsTransferExpiryInDays",
          "defaultNumberingSystem"
        ],
        "type": "object"
      },
      "GetDownloadUrlsRequestDTO": {
        "properties": {
          "patientId": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "relativePaths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "relativePaths",
          "patientId",
          "workspaceId"
        ],
        "type": "object"
      },
      "GetDownloadUrlsResponseDTO": {
        "properties": {
          "error": {
            "type": "string"
          },
          "flags": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "relativePath": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "relativePath"
        ],
        "type": "object"
      },
      "GetStatusResponseDTO": {
        "properties": {
          "errorCode": {
            "nullable": true,
            "type": "string"
          },
          "errorMessage": {
            "nullable": true,
            "type": "string"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/AIFileDownloadInfo"
            },
            "type": "array"
          },
          "status": {
            "enum": [
              "Processing",
              "Failed",
              "Success"
            ],
            "type": "string"
          },
          "taskId": {
            "type": "string"
          }
        },
        "required": [
          "files",
          "errorMessage",
          "errorCode",
          "status",
          "taskId"
        ],
        "type": "object"
      },
      "GetUploadUrlsRequestDTO": {
        "properties": {
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfoCreateInput"
            },
            "type": "array"
          },
          "patientId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "filesInfo",
          "patientId",
          "workspaceId"
        ],
        "type": "object"
      },
      "GetUploadUrlsResponseDTO": {
        "properties": {
          "error": {
            "type": "string"
          },
          "relativePath": {
            "type": "string"
          },
          "uploadedBefore": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "relativePath"
        ],
        "type": "object"
      },
      "IngestEventCost": {
        "properties": {
          "count": {
            "format": "double",
            "type": "number"
          },
          "event": {
            "$ref": "#/components/schemas/BillingEvent"
          },
          "productName": {
            "type": "string"
          },
          "requiredCredits": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "requiredCredits",
          "count",
          "productName",
          "event"
        ],
        "type": "object"
      },
      "IngestRequestDTO": {
        "properties": {
          "transactions": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ExportTransaction"
                },
                {
                  "$ref": "#/components/schemas/BridgeExportTransaction"
                }
              ]
            },
            "type": "array"
          }
        },
        "required": [
          "transactions"
        ],
        "type": "object"
      },
      "IngestResponseDTO": {
        "properties": {
          "balanceAfter": {
            "format": "double",
            "type": "number"
          },
          "balanceBefore": {
            "format": "double",
            "type": "number"
          },
          "eventsCost": {
            "items": {
              "$ref": "#/components/schemas/IngestEventCost"
            },
            "type": "array"
          }
        },
        "required": [
          "eventsCost",
          "balanceAfter",
          "balanceBefore"
        ],
        "type": "object"
      },
      "InvitedUser": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "workspacesSharingWithMe": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "email",
          "workspacesSharingWithMe"
        ],
        "type": "object"
      },
      "MaterialParameter": {
        "enum": [
          "Mesial/Distal Contact",
          "Mesial/Distal Contact For Adjacent Restorations",
          "Occlusal Contact",
          "Thickness Margin",
          "Minimum Thickness",
          "Occlusal Thickness",
          "Cement Gap Margin",
          "Cement Gap Transition Start",
          "Cement Gap Transition",
          "Cement Gap Flat",
          "Cement Gap Flat Angle",
          "Cement Gap Vertical",
          "Cement Gap Vertical Angle",
          "Mesial/Distal Contact Area"
        ],
        "type": "string"
      },
      "MoveAllUsersToPlanRequestDTO": {
        "properties": {
          "sourcePlanId": {
            "type": "string"
          },
          "targetPlanId": {
            "type": "string"
          }
        },
        "required": [
          "targetPlanId",
          "sourcePlanId"
        ],
        "type": "object"
      },
      "MoveUsersToPlanRequestDTO": {
        "additionalProperties": false,
        "properties": {
          "emails": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          },
          "targetPlanId": {
            "type": "string"
          }
        },
        "required": [
          "emails",
          "targetPlanId"
        ],
        "type": "object"
      },
      "MySharedData": {
        "additionalProperties": false,
        "properties": {
          "anonymousPatient": {
            "type": "boolean"
          },
          "filesPaths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "patientId": {
            "type": "string"
          },
          "receivers": {
            "items": {
              "$ref": "#/components/schemas/UserData"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "patientId",
          "anonymousPatient",
          "filesPaths",
          "receivers"
        ],
        "type": "object"
      },
      "NumberingSystem": {
        "enum": [
          "FDI",
          "Universal"
        ],
        "type": "string"
      },
      "Omit_BaseFilterRequest.filter_": {
        "$ref": "#/components/schemas/Pick_BaseFilterRequest.Exclude_keyofBaseFilterRequest.filter__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Omit_CommitCreateInput.committer_": {
        "$ref": "#/components/schemas/Pick_CommitCreateInput.Exclude_keyofCommitCreateInput.committer__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Omit_FileInfo.lastUpdated-or-size_": {
        "$ref": "#/components/schemas/Pick_FileInfo.Exclude_keyofFileInfo.lastUpdated-or-size__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Omit_PatientCreateInput.plans-or-workspaceId_": {
        "$ref": "#/components/schemas/Pick_PatientCreateInput.Exclude_keyofPatientCreateInput.plans-or-workspaceId__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Omit_Plan.createdAt-or-thumbnailUrl-or-filesInfo_": {
        "$ref": "#/components/schemas/Pick_Plan.Exclude_keyofPlan.createdAt-or-thumbnailUrl-or-filesInfo__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Omit_Plan.createdAt-or-updatedAt-or-thumbnailUrl-or-filesInfo_": {
        "$ref": "#/components/schemas/Pick_Plan.Exclude_keyofPlan.createdAt-or-updatedAt-or-thumbnailUrl-or-filesInfo__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Omit_PurchaseActivity.type-or-platform-or-userEmail-or-userFullName-or-userIp-or-reqOrigin_": {
        "$ref": "#/components/schemas/Pick_PurchaseActivity.Exclude_keyofPurchaseActivity.type-or-platform-or-userEmail-or-userFullName-or-userIp-or-reqOrigin__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Omit_UserAccount.creditGrants_": {
        "$ref": "#/components/schemas/Pick_UserAccount.Exclude_keyofUserAccount.creditGrants__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "Partial_ActivityFilter_": {
        "anyOf": [
          {
            "properties": {
              "planId": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "ingest",
                  "transferCredits",
                  "moveAllUsersPlan",
                  "moveUserPlan"
                ],
                "type": "string"
              },
              "userEmail": {
                "format": "email",
                "pattern": "^(.+)@(.+)$",
                "type": "string"
              },
              "userId": {
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "properties": {
              "planId": {
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/PurchaseStatus"
              },
              "type": {
                "enum": [
                  "purchase"
                ],
                "nullable": false,
                "type": "string"
              },
              "userEmail": {
                "format": "email",
                "pattern": "^(.+)@(.+)$",
                "type": "string"
              },
              "userId": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "Make all properties in T optional"
      },
      "Partial_Omit_BillingPlanCreateInput.key__": {
        "description": "Make all properties in T optional",
        "properties": {
          "bridgePricingThreshold": {
            "format": "double",
            "type": "number"
          },
          "creditCost": {
            "format": "double",
            "type": "number"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "packages": {
            "items": {
              "$ref": "#/components/schemas/BillingPackage"
            },
            "type": "array"
          },
          "productsEventsPrices": {
            "items": {
              "$ref": "#/components/schemas/ProductsEventsPrice"
            },
            "type": "array"
          },
          "trialExpiryInDays": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "Partial_Omit_PatientCreateDTO.workspaceId__": {
        "description": "Make all properties in T optional",
        "properties": {
          "AssigneeId": {
            "type": "string"
          },
          "birthDate": {
            "format": "date-time",
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "gender": {
            "$ref": "#/components/schemas/Gender"
          },
          "lastName": {
            "type": "string"
          },
          "readableId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Partial_UserAccountFilter_": {
        "description": "Make all properties in T optional",
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "registrationInfo.country": {
            "type": "string"
          },
          "registrationInfo.countryCode": {
            "type": "string"
          },
          "registrationInfo.origin": {
            "type": "string"
          },
          "registrationInfo.phone": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Patient": {
        "additionalProperties": false,
        "properties": {
          "AssigneeId": {
            "type": "string"
          },
          "age": {
            "format": "double",
            "type": "number"
          },
          "birthDate": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            },
            "type": "array"
          },
          "firstName": {
            "type": "string"
          },
          "gender": {
            "$ref": "#/components/schemas/Gender"
          },
          "id": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "plans": {
            "items": {
              "$ref": "#/components/schemas/Plan"
            },
            "type": "array"
          },
          "readableId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "firstName",
          "lastName",
          "gender",
          "birthDate",
          "AssigneeId",
          "workspaceId",
          "filesInfo",
          "plans",
          "age"
        ],
        "type": "object"
      },
      "PatientCreateDTO": {
        "$ref": "#/components/schemas/Omit_PatientCreateInput.plans-or-workspaceId_"
      },
      "PatientUpdateDTO": {
        "$ref": "#/components/schemas/Partial_Omit_PatientCreateDTO.workspaceId__"
      },
      "Pick_BaseFilterRequest.Exclude_keyofBaseFilterRequest.filter__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "limit": {
            "format": "int32",
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "skip": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Pick_CommitCreateInput.Exclude_keyofCommitCreateInput.committer__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/CommitAction"
          },
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfoCreateInput"
            },
            "type": "array"
          },
          "patientId": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "filesInfo",
          "patientId",
          "workspaceId",
          "action"
        ],
        "type": "object"
      },
      "Pick_FileInfo.Exclude_keyofFileInfo.lastUpdated-or-size__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "flags": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "relativePath": {
            "type": "string"
          }
        },
        "required": [
          "hash",
          "relativePath"
        ],
        "type": "object"
      },
      "Pick_IngestRequestDTO.transactions_": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "transactions": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ExportTransaction"
                },
                {
                  "$ref": "#/components/schemas/BridgeExportTransaction"
                }
              ]
            },
            "type": "array"
          }
        },
        "required": [
          "transactions"
        ],
        "type": "object"
      },
      "Pick_PatientCreateInput.Exclude_keyofPatientCreateInput.plans-or-workspaceId__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "AssigneeId": {
            "type": "string"
          },
          "birthDate": {
            "format": "date-time",
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "gender": {
            "$ref": "#/components/schemas/Gender"
          },
          "lastName": {
            "type": "string"
          },
          "readableId": {
            "type": "string"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "gender",
          "birthDate",
          "AssigneeId"
        ],
        "type": "object"
      },
      "Pick_Plan.Exclude_keyofPlan.createdAt-or-thumbnailUrl-or-filesInfo__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "teethNumbers": {
            "items": {
              "format": "double",
              "type": "number"
            },
            "type": "array"
          },
          "thumbnailFile": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "updatedAt",
          "id",
          "name",
          "teethNumbers"
        ],
        "type": "object"
      },
      "Pick_Plan.Exclude_keyofPlan.createdAt-or-updatedAt-or-thumbnailUrl-or-filesInfo__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "teethNumbers": {
            "items": {
              "format": "double",
              "type": "number"
            },
            "type": "array"
          },
          "thumbnailFile": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "teethNumbers"
        ],
        "type": "object"
      },
      "Pick_PurchaseActivity.Exclude_keyofPurchaseActivity.type-or-platform-or-userEmail-or-userFullName-or-userIp-or-reqOrigin__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credits": {
            "properties": {
              "quantity": {
                "format": "double",
                "type": "number"
              },
              "unitPrice": {
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "unitPrice",
              "quantity"
            ],
            "type": "object"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "failureCode": {
            "format": "double",
            "type": "number"
          },
          "failureReason": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "referenceId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PurchaseStatus"
          },
          "totalCost": {
            "format": "double",
            "type": "number"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "status",
          "orderId",
          "referenceId",
          "currency",
          "totalCost",
          "credits"
        ],
        "type": "object"
      },
      "Pick_ShareInfo.Exclude_keyofShareInfo.receivers__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "anonymousPatient": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            },
            "type": "array"
          },
          "filesPaths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "patient": {
            "properties": {
              "age": {
                "format": "double",
                "type": "number"
              },
              "assigneeFullName": {
                "type": "string"
              },
              "birthDate": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "gender": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              }
            },
            "required": [
              "assigneeFullName",
              "birthDate",
              "gender",
              "age",
              "lastName",
              "firstName"
            ],
            "type": "object"
          },
          "patientId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "patientId",
          "anonymousPatient",
          "filesPaths"
        ],
        "type": "object"
      },
      "Pick_UserAccount.Exclude_keyofUserAccount.creditGrants__": {
        "description": "From T, pick a set of properties whose keys are in the union K",
        "properties": {
          "email": {
            "type": "string"
          },
          "freeTrialEnd": {
            "format": "date-time",
            "type": "string"
          },
          "freeTrialStart": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "registrationInfo": {
            "properties": {
              "country": {
                "type": "string"
              },
              "countryCode": {
                "type": "string"
              },
              "origin": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              }
            },
            "required": [
              "phone",
              "origin"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "email"
        ],
        "type": "object"
      },
      "Plan": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "teethNumbers": {
            "items": {
              "format": "double",
              "type": "number"
            },
            "type": "array"
          },
          "thumbnailFile": {
            "type": "string"
          },
          "thumbnailUrl": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "name",
          "teethNumbers",
          "filesInfo"
        ],
        "type": "object"
      },
      "PlanCreateInput": {
        "$ref": "#/components/schemas/Omit_Plan.createdAt-or-updatedAt-or-thumbnailUrl-or-filesInfo_"
      },
      "PlanUpdateInput": {
        "$ref": "#/components/schemas/Omit_Plan.createdAt-or-thumbnailUrl-or-filesInfo_"
      },
      "ProcessRequestAdvancedDTO": {
        "properties": {
          "exportMarginOnly": {
            "type": "boolean"
          },
          "files": {
            "description": "If files are provided, then they are uploaded to to glidewell storages",
            "items": {
              "$ref": "#/components/schemas/ScanFileData"
            },
            "minItems": 2,
            "type": "array"
          },
          "materialParameters": {
            "items": {
              "properties": {
                "name": {
                  "$ref": "#/components/schemas/MaterialParameter"
                },
                "value": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "value",
                "name"
              ],
              "type": "object"
            },
            "minItems": 1,
            "type": "array"
          },
          "parameters": {
            "deprecated": true,
            "properties": {
              "cementGapVertical": {
                "format": "double",
                "type": "number"
              },
              "minimumThickness": {
                "format": "double",
                "type": "number"
              }
            },
            "type": "object"
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "maxItems": 32,
            "minItems": 1,
            "type": "array"
          },
          "referenceId": {
            "type": "string"
          }
        },
        "required": [
          "products",
          "referenceId"
        ],
        "type": "object"
      },
      "ProcessRequestDTO": {
        "properties": {
          "exportMarginOnly": {
            "type": "boolean"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/ScanFileData"
            },
            "type": "array"
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "type": "array"
          },
          "referenceId": {
            "type": "string"
          },
          "taskId": {
            "type": "string"
          }
        },
        "required": [
          "files",
          "products",
          "taskId"
        ],
        "type": "object"
      },
      "Product": {
        "anyOf": [
          {
            "properties": {
              "tooth": {
                "$ref": "#/components/schemas/FDITooth"
              },
              "type": {
                "enum": [
                  "FullCrown",
                  "Inlay",
                  "Veneer",
                  "Implant"
                ],
                "type": "string"
              }
            },
            "required": [
              "tooth",
              "type"
            ],
            "type": "object"
          },
          {
            "properties": {
              "teeth": {
                "items": {
                  "properties": {
                    "number": {
                      "$ref": "#/components/schemas/FDITooth"
                    },
                    "type": {
                      "enum": [
                        "FullCrown",
                        "Pontic"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "number"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "type": {
                "enum": [
                  "Bridge"
                ],
                "nullable": false,
                "type": "string"
              }
            },
            "required": [
              "teeth",
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "ProductsEventsPrice": {
        "properties": {
          "event": {
            "$ref": "#/components/schemas/BillingEvent"
          },
          "priceByCredits": {
            "format": "double",
            "type": "number"
          },
          "productId": {
            "type": "string"
          }
        },
        "required": [
          "priceByCredits",
          "event",
          "productId"
        ],
        "type": "object"
      },
      "PurchaseResponseDTO": {
        "$ref": "#/components/schemas/Omit_PurchaseActivity.type-or-platform-or-userEmail-or-userFullName-or-userIp-or-reqOrigin_"
      },
      "PurchaseStatus": {
        "enum": [
          "in-progress",
          "success",
          "failed"
        ],
        "type": "string"
      },
      "ReceiverShareInfo": {
        "additionalProperties": false,
        "properties": {
          "anonymousPatient": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            },
            "type": "array"
          },
          "filesPaths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "owner": {
            "properties": {
              "firstName": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "workspaceId": {
                "type": "string"
              }
            },
            "required": [
              "workspaceId",
              "id"
            ],
            "type": "object"
          },
          "patient": {
            "properties": {
              "age": {
                "format": "double",
                "type": "number"
              },
              "assigneeFullName": {
                "type": "string"
              },
              "birthDate": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "gender": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              }
            },
            "required": [
              "assigneeFullName",
              "birthDate",
              "gender",
              "age",
              "lastName",
              "firstName"
            ],
            "type": "object"
          },
          "patientId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "patientId",
          "anonymousPatient",
          "filesPaths",
          "owner"
        ],
        "type": "object"
      },
      "ScanFileData": {
        "properties": {
          "bucket": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "bucket",
          "name"
        ],
        "type": "object"
      },
      "SenderShareInfo": {
        "additionalProperties": false,
        "properties": {
          "anonymousPatient": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "filesInfo": {
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            },
            "type": "array"
          },
          "filesPaths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "patient": {
            "properties": {
              "age": {
                "format": "double",
                "type": "number"
              },
              "assigneeFullName": {
                "type": "string"
              },
              "birthDate": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "gender": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              }
            },
            "required": [
              "assigneeFullName",
              "birthDate",
              "gender",
              "age",
              "lastName",
              "firstName"
            ],
            "type": "object"
          },
          "patientId": {
            "type": "string"
          },
          "receivers": {
            "items": {
              "$ref": "#/components/schemas/UserData"
            },
            "type": "array"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "patientId",
          "anonymousPatient",
          "filesPaths",
          "receivers"
        ],
        "type": "object"
      },
      "ShareFilesDTO": {
        "properties": {
          "anonymousPatient": {
            "type": "boolean"
          },
          "filesPaths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "notes": {
            "type": "string"
          },
          "patientId": {
            "type": "string"
          },
          "receiversEmails": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "senderName": {
            "type": "string"
          }
        },
        "required": [
          "senderName",
          "anonymousPatient",
          "filesPaths",
          "receiversEmails",
          "patientId"
        ],
        "type": "object"
      },
      "StartFreeTrialRequestDTO": {
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "name"
        ],
        "type": "object"
      },
      "StartFreeTrialResponseDTO": {
        "properties": {
          "freeTrialEnd": {
            "format": "date-time",
            "type": "string"
          },
          "freeTrialStart": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "freeTrialEnd",
          "freeTrialStart"
        ],
        "type": "object"
      },
      "StripePaymentCard": {
        "properties": {
          "displayBrand": {
            "nullable": true,
            "type": "string"
          },
          "expMonth": {
            "format": "double",
            "type": "number"
          },
          "expYear": {
            "format": "double",
            "type": "number"
          },
          "last4": {
            "type": "string"
          }
        },
        "required": [
          "last4",
          "expYear",
          "expMonth",
          "displayBrand"
        ],
        "type": "object"
      },
      "StripePaymentMethod": {
        "properties": {
          "card": {
            "$ref": "#/components/schemas/StripePaymentCard"
          },
          "createdAt": {
            "format": "double",
            "type": "number"
          },
          "customerId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "isExpired": {
            "type": "boolean"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "isExpired",
          "isDefault",
          "name",
          "card",
          "type",
          "createdAt",
          "customerId",
          "id"
        ],
        "type": "object"
      },
      "TransactionsBalanceDetails": {
        "properties": {
          "availableCredits": {
            "format": "double",
            "type": "number"
          },
          "eventsCost": {
            "items": {
              "$ref": "#/components/schemas/IngestEventCost"
            },
            "type": "array"
          },
          "requiredCredits": {
            "format": "double",
            "type": "number"
          },
          "uncoveredEvents": {
            "items": {
              "$ref": "#/components/schemas/IngestEventCost"
            },
            "type": "array"
          }
        },
        "required": [
          "uncoveredEvents",
          "eventsCost",
          "availableCredits",
          "requiredCredits"
        ],
        "type": "object"
      },
      "UserAccountResponse": {
        "$ref": "#/components/schemas/Omit_UserAccount.creditGrants_"
      },
      "UserData": {
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "UserProfile": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "familyName": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "profileCompleted": {
            "type": "boolean"
          },
          "registeredFrom": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "status",
          "profileCompleted"
        ],
        "type": "object"
      },
      "Workspace": {
        "additionalProperties": false,
        "properties": {
          "allowVersioning": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "myShares": {
            "items": {
              "$ref": "#/components/schemas/MySharedData"
            },
            "type": "array"
          },
          "owner": {
            "type": "string"
          },
          "patientsCounter": {
            "format": "double",
            "type": "number"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "workspacesSharingWithMe": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "owner",
          "patientsCounter"
        ],
        "type": "object"
      },
      "WorkspaceSettingsDTO": {
        "properties": {
          "desktopDownloadUrls": {
            "properties": {
              "mac": {
                "type": "string"
              },
              "windows": {
                "type": "string"
              }
            },
            "required": [
              "windows"
            ],
            "type": "object"
          }
        },
        "required": [
          "desktopDownloadUrls"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "jwt_auth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {},
    "license": {
      "name": "ISC"
    },
    "title": "case-manager-server",
    "version": "1.0.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/v1/ai/info/{referenceId}/{taskId}": {
      "get": {
        "description": "Used to retrieve case information and scan and design files information",
        "operationId": "GetCaseInfo",
        "parameters": [
          {
            "description": "-case reference ID",
            "in": "path",
            "name": "referenceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "- case task ID",
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCaseDataResponse"
                }
              }
            },
            "description": "Ok"
          },
          "400": {
            "description": "- Case still under processing, or \n - Missing or invalid desktop app info header"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "- Case is not owned by this user, or \n - Unauthorized desktop client app version"
          },
          "404": {
            "description": "- Couldn't find case meta data, or \n - Couldn't find any of scan files"
          },
          "500": {
            "description": "Unhandled internal server error"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "AI"
        ]
      }
    },
    "/v1/ai/meta-data/{referenceId}": {
      "post": {
        "operationId": "SetMetaData",
        "parameters": [
          {
            "in": "path",
            "name": "referenceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseMetaData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Missing or invalid desktop app info header"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "Unauthorized desktop client app version"
          },
          "500": {
            "description": "Unhandled internal server error"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "AI"
        ]
      }
    },
    "/v1/ai/process": {
      "post": {
        "operationId": "Process",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "files": [
                  {
                    "bucket": "external-runner-prod",
                    "key": "ce7e16ac-4938-4bf9-b931-28ee805840b2/input/lower.ply",
                    "name": "lower.ply"
                  },
                  {
                    "bucket": "external-runner-prod",
                    "key": "ce7e16ac-4938-4bf9-b931-28ee805840b2/input/upper.ply",
                    "name": "upper.ply"
                  }
                ],
                "products": [
                  {
                    "tooth": 11,
                    "type": "FullCrown"
                  },
                  {
                    "tooth": 13,
                    "type": "FullCrown"
                  },
                  {
                    "tooth": 22,
                    "type": "Inlay"
                  },
                  {
                    "teeth": [
                      {
                        "number": 33,
                        "type": "FullCrown"
                      },
                      {
                        "number": 34,
                        "type": "Pontic"
                      },
                      {
                        "number": 35,
                        "type": "Pontic"
                      },
                      {
                        "number": 36,
                        "type": "FullCrown"
                      }
                    ],
                    "type": "Bridge"
                  }
                ],
                "taskId": "111111111111111111111111"
              },
              "schema": {
                "$ref": "#/components/schemas/ProcessRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "taskId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "taskId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Missing or invalid desktop app info header"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "Unauthorized desktop client app version"
          },
          "500": {
            "description": "Unhandled internal server error"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "AI"
        ]
      }
    },
    "/v1/ai/status/{taskId}": {
      "get": {
        "operationId": "GetTaskStatus",
        "parameters": [
          {
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetStatusResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "400": {
            "description": "Missing or invalid desktop app info header"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "Unauthorized desktop client app version"
          },
          "500": {
            "description": "Unhandled internal server error"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "AI"
        ]
      }
    },
    "/v1/ai/upload-urls": {
      "post": {
        "description": "Used to upload scan and margin files to start the AI workflow",
        "operationId": "GetScanFilesURLs",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": [
                "lower.ply",
                "upper.ply",
                "margin_line_ADA14.pts"
              ],
              "schema": {
                "description": "- scan input files",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            }
          },
          "description": "- scan input files",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAIFilesUploadUrlsResponseDTO"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Missing or invalid desktop app info header"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "Unauthorized desktop client app version"
          },
          "500": {
            "description": "Unhandled internal server error"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "AI"
        ]
      }
    },
    "/v1/ai/upload-urls/scan/{referenceId}": {
      "post": {
        "description": "Used to upload any ai files temporary external of glidewell storage",
        "operationId": "GetScanFilesUploadInfo",
        "parameters": [
          {
            "description": "-case reference ID",
            "in": "path",
            "name": "referenceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "- scan input files",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            }
          },
          "description": "- scan input files",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/AIFileUploadloadInfo"
                      },
                      {
                        "properties": {
                          "error": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "error"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "type": "array"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Missing or invalid desktop app info header"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "Unauthorized desktop client app version"
          },
          "500": {
            "description": "Unhandled internal server error"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "AI"
        ]
      }
    },
    "/v1/analytics/global/identify": {
      "post": {
        "operationId": "GlobalIdentify",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyticsUserRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "string"
                }
              }
            },
            "description": "User identified"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [],
        "tags": [
          "Analytics"
        ]
      }
    },
    "/v1/analytics/global/track": {
      "post": {
        "operationId": "GlobalTrackEvent",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyticsEventRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "string"
                }
              }
            },
            "description": "Event tracked"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Analytics"
        ]
      }
    },
    "/v1/analytics/identify": {
      "post": {
        "operationId": "Identify",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyticsUserRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "string"
                }
              }
            },
            "description": "User identified"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [],
        "tags": [
          "Analytics"
        ]
      }
    },
    "/v1/analytics/track": {
      "post": {
        "operationId": "TrackEvent",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyticsEventRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "string"
                }
              }
            },
            "description": "Event tracked"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Analytics"
        ]
      }
    },
    "/v1/billings/admin/plans": {
      "get": {
        "operationId": "ListPlans",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BillingPlanWithCountries"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/admin/plans/{planId}": {
      "put": {
        "operationId": "UpdatePlan",
        "parameters": [
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingPlanUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingPlan"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          },
          "404": {
            "description": "BILLING:PLAN_IS_NOT_EXIST"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/admin/products": {
      "get": {
        "operationId": "ListProducts",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BillingProduct"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/admin/users/credits": {
      "post": {
        "operationId": "GrantCreditsByUserEmail",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "credits": {
                    "format": "double",
                    "type": "number"
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "credits",
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            },
            "description": "Ok"
          },
          "400": {
            "description": "USER_ACCOUNT:INVALID_CREDITS_QUANTITY"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          },
          "404": {
            "description": "USE_PROFILE:USER_NOT_FOUND"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/credits": {
      "get": {
        "operationId": "ListCreditGrants",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CreditGrant"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Array of credit grants info"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "404": {
            "description": "USER_ACCOUNT:USER_NOT_FOUND"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/credits/balance-check": {
      "post": {
        "operationId": "CheckBalance",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BalanceCheckRequestDTO",
                "description": "Array of billable metrics event name"
              }
            }
          },
          "description": "Array of billable metrics event name",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceCheckResponseDTO"
                }
              }
            },
            "description": "Object containing status of the ingest check"
          },
          "400": {
            "description": "BILLING:INVALID_PLAN_EVENT"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "404": {
            "description": "BILLING:CUSTOMER_HAS_NO_PLAN"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/credits/ingest": {
      "put": {
        "operationId": "Ingest",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestRequestDTO",
                "description": "Array of billable metrics event name"
              }
            }
          },
          "description": "Array of billable metrics event name",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponseDTO"
                }
              }
            },
            "description": "Array of transactions Ids"
          },
          "400": {
            "description": "BILLING:INSUFFICIENT_BALANCE"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "404": {
            "description": "BILLING:CUSTOMER_HAS_NO_PLAN"
          },
          "500": {
            "description": "BILLING:FAILED_TO_DEDUCT"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/customers": {
      "post": {
        "description": "Creates new user account and add to the corresponding billing plan\nand add him to appropriate plan based on his country",
        "operationId": "GetOrCreateCustomer",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAccountResponse"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/info": {
      "get": {
        "description": "Gets the total credits of a customer including\n- available and consumed credits\n- trial credits and their expiry date",
        "operationId": "GetCustomerCreditsInfo",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCustomerBillingInfoResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "404": {
            "description": "BILLING:CUSTOMER_HAS_NO_PLAN"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/settings": {
      "get": {
        "description": "Gets the customer's current plan settings for the authenticated user.",
        "operationId": "GetCustomerBillingSettings",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCustomerBillingSettingsResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/billings/trial": {
      "post": {
        "description": "Start free trial period for a customer",
        "operationId": "StartFreeTrial",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartFreeTrialRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartFreeTrialResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "404": {
            "description": "USER_ACCOUNT:USER_NOT_FOUND"
          },
          "500": {
            "description": "BILLING:FAILED_TO_START_FREE_TRIAL"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Billings"
        ]
      }
    },
    "/v1/files/commit-upload": {
      "post": {
        "operationId": "CommitUploadFiles",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommitUploadRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommitUploadResponseDTO"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "description": "Bad request, when all commit files are failed to be committed"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Files"
        ]
      }
    },
    "/v1/files/download-urls": {
      "post": {
        "description": "\n* xx/1.txt        =>  file inside xx and called 1.txt\n\n* xx/* or xx/    => any file under xx folder or any of its sub folders\n\n* xx/*.dcm        => any file with dcm extension, under xx folder or any of its sub folders\n\n* xx              => file inside root, has no extension and called xx\n\n* /*.             => for no extension or file ends with dot for example test. test\n\n* xx/*.[txt,dcm]  => all files ending with text or dcm\n\n* xx/*.[txt,dcm,] => for txt or dicom or no extension",
        "operationId": "GetFilesDownloadUrls",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetDownloadUrlsRequestDTO",
                "description": "of type GetDownloadUrlsRequestDTO where relative paths as above"
              }
            }
          },
          "description": "of type GetDownloadUrlsRequestDTO where relative paths as above",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GetDownloadUrlsResponseDTO"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "400": {
            "description": "Bad request, when failed to get download urls for all files"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Files"
        ]
      }
    },
    "/v1/files/upload-urls": {
      "post": {
        "operationId": "GetFilesUploadUrls",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetUploadUrlsRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GetUploadUrlsResponseDTO"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "400": {
            "description": "Bad request, when failed to get upload urls for all files"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Files"
        ]
      }
    },
    "/v1/payments/customers": {
      "post": {
        "operationId": "GetOrCreateCustomer",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCustomerDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      }
    },
    "/v1/payments/customers/{customerId}/cards": {
      "get": {
        "operationId": "GetCustomerCards",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/StripePaymentMethod"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "operationId": "AttachCardToCustomer",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "paymentId": {
                    "type": "string"
                  }
                },
                "required": [
                  "paymentId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      },
      "put": {
        "operationId": "UpdateCustomerDefaultCard",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "cardId": {
                    "type": "string"
                  }
                },
                "required": [
                  "cardId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      }
    },
    "/v1/payments/customers/{customerId}/cards/{cardId}": {
      "delete": {
        "operationId": "DeleteCustomerCard",
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cardId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      }
    },
    "/v1/payments/paytr/iframe-token": {
      "post": {
        "operationId": "CreatePayTrIFrameToken",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIFFrameTokenDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      }
    },
    "/v1/payments/paytr/notification": {
      "post": {
        "operationId": "NotifyPayment",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            },
            "description": "Ok"
          },
          "400": {
            "description": "PAYMENT:IN_PROGRESS_TRANSACTION_NOT_FOUND_OR_HANDLED"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "500": {
            "description": "PAYMENT:FAILED_TO_PROCESS_PAYMENT"
          }
        },
        "security": [],
        "tags": [
          "Payments"
        ]
      }
    },
    "/v1/payments/paytr/status/{referenceId}": {
      "get": {
        "operationId": "CheckPaymentStatus",
        "parameters": [
          {
            "in": "path",
            "name": "referenceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      }
    },
    "/v1/payments/stripe/confirm": {
      "post": {
        "operationId": "ConfirmStripePayment",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPaymentPayloadRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmPaymentPayloadResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Payments"
        ]
      }
    },
    "/v1/users-accounts": {
      "post": {
        "operationId": "GetOrCreateUserAccount",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAccountResponse"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "UsersAccounts"
        ]
      }
    },
    "/v1/users-accounts/admin/filter": {
      "post": {
        "operationId": "Filter",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilterUsersRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilterUsersResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "UsersAccounts"
        ]
      }
    },
    "/v1/users-accounts/admin/move-all-users-plan": {
      "put": {
        "operationId": "MoveAllUsersToPlan",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveAllUsersToPlanRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "UsersAccounts"
        ]
      }
    },
    "/v1/users-accounts/admin/move-users-plan": {
      "put": {
        "operationId": "MoveUsersToPlan",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveUsersToPlanRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "double",
                  "type": "number"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "UsersAccounts"
        ]
      }
    },
    "/v1/users-activities/admin/filter": {
      "post": {
        "operationId": "Filter",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilterActivitiesRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilterActivitiesResponseDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "FORBIDDEN_ACCESS_FOR_NON_ADMINS"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "UsersActivities"
        ]
      }
    },
    "/v1/users/client-app": {
      "get": {
        "operationId": "GetClientApp",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Ok"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Users"
        ]
      }
    },
    "/v1/users/invalidate-user/{email}": {
      "get": {
        "operationId": "InvalidateUserProfile",
        "parameters": [
          {
            "in": "path",
            "name": "email",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deletedCount": {
                      "format": "double",
                      "type": "number"
                    }
                  },
                  "required": [
                    "deletedCount"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Ok"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Users"
        ]
      }
    },
    "/v1/users/login": {
      "post": {
        "operationId": "Login",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "password",
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "token",
                    "id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Ok"
          }
        },
        "security": [],
        "tags": [
          "Users"
        ]
      }
    },
    "/v1/users/tokens": {
      "post": {
        "operationId": "CreateAPIToken",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "idToken": {
                    "type": "string"
                  },
                  "refreshToken": {
                    "type": "string"
                  }
                },
                "required": [
                  "idToken",
                  "refreshToken"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": ""
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "500": {
            "description": "Unable to create token"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Users"
        ]
      }
    },
    "/v1/users/tokens/{userId}/{apiToken}": {
      "get": {
        "operationId": "GetJWTTokens",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "apiToken",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "accessToken": {
                      "type": "string"
                    },
                    "idToken": {
                      "type": "string"
                    },
                    "refreshToken": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "idToken",
                    "refreshToken",
                    "accessToken"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "Invalid api token"
          },
          "403": {
            "description": "Token is not owned by this user"
          },
          "404": {
            "description": "Can't find jwt tokens"
          },
          "500": {
            "description": "Unable to validate api token"
          }
        },
        "security": [],
        "tags": [
          "Users"
        ]
      }
    },
    "/v1/workspaces": {
      "post": {
        "description": "Create a new workspace if the user in the call does not already have one,\nand return the existing workspace if it already exists.",
        "operationId": "CreateOrGetWorkspace",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Workspace"
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            },
            "description": "Workspace data"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/list-users": {
      "post": {
        "operationId": "ListUsersByEmail",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "emails": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "emails"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserProfile"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Users"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/my-shares/{shareId}": {
      "get": {
        "description": "Get one of my patient's shares (which I have shared with others), by share id",
        "operationId": "GetMyShareById",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "shareId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderShareInfo"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/patient/{patientId}": {
      "delete": {
        "operationId": "Delete",
        "parameters": [
          {
            "in": "path",
            "name": "patientId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Patient"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          },
          "404": {
            "description": "Patient not found"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Patients"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/patients": {
      "get": {
        "operationId": "List",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Patient"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Patients"
        ]
      },
      "post": {
        "operationId": "Create",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientCreateDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Patient"
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          },
          "409": {
            "description": "Patient already exist found"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Patients"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/patients/readable-id/{readableId}": {
      "get": {
        "operationId": "GetByReadableId",
        "parameters": [
          {
            "in": "path",
            "name": "readableId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Patient"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          },
          "404": {
            "description": "Patient not found"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Patients"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/patients/{patientId}": {
      "get": {
        "operationId": "Get",
        "parameters": [
          {
            "in": "path",
            "name": "patientId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Patient"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          },
          "404": {
            "description": "Patient not found"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Patients"
        ]
      },
      "put": {
        "operationId": "Update",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "patientId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientUpdateDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Patient"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          },
          "404": {
            "description": "Patient not found"
          },
          "422": {
            "description": "Validation failed"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Patients"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/patients/{patientId}/plans": {
      "get": {
        "operationId": "List",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "patientId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Plan"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Plans"
        ]
      },
      "post": {
        "operationId": "Create",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "patientId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanCreateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Plans"
        ]
      },
      "put": {
        "operationId": "Update",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "patientId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Plans"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/patients/{patientId}/plans/{planId}/download-urls": {
      "get": {
        "operationId": "ListAllPlanFiles",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "patientId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GetDownloadUrlsResponseDTO"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "User is not authorized to access this workspace"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Plans"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/senders/{senderWorkspaceId}/shares/{shareId}": {
      "get": {
        "description": "Get one of sender patient's shares (which some one shared with me), by share id",
        "operationId": "GetShareById",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "senderWorkspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "shareId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiverShareInfo"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/settings": {
      "get": {
        "description": "Get workspace settings",
        "operationId": "GetWorkspaceSettings",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSettingsDTO"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/shares": {
      "get": {
        "description": "List my shares (myShares) and shared with (sharedWithMe) me info",
        "operationId": "GetAllSharedCases",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "myShares": {
                      "items": {
                        "$ref": "#/components/schemas/SenderShareInfo"
                      },
                      "type": "array"
                    },
                    "sharedWithMe": {
                      "items": {
                        "$ref": "#/components/schemas/ReceiverShareInfo"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "myShares",
                    "sharedWithMe"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Workspaces"
        ]
      },
      "post": {
        "description": "Share a patient's file(s) in the current workspace with other users' workspaces.\nIf these users are not registered with Atomica invitation emails will be sent to sign up or to complete their profiles",
        "operationId": "ShareFiles",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareFilesDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "invitedUsers": {
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/InvitedUser"
                          }
                        ],
                        "nullable": true
                      },
                      "type": "array"
                    },
                    "ownerWorkspace": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Workspace"
                        }
                      ],
                      "nullable": true
                    },
                    "sharedWorkspacesIds": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "invitedUsers",
                    "sharedWorkspacesIds",
                    "ownerWorkspace"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "It returns a new object of the current workspace,\nthe workspace ID for each receiver who is an Atomica user,\nand a list of receivers's data who are not registered but have been invited."
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/unshare": {
      "post": {
        "description": "Unshare data with some users",
        "operationId": "UnshareFiles",
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharedDataId": {
                    "type": "string"
                  },
                  "usersEmails": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "usersEmails",
                  "sharedDataId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/v1/workspaces/{workspaceId}/users": {
      "post": {
        "operationId": "ListUsers",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ids": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserProfile"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Ok"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "Users"
        ]
      }
    },
    "/v2/ai/process": {
      "post": {
        "operationId": "ProcessAdvanced",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessRequestAdvancedDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "taskId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "taskId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Missing or invalid desktop app info header"
          },
          "401": {
            "description": "JWT token is missing or invalid"
          },
          "403": {
            "description": "Unauthorized desktop client app version"
          },
          "500": {
            "description": "Unhandled internal server error"
          }
        },
        "security": [
          {
            "jwt_auth": []
          }
        ],
        "tags": [
          "AI"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Local development",
      "url": "http://localhost:3000/"
    },
    {
      "description": "Development server",
      "url": "https://develop-api-case-cloud.atomica.ai/"
    },
    {
      "description": "Staging server",
      "url": "https://staging-api-case-cloud.atomica.ai/"
    },
    {
      "description": "Demo server",
      "url": "https://demo-api-case-cloud.atomica.ai/"
    }
  ]
}
