@zyphr-dev/node-sdk 0.1.57 → 0.1.59
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 +20 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/src/apis/AuthEmailVerificationApi.ts +4 -4
- package/src/src/apis/DevicesApi.ts +26 -4
package/dist/index.d.cts
CHANGED
|
@@ -25779,7 +25779,7 @@ interface AuthEmailVerificationApiSendEmailVerificationOperationRequest {
|
|
|
25779
25779
|
*/
|
|
25780
25780
|
interface AuthEmailVerificationApiInterface {
|
|
25781
25781
|
/**
|
|
25782
|
-
* Verify the user\'s email using
|
|
25782
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25783
25783
|
* @summary Confirm email verification
|
|
25784
25784
|
* @param {ConfirmEmailVerificationRequest} confirmEmailVerificationRequest
|
|
25785
25785
|
* @param {*} [options] Override http request option.
|
|
@@ -25788,7 +25788,7 @@ interface AuthEmailVerificationApiInterface {
|
|
|
25788
25788
|
*/
|
|
25789
25789
|
confirmEmailVerificationRaw(requestParameters: AuthEmailVerificationApiConfirmEmailVerificationOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ConfirmEmailVerificationResponse>>;
|
|
25790
25790
|
/**
|
|
25791
|
-
* Verify the user\'s email using
|
|
25791
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25792
25792
|
* Confirm email verification
|
|
25793
25793
|
*/
|
|
25794
25794
|
confirmEmailVerification(confirmEmailVerificationRequest: ConfirmEmailVerificationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ConfirmEmailVerificationResponse>;
|
|
@@ -25826,12 +25826,12 @@ interface AuthEmailVerificationApiInterface {
|
|
|
25826
25826
|
*/
|
|
25827
25827
|
declare class AuthEmailVerificationApi extends BaseAPI implements AuthEmailVerificationApiInterface {
|
|
25828
25828
|
/**
|
|
25829
|
-
* Verify the user\'s email using
|
|
25829
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25830
25830
|
* Confirm email verification
|
|
25831
25831
|
*/
|
|
25832
25832
|
confirmEmailVerificationRaw(requestParameters: AuthEmailVerificationApiConfirmEmailVerificationOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ConfirmEmailVerificationResponse>>;
|
|
25833
25833
|
/**
|
|
25834
|
-
* Verify the user\'s email using
|
|
25834
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25835
25835
|
* Confirm email verification
|
|
25836
25836
|
*/
|
|
25837
25837
|
confirmEmailVerification(confirmEmailVerificationRequest: ConfirmEmailVerificationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ConfirmEmailVerificationResponse>;
|
|
@@ -28141,7 +28141,7 @@ interface DevicesApiInterface {
|
|
|
28141
28141
|
*/
|
|
28142
28142
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28143
28143
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28145
28145
|
* @summary Register a device
|
|
28146
28146
|
* @param {RegisterDeviceRequest} registerDeviceRequest
|
|
28147
28147
|
* @param {*} [options] Override http request option.
|
|
@@ -28150,7 +28150,7 @@ interface DevicesApiInterface {
|
|
|
28150
28150
|
*/
|
|
28151
28151
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28152
28152
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28154
28154
|
* Register a device
|
|
28155
28155
|
*/
|
|
28156
28156
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
|
@@ -28210,12 +28210,12 @@ declare class DevicesApi extends BaseAPI implements DevicesApiInterface {
|
|
|
28210
28210
|
*/
|
|
28211
28211
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28212
28212
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28214
28214
|
* Register a device
|
|
28215
28215
|
*/
|
|
28216
28216
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28217
28217
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28219
28219
|
* Register a device
|
|
28220
28220
|
*/
|
|
28221
28221
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -25779,7 +25779,7 @@ interface AuthEmailVerificationApiSendEmailVerificationOperationRequest {
|
|
|
25779
25779
|
*/
|
|
25780
25780
|
interface AuthEmailVerificationApiInterface {
|
|
25781
25781
|
/**
|
|
25782
|
-
* Verify the user\'s email using
|
|
25782
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25783
25783
|
* @summary Confirm email verification
|
|
25784
25784
|
* @param {ConfirmEmailVerificationRequest} confirmEmailVerificationRequest
|
|
25785
25785
|
* @param {*} [options] Override http request option.
|
|
@@ -25788,7 +25788,7 @@ interface AuthEmailVerificationApiInterface {
|
|
|
25788
25788
|
*/
|
|
25789
25789
|
confirmEmailVerificationRaw(requestParameters: AuthEmailVerificationApiConfirmEmailVerificationOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ConfirmEmailVerificationResponse>>;
|
|
25790
25790
|
/**
|
|
25791
|
-
* Verify the user\'s email using
|
|
25791
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25792
25792
|
* Confirm email verification
|
|
25793
25793
|
*/
|
|
25794
25794
|
confirmEmailVerification(confirmEmailVerificationRequest: ConfirmEmailVerificationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ConfirmEmailVerificationResponse>;
|
|
@@ -25826,12 +25826,12 @@ interface AuthEmailVerificationApiInterface {
|
|
|
25826
25826
|
*/
|
|
25827
25827
|
declare class AuthEmailVerificationApi extends BaseAPI implements AuthEmailVerificationApiInterface {
|
|
25828
25828
|
/**
|
|
25829
|
-
* Verify the user\'s email using
|
|
25829
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25830
25830
|
* Confirm email verification
|
|
25831
25831
|
*/
|
|
25832
25832
|
confirmEmailVerificationRaw(requestParameters: AuthEmailVerificationApiConfirmEmailVerificationOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ConfirmEmailVerificationResponse>>;
|
|
25833
25833
|
/**
|
|
25834
|
-
* Verify the user\'s email using
|
|
25834
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
25835
25835
|
* Confirm email verification
|
|
25836
25836
|
*/
|
|
25837
25837
|
confirmEmailVerification(confirmEmailVerificationRequest: ConfirmEmailVerificationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ConfirmEmailVerificationResponse>;
|
|
@@ -28141,7 +28141,7 @@ interface DevicesApiInterface {
|
|
|
28141
28141
|
*/
|
|
28142
28142
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28143
28143
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28145
28145
|
* @summary Register a device
|
|
28146
28146
|
* @param {RegisterDeviceRequest} registerDeviceRequest
|
|
28147
28147
|
* @param {*} [options] Override http request option.
|
|
@@ -28150,7 +28150,7 @@ interface DevicesApiInterface {
|
|
|
28150
28150
|
*/
|
|
28151
28151
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28152
28152
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28154
28154
|
* Register a device
|
|
28155
28155
|
*/
|
|
28156
28156
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
|
@@ -28210,12 +28210,12 @@ declare class DevicesApi extends BaseAPI implements DevicesApiInterface {
|
|
|
28210
28210
|
*/
|
|
28211
28211
|
listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceListResponse>;
|
|
28212
28212
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28214
28214
|
* Register a device
|
|
28215
28215
|
*/
|
|
28216
28216
|
registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<DeviceResponse>>;
|
|
28217
28217
|
/**
|
|
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.
|
|
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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
28219
28219
|
* Register a device
|
|
28220
28220
|
*/
|
|
28221
28221
|
registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<DeviceResponse>;
|
package/dist/index.js
CHANGED
|
@@ -17842,7 +17842,7 @@ var AuthEmailTemplatesApi = class extends BaseAPI {
|
|
|
17842
17842
|
// src/src/apis/AuthEmailVerificationApi.ts
|
|
17843
17843
|
var AuthEmailVerificationApi = class extends BaseAPI {
|
|
17844
17844
|
/**
|
|
17845
|
-
* Verify the user\'s email using
|
|
17845
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
17846
17846
|
* Confirm email verification
|
|
17847
17847
|
*/
|
|
17848
17848
|
async confirmEmailVerificationRaw(requestParameters, initOverrides) {
|
|
@@ -17881,7 +17881,7 @@ var AuthEmailVerificationApi = class extends BaseAPI {
|
|
|
17881
17881
|
return new JSONApiResponse(response, (jsonValue) => ConfirmEmailVerificationResponseFromJSON(jsonValue));
|
|
17882
17882
|
}
|
|
17883
17883
|
/**
|
|
17884
|
-
* Verify the user\'s email using
|
|
17884
|
+
* Verify the user\'s email using the token from the emailed link. Zyphr does NOT host auth pages and never redeems the token itself. The emailed link points at YOUR `redirect_url` with `?token=<raw>`; your app reads that token and posts it here. Nothing is verified until this call. This endpoint is idempotent: re-posting an already-redeemed token returns `200` with `already_verified: true` rather than an error, so a double submit or a link opened twice is safe. Only a genuinely invalid / expired / unknown token returns `400`. Note `redirect_url` is REQUIRED (snake_case) when sending the verification email — there is no hosted fallback page.
|
|
17885
17885
|
* Confirm email verification
|
|
17886
17886
|
*/
|
|
17887
17887
|
async confirmEmailVerification(confirmEmailVerificationRequest, initOverrides) {
|
|
@@ -21372,7 +21372,7 @@ var DevicesApi = class extends BaseAPI {
|
|
|
21372
21372
|
return await response.value();
|
|
21373
21373
|
}
|
|
21374
21374
|
/**
|
|
21375
|
-
* 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.
|
|
21375
|
+
* 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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
21376
21376
|
* Register a device
|
|
21377
21377
|
*/
|
|
21378
21378
|
async registerDeviceRaw(requestParameters, initOverrides) {
|
|
@@ -21385,6 +21385,14 @@ var DevicesApi = class extends BaseAPI {
|
|
|
21385
21385
|
const queryParameters = {};
|
|
21386
21386
|
const headerParameters = {};
|
|
21387
21387
|
headerParameters["Content-Type"] = "application/json";
|
|
21388
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
21389
|
+
{
|
|
21390
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret");
|
|
21391
|
+
if (apiKeyValue) {
|
|
21392
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
21393
|
+
}
|
|
21394
|
+
}
|
|
21395
|
+
}
|
|
21388
21396
|
if (this.configuration && this.configuration.apiKey) {
|
|
21389
21397
|
{
|
|
21390
21398
|
const apiKeyValue = await this.configuration.apiKey("X-API-Key");
|
|
@@ -21393,6 +21401,14 @@ var DevicesApi = class extends BaseAPI {
|
|
|
21393
21401
|
}
|
|
21394
21402
|
}
|
|
21395
21403
|
}
|
|
21404
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
21405
|
+
{
|
|
21406
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key");
|
|
21407
|
+
if (apiKeyValue) {
|
|
21408
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
21409
|
+
}
|
|
21410
|
+
}
|
|
21411
|
+
}
|
|
21396
21412
|
const response = await this.request({
|
|
21397
21413
|
path: `/devices`,
|
|
21398
21414
|
method: "POST",
|
|
@@ -21403,7 +21419,7 @@ var DevicesApi = class extends BaseAPI {
|
|
|
21403
21419
|
return new JSONApiResponse(response, (jsonValue) => DeviceResponseFromJSON(jsonValue));
|
|
21404
21420
|
}
|
|
21405
21421
|
/**
|
|
21406
|
-
* 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.
|
|
21422
|
+
* 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. Call this from your backend and derive `user_id` from the authenticated session rather than the request body. **Two credentials are accepted, and the choice matters for push routing:** - **Application credentials** — `X-Application-Key` + `X-Application-Secret` (`za_*`). The device is bound to that application, and pushes to it resolve *that application\'s* push provider credentials. Use this when a single project contains more than one app: APNs credentials are bound to a bundle id, so a device registered under the wrong application has its pushes rejected by Apple. The application is taken from the credential and can never be set from the request body. Using an **environment-scoped** key (`za_test_pub_*` / `za_live_pub_*`) also binds the device to that environment, which is what lets APNs sandbox and production credentials be configured separately. A legacy application-level key (`za_pub_*`) binds the application only, and such devices will not match an environment-scoped push config. - **Project secret API key** (`zy_*`) — the device is not bound to any application and resolves the project-level push provider config. This is the historical behaviour and remains supported.
|
|
21407
21423
|
* Register a device
|
|
21408
21424
|
*/
|
|
21409
21425
|
async registerDevice(registerDeviceRequest, initOverrides) {
|