diff --git a/.last-synced-sha b/.last-synced-sha index 1f80e86..d1addb2 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -47bcae12b5f6645e1a33184346e7e8d8df7b9ec8 +0864a118797c510b58ae518fcd0c40f48e43af69 diff --git a/spec/open-api-spec.yaml b/spec/open-api-spec.yaml index ad1b4cf..77952db 100644 --- a/spec/open-api-spec.yaml +++ b/spec/open-api-spec.yaml @@ -10816,6 +10816,21 @@ paths: schema: example: github type: string + - name: idempotency-key + in: header + description: >- + Makes retries of this explicit add return the connection the first + attempt created instead of creating another. Reuse the same key for + every retry of one request. A matching retry within 24 hours returns + the existing connection; reusing the key for a different owner, + integration, or authentication method, or after 24 hours while that + connection exists, returns 409 `idempotency_key_conflict`. If that + connection was deleted, the key creates a new one. Requests without + a key are not retry-safe. + required: false + schema: + type: string + example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80 requestBody: required: true content: @@ -10980,7 +10995,9 @@ paths: '409': description: >- `connected_account_limit_reached` when the provider and owner - already have 25 connections. + already have 25 connections, or `idempotency_key_conflict` when the + `Idempotency-Key` was already used for a different connection + request or its replay window has passed. content: application/json: schema: @@ -10989,9 +11006,11 @@ paths: properties: code: type: string + enum: + - connected_account_limit_reached + - idempotency_key_conflict description: The error code identifying the type of error. example: connected_account_limit_reached - const: connected_account_limit_reached message: type: string description: A human-readable description of the error. @@ -11722,6 +11741,21 @@ paths: schema: example: salesforce type: string + - name: idempotency-key + in: header + description: >- + Makes retries of this explicit add return the connection the first + attempt created instead of creating another. Reuse the same key for + every retry of one request. A matching retry within 24 hours returns + the existing connection; reusing the key for a different owner, + integration, or authentication method, or after 24 hours while that + connection exists, returns 409 `idempotency_key_conflict`. If that + connection was deleted, the key creates a new one. Requests without + a key are not retry-safe. + required: false + schema: + type: string + example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80 requestBody: required: true content: @@ -11901,7 +11935,9 @@ paths: '409': description: >- `connected_account_limit_reached` when the provider and owner - already have 25 connections. + already have 25 connections, or `idempotency_key_conflict` when the + `Idempotency-Key` was already used for a different connection + request or its replay window has passed. content: application/json: schema: @@ -11910,9 +11946,11 @@ paths: properties: code: type: string + enum: + - connected_account_limit_reached + - idempotency_key_conflict description: The error code identifying the type of error. example: connected_account_limit_reached - const: connected_account_limit_reached message: type: string description: A human-readable description of the error. @@ -16164,6 +16202,8 @@ paths: config: instance_url: https://example.my.salesforce.com state: connected + established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: null created_at: '2024-01-16T14:20:00.000Z' updated_at: '2024-01-16T14:20:00.000Z' '400': @@ -16341,6 +16381,21 @@ paths: schema: example: github type: string + - name: idempotency-key + in: header + description: >- + Makes retries of this explicit add return the connection the first + attempt created instead of creating another. Reuse the same key for + every retry of one request. A matching retry within 24 hours returns + the existing connection; reusing the key for a different owner, + integration, or authentication method, or after 24 hours while that + connection exists, returns 409 `idempotency_key_conflict`. If that + connection was deleted, the key creates a new one. Requests without + a key are not retry-safe. + required: false + schema: + type: string + example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80 requestBody: required: true content: @@ -16372,6 +16427,8 @@ paths: config: instance_url: https://example.my.salesforce.com state: connected + established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: null created_at: '2024-01-16T14:20:00.000Z' updated_at: '2024-01-16T14:20:00.000Z' '401': @@ -16428,9 +16485,11 @@ paths: '409': description: >- The compatibility connection already exists for this organization - and integration, or `connected_account_limit_reached` when + and integration, `connected_account_limit_reached` when `connection_intent: add` would create a standard connection and the - owner already has 25 connections. + owner already has 25 connections, or `idempotency_key_conflict` when + the `Idempotency-Key` was already used for a different connection + request or its replay window has passed. content: application/json: schema: @@ -16439,9 +16498,11 @@ paths: properties: code: type: string + enum: + - connected_account_limit_reached + - idempotency_key_conflict description: The error code identifying the type of error. example: connected_account_limit_reached - const: connected_account_limit_reached message: type: string description: A human-readable description of the error. @@ -16633,6 +16694,8 @@ paths: config: instance_url: https://example.my.salesforce.com state: connected + established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: null created_at: '2024-01-16T14:20:00.000Z' updated_at: '2024-01-16T14:20:00.000Z' '400': @@ -16802,6 +16865,8 @@ paths: config: instance_url: https://example.my.salesforce.com state: connected + established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: null created_at: '2024-01-16T14:20:00.000Z' updated_at: '2024-01-16T14:20:00.000Z' userlandUserId: null @@ -25219,6 +25284,21 @@ paths: schema: example: org_01EHZNVPK3SFK441A1RGBFSHRT type: string + - name: idempotency-key + in: header + description: >- + Makes retries of this explicit add return the connection the first + attempt created instead of creating another. Reuse the same key for + every retry of one request. A matching retry within 24 hours returns + the existing connection; reusing the key for a different owner, + integration, or authentication method, or after 24 hours while that + connection exists, returns 409 `idempotency_key_conflict`. If that + connection was deleted, the key creates a new one. Requests without + a key are not retry-safe. + required: false + schema: + type: string + example: 0b6c3f0e-7a51-4c3a-9d8e-2f1b5a6c7d80 requestBody: required: true content: @@ -25273,9 +25353,11 @@ paths: '409': description: >- The compatibility connection already exists for this user, - integration, and organization, or `connected_account_limit_reached` + integration, and organization, `connected_account_limit_reached` when `connection_intent: add` would create a standard connection and - the owner already has 25 connections. + the owner already has 25 connections, or `idempotency_key_conflict` + when the `Idempotency-Key` was already used for a different + connection request or its replay window has passed. content: application/json: schema: @@ -25284,9 +25366,11 @@ paths: properties: code: type: string + enum: + - connected_account_limit_reached + - idempotency_key_conflict description: The error code identifying the type of error. example: connected_account_limit_reached - const: connected_account_limit_reached message: type: string description: A human-readable description of the error. @@ -34920,6 +35004,29 @@ components: - needs_reauthorization description: The state of the connected account. example: connected + established_by_user_id: + type: + - string + - 'null' + description: >- + The ID of the User whose authorization established the connected + account, or null when it is developer-managed, its establisher is + unknown, or the establishing member left the organization. + Historical events may omit this field. + example: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: + description: >- + Why WorkOS put the connected account in its current state, or null + when there is no WorkOS-recorded reason. + `establishing_member_membership_ended` means the member who + established an organization-owned connection is no longer an active + member. Additional values may be added. Historical events may omit + this field. + example: null + oneOf: + - type: string + const: establishing_member_membership_ended + - type: 'null' created_at: format: date-time type: string @@ -47078,9 +47185,40 @@ components: - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed. + `state_reason` explains why when WorkOS invalidated the connection + itself. - `disconnected`: The connection has been disconnected. example: connected + established_by_user_id: + type: + - string + - 'null' + description: >- + The [User](/reference/authkit/user) whose authorization established + this connection. `null` when the connection is developer-managed or + its establisher is unknown, and when the establishing member lost + access to the organization — in which case `state_reason` is + `establishing_member_membership_ended`. + example: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: + description: >- + Why WorkOS put the connection in its current `state`, or `null` when + there is no WorkOS-recorded reason: + + - `establishing_member_membership_ended`: The member who established + this organization-owned connection is no longer an active member of + the organization, so its credentials were cleared. An organization + admin must provide new credentials. + + + Additional values may be added; treat an unrecognized value as an + unknown reason. + example: null + oneOf: + - type: string + const: establishing_member_membership_ended + - type: 'null' created_at: type: string description: The timestamp when the connection was created. @@ -47372,11 +47510,44 @@ components: - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required - scopes have changed. + scopes have changed. `state_reason` explains why when + WorkOS invalidated the connection itself. - `disconnected`: The connection has been disconnected. example: connected + established_by_user_id: + type: + - string + - 'null' + description: >- + The [User](/reference/authkit/user) whose + authorization established this connection. `null` when + the connection is developer-managed or its establisher + is unknown, and when the establishing member lost + access to the organization — in which case + `state_reason` is + `establishing_member_membership_ended`. + example: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: + description: >- + Why WorkOS put the connection in its current `state`, + or `null` when there is no WorkOS-recorded reason: + + - `establishing_member_membership_ended`: The member + who established this organization-owned connection is + no longer an active member of the organization, so its + credentials were cleared. An organization admin must + provide new credentials. + + + Additional values may be added; treat an unrecognized + value as an unknown reason. + example: null + oneOf: + - type: string + const: establishing_member_membership_ended + - type: 'null' created_at: type: string description: The timestamp when the connection was created. @@ -47547,10 +47718,42 @@ components: - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have - changed. + changed. `state_reason` explains why when WorkOS + invalidated the connection itself. - `disconnected`: The connection has been disconnected. example: connected + established_by_user_id: + type: + - string + - 'null' + description: >- + The [User](/reference/authkit/user) whose authorization + established this connection. `null` when the connection + is developer-managed or its establisher is unknown, and + when the establishing member lost access to the + organization — in which case `state_reason` is + `establishing_member_membership_ended`. + example: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: + description: >- + Why WorkOS put the connection in its current `state`, or + `null` when there is no WorkOS-recorded reason: + + - `establishing_member_membership_ended`: The member who + established this organization-owned connection is no + longer an active member of the organization, so its + credentials were cleared. An organization admin must + provide new credentials. + + + Additional values may be added; treat an unrecognized + value as an unknown reason. + example: null + oneOf: + - type: string + const: establishing_member_membership_ended + - type: 'null' created_at: type: string description: The timestamp when the connection was created. @@ -47747,9 +47950,40 @@ components: - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed. + `state_reason` explains why when WorkOS invalidated the connection + itself. - `disconnected`: The connection has been disconnected. example: connected + established_by_user_id: + type: + - string + - 'null' + description: >- + The [User](/reference/authkit/user) whose authorization established + this connection. `null` when the connection is developer-managed or + its establisher is unknown, and when the establishing member lost + access to the organization — in which case `state_reason` is + `establishing_member_membership_ended`. + example: user_01EHZNVPK3SFK441A1RGBFSHRT + state_reason: + description: >- + Why WorkOS put the connection in its current `state`, or `null` when + there is no WorkOS-recorded reason: + + - `establishing_member_membership_ended`: The member who established + this organization-owned connection is no longer an active member of + the organization, so its credentials were cleared. An organization + admin must provide new credentials. + + + Additional values may be added; treat an unrecognized value as an + unknown reason. + example: null + oneOf: + - type: string + const: establishing_member_membership_ended + - type: 'null' created_at: type: string description: The timestamp when the connection was created.