@zyphr-dev/node-sdk 0.1.55 → 0.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1883 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -10
- package/dist/index.d.ts +31 -10
- package/dist/index.js +1883 -319
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/clientAuth.ts +15 -4
- package/src/src/apis/AuthApplicationApi.ts +32 -4
- package/src/src/apis/AuthEmailOTPApi.ts +72 -9
- package/src/src/apis/AuthEmailTemplatesApi.ts +160 -20
- package/src/src/apis/AuthEmailVerificationApi.ts +48 -6
- package/src/src/apis/AuthLoginApi.ts +16 -2
- package/src/src/apis/AuthMFAApi.ts +112 -14
- package/src/src/apis/AuthMagicLinksApi.ts +32 -4
- package/src/src/apis/AuthOAuthApi.ts +88 -11
- package/src/src/apis/AuthOrganizationsApi.ts +176 -22
- package/src/src/apis/AuthPasswordResetApi.ts +52 -10
- package/src/src/apis/AuthPhoneApi.ts +72 -9
- package/src/src/apis/AuthRegistrationApi.ts +40 -5
- package/src/src/apis/AuthSessionsApi.ts +56 -7
- package/src/src/apis/AuthUserDirectoryApi.ts +144 -18
- package/src/src/apis/AuthUserProfileApi.ts +32 -4
- package/src/src/apis/AuthWebAuthnApi.ts +96 -12
- package/src/src/apis/DevicesApi.ts +52 -10
- package/src/src/apis/DomainsApi.ts +56 -7
- package/src/src/apis/EmailsApi.ts +48 -6
- package/src/src/apis/ExecutionsApi.ts +24 -3
- package/src/src/apis/InboundEmailApi.ts +24 -3
- package/src/src/apis/InboxApi.ts +88 -11
- package/src/src/apis/PushApi.ts +72 -9
- package/src/src/apis/SMSApi.ts +80 -10
- package/src/src/apis/SlackApi.ts +24 -3
- package/src/src/apis/SubscribersApi.ts +160 -20
- package/src/src/apis/TemplatesApi.ts +48 -6
- package/src/src/apis/TopicsApi.ts +72 -9
- package/src/src/apis/UtilityApi.ts +16 -2
- package/src/src/apis/WaaSApplicationsApi.ts +48 -6
- package/src/src/apis/WaaSDeliveriesApi.ts +32 -4
- package/src/src/apis/WaaSEndpointsApi.ts +72 -9
- package/src/src/apis/WaaSEventTypesApi.ts +48 -6
- package/src/src/apis/WaaSEventsApi.ts +16 -2
- package/src/src/apis/WaaSPortalApi.ts +8 -1
- package/src/src/apis/WebhooksApi.ts +176 -22
- package/src/src/apis/WorkflowsApi.ts +96 -12
- package/src/src/models/InviteEndUser200ResponseData.ts +25 -0
package/dist/index.d.cts
CHANGED
|
@@ -9512,6 +9512,29 @@ interface InviteEndUser200ResponseData {
|
|
|
9512
9512
|
* @memberof InviteEndUser200ResponseData
|
|
9513
9513
|
*/
|
|
9514
9514
|
linkSent?: boolean;
|
|
9515
|
+
/**
|
|
9516
|
+
* Present only when `send_link` was requested and `link_sent` is false — explains why,
|
|
9517
|
+
* so a caller can distinguish "suppressed by design" from "delivery failed".
|
|
9518
|
+
*
|
|
9519
|
+
* Known values:
|
|
9520
|
+
*
|
|
9521
|
+
* - `identity_has_other_auth_methods` — the identity has no password but does have a
|
|
9522
|
+
* linked OAuth provider and/or a passkey, so it is not locked out and no
|
|
9523
|
+
* set-password link is sent. The attempt is recorded as a suppressed message,
|
|
9524
|
+
* visible via `GET /emails`.
|
|
9525
|
+
* - `user_not_found_in_environment` — the identity could not be resolved in the
|
|
9526
|
+
* calling environment (a race; it was created or resolved immediately prior).
|
|
9527
|
+
* - `recipient_not_allowlisted` — the application's `test_recipients` allowlist
|
|
9528
|
+
* blocked the recipient.
|
|
9529
|
+
* - `send_failed` — dispatch was attempted and failed with no more specific code.
|
|
9530
|
+
*
|
|
9531
|
+
* Not a closed set: a mail-provider error code may be surfaced verbatim, so treat
|
|
9532
|
+
* an unrecognised value as a generic failure rather than an error.
|
|
9533
|
+
*
|
|
9534
|
+
* @type {string}
|
|
9535
|
+
* @memberof InviteEndUser200ResponseData
|
|
9536
|
+
*/
|
|
9537
|
+
linkSuppressedReason?: string;
|
|
9515
9538
|
}
|
|
9516
9539
|
/**
|
|
9517
9540
|
* Check if a given object implements the InviteEndUser200ResponseData interface.
|
|
@@ -26837,7 +26860,7 @@ interface AuthPasswordResetApiValidateResetTokenOperationRequest {
|
|
|
26837
26860
|
*/
|
|
26838
26861
|
interface AuthPasswordResetApiInterface {
|
|
26839
26862
|
/**
|
|
26840
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26863
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26841
26864
|
* @summary Request a password reset
|
|
26842
26865
|
* @param {ForgotPasswordRequest} forgotPasswordRequest
|
|
26843
26866
|
* @param {*} [options] Override http request option.
|
|
@@ -26846,7 +26869,7 @@ interface AuthPasswordResetApiInterface {
|
|
|
26846
26869
|
*/
|
|
26847
26870
|
forgotPasswordRaw(requestParameters: AuthPasswordResetApiForgotPasswordOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<SuccessResult>>;
|
|
26848
26871
|
/**
|
|
26849
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26872
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26850
26873
|
* Request a password reset
|
|
26851
26874
|
*/
|
|
26852
26875
|
forgotPassword(forgotPasswordRequest: ForgotPasswordRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<SuccessResult>;
|
|
@@ -26884,12 +26907,12 @@ interface AuthPasswordResetApiInterface {
|
|
|
26884
26907
|
*/
|
|
26885
26908
|
declare class AuthPasswordResetApi extends BaseAPI implements AuthPasswordResetApiInterface {
|
|
26886
26909
|
/**
|
|
26887
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26910
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26888
26911
|
* Request a password reset
|
|
26889
26912
|
*/
|
|
26890
26913
|
forgotPasswordRaw(requestParameters: AuthPasswordResetApiForgotPasswordOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<SuccessResult>>;
|
|
26891
26914
|
/**
|
|
26892
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26915
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26893
26916
|
* Request a password reset
|
|
26894
26917
|
*/
|
|
26895
26918
|
forgotPassword(forgotPasswordRequest: ForgotPasswordRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<SuccessResult>;
|
|
@@ -28118,7 +28141,7 @@ interface DevicesApiInterface {
|
|
|
28118
28141
|
*/
|
|
28119
28142
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28120
28143
|
/**
|
|
28121
|
-
* Register a device for push notifications.
|
|
28144
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28122
28145
|
* @summary Register a device
|
|
28123
28146
|
* @param {RegisterDeviceRequest} registerDeviceRequest
|
|
28124
28147
|
* @param {*} [options] Override http request option.
|
|
@@ -28127,7 +28150,7 @@ interface DevicesApiInterface {
|
|
|
28127
28150
|
*/
|
|
28128
28151
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28129
28152
|
/**
|
|
28130
|
-
* Register a device for push notifications.
|
|
28153
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28131
28154
|
* Register a device
|
|
28132
28155
|
*/
|
|
28133
28156
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
|
@@ -28187,12 +28210,12 @@ declare class DevicesApi extends BaseAPI implements DevicesApiInterface {
|
|
|
28187
28210
|
*/
|
|
28188
28211
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28189
28212
|
/**
|
|
28190
|
-
* Register a device for push notifications.
|
|
28213
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28191
28214
|
* Register a device
|
|
28192
28215
|
*/
|
|
28193
28216
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28194
28217
|
/**
|
|
28195
|
-
* Register a device for push notifications.
|
|
28218
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28196
28219
|
* Register a device
|
|
28197
28220
|
*/
|
|
28198
28221
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
|
@@ -33624,8 +33647,6 @@ declare class ZyphrClient {
|
|
|
33624
33647
|
readonly profile: AuthUserProfileApi;
|
|
33625
33648
|
readonly webauthn: AuthWebAuthnApi;
|
|
33626
33649
|
};
|
|
33627
|
-
/** Device registration for push (takes an OS-acquired token). */
|
|
33628
|
-
readonly devices: DevicesApi;
|
|
33629
33650
|
/**
|
|
33630
33651
|
* Utility endpoints that are publishable-key-safe: the application's password
|
|
33631
33652
|
* policy (`getPasswordRequirements`) and a pre-submit password strength check
|
package/dist/index.d.ts
CHANGED
|
@@ -9512,6 +9512,29 @@ interface InviteEndUser200ResponseData {
|
|
|
9512
9512
|
* @memberof InviteEndUser200ResponseData
|
|
9513
9513
|
*/
|
|
9514
9514
|
linkSent?: boolean;
|
|
9515
|
+
/**
|
|
9516
|
+
* Present only when `send_link` was requested and `link_sent` is false — explains why,
|
|
9517
|
+
* so a caller can distinguish "suppressed by design" from "delivery failed".
|
|
9518
|
+
*
|
|
9519
|
+
* Known values:
|
|
9520
|
+
*
|
|
9521
|
+
* - `identity_has_other_auth_methods` — the identity has no password but does have a
|
|
9522
|
+
* linked OAuth provider and/or a passkey, so it is not locked out and no
|
|
9523
|
+
* set-password link is sent. The attempt is recorded as a suppressed message,
|
|
9524
|
+
* visible via `GET /emails`.
|
|
9525
|
+
* - `user_not_found_in_environment` — the identity could not be resolved in the
|
|
9526
|
+
* calling environment (a race; it was created or resolved immediately prior).
|
|
9527
|
+
* - `recipient_not_allowlisted` — the application's `test_recipients` allowlist
|
|
9528
|
+
* blocked the recipient.
|
|
9529
|
+
* - `send_failed` — dispatch was attempted and failed with no more specific code.
|
|
9530
|
+
*
|
|
9531
|
+
* Not a closed set: a mail-provider error code may be surfaced verbatim, so treat
|
|
9532
|
+
* an unrecognised value as a generic failure rather than an error.
|
|
9533
|
+
*
|
|
9534
|
+
* @type {string}
|
|
9535
|
+
* @memberof InviteEndUser200ResponseData
|
|
9536
|
+
*/
|
|
9537
|
+
linkSuppressedReason?: string;
|
|
9515
9538
|
}
|
|
9516
9539
|
/**
|
|
9517
9540
|
* Check if a given object implements the InviteEndUser200ResponseData interface.
|
|
@@ -26837,7 +26860,7 @@ interface AuthPasswordResetApiValidateResetTokenOperationRequest {
|
|
|
26837
26860
|
*/
|
|
26838
26861
|
interface AuthPasswordResetApiInterface {
|
|
26839
26862
|
/**
|
|
26840
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26863
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26841
26864
|
* @summary Request a password reset
|
|
26842
26865
|
* @param {ForgotPasswordRequest} forgotPasswordRequest
|
|
26843
26866
|
* @param {*} [options] Override http request option.
|
|
@@ -26846,7 +26869,7 @@ interface AuthPasswordResetApiInterface {
|
|
|
26846
26869
|
*/
|
|
26847
26870
|
forgotPasswordRaw(requestParameters: AuthPasswordResetApiForgotPasswordOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<SuccessResult>>;
|
|
26848
26871
|
/**
|
|
26849
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26872
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26850
26873
|
* Request a password reset
|
|
26851
26874
|
*/
|
|
26852
26875
|
forgotPassword(forgotPasswordRequest: ForgotPasswordRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<SuccessResult>;
|
|
@@ -26884,12 +26907,12 @@ interface AuthPasswordResetApiInterface {
|
|
|
26884
26907
|
*/
|
|
26885
26908
|
declare class AuthPasswordResetApi extends BaseAPI implements AuthPasswordResetApiInterface {
|
|
26886
26909
|
/**
|
|
26887
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26910
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26888
26911
|
* Request a password reset
|
|
26889
26912
|
*/
|
|
26890
26913
|
forgotPasswordRaw(requestParameters: AuthPasswordResetApiForgotPasswordOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<SuccessResult>>;
|
|
26891
26914
|
/**
|
|
26892
|
-
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
26915
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration — the response is identical whether or not the address is registered. An identity with **no password set** still receives a link, which sets a first password. This covers users migrated from a provider that cannot export password hashes. The one case where no email is sent (beyond an unknown address) is an identity that has no password but *does* have another way in — a linked OAuth provider and/or a passkey. Those users are not locked out, so no set-password link is sent; the attempt is recorded as a suppressed message visible via `GET /emails`.
|
|
26893
26916
|
* Request a password reset
|
|
26894
26917
|
*/
|
|
26895
26918
|
forgotPassword(forgotPasswordRequest: ForgotPasswordRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<SuccessResult>;
|
|
@@ -28118,7 +28141,7 @@ interface DevicesApiInterface {
|
|
|
28118
28141
|
*/
|
|
28119
28142
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28120
28143
|
/**
|
|
28121
|
-
* Register a device for push notifications.
|
|
28144
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28122
28145
|
* @summary Register a device
|
|
28123
28146
|
* @param {RegisterDeviceRequest} registerDeviceRequest
|
|
28124
28147
|
* @param {*} [options] Override http request option.
|
|
@@ -28127,7 +28150,7 @@ interface DevicesApiInterface {
|
|
|
28127
28150
|
*/
|
|
28128
28151
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28129
28152
|
/**
|
|
28130
|
-
* Register a device for push notifications.
|
|
28153
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28131
28154
|
* Register a device
|
|
28132
28155
|
*/
|
|
28133
28156
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
|
@@ -28187,12 +28210,12 @@ declare class DevicesApi extends BaseAPI implements DevicesApiInterface {
|
|
|
28187
28210
|
*/
|
|
28188
28211
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28189
28212
|
/**
|
|
28190
|
-
* Register a device for push notifications.
|
|
28213
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28191
28214
|
* Register a device
|
|
28192
28215
|
*/
|
|
28193
28216
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28194
28217
|
/**
|
|
28195
|
-
* Register a device for push notifications.
|
|
28218
|
+
* Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
|
|
28196
28219
|
* Register a device
|
|
28197
28220
|
*/
|
|
28198
28221
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
|
@@ -33624,8 +33647,6 @@ declare class ZyphrClient {
|
|
|
33624
33647
|
readonly profile: AuthUserProfileApi;
|
|
33625
33648
|
readonly webauthn: AuthWebAuthnApi;
|
|
33626
33649
|
};
|
|
33627
|
-
/** Device registration for push (takes an OS-acquired token). */
|
|
33628
|
-
readonly devices: DevicesApi;
|
|
33629
33650
|
/**
|
|
33630
33651
|
* Utility endpoints that are publishable-key-safe: the application's password
|
|
33631
33652
|
* policy (`getPasswordRequirements`) and a pre-submit password strength check
|