telnyx 7.17.0 → 7.19.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 +27 -0
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/lib/webhooks.d.mts +1 -1
- package/lib/webhooks.d.mts.map +1 -1
- package/lib/webhooks.d.ts +1 -1
- package/lib/webhooks.d.ts.map +1 -1
- package/lib/webhooks.js +74 -39
- package/lib/webhooks.js.map +1 -1
- package/lib/webhooks.mjs +52 -17
- package/lib/webhooks.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +6 -2
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +6 -2
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +4 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +4 -0
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/anthropic/v1.d.mts +4 -3
- package/resources/ai/anthropic/v1.d.mts.map +1 -1
- package/resources/ai/anthropic/v1.d.ts +4 -3
- package/resources/ai/anthropic/v1.d.ts.map +1 -1
- package/resources/ai/anthropic/v1.js +1 -1
- package/resources/ai/anthropic/v1.mjs +1 -1
- package/resources/ai/assistants/assistants.d.mts +124 -18
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +124 -18
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/chat.d.mts +8 -0
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +8 -0
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/collections/collections.d.mts +1 -102
- package/resources/ai/collections/collections.d.mts.map +1 -1
- package/resources/ai/collections/collections.d.ts +1 -102
- package/resources/ai/collections/collections.d.ts.map +1 -1
- package/resources/ai/collections/collections.js +0 -44
- package/resources/ai/collections/collections.js.map +1 -1
- package/resources/ai/collections/collections.mjs +0 -44
- package/resources/ai/collections/collections.mjs.map +1 -1
- package/resources/ai/collections/index.d.mts +1 -1
- package/resources/ai/collections/index.d.mts.map +1 -1
- package/resources/ai/collections/index.d.ts +1 -1
- package/resources/ai/collections/index.d.ts.map +1 -1
- package/resources/ai/collections/index.js.map +1 -1
- package/resources/ai/collections/index.mjs.map +1 -1
- package/resources/ai/collections/settings.d.mts +4 -1
- package/resources/ai/collections/settings.d.mts.map +1 -1
- package/resources/ai/collections/settings.d.ts +4 -1
- package/resources/ai/collections/settings.d.ts.map +1 -1
- package/resources/ai/index.d.mts +2 -1
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -1
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +7 -5
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +1 -0
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/knowledge/collections.d.mts +140 -0
- package/resources/ai/knowledge/collections.d.mts.map +1 -0
- package/resources/ai/knowledge/collections.d.ts +140 -0
- package/resources/ai/knowledge/collections.d.ts.map +1 -0
- package/resources/ai/knowledge/collections.js +58 -0
- package/resources/ai/knowledge/collections.js.map +1 -0
- package/resources/ai/knowledge/collections.mjs +54 -0
- package/resources/ai/knowledge/collections.mjs.map +1 -0
- package/resources/ai/knowledge/index.d.mts +3 -0
- package/resources/ai/knowledge/index.d.mts.map +1 -0
- package/resources/ai/knowledge/index.d.ts +3 -0
- package/resources/ai/knowledge/index.d.ts.map +1 -0
- package/resources/ai/knowledge/index.js +9 -0
- package/resources/ai/knowledge/index.js.map +1 -0
- package/resources/ai/knowledge/index.mjs +4 -0
- package/resources/ai/knowledge/index.mjs.map +1 -0
- package/resources/ai/knowledge/knowledge.d.mts +10 -0
- package/resources/ai/knowledge/knowledge.d.mts.map +1 -0
- package/resources/ai/knowledge/knowledge.d.ts +10 -0
- package/resources/ai/knowledge/knowledge.d.ts.map +1 -0
- package/resources/ai/knowledge/knowledge.js +17 -0
- package/resources/ai/knowledge/knowledge.js.map +1 -0
- package/resources/ai/knowledge/knowledge.mjs +12 -0
- package/resources/ai/knowledge/knowledge.mjs.map +1 -0
- package/resources/ai/knowledge.d.mts +2 -0
- package/resources/ai/knowledge.d.mts.map +1 -0
- package/resources/ai/knowledge.d.ts +2 -0
- package/resources/ai/knowledge.d.ts.map +1 -0
- package/resources/ai/knowledge.js +6 -0
- package/resources/ai/knowledge.js.map +1 -0
- package/resources/ai/knowledge.mjs +3 -0
- package/resources/ai/knowledge.mjs.map +1 -0
- package/resources/ai/openai/chat.d.mts +8 -0
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +8 -0
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/openai/openai.d.mts +10 -0
- package/resources/ai/openai/openai.d.mts.map +1 -1
- package/resources/ai/openai/openai.d.ts +10 -0
- package/resources/ai/openai/openai.d.ts.map +1 -1
- package/resources/ai/openai/openai.js.map +1 -1
- package/resources/ai/openai/openai.mjs.map +1 -1
- package/resources/calls/actions.d.mts +35 -12
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +35 -12
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +2 -2
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +2 -2
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +1 -1
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +1 -1
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/conferences/actions.d.mts +3 -1
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +3 -1
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/credential-connections/credential-connections.d.mts +2 -2
- package/resources/credential-connections/credential-connections.d.ts +2 -2
- package/resources/external-requirements/external-requirements.d.mts +10 -0
- package/resources/external-requirements/external-requirements.d.mts.map +1 -0
- package/resources/external-requirements/external-requirements.d.ts +10 -0
- package/resources/external-requirements/external-requirements.d.ts.map +1 -0
- package/resources/external-requirements/external-requirements.js +17 -0
- package/resources/external-requirements/external-requirements.js.map +1 -0
- package/resources/external-requirements/external-requirements.mjs +12 -0
- package/resources/external-requirements/external-requirements.mjs.map +1 -0
- package/resources/external-requirements/index.d.mts +3 -0
- package/resources/external-requirements/index.d.mts.map +1 -0
- package/resources/external-requirements/index.d.ts +3 -0
- package/resources/external-requirements/index.d.ts.map +1 -0
- package/resources/external-requirements/index.js +9 -0
- package/resources/external-requirements/index.js.map +1 -0
- package/resources/external-requirements/index.mjs +4 -0
- package/resources/external-requirements/index.mjs.map +1 -0
- package/resources/external-requirements/sub-number-orders.d.mts +151 -0
- package/resources/external-requirements/sub-number-orders.d.mts.map +1 -0
- package/resources/external-requirements/sub-number-orders.d.ts +151 -0
- package/resources/external-requirements/sub-number-orders.d.ts.map +1 -0
- package/resources/external-requirements/sub-number-orders.js +61 -0
- package/resources/external-requirements/sub-number-orders.js.map +1 -0
- package/resources/external-requirements/sub-number-orders.mjs +57 -0
- package/resources/external-requirements/sub-number-orders.mjs.map +1 -0
- package/resources/external-requirements.d.mts +2 -0
- package/resources/external-requirements.d.mts.map +1 -0
- package/resources/external-requirements.d.ts +2 -0
- package/resources/external-requirements.d.ts.map +1 -0
- package/resources/external-requirements.js +6 -0
- package/resources/external-requirements.js.map +1 -0
- package/resources/external-requirements.mjs +3 -0
- package/resources/external-requirements.mjs.map +1 -0
- 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 +6 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/outbound-voice-profiles.d.mts +30 -30
- package/resources/outbound-voice-profiles.d.ts +30 -30
- package/resources/phone-numbers/jobs.d.mts +21 -4
- package/resources/phone-numbers/jobs.d.mts.map +1 -1
- package/resources/phone-numbers/jobs.d.ts +21 -4
- package/resources/phone-numbers/jobs.d.ts.map +1 -1
- package/resources/phone-numbers/jobs.js +4 -2
- package/resources/phone-numbers/jobs.js.map +1 -1
- package/resources/phone-numbers/jobs.mjs +4 -2
- package/resources/phone-numbers/jobs.mjs.map +1 -1
- package/resources/sim-card-groups/actions.d.mts +10 -4
- package/resources/sim-card-groups/actions.d.mts.map +1 -1
- package/resources/sim-card-groups/actions.d.ts +10 -4
- package/resources/sim-card-groups/actions.d.ts.map +1 -1
- package/resources/sim-card-groups/actions.js +6 -4
- package/resources/sim-card-groups/actions.js.map +1 -1
- package/resources/sim-card-groups/actions.mjs +6 -4
- package/resources/sim-card-groups/actions.mjs.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts +20 -10
- package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts +20 -10
- package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
- package/resources/speech-to-text/speech-to-text.js +3 -2
- package/resources/speech-to-text/speech-to-text.js.map +1 -1
- package/resources/speech-to-text/speech-to-text.mjs +3 -2
- package/resources/speech-to-text/speech-to-text.mjs.map +1 -1
- package/resources/webhooks.d.mts +4 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +4 -3
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +4 -11
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +4 -11
- package/resources/webhooks.mjs.map +1 -1
- package/resources/wireless-blocklist-values.d.mts +6 -19
- package/resources/wireless-blocklist-values.d.mts.map +1 -1
- package/resources/wireless-blocklist-values.d.ts +6 -19
- package/resources/wireless-blocklist-values.d.ts.map +1 -1
- package/resources/wireless-blocklist-values.js +2 -1
- package/resources/wireless-blocklist-values.js.map +1 -1
- package/resources/wireless-blocklist-values.mjs +2 -1
- package/resources/wireless-blocklist-values.mjs.map +1 -1
- package/resources/wireless-blocklists.d.mts +40 -20
- package/resources/wireless-blocklists.d.mts.map +1 -1
- package/resources/wireless-blocklists.d.ts +40 -20
- package/resources/wireless-blocklists.d.ts.map +1 -1
- package/resources/wireless-blocklists.js +12 -7
- package/resources/wireless-blocklists.js.map +1 -1
- package/resources/wireless-blocklists.mjs +12 -7
- package/resources/wireless-blocklists.mjs.map +1 -1
- package/src/client.ts +9 -4
- package/src/lib/webhooks.ts +59 -18
- package/src/resources/ai/ai.ts +6 -6
- package/src/resources/ai/anthropic/v1.ts +4 -3
- package/src/resources/ai/assistants/assistants.ts +130 -17
- package/src/resources/ai/chat.ts +9 -0
- package/src/resources/ai/collections/collections.ts +0 -134
- package/src/resources/ai/collections/index.ts +0 -3
- package/src/resources/ai/collections/settings.ts +4 -1
- package/src/resources/ai/index.ts +1 -3
- package/src/resources/ai/knowledge/collections.ts +179 -0
- package/src/resources/ai/knowledge/index.ts +8 -0
- package/src/resources/ai/knowledge/knowledge.ts +23 -0
- package/src/resources/ai/knowledge.ts +3 -0
- package/src/resources/ai/openai/chat.ts +9 -0
- package/src/resources/ai/openai/openai.ts +12 -0
- package/src/resources/calls/actions.ts +38 -6
- package/src/resources/calls/calls.ts +2 -0
- package/src/resources/calls/index.ts +1 -0
- package/src/resources/conferences/actions.ts +3 -1
- package/src/resources/credential-connections/credential-connections.ts +2 -2
- package/src/resources/external-requirements/external-requirements.ts +27 -0
- package/src/resources/external-requirements/index.ts +10 -0
- package/src/resources/external-requirements/sub-number-orders.ts +202 -0
- package/src/resources/external-requirements.ts +3 -0
- package/src/resources/index.ts +3 -2
- package/src/resources/outbound-voice-profiles.ts +30 -30
- package/src/resources/phone-numbers/jobs.ts +23 -4
- package/src/resources/sim-card-groups/actions.ts +11 -4
- package/src/resources/speech-to-text/speech-to-text.ts +23 -9
- package/src/resources/webhooks.ts +8 -13
- package/src/resources/wireless-blocklist-values.ts +6 -23
- package/src/resources/wireless-blocklists.ts +54 -25
- 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
|
@@ -12,12 +12,12 @@ export declare class WirelessBlocklists extends APIResource {
|
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
14
|
* // Automatically fetches more pages as needed.
|
|
15
|
-
* for await (const
|
|
15
|
+
* for await (const wirelessWirelessBlocklist of client.wirelessBlocklists.list()) {
|
|
16
16
|
* // ...
|
|
17
17
|
* }
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
list(query?: WirelessBlocklistListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
20
|
+
list(query?: WirelessBlocklistListParams | null | undefined, options?: RequestOptions): PagePromise<WirelessWirelessBlocklistsDefaultFlatPagination, WirelessWirelessBlocklist>;
|
|
21
21
|
/**
|
|
22
22
|
* Updates the specified wireless blocklist. The update is processed
|
|
23
23
|
* asynchronously, so the request is accepted and completes in the background.
|
|
@@ -46,17 +46,18 @@ export declare class WirelessBlocklists extends APIResource {
|
|
|
46
46
|
*/
|
|
47
47
|
create(body: WirelessBlocklistCreateParams, options?: RequestOptions): APIPromise<WirelessBlocklistCreateResponse>;
|
|
48
48
|
/**
|
|
49
|
-
* Permanently deletes the specified wireless blocklist from your account.
|
|
49
|
+
* Permanently deletes the specified wireless blocklist from your account. The
|
|
50
|
+
* request returns `422` when the wireless blocklist is assigned to a SIM Card
|
|
51
|
+
* Group.
|
|
50
52
|
*
|
|
51
53
|
* @example
|
|
52
54
|
* ```ts
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* );
|
|
55
|
+
* await client.wirelessBlocklists.delete(
|
|
56
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
57
|
+
* );
|
|
57
58
|
* ```
|
|
58
59
|
*/
|
|
59
|
-
delete(id: string, options?: RequestOptions): APIPromise<
|
|
60
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
60
61
|
/**
|
|
61
62
|
* Retrieve information about a Wireless Blocklist.
|
|
62
63
|
*
|
|
@@ -70,7 +71,7 @@ export declare class WirelessBlocklists extends APIResource {
|
|
|
70
71
|
*/
|
|
71
72
|
retrieve(id: string, options?: RequestOptions): APIPromise<WirelessBlocklistRetrieveResponse>;
|
|
72
73
|
}
|
|
73
|
-
export type
|
|
74
|
+
export type WirelessWirelessBlocklistsDefaultFlatPagination = DefaultFlatPagination<WirelessWirelessBlocklist>;
|
|
74
75
|
export interface WirelessBlocklist {
|
|
75
76
|
/**
|
|
76
77
|
* Identifies the resource.
|
|
@@ -98,17 +99,40 @@ export interface WirelessBlocklist {
|
|
|
98
99
|
*/
|
|
99
100
|
values?: Array<string>;
|
|
100
101
|
}
|
|
102
|
+
export interface WirelessWirelessBlocklist {
|
|
103
|
+
/**
|
|
104
|
+
* Identifies the resource.
|
|
105
|
+
*/
|
|
106
|
+
id?: string;
|
|
107
|
+
/**
|
|
108
|
+
* ISO 8601 formatted date-time indicating when the resource was created.
|
|
109
|
+
*/
|
|
110
|
+
created_at?: string;
|
|
111
|
+
/**
|
|
112
|
+
* The wireless blocklist name.
|
|
113
|
+
*/
|
|
114
|
+
name?: string;
|
|
115
|
+
/**
|
|
116
|
+
* The type of the wireless blocklist.
|
|
117
|
+
*/
|
|
118
|
+
type?: 'country' | 'mcc' | 'plmn';
|
|
119
|
+
/**
|
|
120
|
+
* ISO 8601 formatted date-time indicating when the resource was updated.
|
|
121
|
+
*/
|
|
122
|
+
updated_at?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Values to block. The values here depend on the `type` of Wireless Blocklist.
|
|
125
|
+
*/
|
|
126
|
+
values?: Array<string>;
|
|
127
|
+
}
|
|
101
128
|
export interface WirelessBlocklistCreateResponse {
|
|
102
|
-
data?:
|
|
129
|
+
data?: WirelessWirelessBlocklist;
|
|
103
130
|
}
|
|
104
131
|
export interface WirelessBlocklistRetrieveResponse {
|
|
105
|
-
data?:
|
|
132
|
+
data?: WirelessWirelessBlocklist;
|
|
106
133
|
}
|
|
107
134
|
export interface WirelessBlocklistUpdateResponse {
|
|
108
|
-
data?:
|
|
109
|
-
}
|
|
110
|
-
export interface WirelessBlocklistDeleteResponse {
|
|
111
|
-
data?: WirelessBlocklist;
|
|
135
|
+
data?: WirelessWirelessBlocklist;
|
|
112
136
|
}
|
|
113
137
|
export interface WirelessBlocklistListParams extends DefaultFlatPaginationParams {
|
|
114
138
|
/**
|
|
@@ -119,10 +143,6 @@ export interface WirelessBlocklistListParams extends DefaultFlatPaginationParams
|
|
|
119
143
|
* When the Private Wireless Gateway was last updated.
|
|
120
144
|
*/
|
|
121
145
|
'filter[type]'?: string;
|
|
122
|
-
/**
|
|
123
|
-
* Values to filter on (inclusive).
|
|
124
|
-
*/
|
|
125
|
-
'filter[values]'?: string;
|
|
126
146
|
}
|
|
127
147
|
export interface WirelessBlocklistUpdateParams {
|
|
128
148
|
/**
|
|
@@ -149,6 +169,6 @@ export interface WirelessBlocklistCreateParams {
|
|
|
149
169
|
values: Array<string>;
|
|
150
170
|
}
|
|
151
171
|
export declare namespace WirelessBlocklists {
|
|
152
|
-
export { type WirelessBlocklist as WirelessBlocklist, type
|
|
172
|
+
export { type WirelessBlocklist as WirelessBlocklist, type WirelessWirelessBlocklist as WirelessWirelessBlocklist, type WirelessBlocklistCreateResponse as WirelessBlocklistCreateResponse, type WirelessBlocklistRetrieveResponse as WirelessBlocklistRetrieveResponse, type WirelessBlocklistUpdateResponse as WirelessBlocklistUpdateResponse, type WirelessWirelessBlocklistsDefaultFlatPagination as WirelessWirelessBlocklistsDefaultFlatPagination, type WirelessBlocklistListParams as WirelessBlocklistListParams, type WirelessBlocklistUpdateParams as WirelessBlocklistUpdateParams, type WirelessBlocklistCreateParams as WirelessBlocklistCreateParams, };
|
|
153
173
|
}
|
|
154
174
|
//# sourceMappingURL=wireless-blocklists.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireless-blocklists.d.mts","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,+BAA2B;
|
|
1
|
+
{"version":3,"file":"wireless-blocklists.d.mts","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,+BAA2B;AAE1G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,2BAA2B,GAAG,IAAI,GAAG,SAAc,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,+CAA+C,EAAE,yBAAyB,CAAC;IAO1F;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;;;OAWG;I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,IAAI,CAAC,EAAE,yBAAyB,CAAC;CAClC;AAED,MAAM,WAAW,2BAA4B,SAAQ,2BAA2B;IAC9E;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+CAA+C,IAAI,+CAA+C,EACvG,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -12,12 +12,12 @@ export declare class WirelessBlocklists extends APIResource {
|
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
14
|
* // Automatically fetches more pages as needed.
|
|
15
|
-
* for await (const
|
|
15
|
+
* for await (const wirelessWirelessBlocklist of client.wirelessBlocklists.list()) {
|
|
16
16
|
* // ...
|
|
17
17
|
* }
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
list(query?: WirelessBlocklistListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
20
|
+
list(query?: WirelessBlocklistListParams | null | undefined, options?: RequestOptions): PagePromise<WirelessWirelessBlocklistsDefaultFlatPagination, WirelessWirelessBlocklist>;
|
|
21
21
|
/**
|
|
22
22
|
* Updates the specified wireless blocklist. The update is processed
|
|
23
23
|
* asynchronously, so the request is accepted and completes in the background.
|
|
@@ -46,17 +46,18 @@ export declare class WirelessBlocklists extends APIResource {
|
|
|
46
46
|
*/
|
|
47
47
|
create(body: WirelessBlocklistCreateParams, options?: RequestOptions): APIPromise<WirelessBlocklistCreateResponse>;
|
|
48
48
|
/**
|
|
49
|
-
* Permanently deletes the specified wireless blocklist from your account.
|
|
49
|
+
* Permanently deletes the specified wireless blocklist from your account. The
|
|
50
|
+
* request returns `422` when the wireless blocklist is assigned to a SIM Card
|
|
51
|
+
* Group.
|
|
50
52
|
*
|
|
51
53
|
* @example
|
|
52
54
|
* ```ts
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* );
|
|
55
|
+
* await client.wirelessBlocklists.delete(
|
|
56
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
57
|
+
* );
|
|
57
58
|
* ```
|
|
58
59
|
*/
|
|
59
|
-
delete(id: string, options?: RequestOptions): APIPromise<
|
|
60
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
60
61
|
/**
|
|
61
62
|
* Retrieve information about a Wireless Blocklist.
|
|
62
63
|
*
|
|
@@ -70,7 +71,7 @@ export declare class WirelessBlocklists extends APIResource {
|
|
|
70
71
|
*/
|
|
71
72
|
retrieve(id: string, options?: RequestOptions): APIPromise<WirelessBlocklistRetrieveResponse>;
|
|
72
73
|
}
|
|
73
|
-
export type
|
|
74
|
+
export type WirelessWirelessBlocklistsDefaultFlatPagination = DefaultFlatPagination<WirelessWirelessBlocklist>;
|
|
74
75
|
export interface WirelessBlocklist {
|
|
75
76
|
/**
|
|
76
77
|
* Identifies the resource.
|
|
@@ -98,17 +99,40 @@ export interface WirelessBlocklist {
|
|
|
98
99
|
*/
|
|
99
100
|
values?: Array<string>;
|
|
100
101
|
}
|
|
102
|
+
export interface WirelessWirelessBlocklist {
|
|
103
|
+
/**
|
|
104
|
+
* Identifies the resource.
|
|
105
|
+
*/
|
|
106
|
+
id?: string;
|
|
107
|
+
/**
|
|
108
|
+
* ISO 8601 formatted date-time indicating when the resource was created.
|
|
109
|
+
*/
|
|
110
|
+
created_at?: string;
|
|
111
|
+
/**
|
|
112
|
+
* The wireless blocklist name.
|
|
113
|
+
*/
|
|
114
|
+
name?: string;
|
|
115
|
+
/**
|
|
116
|
+
* The type of the wireless blocklist.
|
|
117
|
+
*/
|
|
118
|
+
type?: 'country' | 'mcc' | 'plmn';
|
|
119
|
+
/**
|
|
120
|
+
* ISO 8601 formatted date-time indicating when the resource was updated.
|
|
121
|
+
*/
|
|
122
|
+
updated_at?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Values to block. The values here depend on the `type` of Wireless Blocklist.
|
|
125
|
+
*/
|
|
126
|
+
values?: Array<string>;
|
|
127
|
+
}
|
|
101
128
|
export interface WirelessBlocklistCreateResponse {
|
|
102
|
-
data?:
|
|
129
|
+
data?: WirelessWirelessBlocklist;
|
|
103
130
|
}
|
|
104
131
|
export interface WirelessBlocklistRetrieveResponse {
|
|
105
|
-
data?:
|
|
132
|
+
data?: WirelessWirelessBlocklist;
|
|
106
133
|
}
|
|
107
134
|
export interface WirelessBlocklistUpdateResponse {
|
|
108
|
-
data?:
|
|
109
|
-
}
|
|
110
|
-
export interface WirelessBlocklistDeleteResponse {
|
|
111
|
-
data?: WirelessBlocklist;
|
|
135
|
+
data?: WirelessWirelessBlocklist;
|
|
112
136
|
}
|
|
113
137
|
export interface WirelessBlocklistListParams extends DefaultFlatPaginationParams {
|
|
114
138
|
/**
|
|
@@ -119,10 +143,6 @@ export interface WirelessBlocklistListParams extends DefaultFlatPaginationParams
|
|
|
119
143
|
* When the Private Wireless Gateway was last updated.
|
|
120
144
|
*/
|
|
121
145
|
'filter[type]'?: string;
|
|
122
|
-
/**
|
|
123
|
-
* Values to filter on (inclusive).
|
|
124
|
-
*/
|
|
125
|
-
'filter[values]'?: string;
|
|
126
146
|
}
|
|
127
147
|
export interface WirelessBlocklistUpdateParams {
|
|
128
148
|
/**
|
|
@@ -149,6 +169,6 @@ export interface WirelessBlocklistCreateParams {
|
|
|
149
169
|
values: Array<string>;
|
|
150
170
|
}
|
|
151
171
|
export declare namespace WirelessBlocklists {
|
|
152
|
-
export { type WirelessBlocklist as WirelessBlocklist, type
|
|
172
|
+
export { type WirelessBlocklist as WirelessBlocklist, type WirelessWirelessBlocklist as WirelessWirelessBlocklist, type WirelessBlocklistCreateResponse as WirelessBlocklistCreateResponse, type WirelessBlocklistRetrieveResponse as WirelessBlocklistRetrieveResponse, type WirelessBlocklistUpdateResponse as WirelessBlocklistUpdateResponse, type WirelessWirelessBlocklistsDefaultFlatPagination as WirelessWirelessBlocklistsDefaultFlatPagination, type WirelessBlocklistListParams as WirelessBlocklistListParams, type WirelessBlocklistUpdateParams as WirelessBlocklistUpdateParams, type WirelessBlocklistCreateParams as WirelessBlocklistCreateParams, };
|
|
153
173
|
}
|
|
154
174
|
//# sourceMappingURL=wireless-blocklists.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireless-blocklists.d.ts","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,8BAA2B;
|
|
1
|
+
{"version":3,"file":"wireless-blocklists.d.ts","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD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,iBAAiB,EAC3C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+CAA+C,IAAI,+CAA+C,EACvG,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.WirelessBlocklists = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
8
|
const path_1 = require("../internal/utils/path.js");
|
|
8
9
|
/**
|
|
9
10
|
* Wireless Blocklists operations
|
|
@@ -15,7 +16,7 @@ class WirelessBlocklists extends resource_1.APIResource {
|
|
|
15
16
|
* @example
|
|
16
17
|
* ```ts
|
|
17
18
|
* // Automatically fetches more pages as needed.
|
|
18
|
-
* for await (const
|
|
19
|
+
* for await (const wirelessWirelessBlocklist of client.wirelessBlocklists.list()) {
|
|
19
20
|
* // ...
|
|
20
21
|
* }
|
|
21
22
|
* ```
|
|
@@ -58,18 +59,22 @@ class WirelessBlocklists extends resource_1.APIResource {
|
|
|
58
59
|
return this._client.post('/wireless_blocklists', { body, ...options });
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
|
-
* Permanently deletes the specified wireless blocklist from your account.
|
|
62
|
+
* Permanently deletes the specified wireless blocklist from your account. The
|
|
63
|
+
* request returns `422` when the wireless blocklist is assigned to a SIM Card
|
|
64
|
+
* Group.
|
|
62
65
|
*
|
|
63
66
|
* @example
|
|
64
67
|
* ```ts
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* );
|
|
68
|
+
* await client.wirelessBlocklists.delete(
|
|
69
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
70
|
+
* );
|
|
69
71
|
* ```
|
|
70
72
|
*/
|
|
71
73
|
delete(id, options) {
|
|
72
|
-
return this._client.delete((0, path_1.path) `/wireless_blocklists/${id}`,
|
|
74
|
+
return this._client.delete((0, path_1.path) `/wireless_blocklists/${id}`, {
|
|
75
|
+
...options,
|
|
76
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
77
|
+
});
|
|
73
78
|
}
|
|
74
79
|
/**
|
|
75
80
|
* Retrieve information about a Wireless Blocklist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireless-blocklists.js","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA0G;
|
|
1
|
+
{"version":3,"file":"wireless-blocklists.js","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA0G;AAC1G,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,kBAAmB,SAAQ,sBAAW;IACjD;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAwD,EAAE,EAC1D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,kCAAgD,CAAA,EAAE;YACvG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAU,EACV,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,EAAE,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AA/FD,gDA+FC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { DefaultFlatPagination } from "../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
5
|
import { path } from "../internal/utils/path.mjs";
|
|
5
6
|
/**
|
|
6
7
|
* Wireless Blocklists operations
|
|
@@ -12,7 +13,7 @@ export class WirelessBlocklists extends APIResource {
|
|
|
12
13
|
* @example
|
|
13
14
|
* ```ts
|
|
14
15
|
* // Automatically fetches more pages as needed.
|
|
15
|
-
* for await (const
|
|
16
|
+
* for await (const wirelessWirelessBlocklist of client.wirelessBlocklists.list()) {
|
|
16
17
|
* // ...
|
|
17
18
|
* }
|
|
18
19
|
* ```
|
|
@@ -55,18 +56,22 @@ export class WirelessBlocklists extends APIResource {
|
|
|
55
56
|
return this._client.post('/wireless_blocklists', { body, ...options });
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
58
|
-
* Permanently deletes the specified wireless blocklist from your account.
|
|
59
|
+
* Permanently deletes the specified wireless blocklist from your account. The
|
|
60
|
+
* request returns `422` when the wireless blocklist is assigned to a SIM Card
|
|
61
|
+
* Group.
|
|
59
62
|
*
|
|
60
63
|
* @example
|
|
61
64
|
* ```ts
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* );
|
|
65
|
+
* await client.wirelessBlocklists.delete(
|
|
66
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
67
|
+
* );
|
|
66
68
|
* ```
|
|
67
69
|
*/
|
|
68
70
|
delete(id, options) {
|
|
69
|
-
return this._client.delete(path `/wireless_blocklists/${id}`,
|
|
71
|
+
return this._client.delete(path `/wireless_blocklists/${id}`, {
|
|
72
|
+
...options,
|
|
73
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
74
|
+
});
|
|
70
75
|
}
|
|
71
76
|
/**
|
|
72
77
|
* Retrieve information about a Wireless Blocklist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireless-blocklists.mjs","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,qBAAqB,EAAiD,+BAA2B;
|
|
1
|
+
{"version":3,"file":"wireless-blocklists.mjs","sourceRoot":"","sources":["../src/resources/wireless-blocklists.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,qBAAqB,EAAiD,+BAA2B;AAC1G,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH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CreateParams,
|
|
1198
1198
|
WirelessBlocklistCreateResponse,
|
|
1199
|
-
WirelessBlocklistDeleteResponse,
|
|
1200
1199
|
WirelessBlocklistListParams,
|
|
1201
1200
|
WirelessBlocklistRetrieveResponse,
|
|
1202
1201
|
WirelessBlocklistUpdateParams,
|
|
1203
1202
|
WirelessBlocklistUpdateResponse,
|
|
1204
1203
|
WirelessBlocklists,
|
|
1205
|
-
|
|
1204
|
+
WirelessWirelessBlocklist,
|
|
1205
|
+
WirelessWirelessBlocklistsDefaultFlatPagination,
|
|
1206
1206
|
} from './resources/wireless-blocklists';
|
|
1207
1207
|
import { Actions, WirelessError } from './resources/actions/actions';
|
|
1208
1208
|
import {
|
|
@@ -1398,6 +1398,7 @@ import {
|
|
|
1398
1398
|
ExternalConnectionsDefaultFlatPagination,
|
|
1399
1399
|
ExternalVoiceIntegrationsPaginationMeta,
|
|
1400
1400
|
} from './resources/external-connections/external-connections';
|
|
1401
|
+
import { ExternalRequirements } from './resources/external-requirements/external-requirements';
|
|
1401
1402
|
import {
|
|
1402
1403
|
Fax,
|
|
1403
1404
|
FaxCreateParams,
|
|
@@ -3247,6 +3248,7 @@ export class Telnyx {
|
|
|
3247
3248
|
pricing: API.Pricing = new API.Pricing(this);
|
|
3248
3249
|
webSearch: API.WebSearch = new API.WebSearch(this);
|
|
3249
3250
|
meetingSessions: API.MeetingSessions = new API.MeetingSessions(this);
|
|
3251
|
+
externalRequirements: API.ExternalRequirements = new API.ExternalRequirements(this);
|
|
3250
3252
|
}
|
|
3251
3253
|
|
|
3252
3254
|
Telnyx.Legacy = Legacy;
|
|
@@ -3431,6 +3433,7 @@ Telnyx.EmailValidations = EmailValidations;
|
|
|
3431
3433
|
Telnyx.Pricing = Pricing;
|
|
3432
3434
|
Telnyx.WebSearch = WebSearch;
|
|
3433
3435
|
Telnyx.MeetingSessions = MeetingSessions;
|
|
3436
|
+
Telnyx.ExternalRequirements = ExternalRequirements;
|
|
3434
3437
|
|
|
3435
3438
|
export declare namespace Telnyx {
|
|
3436
3439
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -5082,11 +5085,11 @@ export declare namespace Telnyx {
|
|
|
5082
5085
|
export {
|
|
5083
5086
|
WirelessBlocklists as WirelessBlocklists,
|
|
5084
5087
|
type WirelessBlocklist as WirelessBlocklist,
|
|
5088
|
+
type WirelessWirelessBlocklist as WirelessWirelessBlocklist,
|
|
5085
5089
|
type WirelessBlocklistCreateResponse as WirelessBlocklistCreateResponse,
|
|
5086
5090
|
type WirelessBlocklistRetrieveResponse as WirelessBlocklistRetrieveResponse,
|
|
5087
5091
|
type WirelessBlocklistUpdateResponse as WirelessBlocklistUpdateResponse,
|
|
5088
|
-
type
|
|
5089
|
-
type WirelessBlocklistsDefaultFlatPagination as WirelessBlocklistsDefaultFlatPagination,
|
|
5092
|
+
type WirelessWirelessBlocklistsDefaultFlatPagination as WirelessWirelessBlocklistsDefaultFlatPagination,
|
|
5090
5093
|
type WirelessBlocklistListParams as WirelessBlocklistListParams,
|
|
5091
5094
|
type WirelessBlocklistUpdateParams as WirelessBlocklistUpdateParams,
|
|
5092
5095
|
type WirelessBlocklistCreateParams as WirelessBlocklistCreateParams,
|
|
@@ -5460,6 +5463,8 @@ export declare namespace Telnyx {
|
|
|
5460
5463
|
type MeetingSessionRetrieveTranscriptParams as MeetingSessionRetrieveTranscriptParams,
|
|
5461
5464
|
};
|
|
5462
5465
|
|
|
5466
|
+
export { ExternalRequirements as ExternalRequirements };
|
|
5467
|
+
|
|
5463
5468
|
export type APIError = API.APIError;
|
|
5464
5469
|
export type AvailablePhoneNumbersMetadata = API.AvailablePhoneNumbersMetadata;
|
|
5465
5470
|
export type AzureVoiceSettings = API.AzureVoiceSettings;
|
package/src/lib/webhooks.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Telnyx webhook verification using native Ed25519.
|
|
3
5
|
*
|
|
@@ -32,7 +34,7 @@ export class TelnyxWebhookVerificationError extends TelnyxError {
|
|
|
32
34
|
|
|
33
35
|
export interface WebhookUnwrapOptions {
|
|
34
36
|
headers?: Record<string, string>;
|
|
35
|
-
key?: string | Uint8Array;
|
|
37
|
+
key?: string | Uint8Array | undefined;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export function unsafeUnwrapWebhook<T>(body: string): T {
|
|
@@ -44,19 +46,51 @@ export async function unwrapWebhook<T>(
|
|
|
44
46
|
options: WebhookUnwrapOptions | undefined,
|
|
45
47
|
clientPublicKey: string | null,
|
|
46
48
|
): Promise<T> {
|
|
47
|
-
if (options?.headers) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
throw new TelnyxWebhookVerificationError('No public key provided for webhook verification');
|
|
51
|
-
}
|
|
49
|
+
if (!options?.headers) {
|
|
50
|
+
throw new TelnyxWebhookVerificationError('Webhook headers are required for verification');
|
|
51
|
+
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const key = options.key || clientPublicKey;
|
|
54
|
+
if (!key) {
|
|
55
|
+
throw new TelnyxWebhookVerificationError('No public key provided for webhook verification');
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
const webhook = new TelnyxWebhook(key);
|
|
59
|
+
await webhook.verify(body, options.headers);
|
|
57
60
|
return unsafeUnwrapWebhook<T>(body);
|
|
58
61
|
}
|
|
59
62
|
|
|
63
|
+
const BASE64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
64
|
+
|
|
65
|
+
/** Decode strict, padded base64 without relying on Node's Buffer global. */
|
|
66
|
+
function decodeBase64(value: string): Uint8Array {
|
|
67
|
+
if (value.length === 0 || value.length % 4 !== 0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(value)) {
|
|
68
|
+
throw new Error('Invalid base64');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const padding =
|
|
72
|
+
value.endsWith('==') ? 2
|
|
73
|
+
: value.endsWith('=') ? 1
|
|
74
|
+
: 0;
|
|
75
|
+
const output = new Uint8Array((value.length / 4) * 3 - padding);
|
|
76
|
+
let outputIndex = 0;
|
|
77
|
+
|
|
78
|
+
for (let index = 0; index < value.length; index += 4) {
|
|
79
|
+
const a = BASE64_ALPHABET.indexOf(value[index]!);
|
|
80
|
+
const b = BASE64_ALPHABET.indexOf(value[index + 1]!);
|
|
81
|
+
const c = value[index + 2] === '=' ? 0 : BASE64_ALPHABET.indexOf(value[index + 2]!);
|
|
82
|
+
const d = value[index + 3] === '=' ? 0 : BASE64_ALPHABET.indexOf(value[index + 3]!);
|
|
83
|
+
if (a < 0 || b < 0 || c < 0 || d < 0) throw new Error('Invalid base64');
|
|
84
|
+
|
|
85
|
+
const chunk = (a << 18) | (b << 12) | (c << 6) | d;
|
|
86
|
+
if (outputIndex < output.length) output[outputIndex++] = (chunk >> 16) & 0xff;
|
|
87
|
+
if (outputIndex < output.length) output[outputIndex++] = (chunk >> 8) & 0xff;
|
|
88
|
+
if (outputIndex < output.length) output[outputIndex++] = chunk & 0xff;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return output;
|
|
92
|
+
}
|
|
93
|
+
|
|
60
94
|
// Type for the SubtleCrypto interface we need
|
|
61
95
|
// Using unknown for key type to avoid CryptoKey dependency
|
|
62
96
|
interface SubtleCryptoLike {
|
|
@@ -97,13 +131,13 @@ export class TelnyxWebhook {
|
|
|
97
131
|
if (typeof key === 'string') {
|
|
98
132
|
try {
|
|
99
133
|
// Telnyx provides keys in base64 format
|
|
100
|
-
const keyBytes =
|
|
134
|
+
const keyBytes = decodeBase64(key);
|
|
101
135
|
if (keyBytes.length !== 32) {
|
|
102
136
|
throw new TelnyxWebhookVerificationError(
|
|
103
137
|
`Invalid public key: expected 32 bytes, got ${keyBytes.length} bytes`,
|
|
104
138
|
);
|
|
105
139
|
}
|
|
106
|
-
this.verifyKey =
|
|
140
|
+
this.verifyKey = keyBytes;
|
|
107
141
|
} catch (exc) {
|
|
108
142
|
if (exc instanceof TelnyxWebhookVerificationError) {
|
|
109
143
|
throw exc;
|
|
@@ -111,6 +145,11 @@ export class TelnyxWebhook {
|
|
|
111
145
|
throw new TelnyxWebhookVerificationError(`Invalid key format: ${key}`);
|
|
112
146
|
}
|
|
113
147
|
} else {
|
|
148
|
+
if (key.length !== 32) {
|
|
149
|
+
throw new TelnyxWebhookVerificationError(
|
|
150
|
+
`Invalid public key: expected 32 bytes, got ${key.length} bytes`,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
114
153
|
this.verifyKey = key;
|
|
115
154
|
}
|
|
116
155
|
}
|
|
@@ -138,7 +177,13 @@ export class TelnyxWebhook {
|
|
|
138
177
|
|
|
139
178
|
// Validate timestamp format and prevent replay attacks
|
|
140
179
|
try {
|
|
141
|
-
|
|
180
|
+
if (!/^\d+$/.test(timestampHeader)) {
|
|
181
|
+
throw new TelnyxWebhookVerificationError(`Invalid timestamp format: ${timestampHeader}`);
|
|
182
|
+
}
|
|
183
|
+
const webhookTime = Number(timestampHeader);
|
|
184
|
+
if (!Number.isSafeInteger(webhookTime)) {
|
|
185
|
+
throw new TelnyxWebhookVerificationError(`Invalid timestamp format: ${timestampHeader}`);
|
|
186
|
+
}
|
|
142
187
|
const currentTime = Math.floor(Date.now() / 1000);
|
|
143
188
|
|
|
144
189
|
// Allow 5 minutes tolerance
|
|
@@ -155,7 +200,7 @@ export class TelnyxWebhook {
|
|
|
155
200
|
// Decode the signature from base64
|
|
156
201
|
let signature: Uint8Array;
|
|
157
202
|
try {
|
|
158
|
-
const signatureBuffer =
|
|
203
|
+
const signatureBuffer = decodeBase64(signatureHeader);
|
|
159
204
|
|
|
160
205
|
if (signatureBuffer.length !== 64) {
|
|
161
206
|
throw new Error(`Invalid signature length: expected 64 bytes, got ${signatureBuffer.length} bytes`);
|
|
@@ -166,13 +211,9 @@ export class TelnyxWebhook {
|
|
|
166
211
|
throw new TelnyxWebhookVerificationError(`Invalid signature format: ${signatureHeader}`);
|
|
167
212
|
}
|
|
168
213
|
|
|
169
|
-
// Create the signed payload: timestamp|payload
|
|
214
|
+
// Create the exact signed payload: timestamp|unmodified payload
|
|
170
215
|
const encoder = new TextEncoder();
|
|
171
|
-
const signedPayload =
|
|
172
|
-
...encoder.encode(timestampHeader),
|
|
173
|
-
...encoder.encode('|'),
|
|
174
|
-
...encoder.encode(payload),
|
|
175
|
-
]);
|
|
216
|
+
const signedPayload = encoder.encode(`${timestampHeader}|${payload}`);
|
|
176
217
|
|
|
177
218
|
// Verify the signature using native crypto
|
|
178
219
|
let isValid: boolean;
|
package/src/resources/ai/ai.ts
CHANGED
|
@@ -113,9 +113,6 @@ import {
|
|
|
113
113
|
CollectionCreateParams,
|
|
114
114
|
CollectionEnvelope,
|
|
115
115
|
CollectionListParams,
|
|
116
|
-
CollectionRetrieveDocumentsParams,
|
|
117
|
-
CollectionRetrieveDocumentsResponse,
|
|
118
|
-
CollectionRetrieveDocumentsResponsesDefaultFlatPagination,
|
|
119
116
|
CollectionUpdateParams,
|
|
120
117
|
Collections,
|
|
121
118
|
CollectionsDefaultFlatPagination,
|
|
@@ -150,6 +147,8 @@ import * as FineTuningAPI from './fine-tuning/fine-tuning';
|
|
|
150
147
|
import { FineTuning } from './fine-tuning/fine-tuning';
|
|
151
148
|
import * as IntegrationsAPI from './integrations/integrations';
|
|
152
149
|
import { Integration, IntegrationListResponse, Integrations } from './integrations/integrations';
|
|
150
|
+
import * as KnowledgeAPI from './knowledge/knowledge';
|
|
151
|
+
import { Knowledge } from './knowledge/knowledge';
|
|
153
152
|
import * as MissionsAPI from './missions/missions';
|
|
154
153
|
import {
|
|
155
154
|
EventsListResponse,
|
|
@@ -186,6 +185,7 @@ export class AI extends APIResource {
|
|
|
186
185
|
openai: OpenAIAPI.OpenAI = new OpenAIAPI.OpenAI(this._client);
|
|
187
186
|
tools: ToolsAPI.Tools = new ToolsAPI.Tools(this._client);
|
|
188
187
|
anthropic: AnthropicAPI.Anthropic = new AnthropicAPI.Anthropic(this._client);
|
|
188
|
+
knowledge: KnowledgeAPI.Knowledge = new KnowledgeAPI.Knowledge(this._client);
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
* Generate a summary of a file's contents.
|
|
@@ -631,6 +631,7 @@ AI.Missions = Missions;
|
|
|
631
631
|
AI.OpenAI = OpenAI;
|
|
632
632
|
AI.Tools = Tools;
|
|
633
633
|
AI.Anthropic = Anthropic;
|
|
634
|
+
AI.Knowledge = Knowledge;
|
|
634
635
|
|
|
635
636
|
export declare namespace AI {
|
|
636
637
|
export {
|
|
@@ -734,12 +735,9 @@ export declare namespace AI {
|
|
|
734
735
|
Collections as Collections,
|
|
735
736
|
type Collection as Collection,
|
|
736
737
|
type CollectionEnvelope as CollectionEnvelope,
|
|
737
|
-
type CollectionRetrieveDocumentsResponse as CollectionRetrieveDocumentsResponse,
|
|
738
738
|
type CollectionsDefaultFlatPagination as CollectionsDefaultFlatPagination,
|
|
739
|
-
type CollectionRetrieveDocumentsResponsesDefaultFlatPagination as CollectionRetrieveDocumentsResponsesDefaultFlatPagination,
|
|
740
739
|
type CollectionListParams as CollectionListParams,
|
|
741
740
|
type CollectionCreateParams as CollectionCreateParams,
|
|
742
|
-
type CollectionRetrieveDocumentsParams as CollectionRetrieveDocumentsParams,
|
|
743
741
|
type CollectionUpdateParams as CollectionUpdateParams,
|
|
744
742
|
};
|
|
745
743
|
|
|
@@ -819,4 +817,6 @@ export declare namespace AI {
|
|
|
819
817
|
};
|
|
820
818
|
|
|
821
819
|
export { Anthropic as Anthropic };
|
|
820
|
+
|
|
821
|
+
export { Knowledge as Knowledge };
|
|
822
822
|
}
|
|
@@ -23,7 +23,7 @@ export class V1 extends APIResource {
|
|
|
23
23
|
* const response = await client.ai.anthropic.v1.messages({
|
|
24
24
|
* max_tokens: 1024,
|
|
25
25
|
* messages: [{ role: 'user', content: 'Hello, world!' }],
|
|
26
|
-
* model: 'zai-org/GLM-5.
|
|
26
|
+
* model: 'zai-org/GLM-5.3-Flash',
|
|
27
27
|
* system: 'You are a friendly chatbot.',
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
@@ -53,8 +53,9 @@ export interface V1MessagesParams {
|
|
|
53
53
|
messages: Array<{ [key: string]: unknown }>;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* The model to use for generating the response, for example
|
|
57
|
-
* another model available from the Telnyx models
|
|
56
|
+
* The model to use for generating the response, for example
|
|
57
|
+
* `zai-org/GLM-5.3-Flash` or another model available from the Telnyx models
|
|
58
|
+
* endpoint.
|
|
58
59
|
*/
|
|
59
60
|
model: string;
|
|
60
61
|
|