@zavudev/sdk 0.47.0 → 0.49.0

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +0 -9
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +0 -9
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -9
  7. package/client.js.map +1 -1
  8. package/client.mjs +0 -9
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/broadcasts/broadcasts.d.mts +1 -1
  12. package/resources/broadcasts/broadcasts.d.mts.map +1 -1
  13. package/resources/broadcasts/broadcasts.d.ts +1 -1
  14. package/resources/broadcasts/broadcasts.d.ts.map +1 -1
  15. package/resources/broadcasts/broadcasts.js.map +1 -1
  16. package/resources/broadcasts/broadcasts.mjs.map +1 -1
  17. package/resources/contacts/channels.d.mts +1 -1
  18. package/resources/contacts/channels.d.mts.map +1 -1
  19. package/resources/contacts/channels.d.ts +1 -1
  20. package/resources/contacts/channels.d.ts.map +1 -1
  21. package/resources/contacts/contacts.d.mts +2 -2
  22. package/resources/contacts/contacts.d.mts.map +1 -1
  23. package/resources/contacts/contacts.d.ts +2 -2
  24. package/resources/contacts/contacts.d.ts.map +1 -1
  25. package/resources/index.d.mts +0 -3
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +0 -3
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js +1 -7
  30. package/resources/index.js.map +1 -1
  31. package/resources/index.mjs +0 -3
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/messages.d.mts +19 -9
  34. package/resources/messages.d.mts.map +1 -1
  35. package/resources/messages.d.ts +19 -9
  36. package/resources/messages.d.ts.map +1 -1
  37. package/resources/phone-numbers.d.mts +1 -1
  38. package/resources/phone-numbers.d.mts.map +1 -1
  39. package/resources/phone-numbers.d.ts +1 -1
  40. package/resources/phone-numbers.d.ts.map +1 -1
  41. package/resources/senders/senders.d.mts +56 -2
  42. package/resources/senders/senders.d.mts.map +1 -1
  43. package/resources/senders/senders.d.ts +56 -2
  44. package/resources/senders/senders.d.ts.map +1 -1
  45. package/resources/senders/senders.js +0 -1
  46. package/resources/senders/senders.js.map +1 -1
  47. package/resources/senders/senders.mjs +0 -1
  48. package/resources/senders/senders.mjs.map +1 -1
  49. package/resources/urls.d.mts +2 -2
  50. package/resources/urls.d.mts.map +1 -1
  51. package/resources/urls.d.ts +2 -2
  52. package/resources/urls.d.ts.map +1 -1
  53. package/src/client.ts +0 -31
  54. package/src/resources/broadcasts/broadcasts.ts +1 -10
  55. package/src/resources/contacts/channels.ts +1 -1
  56. package/src/resources/contacts/contacts.ts +2 -2
  57. package/src/resources/index.ts +0 -11
  58. package/src/resources/messages.ts +19 -8
  59. package/src/resources/phone-numbers.ts +1 -1
  60. package/src/resources/senders/senders.ts +66 -2
  61. package/src/resources/urls.ts +2 -2
  62. package/src/version.ts +1 -1
  63. package/version.d.mts +1 -1
  64. package/version.d.ts +1 -1
  65. package/version.js +1 -1
  66. package/version.mjs +1 -1
  67. package/resources/exports.d.mts +0 -101
  68. package/resources/exports.d.mts.map +0 -1
  69. package/resources/exports.d.ts +0 -101
  70. package/resources/exports.d.ts.map +0 -1
  71. package/resources/exports.js +0 -53
  72. package/resources/exports.js.map +0 -1
  73. package/resources/exports.mjs +0 -49
  74. package/resources/exports.mjs.map +0 -1
  75. package/resources/plan.d.mts +0 -43
  76. package/resources/plan.d.mts.map +0 -1
  77. package/resources/plan.d.ts +0 -43
  78. package/resources/plan.d.ts.map +0 -1
  79. package/resources/plan.js +0 -16
  80. package/resources/plan.js.map +0 -1
  81. package/resources/plan.mjs +0 -12
  82. package/resources/plan.mjs.map +0 -1
  83. package/resources/usage.d.mts +0 -36
  84. package/resources/usage.d.mts.map +0 -1
  85. package/resources/usage.d.ts +0 -36
  86. package/resources/usage.d.ts.map +0 -1
  87. package/resources/usage.js +0 -16
  88. package/resources/usage.js.map +0 -1
  89. package/resources/usage.mjs +0 -12
  90. package/resources/usage.mjs.map +0 -1
  91. package/src/resources/exports.ts +0 -141
  92. package/src/resources/plan.ts +0 -62
  93. package/src/resources/usage.ts +0 -48
@@ -40,7 +40,6 @@ export class Senders extends APIResource {
40
40
  * ```ts
41
41
  * const sender = await client.senders.create({
42
42
  * name: 'name',
43
- * phoneNumber: 'phoneNumber',
44
43
  * });
45
44
  * ```
46
45
  */
@@ -198,6 +197,19 @@ export interface Sender {
198
197
 
199
198
  createdAt?: string;
200
199
 
200
+ /**
201
+ * From-address for the email channel, if configured.
202
+ */
203
+ emailAddress?: string;
204
+
205
+ /**
206
+ * Whether catch-all receiving is enabled. When true (and emailReceivingEnabled is
207
+ * true), this sender receives email addressed to any local part at its domain, not
208
+ * just its own address. The original recipient is delivered in the message.inbound
209
+ * webhook's data.to.
210
+ */
211
+ emailCatchAllEnabled?: boolean;
212
+
201
213
  /**
202
214
  * Whether inbound email receiving is enabled for this sender.
203
215
  */
@@ -456,7 +468,35 @@ export interface SenderUploadProfilePictureResponse {
456
468
  export interface SenderCreateParams {
457
469
  name: string;
458
470
 
459
- phoneNumber: string;
471
+ /**
472
+ * From-address for the email channel (e.g. noreply@yourdomain.com). The address's
473
+ * domain must be a verified email domain in your project. Setting this attaches
474
+ * the email channel to the sender.
475
+ */
476
+ emailAddress?: string;
477
+
478
+ /**
479
+ * ID of the verified email domain to attach. Optional — resolved from
480
+ * `emailAddress`'s domain when omitted.
481
+ */
482
+ emailDomainId?: string;
483
+
484
+ /**
485
+ * Display name shown in the recipient's inbox for the email channel.
486
+ */
487
+ emailFromName?: string;
488
+
489
+ /**
490
+ * Enable inbound email receiving on this sender. Requires a verified MX record on
491
+ * the domain; ignored otherwise.
492
+ */
493
+ emailReceivingEnabled?: boolean;
494
+
495
+ /**
496
+ * Phone number in E.164 format. Required for phone-based channels (SMS, WhatsApp).
497
+ * Omit for an email-only sender.
498
+ */
499
+ phoneNumber?: string;
460
500
 
461
501
  setAsDefault?: boolean;
462
502
 
@@ -472,6 +512,30 @@ export interface SenderCreateParams {
472
512
  }
473
513
 
474
514
  export interface SenderUpdateParams {
515
+ /**
516
+ * Attach or change the sender's email from-address (e.g. noreply@yourdomain.com).
517
+ * The domain must be a verified email domain in your project.
518
+ */
519
+ emailAddress?: string;
520
+
521
+ /**
522
+ * Enable or disable domain catch-all. When enabled (with emailReceivingEnabled
523
+ * true), this sender receives email for any address at its domain. Ignored
524
+ * (treated as false) if receiving is not enabled.
525
+ */
526
+ emailCatchAllEnabled?: boolean;
527
+
528
+ /**
529
+ * ID of the verified email domain to attach. Optional — resolved from
530
+ * `emailAddress`'s domain when omitted.
531
+ */
532
+ emailDomainId?: string;
533
+
534
+ /**
535
+ * Display name shown in the recipient's inbox for the email channel.
536
+ */
537
+ emailFromName?: string;
538
+
475
539
  /**
476
540
  * Enable or disable inbound email receiving for this sender.
477
541
  */
@@ -76,7 +76,7 @@ export interface VerifiedURL {
76
76
  /**
77
77
  * Status of a verified URL.
78
78
  */
79
- status: 'pending' | 'approved' | 'rejected' | 'malicious';
79
+ status: 'pending' | 'approved' | 'rejected' | 'escalated' | 'malicious';
80
80
 
81
81
  /**
82
82
  * The verified URL.
@@ -103,7 +103,7 @@ export interface URLListVerifiedParams extends CursorParams {
103
103
  /**
104
104
  * Filter by verification status.
105
105
  */
106
- status?: 'pending' | 'approved' | 'rejected' | 'malicious';
106
+ status?: 'pending' | 'approved' | 'rejected' | 'escalated' | 'malicious';
107
107
  }
108
108
 
109
109
  export interface URLSubmitForVerificationParams {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.47.0'; // x-release-please-version
1
+ export const VERSION = '0.49.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.47.0";
1
+ export declare const VERSION = "0.49.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.47.0";
1
+ export declare const VERSION = "0.49.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.47.0'; // x-release-please-version
4
+ exports.VERSION = '0.49.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.47.0'; // x-release-please-version
1
+ export const VERSION = '0.49.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,101 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
4
- import { RequestOptions } from "../internal/request-options.mjs";
5
- export declare class Exports extends APIResource {
6
- /**
7
- * Create a new data export job. The export will be processed asynchronously and
8
- * the download URL will be available when status is 'completed'. Export links
9
- * expire after 24 hours.
10
- *
11
- * @example
12
- * ```ts
13
- * const _export = await client.exports.create({
14
- * dataTypes: ['messages', 'conversations'],
15
- * dateFrom: '2024-01-01T00:00:00Z',
16
- * dateTo: '2024-12-31T23:59:59Z',
17
- * });
18
- * ```
19
- */
20
- create(body: ExportCreateParams, options?: RequestOptions): APIPromise<ExportCreateResponse>;
21
- /**
22
- * Get details of a specific data export, including download URL when completed.
23
- *
24
- * @example
25
- * ```ts
26
- * const _export = await client.exports.retrieve('exportId');
27
- * ```
28
- */
29
- retrieve(exportID: string, options?: RequestOptions): APIPromise<ExportRetrieveResponse>;
30
- /**
31
- * List data exports for this project.
32
- *
33
- * @example
34
- * ```ts
35
- * // Automatically fetches more pages as needed.
36
- * for await (const dataExport of client.exports.list()) {
37
- * // ...
38
- * }
39
- * ```
40
- */
41
- list(query?: ExportListParams | null | undefined, options?: RequestOptions): PagePromise<DataExportsCursor, DataExport>;
42
- }
43
- export type DataExportsCursor = Cursor<DataExport>;
44
- export interface DataExport {
45
- id: string;
46
- createdAt: string;
47
- dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
48
- /**
49
- * When the export download link expires (24 hours after creation).
50
- */
51
- expiresAt: string;
52
- /**
53
- * Status of a data export job.
54
- */
55
- status: 'pending' | 'processing' | 'completed' | 'failed';
56
- completedAt?: string | null;
57
- dateFrom?: string | null;
58
- dateTo?: string | null;
59
- /**
60
- * URL to download the export file. Only available when status is 'completed'.
61
- */
62
- downloadUrl?: string | null;
63
- /**
64
- * Error message if the export failed.
65
- */
66
- errorMessage?: string | null;
67
- /**
68
- * Size of the export file in bytes.
69
- */
70
- fileSize?: number | null;
71
- }
72
- export interface ExportCreateResponse {
73
- export: DataExport;
74
- }
75
- export interface ExportRetrieveResponse {
76
- export: DataExport;
77
- }
78
- export interface ExportCreateParams {
79
- /**
80
- * List of data types to include in the export.
81
- */
82
- dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
83
- /**
84
- * Start date for data to export (inclusive).
85
- */
86
- dateFrom?: string;
87
- /**
88
- * End date for data to export (inclusive).
89
- */
90
- dateTo?: string;
91
- }
92
- export interface ExportListParams extends CursorParams {
93
- /**
94
- * Status of a data export job.
95
- */
96
- status?: 'pending' | 'processing' | 'completed' | 'failed';
97
- }
98
- export declare namespace Exports {
99
- export { type DataExport as DataExport, type ExportCreateResponse as ExportCreateResponse, type ExportRetrieveResponse as ExportRetrieveResponse, type DataExportsCursor as DataExportsCursor, type ExportCreateParams as ExportCreateParams, type ExportListParams as ExportListParams, };
100
- }
101
- //# sourceMappingURL=exports.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.d.mts","sourceRoot":"","sources":["../src/resources/exports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,MAAM,EAAE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CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,UAAU,GAAG,eAAe,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,YAAY,CAAC,CAAC;IAExG;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;CAC5D;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -1,101 +0,0 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
4
- import { RequestOptions } from "../internal/request-options.js";
5
- export declare class Exports extends APIResource {
6
- /**
7
- * Create a new data export job. The export will be processed asynchronously and
8
- * the download URL will be available when status is 'completed'. Export links
9
- * expire after 24 hours.
10
- *
11
- * @example
12
- * ```ts
13
- * const _export = await client.exports.create({
14
- * dataTypes: ['messages', 'conversations'],
15
- * dateFrom: '2024-01-01T00:00:00Z',
16
- * dateTo: '2024-12-31T23:59:59Z',
17
- * });
18
- * ```
19
- */
20
- create(body: ExportCreateParams, options?: RequestOptions): APIPromise<ExportCreateResponse>;
21
- /**
22
- * Get details of a specific data export, including download URL when completed.
23
- *
24
- * @example
25
- * ```ts
26
- * const _export = await client.exports.retrieve('exportId');
27
- * ```
28
- */
29
- retrieve(exportID: string, options?: RequestOptions): APIPromise<ExportRetrieveResponse>;
30
- /**
31
- * List data exports for this project.
32
- *
33
- * @example
34
- * ```ts
35
- * // Automatically fetches more pages as needed.
36
- * for await (const dataExport of client.exports.list()) {
37
- * // ...
38
- * }
39
- * ```
40
- */
41
- list(query?: ExportListParams | null | undefined, options?: RequestOptions): PagePromise<DataExportsCursor, DataExport>;
42
- }
43
- export type DataExportsCursor = Cursor<DataExport>;
44
- export interface DataExport {
45
- id: string;
46
- createdAt: string;
47
- dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
48
- /**
49
- * When the export download link expires (24 hours after creation).
50
- */
51
- expiresAt: string;
52
- /**
53
- * Status of a data export job.
54
- */
55
- status: 'pending' | 'processing' | 'completed' | 'failed';
56
- completedAt?: string | null;
57
- dateFrom?: string | null;
58
- dateTo?: string | null;
59
- /**
60
- * URL to download the export file. Only available when status is 'completed'.
61
- */
62
- downloadUrl?: string | null;
63
- /**
64
- * Error message if the export failed.
65
- */
66
- errorMessage?: string | null;
67
- /**
68
- * Size of the export file in bytes.
69
- */
70
- fileSize?: number | null;
71
- }
72
- export interface ExportCreateResponse {
73
- export: DataExport;
74
- }
75
- export interface ExportRetrieveResponse {
76
- export: DataExport;
77
- }
78
- export interface ExportCreateParams {
79
- /**
80
- * List of data types to include in the export.
81
- */
82
- dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
83
- /**
84
- * Start date for data to export (inclusive).
85
- */
86
- dateFrom?: string;
87
- /**
88
- * End date for data to export (inclusive).
89
- */
90
- dateTo?: string;
91
- }
92
- export interface ExportListParams extends CursorParams {
93
- /**
94
- * Status of a data export job.
95
- */
96
- status?: 'pending' | 'processing' | 'completed' | 'failed';
97
- }
98
- export declare namespace Exports {
99
- export { type DataExport as DataExport, type ExportCreateResponse as ExportCreateResponse, type ExportRetrieveResponse as ExportRetrieveResponse, type DataExportsCursor as DataExportsCursor, type ExportCreateParams as ExportCreateParams, type ExportListParams as ExportListParams, };
100
- }
101
- //# sourceMappingURL=exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/resources/exports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,8BAA2B;AAC5E,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI5F;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIxF;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iBAAiB,EAAE,UAAU,CAAC;CAG9C;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,KAAK,CAAC,UAAU,GAAG,eAAe,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,YAAY,CAAC,CAAC;IAExG;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAA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less. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Exports = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- const pagination_1 = require("../core/pagination.js");
7
- const path_1 = require("../internal/utils/path.js");
8
- class Exports extends resource_1.APIResource {
9
- /**
10
- * Create a new data export job. The export will be processed asynchronously and
11
- * the download URL will be available when status is 'completed'. Export links
12
- * expire after 24 hours.
13
- *
14
- * @example
15
- * ```ts
16
- * const _export = await client.exports.create({
17
- * dataTypes: ['messages', 'conversations'],
18
- * dateFrom: '2024-01-01T00:00:00Z',
19
- * dateTo: '2024-12-31T23:59:59Z',
20
- * });
21
- * ```
22
- */
23
- create(body, options) {
24
- return this._client.post('/v1/exports', { body, ...options });
25
- }
26
- /**
27
- * Get details of a specific data export, including download URL when completed.
28
- *
29
- * @example
30
- * ```ts
31
- * const _export = await client.exports.retrieve('exportId');
32
- * ```
33
- */
34
- retrieve(exportID, options) {
35
- return this._client.get((0, path_1.path) `/v1/exports/${exportID}`, options);
36
- }
37
- /**
38
- * List data exports for this project.
39
- *
40
- * @example
41
- * ```ts
42
- * // Automatically fetches more pages as needed.
43
- * for await (const dataExport of client.exports.list()) {
44
- * // ...
45
- * }
46
- * ```
47
- */
48
- list(query = {}, options) {
49
- return this._client.getAPIList('/v1/exports', (pagination_1.Cursor), { query, ...options });
50
- }
51
- }
52
- exports.Exports = Exports;
53
- //# sourceMappingURL=exports.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/resources/exports.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,mBAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAhDD,0BAgDC"}
@@ -1,49 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- import { Cursor } from "../core/pagination.mjs";
4
- import { path } from "../internal/utils/path.mjs";
5
- export class Exports extends APIResource {
6
- /**
7
- * Create a new data export job. The export will be processed asynchronously and
8
- * the download URL will be available when status is 'completed'. Export links
9
- * expire after 24 hours.
10
- *
11
- * @example
12
- * ```ts
13
- * const _export = await client.exports.create({
14
- * dataTypes: ['messages', 'conversations'],
15
- * dateFrom: '2024-01-01T00:00:00Z',
16
- * dateTo: '2024-12-31T23:59:59Z',
17
- * });
18
- * ```
19
- */
20
- create(body, options) {
21
- return this._client.post('/v1/exports', { body, ...options });
22
- }
23
- /**
24
- * Get details of a specific data export, including download URL when completed.
25
- *
26
- * @example
27
- * ```ts
28
- * const _export = await client.exports.retrieve('exportId');
29
- * ```
30
- */
31
- retrieve(exportID, options) {
32
- return this._client.get(path `/v1/exports/${exportID}`, options);
33
- }
34
- /**
35
- * List data exports for this project.
36
- *
37
- * @example
38
- * ```ts
39
- * // Automatically fetches more pages as needed.
40
- * for await (const dataExport of client.exports.list()) {
41
- * // ...
42
- * }
43
- * ```
44
- */
45
- list(query = {}, options) {
46
- return this._client.getAPIList('/v1/exports', (Cursor), { query, ...options });
47
- }
48
- }
49
- //# sourceMappingURL=exports.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.mjs","sourceRoot":"","sources":["../src/resources/exports.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,MAAM,EAAkC,+BAA2B;AAE5E,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,MAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
@@ -1,43 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- export declare class Plan extends APIResource {
5
- /**
6
- * Get the current subscription plan for the API key's team, including tier,
7
- * billing interval, and period dates.
8
- */
9
- retrieve(options?: RequestOptions): APIPromise<PlanRetrieveResponse>;
10
- }
11
- export interface PlanRetrieveResponse {
12
- billingInterval: 'monthly' | 'annual';
13
- status: 'active' | 'past_due' | 'canceled' | 'trialing';
14
- /**
15
- * Current subscription tier.
16
- */
17
- tier: 'free' | 'pro' | 'scale' | 'enterprise';
18
- cancelAtPeriodEnd?: boolean;
19
- currentPeriodEnd?: string;
20
- currentPeriodStart?: string;
21
- limits?: PlanRetrieveResponse.Limits;
22
- }
23
- export declare namespace PlanRetrieveResponse {
24
- interface Limits {
25
- broadcasts?: boolean;
26
- /**
27
- * Monthly email limit.
28
- */
29
- emails?: number;
30
- /**
31
- * Monthly A2P message limit.
32
- */
33
- messagesA2P?: number;
34
- phoneNumbers?: number;
35
- senders?: number;
36
- subAccounts?: boolean;
37
- wabaConnections?: number;
38
- }
39
- }
40
- export declare namespace Plan {
41
- export { type PlanRetrieveResponse as PlanRetrieveResponse };
42
- }
43
- //# sourceMappingURL=plan.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan.d.mts","sourceRoot":"","sources":["../src/resources/plan.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGrE;AAED,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,SAAS,GAAG,QAAQ,CAAC;IAEtC,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IAExD;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,YAAY,CAAC;IAE9C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,MAAM,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC;CACtC;AAED,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,MAAM;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;CAC9D"}
@@ -1,43 +0,0 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { RequestOptions } from "../internal/request-options.js";
4
- export declare class Plan extends APIResource {
5
- /**
6
- * Get the current subscription plan for the API key's team, including tier,
7
- * billing interval, and period dates.
8
- */
9
- retrieve(options?: RequestOptions): APIPromise<PlanRetrieveResponse>;
10
- }
11
- export interface PlanRetrieveResponse {
12
- billingInterval: 'monthly' | 'annual';
13
- status: 'active' | 'past_due' | 'canceled' | 'trialing';
14
- /**
15
- * Current subscription tier.
16
- */
17
- tier: 'free' | 'pro' | 'scale' | 'enterprise';
18
- cancelAtPeriodEnd?: boolean;
19
- currentPeriodEnd?: string;
20
- currentPeriodStart?: string;
21
- limits?: PlanRetrieveResponse.Limits;
22
- }
23
- export declare namespace PlanRetrieveResponse {
24
- interface Limits {
25
- broadcasts?: boolean;
26
- /**
27
- * Monthly email limit.
28
- */
29
- emails?: number;
30
- /**
31
- * Monthly A2P message limit.
32
- */
33
- messagesA2P?: number;
34
- phoneNumbers?: number;
35
- senders?: number;
36
- subAccounts?: boolean;
37
- wabaConnections?: number;
38
- }
39
- }
40
- export declare namespace Plan {
41
- export { type PlanRetrieveResponse as PlanRetrieveResponse };
42
- }
43
- //# sourceMappingURL=plan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/resources/plan.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGrE;AAED,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,SAAS,GAAG,QAAQ,CAAC;IAEtC,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IAExD;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,YAAY,CAAC;IAE9C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,MAAM,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC;CACtC;AAED,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,MAAM;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;CAC9D"}
package/resources/plan.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Plan = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- class Plan extends resource_1.APIResource {
7
- /**
8
- * Get the current subscription plan for the API key's team, including tier,
9
- * billing interval, and period dates.
10
- */
11
- retrieve(options) {
12
- return this._client.get('/v1/plan', options);
13
- }
14
- }
15
- exports.Plan = Plan;
16
- //# sourceMappingURL=plan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan.js","sourceRoot":"","sources":["../src/resources/plan.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF;AARD,oBAQC"}
@@ -1,12 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- export class Plan extends APIResource {
4
- /**
5
- * Get the current subscription plan for the API key's team, including tier,
6
- * billing interval, and period dates.
7
- */
8
- retrieve(options) {
9
- return this._client.get('/v1/plan', options);
10
- }
11
- }
12
- //# sourceMappingURL=plan.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan.mjs","sourceRoot":"","sources":["../src/resources/plan.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -1,36 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- export declare class Usage extends APIResource {
5
- /**
6
- * Get the current month's usage counters for A2P messages and emails, along with
7
- * the tier limits.
8
- */
9
- retrieve(options?: RequestOptions): APIPromise<UsageRetrieveResponse>;
10
- }
11
- export interface UsageRetrieveResponse {
12
- /**
13
- * Emails sent this month.
14
- */
15
- emailsSent: number;
16
- limits: UsageRetrieveResponse.Limits;
17
- /**
18
- * A2P messages sent this month (WhatsApp replies + Telegram).
19
- */
20
- messagesA2P: number;
21
- /**
22
- * Current month in YYYY-MM format.
23
- */
24
- monthKey: string;
25
- tier: 'free' | 'pro' | 'scale' | 'enterprise';
26
- }
27
- export declare namespace UsageRetrieveResponse {
28
- interface Limits {
29
- emails?: number;
30
- messagesA2P?: number;
31
- }
32
- }
33
- export declare namespace Usage {
34
- export { type UsageRetrieveResponse as UsageRetrieveResponse };
35
- }
36
- //# sourceMappingURL=usage.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage.d.mts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGtE;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,qBAAqB,CAAC,MAAM,CAAC;IAErC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,YAAY,CAAC;CAC/C;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,MAAM;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}