@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.
- package/CHANGELOG.md +24 -0
- package/client.d.mts +0 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -9
- package/client.d.ts.map +1 -1
- package/client.js +0 -9
- package/client.js.map +1 -1
- package/client.mjs +0 -9
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/broadcasts/broadcasts.d.mts +1 -1
- package/resources/broadcasts/broadcasts.d.mts.map +1 -1
- package/resources/broadcasts/broadcasts.d.ts +1 -1
- package/resources/broadcasts/broadcasts.d.ts.map +1 -1
- package/resources/broadcasts/broadcasts.js.map +1 -1
- package/resources/broadcasts/broadcasts.mjs.map +1 -1
- package/resources/contacts/channels.d.mts +1 -1
- package/resources/contacts/channels.d.mts.map +1 -1
- package/resources/contacts/channels.d.ts +1 -1
- package/resources/contacts/channels.d.ts.map +1 -1
- package/resources/contacts/contacts.d.mts +2 -2
- package/resources/contacts/contacts.d.mts.map +1 -1
- package/resources/contacts/contacts.d.ts +2 -2
- package/resources/contacts/contacts.d.ts.map +1 -1
- package/resources/index.d.mts +0 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -3
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +19 -9
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +19 -9
- package/resources/messages.d.ts.map +1 -1
- package/resources/phone-numbers.d.mts +1 -1
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +1 -1
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/senders/senders.d.mts +56 -2
- package/resources/senders/senders.d.mts.map +1 -1
- package/resources/senders/senders.d.ts +56 -2
- package/resources/senders/senders.d.ts.map +1 -1
- package/resources/senders/senders.js +0 -1
- package/resources/senders/senders.js.map +1 -1
- package/resources/senders/senders.mjs +0 -1
- package/resources/senders/senders.mjs.map +1 -1
- package/resources/urls.d.mts +2 -2
- package/resources/urls.d.mts.map +1 -1
- package/resources/urls.d.ts +2 -2
- package/resources/urls.d.ts.map +1 -1
- package/src/client.ts +0 -31
- package/src/resources/broadcasts/broadcasts.ts +1 -10
- package/src/resources/contacts/channels.ts +1 -1
- package/src/resources/contacts/contacts.ts +2 -2
- package/src/resources/index.ts +0 -11
- package/src/resources/messages.ts +19 -8
- package/src/resources/phone-numbers.ts +1 -1
- package/src/resources/senders/senders.ts +66 -2
- package/src/resources/urls.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/exports.d.mts +0 -101
- package/resources/exports.d.mts.map +0 -1
- package/resources/exports.d.ts +0 -101
- package/resources/exports.d.ts.map +0 -1
- package/resources/exports.js +0 -53
- package/resources/exports.js.map +0 -1
- package/resources/exports.mjs +0 -49
- package/resources/exports.mjs.map +0 -1
- package/resources/plan.d.mts +0 -43
- package/resources/plan.d.mts.map +0 -1
- package/resources/plan.d.ts +0 -43
- package/resources/plan.d.ts.map +0 -1
- package/resources/plan.js +0 -16
- package/resources/plan.js.map +0 -1
- package/resources/plan.mjs +0 -12
- package/resources/plan.mjs.map +0 -1
- package/resources/usage.d.mts +0 -36
- package/resources/usage.d.mts.map +0 -1
- package/resources/usage.d.ts +0 -36
- package/resources/usage.d.ts.map +0 -1
- package/resources/usage.js +0 -16
- package/resources/usage.js.map +0 -1
- package/resources/usage.mjs +0 -12
- package/resources/usage.mjs.map +0 -1
- package/src/resources/exports.ts +0 -141
- package/src/resources/plan.ts +0 -62
- package/src/resources/usage.ts +0 -48
package/resources/usage.d.ts
DELETED
|
@@ -1,36 +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 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.ts.map
|
package/resources/usage.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;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"}
|
package/resources/usage.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.Usage = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
class Usage extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Get the current month's usage counters for A2P messages and emails, along with
|
|
9
|
-
* the tier limits.
|
|
10
|
-
*/
|
|
11
|
-
retrieve(options) {
|
|
12
|
-
return this._client.get('/v1/usage', options);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.Usage = Usage;
|
|
16
|
-
//# sourceMappingURL=usage.js.map
|
package/resources/usage.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AARD,sBAQC"}
|
package/resources/usage.mjs
DELETED
|
@@ -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 Usage extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Get the current month's usage counters for A2P messages and emails, along with
|
|
6
|
-
* the tier limits.
|
|
7
|
-
*/
|
|
8
|
-
retrieve(options) {
|
|
9
|
-
return this._client.get('/v1/usage', options);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=usage.mjs.map
|
package/resources/usage.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.mjs","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF"}
|
package/src/resources/exports.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
import { path } from '../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class Exports extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Create a new data export job. The export will be processed asynchronously and
|
|
12
|
-
* the download URL will be available when status is 'completed'. Export links
|
|
13
|
-
* expire after 24 hours.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const _export = await client.exports.create({
|
|
18
|
-
* dataTypes: ['messages', 'conversations'],
|
|
19
|
-
* dateFrom: '2024-01-01T00:00:00Z',
|
|
20
|
-
* dateTo: '2024-12-31T23:59:59Z',
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
create(body: ExportCreateParams, options?: RequestOptions): APIPromise<ExportCreateResponse> {
|
|
25
|
-
return this._client.post('/v1/exports', { body, ...options });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Get details of a specific data export, including download URL when completed.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const _export = await client.exports.retrieve('exportId');
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
retrieve(exportID: string, options?: RequestOptions): APIPromise<ExportRetrieveResponse> {
|
|
37
|
-
return this._client.get(path`/v1/exports/${exportID}`, options);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* List data exports for this project.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* // Automatically fetches more pages as needed.
|
|
46
|
-
* for await (const dataExport of client.exports.list()) {
|
|
47
|
-
* // ...
|
|
48
|
-
* }
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
list(
|
|
52
|
-
query: ExportListParams | null | undefined = {},
|
|
53
|
-
options?: RequestOptions,
|
|
54
|
-
): PagePromise<DataExportsCursor, DataExport> {
|
|
55
|
-
return this._client.getAPIList('/v1/exports', Cursor<DataExport>, { query, ...options });
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type DataExportsCursor = Cursor<DataExport>;
|
|
60
|
-
|
|
61
|
-
export interface DataExport {
|
|
62
|
-
id: string;
|
|
63
|
-
|
|
64
|
-
createdAt: string;
|
|
65
|
-
|
|
66
|
-
dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* When the export download link expires (24 hours after creation).
|
|
70
|
-
*/
|
|
71
|
-
expiresAt: string;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Status of a data export job.
|
|
75
|
-
*/
|
|
76
|
-
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
77
|
-
|
|
78
|
-
completedAt?: string | null;
|
|
79
|
-
|
|
80
|
-
dateFrom?: string | null;
|
|
81
|
-
|
|
82
|
-
dateTo?: string | null;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* URL to download the export file. Only available when status is 'completed'.
|
|
86
|
-
*/
|
|
87
|
-
downloadUrl?: string | null;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Error message if the export failed.
|
|
91
|
-
*/
|
|
92
|
-
errorMessage?: string | null;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Size of the export file in bytes.
|
|
96
|
-
*/
|
|
97
|
-
fileSize?: number | null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface ExportCreateResponse {
|
|
101
|
-
export: DataExport;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface ExportRetrieveResponse {
|
|
105
|
-
export: DataExport;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface ExportCreateParams {
|
|
109
|
-
/**
|
|
110
|
-
* List of data types to include in the export.
|
|
111
|
-
*/
|
|
112
|
-
dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Start date for data to export (inclusive).
|
|
116
|
-
*/
|
|
117
|
-
dateFrom?: string;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* End date for data to export (inclusive).
|
|
121
|
-
*/
|
|
122
|
-
dateTo?: string;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export interface ExportListParams extends CursorParams {
|
|
126
|
-
/**
|
|
127
|
-
* Status of a data export job.
|
|
128
|
-
*/
|
|
129
|
-
status?: 'pending' | 'processing' | 'completed' | 'failed';
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export declare namespace Exports {
|
|
133
|
-
export {
|
|
134
|
-
type DataExport as DataExport,
|
|
135
|
-
type ExportCreateResponse as ExportCreateResponse,
|
|
136
|
-
type ExportRetrieveResponse as ExportRetrieveResponse,
|
|
137
|
-
type DataExportsCursor as DataExportsCursor,
|
|
138
|
-
type ExportCreateParams as ExportCreateParams,
|
|
139
|
-
type ExportListParams as ExportListParams,
|
|
140
|
-
};
|
|
141
|
-
}
|
package/src/resources/plan.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Plan extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Get the current subscription plan for the API key's team, including tier,
|
|
10
|
-
* billing interval, and period dates.
|
|
11
|
-
*/
|
|
12
|
-
retrieve(options?: RequestOptions): APIPromise<PlanRetrieveResponse> {
|
|
13
|
-
return this._client.get('/v1/plan', options);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface PlanRetrieveResponse {
|
|
18
|
-
billingInterval: 'monthly' | 'annual';
|
|
19
|
-
|
|
20
|
-
status: 'active' | 'past_due' | 'canceled' | 'trialing';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Current subscription tier.
|
|
24
|
-
*/
|
|
25
|
-
tier: 'free' | 'pro' | 'scale' | 'enterprise';
|
|
26
|
-
|
|
27
|
-
cancelAtPeriodEnd?: boolean;
|
|
28
|
-
|
|
29
|
-
currentPeriodEnd?: string;
|
|
30
|
-
|
|
31
|
-
currentPeriodStart?: string;
|
|
32
|
-
|
|
33
|
-
limits?: PlanRetrieveResponse.Limits;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export namespace PlanRetrieveResponse {
|
|
37
|
-
export interface Limits {
|
|
38
|
-
broadcasts?: boolean;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Monthly email limit.
|
|
42
|
-
*/
|
|
43
|
-
emails?: number;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Monthly A2P message limit.
|
|
47
|
-
*/
|
|
48
|
-
messagesA2P?: number;
|
|
49
|
-
|
|
50
|
-
phoneNumbers?: number;
|
|
51
|
-
|
|
52
|
-
senders?: number;
|
|
53
|
-
|
|
54
|
-
subAccounts?: boolean;
|
|
55
|
-
|
|
56
|
-
wabaConnections?: number;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export declare namespace Plan {
|
|
61
|
-
export { type PlanRetrieveResponse as PlanRetrieveResponse };
|
|
62
|
-
}
|
package/src/resources/usage.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Usage extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Get the current month's usage counters for A2P messages and emails, along with
|
|
10
|
-
* the tier limits.
|
|
11
|
-
*/
|
|
12
|
-
retrieve(options?: RequestOptions): APIPromise<UsageRetrieveResponse> {
|
|
13
|
-
return this._client.get('/v1/usage', options);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface UsageRetrieveResponse {
|
|
18
|
-
/**
|
|
19
|
-
* Emails sent this month.
|
|
20
|
-
*/
|
|
21
|
-
emailsSent: number;
|
|
22
|
-
|
|
23
|
-
limits: UsageRetrieveResponse.Limits;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* A2P messages sent this month (WhatsApp replies + Telegram).
|
|
27
|
-
*/
|
|
28
|
-
messagesA2P: number;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Current month in YYYY-MM format.
|
|
32
|
-
*/
|
|
33
|
-
monthKey: string;
|
|
34
|
-
|
|
35
|
-
tier: 'free' | 'pro' | 'scale' | 'enterprise';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export namespace UsageRetrieveResponse {
|
|
39
|
-
export interface Limits {
|
|
40
|
-
emails?: number;
|
|
41
|
-
|
|
42
|
-
messagesA2P?: number;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export declare namespace Usage {
|
|
47
|
-
export { type UsageRetrieveResponse as UsageRetrieveResponse };
|
|
48
|
-
}
|