Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,24 @@ const being_deleted = common_connected_account_warning
'Indicates that the connected account is currently being deleted. All devices, access codes, and other resources associated with this account are in the process of being removed from Seam.',
)

const provider_service_unavailable = common_connected_account_warning
.extend({
warning_code: z
.literal('provider_service_unavailable')
.describe(warning_code_description),
})
.describe(
"Indicates that the connected account's provider service is temporarily unavailable. Seam will automatically retry and reconnect when the service becomes available again.",
)

const connected_account_warning = z
.discriminatedUnion('warning_code', [
scheduled_maintenance_window,
unknown_issue_with_connected_account,
salto_ks_subscription_limit_almost_reached,
account_reauthorization_requested,
being_deleted,
provider_service_unavailable,
])
.describe('Warning associated with the connected account.')

Expand All @@ -253,6 +264,9 @@ export const connected_account_warning_map = z.object({
.nullable()
.optional(),
being_deleted: being_deleted.nullable().optional(),
provider_service_unavailable: provider_service_unavailable
.nullable()
.optional(),
})

export type ConnectedAccountWarningMap = z.infer<
Expand Down
25 changes: 25 additions & 0 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11383,6 +11383,31 @@ const openapi: OpenAPISpec = {
required: ['created_at', 'message', 'warning_code'],
type: 'object',
},
{
description:
"Indicates that the connected account's provider service is temporarily unavailable. Seam will automatically retry and reconnect when the service becomes available again.",
properties: {
created_at: {
description:
'Date and time at which Seam created the warning.',
format: 'date-time',
type: 'string',
},
message: {
description:
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
type: 'string',
},
warning_code: {
description:
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
enum: ['provider_service_unavailable'],
type: 'string',
},
},
required: ['created_at', 'message', 'warning_code'],
type: 'object',
},
],
},
type: 'array',
Expand Down
48 changes: 48 additions & 0 deletions src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14967,6 +14967,14 @@ export type Routes = {
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'being_deleted'
}
| {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'provider_service_unavailable'
}
)[]
/** Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. */
custom_metadata: {
Expand Down Expand Up @@ -36306,6 +36314,14 @@ export type Routes = {
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'being_deleted'
}
| {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'provider_service_unavailable'
}
)[]
/** Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. */
custom_metadata: {
Expand Down Expand Up @@ -36492,6 +36508,14 @@ export type Routes = {
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'being_deleted'
}
| {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'provider_service_unavailable'
}
)[]
/** Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. */
custom_metadata: {
Expand Down Expand Up @@ -36718,6 +36742,14 @@ export type Routes = {
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'being_deleted'
}
| {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'provider_service_unavailable'
}
)[]
/** Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. */
custom_metadata: {
Expand Down Expand Up @@ -84530,6 +84562,14 @@ export type Routes = {
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'being_deleted'
}
| {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'provider_service_unavailable'
}
)[]
/** Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. */
custom_metadata: {
Expand Down Expand Up @@ -115560,6 +115600,14 @@ export type Routes = {
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'being_deleted'
}
| {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'provider_service_unavailable'
}
)[]
/** Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. */
custom_metadata: {
Expand Down
Loading