@zavudev/sdk 0.30.0 → 0.38.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 +124 -0
- package/client.d.mts +28 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +28 -4
- package/client.d.ts.map +1 -1
- package/client.js +25 -1
- package/client.js.map +1 -1
- package/client.mjs +25 -1
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/balance.d.mts +33 -0
- package/resources/balance.d.mts.map +1 -0
- package/resources/balance.d.ts +33 -0
- package/resources/balance.d.ts.map +1 -0
- package/resources/balance.js +16 -0
- package/resources/balance.js.map +1 -0
- package/resources/balance.mjs +12 -0
- package/resources/balance.mjs.map +1 -0
- package/resources/broadcasts/broadcasts.d.mts +31 -1
- package/resources/broadcasts/broadcasts.d.mts.map +1 -1
- package/resources/broadcasts/broadcasts.d.ts +31 -1
- package/resources/broadcasts/broadcasts.d.ts.map +1 -1
- package/resources/broadcasts/broadcasts.js +28 -0
- package/resources/broadcasts/broadcasts.js.map +1 -1
- package/resources/broadcasts/broadcasts.mjs +28 -0
- package/resources/broadcasts/broadcasts.mjs.map +1 -1
- package/resources/broadcasts/index.d.mts +1 -1
- package/resources/broadcasts/index.d.mts.map +1 -1
- package/resources/broadcasts/index.d.ts +1 -1
- package/resources/broadcasts/index.d.ts.map +1 -1
- package/resources/broadcasts/index.js.map +1 -1
- package/resources/broadcasts/index.mjs.map +1 -1
- package/resources/contacts/channels.d.mts +127 -0
- package/resources/contacts/channels.d.mts.map +1 -0
- package/resources/contacts/channels.d.ts +127 -0
- package/resources/contacts/channels.d.ts.map +1 -0
- package/resources/contacts/channels.js +76 -0
- package/resources/contacts/channels.js.map +1 -0
- package/resources/contacts/channels.mjs +72 -0
- package/resources/contacts/channels.mjs.map +1 -0
- package/resources/contacts/contacts.d.mts +262 -0
- package/resources/contacts/contacts.d.mts.map +1 -0
- package/resources/contacts/contacts.d.ts +262 -0
- package/resources/contacts/contacts.d.ts.map +1 -0
- package/resources/contacts/contacts.js +118 -0
- package/resources/contacts/contacts.js.map +1 -0
- package/resources/contacts/contacts.mjs +113 -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 +1 -144
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +1 -144
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +2 -31
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +1 -29
- package/resources/contacts.mjs.map +1 -1
- package/resources/exports.d.mts +101 -0
- package/resources/exports.d.mts.map +1 -0
- package/resources/exports.d.ts +101 -0
- package/resources/exports.d.ts.map +1 -0
- package/resources/exports.js +53 -0
- package/resources/exports.js.map +1 -0
- package/resources/exports.mjs +49 -0
- package/resources/exports.mjs.map +1 -0
- package/resources/index.d.mts +10 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +18 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +9 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invitations.d.mts +133 -0
- package/resources/invitations.d.mts.map +1 -0
- package/resources/invitations.d.ts +133 -0
- package/resources/invitations.d.ts.map +1 -0
- package/resources/invitations.js +67 -0
- package/resources/invitations.js.map +1 -0
- package/resources/invitations.mjs +63 -0
- package/resources/invitations.mjs.map +1 -0
- package/resources/messages.d.mts +37 -4
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +37 -4
- package/resources/messages.d.ts.map +1 -1
- package/resources/number-10dlc/brands.d.mts +258 -0
- package/resources/number-10dlc/brands.d.mts.map +1 -0
- package/resources/number-10dlc/brands.d.ts +258 -0
- package/resources/number-10dlc/brands.d.ts.map +1 -0
- package/resources/number-10dlc/brands.js +132 -0
- package/resources/number-10dlc/brands.js.map +1 -0
- package/resources/number-10dlc/brands.mjs +128 -0
- package/resources/number-10dlc/brands.mjs.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.d.mts +223 -0
- package/resources/number-10dlc/campaigns/campaigns.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.d.ts +223 -0
- package/resources/number-10dlc/campaigns/campaigns.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.js +133 -0
- package/resources/number-10dlc/campaigns/campaigns.js.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.mjs +128 -0
- package/resources/number-10dlc/campaigns/campaigns.mjs.map +1 -0
- package/resources/number-10dlc/campaigns/index.d.mts +3 -0
- package/resources/number-10dlc/campaigns/index.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns/index.d.ts +3 -0
- package/resources/number-10dlc/campaigns/index.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns/index.js +9 -0
- package/resources/number-10dlc/campaigns/index.js.map +1 -0
- package/resources/number-10dlc/campaigns/index.mjs +4 -0
- package/resources/number-10dlc/campaigns/index.mjs.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.mts +79 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.ts +79 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.js +59 -0
- package/resources/number-10dlc/campaigns/phone-numbers.js.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.mjs +55 -0
- package/resources/number-10dlc/campaigns/phone-numbers.mjs.map +1 -0
- package/resources/number-10dlc/campaigns.d.mts +2 -0
- package/resources/number-10dlc/campaigns.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns.d.ts +2 -0
- package/resources/number-10dlc/campaigns.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns.js +6 -0
- package/resources/number-10dlc/campaigns.js.map +1 -0
- package/resources/number-10dlc/campaigns.mjs +3 -0
- package/resources/number-10dlc/campaigns.mjs.map +1 -0
- package/resources/number-10dlc/index.d.mts +4 -0
- package/resources/number-10dlc/index.d.mts.map +1 -0
- package/resources/number-10dlc/index.d.ts +4 -0
- package/resources/number-10dlc/index.d.ts.map +1 -0
- package/resources/number-10dlc/index.js +11 -0
- package/resources/number-10dlc/index.js.map +1 -0
- package/resources/number-10dlc/index.mjs +5 -0
- package/resources/number-10dlc/index.mjs.map +1 -0
- package/resources/number-10dlc/number-10dlc.d.mts +14 -0
- package/resources/number-10dlc/number-10dlc.d.mts.map +1 -0
- package/resources/number-10dlc/number-10dlc.d.ts +14 -0
- package/resources/number-10dlc/number-10dlc.d.ts.map +1 -0
- package/resources/number-10dlc/number-10dlc.js +21 -0
- package/resources/number-10dlc/number-10dlc.js.map +1 -0
- package/resources/number-10dlc/number-10dlc.mjs +16 -0
- package/resources/number-10dlc/number-10dlc.mjs.map +1 -0
- package/resources/number-10dlc.d.mts +2 -0
- package/resources/number-10dlc.d.mts.map +1 -0
- package/resources/number-10dlc.d.ts +2 -0
- package/resources/number-10dlc.d.ts.map +1 -0
- package/resources/number-10dlc.js +6 -0
- package/resources/number-10dlc.js.map +1 -0
- package/resources/number-10dlc.mjs +3 -0
- package/resources/number-10dlc.mjs.map +1 -0
- package/resources/plan.d.mts +43 -0
- package/resources/plan.d.mts.map +1 -0
- package/resources/plan.d.ts +43 -0
- package/resources/plan.d.ts.map +1 -0
- package/resources/plan.js +16 -0
- package/resources/plan.js.map +1 -0
- package/resources/plan.mjs +12 -0
- package/resources/plan.mjs.map +1 -0
- package/resources/senders/agent/agent.d.mts +4 -4
- package/resources/senders/agent/agent.d.mts.map +1 -1
- package/resources/senders/agent/agent.d.ts +4 -4
- package/resources/senders/agent/agent.d.ts.map +1 -1
- package/resources/senders/agent/agent.js.map +1 -1
- package/resources/senders/agent/agent.mjs.map +1 -1
- package/resources/senders/agent/flows.d.mts +40 -114
- package/resources/senders/agent/flows.d.mts.map +1 -1
- package/resources/senders/agent/flows.d.ts +40 -114
- package/resources/senders/agent/flows.d.ts.map +1 -1
- package/resources/senders/agent/index.d.mts +2 -2
- package/resources/senders/agent/index.d.mts.map +1 -1
- package/resources/senders/agent/index.d.ts +2 -2
- package/resources/senders/agent/index.d.ts.map +1 -1
- package/resources/senders/agent/index.js.map +1 -1
- package/resources/senders/agent/index.mjs.map +1 -1
- package/resources/senders/agent/tools.d.mts +15 -47
- package/resources/senders/agent/tools.d.mts.map +1 -1
- package/resources/senders/agent/tools.d.ts +15 -47
- package/resources/senders/agent/tools.d.ts.map +1 -1
- package/resources/senders/index.d.mts +1 -0
- package/resources/senders/index.d.mts.map +1 -1
- package/resources/senders/index.d.ts +1 -0
- package/resources/senders/index.d.ts.map +1 -1
- package/resources/senders/index.js +3 -1
- package/resources/senders/index.js.map +1 -1
- package/resources/senders/index.mjs +1 -0
- package/resources/senders/index.mjs.map +1 -1
- package/resources/senders/senders.d.mts +17 -1
- package/resources/senders/senders.d.mts.map +1 -1
- package/resources/senders/senders.d.ts +17 -1
- package/resources/senders/senders.d.ts.map +1 -1
- package/resources/senders/senders.js +4 -0
- package/resources/senders/senders.js.map +1 -1
- package/resources/senders/senders.mjs +4 -0
- package/resources/senders/senders.mjs.map +1 -1
- package/resources/senders/whatsapp-sync.d.mts +134 -0
- package/resources/senders/whatsapp-sync.d.mts.map +1 -0
- package/resources/senders/whatsapp-sync.d.ts +134 -0
- package/resources/senders/whatsapp-sync.d.ts.map +1 -0
- package/resources/senders/whatsapp-sync.js +56 -0
- package/resources/senders/whatsapp-sync.js.map +1 -0
- package/resources/senders/whatsapp-sync.mjs +52 -0
- package/resources/senders/whatsapp-sync.mjs.map +1 -0
- package/resources/sub-accounts/api-keys.d.mts +85 -0
- package/resources/sub-accounts/api-keys.d.mts.map +1 -0
- package/resources/sub-accounts/api-keys.d.ts +85 -0
- package/resources/sub-accounts/api-keys.d.ts.map +1 -0
- package/resources/sub-accounts/api-keys.js +53 -0
- package/resources/sub-accounts/api-keys.js.map +1 -0
- package/resources/sub-accounts/api-keys.mjs +49 -0
- package/resources/sub-accounts/api-keys.mjs.map +1 -0
- package/resources/sub-accounts/index.d.mts +3 -0
- package/resources/sub-accounts/index.d.mts.map +1 -0
- package/resources/sub-accounts/index.d.ts +3 -0
- package/resources/sub-accounts/index.d.ts.map +1 -0
- package/resources/sub-accounts/index.js +9 -0
- package/resources/sub-accounts/index.js.map +1 -0
- package/resources/sub-accounts/index.mjs +4 -0
- package/resources/sub-accounts/index.mjs.map +1 -0
- package/resources/sub-accounts/sub-accounts.d.mts +168 -0
- package/resources/sub-accounts/sub-accounts.d.mts.map +1 -0
- package/resources/sub-accounts/sub-accounts.d.ts +168 -0
- package/resources/sub-accounts/sub-accounts.d.ts.map +1 -0
- package/resources/sub-accounts/sub-accounts.js +94 -0
- package/resources/sub-accounts/sub-accounts.js.map +1 -0
- package/resources/sub-accounts/sub-accounts.mjs +89 -0
- package/resources/sub-accounts/sub-accounts.mjs.map +1 -0
- package/resources/sub-accounts.d.mts +2 -0
- package/resources/sub-accounts.d.mts.map +1 -0
- package/resources/sub-accounts.d.ts +2 -0
- package/resources/sub-accounts.d.ts.map +1 -0
- package/resources/sub-accounts.js +6 -0
- package/resources/sub-accounts.js.map +1 -0
- package/resources/sub-accounts.mjs +3 -0
- package/resources/sub-accounts.mjs.map +1 -0
- package/resources/templates.d.mts +42 -2
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +42 -2
- package/resources/templates.d.ts.map +1 -1
- package/resources/urls.d.mts +88 -0
- package/resources/urls.d.mts.map +1 -0
- package/resources/urls.d.ts +88 -0
- package/resources/urls.d.ts.map +1 -0
- package/resources/urls.js +55 -0
- package/resources/urls.js.map +1 -0
- package/resources/urls.mjs +51 -0
- package/resources/urls.mjs.map +1 -0
- package/resources/usage.d.mts +36 -0
- package/resources/usage.d.mts.map +1 -0
- package/resources/usage.d.ts +36 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +16 -0
- package/resources/usage.js.map +1 -0
- package/resources/usage.mjs +12 -0
- package/resources/usage.mjs.map +1 -0
- package/src/client.ts +130 -6
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/balance.ts +43 -0
- package/src/resources/broadcasts/broadcasts.ts +40 -0
- package/src/resources/broadcasts/index.ts +2 -0
- package/src/resources/contacts/channels.ts +177 -0
- package/src/resources/contacts/contacts.ts +360 -0
- package/src/resources/contacts/index.ts +22 -0
- package/src/resources/contacts.ts +1 -196
- package/src/resources/exports.ts +141 -0
- package/src/resources/index.ts +51 -1
- package/src/resources/invitations.ts +188 -0
- package/src/resources/messages.ts +43 -3
- package/src/resources/number-10dlc/brands.ts +377 -0
- package/src/resources/number-10dlc/campaigns/campaigns.ts +349 -0
- package/src/resources/number-10dlc/campaigns/index.ts +23 -0
- package/src/resources/number-10dlc/campaigns/phone-numbers.ts +123 -0
- package/src/resources/number-10dlc/campaigns.ts +3 -0
- package/src/resources/number-10dlc/index.ts +30 -0
- package/src/resources/number-10dlc/number-10dlc.ts +71 -0
- package/src/resources/number-10dlc.ts +3 -0
- package/src/resources/plan.ts +62 -0
- package/src/resources/senders/agent/agent.ts +6 -0
- package/src/resources/senders/agent/flows.ts +44 -126
- package/src/resources/senders/agent/index.ts +3 -0
- package/src/resources/senders/agent/tools.ts +13 -50
- package/src/resources/senders/index.ts +9 -0
- package/src/resources/senders/senders.ts +38 -1
- package/src/resources/senders/whatsapp-sync.ts +175 -0
- package/src/resources/sub-accounts/api-keys.ts +126 -0
- package/src/resources/sub-accounts/index.ts +22 -0
- package/src/resources/sub-accounts/sub-accounts.ts +246 -0
- package/src/resources/sub-accounts.ts +3 -0
- package/src/resources/templates.ts +51 -2
- package/src/resources/urls.ts +125 -0
- package/src/resources/usage.ts +48 -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
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
export declare class Brands extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a 10DLC brand registration. The brand starts in draft status. Submit it
|
|
8
|
+
* for review using the submit endpoint.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const brand = await client.number10dlc.brands.create({
|
|
13
|
+
* city: 'San Francisco',
|
|
14
|
+
* country: 'US',
|
|
15
|
+
* displayName: 'Acme Corp',
|
|
16
|
+
* email: 'compliance@acme.com',
|
|
17
|
+
* entityType: 'PRIVATE_PROFIT',
|
|
18
|
+
* phone: '+14155551234',
|
|
19
|
+
* postalCode: '94102',
|
|
20
|
+
* state: 'CA',
|
|
21
|
+
* street: '123 Main St',
|
|
22
|
+
* vertical: 'Technology',
|
|
23
|
+
* companyName: 'Acme Corporation',
|
|
24
|
+
* ein: '12-3456789',
|
|
25
|
+
* website: 'https://acme.com',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
create(body: BrandCreateParams, options?: RequestOptions): APIPromise<BrandCreateResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Get 10DLC brand
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const brand = await client.number10dlc.brands.retrieve(
|
|
36
|
+
* 'brandId',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
retrieve(brandID: string, options?: RequestOptions): APIPromise<BrandRetrieveResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Update a 10DLC brand in draft status. Cannot update after submission.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const brand = await client.number10dlc.brands.update(
|
|
47
|
+
* 'brandId',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
update(brandID: string, body: BrandUpdateParams, options?: RequestOptions): APIPromise<BrandUpdateResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* List 10DLC brand registrations for this project.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* // Automatically fetches more pages as needed.
|
|
58
|
+
* for await (const tenDlcBrand of client.number10dlc.brands.list()) {
|
|
59
|
+
* // ...
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
list(query?: BrandListParams | null | undefined, options?: RequestOptions): PagePromise<TenDlcBrandsCursor, TenDlcBrand>;
|
|
64
|
+
/**
|
|
65
|
+
* Delete 10DLC brand
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* await client.number10dlc.brands.delete('brandId');
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
delete(brandID: string, options?: RequestOptions): APIPromise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* List available use cases for 10DLC campaign registration.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const response =
|
|
79
|
+
* await client.number10dlc.brands.listUseCases();
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
listUseCases(options?: RequestOptions): APIPromise<BrandListUseCasesResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* Submit a draft brand to The Campaign Registry (TCR) for vetting. The brand must
|
|
85
|
+
* be in draft status. A $35 registration fee is charged from your balance.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const response = await client.number10dlc.brands.submit(
|
|
90
|
+
* 'brandId',
|
|
91
|
+
* );
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
submit(brandID: string, options?: RequestOptions): APIPromise<BrandSubmitResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* Sync the brand status with the registration provider. Use this to check for
|
|
97
|
+
* approval updates after submission.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const response = await client.number10dlc.brands.syncStatus(
|
|
102
|
+
* 'brandId',
|
|
103
|
+
* );
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
syncStatus(brandID: string, options?: RequestOptions): APIPromise<BrandSyncStatusResponse>;
|
|
107
|
+
}
|
|
108
|
+
export type TenDlcBrandsCursor = Cursor<TenDlcBrand>;
|
|
109
|
+
export interface TenDlcBrand {
|
|
110
|
+
id: string;
|
|
111
|
+
city: string;
|
|
112
|
+
/**
|
|
113
|
+
* Two-letter ISO country code.
|
|
114
|
+
*/
|
|
115
|
+
country: string;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
/**
|
|
118
|
+
* Display name of the brand.
|
|
119
|
+
*/
|
|
120
|
+
displayName: string;
|
|
121
|
+
email: string;
|
|
122
|
+
/**
|
|
123
|
+
* Business entity type for 10DLC brand registration.
|
|
124
|
+
*/
|
|
125
|
+
entityType: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'GOVERNMENT' | 'SOLE_PROPRIETOR';
|
|
126
|
+
/**
|
|
127
|
+
* Contact phone number in E.164 format.
|
|
128
|
+
*/
|
|
129
|
+
phone: string;
|
|
130
|
+
postalCode: string;
|
|
131
|
+
state: string;
|
|
132
|
+
/**
|
|
133
|
+
* Status of a 10DLC brand registration.
|
|
134
|
+
*/
|
|
135
|
+
status: 'draft' | 'pending' | 'verified' | 'rejected';
|
|
136
|
+
street: string;
|
|
137
|
+
updatedAt: string;
|
|
138
|
+
/**
|
|
139
|
+
* Industry vertical.
|
|
140
|
+
*/
|
|
141
|
+
vertical: string;
|
|
142
|
+
brandRelationship?: string | null;
|
|
143
|
+
/**
|
|
144
|
+
* Trust score assigned by TCR after vetting.
|
|
145
|
+
*/
|
|
146
|
+
brandScore?: number | null;
|
|
147
|
+
/**
|
|
148
|
+
* Legal company name.
|
|
149
|
+
*/
|
|
150
|
+
companyName?: string | null;
|
|
151
|
+
/**
|
|
152
|
+
* Employer Identification Number (EIN).
|
|
153
|
+
*/
|
|
154
|
+
ein?: string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Reason for rejection, if applicable.
|
|
157
|
+
*/
|
|
158
|
+
failureReason?: string | null;
|
|
159
|
+
firstName?: string | null;
|
|
160
|
+
lastName?: string | null;
|
|
161
|
+
stockExchange?: string | null;
|
|
162
|
+
stockSymbol?: string | null;
|
|
163
|
+
submittedAt?: string | null;
|
|
164
|
+
verifiedAt?: string | null;
|
|
165
|
+
website?: string | null;
|
|
166
|
+
}
|
|
167
|
+
export interface BrandCreateResponse {
|
|
168
|
+
brand: TenDlcBrand;
|
|
169
|
+
}
|
|
170
|
+
export interface BrandRetrieveResponse {
|
|
171
|
+
brand: TenDlcBrand;
|
|
172
|
+
}
|
|
173
|
+
export interface BrandUpdateResponse {
|
|
174
|
+
brand: TenDlcBrand;
|
|
175
|
+
}
|
|
176
|
+
export interface BrandListUseCasesResponse {
|
|
177
|
+
useCases: Array<BrandListUseCasesResponse.UseCase>;
|
|
178
|
+
}
|
|
179
|
+
export declare namespace BrandListUseCasesResponse {
|
|
180
|
+
interface UseCase {
|
|
181
|
+
description?: string;
|
|
182
|
+
name?: string;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export interface BrandSubmitResponse {
|
|
186
|
+
brand: TenDlcBrand;
|
|
187
|
+
}
|
|
188
|
+
export interface BrandSyncStatusResponse {
|
|
189
|
+
brand: TenDlcBrand;
|
|
190
|
+
}
|
|
191
|
+
export interface BrandCreateParams {
|
|
192
|
+
city: string;
|
|
193
|
+
/**
|
|
194
|
+
* Two-letter ISO country code.
|
|
195
|
+
*/
|
|
196
|
+
country: string;
|
|
197
|
+
/**
|
|
198
|
+
* Display name of the brand.
|
|
199
|
+
*/
|
|
200
|
+
displayName: string;
|
|
201
|
+
email: string;
|
|
202
|
+
/**
|
|
203
|
+
* Business entity type for 10DLC brand registration.
|
|
204
|
+
*/
|
|
205
|
+
entityType: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'GOVERNMENT' | 'SOLE_PROPRIETOR';
|
|
206
|
+
/**
|
|
207
|
+
* Contact phone in E.164 format.
|
|
208
|
+
*/
|
|
209
|
+
phone: string;
|
|
210
|
+
postalCode: string;
|
|
211
|
+
state: string;
|
|
212
|
+
street: string;
|
|
213
|
+
/**
|
|
214
|
+
* Industry vertical.
|
|
215
|
+
*/
|
|
216
|
+
vertical: string;
|
|
217
|
+
/**
|
|
218
|
+
* Legal company name.
|
|
219
|
+
*/
|
|
220
|
+
companyName?: string;
|
|
221
|
+
/**
|
|
222
|
+
* Employer Identification Number (format: XX-XXXXXXX).
|
|
223
|
+
*/
|
|
224
|
+
ein?: string;
|
|
225
|
+
firstName?: string;
|
|
226
|
+
lastName?: string;
|
|
227
|
+
stockExchange?: string;
|
|
228
|
+
stockSymbol?: string;
|
|
229
|
+
website?: string;
|
|
230
|
+
}
|
|
231
|
+
export interface BrandUpdateParams {
|
|
232
|
+
city?: string;
|
|
233
|
+
companyName?: string;
|
|
234
|
+
country?: string;
|
|
235
|
+
displayName?: string;
|
|
236
|
+
ein?: string;
|
|
237
|
+
email?: string;
|
|
238
|
+
/**
|
|
239
|
+
* Business entity type for 10DLC brand registration.
|
|
240
|
+
*/
|
|
241
|
+
entityType?: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'GOVERNMENT' | 'SOLE_PROPRIETOR';
|
|
242
|
+
firstName?: string;
|
|
243
|
+
lastName?: string;
|
|
244
|
+
phone?: string;
|
|
245
|
+
postalCode?: string;
|
|
246
|
+
state?: string;
|
|
247
|
+
stockExchange?: string;
|
|
248
|
+
stockSymbol?: string;
|
|
249
|
+
street?: string;
|
|
250
|
+
vertical?: string;
|
|
251
|
+
website?: string;
|
|
252
|
+
}
|
|
253
|
+
export interface BrandListParams extends CursorParams {
|
|
254
|
+
}
|
|
255
|
+
export declare namespace Brands {
|
|
256
|
+
export { type TenDlcBrand as TenDlcBrand, type BrandCreateResponse as BrandCreateResponse, type BrandRetrieveResponse as BrandRetrieveResponse, type BrandUpdateResponse as BrandUpdateResponse, type BrandListUseCasesResponse as BrandListUseCasesResponse, type BrandSubmitResponse as BrandSubmitResponse, type BrandSyncStatusResponse as BrandSyncStatusResponse, type TenDlcBrandsCursor as TenDlcBrandsCursor, type BrandCreateParams as BrandCreateParams, type BrandUpdateParams as BrandUpdateParams, type BrandListParams as BrandListParams, };
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=brands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../../src/resources/number-10dlc/brands.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAE1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI1F;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAItF;;;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,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG;AAExD,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -0,0 +1,132 @@
|
|
|
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.Brands = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../internal/headers.js");
|
|
8
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
9
|
+
class Brands extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a 10DLC brand registration. The brand starts in draft status. Submit it
|
|
12
|
+
* for review using the submit endpoint.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const brand = await client.number10dlc.brands.create({
|
|
17
|
+
* city: 'San Francisco',
|
|
18
|
+
* country: 'US',
|
|
19
|
+
* displayName: 'Acme Corp',
|
|
20
|
+
* email: 'compliance@acme.com',
|
|
21
|
+
* entityType: 'PRIVATE_PROFIT',
|
|
22
|
+
* phone: '+14155551234',
|
|
23
|
+
* postalCode: '94102',
|
|
24
|
+
* state: 'CA',
|
|
25
|
+
* street: '123 Main St',
|
|
26
|
+
* vertical: 'Technology',
|
|
27
|
+
* companyName: 'Acme Corporation',
|
|
28
|
+
* ein: '12-3456789',
|
|
29
|
+
* website: 'https://acme.com',
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
create(body, options) {
|
|
34
|
+
return this._client.post('/v1/10dlc/brands', { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get 10DLC brand
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const brand = await client.number10dlc.brands.retrieve(
|
|
42
|
+
* 'brandId',
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
retrieve(brandID, options) {
|
|
47
|
+
return this._client.get((0, path_1.path) `/v1/10dlc/brands/${brandID}`, options);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update a 10DLC brand in draft status. Cannot update after submission.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const brand = await client.number10dlc.brands.update(
|
|
55
|
+
* 'brandId',
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
update(brandID, body, options) {
|
|
60
|
+
return this._client.patch((0, path_1.path) `/v1/10dlc/brands/${brandID}`, { body, ...options });
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* List 10DLC brand registrations for this project.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* // Automatically fetches more pages as needed.
|
|
68
|
+
* for await (const tenDlcBrand of client.number10dlc.brands.list()) {
|
|
69
|
+
* // ...
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
list(query = {}, options) {
|
|
74
|
+
return this._client.getAPIList('/v1/10dlc/brands', (pagination_1.Cursor), { query, ...options });
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Delete 10DLC brand
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* await client.number10dlc.brands.delete('brandId');
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
delete(brandID, options) {
|
|
85
|
+
return this._client.delete((0, path_1.path) `/v1/10dlc/brands/${brandID}`, {
|
|
86
|
+
...options,
|
|
87
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* List available use cases for 10DLC campaign registration.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response =
|
|
96
|
+
* await client.number10dlc.brands.listUseCases();
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
listUseCases(options) {
|
|
100
|
+
return this._client.get('/v1/10dlc/brands/use-cases', options);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Submit a draft brand to The Campaign Registry (TCR) for vetting. The brand must
|
|
104
|
+
* be in draft status. A $35 registration fee is charged from your balance.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* const response = await client.number10dlc.brands.submit(
|
|
109
|
+
* 'brandId',
|
|
110
|
+
* );
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
submit(brandID, options) {
|
|
114
|
+
return this._client.post((0, path_1.path) `/v1/10dlc/brands/${brandID}/submit`, options);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Sync the brand status with the registration provider. Use this to check for
|
|
118
|
+
* approval updates after submission.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* const response = await client.number10dlc.brands.syncStatus(
|
|
123
|
+
* 'brandId',
|
|
124
|
+
* );
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
syncStatus(brandID, options) {
|
|
128
|
+
return this._client.post((0, path_1.path) `/v1/10dlc/brands/${brandID}/sync`, options);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.Brands = Brands;
|
|
132
|
+
//# sourceMappingURL=brands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.js","sourceRoot":"","sources":["../../src/resources/number-10dlc/brands.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+E;AAC/E,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,OAAe,EACf,IAAuB,EACvB,OAAwB;QAExB,OAAO,I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PI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { Cursor } from "../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
5
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
+
export class Brands extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a 10DLC brand registration. The brand starts in draft status. Submit it
|
|
9
|
+
* for review using the submit endpoint.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const brand = await client.number10dlc.brands.create({
|
|
14
|
+
* city: 'San Francisco',
|
|
15
|
+
* country: 'US',
|
|
16
|
+
* displayName: 'Acme Corp',
|
|
17
|
+
* email: 'compliance@acme.com',
|
|
18
|
+
* entityType: 'PRIVATE_PROFIT',
|
|
19
|
+
* phone: '+14155551234',
|
|
20
|
+
* postalCode: '94102',
|
|
21
|
+
* state: 'CA',
|
|
22
|
+
* street: '123 Main St',
|
|
23
|
+
* vertical: 'Technology',
|
|
24
|
+
* companyName: 'Acme Corporation',
|
|
25
|
+
* ein: '12-3456789',
|
|
26
|
+
* website: 'https://acme.com',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
create(body, options) {
|
|
31
|
+
return this._client.post('/v1/10dlc/brands', { body, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get 10DLC brand
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const brand = await client.number10dlc.brands.retrieve(
|
|
39
|
+
* 'brandId',
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
retrieve(brandID, options) {
|
|
44
|
+
return this._client.get(path `/v1/10dlc/brands/${brandID}`, options);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Update a 10DLC brand in draft status. Cannot update after submission.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const brand = await client.number10dlc.brands.update(
|
|
52
|
+
* 'brandId',
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
update(brandID, body, options) {
|
|
57
|
+
return this._client.patch(path `/v1/10dlc/brands/${brandID}`, { body, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* List 10DLC brand registrations for this project.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* // Automatically fetches more pages as needed.
|
|
65
|
+
* for await (const tenDlcBrand of client.number10dlc.brands.list()) {
|
|
66
|
+
* // ...
|
|
67
|
+
* }
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
list(query = {}, options) {
|
|
71
|
+
return this._client.getAPIList('/v1/10dlc/brands', (Cursor), { query, ...options });
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Delete 10DLC brand
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* await client.number10dlc.brands.delete('brandId');
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
delete(brandID, options) {
|
|
82
|
+
return this._client.delete(path `/v1/10dlc/brands/${brandID}`, {
|
|
83
|
+
...options,
|
|
84
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* List available use cases for 10DLC campaign registration.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const response =
|
|
93
|
+
* await client.number10dlc.brands.listUseCases();
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
listUseCases(options) {
|
|
97
|
+
return this._client.get('/v1/10dlc/brands/use-cases', options);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Submit a draft brand to The Campaign Registry (TCR) for vetting. The brand must
|
|
101
|
+
* be in draft status. A $35 registration fee is charged from your balance.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const response = await client.number10dlc.brands.submit(
|
|
106
|
+
* 'brandId',
|
|
107
|
+
* );
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
submit(brandID, options) {
|
|
111
|
+
return this._client.post(path `/v1/10dlc/brands/${brandID}/submit`, options);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Sync the brand status with the registration provider. Use this to check for
|
|
115
|
+
* approval updates after submission.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const response = await client.number10dlc.brands.syncStatus(
|
|
120
|
+
* 'brandId',
|
|
121
|
+
* );
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
syncStatus(brandID, options) {
|
|
125
|
+
return this._client.post(path `/v1/10dlc/brands/${brandID}/sync`, options);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=brands.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.mjs","sourceRoot":"","sources":["../../src/resources/number-10dlc/brands.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,MAAM,EAAkC;OAC1C,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAA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