From f8ca650848e4b5a31fba02f0ccb07d70baf50a85 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 9 Feb 2024 08:05:56 +0000 Subject: [PATCH 01/15] feat: Add phones.deactivate --- package-lock.json | 8 ++++---- package.json | 2 +- src/lib/seam/connect/routes/phones.ts | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0aa787b7..e52b7541 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@seamapi/fake-seam-connect": "^1.44.2", - "@seamapi/types": "^1.106.0", + "@seamapi/types": "^1.108.0", "@types/eslint": "^8.44.2", "@types/node": "^20.8.10", "ava": "^5.0.1", @@ -1075,9 +1075,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.106.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.106.0.tgz", - "integrity": "sha512-xnwMMt+gHL6uz4cLD1LvXmtM2z0P+PwYA4FE3yngwps2VkaNNpR+U94eIl432zlwt+Fl/UR57aQbmg7OOP8ceA==", + "version": "1.108.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.108.0.tgz", + "integrity": "sha512-YlvQOTLV+vOa/oDJqm8GRi69QULMnfZzISBbbziqSDPzRfujeR6S5RR4ADkBjeKILw7mqdO90JuPxxZjh1Iy9A==", "dev": true, "engines": { "node": ">=18.12.0", diff --git a/package.json b/package.json index 3ec419c6..c2369877 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ }, "devDependencies": { "@seamapi/fake-seam-connect": "^1.44.2", - "@seamapi/types": "^1.106.0", + "@seamapi/types": "^1.108.0", "@types/eslint": "^8.44.2", "@types/node": "^20.8.10", "ava": "^5.0.1", diff --git a/src/lib/seam/connect/routes/phones.ts b/src/lib/seam/connect/routes/phones.ts index 2dca2203..e0ce67df 100644 --- a/src/lib/seam/connect/routes/phones.ts +++ b/src/lib/seam/connect/routes/phones.ts @@ -153,6 +153,14 @@ export class SeamHttpPhones { await clientSessions.get() } + async deactivate(body?: PhonesDeactivateBody): Promise { + await this.client.request({ + url: '/phones/deactivate', + method: 'post', + data: body, + }) + } + async list(body?: PhonesListParams): Promise { const { data } = await this.client.request({ url: '/phones/list', @@ -164,6 +172,14 @@ export class SeamHttpPhones { } } +export type PhonesDeactivateBody = RouteRequestBody<'/phones/deactivate'> + +export type PhonesDeactivateResponse = SetNonNullable< + Required> +> + +export type PhonesDeactivateOptions = never + export type PhonesListParams = RouteRequestBody<'/phones/list'> export type PhonesListResponse = SetNonNullable< From 869d792418135ef4e3d7347258520907a327f41f Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 9 Feb 2024 08:49:14 +0000 Subject: [PATCH 02/15] Add user identity delete example --- examples/delete-user-identity.ts | 114 +++++++++++++++++++++++++++++++ examples/index.ts | 3 +- 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 examples/delete-user-identity.ts diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts new file mode 100644 index 00000000..f21999a9 --- /dev/null +++ b/examples/delete-user-identity.ts @@ -0,0 +1,114 @@ +import type { Builder, Command, Describe } from 'landlubber' + +import type { AcsCredentialsListResponse } from '@seamapi/http/connect' + +import type { Handler } from './index.js' + +interface Options { + userIdentityId: string +} + +export const command: Command = 'delete-user-identity userIdentityId' + +export const describe: Describe = 'Delete a user identity' + +export const builder: Builder = { + userIdentityId: { + type: 'string', + describe: 'User identity id to delete', + }, +} + +export const handler: Handler = async ({ + userIdentityId, + seam, + logger, +}) => { + const waitForEvent = + (eventType: string, idKey: string) => + async (resource: any): Promise => { + // Application architecture specific logic that waits for an event matching + // event.event_type === eventType && event[idKey] === resource[idKey] + logger.info({ eventType, idKey, resource }, 'Got event') + } + + const clientSessions = await seam.clientSessions.list({ + // param not implemented + user_identity_id: userIdentityId, + }) + + for (const clientSession of clientSessions) { + await seam.clientSessions.delete({ + client_session_id: clientSession.client_session_id, + }) + } + + const enrollmentAutomations = + await seam.userIdentities.enrollmentAutomations.list({ + user_identity_id: userIdentityId, + }) + + for (const enrollmentAutomation of enrollmentAutomations) { + // endpoint not implemented + await seam.userIdentities.enrollmentAutomations.delete({ + enrollment_automation_id: enrollmentAutomation.enrollment_automation_id, + }) + } + + await Promise.all( + enrollmentAutomations.map( + // event not implemented + waitForEvent('enrollment_automation.deleted', 'enrollment_automation_id'), + ), + ) + + const phones = await seam.phones.list({ + owner_user_identity_id: userIdentityId, + }) + + for (const phone of phones) { + await seam.phones.deactivate({ + device_id: phone.device_id, + }) + } + + // event not implemented + await Promise.all(phones.map(waitForEvent('phone.deactivated', 'device_id'))) + + for (const phone of phones) { + await seam.devices.delete({ + device_id: phone.device_id, + }) + } + + const acsUsers = await seam.acs.users.list({ + user_identity_id: userIdentityId, + }) + + const deletedCredentials: AcsCredentialsListResponse['acs_credentials'] = [] + + for (const acsUser of acsUsers) { + const credentials = await seam.acs.credentials.list({ + acs_user_id: acsUser.acs_user_id, + }) + + for (const credential of credentials) { + await seam.acs.credentials.delete({ + acs_credential_id: credential.acs_credential_id, + }) + } + + deletedCredentials.concat(credentials) + } + + // event not implemented + await Promise.all( + deletedCredentials.map( + waitForEvent('acs_credential.deleted', 'acs_credential_id'), + ), + ) + + await seam.userIdentities.delete({ + user_identity_id: userIdentityId, + }) +} diff --git a/examples/index.ts b/examples/index.ts index f9687603..ea2f68f4 100755 --- a/examples/index.ts +++ b/examples/index.ts @@ -12,6 +12,7 @@ import landlubber, { import { SeamHttp } from '@seamapi/http/connect' +import * as deleteUserIdentity from './delete-user-identity.js' import * as locks from './locks.js' import * as unlock from './unlock.js' import * as workspace from './workspace.js' @@ -24,7 +25,7 @@ interface ClientContext { seam: SeamHttp } -const commands = [locks, unlock, workspace] +const commands = [deleteUserIdentity, locks, unlock, workspace] const createAppContext: MiddlewareFunction = async (argv) => { const apiKey = argv['api-key'] From 438583e2d2a5b3bf705e268047221891278f73ca Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 9 Feb 2024 08:51:01 +0000 Subject: [PATCH 03/15] ci: Generate code --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e52b7541..b0fac7f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "npm": ">= 9.0.0" }, "peerDependencies": { - "@seamapi/types": "^1.106.0", + "@seamapi/types": "^1.108.0", "type-fest": "^4.0.0" }, "peerDependenciesMeta": { diff --git a/package.json b/package.json index c2369877..6750c513 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "npm": ">= 9.0.0" }, "peerDependencies": { - "@seamapi/types": "^1.106.0", + "@seamapi/types": "^1.108.0", "type-fest": "^4.0.0" }, "peerDependenciesMeta": { From a379519faa9135f3b4890b553b8edb3cc067b81f Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 9 Feb 2024 09:01:25 +0000 Subject: [PATCH 04/15] Add missing delete step --- examples/delete-user-identity.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index f21999a9..d9140426 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -29,6 +29,8 @@ export const handler: Handler = async ({ async (resource: any): Promise => { // Application architecture specific logic that waits for an event matching // event.event_type === eventType && event[idKey] === resource[idKey] + // In this example, the event may arrive before this function is called, + // so any implementation must handle that case. logger.info({ eventType, idKey, resource }, 'Got event') } @@ -101,6 +103,11 @@ export const handler: Handler = async ({ deletedCredentials.concat(credentials) } + // event not implemented + await Promise.all( + deletedCredentials.map(waitForEvent('acs_user.deleted', 'acs_user_id')), + ) + // event not implemented await Promise.all( deletedCredentials.map( From 7ea4d51c512f8e5293fe3ef9e0c980a7de163544 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 9 Feb 2024 09:07:06 +0000 Subject: [PATCH 05/15] Expand comment --- examples/delete-user-identity.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index d9140426..e918e347 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -31,6 +31,11 @@ export const handler: Handler = async ({ // event.event_type === eventType && event[idKey] === resource[idKey] // In this example, the event may arrive before this function is called, // so any implementation must handle that case. + // + // More generally, an application just needs to wait for the resource to be deleted before continuing, + // or the next operation may error. + // If, on error, this entire deletion function is called again repeatedly, + // deletion will either success or be stuck due to some resource that fails to delete. logger.info({ eventType, idKey, resource }, 'Got event') } From 720e807d686d83c6dc7cec440c1f678de3782859 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 9 Feb 2024 09:08:36 +0000 Subject: [PATCH 06/15] Fix typo --- examples/delete-user-identity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index e918e347..0734ff6d 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -35,7 +35,7 @@ export const handler: Handler = async ({ // More generally, an application just needs to wait for the resource to be deleted before continuing, // or the next operation may error. // If, on error, this entire deletion function is called again repeatedly, - // deletion will either success or be stuck due to some resource that fails to delete. + // deletion will either eventually succeed, or be stuck due to some resource that fails to delete. logger.info({ eventType, idKey, resource }, 'Got event') } From d49f0fe99bcf12501bd1380d7e0a6cd7fcfbbf6a Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Sun, 11 Feb 2024 11:27:43 -0800 Subject: [PATCH 07/15] Implement event waiting in example --- examples/delete-user-identity.ts | 110 ++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 37 deletions(-) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index 0734ff6d..0a01e5a1 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -1,6 +1,13 @@ import type { Builder, Command, Describe } from 'landlubber' -import type { AcsCredentialsListResponse } from '@seamapi/http/connect' +import type { + AcsCredentialsGetResponse, + AcsUsersGetResponse, + EventsListParams, + EventsListResponse, + PhonesListResponse, + UserIdentitiesEnrollmentAutomationsGetResponse, +} from '@seamapi/http/connect' import type { Handler } from './index.js' @@ -24,23 +31,59 @@ export const handler: Handler = async ({ seam, logger, }) => { - const waitForEvent = - (eventType: string, idKey: string) => - async (resource: any): Promise => { - // Application architecture specific logic that waits for an event matching - // event.event_type === eventType && event[idKey] === resource[idKey] - // In this example, the event may arrive before this function is called, - // so any implementation must handle that case. - // - // More generally, an application just needs to wait for the resource to be deleted before continuing, - // or the next operation may error. - // If, on error, this entire deletion function is called again repeatedly, - // deletion will either eventually succeed, or be stuck due to some resource that fails to delete. - logger.info({ eventType, idKey, resource }, 'Got event') - } + const waitForEvent = async ( + eventType: SeamEventType, + eventFilter: (event: SeamEvent) => boolean, + ): Promise => { + let events: SeamEvent[] = [] + do { + events = await seam.events.list({ event_type: eventType }) + } while (!events.some(eventFilter)) + } + + const waitForAcsUserDeleted = async (acsUser: AcsUser): Promise => { + await waitForEvent( + 'acs_user.deleted', + (event) => + 'acs_user_id' in event && event.acs_user_id === acsUser.acs_user_id, + ) + } + + const waitForAcsCredentialDeleted = async ( + acsCredential: AcsCredential, + ): Promise => { + await waitForEvent( + 'acs_credential.deleted', + (event) => + 'acs_credential_id' in event && + event.acs_credential_id === acsCredential.acs_credential_id, + ) + } + + const waitForPhoneDeactivated = async (phone: Phone): Promise => { + await waitForEvent( + 'phone.deactivated', + (event) => 'device_id' in event && event.device_id === phone.device_id, + ) + } + + const waitForEnrollmentAutomationDeleted = async ( + enrollmentAutomation: EnrollmentAutomation, + ): Promise => { + await waitForEvent( + 'enrollment_automation.deleted', + (event) => + 'enrollment_automation_id' in event && + event.enrollment_automation_id === + enrollmentAutomation.enrollment_automation_id, + ) + } + + const userIdentity = await seam.userIdentities.get({ + user_identity_id: userIdentityId, + }) const clientSessions = await seam.clientSessions.list({ - // param not implemented user_identity_id: userIdentityId, }) @@ -56,17 +99,13 @@ export const handler: Handler = async ({ }) for (const enrollmentAutomation of enrollmentAutomations) { - // endpoint not implemented await seam.userIdentities.enrollmentAutomations.delete({ enrollment_automation_id: enrollmentAutomation.enrollment_automation_id, }) } await Promise.all( - enrollmentAutomations.map( - // event not implemented - waitForEvent('enrollment_automation.deleted', 'enrollment_automation_id'), - ), + enrollmentAutomations.map(waitForEnrollmentAutomationDeleted), ) const phones = await seam.phones.list({ @@ -79,8 +118,7 @@ export const handler: Handler = async ({ }) } - // event not implemented - await Promise.all(phones.map(waitForEvent('phone.deactivated', 'device_id'))) + await Promise.all(phones.map(waitForPhoneDeactivated)) for (const phone of phones) { await seam.devices.delete({ @@ -92,8 +130,6 @@ export const handler: Handler = async ({ user_identity_id: userIdentityId, }) - const deletedCredentials: AcsCredentialsListResponse['acs_credentials'] = [] - for (const acsUser of acsUsers) { const credentials = await seam.acs.credentials.list({ acs_user_id: acsUser.acs_user_id, @@ -105,22 +141,22 @@ export const handler: Handler = async ({ }) } - deletedCredentials.concat(credentials) + await Promise.all(credentials.map(waitForAcsCredentialDeleted)) } - // event not implemented - await Promise.all( - deletedCredentials.map(waitForEvent('acs_user.deleted', 'acs_user_id')), - ) - - // event not implemented - await Promise.all( - deletedCredentials.map( - waitForEvent('acs_credential.deleted', 'acs_credential_id'), - ), - ) + await Promise.all(acsUsers.map(waitForAcsUserDeleted)) await seam.userIdentities.delete({ user_identity_id: userIdentityId, }) + + logger.info({ userIdentity }, 'Deleted user identity') } + +type AcsUser = AcsUsersGetResponse['acs_user'] +type AcsCredential = AcsCredentialsGetResponse['acs_credential'] +type EnrollmentAutomation = + UserIdentitiesEnrollmentAutomationsGetResponse['enrollment_automation'] +type Phone = PhonesListResponse['phones'][number] +type SeamEvent = EventsListResponse['events'][number] +type SeamEventType = EventsListParams['event_type'] From 7224e8274bafb24395b3d6f00c184d0a193dcdd0 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 16 Feb 2024 13:38:32 -0800 Subject: [PATCH 08/15] Update delete-user-identity.ts --- examples/delete-user-identity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index 0a01e5a1..b94a10df 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -84,7 +84,7 @@ export const handler: Handler = async ({ }) const clientSessions = await seam.clientSessions.list({ - user_identity_id: userIdentityId, + user_identity_ids: [userIdentityId], }) for (const clientSession of clientSessions) { From c3480fc9e9a1003d5f2468afa1fd36dcaede959a Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 16 Feb 2024 13:41:43 -0800 Subject: [PATCH 09/15] Update delete-user-identity.ts --- examples/delete-user-identity.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index b94a10df..c6a6e7e8 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -120,12 +120,6 @@ export const handler: Handler = async ({ await Promise.all(phones.map(waitForPhoneDeactivated)) - for (const phone of phones) { - await seam.devices.delete({ - device_id: phone.device_id, - }) - } - const acsUsers = await seam.acs.users.list({ user_identity_id: userIdentityId, }) From 456cb9fa557378553afc6ba06dc59776fdfae390 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 21 Feb 2024 15:06:09 -0800 Subject: [PATCH 10/15] Delete is_multi_phone_sync_credential before enrollment automation --- examples/delete-user-identity.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index c6a6e7e8..ef147a0d 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -99,6 +99,19 @@ export const handler: Handler = async ({ }) for (const enrollmentAutomation of enrollmentAutomations) { + const credentials = await seam.acs.credentials.list({ + enrollment_automation_id: enrollmentAutomation.enrollment_automation_id, + is_multi_phone_sync_credential: true, + }) + + for (const credential of credentials) { + await seam.acs.credentials.delete({ + acs_credential_id: credential.acs_credential_id, + }) + } + + await Promise.all(credentials.map(waitForAcsCredentialDeleted)) + await seam.userIdentities.enrollmentAutomations.delete({ enrollment_automation_id: enrollmentAutomation.enrollment_automation_id, }) @@ -136,6 +149,8 @@ export const handler: Handler = async ({ } await Promise.all(credentials.map(waitForAcsCredentialDeleted)) + + await seam.acs.users.delete({ acs_user_id: acsUser.acs_user_id }) } await Promise.all(acsUsers.map(waitForAcsUserDeleted)) From 02c8d299343fff9e21bda2ce043efc2cc17a29ac Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 21 Feb 2024 15:24:59 -0800 Subject: [PATCH 11/15] Delete is_multi_phone_sync_credential based on acs user --- examples/delete-user-identity.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index ef147a0d..0952298b 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -93,14 +93,13 @@ export const handler: Handler = async ({ }) } - const enrollmentAutomations = - await seam.userIdentities.enrollmentAutomations.list({ - user_identity_id: userIdentityId, - }) + const acsUsers = await seam.acs.users.list({ + user_identity_id: userIdentityId, + }) - for (const enrollmentAutomation of enrollmentAutomations) { + for (const acsUser of acsUsers) { const credentials = await seam.acs.credentials.list({ - enrollment_automation_id: enrollmentAutomation.enrollment_automation_id, + acs_user_id: acsUser.acs_user_id, is_multi_phone_sync_credential: true, }) @@ -112,6 +111,15 @@ export const handler: Handler = async ({ await Promise.all(credentials.map(waitForAcsCredentialDeleted)) + await seam.acs.users.delete({ acs_user_id: acsUser.acs_user_id }) + } + + const enrollmentAutomations = + await seam.userIdentities.enrollmentAutomations.list({ + user_identity_id: userIdentityId, + }) + + for (const enrollmentAutomation of enrollmentAutomations) { await seam.userIdentities.enrollmentAutomations.delete({ enrollment_automation_id: enrollmentAutomation.enrollment_automation_id, }) @@ -133,10 +141,6 @@ export const handler: Handler = async ({ await Promise.all(phones.map(waitForPhoneDeactivated)) - const acsUsers = await seam.acs.users.list({ - user_identity_id: userIdentityId, - }) - for (const acsUser of acsUsers) { const credentials = await seam.acs.credentials.list({ acs_user_id: acsUser.acs_user_id, From 729830f4972e9fa2904628eb68fea97ebc04eff5 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 28 Feb 2024 13:02:28 -0800 Subject: [PATCH 12/15] Run npm update --- package-lock.json | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index ca7e9d9d..4e6875f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -217,9 +217,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1041,9 +1041,9 @@ ] }, "node_modules/@seamapi/fake-devicedb": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@seamapi/fake-devicedb/-/fake-devicedb-1.5.0.tgz", - "integrity": "sha512-b32p1gHPBstPtEKiirXb5nreDx55hqkCPvnPqRXeP3KED07rMSgmhCcVidG0bwjeRca7DtVy3/7yE2gp7c/Ezg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@seamapi/fake-devicedb/-/fake-devicedb-1.6.0.tgz", + "integrity": "sha512-CuZ2caQf7CepZtBOnDe2VJj48X1tYGCa77kK636L281N/kNeJD897s9CysdUZ7O/b6p5fkXDY2IK0GnBEOnkEQ==", "dev": true, "optional": true, "engines": { @@ -1053,7 +1053,21 @@ "optionalDependencies": { "zod": "^3.21.4", "zustand": "^4.3.7", - "zustand-hoist": "^1.0.0" + "zustand-hoist": "^2.0.0" + } + }, + "node_modules/@seamapi/fake-devicedb/node_modules/zustand-hoist": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/zustand-hoist/-/zustand-hoist-2.0.1.tgz", + "integrity": "sha512-Lhvv3RlLQx1NSUtuhk8jegXe1Wyav9RAOnLd4CRs1SbB5qcFoarAGQTE43vIxXizrm1UQJl1q5uRbOZuXGXGpQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=18.12.0", + "npm": ">= 9.0.0" + }, + "peerDependencies": { + "zustand": ">=4.0.0" } }, "node_modules/@seamapi/fake-seam-connect": { @@ -1144,9 +1158,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "20.11.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.22.tgz", + "integrity": "sha512-/G+IxWxma6V3E+pqK1tSl2Fo1kl41pK1yeCyDsgkF9WlVAme4j5ISYM2zR11bgLFJGLN5sVK40T4RJNuiZbEjA==", "dev": true, "dependencies": { "undici-types": "~5.26.4" From 055436cd11f7c069a29397747e3a79793e291201 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 28 Feb 2024 13:03:55 -0800 Subject: [PATCH 13/15] Fix param --- examples/delete-user-identity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/delete-user-identity.ts b/examples/delete-user-identity.ts index 0952298b..45de5b1e 100644 --- a/examples/delete-user-identity.ts +++ b/examples/delete-user-identity.ts @@ -84,7 +84,7 @@ export const handler: Handler = async ({ }) const clientSessions = await seam.clientSessions.list({ - user_identity_ids: [userIdentityId], + user_identity_id: userIdentityId, }) for (const clientSession of clientSessions) { From 6a404e885603b2d67b3b213029905c8d190062ef Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 1 Mar 2024 13:08:03 -0800 Subject: [PATCH 14/15] Update seamapi/types --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9e5c8a1..6c89b277 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@seamapi/fake-seam-connect": "^1.44.2", - "@seamapi/types": "1.121.0", + "@seamapi/types": "^1.123.1", "@types/eslint": "^8.44.2", "@types/node": "^20.8.10", "ava": "^5.0.1", @@ -1089,9 +1089,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.121.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.121.0.tgz", - "integrity": "sha512-QOdsIMGiO90G0lMMl9paqL707KOyege4gmqVtCgi6nQXPgZrajN4EWDPHVTFXM470XFdBXU3xbIR/K/m+5l2ww==", + "version": "1.123.1", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.123.1.tgz", + "integrity": "sha512-aRDMQx3Vg7DiBhziHsXTEfNhUP2aJaN/hdSGKSq+e6GINH+2ytMchapht1U924E4A3Nwf20OCEbI8RlqE7dY0Q==", "dev": true, "engines": { "node": ">=18.12.0", diff --git a/package.json b/package.json index b4501e0c..838c3570 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ }, "devDependencies": { "@seamapi/fake-seam-connect": "^1.44.2", - "@seamapi/types": "1.121.0", + "@seamapi/types": "^1.123.1", "@types/eslint": "^8.44.2", "@types/node": "^20.8.10", "ava": "^5.0.1", From 4fc61e279ce524d7f4d7595b89f2b869aa349a18 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 1 Mar 2024 21:08:54 +0000 Subject: [PATCH 15/15] ci: Generate code --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c89b277..732951e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "npm": ">= 9.0.0" }, "peerDependencies": { - "@seamapi/types": "^1.121.0", + "@seamapi/types": "^^1.123.1", "type-fest": "^4.0.0" }, "peerDependenciesMeta": { diff --git a/package.json b/package.json index 838c3570..f7f423d3 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "npm": ">= 9.0.0" }, "peerDependencies": { - "@seamapi/types": "^1.121.0", + "@seamapi/types": "^^1.123.1", "type-fest": "^4.0.0" }, "peerDependenciesMeta": {