feat: v2 managed organizations (#19341)
* refactor: allow non unique PlatformBilling customerId * feat: add PlatformBilling managed organizations fields * feat: ManagedOrganization table * refactor: bill overdue based on teamId * refactor: restructure organizations module * wip: organizations endpoints * Revert "wip: organizations endpoints" This reverts commit 0e9e66fc74f31da436f12930c1b6597c650ed621. * refactor: unique index for managed organizations * wip: organizations endpoints * wip: create managed organization * remove unecessary membership check because we have guard * feat: create managed org * feat: get managed org and orgs * feat: update and delete managed orgs * wip: api key logic * feat: allow variable api key length * feat: refresh managed org api key * feat: create managed org OAuth clients using api key * finish merge main * chore: bump platform libraries * tests: fix and add more tests to api-auth.strategy.e2e * refactor: dont request managed org slug and handle metadata as object * revert: billing service and repository update overdue based on sub and customer ids * refactor: v2 OAuth client permissions (#19501) * refactor: v2 permissions as string array * refactor: frontend work with permissions as string * tests: test '*' permissions * fix:managed org creator have profile & test can fetch oauth client * fix: tests * fix: OAuthClientCard on frontend * fix: tests
This commit is contained in:
@@ -732,7 +732,7 @@
|
||||
},
|
||||
"/v2/organizations/{orgId}/attributes/{attributeId}/options": {
|
||||
"post": {
|
||||
"operationId": "OrganizationsOptionsAttributesController_createOrganizationAttributeOption",
|
||||
"operationId": "OrganizationsAttributesOptionsController_createOrganizationAttributeOption",
|
||||
"summary": "Create an attribute option",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -777,7 +777,7 @@
|
||||
"tags": ["Orgs / Attributes / Options"]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "OrganizationsOptionsAttributesController_getOrganizationAttributeOptions",
|
||||
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions",
|
||||
"summary": "Get all attribute options",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -814,7 +814,7 @@
|
||||
},
|
||||
"/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}": {
|
||||
"delete": {
|
||||
"operationId": "OrganizationsOptionsAttributesController_deleteOrganizationAttributeOption",
|
||||
"operationId": "OrganizationsAttributesOptionsController_deleteOrganizationAttributeOption",
|
||||
"summary": "Delete an attribute option",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -857,7 +857,7 @@
|
||||
"tags": ["Orgs / Attributes / Options"]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "OrganizationsOptionsAttributesController_updateOrganizationAttributeOption",
|
||||
"operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption",
|
||||
"summary": "Update an attribute option",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -912,7 +912,7 @@
|
||||
},
|
||||
"/v2/organizations/{orgId}/attributes/options/{userId}": {
|
||||
"post": {
|
||||
"operationId": "OrganizationsOptionsAttributesController_assignOrganizationAttributeOptionToUser",
|
||||
"operationId": "OrganizationsAttributesOptionsController_assignOrganizationAttributeOptionToUser",
|
||||
"summary": "Assign an attribute to a user",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -957,7 +957,7 @@
|
||||
"tags": ["Orgs / Attributes / Options"]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "OrganizationsOptionsAttributesController_getOrganizationAttributeOptionsForUser",
|
||||
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser",
|
||||
"summary": "Get all attribute options for a user",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -994,7 +994,7 @@
|
||||
},
|
||||
"/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}": {
|
||||
"delete": {
|
||||
"operationId": "OrganizationsOptionsAttributesController_unassignOrganizationAttributeOptionFromUser",
|
||||
"operationId": "OrganizationsAttributesOptionsController_unassignOrganizationAttributeOptionFromUser",
|
||||
"summary": "Unassign an attribute from a user",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -1545,6 +1545,173 @@
|
||||
"tags": ["Orgs / Memberships"]
|
||||
}
|
||||
},
|
||||
"/v2/organizations/{orgId}/organizations": {
|
||||
"post": {
|
||||
"operationId": "OrganizationsOrganizationsController_createOrganization",
|
||||
"summary": "Create an organization within an organization",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "orgId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateOrganizationInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateManagedOrganizationOutput"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["Orgs / Orgs"]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "OrganizationsOrganizationsController_getOrganizations",
|
||||
"summary": "Get all organizations within an organization",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "orgId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetManagedOrganizationsOutput"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["Orgs / Orgs"]
|
||||
}
|
||||
},
|
||||
"/v2/organizations/{orgId}/organizations/{managedOrganizationId}": {
|
||||
"get": {
|
||||
"operationId": "OrganizationsOrganizationsController_getOrganization",
|
||||
"summary": "Get an organization within an organization",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "managedOrganizationId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetManagedOrganizationOutput"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["Orgs / Orgs"]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "OrganizationsOrganizationsController_updateOrganization",
|
||||
"summary": "Update an organization within an organization",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "orgId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "managedOrganizationId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpdateOrganizationInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetManagedOrganizationOutput"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["Orgs / Orgs"]
|
||||
},
|
||||
"delete": {
|
||||
"operationId": "OrganizationsOrganizationsController_deleteOrganization",
|
||||
"summary": "Delete an organization within an organization",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "managedOrganizationId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetManagedOrganizationOutput"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["Orgs / Orgs"]
|
||||
}
|
||||
},
|
||||
"/v2/organizations/{orgId}/schedules": {
|
||||
"get": {
|
||||
"operationId": "OrganizationsSchedulesController_getOrganizationSchedules",
|
||||
@@ -2422,13 +2589,13 @@
|
||||
"tags": ["Orgs / Teams / Memberships"]
|
||||
}
|
||||
},
|
||||
"/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routing}-formId/responses": {
|
||||
"/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": {
|
||||
"get": {
|
||||
"operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses",
|
||||
"summary": "Get routing form responses",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "routing-formId",
|
||||
"name": "routingFormId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
@@ -3070,6 +3237,47 @@
|
||||
"tags": ["Orgs / Webhooks"]
|
||||
}
|
||||
},
|
||||
"/v2/api-keys/refresh": {
|
||||
"post": {
|
||||
"operationId": "ApiKeysController_refresh",
|
||||
"summary": "Refresh API Key",
|
||||
"description": "Generate a new API key and delete the current one. Provide API key to refresh as a Bearer token in the Authorization header (e.g. \"Authorization: Bearer <apiKey>\").",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "Bearer <apiKey>",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RefreshApiKeyInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RefreshApiKeyOutput"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["Api Keys"]
|
||||
}
|
||||
},
|
||||
"/v2/bookings": {
|
||||
"post": {
|
||||
"operationId": "BookingsController_2024_08_13_createBooking",
|
||||
@@ -4788,6 +4996,192 @@
|
||||
"tags": ["Me"]
|
||||
}
|
||||
},
|
||||
"/v2/oauth-clients": {
|
||||
"post": {
|
||||
"operationId": "OAuthClientsController_createOAuthClient",
|
||||
"summary": "",
|
||||
"description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateOAuthClientInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Create an OAuth client",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateOAuthClientResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["OAuth Clients"]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "OAuthClientsController_getOAuthClients",
|
||||
"summary": "",
|
||||
"description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetOAuthClientsResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["OAuth Clients"]
|
||||
}
|
||||
},
|
||||
"/v2/oauth-clients/{clientId}": {
|
||||
"get": {
|
||||
"operationId": "OAuthClientsController_getOAuthClientById",
|
||||
"summary": "",
|
||||
"description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "clientId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetOAuthClientResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["OAuth Clients"]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "OAuthClientsController_updateOAuthClient",
|
||||
"summary": "",
|
||||
"description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "clientId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpdateOAuthClientInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetOAuthClientResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["OAuth Clients"]
|
||||
},
|
||||
"delete": {
|
||||
"operationId": "OAuthClientsController_deleteOAuthClient",
|
||||
"summary": "",
|
||||
"description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "clientId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetOAuthClientResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["OAuth Clients"]
|
||||
}
|
||||
},
|
||||
"/v2/oauth-clients/{clientId}/managed-users": {
|
||||
"get": {
|
||||
"operationId": "OAuthClientsController_getOAuthClientManagedUsersById",
|
||||
"summary": "",
|
||||
"description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "clientId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "The number of items to return",
|
||||
"example": 10,
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GetManagedUsersOutput"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["OAuth Clients"]
|
||||
}
|
||||
},
|
||||
"/v2/schedules": {
|
||||
"post": {
|
||||
"operationId": "SchedulesController_2024_06_11_createSchedule",
|
||||
@@ -6757,7 +7151,24 @@
|
||||
}
|
||||
},
|
||||
"permissions": {
|
||||
"type": "number"
|
||||
"type": "array",
|
||||
"description": "Array of permission keys like [\"BOOKING_READ\", \"BOOKING_WRITE\"]. Use [\"*\"] to grant all permissions.",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"EVENT_TYPE_READ",
|
||||
"EVENT_TYPE_WRITE",
|
||||
"BOOKING_READ",
|
||||
"BOOKING_WRITE",
|
||||
"SCHEDULE_READ",
|
||||
"SCHEDULE_WRITE",
|
||||
"APPS_READ",
|
||||
"APPS_WRITE",
|
||||
"PROFILE_READ",
|
||||
"PROFILE_WRITE",
|
||||
"*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"bookingRedirectUri": {
|
||||
"type": "string"
|
||||
@@ -6826,12 +7237,27 @@
|
||||
"example": "secretValue"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "number",
|
||||
"example": 3
|
||||
"type": "array",
|
||||
"description": "Array of permission keys like [\"BOOKING_READ\", \"BOOKING_WRITE\"]",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"EVENT_TYPE_READ",
|
||||
"EVENT_TYPE_WRITE",
|
||||
"BOOKING_READ",
|
||||
"BOOKING_WRITE",
|
||||
"SCHEDULE_READ",
|
||||
"SCHEDULE_WRITE",
|
||||
"APPS_READ",
|
||||
"APPS_WRITE",
|
||||
"PROFILE_READ",
|
||||
"PROFILE_WRITE"
|
||||
]
|
||||
},
|
||||
"example": ["BOOKING_READ", "BOOKING_WRITE"]
|
||||
},
|
||||
"logo": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"type": "object",
|
||||
"example": "https://example.com/logo.png"
|
||||
},
|
||||
"redirectUris": {
|
||||
@@ -6849,6 +7275,22 @@
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"example": "2024-03-23T08:33:21.851Z"
|
||||
},
|
||||
"bookingRedirectUri": {
|
||||
"type": "string",
|
||||
"example": "https://example.com/booking-redirect"
|
||||
},
|
||||
"bookingCancelRedirectUri": {
|
||||
"type": "string",
|
||||
"example": "https://example.com/booking-cancel"
|
||||
},
|
||||
"bookingRescheduleRedirectUri": {
|
||||
"type": "string",
|
||||
"example": "https://example.com/booking-reschedule"
|
||||
},
|
||||
"areEmailsEnabled": {
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "name", "secret", "permissions", "redirectUris", "organizationId", "createdAt"]
|
||||
@@ -6923,6 +7365,46 @@
|
||||
},
|
||||
"required": ["refreshToken"]
|
||||
},
|
||||
"RefreshApiKeyInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiKeyDaysValid": {
|
||||
"type": "number",
|
||||
"minimum": 1,
|
||||
"description": "For how many days is managed organization api key valid. Defaults to 30 days.",
|
||||
"example": 60,
|
||||
"default": 30
|
||||
},
|
||||
"apiKeyNeverExpires": {
|
||||
"type": "boolean",
|
||||
"description": "If true, organization api key never expires.",
|
||||
"example": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"ApiKeyOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiKey": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["apiKey"]
|
||||
},
|
||||
"RefreshApiKeyOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "success",
|
||||
"enum": ["success", "error"]
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/ApiKeyOutput"
|
||||
}
|
||||
},
|
||||
"required": ["status", "data"]
|
||||
},
|
||||
"InputAddressLocation_2024_06_14": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -12946,6 +13428,127 @@
|
||||
},
|
||||
"required": ["status", "data"]
|
||||
},
|
||||
"CreateOrganizationInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiKeyDaysValid": {
|
||||
"type": "number",
|
||||
"minimum": 1,
|
||||
"description": "For how many days is managed organization api key valid. Defaults to 30 days.",
|
||||
"example": 60,
|
||||
"default": 30
|
||||
},
|
||||
"apiKeyNeverExpires": {
|
||||
"type": "boolean",
|
||||
"description": "If true, organization api key never expires.",
|
||||
"example": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Name of the organization",
|
||||
"example": "CalTeam"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
},
|
||||
"ManagedOrganizationWithApiKeyOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
},
|
||||
"apiKey": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["id", "name", "apiKey"]
|
||||
},
|
||||
"CreateManagedOrganizationOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "success",
|
||||
"enum": ["success", "error"]
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/ManagedOrganizationWithApiKeyOutput"
|
||||
}
|
||||
},
|
||||
"required": ["status", "data"]
|
||||
},
|
||||
"ManagedOrganizationOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": ["id", "name"]
|
||||
},
|
||||
"GetManagedOrganizationOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "success",
|
||||
"enum": ["success", "error"]
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/ManagedOrganizationOutput"
|
||||
}
|
||||
},
|
||||
"required": ["status", "data"]
|
||||
},
|
||||
"GetManagedOrganizationsOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "success",
|
||||
"enum": ["success", "error"]
|
||||
},
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ManagedOrganizationOutput"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["status", "data"]
|
||||
},
|
||||
"UpdateOrganizationInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Name of the organization",
|
||||
"example": "CalTeam"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RoutingFormResponseOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user