syllable-sdk 0.1.0-alpha.177 → 0.1.0-alpha.186
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/docs/sdks/batches/README.md +4 -4
- package/docs/sdks/permissions/README.md +1 -1
- package/docs/sdks/prompts/README.md +4 -8
- package/docs/sdks/roles/README.md +1 -1
- package/docs/sdks/users/README.md +2 -2
- package/docs/sdks/v1/README.md +2 -2
- package/docs/sdks/workflows/README.md +8 -8
- package/funcs/permissionsList.d.ts +1 -1
- package/funcs/permissionsList.d.ts.map +1 -1
- package/funcs/permissionsList.js +1 -1
- package/funcs/permissionsList.js.map +1 -1
- package/funcs/rolesDelete.d.ts +1 -1
- package/funcs/rolesDelete.d.ts.map +1 -1
- package/funcs/rolesDelete.js +2 -1
- package/funcs/rolesDelete.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/permissiongroupresponse.d.ts +46 -0
- package/models/components/permissiongroupresponse.d.ts.map +1 -0
- package/models/components/permissiongroupresponse.js +64 -0
- package/models/components/permissiongroupresponse.js.map +1 -0
- package/models/components/permissionresponse.d.ts +7 -2
- package/models/components/permissionresponse.d.ts.map +1 -1
- package/models/components/permissionresponse.js +13 -2
- package/models/components/permissionresponse.js.map +1 -1
- package/models/components/userproperties.d.ts +6 -0
- package/models/components/userproperties.d.ts.map +1 -1
- package/models/components/userproperties.js +2 -0
- package/models/components/userproperties.js.map +1 -1
- package/models/components/userresponse.d.ts +5 -0
- package/models/components/userresponse.d.ts.map +1 -1
- package/models/components/userresponse.js +4 -0
- package/models/components/userresponse.js.map +1 -1
- package/models/operations/rolesdelete.d.ts +11 -0
- package/models/operations/rolesdelete.d.ts.map +1 -1
- package/models/operations/rolesdelete.js +4 -0
- package/models/operations/rolesdelete.js.map +1 -1
- package/openapi.json +159 -75
- package/package.json +1 -1
- package/sdk/permissions.d.ts +1 -1
- package/sdk/permissions.d.ts.map +1 -1
- package/sdk/roles.d.ts +1 -1
- package/sdk/roles.js +1 -1
- package/src/funcs/permissionsList.ts +3 -3
- package/src/funcs/rolesDelete.ts +2 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +1 -0
- package/src/models/components/permissiongroupresponse.ts +92 -0
- package/src/models/components/permissionresponse.ts +20 -4
- package/src/models/components/userproperties.ts +2 -0
- package/src/models/components/userresponse.ts +9 -0
- package/src/models/operations/rolesdelete.ts +15 -0
- package/src/sdk/permissions.ts +1 -1
- package/src/sdk/roles.ts +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
import {
|
|
10
|
+
PermissionResponse,
|
|
11
|
+
PermissionResponse$inboundSchema,
|
|
12
|
+
PermissionResponse$Outbound,
|
|
13
|
+
PermissionResponse$outboundSchema,
|
|
14
|
+
} from "./permissionresponse.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Information about a group of permissions related to the same feature.
|
|
18
|
+
*/
|
|
19
|
+
export type PermissionGroupResponse = {
|
|
20
|
+
/**
|
|
21
|
+
* Name of the permission group
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Description of the permission group
|
|
26
|
+
*/
|
|
27
|
+
description: string;
|
|
28
|
+
/**
|
|
29
|
+
* Permissions in the group
|
|
30
|
+
*/
|
|
31
|
+
permissions: Array<PermissionResponse>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const PermissionGroupResponse$inboundSchema: z.ZodType<
|
|
36
|
+
PermissionGroupResponse,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
name: z.string(),
|
|
41
|
+
description: z.string(),
|
|
42
|
+
permissions: z.array(PermissionResponse$inboundSchema),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type PermissionGroupResponse$Outbound = {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
permissions: Array<PermissionResponse$Outbound>;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const PermissionGroupResponse$outboundSchema: z.ZodType<
|
|
54
|
+
PermissionGroupResponse$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
PermissionGroupResponse
|
|
57
|
+
> = z.object({
|
|
58
|
+
name: z.string(),
|
|
59
|
+
description: z.string(),
|
|
60
|
+
permissions: z.array(PermissionResponse$outboundSchema),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace PermissionGroupResponse$ {
|
|
68
|
+
/** @deprecated use `PermissionGroupResponse$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = PermissionGroupResponse$inboundSchema;
|
|
70
|
+
/** @deprecated use `PermissionGroupResponse$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = PermissionGroupResponse$outboundSchema;
|
|
72
|
+
/** @deprecated use `PermissionGroupResponse$Outbound` instead. */
|
|
73
|
+
export type Outbound = PermissionGroupResponse$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function permissionGroupResponseToJSON(
|
|
77
|
+
permissionGroupResponse: PermissionGroupResponse,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
PermissionGroupResponse$outboundSchema.parse(permissionGroupResponse),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function permissionGroupResponseFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<PermissionGroupResponse, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => PermissionGroupResponse$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'PermissionGroupResponse' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -15,10 +16,14 @@ export type PermissionResponse = {
|
|
|
15
16
|
* Name of the permission
|
|
16
17
|
*/
|
|
17
18
|
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Display name of the permission
|
|
21
|
+
*/
|
|
22
|
+
displayName: string;
|
|
18
23
|
/**
|
|
19
24
|
* Description of the permission
|
|
20
25
|
*/
|
|
21
|
-
description
|
|
26
|
+
description?: string | null | undefined;
|
|
22
27
|
};
|
|
23
28
|
|
|
24
29
|
/** @internal */
|
|
@@ -28,13 +33,19 @@ export const PermissionResponse$inboundSchema: z.ZodType<
|
|
|
28
33
|
unknown
|
|
29
34
|
> = z.object({
|
|
30
35
|
name: z.string(),
|
|
31
|
-
|
|
36
|
+
display_name: z.string(),
|
|
37
|
+
description: z.nullable(z.string()).optional(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"display_name": "displayName",
|
|
41
|
+
});
|
|
32
42
|
});
|
|
33
43
|
|
|
34
44
|
/** @internal */
|
|
35
45
|
export type PermissionResponse$Outbound = {
|
|
36
46
|
name: string;
|
|
37
|
-
|
|
47
|
+
display_name: string;
|
|
48
|
+
description?: string | null | undefined;
|
|
38
49
|
};
|
|
39
50
|
|
|
40
51
|
/** @internal */
|
|
@@ -44,7 +55,12 @@ export const PermissionResponse$outboundSchema: z.ZodType<
|
|
|
44
55
|
PermissionResponse
|
|
45
56
|
> = z.object({
|
|
46
57
|
name: z.string(),
|
|
47
|
-
|
|
58
|
+
displayName: z.string(),
|
|
59
|
+
description: z.nullable(z.string()).optional(),
|
|
60
|
+
}).transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
displayName: "display_name",
|
|
63
|
+
});
|
|
48
64
|
});
|
|
49
65
|
|
|
50
66
|
/**
|
|
@@ -13,6 +13,8 @@ export const UserProperties = {
|
|
|
13
13
|
FirstName: "first_name",
|
|
14
14
|
LastName: "last_name",
|
|
15
15
|
RoleId: "role_id",
|
|
16
|
+
EmailFirstNameLastName: "email_first_name_last_name",
|
|
17
|
+
LastUpdated: "last_updated",
|
|
16
18
|
} as const;
|
|
17
19
|
/**
|
|
18
20
|
* Names of user fields supported for filtering/sorting on list endpoint.
|
|
@@ -36,6 +36,10 @@ export type UserResponse = {
|
|
|
36
36
|
* Internal ID of the user
|
|
37
37
|
*/
|
|
38
38
|
id: number;
|
|
39
|
+
/**
|
|
40
|
+
* Name of the role assigned to the user
|
|
41
|
+
*/
|
|
42
|
+
roleName: string;
|
|
39
43
|
/**
|
|
40
44
|
* The timestamp of the most recent update to the user
|
|
41
45
|
*/
|
|
@@ -62,6 +66,7 @@ export const UserResponse$inboundSchema: z.ZodType<
|
|
|
62
66
|
role_id: z.number().int(),
|
|
63
67
|
last_updated_comments: z.nullable(z.string()).optional(),
|
|
64
68
|
id: z.number().int(),
|
|
69
|
+
role_name: z.string(),
|
|
65
70
|
last_updated: z.string().datetime({ offset: true }).transform(v =>
|
|
66
71
|
new Date(v)
|
|
67
72
|
),
|
|
@@ -75,6 +80,7 @@ export const UserResponse$inboundSchema: z.ZodType<
|
|
|
75
80
|
"last_name": "lastName",
|
|
76
81
|
"role_id": "roleId",
|
|
77
82
|
"last_updated_comments": "lastUpdatedComments",
|
|
83
|
+
"role_name": "roleName",
|
|
78
84
|
"last_updated": "lastUpdated",
|
|
79
85
|
"last_updated_by": "lastUpdatedBy",
|
|
80
86
|
"last_session_at": "lastSessionAt",
|
|
@@ -89,6 +95,7 @@ export type UserResponse$Outbound = {
|
|
|
89
95
|
role_id: number;
|
|
90
96
|
last_updated_comments?: string | null | undefined;
|
|
91
97
|
id: number;
|
|
98
|
+
role_name: string;
|
|
92
99
|
last_updated: string;
|
|
93
100
|
last_updated_by?: string | null | undefined;
|
|
94
101
|
last_session_at?: string | null | undefined;
|
|
@@ -106,6 +113,7 @@ export const UserResponse$outboundSchema: z.ZodType<
|
|
|
106
113
|
roleId: z.number().int(),
|
|
107
114
|
lastUpdatedComments: z.nullable(z.string()).optional(),
|
|
108
115
|
id: z.number().int(),
|
|
116
|
+
roleName: z.string(),
|
|
109
117
|
lastUpdated: z.date().transform(v => v.toISOString()),
|
|
110
118
|
lastUpdatedBy: z.nullable(z.string()).optional(),
|
|
111
119
|
lastSessionAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
@@ -116,6 +124,7 @@ export const UserResponse$outboundSchema: z.ZodType<
|
|
|
116
124
|
lastName: "last_name",
|
|
117
125
|
roleId: "role_id",
|
|
118
126
|
lastUpdatedComments: "last_updated_comments",
|
|
127
|
+
roleName: "role_name",
|
|
119
128
|
lastUpdated: "last_updated",
|
|
120
129
|
lastUpdatedBy: "last_updated_by",
|
|
121
130
|
lastSessionAt: "last_session_at",
|
|
@@ -9,8 +9,18 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
export type RolesDeleteRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* The ID of the role to delete
|
|
14
|
+
*/
|
|
12
15
|
roleId: number;
|
|
16
|
+
/**
|
|
17
|
+
* The reason for deleting the role
|
|
18
|
+
*/
|
|
13
19
|
reason: string;
|
|
20
|
+
/**
|
|
21
|
+
* Users with the deleted role will be reassigned to the new role, if a new role ID is provided
|
|
22
|
+
*/
|
|
23
|
+
newRoleId?: number | null | undefined;
|
|
14
24
|
};
|
|
15
25
|
|
|
16
26
|
/** @internal */
|
|
@@ -21,9 +31,11 @@ export const RolesDeleteRequest$inboundSchema: z.ZodType<
|
|
|
21
31
|
> = z.object({
|
|
22
32
|
role_id: z.number().int(),
|
|
23
33
|
reason: z.string(),
|
|
34
|
+
new_role_id: z.nullable(z.number().int()).optional(),
|
|
24
35
|
}).transform((v) => {
|
|
25
36
|
return remap$(v, {
|
|
26
37
|
"role_id": "roleId",
|
|
38
|
+
"new_role_id": "newRoleId",
|
|
27
39
|
});
|
|
28
40
|
});
|
|
29
41
|
|
|
@@ -31,6 +43,7 @@ export const RolesDeleteRequest$inboundSchema: z.ZodType<
|
|
|
31
43
|
export type RolesDeleteRequest$Outbound = {
|
|
32
44
|
role_id: number;
|
|
33
45
|
reason: string;
|
|
46
|
+
new_role_id?: number | null | undefined;
|
|
34
47
|
};
|
|
35
48
|
|
|
36
49
|
/** @internal */
|
|
@@ -41,9 +54,11 @@ export const RolesDeleteRequest$outboundSchema: z.ZodType<
|
|
|
41
54
|
> = z.object({
|
|
42
55
|
roleId: z.number().int(),
|
|
43
56
|
reason: z.string(),
|
|
57
|
+
newRoleId: z.nullable(z.number().int()).optional(),
|
|
44
58
|
}).transform((v) => {
|
|
45
59
|
return remap$(v, {
|
|
46
60
|
roleId: "role_id",
|
|
61
|
+
newRoleId: "new_role_id",
|
|
47
62
|
});
|
|
48
63
|
});
|
|
49
64
|
|
package/src/sdk/permissions.ts
CHANGED
|
@@ -16,7 +16,7 @@ export class Permissions extends ClientSDK {
|
|
|
16
16
|
*/
|
|
17
17
|
async list(
|
|
18
18
|
options?: RequestOptions,
|
|
19
|
-
): Promise<Array<components.
|
|
19
|
+
): Promise<Array<components.PermissionGroupResponse>> {
|
|
20
20
|
return unwrapAsync(permissionsList(
|
|
21
21
|
this,
|
|
22
22
|
options,
|
package/src/sdk/roles.ts
CHANGED