sendblue 3.3.1 → 3.6.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 +41 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/contacts/contacts.d.mts +51 -2
- package/resources/contacts/contacts.d.mts.map +1 -1
- package/resources/contacts/contacts.d.ts +51 -2
- package/resources/contacts/contacts.d.ts.map +1 -1
- package/resources/contacts/contacts.js +18 -1
- package/resources/contacts/contacts.js.map +1 -1
- package/resources/contacts/contacts.mjs +18 -1
- package/resources/contacts/contacts.mjs.map +1 -1
- package/resources/contacts/index.d.mts +1 -1
- package/resources/contacts/index.d.mts.map +1 -1
- package/resources/contacts/index.d.ts +1 -1
- package/resources/contacts/index.d.ts.map +1 -1
- package/resources/contacts/index.js.map +1 -1
- package/resources/contacts/index.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/send-carousel.d.mts +82 -0
- package/resources/send-carousel.d.mts.map +1 -0
- package/resources/send-carousel.d.ts +82 -0
- package/resources/send-carousel.d.ts.map +1 -0
- package/resources/send-carousel.js +33 -0
- package/resources/send-carousel.js.map +1 -0
- package/resources/send-carousel.mjs +29 -0
- package/resources/send-carousel.mjs.map +1 -0
- package/src/client.ts +16 -0
- package/src/resources/contacts/contacts.ts +63 -1
- package/src/resources/contacts/index.ts +2 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/send-carousel.ts +117 -0
- 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
|
@@ -31,7 +31,8 @@ export declare class Contacts extends APIResource {
|
|
|
31
31
|
*/
|
|
32
32
|
retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<ContactRetrieveResponse>;
|
|
33
33
|
/**
|
|
34
|
-
* Update an existing contact
|
|
34
|
+
* Update an existing contact. You may set SMS opt-out with `opt_out` (boolean); it
|
|
35
|
+
* updates the same recipient record used for inbound keyword opt-outs.
|
|
35
36
|
*
|
|
36
37
|
* @example
|
|
37
38
|
* ```ts
|
|
@@ -66,6 +67,20 @@ export declare class Contacts extends APIResource {
|
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
69
|
count(options?: RequestOptions): APIPromise<ContactCountResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Opt a contact out (or back in) from receiving messages. When a recipient is
|
|
72
|
+
* opted out, outbound messages to that number will be blocked.
|
|
73
|
+
*
|
|
74
|
+
* Pass `opted_out: false` to opt a contact back in.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const response = await client.contacts.optOut({
|
|
79
|
+
* number: '+14155551234',
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
optOut(body: ContactOptOutParams, options?: RequestOptions): APIPromise<ContactOptOutResponse>;
|
|
69
84
|
/**
|
|
70
85
|
* Send a verification message to a contact
|
|
71
86
|
*
|
|
@@ -105,6 +120,10 @@ export interface Contact {
|
|
|
105
120
|
* Last name
|
|
106
121
|
*/
|
|
107
122
|
last_name?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Whether the contact has opted out of SMS (from recipient opt-out state)
|
|
125
|
+
*/
|
|
126
|
+
opt_out?: boolean;
|
|
108
127
|
/**
|
|
109
128
|
* Phone number in E.164 format
|
|
110
129
|
*/
|
|
@@ -144,6 +163,17 @@ export interface ContactCountResponse {
|
|
|
144
163
|
*/
|
|
145
164
|
count?: number;
|
|
146
165
|
}
|
|
166
|
+
export interface ContactOptOutResponse {
|
|
167
|
+
/**
|
|
168
|
+
* The normalized phone number
|
|
169
|
+
*/
|
|
170
|
+
number?: string;
|
|
171
|
+
/**
|
|
172
|
+
* The current opt-out status
|
|
173
|
+
*/
|
|
174
|
+
opted_out?: boolean;
|
|
175
|
+
status?: string;
|
|
176
|
+
}
|
|
147
177
|
export interface ContactVerifyResponse {
|
|
148
178
|
status?: string;
|
|
149
179
|
}
|
|
@@ -247,6 +277,15 @@ export interface ContactUpdateParams {
|
|
|
247
277
|
* @deprecated Deprecated, use last_name
|
|
248
278
|
*/
|
|
249
279
|
lastName?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Whether the contact has opted out of SMS (updates the same recipient record used
|
|
282
|
+
* for inbound keyword opt-outs)
|
|
283
|
+
*/
|
|
284
|
+
opt_out?: boolean;
|
|
285
|
+
/**
|
|
286
|
+
* @deprecated Deprecated, use opt_out
|
|
287
|
+
*/
|
|
288
|
+
optOut?: boolean;
|
|
250
289
|
/**
|
|
251
290
|
* Associated Sendblue phone number (preferred)
|
|
252
291
|
*/
|
|
@@ -283,6 +322,16 @@ export interface ContactListParams {
|
|
|
283
322
|
*/
|
|
284
323
|
phone_number?: string;
|
|
285
324
|
}
|
|
325
|
+
export interface ContactOptOutParams {
|
|
326
|
+
/**
|
|
327
|
+
* Phone number in E.164 format
|
|
328
|
+
*/
|
|
329
|
+
number: string;
|
|
330
|
+
/**
|
|
331
|
+
* Set to false to opt the contact back in (defaults to true)
|
|
332
|
+
*/
|
|
333
|
+
opted_out?: boolean;
|
|
334
|
+
}
|
|
286
335
|
export interface ContactVerifyParams {
|
|
287
336
|
/**
|
|
288
337
|
* Phone number to verify
|
|
@@ -290,7 +339,7 @@ export interface ContactVerifyParams {
|
|
|
290
339
|
number: string;
|
|
291
340
|
}
|
|
292
341
|
export declare namespace Contacts {
|
|
293
|
-
export { type Contact as Contact, type ContactCreateResponse as ContactCreateResponse, type ContactRetrieveResponse as ContactRetrieveResponse, type ContactUpdateResponse as ContactUpdateResponse, type ContactListResponse as ContactListResponse, type ContactDeleteResponse as ContactDeleteResponse, type ContactCountResponse as ContactCountResponse, type ContactVerifyResponse as ContactVerifyResponse, type ContactCreateParams as ContactCreateParams, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, type ContactVerifyParams as ContactVerifyParams, };
|
|
342
|
+
export { type Contact as Contact, type ContactCreateResponse as ContactCreateResponse, type ContactRetrieveResponse as ContactRetrieveResponse, type ContactUpdateResponse as ContactUpdateResponse, type ContactListResponse as ContactListResponse, type ContactDeleteResponse as ContactDeleteResponse, type ContactCountResponse as ContactCountResponse, type ContactOptOutResponse as ContactOptOutResponse, type ContactVerifyResponse as ContactVerifyResponse, type ContactCreateParams as ContactCreateParams, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, type ContactOptOutParams as ContactOptOutParams, type ContactVerifyParams as ContactVerifyParams, };
|
|
294
343
|
export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkDeleteResponse as BulkDeleteResponse, type BulkCreateParams as BulkCreateParams, type BulkDeleteParams as BulkDeleteParams, };
|
|
295
344
|
}
|
|
296
345
|
//# sourceMappingURL=contacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/resources/contacts/contacts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE;OACpF,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IAEpD;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAA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mB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -42,7 +42,8 @@ class Contacts extends resource_1.APIResource {
|
|
|
42
42
|
return this._client.get((0, path_1.path) `/api/v2/contacts/${phoneNumber}`, options);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Update an existing contact
|
|
45
|
+
* Update an existing contact. You may set SMS opt-out with `opt_out` (boolean); it
|
|
46
|
+
* updates the same recipient record used for inbound keyword opt-outs.
|
|
46
47
|
*
|
|
47
48
|
* @example
|
|
48
49
|
* ```ts
|
|
@@ -85,6 +86,22 @@ class Contacts extends resource_1.APIResource {
|
|
|
85
86
|
count(options) {
|
|
86
87
|
return this._client.get('/api/v2/contacts/count', options);
|
|
87
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Opt a contact out (or back in) from receiving messages. When a recipient is
|
|
91
|
+
* opted out, outbound messages to that number will be blocked.
|
|
92
|
+
*
|
|
93
|
+
* Pass `opted_out: false` to opt a contact back in.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* const response = await client.contacts.optOut({
|
|
98
|
+
* number: '+14155551234',
|
|
99
|
+
* });
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
optOut(body, options) {
|
|
103
|
+
return this._client.post('/api/v2/contacts/opt-out', { body, ...options });
|
|
104
|
+
}
|
|
88
105
|
/**
|
|
89
106
|
* Send a verification message to a contact
|
|
90
107
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/resources/contacts/contacts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2DAAkC;AAClC,oCAA0G;AAG1G,uDAAiD;AAEjD;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/resources/contacts/contacts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2DAAkC;AAClC,oCAA0G;AAG1G,uDAAiD;AAEjD;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoHtD,CAAC;IAlHC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,C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AAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AArHD,4BAqHC;AA8SD,QAAQ,CAAC,IAAI,GAAG,WAAI,CAAC"}
|
|
@@ -38,7 +38,8 @@ export class Contacts extends APIResource {
|
|
|
38
38
|
return this._client.get(path `/api/v2/contacts/${phoneNumber}`, options);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
* Update an existing contact
|
|
41
|
+
* Update an existing contact. You may set SMS opt-out with `opt_out` (boolean); it
|
|
42
|
+
* updates the same recipient record used for inbound keyword opt-outs.
|
|
42
43
|
*
|
|
43
44
|
* @example
|
|
44
45
|
* ```ts
|
|
@@ -81,6 +82,22 @@ export class Contacts extends APIResource {
|
|
|
81
82
|
count(options) {
|
|
82
83
|
return this._client.get('/api/v2/contacts/count', options);
|
|
83
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Opt a contact out (or back in) from receiving messages. When a recipient is
|
|
87
|
+
* opted out, outbound messages to that number will be blocked.
|
|
88
|
+
*
|
|
89
|
+
* Pass `opted_out: false` to opt a contact back in.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* const response = await client.contacts.optOut({
|
|
94
|
+
* number: '+14155551234',
|
|
95
|
+
* });
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
optOut(body, options) {
|
|
99
|
+
return this._client.post('/api/v2/contacts/opt-out', { body, ...options });
|
|
100
|
+
}
|
|
84
101
|
/**
|
|
85
102
|
* Send a verification message to a contact
|
|
86
103
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.mjs","sourceRoot":"","sources":["../../src/resources/contacts/contacts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAA8E;OAGpF,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,W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B,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,oBAAoB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,OAAwB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AA8SD,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Bulk, type BulkCreateResponse, type BulkDeleteResponse, type BulkCreateParams, type BulkDeleteParams, } from "./bulk.mjs";
|
|
2
|
-
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactVerifyParams, } from "./contacts.mjs";
|
|
2
|
+
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactOptOutResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactOptOutParams, type ContactVerifyParams, } from "./contacts.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Bulk, type BulkCreateResponse, type BulkDeleteResponse, type BulkCreateParams, type BulkDeleteParams, } from "./bulk.js";
|
|
2
|
-
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactVerifyParams, } from "./contacts.js";
|
|
2
|
+
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactOptOutResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactOptOutParams, type ContactVerifyParams, } from "./contacts.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAMgB;AALd,4FAAA,IAAI,OAAA;AAMN,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAMgB;AALd,4FAAA,IAAI,OAAA;AAMN,0CAgBoB;AAflB,oGAAA,QAAQ,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAKL;OACM,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/contacts/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAKL;OACM,EACL,QAAQ,GAeT"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactVerifyParams, } from "./contacts/contacts.mjs";
|
|
1
|
+
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactOptOutResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactOptOutParams, type ContactVerifyParams, } from "./contacts/contacts.mjs";
|
|
2
2
|
export { Groups, type GroupModifyResponse, type GroupModifyParams, type GroupSendMessageParams, } from "./groups.mjs";
|
|
3
3
|
export { Lookups, type LookupLookupNumberResponse, type LookupLookupNumberParams } from "./lookups.mjs";
|
|
4
4
|
export { MediaObjects, type MediaObjectUploadResponse, type MediaObjectUploadParams } from "./media-objects.mjs";
|
|
5
5
|
export { Messages, type MessageContent, type MessageResponse, type MessageRetrieveResponse, type MessageListResponse, type MessageListParams, type MessageGetStatusParams, type MessageSendParams, } from "./messages.mjs";
|
|
6
|
+
export { SendCarousel, type SendCarouselSendResponse, type SendCarouselSendParams } from "./send-carousel.mjs";
|
|
6
7
|
export { TypingIndicators, type TypingIndicatorSendResponse, type TypingIndicatorSendParams, } from "./typing-indicators.mjs";
|
|
7
8
|
export { Webhooks, type WebhookConfiguration, type WebhookCreateResponse, type WebhookUpdateResponse, type WebhookListResponse, type WebhookDeleteResponse, type WebhookCreateParams, type WebhookUpdateParams, type WebhookDeleteParams, } from "./webhooks.mjs";
|
|
8
9
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB;OACM,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B;OACM,EAAE,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,wBAAwB,EAAE;OAC3E,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EACL,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,uB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KAAK,yBAAyB,GAC/B;OACM,EACL,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactVerifyParams, } from "./contacts/contacts.js";
|
|
1
|
+
export { Contacts, type Contact, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactDeleteResponse, type ContactCountResponse, type ContactOptOutResponse, type ContactVerifyResponse, type ContactCreateParams, type ContactUpdateParams, type ContactListParams, type ContactOptOutParams, type ContactVerifyParams, } from "./contacts/contacts.js";
|
|
2
2
|
export { Groups, type GroupModifyResponse, type GroupModifyParams, type GroupSendMessageParams, } from "./groups.js";
|
|
3
3
|
export { Lookups, type LookupLookupNumberResponse, type LookupLookupNumberParams } from "./lookups.js";
|
|
4
4
|
export { MediaObjects, type MediaObjectUploadResponse, type MediaObjectUploadParams } from "./media-objects.js";
|
|
5
5
|
export { Messages, type MessageContent, type MessageResponse, type MessageRetrieveResponse, type MessageListResponse, type MessageListParams, type MessageGetStatusParams, type MessageSendParams, } from "./messages.js";
|
|
6
|
+
export { SendCarousel, type SendCarouselSendResponse, type SendCarouselSendParams } from "./send-carousel.js";
|
|
6
7
|
export { TypingIndicators, type TypingIndicatorSendResponse, type TypingIndicatorSendParams, } from "./typing-indicators.js";
|
|
7
8
|
export { Webhooks, type WebhookConfiguration, type WebhookCreateResponse, type WebhookUpdateResponse, type WebhookListResponse, type WebhookDeleteResponse, type WebhookCreateParams, type WebhookUpdateParams, type WebhookDeleteParams, } from "./webhooks.js";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB;OACM,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B;OACM,EAAE,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,wBAAwB,EAAE;OAC3E,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EACL,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB;OACM,EACL,gBAAgB,EAChB,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB;OACM,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B;OACM,EAAE,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,wBAAwB,EAAE;OAC3E,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EACL,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB;OACM,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE;OAC5E,EACL,gBAAgB,EAChB,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB"}
|
package/resources/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Webhooks = exports.TypingIndicators = exports.Messages = exports.MediaObjects = exports.Lookups = exports.Groups = exports.Contacts = void 0;
|
|
4
|
+
exports.Webhooks = exports.TypingIndicators = exports.SendCarousel = exports.Messages = exports.MediaObjects = exports.Lookups = exports.Groups = exports.Contacts = void 0;
|
|
5
5
|
var contacts_1 = require("./contacts/contacts.js");
|
|
6
6
|
Object.defineProperty(exports, "Contacts", { enumerable: true, get: function () { return contacts_1.Contacts; } });
|
|
7
7
|
var groups_1 = require("./groups.js");
|
|
@@ -12,6 +12,8 @@ var media_objects_1 = require("./media-objects.js");
|
|
|
12
12
|
Object.defineProperty(exports, "MediaObjects", { enumerable: true, get: function () { return media_objects_1.MediaObjects; } });
|
|
13
13
|
var messages_1 = require("./messages.js");
|
|
14
14
|
Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } });
|
|
15
|
+
var send_carousel_1 = require("./send-carousel.js");
|
|
16
|
+
Object.defineProperty(exports, "SendCarousel", { enumerable: true, get: function () { return send_carousel_1.SendCarousel; } });
|
|
15
17
|
var typing_indicators_1 = require("./typing-indicators.js");
|
|
16
18
|
Object.defineProperty(exports, "TypingIndicators", { enumerable: true, get: function () { return typing_indicators_1.TypingIndicators; } });
|
|
17
19
|
var webhooks_1 = require("./webhooks.js");
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAgB6B;AAf3B,oGAAA,QAAQ,OAAA;AAgBV,sCAKkB;AAJhB,gGAAA,MAAM,OAAA;AAKR,wCAAoG;AAA3F,kGAAA,OAAO,OAAA;AAChB,oDAA6G;AAApG,6GAAA,YAAY,OAAA;AACrB,0CASoB;AARlB,oGAAA,QAAQ,OAAA;AASV,oDAA2G;AAAlG,6GAAA,YAAY,OAAA;AACrB,4DAI6B;AAH3B,qHAAA,gBAAgB,OAAA;AAIlB,0CAUoB;AATlB,oGAAA,QAAQ,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ export { Groups, } from "./groups.mjs";
|
|
|
4
4
|
export { Lookups } from "./lookups.mjs";
|
|
5
5
|
export { MediaObjects } from "./media-objects.mjs";
|
|
6
6
|
export { Messages, } from "./messages.mjs";
|
|
7
|
+
export { SendCarousel } from "./send-carousel.mjs";
|
|
7
8
|
export { TypingIndicators, } from "./typing-indicators.mjs";
|
|
8
9
|
export { Webhooks, } from "./webhooks.mjs";
|
|
9
10
|
//# sourceMappingURL=index.mjs.map
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAeT;OACM,EACL,MAAM,GAIP;OACM,EAAE,OAAO,EAAkE;OAC3E,EAAE,YAAY,EAAgE;OAC9E,EACL,QAAQ,GAQT;OACM,EAAE,YAAY,EAA8D;OAC5E,EACL,gBAAgB,GAGjB;OACM,EACL,QAAQ,GAST"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Operations for sending and managing messages
|
|
6
|
+
*/
|
|
7
|
+
export declare class SendCarousel extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Send a carousel of images to a single recipient. Requires a V2 (Mac Mini) line.
|
|
10
|
+
* The carousel must contain between 2 and 20 HTTPS image URLs. For sending a
|
|
11
|
+
* single image, use `/api/send-message` with `media_url` instead.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.sendCarousel.send({
|
|
16
|
+
* from_number: '+19998887777',
|
|
17
|
+
* media_urls: [
|
|
18
|
+
* 'https://example.com/image1.jpg',
|
|
19
|
+
* 'https://example.com/image2.jpg',
|
|
20
|
+
* 'https://example.com/image3.jpg',
|
|
21
|
+
* ],
|
|
22
|
+
* number: '+19998887777',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
send(body: SendCarouselSendParams, options?: RequestOptions): APIPromise<SendCarouselSendResponse>;
|
|
27
|
+
}
|
|
28
|
+
export interface SendCarouselSendResponse {
|
|
29
|
+
/**
|
|
30
|
+
* Email of the account that sent the message
|
|
31
|
+
*/
|
|
32
|
+
accountEmail?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sending phone number
|
|
35
|
+
*/
|
|
36
|
+
from_number?: string;
|
|
37
|
+
is_outbound?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* First media URL from the carousel
|
|
40
|
+
*/
|
|
41
|
+
media_url?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Unique identifier for tracking the message
|
|
44
|
+
*/
|
|
45
|
+
message_handle?: string;
|
|
46
|
+
message_type?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Recipient phone number
|
|
49
|
+
*/
|
|
50
|
+
number?: string;
|
|
51
|
+
status?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface SendCarouselSendParams {
|
|
54
|
+
/**
|
|
55
|
+
* Your Sendblue phone number in E.164 format (must be a V2/Mac Mini line)
|
|
56
|
+
*/
|
|
57
|
+
from_number: string;
|
|
58
|
+
/**
|
|
59
|
+
* Array of HTTPS image URLs to send as a carousel (2-20 items)
|
|
60
|
+
*/
|
|
61
|
+
media_urls: Array<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Recipient phone number in E.164 format
|
|
64
|
+
*/
|
|
65
|
+
number: string;
|
|
66
|
+
/**
|
|
67
|
+
* Additional metadata to attach to the message
|
|
68
|
+
*/
|
|
69
|
+
metadata?: unknown;
|
|
70
|
+
/**
|
|
71
|
+
* The iMessage expressive message style
|
|
72
|
+
*/
|
|
73
|
+
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
74
|
+
/**
|
|
75
|
+
* Webhook URL for message status updates
|
|
76
|
+
*/
|
|
77
|
+
status_callback?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare namespace SendCarousel {
|
|
80
|
+
export { type SendCarouselSendResponse as SendCarouselSendResponse, type SendCarouselSendParams as SendCarouselSendParams, };
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=send-carousel.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-carousel.d.mts","sourceRoot":"","sources":["../src/resources/send-carousel.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGnG;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EACP,aAAa,GACb,eAAe,GACf,WAAW,GACX,QAAQ,GACR,MAAM,GACN,UAAU,GACV,UAAU,GACV,WAAW,GACX,MAAM,GACN,WAAW,GACX,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Operations for sending and managing messages
|
|
6
|
+
*/
|
|
7
|
+
export declare class SendCarousel extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Send a carousel of images to a single recipient. Requires a V2 (Mac Mini) line.
|
|
10
|
+
* The carousel must contain between 2 and 20 HTTPS image URLs. For sending a
|
|
11
|
+
* single image, use `/api/send-message` with `media_url` instead.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.sendCarousel.send({
|
|
16
|
+
* from_number: '+19998887777',
|
|
17
|
+
* media_urls: [
|
|
18
|
+
* 'https://example.com/image1.jpg',
|
|
19
|
+
* 'https://example.com/image2.jpg',
|
|
20
|
+
* 'https://example.com/image3.jpg',
|
|
21
|
+
* ],
|
|
22
|
+
* number: '+19998887777',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
send(body: SendCarouselSendParams, options?: RequestOptions): APIPromise<SendCarouselSendResponse>;
|
|
27
|
+
}
|
|
28
|
+
export interface SendCarouselSendResponse {
|
|
29
|
+
/**
|
|
30
|
+
* Email of the account that sent the message
|
|
31
|
+
*/
|
|
32
|
+
accountEmail?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sending phone number
|
|
35
|
+
*/
|
|
36
|
+
from_number?: string;
|
|
37
|
+
is_outbound?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* First media URL from the carousel
|
|
40
|
+
*/
|
|
41
|
+
media_url?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Unique identifier for tracking the message
|
|
44
|
+
*/
|
|
45
|
+
message_handle?: string;
|
|
46
|
+
message_type?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Recipient phone number
|
|
49
|
+
*/
|
|
50
|
+
number?: string;
|
|
51
|
+
status?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface SendCarouselSendParams {
|
|
54
|
+
/**
|
|
55
|
+
* Your Sendblue phone number in E.164 format (must be a V2/Mac Mini line)
|
|
56
|
+
*/
|
|
57
|
+
from_number: string;
|
|
58
|
+
/**
|
|
59
|
+
* Array of HTTPS image URLs to send as a carousel (2-20 items)
|
|
60
|
+
*/
|
|
61
|
+
media_urls: Array<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Recipient phone number in E.164 format
|
|
64
|
+
*/
|
|
65
|
+
number: string;
|
|
66
|
+
/**
|
|
67
|
+
* Additional metadata to attach to the message
|
|
68
|
+
*/
|
|
69
|
+
metadata?: unknown;
|
|
70
|
+
/**
|
|
71
|
+
* The iMessage expressive message style
|
|
72
|
+
*/
|
|
73
|
+
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
74
|
+
/**
|
|
75
|
+
* Webhook URL for message status updates
|
|
76
|
+
*/
|
|
77
|
+
status_callback?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare namespace SendCarousel {
|
|
80
|
+
export { type SendCarouselSendResponse as SendCarouselSendResponse, type SendCarouselSendParams as SendCarouselSendParams, };
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=send-carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-carousel.d.ts","sourceRoot":"","sources":["../src/resources/send-carousel.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGnG;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EACP,aAAa,GACb,eAAe,GACf,WAAW,GACX,QAAQ,GACR,MAAM,GACN,UAAU,GACV,UAAU,GACV,WAAW,GACX,MAAM,GACN,WAAW,GACX,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.SendCarousel = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Operations for sending and managing messages
|
|
8
|
+
*/
|
|
9
|
+
class SendCarousel extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Send a carousel of images to a single recipient. Requires a V2 (Mac Mini) line.
|
|
12
|
+
* The carousel must contain between 2 and 20 HTTPS image URLs. For sending a
|
|
13
|
+
* single image, use `/api/send-message` with `media_url` instead.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const response = await client.sendCarousel.send({
|
|
18
|
+
* from_number: '+19998887777',
|
|
19
|
+
* media_urls: [
|
|
20
|
+
* 'https://example.com/image1.jpg',
|
|
21
|
+
* 'https://example.com/image2.jpg',
|
|
22
|
+
* 'https://example.com/image3.jpg',
|
|
23
|
+
* ],
|
|
24
|
+
* number: '+19998887777',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
send(body, options) {
|
|
29
|
+
return this._client.post('/api/send-carousel', { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.SendCarousel = SendCarousel;
|
|
33
|
+
//# sourceMappingURL=send-carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-carousel.js","sourceRoot":"","sources":["../src/resources/send-carousel.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,IAA4B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAtBD,oCAsBC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Operations for sending and managing messages
|
|
5
|
+
*/
|
|
6
|
+
export class SendCarousel extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Send a carousel of images to a single recipient. Requires a V2 (Mac Mini) line.
|
|
9
|
+
* The carousel must contain between 2 and 20 HTTPS image URLs. For sending a
|
|
10
|
+
* single image, use `/api/send-message` with `media_url` instead.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response = await client.sendCarousel.send({
|
|
15
|
+
* from_number: '+19998887777',
|
|
16
|
+
* media_urls: [
|
|
17
|
+
* 'https://example.com/image1.jpg',
|
|
18
|
+
* 'https://example.com/image2.jpg',
|
|
19
|
+
* 'https://example.com/image3.jpg',
|
|
20
|
+
* ],
|
|
21
|
+
* number: '+19998887777',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
send(body, options) {
|
|
26
|
+
return this._client.post('/api/send-carousel', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=send-carousel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-carousel.mjs","sourceRoot":"","sources":["../src/resources/send-carousel.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,IAA4B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
MessageSendParams,
|
|
31
31
|
Messages,
|
|
32
32
|
} from './resources/messages';
|
|
33
|
+
import { SendCarousel, SendCarouselSendParams, SendCarouselSendResponse } from './resources/send-carousel';
|
|
33
34
|
import {
|
|
34
35
|
TypingIndicatorSendParams,
|
|
35
36
|
TypingIndicatorSendResponse,
|
|
@@ -54,6 +55,8 @@ import {
|
|
|
54
55
|
ContactDeleteResponse,
|
|
55
56
|
ContactListParams,
|
|
56
57
|
ContactListResponse,
|
|
58
|
+
ContactOptOutParams,
|
|
59
|
+
ContactOptOutResponse,
|
|
57
60
|
ContactRetrieveResponse,
|
|
58
61
|
ContactUpdateParams,
|
|
59
62
|
ContactUpdateResponse,
|
|
@@ -813,6 +816,10 @@ export class SendblueAPI {
|
|
|
813
816
|
* Operations for managing webhook subscriptions
|
|
814
817
|
*/
|
|
815
818
|
webhooks: API.Webhooks = new API.Webhooks(this);
|
|
819
|
+
/**
|
|
820
|
+
* Operations for sending and managing messages
|
|
821
|
+
*/
|
|
822
|
+
sendCarousel: API.SendCarousel = new API.SendCarousel(this);
|
|
816
823
|
}
|
|
817
824
|
|
|
818
825
|
SendblueAPI.Messages = Messages;
|
|
@@ -822,6 +829,7 @@ SendblueAPI.Lookups = Lookups;
|
|
|
822
829
|
SendblueAPI.TypingIndicators = TypingIndicators;
|
|
823
830
|
SendblueAPI.Contacts = Contacts;
|
|
824
831
|
SendblueAPI.Webhooks = Webhooks;
|
|
832
|
+
SendblueAPI.SendCarousel = SendCarousel;
|
|
825
833
|
|
|
826
834
|
export declare namespace SendblueAPI {
|
|
827
835
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -871,10 +879,12 @@ export declare namespace SendblueAPI {
|
|
|
871
879
|
type ContactListResponse as ContactListResponse,
|
|
872
880
|
type ContactDeleteResponse as ContactDeleteResponse,
|
|
873
881
|
type ContactCountResponse as ContactCountResponse,
|
|
882
|
+
type ContactOptOutResponse as ContactOptOutResponse,
|
|
874
883
|
type ContactVerifyResponse as ContactVerifyResponse,
|
|
875
884
|
type ContactCreateParams as ContactCreateParams,
|
|
876
885
|
type ContactUpdateParams as ContactUpdateParams,
|
|
877
886
|
type ContactListParams as ContactListParams,
|
|
887
|
+
type ContactOptOutParams as ContactOptOutParams,
|
|
878
888
|
type ContactVerifyParams as ContactVerifyParams,
|
|
879
889
|
};
|
|
880
890
|
|
|
@@ -889,4 +899,10 @@ export declare namespace SendblueAPI {
|
|
|
889
899
|
type WebhookUpdateParams as WebhookUpdateParams,
|
|
890
900
|
type WebhookDeleteParams as WebhookDeleteParams,
|
|
891
901
|
};
|
|
902
|
+
|
|
903
|
+
export {
|
|
904
|
+
SendCarousel as SendCarousel,
|
|
905
|
+
type SendCarouselSendResponse as SendCarouselSendResponse,
|
|
906
|
+
type SendCarouselSendParams as SendCarouselSendParams,
|
|
907
|
+
};
|
|
892
908
|
}
|