syllable-sdk 0.1.0-alpha.169 → 0.1.0-alpha.174
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/README.md +24 -0
- package/docs/sdks/batches/README.md +4 -4
- package/docs/sdks/campaigns/README.md +18 -2
- package/docs/sdks/languagegroups/README.md +4 -4
- package/docs/sdks/numbers/README.md +164 -0
- package/docs/sdks/users/README.md +424 -1
- package/docs/sdks/v1/README.md +424 -1
- package/docs/sdks/workflows/README.md +8 -8
- package/funcs/channelsTwilioNumbersList.d.ts +17 -0
- package/funcs/channelsTwilioNumbersList.d.ts.map +1 -0
- package/funcs/channelsTwilioNumbersList.js +108 -0
- package/funcs/channelsTwilioNumbersList.js.map +1 -0
- package/funcs/channelsTwilioNumbersUpdate.d.ts +17 -0
- package/funcs/channelsTwilioNumbersUpdate.d.ts.map +1 -0
- package/funcs/channelsTwilioNumbersUpdate.js +111 -0
- package/funcs/channelsTwilioNumbersUpdate.js.map +1 -0
- package/funcs/usersCreate.d.ts +16 -0
- package/funcs/usersCreate.d.ts.map +1 -0
- package/funcs/usersCreate.js +102 -0
- package/funcs/usersCreate.js.map +1 -0
- package/funcs/usersDelete.d.ts +16 -0
- package/funcs/usersDelete.d.ts.map +1 -0
- package/funcs/usersDelete.js +103 -0
- package/funcs/usersDelete.js.map +1 -0
- package/funcs/usersList.d.ts +17 -0
- package/funcs/usersList.d.ts.map +1 -0
- package/funcs/usersList.js +114 -0
- package/funcs/usersList.js.map +1 -0
- package/funcs/usersUpdate.d.ts +16 -0
- package/funcs/usersUpdate.d.ts.map +1 -0
- package/funcs/usersUpdate.js +102 -0
- package/funcs/usersUpdate.js.map +1 -0
- package/funcs/usersUsersDeleteAccount.d.ts +4 -0
- package/funcs/usersUsersDeleteAccount.d.ts.map +1 -1
- package/funcs/usersUsersDeleteAccount.js +4 -0
- package/funcs/usersUsersDeleteAccount.js.map +1 -1
- package/funcs/usersUsersGetByEmail.d.ts +17 -0
- package/funcs/usersUsersGetByEmail.d.ts.map +1 -0
- package/funcs/usersUsersGetByEmail.js +108 -0
- package/funcs/usersUsersGetByEmail.js.map +1 -0
- package/funcs/v1Create.d.ts +16 -0
- package/funcs/v1Create.d.ts.map +1 -0
- package/funcs/v1Create.js +102 -0
- package/funcs/v1Create.js.map +1 -0
- package/funcs/v1Delete.d.ts +16 -0
- package/funcs/v1Delete.d.ts.map +1 -0
- package/funcs/v1Delete.js +103 -0
- package/funcs/v1Delete.js.map +1 -0
- package/funcs/v1List.d.ts +17 -0
- package/funcs/v1List.d.ts.map +1 -0
- package/funcs/v1List.js +114 -0
- package/funcs/v1List.js.map +1 -0
- package/funcs/v1Update.d.ts +16 -0
- package/funcs/v1Update.d.ts.map +1 -0
- package/funcs/v1Update.js +102 -0
- package/funcs/v1Update.js.map +1 -0
- package/funcs/v1UsersDeleteAccount.d.ts +4 -0
- package/funcs/v1UsersDeleteAccount.d.ts.map +1 -1
- package/funcs/v1UsersDeleteAccount.js +4 -0
- package/funcs/v1UsersDeleteAccount.js.map +1 -1
- package/funcs/v1UsersGetByEmail.d.ts +17 -0
- package/funcs/v1UsersGetByEmail.d.ts.map +1 -0
- package/funcs/v1UsersGetByEmail.js +108 -0
- package/funcs/v1UsersGetByEmail.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/campaignproperties.d.ts +3 -0
- package/models/components/campaignproperties.d.ts.map +1 -1
- package/models/components/campaignproperties.js +1 -0
- package/models/components/campaignproperties.js.map +1 -1
- package/models/components/index.d.ts +10 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +10 -0
- package/models/components/index.js.map +1 -1
- package/models/components/languagecode.d.ts +6 -0
- package/models/components/languagecode.d.ts.map +1 -1
- package/models/components/languagecode.js +2 -0
- package/models/components/languagecode.js.map +1 -1
- package/models/components/listresponseuserresponse.d.ts +53 -0
- package/models/components/listresponseuserresponse.d.ts.map +1 -0
- package/models/components/listresponseuserresponse.js +81 -0
- package/models/components/listresponseuserresponse.js.map +1 -0
- package/models/components/outboundcampaign.d.ts +8 -1
- package/models/components/outboundcampaign.d.ts.map +1 -1
- package/models/components/outboundcampaign.js +2 -0
- package/models/components/outboundcampaign.js.map +1 -1
- package/models/components/outboundcampaigninput.d.ts +8 -1
- package/models/components/outboundcampaigninput.d.ts.map +1 -1
- package/models/components/outboundcampaigninput.js +2 -0
- package/models/components/outboundcampaigninput.js.map +1 -1
- package/models/components/twiliolistnumbersresponse.d.ts +36 -0
- package/models/components/twiliolistnumbersresponse.d.ts.map +1 -0
- package/models/components/twiliolistnumbersresponse.js +69 -0
- package/models/components/twiliolistnumbersresponse.js.map +1 -0
- package/models/components/twilionumberupdaterequest.d.ts +40 -0
- package/models/components/twilionumberupdaterequest.d.ts.map +1 -0
- package/models/components/twilionumberupdaterequest.js +72 -0
- package/models/components/twilionumberupdaterequest.js.map +1 -0
- package/models/components/twilionumberupdateresponse.d.ts +35 -0
- package/models/components/twilionumberupdateresponse.d.ts.map +1 -0
- package/models/components/twilionumberupdateresponse.js +68 -0
- package/models/components/twilionumberupdateresponse.js.map +1 -0
- package/models/components/twiliophonenumber.d.ts +47 -0
- package/models/components/twiliophonenumber.d.ts.map +1 -0
- package/models/components/twiliophonenumber.js +78 -0
- package/models/components/twiliophonenumber.js.map +1 -0
- package/models/components/usercreaterequest.d.ts +50 -0
- package/models/components/usercreaterequest.d.ts.map +1 -0
- package/models/components/usercreaterequest.js +78 -0
- package/models/components/usercreaterequest.js.map +1 -0
- package/models/components/userdeleterequest.d.ts +40 -0
- package/models/components/userdeleterequest.d.ts.map +1 -0
- package/models/components/userdeleterequest.js +61 -0
- package/models/components/userdeleterequest.js.map +1 -0
- package/models/components/userproperties.d.ts +40 -0
- package/models/components/userproperties.d.ts.map +1 -0
- package/models/components/userproperties.js +55 -0
- package/models/components/userproperties.js.map +1 -0
- package/models/components/userresponse.d.ts +75 -0
- package/models/components/userresponse.d.ts.map +1 -0
- package/models/components/userresponse.js +97 -0
- package/models/components/userresponse.js.map +1 -0
- package/models/components/userupdaterequest.d.ts +55 -0
- package/models/components/userupdaterequest.d.ts.map +1 -0
- package/models/components/userupdaterequest.js +82 -0
- package/models/components/userupdaterequest.js.map +1 -0
- package/models/operations/channelstwilionumberslist.d.ts +29 -0
- package/models/operations/channelstwilionumberslist.d.ts.map +1 -0
- package/models/operations/channelstwilionumberslist.js +68 -0
- package/models/operations/channelstwilionumberslist.js.map +1 -0
- package/models/operations/channelstwilionumbersupdate.d.ts +32 -0
- package/models/operations/channelstwilionumbersupdate.d.ts.map +1 -0
- package/models/operations/channelstwilionumbersupdate.js +73 -0
- package/models/operations/channelstwilionumbersupdate.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/usersgetbyemail.d.ts +29 -0
- package/models/operations/usersgetbyemail.d.ts.map +1 -0
- package/models/operations/usersgetbyemail.js +68 -0
- package/models/operations/usersgetbyemail.js.map +1 -0
- package/models/operations/userslist.d.ts +73 -0
- package/models/operations/userslist.d.ts.map +1 -0
- package/models/operations/userslist.js +99 -0
- package/models/operations/userslist.js.map +1 -0
- package/openapi.json +1353 -343
- package/package.json +1 -1
- package/sdk/numbers.d.ts +14 -0
- package/sdk/numbers.d.ts.map +1 -1
- package/sdk/numbers.js +20 -0
- package/sdk/numbers.js.map +1 -1
- package/sdk/users.d.ts +41 -0
- package/sdk/users.d.ts.map +1 -1
- package/sdk/users.js +54 -0
- package/sdk/users.js.map +1 -1
- package/sdk/v1.d.ts +41 -0
- package/sdk/v1.d.ts.map +1 -1
- package/sdk/v1.js +54 -0
- package/sdk/v1.js.map +1 -1
- package/src/funcs/channelsTwilioNumbersList.ts +145 -0
- package/src/funcs/channelsTwilioNumbersUpdate.ts +148 -0
- package/src/funcs/usersCreate.ts +135 -0
- package/src/funcs/usersDelete.ts +136 -0
- package/src/funcs/usersList.ts +148 -0
- package/src/funcs/usersUpdate.ts +135 -0
- package/src/funcs/usersUsersDeleteAccount.ts +4 -0
- package/src/funcs/usersUsersGetByEmail.ts +142 -0
- package/src/funcs/v1Create.ts +135 -0
- package/src/funcs/v1Delete.ts +136 -0
- package/src/funcs/v1List.ts +148 -0
- package/src/funcs/v1Update.ts +135 -0
- package/src/funcs/v1UsersDeleteAccount.ts +4 -0
- package/src/funcs/v1UsersGetByEmail.ts +142 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/campaignproperties.ts +1 -0
- package/src/models/components/index.ts +10 -0
- package/src/models/components/languagecode.ts +2 -0
- package/src/models/components/listresponseuserresponse.ts +116 -0
- package/src/models/components/outboundcampaign.ts +10 -1
- package/src/models/components/outboundcampaigninput.ts +10 -1
- package/src/models/components/twiliolistnumbersresponse.ts +87 -0
- package/src/models/components/twilionumberupdaterequest.ts +90 -0
- package/src/models/components/twilionumberupdateresponse.ts +81 -0
- package/src/models/components/twiliophonenumber.ts +103 -0
- package/src/models/components/usercreaterequest.ts +106 -0
- package/src/models/components/userdeleterequest.ts +79 -0
- package/src/models/components/userproperties.ts +41 -0
- package/src/models/components/userresponse.ts +150 -0
- package/src/models/components/userupdaterequest.ts +115 -0
- package/src/models/operations/channelstwilionumberslist.ts +77 -0
- package/src/models/operations/channelstwilionumbersupdate.ts +87 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/usersgetbyemail.ts +75 -0
- package/src/models/operations/userslist.ts +149 -0
- package/src/sdk/numbers.ts +36 -0
- package/src/sdk/users.ts +96 -0
- package/src/sdk/v1.ts +96 -0
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.2",
|
|
60
|
-
sdkVersion: "0.1.0-alpha.
|
|
60
|
+
sdkVersion: "0.1.0-alpha.174",
|
|
61
61
|
genVersion: "2.512.4",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
63
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.174 2.512.4 0.0.2 syllable-sdk",
|
|
64
64
|
} as const;
|
|
@@ -123,6 +123,7 @@ export * from "./listresponseserviceresponse.js";
|
|
|
123
123
|
export * from "./listresponsesession.js";
|
|
124
124
|
export * from "./listresponsesessionlabel.js";
|
|
125
125
|
export * from "./listresponsetoolresponse.js";
|
|
126
|
+
export * from "./listresponseuserresponse.js";
|
|
126
127
|
export * from "./orderbydirection.js";
|
|
127
128
|
export * from "./outboundcampaign.js";
|
|
128
129
|
export * from "./outboundcampaigninput.js";
|
|
@@ -186,7 +187,16 @@ export * from "./twiliochannelconfigcreate.js";
|
|
|
186
187
|
export * from "./twiliochannelconfigupdate.js";
|
|
187
188
|
export * from "./twiliochannelcreaterequest.js";
|
|
188
189
|
export * from "./twiliochannelupdaterequest.js";
|
|
190
|
+
export * from "./twiliolistnumbersresponse.js";
|
|
189
191
|
export * from "./twilionumberaddrequest.js";
|
|
190
192
|
export * from "./twilionumberaddresponse.js";
|
|
193
|
+
export * from "./twilionumberupdaterequest.js";
|
|
194
|
+
export * from "./twilionumberupdateresponse.js";
|
|
195
|
+
export * from "./twiliophonenumber.js";
|
|
196
|
+
export * from "./usercreaterequest.js";
|
|
197
|
+
export * from "./userdeleterequest.js";
|
|
198
|
+
export * from "./userproperties.js";
|
|
199
|
+
export * from "./userresponse.js";
|
|
200
|
+
export * from "./userupdaterequest.js";
|
|
191
201
|
export * from "./validationerror.js";
|
|
192
202
|
export * from "./voicesamplecreaterequest.js";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
UserResponse,
|
|
12
|
+
UserResponse$inboundSchema,
|
|
13
|
+
UserResponse$Outbound,
|
|
14
|
+
UserResponse$outboundSchema,
|
|
15
|
+
} from "./userresponse.js";
|
|
16
|
+
|
|
17
|
+
export type ListResponseUserResponse = {
|
|
18
|
+
/**
|
|
19
|
+
* List of items returned from the query
|
|
20
|
+
*/
|
|
21
|
+
items: Array<UserResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* The page number of the results (0-based)
|
|
24
|
+
*/
|
|
25
|
+
page: number;
|
|
26
|
+
/**
|
|
27
|
+
* The number of items returned per page
|
|
28
|
+
*/
|
|
29
|
+
pageSize: number;
|
|
30
|
+
/**
|
|
31
|
+
* The total number of pages of results given the indicated page size
|
|
32
|
+
*/
|
|
33
|
+
totalPages?: number | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The total number of items returned from the query
|
|
36
|
+
*/
|
|
37
|
+
totalCount?: number | null | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ListResponseUserResponse$inboundSchema: z.ZodType<
|
|
42
|
+
ListResponseUserResponse,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
items: z.array(UserResponse$inboundSchema),
|
|
47
|
+
page: z.number().int(),
|
|
48
|
+
page_size: z.number().int(),
|
|
49
|
+
total_pages: z.nullable(z.number().int()).optional(),
|
|
50
|
+
total_count: z.nullable(z.number().int()).optional(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"page_size": "pageSize",
|
|
54
|
+
"total_pages": "totalPages",
|
|
55
|
+
"total_count": "totalCount",
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type ListResponseUserResponse$Outbound = {
|
|
61
|
+
items: Array<UserResponse$Outbound>;
|
|
62
|
+
page: number;
|
|
63
|
+
page_size: number;
|
|
64
|
+
total_pages?: number | null | undefined;
|
|
65
|
+
total_count?: number | null | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const ListResponseUserResponse$outboundSchema: z.ZodType<
|
|
70
|
+
ListResponseUserResponse$Outbound,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
ListResponseUserResponse
|
|
73
|
+
> = z.object({
|
|
74
|
+
items: z.array(UserResponse$outboundSchema),
|
|
75
|
+
page: z.number().int(),
|
|
76
|
+
pageSize: z.number().int(),
|
|
77
|
+
totalPages: z.nullable(z.number().int()).optional(),
|
|
78
|
+
totalCount: z.nullable(z.number().int()).optional(),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
pageSize: "page_size",
|
|
82
|
+
totalPages: "total_pages",
|
|
83
|
+
totalCount: "total_count",
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
90
|
+
*/
|
|
91
|
+
export namespace ListResponseUserResponse$ {
|
|
92
|
+
/** @deprecated use `ListResponseUserResponse$inboundSchema` instead. */
|
|
93
|
+
export const inboundSchema = ListResponseUserResponse$inboundSchema;
|
|
94
|
+
/** @deprecated use `ListResponseUserResponse$outboundSchema` instead. */
|
|
95
|
+
export const outboundSchema = ListResponseUserResponse$outboundSchema;
|
|
96
|
+
/** @deprecated use `ListResponseUserResponse$Outbound` instead. */
|
|
97
|
+
export type Outbound = ListResponseUserResponse$Outbound;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function listResponseUserResponseToJSON(
|
|
101
|
+
listResponseUserResponse: ListResponseUserResponse,
|
|
102
|
+
): string {
|
|
103
|
+
return JSON.stringify(
|
|
104
|
+
ListResponseUserResponse$outboundSchema.parse(listResponseUserResponse),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function listResponseUserResponseFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<ListResponseUserResponse, SDKValidationError> {
|
|
111
|
+
return safeParse(
|
|
112
|
+
jsonString,
|
|
113
|
+
(x) => ListResponseUserResponse$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
+
`Failed to parse 'ListResponseUserResponse' from JSON`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -23,9 +23,15 @@ export type OutboundCampaign = {
|
|
|
23
23
|
*/
|
|
24
24
|
description?: string | null | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* Label for campaign
|
|
26
|
+
* Label for campaign (DEPRECATED - use labels instead)
|
|
27
|
+
*
|
|
28
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
27
29
|
*/
|
|
28
30
|
label?: string | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Labels for campaign
|
|
33
|
+
*/
|
|
34
|
+
labels?: Array<string> | null | undefined;
|
|
29
35
|
/**
|
|
30
36
|
* Variables for campaign
|
|
31
37
|
*/
|
|
@@ -93,6 +99,7 @@ export const OutboundCampaign$inboundSchema: z.ZodType<
|
|
|
93
99
|
campaign_name: z.string(),
|
|
94
100
|
description: z.nullable(z.string()).optional(),
|
|
95
101
|
label: z.nullable(z.string()).optional(),
|
|
102
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
96
103
|
campaign_variables: z.record(z.string()),
|
|
97
104
|
daily_start_time: z.nullable(z.string()).optional(),
|
|
98
105
|
daily_end_time: z.nullable(z.string()).optional(),
|
|
@@ -132,6 +139,7 @@ export type OutboundCampaign$Outbound = {
|
|
|
132
139
|
campaign_name: string;
|
|
133
140
|
description?: string | null | undefined;
|
|
134
141
|
label?: string | null | undefined;
|
|
142
|
+
labels?: Array<string> | null | undefined;
|
|
135
143
|
campaign_variables: { [k: string]: string };
|
|
136
144
|
daily_start_time?: string | null | undefined;
|
|
137
145
|
daily_end_time?: string | null | undefined;
|
|
@@ -157,6 +165,7 @@ export const OutboundCampaign$outboundSchema: z.ZodType<
|
|
|
157
165
|
campaignName: z.string(),
|
|
158
166
|
description: z.nullable(z.string()).optional(),
|
|
159
167
|
label: z.nullable(z.string()).optional(),
|
|
168
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
160
169
|
campaignVariables: z.record(z.string()),
|
|
161
170
|
dailyStartTime: z.nullable(z.string()).optional(),
|
|
162
171
|
dailyEndTime: z.nullable(z.string()).optional(),
|
|
@@ -23,9 +23,15 @@ export type OutboundCampaignInput = {
|
|
|
23
23
|
*/
|
|
24
24
|
description?: string | null | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* Label for campaign
|
|
26
|
+
* Label for campaign (DEPRECATED - use labels instead)
|
|
27
|
+
*
|
|
28
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
27
29
|
*/
|
|
28
30
|
label?: string | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Labels for campaign
|
|
33
|
+
*/
|
|
34
|
+
labels?: Array<string> | null | undefined;
|
|
29
35
|
/**
|
|
30
36
|
* Variables for campaign
|
|
31
37
|
*/
|
|
@@ -73,6 +79,7 @@ export const OutboundCampaignInput$inboundSchema: z.ZodType<
|
|
|
73
79
|
campaign_name: z.string(),
|
|
74
80
|
description: z.nullable(z.string()).optional(),
|
|
75
81
|
label: z.nullable(z.string()).optional(),
|
|
82
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
76
83
|
campaign_variables: z.record(z.string()),
|
|
77
84
|
daily_start_time: z.nullable(z.string()).optional(),
|
|
78
85
|
daily_end_time: z.nullable(z.string()).optional(),
|
|
@@ -101,6 +108,7 @@ export type OutboundCampaignInput$Outbound = {
|
|
|
101
108
|
campaign_name: string;
|
|
102
109
|
description?: string | null | undefined;
|
|
103
110
|
label?: string | null | undefined;
|
|
111
|
+
labels?: Array<string> | null | undefined;
|
|
104
112
|
campaign_variables: { [k: string]: string };
|
|
105
113
|
daily_start_time?: string | null | undefined;
|
|
106
114
|
daily_end_time?: string | null | undefined;
|
|
@@ -121,6 +129,7 @@ export const OutboundCampaignInput$outboundSchema: z.ZodType<
|
|
|
121
129
|
campaignName: z.string(),
|
|
122
130
|
description: z.nullable(z.string()).optional(),
|
|
123
131
|
label: z.nullable(z.string()).optional(),
|
|
132
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
124
133
|
campaignVariables: z.record(z.string()),
|
|
125
134
|
dailyStartTime: z.nullable(z.string()).optional(),
|
|
126
135
|
dailyEndTime: z.nullable(z.string()).optional(),
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
TwilioPhoneNumber,
|
|
12
|
+
TwilioPhoneNumber$inboundSchema,
|
|
13
|
+
TwilioPhoneNumber$Outbound,
|
|
14
|
+
TwilioPhoneNumber$outboundSchema,
|
|
15
|
+
} from "./twiliophonenumber.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Response model for a list of Twilio phone numbers
|
|
19
|
+
*/
|
|
20
|
+
export type TwilioListNumbersResponse = {
|
|
21
|
+
/**
|
|
22
|
+
* List of phone numbers.
|
|
23
|
+
*/
|
|
24
|
+
phoneNumbers: Array<TwilioPhoneNumber>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const TwilioListNumbersResponse$inboundSchema: z.ZodType<
|
|
29
|
+
TwilioListNumbersResponse,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
phone_numbers: z.array(TwilioPhoneNumber$inboundSchema),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"phone_numbers": "phoneNumbers",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type TwilioListNumbersResponse$Outbound = {
|
|
42
|
+
phone_numbers: Array<TwilioPhoneNumber$Outbound>;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const TwilioListNumbersResponse$outboundSchema: z.ZodType<
|
|
47
|
+
TwilioListNumbersResponse$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
TwilioListNumbersResponse
|
|
50
|
+
> = z.object({
|
|
51
|
+
phoneNumbers: z.array(TwilioPhoneNumber$outboundSchema),
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
phoneNumbers: "phone_numbers",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
export namespace TwilioListNumbersResponse$ {
|
|
63
|
+
/** @deprecated use `TwilioListNumbersResponse$inboundSchema` instead. */
|
|
64
|
+
export const inboundSchema = TwilioListNumbersResponse$inboundSchema;
|
|
65
|
+
/** @deprecated use `TwilioListNumbersResponse$outboundSchema` instead. */
|
|
66
|
+
export const outboundSchema = TwilioListNumbersResponse$outboundSchema;
|
|
67
|
+
/** @deprecated use `TwilioListNumbersResponse$Outbound` instead. */
|
|
68
|
+
export type Outbound = TwilioListNumbersResponse$Outbound;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function twilioListNumbersResponseToJSON(
|
|
72
|
+
twilioListNumbersResponse: TwilioListNumbersResponse,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
TwilioListNumbersResponse$outboundSchema.parse(twilioListNumbersResponse),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function twilioListNumbersResponseFromJSON(
|
|
80
|
+
jsonString: string,
|
|
81
|
+
): SafeParseResult<TwilioListNumbersResponse, SDKValidationError> {
|
|
82
|
+
return safeParse(
|
|
83
|
+
jsonString,
|
|
84
|
+
(x) => TwilioListNumbersResponse$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
+
`Failed to parse 'TwilioListNumbersResponse' from JSON`,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Request model for updating a Twilio number and associating it with a channel.
|
|
13
|
+
*/
|
|
14
|
+
export type TwilioNumberUpdateRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* Friendly name for the Twilio number
|
|
17
|
+
*/
|
|
18
|
+
friendlyName: string;
|
|
19
|
+
/**
|
|
20
|
+
* Twilio number SID
|
|
21
|
+
*/
|
|
22
|
+
phoneSid: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const TwilioNumberUpdateRequest$inboundSchema: z.ZodType<
|
|
27
|
+
TwilioNumberUpdateRequest,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
friendly_name: z.string(),
|
|
32
|
+
phone_sid: z.string(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"friendly_name": "friendlyName",
|
|
36
|
+
"phone_sid": "phoneSid",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type TwilioNumberUpdateRequest$Outbound = {
|
|
42
|
+
friendly_name: string;
|
|
43
|
+
phone_sid: string;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const TwilioNumberUpdateRequest$outboundSchema: z.ZodType<
|
|
48
|
+
TwilioNumberUpdateRequest$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
TwilioNumberUpdateRequest
|
|
51
|
+
> = z.object({
|
|
52
|
+
friendlyName: z.string(),
|
|
53
|
+
phoneSid: z.string(),
|
|
54
|
+
}).transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
friendlyName: "friendly_name",
|
|
57
|
+
phoneSid: "phone_sid",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
|
+
*/
|
|
65
|
+
export namespace TwilioNumberUpdateRequest$ {
|
|
66
|
+
/** @deprecated use `TwilioNumberUpdateRequest$inboundSchema` instead. */
|
|
67
|
+
export const inboundSchema = TwilioNumberUpdateRequest$inboundSchema;
|
|
68
|
+
/** @deprecated use `TwilioNumberUpdateRequest$outboundSchema` instead. */
|
|
69
|
+
export const outboundSchema = TwilioNumberUpdateRequest$outboundSchema;
|
|
70
|
+
/** @deprecated use `TwilioNumberUpdateRequest$Outbound` instead. */
|
|
71
|
+
export type Outbound = TwilioNumberUpdateRequest$Outbound;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function twilioNumberUpdateRequestToJSON(
|
|
75
|
+
twilioNumberUpdateRequest: TwilioNumberUpdateRequest,
|
|
76
|
+
): string {
|
|
77
|
+
return JSON.stringify(
|
|
78
|
+
TwilioNumberUpdateRequest$outboundSchema.parse(twilioNumberUpdateRequest),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function twilioNumberUpdateRequestFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<TwilioNumberUpdateRequest, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) => TwilioNumberUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
+
`Failed to parse 'TwilioNumberUpdateRequest' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Response model for updating a Twilio number and associating it with a channel.
|
|
13
|
+
*/
|
|
14
|
+
export type TwilioNumberUpdateResponse = {
|
|
15
|
+
/**
|
|
16
|
+
* The updated Twilio phone number
|
|
17
|
+
*/
|
|
18
|
+
phoneNumber: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const TwilioNumberUpdateResponse$inboundSchema: z.ZodType<
|
|
23
|
+
TwilioNumberUpdateResponse,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
phone_number: z.string(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"phone_number": "phoneNumber",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type TwilioNumberUpdateResponse$Outbound = {
|
|
36
|
+
phone_number: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const TwilioNumberUpdateResponse$outboundSchema: z.ZodType<
|
|
41
|
+
TwilioNumberUpdateResponse$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
TwilioNumberUpdateResponse
|
|
44
|
+
> = z.object({
|
|
45
|
+
phoneNumber: z.string(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
phoneNumber: "phone_number",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace TwilioNumberUpdateResponse$ {
|
|
57
|
+
/** @deprecated use `TwilioNumberUpdateResponse$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = TwilioNumberUpdateResponse$inboundSchema;
|
|
59
|
+
/** @deprecated use `TwilioNumberUpdateResponse$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = TwilioNumberUpdateResponse$outboundSchema;
|
|
61
|
+
/** @deprecated use `TwilioNumberUpdateResponse$Outbound` instead. */
|
|
62
|
+
export type Outbound = TwilioNumberUpdateResponse$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function twilioNumberUpdateResponseToJSON(
|
|
66
|
+
twilioNumberUpdateResponse: TwilioNumberUpdateResponse,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
TwilioNumberUpdateResponse$outboundSchema.parse(twilioNumberUpdateResponse),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function twilioNumberUpdateResponseFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<TwilioNumberUpdateResponse, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => TwilioNumberUpdateResponse$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'TwilioNumberUpdateResponse' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type TwilioPhoneNumber = {
|
|
12
|
+
/**
|
|
13
|
+
* The unique identifier for the phone number.
|
|
14
|
+
*/
|
|
15
|
+
sid: string;
|
|
16
|
+
/**
|
|
17
|
+
* The phone number.
|
|
18
|
+
*/
|
|
19
|
+
phoneNumber: string;
|
|
20
|
+
/**
|
|
21
|
+
* A user-friendly name for the number.
|
|
22
|
+
*/
|
|
23
|
+
friendlyName: string;
|
|
24
|
+
/**
|
|
25
|
+
* Associated trunk SID, if any.
|
|
26
|
+
*/
|
|
27
|
+
trunkSid: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const TwilioPhoneNumber$inboundSchema: z.ZodType<
|
|
32
|
+
TwilioPhoneNumber,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
sid: z.string(),
|
|
37
|
+
phone_number: z.string(),
|
|
38
|
+
friendly_name: z.string(),
|
|
39
|
+
trunk_sid: z.string(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"phone_number": "phoneNumber",
|
|
43
|
+
"friendly_name": "friendlyName",
|
|
44
|
+
"trunk_sid": "trunkSid",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type TwilioPhoneNumber$Outbound = {
|
|
50
|
+
sid: string;
|
|
51
|
+
phone_number: string;
|
|
52
|
+
friendly_name: string;
|
|
53
|
+
trunk_sid: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const TwilioPhoneNumber$outboundSchema: z.ZodType<
|
|
58
|
+
TwilioPhoneNumber$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
TwilioPhoneNumber
|
|
61
|
+
> = z.object({
|
|
62
|
+
sid: z.string(),
|
|
63
|
+
phoneNumber: z.string(),
|
|
64
|
+
friendlyName: z.string(),
|
|
65
|
+
trunkSid: z.string(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
phoneNumber: "phone_number",
|
|
69
|
+
friendlyName: "friendly_name",
|
|
70
|
+
trunkSid: "trunk_sid",
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
77
|
+
*/
|
|
78
|
+
export namespace TwilioPhoneNumber$ {
|
|
79
|
+
/** @deprecated use `TwilioPhoneNumber$inboundSchema` instead. */
|
|
80
|
+
export const inboundSchema = TwilioPhoneNumber$inboundSchema;
|
|
81
|
+
/** @deprecated use `TwilioPhoneNumber$outboundSchema` instead. */
|
|
82
|
+
export const outboundSchema = TwilioPhoneNumber$outboundSchema;
|
|
83
|
+
/** @deprecated use `TwilioPhoneNumber$Outbound` instead. */
|
|
84
|
+
export type Outbound = TwilioPhoneNumber$Outbound;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function twilioPhoneNumberToJSON(
|
|
88
|
+
twilioPhoneNumber: TwilioPhoneNumber,
|
|
89
|
+
): string {
|
|
90
|
+
return JSON.stringify(
|
|
91
|
+
TwilioPhoneNumber$outboundSchema.parse(twilioPhoneNumber),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function twilioPhoneNumberFromJSON(
|
|
96
|
+
jsonString: string,
|
|
97
|
+
): SafeParseResult<TwilioPhoneNumber, SDKValidationError> {
|
|
98
|
+
return safeParse(
|
|
99
|
+
jsonString,
|
|
100
|
+
(x) => TwilioPhoneNumber$inboundSchema.parse(JSON.parse(x)),
|
|
101
|
+
`Failed to parse 'TwilioPhoneNumber' from JSON`,
|
|
102
|
+
);
|
|
103
|
+
}
|