diff --git a/.last-synced-sha b/.last-synced-sha index ca51f19..c46be68 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -590c93fe53a45b4c27a1e3ce3d0670cb2456c6a5 +4e85ad7c065d07ff58b637b34885f4d8652c65fd diff --git a/package-lock.json b/package-lock.json index 66737e5..270663a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,11 +11,11 @@ "devDependencies": { "@types/node": "^26.2.0", "@workos/oagen": "^0.29.2", - "@workos/oagen-emitters": "^0.24.2", + "@workos/oagen-emitters": "^0.24.4", "diff2html": "^3.4.56", "husky": "^9.1.7", - "js-yaml": "^5.2.3", - "openapi-to-postmanv2": "^6.3.2", + "js-yaml": "^5.3.0", + "openapi-to-postmanv2": "^6.3.3", "tsdown": "^0.22.14", "tsx": "^4.23.12", "typescript": "^7.0.2" @@ -1343,9 +1343,9 @@ } }, "node_modules/@workos/oagen-emitters": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@workos/oagen-emitters/-/oagen-emitters-0.24.2.tgz", - "integrity": "sha512-rIofsTS78VTgdJagsfLM/aaVwJwKpsxQPV17vSHLP34K5d5SqonfSP97UeLVM88fCvkqd6jTL8T7t2X+6hx1sQ==", + "version": "0.24.4", + "resolved": "https://registry.npmjs.org/@workos/oagen-emitters/-/oagen-emitters-0.24.4.tgz", + "integrity": "sha512-Ex9eS2qJyjv1iKXvhzzfrBKOlJq4y3PEWw5RfWgPcDGfBNrsZTbYkM85dwAmWp2c/wsVNOTW8bZS6ij4XSk4Yg==", "dev": true, "license": "MIT", "dependencies": { @@ -2275,9 +2275,9 @@ } }, "node_modules/js-yaml": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.3.tgz", - "integrity": "sha512-n+mUVyUX5bVv7G/G2zyIHOhdxfuU1dY2NOFzTQUWiMUbFss8b57NFlgCCaggU78wSw5KVS9cllzeLyzyR+n5nw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.3.0.tgz", + "integrity": "sha512-muutsYr+e2+d3rTgUGslq5rxbBlUy3cJ61IsHag2QNDQV+7zXWjkUpmALIajhrlLlrgRUiymj6U3zUr/TMK84Q==", "dev": true, "funding": [ { @@ -2588,9 +2588,9 @@ } }, "node_modules/openapi-to-postmanv2": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/openapi-to-postmanv2/-/openapi-to-postmanv2-6.3.2.tgz", - "integrity": "sha512-5F8l6OIFlBvhpFwq7tqo2LAkY1t0kx34/I8foTVcmglmI3cd4065va/FTKjlJiRa+y80V79sCeCKdLdrXZ3e3g==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/openapi-to-postmanv2/-/openapi-to-postmanv2-6.3.3.tgz", + "integrity": "sha512-o0u6qqMMRLt7eAyFBpL/lCresQ1VqQFGe6/iPMBvNkWDXrpgGo5jo+YnP1e0MwF3tdUKLfkHssufGWMdojpPLg==", "dev": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 4d00afe..62bc984 100644 --- a/package.json +++ b/package.json @@ -52,17 +52,17 @@ "prepare": "husky" }, "overrides": { - "js-yaml": "^5.2.3", + "js-yaml": "^5.3.0", "lodash": "^4.17.23" }, "devDependencies": { "@types/node": "^26.2.0", "@workos/oagen": "^0.29.2", - "@workos/oagen-emitters": "^0.24.2", + "@workos/oagen-emitters": "^0.24.4", "diff2html": "^3.4.56", "husky": "^9.1.7", - "js-yaml": "^5.2.3", - "openapi-to-postmanv2": "^6.3.2", + "js-yaml": "^5.3.0", + "openapi-to-postmanv2": "^6.3.3", "tsdown": "^0.22.14", "tsx": "^4.23.12", "typescript": "^7.0.2" diff --git a/spec/open-api-spec.yaml b/spec/open-api-spec.yaml index 7d13546..fb24e76 100644 --- a/spec/open-api-spec.yaml +++ b/spec/open-api-spec.yaml @@ -11214,6 +11214,416 @@ paths: summary: List authorized applications tags: - organizations.authorized-applications + /organizations/{organization_id}/it_contacts: + get: + description: Get the IT contacts for an organization. + operationId: ItContactsController_list + parameters: + - name: organization_id + required: true + in: path + description: The ID of the organization. + schema: + type: string + example: org_01EHWNCE74X7JSDV0X3SZ3KJNY + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ItContactList' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + summary: List IT contacts + tags: + - organizations.it-contacts + post: + description: >- + Add an IT contact to an organization. No Admin Portal invitation is + sent, though the contact is notified if the organization has a + connection certificate nearing expiry. + operationId: ItContactsController_create + parameters: + - name: organization_id + required: true + in: path + description: The ID of the organization. + schema: + type: string + example: org_01EHWNCE74X7JSDV0X3SZ3KJNY + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateItContactDto' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/ItContact' + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '409': + description: The email address is already an IT contact of the organization. + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The error code identifying the type of error. + example: it_contact_already_exists + const: it_contact_already_exists + message: + type: string + description: A human-readable description of the error. + example: Request could not be processed. + required: + - code + - message + '422': + description: Unprocessable Entity + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '503': + description: '' + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The error code identifying the type of error. + example: concurrent_request + const: concurrent_request + message: + type: string + description: A human-readable description of the error. + example: Request could not be processed. + required: + - code + - message + summary: Create an IT contact + tags: + - organizations.it-contacts + /organizations/{organization_id}/it_contacts/{contact_id}: + delete: + description: >- + Remove an IT contact from an organization and revoke the contact's + active setup links. + operationId: ItContactsController_delete + parameters: + - name: organization_id + required: true + in: path + description: The ID of the organization. + schema: + type: string + example: org_01EHWNCE74X7JSDV0X3SZ3KJNY + - name: contact_id + required: true + in: path + description: The ID of the IT contact. + schema: + type: string + example: it_contact_01HXYZ123456789ABCDEFGHIJ + responses: + '204': + description: No Content + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '503': + description: '' + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The error code identifying the type of error. + example: concurrent_request + const: concurrent_request + message: + type: string + description: A human-readable description of the error. + example: Request could not be processed. + required: + - code + - message + summary: Delete an IT contact + tags: + - organizations.it-contacts + /organizations/{organization_id}/it_contacts/{contact_id}/invite: + post: + description: >- + Create an Admin Portal setup link and email it to the IT contact. An + organization can have at most one active invitation. + operationId: ItContactsController_invite + parameters: + - name: organization_id + required: true + in: path + description: The ID of the organization. + schema: + type: string + example: org_01EHWNCE74X7JSDV0X3SZ3KJNY + - name: contact_id + required: true + in: path + description: The ID of the IT contact. + schema: + type: string + example: it_contact_01HXYZ123456789ABCDEFGHIJ + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InviteItContactDto' + responses: + '204': + description: No Content + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '409': + description: >- + Another IT contact invitation is already active for the + organization. + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The error code identifying the type of error. + example: it_contact_invitation_already_active + const: it_contact_invitation_already_active + message: + type: string + description: A human-readable description of the error. + example: Request could not be processed. + required: + - code + - message + '422': + description: Unprocessable Entity + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '503': + description: '' + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The error code identifying the type of error. + example: concurrent_request + const: concurrent_request + message: + type: string + description: A human-readable description of the error. + example: Request could not be processed. + required: + - code + - message + summary: Invite an IT contact + tags: + - organizations.it-contacts + x-sends-email: true + /organizations/{organization_id}/it_contacts/{contact_id}/revoke: + post: + description: Revoke the organization's active Admin Portal invitation. + operationId: ItContactsController_revoke + parameters: + - name: organization_id + required: true + in: path + description: The ID of the organization. + schema: + type: string + example: org_01EHWNCE74X7JSDV0X3SZ3KJNY + - name: contact_id + required: true + in: path + description: The ID of the IT contact. + schema: + type: string + example: it_contact_01HXYZ123456789ABCDEFGHIJ + responses: + '204': + description: No Content + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: A human-readable description of the error. + example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' + required: + - message + '503': + description: '' + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The error code identifying the type of error. + example: concurrent_request + const: concurrent_request + message: + type: string + description: A human-readable description of the error. + example: Request could not be processed. + required: + - code + - message + summary: Revoke an IT contact's invitation + tags: + - organizations.it-contacts /portal/generate_link: post: description: Generate a Portal Link scoped to an Organization. @@ -12030,9 +12440,11 @@ paths: example: sk_example_123456789 type: string - name: code - required: true + required: false in: query - description: The authorization code received from the authorization callback. + description: >- + The authorization code received from the authorization callback. + Required when `grant_type` is `authorization_code`. schema: example: authorization_code_value type: string @@ -12042,14 +12454,16 @@ paths: description: The grant type for the token request. schema: example: authorization_code + enum: + - authorization_code + - urn:ietf:params:oauth:grant-type:token-exchange type: string - const: authorization_code requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TokenQueryDto' + $ref: '#/components/schemas/TokenBodyDto' responses: '200': description: OK @@ -19809,6 +20223,8 @@ tags: description: Manage authorized applications for organizations. - name: organizations.feature-flags description: Manage organization-scoped feature flags. + - name: organizations.it-contacts + description: Manage IT contacts for organizations. - name: permissions description: Manage permissions. - name: pipes @@ -21115,6 +21531,37 @@ components: example: '2030-01-01T00:00:00.000Z' required: - name + CreateItContactDto: + type: object + properties: + email: + type: string + format: email + description: The email address of the IT contact. + example: it-contact@example.com + required: + - email + InviteItContactDto: + type: object + properties: + intents: + type: array + description: The Admin Portal features that the IT contact can configure. + example: + - sso + - directory_sync + uniqueItems: true + minItems: 1 + items: + type: string + enum: + - sso + - directory_sync + - log_streams + - domain_verification + - bring_your_own_key + required: + - intents OrganizationDomainDataDto: type: object properties: @@ -22689,7 +23136,7 @@ components: required: - organization_id - user_id - TokenQueryDto: + TokenBodyDto: type: object properties: client_id: @@ -22702,17 +23149,43 @@ components: example: sk_example_123456789 code: type: string - description: The authorization code received from the authorization callback. + description: >- + The authorization code received from the authorization callback. + Required when `grant_type` is `authorization_code`. example: authorization_code_value grant_type: type: string description: The grant type for the token request. + enum: + - authorization_code + - urn:ietf:params:oauth:grant-type:token-exchange example: authorization_code - const: authorization_code + subject_token: + type: string + description: >- + The OIDC ID token to exchange. Required when `grant_type` is + `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in + the request body. + example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjMifQ.example + subject_token_type: + type: string + description: >- + The type of the subject token. Required when `grant_type` is + `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in + the request body. + example: urn:ietf:params:oauth:token-type:id_token + const: urn:ietf:params:oauth:token-type:id_token + organization_id: + type: string + description: >- + The ID of the organization whose connection the subject token is + validated against. Required when `grant_type` is + `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in + the request body. + example: org_01EHQMYV6MBK39QC5PZXHY59C3 required: - client_id - client_secret - - code - grant_type Actor: description: The user or API key that performed an action. @@ -35585,6 +36058,78 @@ components: - created_at - updated_at - value + ItContact: + type: object + properties: + object: + type: string + description: The IT Contact object. + example: it_contact + const: it_contact + id: + type: string + description: The unique ID of the IT Contact. + example: it_contact_01HXYZ123456789ABCDEFGHIJ + email: + type: string + format: email + description: The email address of the IT Contact. + example: it-contact@example.com + created_at: + format: date-time + type: string + description: An ISO 8601 timestamp. + example: '2026-01-15T12:00:00.000Z' + updated_at: + format: date-time + type: string + description: An ISO 8601 timestamp. + example: '2026-01-15T12:00:00.000Z' + required: + - object + - id + - email + - created_at + - updated_at + ItContactList: + type: object + properties: + object: + type: string + description: Indicates this is a list response. + const: list + data: + type: array + items: + $ref: '#/components/schemas/ItContact' + description: The list of records for the current page. + list_metadata: + type: object + properties: + before: + type: + - string + - 'null' + description: >- + An object ID that defines your place in the list. When the ID is + not present, you are at the start of the list. + example: it_contact_01HXYZ123456789ABCDEFGHIJ + after: + type: + - string + - 'null' + description: >- + An object ID that defines your place in the list. When the ID is + not present, you are at the end of the list. + example: it_contact_01HXYZ987654321KJIHGFEDCBA + required: + - before + - after + description: Pagination cursors for navigating between pages of results. + required: + - object + - data + - list_metadata Organization: type: object properties: