syllable-sdk 0.1.0-alpha.192 → 0.1.0-alpha.196

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.
Files changed (87) hide show
  1. package/README.md +4 -0
  2. package/docs/sdks/batches/README.md +4 -4
  3. package/docs/sdks/roles/README.md +4 -4
  4. package/docs/sdks/users/README.md +88 -8
  5. package/docs/sdks/v1/README.md +88 -8
  6. package/docs/sdks/workflows/README.md +8 -8
  7. package/funcs/usersUsersSendEmail.d.ts +16 -0
  8. package/funcs/usersUsersSendEmail.d.ts.map +1 -0
  9. package/funcs/usersUsersSendEmail.js +108 -0
  10. package/funcs/usersUsersSendEmail.js.map +1 -0
  11. package/funcs/v1UsersSendEmail.d.ts +16 -0
  12. package/funcs/v1UsersSendEmail.d.ts.map +1 -0
  13. package/funcs/v1UsersSendEmail.js +108 -0
  14. package/funcs/v1UsersSendEmail.js.map +1 -0
  15. package/jsr.json +1 -1
  16. package/lib/config.d.ts +2 -2
  17. package/lib/config.js +2 -2
  18. package/models/components/agentvoicedisplayname.d.ts +144 -0
  19. package/models/components/agentvoicedisplayname.d.ts.map +1 -1
  20. package/models/components/agentvoicedisplayname.js +48 -0
  21. package/models/components/agentvoicedisplayname.js.map +1 -1
  22. package/models/components/agentvoicemodel.d.ts +3 -0
  23. package/models/components/agentvoicemodel.d.ts.map +1 -1
  24. package/models/components/agentvoicemodel.js +1 -0
  25. package/models/components/agentvoicemodel.js.map +1 -1
  26. package/models/components/agentvoicevarname.d.ts +144 -0
  27. package/models/components/agentvoicevarname.d.ts.map +1 -1
  28. package/models/components/agentvoicevarname.js +48 -0
  29. package/models/components/agentvoicevarname.js.map +1 -1
  30. package/models/components/index.d.ts +2 -0
  31. package/models/components/index.d.ts.map +1 -1
  32. package/models/components/index.js +2 -0
  33. package/models/components/index.js.map +1 -1
  34. package/models/components/logintype.d.ts +34 -0
  35. package/models/components/logintype.d.ts.map +1 -0
  36. package/models/components/logintype.js +54 -0
  37. package/models/components/logintype.js.map +1 -0
  38. package/models/components/useractivitystatus.d.ts +31 -0
  39. package/models/components/useractivitystatus.d.ts.map +1 -0
  40. package/models/components/useractivitystatus.js +51 -0
  41. package/models/components/useractivitystatus.js.map +1 -0
  42. package/models/components/usercreaterequest.d.ts +6 -0
  43. package/models/components/usercreaterequest.d.ts.map +1 -1
  44. package/models/components/usercreaterequest.js +5 -0
  45. package/models/components/usercreaterequest.js.map +1 -1
  46. package/models/components/userproperties.d.ts +6 -0
  47. package/models/components/userproperties.d.ts.map +1 -1
  48. package/models/components/userproperties.js +2 -0
  49. package/models/components/userproperties.js.map +1 -1
  50. package/models/components/userresponse.d.ts +8 -0
  51. package/models/components/userresponse.d.ts.map +1 -1
  52. package/models/components/userresponse.js +9 -0
  53. package/models/components/userresponse.js.map +1 -1
  54. package/models/operations/index.d.ts +1 -0
  55. package/models/operations/index.d.ts.map +1 -1
  56. package/models/operations/index.js +1 -0
  57. package/models/operations/index.js.map +1 -1
  58. package/models/operations/userssendemail.d.ts +29 -0
  59. package/models/operations/userssendemail.d.ts.map +1 -0
  60. package/models/operations/userssendemail.js +68 -0
  61. package/models/operations/userssendemail.js.map +1 -0
  62. package/openapi.json +238 -43
  63. package/package.json +1 -1
  64. package/sdk/users.d.ts +7 -0
  65. package/sdk/users.d.ts.map +1 -1
  66. package/sdk/users.js +10 -0
  67. package/sdk/users.js.map +1 -1
  68. package/sdk/v1.d.ts +7 -0
  69. package/sdk/v1.d.ts.map +1 -1
  70. package/sdk/v1.js +10 -0
  71. package/sdk/v1.js.map +1 -1
  72. package/src/funcs/usersUsersSendEmail.ts +142 -0
  73. package/src/funcs/v1UsersSendEmail.ts +142 -0
  74. package/src/lib/config.ts +2 -2
  75. package/src/models/components/agentvoicedisplayname.ts +48 -0
  76. package/src/models/components/agentvoicemodel.ts +1 -0
  77. package/src/models/components/agentvoicevarname.ts +48 -0
  78. package/src/models/components/index.ts +2 -0
  79. package/src/models/components/logintype.ts +37 -0
  80. package/src/models/components/useractivitystatus.ts +34 -0
  81. package/src/models/components/usercreaterequest.ts +14 -0
  82. package/src/models/components/userproperties.ts +2 -0
  83. package/src/models/components/userresponse.ts +20 -0
  84. package/src/models/operations/index.ts +1 -0
  85. package/src/models/operations/userssendemail.ts +75 -0
  86. package/src/sdk/users.ts +18 -0
  87. package/src/sdk/v1.ts +18 -0
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ LoginType,
12
+ LoginType$inboundSchema,
13
+ LoginType$outboundSchema,
14
+ } from "./logintype.js";
10
15
 
11
16
  /**
12
17
  * Request model to create a user.
@@ -28,6 +33,10 @@ export type UserCreateRequest = {
28
33
  * ID of the role assigned to the user
29
34
  */
30
35
  roleId: number;
36
+ /**
37
+ * The type of login to use for the user. If not provided, defaults to google for @gmail.com email addresses, and username and password otherwise.
38
+ */
39
+ loginType?: LoginType | null | undefined;
31
40
  };
32
41
 
33
42
  /** @internal */
@@ -40,11 +49,13 @@ export const UserCreateRequest$inboundSchema: z.ZodType<
40
49
  first_name: z.nullable(z.string()).optional(),
41
50
  last_name: z.nullable(z.string()).optional(),
42
51
  role_id: z.number().int(),
52
+ login_type: z.nullable(LoginType$inboundSchema).optional(),
43
53
  }).transform((v) => {
44
54
  return remap$(v, {
45
55
  "first_name": "firstName",
46
56
  "last_name": "lastName",
47
57
  "role_id": "roleId",
58
+ "login_type": "loginType",
48
59
  });
49
60
  });
50
61
 
@@ -54,6 +65,7 @@ export type UserCreateRequest$Outbound = {
54
65
  first_name?: string | null | undefined;
55
66
  last_name?: string | null | undefined;
56
67
  role_id: number;
68
+ login_type?: string | null | undefined;
57
69
  };
58
70
 
59
71
  /** @internal */
@@ -66,11 +78,13 @@ export const UserCreateRequest$outboundSchema: z.ZodType<
66
78
  firstName: z.nullable(z.string()).optional(),
67
79
  lastName: z.nullable(z.string()).optional(),
68
80
  roleId: z.number().int(),
81
+ loginType: z.nullable(LoginType$outboundSchema).optional(),
69
82
  }).transform((v) => {
70
83
  return remap$(v, {
71
84
  firstName: "first_name",
72
85
  lastName: "last_name",
73
86
  roleId: "role_id",
87
+ loginType: "login_type",
74
88
  });
75
89
  });
76
90
 
@@ -13,7 +13,9 @@ export const UserProperties = {
13
13
  FirstName: "first_name",
14
14
  LastName: "last_name",
15
15
  RoleId: "role_id",
16
+ RoleName: "role_name",
16
17
  EmailFirstNameLastName: "email_first_name_last_name",
18
+ ActivityStatus: "activity_status",
17
19
  LastUpdated: "last_updated",
18
20
  } as const;
19
21
  /**
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ UserActivityStatus,
12
+ UserActivityStatus$inboundSchema,
13
+ UserActivityStatus$outboundSchema,
14
+ } from "./useractivitystatus.js";
10
15
 
11
16
  /**
12
17
  * Information about a user.
@@ -40,6 +45,11 @@ export type UserResponse = {
40
45
  * Name of the role assigned to the user
41
46
  */
42
47
  roleName: string;
48
+ /**
49
+ * Whether the welcome email has been sent to the user
50
+ */
51
+ emailSent: boolean;
52
+ activityStatus: UserActivityStatus;
43
53
  /**
44
54
  * The timestamp of the most recent update to the user
45
55
  */
@@ -67,6 +77,8 @@ export const UserResponse$inboundSchema: z.ZodType<
67
77
  last_updated_comments: z.nullable(z.string()).optional(),
68
78
  id: z.number().int(),
69
79
  role_name: z.string(),
80
+ email_sent: z.boolean(),
81
+ activity_status: UserActivityStatus$inboundSchema,
70
82
  last_updated: z.string().datetime({ offset: true }).transform(v =>
71
83
  new Date(v)
72
84
  ),
@@ -81,6 +93,8 @@ export const UserResponse$inboundSchema: z.ZodType<
81
93
  "role_id": "roleId",
82
94
  "last_updated_comments": "lastUpdatedComments",
83
95
  "role_name": "roleName",
96
+ "email_sent": "emailSent",
97
+ "activity_status": "activityStatus",
84
98
  "last_updated": "lastUpdated",
85
99
  "last_updated_by": "lastUpdatedBy",
86
100
  "last_session_at": "lastSessionAt",
@@ -96,6 +110,8 @@ export type UserResponse$Outbound = {
96
110
  last_updated_comments?: string | null | undefined;
97
111
  id: number;
98
112
  role_name: string;
113
+ email_sent: boolean;
114
+ activity_status: string;
99
115
  last_updated: string;
100
116
  last_updated_by?: string | null | undefined;
101
117
  last_session_at?: string | null | undefined;
@@ -114,6 +130,8 @@ export const UserResponse$outboundSchema: z.ZodType<
114
130
  lastUpdatedComments: z.nullable(z.string()).optional(),
115
131
  id: z.number().int(),
116
132
  roleName: z.string(),
133
+ emailSent: z.boolean(),
134
+ activityStatus: UserActivityStatus$outboundSchema,
117
135
  lastUpdated: z.date().transform(v => v.toISOString()),
118
136
  lastUpdatedBy: z.nullable(z.string()).optional(),
119
137
  lastSessionAt: z.nullable(z.date().transform(v => v.toISOString()))
@@ -125,6 +143,8 @@ export const UserResponse$outboundSchema: z.ZodType<
125
143
  roleId: "role_id",
126
144
  lastUpdatedComments: "last_updated_comments",
127
145
  roleName: "role_name",
146
+ emailSent: "email_sent",
147
+ activityStatus: "activity_status",
128
148
  lastUpdated: "last_updated",
129
149
  lastUpdatedBy: "last_updated_by",
130
150
  lastSessionAt: "last_session_at",
@@ -91,3 +91,4 @@ export * from "./toolgetbyname.js";
91
91
  export * from "./toollist.js";
92
92
  export * from "./usersgetbyemail.js";
93
93
  export * from "./userslist.js";
94
+ export * from "./userssendemail.js";
@@ -0,0 +1,75 @@
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 UsersSendEmailRequest = {
12
+ userEmail: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export const UsersSendEmailRequest$inboundSchema: z.ZodType<
17
+ UsersSendEmailRequest,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ user_email: z.string(),
22
+ }).transform((v) => {
23
+ return remap$(v, {
24
+ "user_email": "userEmail",
25
+ });
26
+ });
27
+
28
+ /** @internal */
29
+ export type UsersSendEmailRequest$Outbound = {
30
+ user_email: string;
31
+ };
32
+
33
+ /** @internal */
34
+ export const UsersSendEmailRequest$outboundSchema: z.ZodType<
35
+ UsersSendEmailRequest$Outbound,
36
+ z.ZodTypeDef,
37
+ UsersSendEmailRequest
38
+ > = z.object({
39
+ userEmail: z.string(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ userEmail: "user_email",
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 UsersSendEmailRequest$ {
51
+ /** @deprecated use `UsersSendEmailRequest$inboundSchema` instead. */
52
+ export const inboundSchema = UsersSendEmailRequest$inboundSchema;
53
+ /** @deprecated use `UsersSendEmailRequest$outboundSchema` instead. */
54
+ export const outboundSchema = UsersSendEmailRequest$outboundSchema;
55
+ /** @deprecated use `UsersSendEmailRequest$Outbound` instead. */
56
+ export type Outbound = UsersSendEmailRequest$Outbound;
57
+ }
58
+
59
+ export function usersSendEmailRequestToJSON(
60
+ usersSendEmailRequest: UsersSendEmailRequest,
61
+ ): string {
62
+ return JSON.stringify(
63
+ UsersSendEmailRequest$outboundSchema.parse(usersSendEmailRequest),
64
+ );
65
+ }
66
+
67
+ export function usersSendEmailRequestFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<UsersSendEmailRequest, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => UsersSendEmailRequest$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'UsersSendEmailRequest' from JSON`,
74
+ );
75
+ }
package/src/sdk/users.ts CHANGED
@@ -8,6 +8,7 @@ import { usersList } from "../funcs/usersList.js";
8
8
  import { usersUpdate } from "../funcs/usersUpdate.js";
9
9
  import { usersUsersDeleteAccount } from "../funcs/usersUsersDeleteAccount.js";
10
10
  import { usersUsersGetByEmail } from "../funcs/usersUsersGetByEmail.js";
11
+ import { usersUsersSendEmail } from "../funcs/usersUsersSendEmail.js";
11
12
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
12
13
  import * as components from "../models/components/index.js";
13
14
  import * as operations from "../models/operations/index.js";
@@ -99,6 +100,23 @@ export class Users extends ClientSDK {
99
100
  ));
100
101
  }
101
102
 
103
+ /**
104
+ * Send User Email
105
+ *
106
+ * @remarks
107
+ * Send a welcome email to a user.
108
+ */
109
+ async usersSendEmail(
110
+ request: operations.UsersSendEmailRequest,
111
+ options?: RequestOptions,
112
+ ): Promise<any> {
113
+ return unwrapAsync(usersUsersSendEmail(
114
+ this,
115
+ request,
116
+ options,
117
+ ));
118
+ }
119
+
102
120
  /**
103
121
  * Request Removal Of This Account
104
122
  *
package/src/sdk/v1.ts CHANGED
@@ -8,6 +8,7 @@ import { v1List } from "../funcs/v1List.js";
8
8
  import { v1Update } from "../funcs/v1Update.js";
9
9
  import { v1UsersDeleteAccount } from "../funcs/v1UsersDeleteAccount.js";
10
10
  import { v1UsersGetByEmail } from "../funcs/v1UsersGetByEmail.js";
11
+ import { v1UsersSendEmail } from "../funcs/v1UsersSendEmail.js";
11
12
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
12
13
  import * as components from "../models/components/index.js";
13
14
  import * as operations from "../models/operations/index.js";
@@ -99,6 +100,23 @@ export class V1 extends ClientSDK {
99
100
  ));
100
101
  }
101
102
 
103
+ /**
104
+ * Send User Email
105
+ *
106
+ * @remarks
107
+ * Send a welcome email to a user.
108
+ */
109
+ async usersSendEmail(
110
+ request: operations.UsersSendEmailRequest,
111
+ options?: RequestOptions,
112
+ ): Promise<any> {
113
+ return unwrapAsync(v1UsersSendEmail(
114
+ this,
115
+ request,
116
+ options,
117
+ ));
118
+ }
119
+
102
120
  /**
103
121
  * Request Removal Of This Account
104
122
  *