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
|
@@ -0,0 +1,106 @@
|
|
|
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 to create a user.
|
|
13
|
+
*/
|
|
14
|
+
export type UserCreateRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* Email address of the user
|
|
17
|
+
*/
|
|
18
|
+
email: string;
|
|
19
|
+
/**
|
|
20
|
+
* First name of the user
|
|
21
|
+
*/
|
|
22
|
+
firstName?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Last name of the user
|
|
25
|
+
*/
|
|
26
|
+
lastName?: string | null | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* ID of the role assigned to the user
|
|
29
|
+
*/
|
|
30
|
+
roleId: number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const UserCreateRequest$inboundSchema: z.ZodType<
|
|
35
|
+
UserCreateRequest,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.object({
|
|
39
|
+
email: z.string(),
|
|
40
|
+
first_name: z.nullable(z.string()).optional(),
|
|
41
|
+
last_name: z.nullable(z.string()).optional(),
|
|
42
|
+
role_id: z.number().int(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"first_name": "firstName",
|
|
46
|
+
"last_name": "lastName",
|
|
47
|
+
"role_id": "roleId",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type UserCreateRequest$Outbound = {
|
|
53
|
+
email: string;
|
|
54
|
+
first_name?: string | null | undefined;
|
|
55
|
+
last_name?: string | null | undefined;
|
|
56
|
+
role_id: number;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const UserCreateRequest$outboundSchema: z.ZodType<
|
|
61
|
+
UserCreateRequest$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
UserCreateRequest
|
|
64
|
+
> = z.object({
|
|
65
|
+
email: z.string(),
|
|
66
|
+
firstName: z.nullable(z.string()).optional(),
|
|
67
|
+
lastName: z.nullable(z.string()).optional(),
|
|
68
|
+
roleId: z.number().int(),
|
|
69
|
+
}).transform((v) => {
|
|
70
|
+
return remap$(v, {
|
|
71
|
+
firstName: "first_name",
|
|
72
|
+
lastName: "last_name",
|
|
73
|
+
roleId: "role_id",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
+
*/
|
|
81
|
+
export namespace UserCreateRequest$ {
|
|
82
|
+
/** @deprecated use `UserCreateRequest$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = UserCreateRequest$inboundSchema;
|
|
84
|
+
/** @deprecated use `UserCreateRequest$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = UserCreateRequest$outboundSchema;
|
|
86
|
+
/** @deprecated use `UserCreateRequest$Outbound` instead. */
|
|
87
|
+
export type Outbound = UserCreateRequest$Outbound;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function userCreateRequestToJSON(
|
|
91
|
+
userCreateRequest: UserCreateRequest,
|
|
92
|
+
): string {
|
|
93
|
+
return JSON.stringify(
|
|
94
|
+
UserCreateRequest$outboundSchema.parse(userCreateRequest),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function userCreateRequestFromJSON(
|
|
99
|
+
jsonString: string,
|
|
100
|
+
): SafeParseResult<UserCreateRequest, SDKValidationError> {
|
|
101
|
+
return safeParse(
|
|
102
|
+
jsonString,
|
|
103
|
+
(x) => UserCreateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
104
|
+
`Failed to parse 'UserCreateRequest' from JSON`,
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Request model to delete a user.
|
|
12
|
+
*/
|
|
13
|
+
export type UserDeleteRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* The email address of the user to delete
|
|
16
|
+
*/
|
|
17
|
+
email: string;
|
|
18
|
+
/**
|
|
19
|
+
* The reason for deleting the user
|
|
20
|
+
*/
|
|
21
|
+
reason: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const UserDeleteRequest$inboundSchema: z.ZodType<
|
|
26
|
+
UserDeleteRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
email: z.string(),
|
|
31
|
+
reason: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type UserDeleteRequest$Outbound = {
|
|
36
|
+
email: string;
|
|
37
|
+
reason: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const UserDeleteRequest$outboundSchema: z.ZodType<
|
|
42
|
+
UserDeleteRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
UserDeleteRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
email: z.string(),
|
|
47
|
+
reason: z.string(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace UserDeleteRequest$ {
|
|
55
|
+
/** @deprecated use `UserDeleteRequest$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = UserDeleteRequest$inboundSchema;
|
|
57
|
+
/** @deprecated use `UserDeleteRequest$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = UserDeleteRequest$outboundSchema;
|
|
59
|
+
/** @deprecated use `UserDeleteRequest$Outbound` instead. */
|
|
60
|
+
export type Outbound = UserDeleteRequest$Outbound;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function userDeleteRequestToJSON(
|
|
64
|
+
userDeleteRequest: UserDeleteRequest,
|
|
65
|
+
): string {
|
|
66
|
+
return JSON.stringify(
|
|
67
|
+
UserDeleteRequest$outboundSchema.parse(userDeleteRequest),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function userDeleteRequestFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<UserDeleteRequest, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => UserDeleteRequest$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'UserDeleteRequest' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Names of user fields supported for filtering/sorting on list endpoint.
|
|
10
|
+
*/
|
|
11
|
+
export const UserProperties = {
|
|
12
|
+
Email: "email",
|
|
13
|
+
FirstName: "first_name",
|
|
14
|
+
LastName: "last_name",
|
|
15
|
+
RoleId: "role_id",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* Names of user fields supported for filtering/sorting on list endpoint.
|
|
19
|
+
*/
|
|
20
|
+
export type UserProperties = ClosedEnum<typeof UserProperties>;
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const UserProperties$inboundSchema: z.ZodNativeEnum<
|
|
24
|
+
typeof UserProperties
|
|
25
|
+
> = z.nativeEnum(UserProperties);
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const UserProperties$outboundSchema: z.ZodNativeEnum<
|
|
29
|
+
typeof UserProperties
|
|
30
|
+
> = UserProperties$inboundSchema;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
35
|
+
*/
|
|
36
|
+
export namespace UserProperties$ {
|
|
37
|
+
/** @deprecated use `UserProperties$inboundSchema` instead. */
|
|
38
|
+
export const inboundSchema = UserProperties$inboundSchema;
|
|
39
|
+
/** @deprecated use `UserProperties$outboundSchema` instead. */
|
|
40
|
+
export const outboundSchema = UserProperties$outboundSchema;
|
|
41
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
* Information about a user.
|
|
13
|
+
*/
|
|
14
|
+
export type UserResponse = {
|
|
15
|
+
/**
|
|
16
|
+
* Email address of the user
|
|
17
|
+
*/
|
|
18
|
+
email: string;
|
|
19
|
+
/**
|
|
20
|
+
* First name of the user
|
|
21
|
+
*/
|
|
22
|
+
firstName?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Last name of the user
|
|
25
|
+
*/
|
|
26
|
+
lastName?: string | null | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* ID of the role assigned to the user
|
|
29
|
+
*/
|
|
30
|
+
roleId: number;
|
|
31
|
+
/**
|
|
32
|
+
* Comments for the most recent edit to the user.
|
|
33
|
+
*/
|
|
34
|
+
lastUpdatedComments?: string | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Internal ID of the user
|
|
37
|
+
*/
|
|
38
|
+
id: number;
|
|
39
|
+
/**
|
|
40
|
+
* The timestamp of the most recent update to the user
|
|
41
|
+
*/
|
|
42
|
+
lastUpdated: Date;
|
|
43
|
+
/**
|
|
44
|
+
* The email address of the user who last updated the user
|
|
45
|
+
*/
|
|
46
|
+
lastUpdatedBy?: string | null | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The timestamp of the user's last session
|
|
49
|
+
*/
|
|
50
|
+
lastSessionAt?: Date | null | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const UserResponse$inboundSchema: z.ZodType<
|
|
55
|
+
UserResponse,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
unknown
|
|
58
|
+
> = z.object({
|
|
59
|
+
email: z.string(),
|
|
60
|
+
first_name: z.nullable(z.string()).optional(),
|
|
61
|
+
last_name: z.nullable(z.string()).optional(),
|
|
62
|
+
role_id: z.number().int(),
|
|
63
|
+
last_updated_comments: z.nullable(z.string()).optional(),
|
|
64
|
+
id: z.number().int(),
|
|
65
|
+
last_updated: z.string().datetime({ offset: true }).transform(v =>
|
|
66
|
+
new Date(v)
|
|
67
|
+
),
|
|
68
|
+
last_updated_by: z.nullable(z.string()).optional(),
|
|
69
|
+
last_session_at: z.nullable(
|
|
70
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
71
|
+
).optional(),
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
"first_name": "firstName",
|
|
75
|
+
"last_name": "lastName",
|
|
76
|
+
"role_id": "roleId",
|
|
77
|
+
"last_updated_comments": "lastUpdatedComments",
|
|
78
|
+
"last_updated": "lastUpdated",
|
|
79
|
+
"last_updated_by": "lastUpdatedBy",
|
|
80
|
+
"last_session_at": "lastSessionAt",
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type UserResponse$Outbound = {
|
|
86
|
+
email: string;
|
|
87
|
+
first_name?: string | null | undefined;
|
|
88
|
+
last_name?: string | null | undefined;
|
|
89
|
+
role_id: number;
|
|
90
|
+
last_updated_comments?: string | null | undefined;
|
|
91
|
+
id: number;
|
|
92
|
+
last_updated: string;
|
|
93
|
+
last_updated_by?: string | null | undefined;
|
|
94
|
+
last_session_at?: string | null | undefined;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const UserResponse$outboundSchema: z.ZodType<
|
|
99
|
+
UserResponse$Outbound,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
UserResponse
|
|
102
|
+
> = z.object({
|
|
103
|
+
email: z.string(),
|
|
104
|
+
firstName: z.nullable(z.string()).optional(),
|
|
105
|
+
lastName: z.nullable(z.string()).optional(),
|
|
106
|
+
roleId: z.number().int(),
|
|
107
|
+
lastUpdatedComments: z.nullable(z.string()).optional(),
|
|
108
|
+
id: z.number().int(),
|
|
109
|
+
lastUpdated: z.date().transform(v => v.toISOString()),
|
|
110
|
+
lastUpdatedBy: z.nullable(z.string()).optional(),
|
|
111
|
+
lastSessionAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
112
|
+
.optional(),
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return remap$(v, {
|
|
115
|
+
firstName: "first_name",
|
|
116
|
+
lastName: "last_name",
|
|
117
|
+
roleId: "role_id",
|
|
118
|
+
lastUpdatedComments: "last_updated_comments",
|
|
119
|
+
lastUpdated: "last_updated",
|
|
120
|
+
lastUpdatedBy: "last_updated_by",
|
|
121
|
+
lastSessionAt: "last_session_at",
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
|
+
*/
|
|
129
|
+
export namespace UserResponse$ {
|
|
130
|
+
/** @deprecated use `UserResponse$inboundSchema` instead. */
|
|
131
|
+
export const inboundSchema = UserResponse$inboundSchema;
|
|
132
|
+
/** @deprecated use `UserResponse$outboundSchema` instead. */
|
|
133
|
+
export const outboundSchema = UserResponse$outboundSchema;
|
|
134
|
+
/** @deprecated use `UserResponse$Outbound` instead. */
|
|
135
|
+
export type Outbound = UserResponse$Outbound;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function userResponseToJSON(userResponse: UserResponse): string {
|
|
139
|
+
return JSON.stringify(UserResponse$outboundSchema.parse(userResponse));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function userResponseFromJSON(
|
|
143
|
+
jsonString: string,
|
|
144
|
+
): SafeParseResult<UserResponse, SDKValidationError> {
|
|
145
|
+
return safeParse(
|
|
146
|
+
jsonString,
|
|
147
|
+
(x) => UserResponse$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'UserResponse' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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 to update an existing user.
|
|
13
|
+
*/
|
|
14
|
+
export type UserUpdateRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* Email address of the user
|
|
17
|
+
*/
|
|
18
|
+
email: string;
|
|
19
|
+
/**
|
|
20
|
+
* First name of the user
|
|
21
|
+
*/
|
|
22
|
+
firstName?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Last name of the user
|
|
25
|
+
*/
|
|
26
|
+
lastName?: string | null | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* ID of the role assigned to the user
|
|
29
|
+
*/
|
|
30
|
+
roleId: number;
|
|
31
|
+
/**
|
|
32
|
+
* Comments for the most recent edit to the user.
|
|
33
|
+
*/
|
|
34
|
+
lastUpdatedComments?: string | null | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const UserUpdateRequest$inboundSchema: z.ZodType<
|
|
39
|
+
UserUpdateRequest,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
email: z.string(),
|
|
44
|
+
first_name: z.nullable(z.string()).optional(),
|
|
45
|
+
last_name: z.nullable(z.string()).optional(),
|
|
46
|
+
role_id: z.number().int(),
|
|
47
|
+
last_updated_comments: z.nullable(z.string()).optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"first_name": "firstName",
|
|
51
|
+
"last_name": "lastName",
|
|
52
|
+
"role_id": "roleId",
|
|
53
|
+
"last_updated_comments": "lastUpdatedComments",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type UserUpdateRequest$Outbound = {
|
|
59
|
+
email: string;
|
|
60
|
+
first_name?: string | null | undefined;
|
|
61
|
+
last_name?: string | null | undefined;
|
|
62
|
+
role_id: number;
|
|
63
|
+
last_updated_comments?: string | null | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const UserUpdateRequest$outboundSchema: z.ZodType<
|
|
68
|
+
UserUpdateRequest$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
UserUpdateRequest
|
|
71
|
+
> = z.object({
|
|
72
|
+
email: z.string(),
|
|
73
|
+
firstName: z.nullable(z.string()).optional(),
|
|
74
|
+
lastName: z.nullable(z.string()).optional(),
|
|
75
|
+
roleId: z.number().int(),
|
|
76
|
+
lastUpdatedComments: z.nullable(z.string()).optional(),
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
firstName: "first_name",
|
|
80
|
+
lastName: "last_name",
|
|
81
|
+
roleId: "role_id",
|
|
82
|
+
lastUpdatedComments: "last_updated_comments",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
89
|
+
*/
|
|
90
|
+
export namespace UserUpdateRequest$ {
|
|
91
|
+
/** @deprecated use `UserUpdateRequest$inboundSchema` instead. */
|
|
92
|
+
export const inboundSchema = UserUpdateRequest$inboundSchema;
|
|
93
|
+
/** @deprecated use `UserUpdateRequest$outboundSchema` instead. */
|
|
94
|
+
export const outboundSchema = UserUpdateRequest$outboundSchema;
|
|
95
|
+
/** @deprecated use `UserUpdateRequest$Outbound` instead. */
|
|
96
|
+
export type Outbound = UserUpdateRequest$Outbound;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function userUpdateRequestToJSON(
|
|
100
|
+
userUpdateRequest: UserUpdateRequest,
|
|
101
|
+
): string {
|
|
102
|
+
return JSON.stringify(
|
|
103
|
+
UserUpdateRequest$outboundSchema.parse(userUpdateRequest),
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function userUpdateRequestFromJSON(
|
|
108
|
+
jsonString: string,
|
|
109
|
+
): SafeParseResult<UserUpdateRequest, SDKValidationError> {
|
|
110
|
+
return safeParse(
|
|
111
|
+
jsonString,
|
|
112
|
+
(x) => UserUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
113
|
+
`Failed to parse 'UserUpdateRequest' from JSON`,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 ChannelsTwilioNumbersListRequest = {
|
|
12
|
+
channelId: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ChannelsTwilioNumbersListRequest$inboundSchema: z.ZodType<
|
|
17
|
+
ChannelsTwilioNumbersListRequest,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
channel_id: z.number().int(),
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return remap$(v, {
|
|
24
|
+
"channel_id": "channelId",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type ChannelsTwilioNumbersListRequest$Outbound = {
|
|
30
|
+
channel_id: number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const ChannelsTwilioNumbersListRequest$outboundSchema: z.ZodType<
|
|
35
|
+
ChannelsTwilioNumbersListRequest$Outbound,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
ChannelsTwilioNumbersListRequest
|
|
38
|
+
> = z.object({
|
|
39
|
+
channelId: z.number().int(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
channelId: "channel_id",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace ChannelsTwilioNumbersListRequest$ {
|
|
51
|
+
/** @deprecated use `ChannelsTwilioNumbersListRequest$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = ChannelsTwilioNumbersListRequest$inboundSchema;
|
|
53
|
+
/** @deprecated use `ChannelsTwilioNumbersListRequest$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = ChannelsTwilioNumbersListRequest$outboundSchema;
|
|
55
|
+
/** @deprecated use `ChannelsTwilioNumbersListRequest$Outbound` instead. */
|
|
56
|
+
export type Outbound = ChannelsTwilioNumbersListRequest$Outbound;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function channelsTwilioNumbersListRequestToJSON(
|
|
60
|
+
channelsTwilioNumbersListRequest: ChannelsTwilioNumbersListRequest,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
ChannelsTwilioNumbersListRequest$outboundSchema.parse(
|
|
64
|
+
channelsTwilioNumbersListRequest,
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function channelsTwilioNumbersListRequestFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<ChannelsTwilioNumbersListRequest, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => ChannelsTwilioNumbersListRequest$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'ChannelsTwilioNumbersListRequest' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ChannelsTwilioNumbersUpdateRequest = {
|
|
13
|
+
channelId: number;
|
|
14
|
+
twilioNumberUpdateRequest: components.TwilioNumberUpdateRequest;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ChannelsTwilioNumbersUpdateRequest$inboundSchema: z.ZodType<
|
|
19
|
+
ChannelsTwilioNumbersUpdateRequest,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
channel_id: z.number().int(),
|
|
24
|
+
TwilioNumberUpdateRequest: components.TwilioNumberUpdateRequest$inboundSchema,
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"channel_id": "channelId",
|
|
28
|
+
"TwilioNumberUpdateRequest": "twilioNumberUpdateRequest",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type ChannelsTwilioNumbersUpdateRequest$Outbound = {
|
|
34
|
+
channel_id: number;
|
|
35
|
+
TwilioNumberUpdateRequest: components.TwilioNumberUpdateRequest$Outbound;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const ChannelsTwilioNumbersUpdateRequest$outboundSchema: z.ZodType<
|
|
40
|
+
ChannelsTwilioNumbersUpdateRequest$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
ChannelsTwilioNumbersUpdateRequest
|
|
43
|
+
> = z.object({
|
|
44
|
+
channelId: z.number().int(),
|
|
45
|
+
twilioNumberUpdateRequest:
|
|
46
|
+
components.TwilioNumberUpdateRequest$outboundSchema,
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
channelId: "channel_id",
|
|
50
|
+
twilioNumberUpdateRequest: "TwilioNumberUpdateRequest",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace ChannelsTwilioNumbersUpdateRequest$ {
|
|
59
|
+
/** @deprecated use `ChannelsTwilioNumbersUpdateRequest$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = ChannelsTwilioNumbersUpdateRequest$inboundSchema;
|
|
61
|
+
/** @deprecated use `ChannelsTwilioNumbersUpdateRequest$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema =
|
|
63
|
+
ChannelsTwilioNumbersUpdateRequest$outboundSchema;
|
|
64
|
+
/** @deprecated use `ChannelsTwilioNumbersUpdateRequest$Outbound` instead. */
|
|
65
|
+
export type Outbound = ChannelsTwilioNumbersUpdateRequest$Outbound;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function channelsTwilioNumbersUpdateRequestToJSON(
|
|
69
|
+
channelsTwilioNumbersUpdateRequest: ChannelsTwilioNumbersUpdateRequest,
|
|
70
|
+
): string {
|
|
71
|
+
return JSON.stringify(
|
|
72
|
+
ChannelsTwilioNumbersUpdateRequest$outboundSchema.parse(
|
|
73
|
+
channelsTwilioNumbersUpdateRequest,
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function channelsTwilioNumbersUpdateRequestFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<ChannelsTwilioNumbersUpdateRequest, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) =>
|
|
84
|
+
ChannelsTwilioNumbersUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
+
`Failed to parse 'ChannelsTwilioNumbersUpdateRequest' from JSON`,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -9,6 +9,8 @@ export * from "./availabletargets.js";
|
|
|
9
9
|
export * from "./channelslist.js";
|
|
10
10
|
export * from "./channelstwiliogetbyid.js";
|
|
11
11
|
export * from "./channelstwilionumbersadd.js";
|
|
12
|
+
export * from "./channelstwilionumberslist.js";
|
|
13
|
+
export * from "./channelstwilionumbersupdate.js";
|
|
12
14
|
export * from "./channeltargetscreate.js";
|
|
13
15
|
export * from "./channeltargetsdelete.js";
|
|
14
16
|
export * from "./channeltargetsgetbyid.js";
|
|
@@ -87,3 +89,5 @@ export * from "./takeoutsgetfile.js";
|
|
|
87
89
|
export * from "./tooldelete.js";
|
|
88
90
|
export * from "./toolgetbyname.js";
|
|
89
91
|
export * from "./toollist.js";
|
|
92
|
+
export * from "./usersgetbyemail.js";
|
|
93
|
+
export * from "./userslist.js";
|