@zyphr-dev/node-sdk 0.1.66 → 0.1.68
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 +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -6
- package/dist/index.d.ts +20 -6
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +18 -0
- package/src/src/apis/AuthEmailVerificationApi.ts +4 -4
- package/src/src/models/ResendEmailVerificationRequest.ts +1 -1
- package/src/src/models/SendEmailVerificationRequest.ts +1 -1
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type { Middleware, ResponseContext } from './src/runtime.js';
|
|
|
18
18
|
import {
|
|
19
19
|
AuthApplicationApi,
|
|
20
20
|
AuthEmailOTPApi,
|
|
21
|
+
AuthEmailTemplatesApi,
|
|
21
22
|
AuthEmailVerificationApi,
|
|
22
23
|
AuthLoginApi,
|
|
23
24
|
AuthMFAApi,
|
|
@@ -36,6 +37,7 @@ import {
|
|
|
36
37
|
UtilityApi,
|
|
37
38
|
WorkflowsApi,
|
|
38
39
|
EmailsApi,
|
|
40
|
+
ExecutionsApi,
|
|
39
41
|
InboundEmailApi,
|
|
40
42
|
InboxApi,
|
|
41
43
|
PushApi,
|
|
@@ -113,6 +115,13 @@ export class Zyphr {
|
|
|
113
115
|
* facade, which made the documented `zyphr.workflows.*` calls throw.
|
|
114
116
|
*/
|
|
115
117
|
readonly workflows: WorkflowsApi;
|
|
118
|
+
/**
|
|
119
|
+
* A single workflow execution by id: get its status and step results, cancel
|
|
120
|
+
* it while running, or retry it after a failure (#1866). List a workflow's
|
|
121
|
+
* executions with `workflows.listWorkflowExecutions`. Requires the
|
|
122
|
+
* `workflows:read` scope for reads and `workflows:execute` for cancel/retry.
|
|
123
|
+
*/
|
|
124
|
+
readonly executions: ExecutionsApi;
|
|
116
125
|
/** Inbound (received) email — read access. Requires the `email:read` scope. */
|
|
117
126
|
readonly inbound: InboundEmailApi;
|
|
118
127
|
|
|
@@ -143,6 +152,13 @@ export class Zyphr {
|
|
|
143
152
|
readonly webauthn: AuthWebAuthnApi;
|
|
144
153
|
/** Read the authenticating application's own non-sensitive metadata (id, name, environment, signing algorithm) via GET /auth/application. */
|
|
145
154
|
readonly application: AuthApplicationApi;
|
|
155
|
+
/**
|
|
156
|
+
* Per-application auth email templates (magic link, password reset, email
|
|
157
|
+
* verification, email OTP, invitation): list, get, set, reset to the
|
|
158
|
+
* default, preview and test-send (#1866). Secret-key scoped. Not to be
|
|
159
|
+
* confused with `zyphr.templates`, which manages notification templates.
|
|
160
|
+
*/
|
|
161
|
+
readonly emailTemplates: AuthEmailTemplatesApi;
|
|
146
162
|
};
|
|
147
163
|
|
|
148
164
|
private readonly options: ZyphrOptions;
|
|
@@ -173,6 +189,7 @@ export class Zyphr {
|
|
|
173
189
|
this.utility = new UtilityApi(config);
|
|
174
190
|
this.domains = new DomainsApi(config);
|
|
175
191
|
this.workflows = new WorkflowsApi(config);
|
|
192
|
+
this.executions = new ExecutionsApi(config);
|
|
176
193
|
this.inbound = new InboundEmailApi(config);
|
|
177
194
|
|
|
178
195
|
this.waas = {
|
|
@@ -202,6 +219,7 @@ export class Zyphr {
|
|
|
202
219
|
userDirectory: new AuthUserDirectoryApi(config),
|
|
203
220
|
webauthn: new AuthWebAuthnApi(config),
|
|
204
221
|
application: new AuthApplicationApi(config),
|
|
222
|
+
emailTemplates: new AuthEmailTemplatesApi(config),
|
|
205
223
|
};
|
|
206
224
|
}
|
|
207
225
|
|
|
@@ -73,7 +73,7 @@ export interface AuthEmailVerificationApiInterface {
|
|
|
73
73
|
confirmEmailVerification(confirmEmailVerificationRequest: ConfirmEmailVerificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfirmEmailVerificationResponse>;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
|
|
76
|
+
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user\'s `Authorization: Bearer` token. Failures behave as on `POST /auth/verify-email/send`, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
|
|
77
77
|
* @summary Resend email verification
|
|
78
78
|
* @param {ResendEmailVerificationRequest} [resendEmailVerificationRequest]
|
|
79
79
|
* @param {*} [options] Override http request option.
|
|
@@ -83,7 +83,7 @@ export interface AuthEmailVerificationApiInterface {
|
|
|
83
83
|
resendEmailVerificationRaw(requestParameters: AuthEmailVerificationApiResendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResult>>;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
|
|
86
|
+
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user\'s `Authorization: Bearer` token. Failures behave as on `POST /auth/verify-email/send`, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
|
|
87
87
|
* Resend email verification
|
|
88
88
|
*/
|
|
89
89
|
resendEmailVerification(resendEmailVerificationRequest?: ResendEmailVerificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResult>;
|
|
@@ -172,7 +172,7 @@ export class AuthEmailVerificationApi extends runtime.BaseAPI implements AuthEma
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
|
|
175
|
+
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user\'s `Authorization: Bearer` token. Failures behave as on `POST /auth/verify-email/send`, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
|
|
176
176
|
* Resend email verification
|
|
177
177
|
*/
|
|
178
178
|
async resendEmailVerificationRaw(requestParameters: AuthEmailVerificationApiResendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResult>> {
|
|
@@ -224,7 +224,7 @@ export class AuthEmailVerificationApi extends runtime.BaseAPI implements AuthEma
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
|
-
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
|
|
227
|
+
* Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user\'s `Authorization: Bearer` token. Failures behave as on `POST /auth/verify-email/send`, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
|
|
228
228
|
* Resend email verification
|
|
229
229
|
*/
|
|
230
230
|
async resendEmailVerification(resendEmailVerificationRequest?: ResendEmailVerificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResult> {
|
|
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface ResendEmailVerificationRequest {
|
|
22
22
|
/**
|
|
23
|
-
* URL to redirect to after verification
|
|
23
|
+
* URL to redirect to after verification. Same rules as `POST /auth/verify-email/send`.
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ResendEmailVerificationRequest
|
|
26
26
|
*/
|
|
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface SendEmailVerificationRequest {
|
|
22
22
|
/**
|
|
23
|
-
* URL to redirect to after verification
|
|
23
|
+
* URL to redirect to after verification. Must be snake_case `redirect_url`: a camelCase `redirectUrl` is rejected with 400, since Zyphr hosts no fallback page. Must match one of the application's configured redirect URIs.
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof SendEmailVerificationRequest
|
|
26
26
|
*/
|