diff --git a/src/lib/seam/connect/internal/schemas.ts b/src/lib/seam/connect/internal/schemas.ts index 9b18ab79..18b22d20 100644 --- a/src/lib/seam/connect/internal/schemas.ts +++ b/src/lib/seam/connect/internal/schemas.ts @@ -37,6 +37,7 @@ export { connect_webview_device_selection_mode, connected_account, custom_metadata_input, + customer, customer_data, customer_portal_theme, device_capability_flags, diff --git a/src/lib/seam/connect/models/customer/customer.ts b/src/lib/seam/connect/models/customer/customer.ts new file mode 100644 index 00000000..f1ae67a0 --- /dev/null +++ b/src/lib/seam/connect/models/customer/customer.ts @@ -0,0 +1,25 @@ +import { z } from 'zod' + +export const customer = z.object({ + customer_key: z + .string() + .describe('Unique key for the customer within the workspace.'), + workspace_id: z + .string() + .uuid() + .describe( + 'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the customer.', + ), + created_at: z + .string() + .datetime() + .describe('Date and time at which the customer was created.'), +}).describe(` + --- + route_path: /customers + undocumented: Internal resource. + --- + Represents a customer within a workspace. Customers are used to organize resources and manage access for different clients, such as hotels, property managers, and more. + `) + +export type Customer = z.infer diff --git a/src/lib/seam/connect/models/customer/index.ts b/src/lib/seam/connect/models/customer/index.ts index b6c91433..7514f939 100644 --- a/src/lib/seam/connect/models/customer/index.ts +++ b/src/lib/seam/connect/models/customer/index.ts @@ -1,4 +1,5 @@ export * from './business-vertical.js' +export * from './customer.js' export * from './customer-data.js' export * from './customer-delete-data.js' export * from './customer-portal.js' diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index 6533a229..cdc63033 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -9570,6 +9570,31 @@ export default { type: 'object', 'x-route-path': '/connected_accounts', }, + customer: { + description: + 'Represents a customer within a workspace. Customers are used to organize resources and manage access for different clients, such as hotels, property managers, and more.', + properties: { + created_at: { + description: 'Date and time at which the customer was created.', + format: 'date-time', + type: 'string', + }, + customer_key: { + description: 'Unique key for the customer within the workspace.', + type: 'string', + }, + workspace_id: { + description: + 'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the customer.', + format: 'uuid', + type: 'string', + }, + }, + required: ['customer_key', 'workspace_id', 'created_at'], + type: 'object', + 'x-route-path': '/customers', + 'x-undocumented': 'Internal resource.', + }, customization_profile: { description: 'A customization profile.', properties: { @@ -54527,6 +54552,136 @@ export default { 'x-undocumented': 'Internal endpoint for Console.', }, }, + '/seam/customer/v1/customers/list': { + get: { + description: 'Returns a list of all customers within the workspace.', + operationId: 'seamCustomerV1CustomersListGet', + parameters: [ + { + in: 'query', + name: 'limit', + schema: { + default: 500, + description: 'Maximum number of records to return per page.', + exclusiveMinimum: true, + minimum: 0, + type: 'integer', + }, + }, + { + in: 'query', + name: 'page_cursor', + schema: { + description: + "Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.", + nullable: true, + type: 'string', + }, + }, + ], + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { + customers: { + items: { $ref: '#/components/schemas/customer' }, + type: 'array', + }, + ok: { type: 'boolean' }, + pagination: { $ref: '#/components/schemas/pagination' }, + }, + required: ['customers', 'pagination', 'ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { api_key: [] }, + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + ], + summary: '/seam/customer/v1/customers/list', + tags: [], + 'x-fern-sdk-group-name': ['seam', 'customer', 'v1', 'customers'], + 'x-fern-sdk-method-name': 'list', + 'x-fern-sdk-return-value': 'customers', + 'x-response-key': 'customers', + 'x-title': 'List Customers', + 'x-undocumented': 'Internal endpoint for Console.', + }, + post: { + description: 'Returns a list of all customers within the workspace.', + operationId: 'seamCustomerV1CustomersListPost', + requestBody: { + content: { + 'application/json': { + schema: { + properties: { + limit: { + default: 500, + description: + 'Maximum number of records to return per page.', + exclusiveMinimum: true, + minimum: 0, + type: 'integer', + }, + page_cursor: { + description: + "Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.", + nullable: true, + type: 'string', + }, + }, + type: 'object', + }, + }, + }, + }, + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { + customers: { + items: { $ref: '#/components/schemas/customer' }, + type: 'array', + }, + ok: { type: 'boolean' }, + pagination: { $ref: '#/components/schemas/pagination' }, + }, + required: ['customers', 'pagination', 'ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { api_key: [] }, + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + ], + summary: '/seam/customer/v1/customers/list', + tags: [], + 'x-fern-sdk-group-name': ['seam', 'customer', 'v1', 'customers'], + 'x-fern-sdk-method-name': 'list', + 'x-fern-sdk-return-value': 'customers', + 'x-response-key': 'customers', + 'x-title': 'List Customers', + 'x-undocumented': 'Internal endpoint for Console.', + }, + }, '/seam/customer/v1/events/list': { get: { description: diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index 525fcf1a..35e747e7 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -63013,6 +63013,39 @@ export type Routes = { } maxDuration: undefined } + '/seam/customer/v1/customers/list': { + route: '/seam/customer/v1/customers/list' + method: 'GET' | 'POST' + queryParams: {} + jsonBody: {} + commonParams: { + /** Maximum number of records to return per page. */ + limit?: number + /** Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. */ + page_cursor?: ((string | undefined) | null) | undefined + } + formData: {} + jsonResponse: { + customers: { + /** Unique key for the customer within the workspace. */ + customer_key: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the customer. */ + workspace_id: string + /** Date and time at which the customer was created. */ + created_at: string + }[] + /** Information about the current page of results. */ + pagination: { + /** Opaque value that can be used to select the next page of results via the `page_cursor` parameter. */ + next_page_cursor: string | null + /** Indicates whether there is another page of results after this one. */ + has_next_page: boolean + /** URL to get the next page of results. */ + next_page_url: string | null + } + } + maxDuration: undefined + } '/seam/customer/v1/events/list': { route: '/seam/customer/v1/events/list' method: 'GET' | 'POST'