@zyphr-dev/node-sdk 0.1.48 → 0.1.49
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 +220 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +221 -34
- package/dist/index.d.ts +221 -34
- package/dist/index.js +199 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +4 -1
- package/src/client.ts +5 -0
- package/src/clientAuth.ts +9 -0
- package/src/src/apis/UtilityApi.ts +72 -4
- package/src/src/models/PasswordPolicy.ts +120 -0
- package/src/src/models/PasswordRequirementsResponseData.ts +20 -10
- package/src/src/models/{PasswordRequirements.ts → PasswordStrength.ts} +50 -49
- package/src/src/models/PasswordStrengthRequest.ts +74 -0
- package/src/src/models/PasswordStrengthResponse.ts +88 -0
- package/src/src/models/index.ts +4 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { RequestMeta } from './RequestMeta';
|
|
17
|
+
import {
|
|
18
|
+
RequestMetaFromJSON,
|
|
19
|
+
RequestMetaFromJSONTyped,
|
|
20
|
+
RequestMetaToJSON,
|
|
21
|
+
RequestMetaToJSONTyped,
|
|
22
|
+
} from './RequestMeta';
|
|
23
|
+
import type { PasswordStrength } from './PasswordStrength';
|
|
24
|
+
import {
|
|
25
|
+
PasswordStrengthFromJSON,
|
|
26
|
+
PasswordStrengthFromJSONTyped,
|
|
27
|
+
PasswordStrengthToJSON,
|
|
28
|
+
PasswordStrengthToJSONTyped,
|
|
29
|
+
} from './PasswordStrength';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PasswordStrengthResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface PasswordStrengthResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {PasswordStrength}
|
|
40
|
+
* @memberof PasswordStrengthResponse
|
|
41
|
+
*/
|
|
42
|
+
data?: PasswordStrength;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof PasswordStrengthResponse
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PasswordStrengthResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfPasswordStrengthResponse(value: object): value is PasswordStrengthResponse {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function PasswordStrengthResponseFromJSON(json: any): PasswordStrengthResponse {
|
|
59
|
+
return PasswordStrengthResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function PasswordStrengthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordStrengthResponse {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : PasswordStrengthFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function PasswordStrengthResponseToJSON(json: any): PasswordStrengthResponse {
|
|
74
|
+
return PasswordStrengthResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function PasswordStrengthResponseToJSONTyped(value?: PasswordStrengthResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': PasswordStrengthToJSON(value['data']),
|
|
85
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
package/src/src/models/index.ts
CHANGED
|
@@ -229,9 +229,12 @@ export * from './OrganizationMembershipResponse';
|
|
|
229
229
|
export * from './OrganizationMembershipWithUser';
|
|
230
230
|
export * from './OrganizationResponse';
|
|
231
231
|
export * from './PaginationMeta';
|
|
232
|
-
export * from './
|
|
232
|
+
export * from './PasswordPolicy';
|
|
233
233
|
export * from './PasswordRequirementsResponse';
|
|
234
234
|
export * from './PasswordRequirementsResponseData';
|
|
235
|
+
export * from './PasswordStrength';
|
|
236
|
+
export * from './PasswordStrengthRequest';
|
|
237
|
+
export * from './PasswordStrengthResponse';
|
|
235
238
|
export * from './PayloadTooLargeError';
|
|
236
239
|
export * from './PayloadTooLargeErrorError';
|
|
237
240
|
export * from './PayloadTooLargeErrorErrorDetails';
|