sendblue 1.1.9 → 2.0.1
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 +83 -0
- package/LICENSE +201 -21
- package/README.md +349 -38
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +203 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +203 -0
- package/client.d.ts.map +1 -0
- package/client.js +489 -0
- package/client.js.map +1 -0
- package/client.mjs +485 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -78
- package/index.d.ts.map +1 -0
- package/index.js +28 -104
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +129 -39
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/contacts/bulk.d.mts +61 -0
- package/resources/contacts/bulk.d.mts.map +1 -0
- package/resources/contacts/bulk.d.ts +61 -0
- package/resources/contacts/bulk.d.ts.map +1 -0
- package/resources/contacts/bulk.js +35 -0
- package/resources/contacts/bulk.js.map +1 -0
- package/resources/contacts/bulk.mjs +31 -0
- package/resources/contacts/bulk.mjs.map +1 -0
- package/resources/contacts/contacts.d.mts +239 -0
- package/resources/contacts/contacts.d.mts.map +1 -0
- package/resources/contacts/contacts.d.ts +239 -0
- package/resources/contacts/contacts.d.ts.map +1 -0
- package/resources/contacts/contacts.js +101 -0
- package/resources/contacts/contacts.js.map +1 -0
- package/resources/contacts/contacts.mjs +96 -0
- package/resources/contacts/contacts.mjs.map +1 -0
- package/resources/contacts/index.d.mts +3 -0
- package/resources/contacts/index.d.mts.map +1 -0
- package/resources/contacts/index.d.ts +3 -0
- package/resources/contacts/index.d.ts.map +1 -0
- package/resources/contacts/index.js +9 -0
- package/resources/contacts/index.js.map +1 -0
- package/resources/contacts/index.mjs +4 -0
- package/resources/contacts/index.mjs.map +1 -0
- package/resources/contacts.d.mts +2 -0
- package/resources/contacts.d.mts.map +1 -0
- package/resources/contacts.d.ts +2 -0
- package/resources/contacts.d.ts.map +1 -0
- package/resources/contacts.js +6 -0
- package/resources/contacts.js.map +1 -0
- package/resources/contacts.mjs +3 -0
- package/resources/contacts.mjs.map +1 -0
- package/resources/groups.d.mts +77 -0
- package/resources/groups.d.mts.map +1 -0
- package/resources/groups.d.ts +77 -0
- package/resources/groups.d.ts.map +1 -0
- package/resources/groups.js +38 -0
- package/resources/groups.js.map +1 -0
- package/resources/groups.mjs +34 -0
- package/resources/groups.mjs.map +1 -0
- package/resources/index.d.mts +7 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +7 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +17 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +8 -0
- package/resources/index.mjs.map +1 -0
- package/resources/lookups.d.mts +30 -0
- package/resources/lookups.d.mts.map +1 -0
- package/resources/lookups.d.ts +30 -0
- package/resources/lookups.d.ts.map +1 -0
- package/resources/lookups.js +16 -0
- package/resources/lookups.js.map +1 -0
- package/resources/lookups.mjs +12 -0
- package/resources/lookups.mjs.map +1 -0
- package/resources/media-objects.d.mts +31 -0
- package/resources/media-objects.d.mts.map +1 -0
- package/resources/media-objects.d.ts +31 -0
- package/resources/media-objects.d.ts.map +1 -0
- package/resources/media-objects.js +22 -0
- package/resources/media-objects.js.map +1 -0
- package/resources/media-objects.mjs +18 -0
- package/resources/media-objects.mjs.map +1 -0
- package/resources/messages.d.mts +487 -0
- package/resources/messages.d.mts.map +1 -0
- package/resources/messages.d.ts +487 -0
- package/resources/messages.d.ts.map +1 -0
- package/resources/messages.js +64 -0
- package/resources/messages.js.map +1 -0
- package/resources/messages.mjs +60 -0
- package/resources/messages.mjs.map +1 -0
- package/resources/typing-indicators.d.mts +42 -0
- package/resources/typing-indicators.d.mts.map +1 -0
- package/resources/typing-indicators.d.ts +42 -0
- package/resources/typing-indicators.d.ts.map +1 -0
- package/resources/typing-indicators.js +24 -0
- package/resources/typing-indicators.js.map +1 -0
- package/resources/typing-indicators.mjs +20 -0
- package/resources/typing-indicators.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +840 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/contacts/bulk.ts +85 -0
- package/src/resources/contacts/contacts.ts +338 -0
- package/src/resources/contacts/index.ts +24 -0
- package/src/resources/contacts.ts +3 -0
- package/src/resources/groups.ts +102 -0
- package/src/resources/index.ts +40 -0
- package/src/resources/lookups.ts +44 -0
- package/src/resources/media-objects.ts +43 -0
- package/src/resources/messages.ts +720 -0
- package/src/resources/typing-indicators.ts +54 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/.env +0 -5
- package/.prettierrc +0 -1
- package/config.js +0 -31
- package/dist/base/Message.d.ts +0 -43
- package/dist/base/Message.js +0 -30
- package/dist/base/RequestClient.d.ts +0 -27
- package/dist/base/RequestClient.js +0 -138
- package/dist/base/SendblueClient.d.ts +0 -18
- package/dist/base/SendblueClient.js +0 -33
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -4
- package/dist/rest/group-message/index.d.ts +0 -23
- package/dist/rest/group-message/index.js +0 -73
- package/dist/rest/message/index.d.ts +0 -14
- package/dist/rest/message/index.js +0 -66
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -2
- package/test/basic.test.js +0 -47
- package/tsconfig.json +0 -10
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as ContactsAPI from './contacts';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
export class Bulk extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create multiple contacts in bulk
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const bulk = await client.contacts.bulk.create({
|
|
15
|
+
* contacts: [{ phone: 'phone' }],
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(body: BulkCreateParams, options?: RequestOptions): APIPromise<BulkCreateResponse> {
|
|
20
|
+
return this._client.post('/api/v2/contacts/bulk', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Delete multiple contacts by their IDs
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const bulk = await client.contacts.bulk.delete({
|
|
29
|
+
* contact_ids: ['+1234567890', '+0987654321'],
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
delete(body: BulkDeleteParams, options?: RequestOptions): APIPromise<BulkDeleteResponse> {
|
|
34
|
+
return this._client.delete('/api/v2/contacts', { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface BulkCreateResponse {
|
|
39
|
+
contacts?: Array<ContactsAPI.Contact>;
|
|
40
|
+
|
|
41
|
+
status?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface BulkDeleteResponse {
|
|
45
|
+
/**
|
|
46
|
+
* Number of contacts deleted
|
|
47
|
+
*/
|
|
48
|
+
amount?: number;
|
|
49
|
+
|
|
50
|
+
status?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface BulkCreateParams {
|
|
54
|
+
contacts: Array<BulkCreateParams.Contact>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export namespace BulkCreateParams {
|
|
58
|
+
export interface Contact {
|
|
59
|
+
phone: string;
|
|
60
|
+
|
|
61
|
+
company?: string;
|
|
62
|
+
|
|
63
|
+
firstName?: string;
|
|
64
|
+
|
|
65
|
+
lastName?: string;
|
|
66
|
+
|
|
67
|
+
tags?: Array<string>;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface BulkDeleteParams {
|
|
72
|
+
/**
|
|
73
|
+
* Array of phone numbers in E.164 format to delete
|
|
74
|
+
*/
|
|
75
|
+
contact_ids: Array<string>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare namespace Bulk {
|
|
79
|
+
export {
|
|
80
|
+
type BulkCreateResponse as BulkCreateResponse,
|
|
81
|
+
type BulkDeleteResponse as BulkDeleteResponse,
|
|
82
|
+
type BulkCreateParams as BulkCreateParams,
|
|
83
|
+
type BulkDeleteParams as BulkDeleteParams,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as BulkAPI from './bulk';
|
|
5
|
+
import { Bulk, BulkCreateParams, BulkCreateResponse, BulkDeleteParams, BulkDeleteResponse } from './bulk';
|
|
6
|
+
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
+
import { path } from '../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Contacts extends APIResource {
|
|
11
|
+
bulk: BulkAPI.Bulk = new BulkAPI.Bulk(this._client);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create a new contact or update existing if update_if_exists is true
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const contact = await client.contacts.create({
|
|
19
|
+
* number: 'number',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body: ContactCreateParams, options?: RequestOptions): APIPromise<ContactCreateResponse> {
|
|
24
|
+
return this._client.post('/api/v2/contacts', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a specific contact by phone number
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const contact = await client.contacts.retrieve(
|
|
33
|
+
* '+1234567890',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<ContactRetrieveResponse> {
|
|
38
|
+
return this._client.get(path`/api/v2/contacts/${phoneNumber}`, options);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Update an existing contact
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const contact = await client.contacts.update('+1234567890');
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
update(
|
|
50
|
+
phoneNumber: string,
|
|
51
|
+
body: ContactUpdateParams,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): APIPromise<ContactUpdateResponse> {
|
|
54
|
+
return this._client.put(path`/api/v2/contacts/${phoneNumber}`, { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Retrieve a list of contacts for the authenticated account
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const contacts = await client.contacts.list();
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
list(
|
|
66
|
+
query: ContactListParams | null | undefined = {},
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): APIPromise<ContactListResponse> {
|
|
69
|
+
return this._client.get('/api/v2/contacts', { query, ...options });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Delete a specific contact
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const contact = await client.contacts.delete('+1234567890');
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
delete(phoneNumber: string, options?: RequestOptions): APIPromise<ContactDeleteResponse> {
|
|
81
|
+
return this._client.delete(path`/api/v2/contacts/${phoneNumber}`, options);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Get the total number of contacts
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const response = await client.contacts.count();
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
count(options?: RequestOptions): APIPromise<ContactCountResponse> {
|
|
93
|
+
return this._client.get('/api/v2/contacts/count', options);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Send a verification message to a contact
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const response = await client.contacts.verify({
|
|
102
|
+
* number: 'number',
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
verify(body: ContactVerifyParams, options?: RequestOptions): APIPromise<ContactVerifyResponse> {
|
|
107
|
+
return this._client.post('/api/v2/contacts/verify', { body, ...options });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface Contact {
|
|
112
|
+
/**
|
|
113
|
+
* Email of assigned user
|
|
114
|
+
*/
|
|
115
|
+
assignedToEmail?: string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Company name
|
|
119
|
+
*/
|
|
120
|
+
companyName?: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* When the contact was created
|
|
124
|
+
*/
|
|
125
|
+
created_at?: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* First name
|
|
129
|
+
*/
|
|
130
|
+
firstName?: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Last name
|
|
134
|
+
*/
|
|
135
|
+
lastName?: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Phone number in E.164 format
|
|
139
|
+
*/
|
|
140
|
+
phone?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Associated Sendblue phone number
|
|
144
|
+
*/
|
|
145
|
+
sendblueNumber?: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Tags associated with the contact
|
|
149
|
+
*/
|
|
150
|
+
tags?: Array<string>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Whether the contact is verified
|
|
154
|
+
*/
|
|
155
|
+
verified?: boolean;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface ContactCreateResponse {
|
|
159
|
+
contact?: Contact;
|
|
160
|
+
|
|
161
|
+
status?: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface ContactRetrieveResponse {
|
|
165
|
+
contact?: Contact;
|
|
166
|
+
|
|
167
|
+
status?: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface ContactUpdateResponse {
|
|
171
|
+
contact?: Contact;
|
|
172
|
+
|
|
173
|
+
status?: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type ContactListResponse = Array<Contact>;
|
|
177
|
+
|
|
178
|
+
export interface ContactDeleteResponse {
|
|
179
|
+
status?: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface ContactCountResponse {
|
|
183
|
+
/**
|
|
184
|
+
* Total number of contacts
|
|
185
|
+
*/
|
|
186
|
+
count?: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface ContactVerifyResponse {
|
|
190
|
+
status?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface ContactCreateParams {
|
|
194
|
+
/**
|
|
195
|
+
* Contact's phone number in E.164 format
|
|
196
|
+
*/
|
|
197
|
+
number: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Email of assigned user
|
|
201
|
+
*/
|
|
202
|
+
assigned_to_email?: string;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Email of assigned user (alternative)
|
|
206
|
+
*/
|
|
207
|
+
assignedToEmail?: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Contact's first name
|
|
211
|
+
*/
|
|
212
|
+
first_name?: string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Contact's first name (alternative)
|
|
216
|
+
*/
|
|
217
|
+
firstName?: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Contact's last name
|
|
221
|
+
*/
|
|
222
|
+
last_name?: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Contact's last name (alternative)
|
|
226
|
+
*/
|
|
227
|
+
lastName?: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Contact's phone number (alternative)
|
|
231
|
+
*/
|
|
232
|
+
phone_number?: string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Contact's phone number (alternative)
|
|
236
|
+
*/
|
|
237
|
+
phoneNumber?: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Associated Sendblue phone number
|
|
241
|
+
*/
|
|
242
|
+
sendblue_number?: string;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Associated Sendblue phone number (alternative)
|
|
246
|
+
*/
|
|
247
|
+
sendblueNumber?: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Tags for the contact
|
|
251
|
+
*/
|
|
252
|
+
tags?: Array<string>;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* If true, updates the contact if it already exists
|
|
256
|
+
*/
|
|
257
|
+
update_if_exists?: boolean;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface ContactUpdateParams {
|
|
261
|
+
assignedToEmail?: string;
|
|
262
|
+
|
|
263
|
+
companyName?: string;
|
|
264
|
+
|
|
265
|
+
firstName?: string;
|
|
266
|
+
|
|
267
|
+
lastName?: string;
|
|
268
|
+
|
|
269
|
+
sendblueNumber?: string;
|
|
270
|
+
|
|
271
|
+
tags?: Array<string>;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface ContactListParams {
|
|
275
|
+
/**
|
|
276
|
+
* Filter by contact ID
|
|
277
|
+
*/
|
|
278
|
+
cid?: string;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Maximum number of contacts to return
|
|
282
|
+
*/
|
|
283
|
+
limit?: number;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Number of contacts to skip
|
|
287
|
+
*/
|
|
288
|
+
offset?: number;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Field to sort by
|
|
292
|
+
*/
|
|
293
|
+
order_by?: string;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Sort direction
|
|
297
|
+
*/
|
|
298
|
+
order_direction?: 'asc' | 'desc';
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Filter by phone number
|
|
302
|
+
*/
|
|
303
|
+
phone_number?: string;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface ContactVerifyParams {
|
|
307
|
+
/**
|
|
308
|
+
* Phone number to verify
|
|
309
|
+
*/
|
|
310
|
+
number: string;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
Contacts.Bulk = Bulk;
|
|
314
|
+
|
|
315
|
+
export declare namespace Contacts {
|
|
316
|
+
export {
|
|
317
|
+
type Contact as Contact,
|
|
318
|
+
type ContactCreateResponse as ContactCreateResponse,
|
|
319
|
+
type ContactRetrieveResponse as ContactRetrieveResponse,
|
|
320
|
+
type ContactUpdateResponse as ContactUpdateResponse,
|
|
321
|
+
type ContactListResponse as ContactListResponse,
|
|
322
|
+
type ContactDeleteResponse as ContactDeleteResponse,
|
|
323
|
+
type ContactCountResponse as ContactCountResponse,
|
|
324
|
+
type ContactVerifyResponse as ContactVerifyResponse,
|
|
325
|
+
type ContactCreateParams as ContactCreateParams,
|
|
326
|
+
type ContactUpdateParams as ContactUpdateParams,
|
|
327
|
+
type ContactListParams as ContactListParams,
|
|
328
|
+
type ContactVerifyParams as ContactVerifyParams,
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
export {
|
|
332
|
+
Bulk as Bulk,
|
|
333
|
+
type BulkCreateResponse as BulkCreateResponse,
|
|
334
|
+
type BulkDeleteResponse as BulkDeleteResponse,
|
|
335
|
+
type BulkCreateParams as BulkCreateParams,
|
|
336
|
+
type BulkDeleteParams as BulkDeleteParams,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Bulk,
|
|
5
|
+
type BulkCreateResponse,
|
|
6
|
+
type BulkDeleteResponse,
|
|
7
|
+
type BulkCreateParams,
|
|
8
|
+
type BulkDeleteParams,
|
|
9
|
+
} from './bulk';
|
|
10
|
+
export {
|
|
11
|
+
Contacts,
|
|
12
|
+
type Contact,
|
|
13
|
+
type ContactCreateResponse,
|
|
14
|
+
type ContactRetrieveResponse,
|
|
15
|
+
type ContactUpdateResponse,
|
|
16
|
+
type ContactListResponse,
|
|
17
|
+
type ContactDeleteResponse,
|
|
18
|
+
type ContactCountResponse,
|
|
19
|
+
type ContactVerifyResponse,
|
|
20
|
+
type ContactCreateParams,
|
|
21
|
+
type ContactUpdateParams,
|
|
22
|
+
type ContactListParams,
|
|
23
|
+
type ContactVerifyParams,
|
|
24
|
+
} from './contacts';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as MessagesAPI from './messages';
|
|
5
|
+
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
|
|
8
|
+
export class Groups extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Add or manage participants in a group chat (beta feature)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response = await client.groups.modify({
|
|
15
|
+
* group_id: 'group_123456',
|
|
16
|
+
* modify_type: 'add_recipient',
|
|
17
|
+
* number: '+19998887777',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
modify(body: GroupModifyParams, options?: RequestOptions): APIPromise<GroupModifyResponse> {
|
|
22
|
+
return this._client.post('/api/modify-group', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Send a message to a group of recipients (beta feature)
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const messageResponse = await client.groups.sendMessage({
|
|
31
|
+
* content: 'Hello, everyone!',
|
|
32
|
+
* from_number: '+19998887777',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
sendMessage(
|
|
37
|
+
body: GroupSendMessageParams,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<MessagesAPI.MessageResponse> {
|
|
40
|
+
return this._client.post('/api/send-group-message', { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface GroupModifyResponse {
|
|
45
|
+
message?: string;
|
|
46
|
+
|
|
47
|
+
status?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface GroupModifyParams {
|
|
51
|
+
/**
|
|
52
|
+
* Group identifier
|
|
53
|
+
*/
|
|
54
|
+
group_id: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Type of modification to perform
|
|
58
|
+
*/
|
|
59
|
+
modify_type: 'add_recipient';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Phone number to add/modify in E.164 format
|
|
63
|
+
*/
|
|
64
|
+
number: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface GroupSendMessageParams {
|
|
68
|
+
/**
|
|
69
|
+
* Message text content
|
|
70
|
+
*/
|
|
71
|
+
content: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* **REQUIRED** - The phone number to send from. Must be one of your registered
|
|
75
|
+
* Sendblue phone numbers in E.164 format. Without this parameter, the message will
|
|
76
|
+
* fail to send.
|
|
77
|
+
*/
|
|
78
|
+
from_number: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Unique identifier for an existing group
|
|
82
|
+
*/
|
|
83
|
+
group_id?: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* URL of media file to send
|
|
87
|
+
*/
|
|
88
|
+
media_url?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Array of recipient phone numbers in E.164 format
|
|
92
|
+
*/
|
|
93
|
+
numbers?: Array<string>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare namespace Groups {
|
|
97
|
+
export {
|
|
98
|
+
type GroupModifyResponse as GroupModifyResponse,
|
|
99
|
+
type GroupModifyParams as GroupModifyParams,
|
|
100
|
+
type GroupSendMessageParams as GroupSendMessageParams,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Contacts,
|
|
5
|
+
type Contact,
|
|
6
|
+
type ContactCreateResponse,
|
|
7
|
+
type ContactRetrieveResponse,
|
|
8
|
+
type ContactUpdateResponse,
|
|
9
|
+
type ContactListResponse,
|
|
10
|
+
type ContactDeleteResponse,
|
|
11
|
+
type ContactCountResponse,
|
|
12
|
+
type ContactVerifyResponse,
|
|
13
|
+
type ContactCreateParams,
|
|
14
|
+
type ContactUpdateParams,
|
|
15
|
+
type ContactListParams,
|
|
16
|
+
type ContactVerifyParams,
|
|
17
|
+
} from './contacts/contacts';
|
|
18
|
+
export {
|
|
19
|
+
Groups,
|
|
20
|
+
type GroupModifyResponse,
|
|
21
|
+
type GroupModifyParams,
|
|
22
|
+
type GroupSendMessageParams,
|
|
23
|
+
} from './groups';
|
|
24
|
+
export { Lookups, type LookupLookupNumberResponse, type LookupLookupNumberParams } from './lookups';
|
|
25
|
+
export { MediaObjects, type MediaObjectUploadResponse, type MediaObjectUploadParams } from './media-objects';
|
|
26
|
+
export {
|
|
27
|
+
Messages,
|
|
28
|
+
type MessageContent,
|
|
29
|
+
type MessageResponse,
|
|
30
|
+
type MessageRetrieveResponse,
|
|
31
|
+
type MessageListResponse,
|
|
32
|
+
type MessageListParams,
|
|
33
|
+
type MessageGetStatusParams,
|
|
34
|
+
type MessageSendParams,
|
|
35
|
+
} from './messages';
|
|
36
|
+
export {
|
|
37
|
+
TypingIndicators,
|
|
38
|
+
type TypingIndicatorSendResponse,
|
|
39
|
+
type TypingIndicatorSendParams,
|
|
40
|
+
} from './typing-indicators';
|
|
@@ -0,0 +1,44 @@
|
|
|
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 Lookups extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Determine if a phone number supports iMessage or SMS. Useful for checking if a
|
|
10
|
+
* number is an iPhone, if it is real, or which provider to use.
|
|
11
|
+
*/
|
|
12
|
+
lookupNumber(
|
|
13
|
+
query: LookupLookupNumberParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): APIPromise<LookupLookupNumberResponse> {
|
|
16
|
+
return this._client.get('/api/evaluate-service', { query, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface LookupLookupNumberResponse {
|
|
21
|
+
/**
|
|
22
|
+
* The number you evaluated in E.164 format
|
|
23
|
+
*/
|
|
24
|
+
number?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The service the number supports
|
|
28
|
+
*/
|
|
29
|
+
service?: 'iMessage' | 'SMS';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface LookupLookupNumberParams {
|
|
33
|
+
/**
|
|
34
|
+
* The number you want to evaluate in E.164 format
|
|
35
|
+
*/
|
|
36
|
+
number: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare namespace Lookups {
|
|
40
|
+
export {
|
|
41
|
+
type LookupLookupNumberResponse as LookupLookupNumberResponse,
|
|
42
|
+
type LookupLookupNumberParams as LookupLookupNumberParams,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 MediaObjects extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Upload a media file to Sendblue's CDN for use in messages
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.mediaObjects.upload({
|
|
14
|
+
* media_url: 'https://example.com/image.jpg',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
upload(body: MediaObjectUploadParams, options?: RequestOptions): APIPromise<MediaObjectUploadResponse> {
|
|
19
|
+
return this._client.post('/api/upload-media-object', { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface MediaObjectUploadResponse {
|
|
24
|
+
mediaObjectId?: string;
|
|
25
|
+
|
|
26
|
+
message?: string;
|
|
27
|
+
|
|
28
|
+
status?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface MediaObjectUploadParams {
|
|
32
|
+
/**
|
|
33
|
+
* URL of the media file to upload
|
|
34
|
+
*/
|
|
35
|
+
media_url: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export declare namespace MediaObjects {
|
|
39
|
+
export {
|
|
40
|
+
type MediaObjectUploadResponse as MediaObjectUploadResponse,
|
|
41
|
+
type MediaObjectUploadParams as MediaObjectUploadParams,
|
|
42
|
+
};
|
|
43
|
+
}
|