@lokalise/harmony 1.25.1 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
|
|
1
|
+
import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
|
2
|
+
import { ContributorApiBaseHeader } from '../types/contributorTypes';
|
3
|
+
import { ListPermissionTemplatesResponse } from '../types/permissionTemplateTypes';
|
4
|
+
import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
|
5
|
+
import { Wretch } from 'wretch';
|
6
|
+
/**
|
7
|
+
* Factory for creating keys for the useRetrieveContributorQuery hook
|
8
|
+
*/
|
9
|
+
export declare const listPermissionTemplatesKeys: {
|
10
|
+
teamPermissionTemplatesKey: (teamId: number) => readonly ["ListPermissionTemplates", number];
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* A react-router wrapper about the listPermissionTemplates public API endpoint
|
14
|
+
*
|
15
|
+
* @param wretchClient - Wretch instance configured to a public API instance.
|
16
|
+
* @param headers - A header builder instance to resolve headers for the request.
|
17
|
+
* @param overrides - Additional options to pass to the query.
|
18
|
+
*/
|
19
|
+
export declare const useListPermissionTemplatesQuery: <T>(wretchClient: Wretch<T>, headers: HeaderBuilder<ContributorApiBaseHeader>, overrides: ApiQueryOverrides<ListPermissionTemplatesResponse, typeof listPermissionTemplatesKeys>) => import('@tanstack/react-query').UseQueryResult<{
|
20
|
+
roles: {
|
21
|
+
role: string;
|
22
|
+
id: number;
|
23
|
+
description: string;
|
24
|
+
permissions: string[];
|
25
|
+
tagColor: string;
|
26
|
+
tagInfo: string;
|
27
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
28
|
+
}[];
|
29
|
+
}, undefined>;
|
@@ -0,0 +1,112 @@
|
|
1
|
+
/**
|
2
|
+
* Public API router definition for retrieving a list of permission templates for a team.
|
3
|
+
*/
|
4
|
+
export declare const listPermissionTemplates: import('@lokalise/api-contracts').GetRouteDefinition<{
|
5
|
+
teamId: number;
|
6
|
+
}, import('zod').ZodObject<{
|
7
|
+
roles: import('zod').ZodArray<import('zod').ZodObject<{
|
8
|
+
id: import('zod').ZodNumber;
|
9
|
+
role: import('zod').ZodString;
|
10
|
+
permissions: import('zod').ZodArray<import('zod').ZodString, "many">;
|
11
|
+
description: import('zod').ZodString;
|
12
|
+
tagColor: import('zod').ZodString;
|
13
|
+
tagInfo: import('zod').ZodString;
|
14
|
+
doesEnableAllReadOnlyLanguages: import('zod').ZodBoolean;
|
15
|
+
}, "strip", import('zod').ZodTypeAny, {
|
16
|
+
role: string;
|
17
|
+
id: number;
|
18
|
+
description: string;
|
19
|
+
permissions: string[];
|
20
|
+
tagColor: string;
|
21
|
+
tagInfo: string;
|
22
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
23
|
+
}, {
|
24
|
+
role: string;
|
25
|
+
id: number;
|
26
|
+
description: string;
|
27
|
+
permissions: string[];
|
28
|
+
tagColor: string;
|
29
|
+
tagInfo: string;
|
30
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
31
|
+
}>, "many">;
|
32
|
+
}, "strip", import('zod').ZodTypeAny, {
|
33
|
+
roles: {
|
34
|
+
role: string;
|
35
|
+
id: number;
|
36
|
+
description: string;
|
37
|
+
permissions: string[];
|
38
|
+
tagColor: string;
|
39
|
+
tagInfo: string;
|
40
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
41
|
+
}[];
|
42
|
+
}, {
|
43
|
+
roles: {
|
44
|
+
role: string;
|
45
|
+
id: number;
|
46
|
+
description: string;
|
47
|
+
permissions: string[];
|
48
|
+
tagColor: string;
|
49
|
+
tagInfo: string;
|
50
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
51
|
+
}[];
|
52
|
+
}>, import('zod').ZodObject<{
|
53
|
+
teamId: import('zod').ZodNumber;
|
54
|
+
}, "strip", import('zod').ZodTypeAny, {
|
55
|
+
teamId: number;
|
56
|
+
}, {
|
57
|
+
teamId: number;
|
58
|
+
}>, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
|
59
|
+
authorization: import('zod').ZodString;
|
60
|
+
}, "strip", import('zod').ZodTypeAny, {
|
61
|
+
authorization: string;
|
62
|
+
}, {
|
63
|
+
authorization: string;
|
64
|
+
}>, import('zod').ZodObject<{
|
65
|
+
AUTHORIZATION: import('zod').ZodString;
|
66
|
+
}, "strip", import('zod').ZodTypeAny, {
|
67
|
+
AUTHORIZATION: string;
|
68
|
+
}, {
|
69
|
+
AUTHORIZATION: string;
|
70
|
+
}>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
71
|
+
'X-API-Token': import('zod').ZodString;
|
72
|
+
}, "strip", import('zod').ZodTypeAny, {
|
73
|
+
'X-API-Token': string;
|
74
|
+
}, {
|
75
|
+
'X-API-Token': string;
|
76
|
+
}>, import('zod').ZodObject<{
|
77
|
+
'X-Api-Token': import('zod').ZodString;
|
78
|
+
}, "strip", import('zod').ZodTypeAny, {
|
79
|
+
'X-Api-Token': string;
|
80
|
+
}, {
|
81
|
+
'X-Api-Token': string;
|
82
|
+
}>, import('zod').ZodObject<{
|
83
|
+
'x-api-token': import('zod').ZodString;
|
84
|
+
}, "strip", import('zod').ZodTypeAny, {
|
85
|
+
'x-api-token': string;
|
86
|
+
}, {
|
87
|
+
'x-api-token': string;
|
88
|
+
}>, import('zod').ZodObject<{
|
89
|
+
'X-API-TOKEN': import('zod').ZodString;
|
90
|
+
}, "strip", import('zod').ZodTypeAny, {
|
91
|
+
'X-API-TOKEN': string;
|
92
|
+
}, {
|
93
|
+
'X-API-TOKEN': string;
|
94
|
+
}>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
95
|
+
'X-Lokalise-Plugin': import('zod').ZodString;
|
96
|
+
}, "strip", import('zod').ZodTypeAny, {
|
97
|
+
'X-Lokalise-Plugin': string;
|
98
|
+
}, {
|
99
|
+
'X-Lokalise-Plugin': string;
|
100
|
+
}>, import('zod').ZodObject<{
|
101
|
+
'x-lokalise-plugin': import('zod').ZodString;
|
102
|
+
}, "strip", import('zod').ZodTypeAny, {
|
103
|
+
'x-lokalise-plugin': string;
|
104
|
+
}, {
|
105
|
+
'x-lokalise-plugin': string;
|
106
|
+
}>, import('zod').ZodObject<{
|
107
|
+
'X-LOKALISE-PLUGIN': import('zod').ZodString;
|
108
|
+
}, "strip", import('zod').ZodTypeAny, {
|
109
|
+
'X-LOKALISE-PLUGIN': string;
|
110
|
+
}, {
|
111
|
+
'X-LOKALISE-PLUGIN': string;
|
112
|
+
}>]>>, false, false>;
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
declare const PERMISSION_SCHEMA: z.ZodString;
|
3
|
+
export type Permission = z.infer<typeof PERMISSION_SCHEMA>;
|
4
|
+
export declare const PERMISSION_TEMPLATE_SCHEMA: z.ZodObject<{
|
5
|
+
id: z.ZodNumber;
|
6
|
+
role: z.ZodString;
|
7
|
+
permissions: z.ZodArray<z.ZodString, "many">;
|
8
|
+
description: z.ZodString;
|
9
|
+
tagColor: z.ZodString;
|
10
|
+
tagInfo: z.ZodString;
|
11
|
+
doesEnableAllReadOnlyLanguages: z.ZodBoolean;
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
13
|
+
role: string;
|
14
|
+
id: number;
|
15
|
+
description: string;
|
16
|
+
permissions: string[];
|
17
|
+
tagColor: string;
|
18
|
+
tagInfo: string;
|
19
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
20
|
+
}, {
|
21
|
+
role: string;
|
22
|
+
id: number;
|
23
|
+
description: string;
|
24
|
+
permissions: string[];
|
25
|
+
tagColor: string;
|
26
|
+
tagInfo: string;
|
27
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
28
|
+
}>;
|
29
|
+
export type PermissionTemplate = z.infer<typeof PERMISSION_TEMPLATE_SCHEMA>;
|
30
|
+
export declare const LIST_PERMISSION_TEMPLATES_PATH_PARAMS: z.ZodObject<{
|
31
|
+
teamId: z.ZodNumber;
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
33
|
+
teamId: number;
|
34
|
+
}, {
|
35
|
+
teamId: number;
|
36
|
+
}>;
|
37
|
+
export type ListPermissionTemplatesPathParams = z.infer<typeof LIST_PERMISSION_TEMPLATES_PATH_PARAMS>;
|
38
|
+
export declare const LIST_PERMISSION_TEMPLATES_RESPONSE: z.ZodObject<{
|
39
|
+
roles: z.ZodArray<z.ZodObject<{
|
40
|
+
id: z.ZodNumber;
|
41
|
+
role: z.ZodString;
|
42
|
+
permissions: z.ZodArray<z.ZodString, "many">;
|
43
|
+
description: z.ZodString;
|
44
|
+
tagColor: z.ZodString;
|
45
|
+
tagInfo: z.ZodString;
|
46
|
+
doesEnableAllReadOnlyLanguages: z.ZodBoolean;
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
48
|
+
role: string;
|
49
|
+
id: number;
|
50
|
+
description: string;
|
51
|
+
permissions: string[];
|
52
|
+
tagColor: string;
|
53
|
+
tagInfo: string;
|
54
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
55
|
+
}, {
|
56
|
+
role: string;
|
57
|
+
id: number;
|
58
|
+
description: string;
|
59
|
+
permissions: string[];
|
60
|
+
tagColor: string;
|
61
|
+
tagInfo: string;
|
62
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
63
|
+
}>, "many">;
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
65
|
+
roles: {
|
66
|
+
role: string;
|
67
|
+
id: number;
|
68
|
+
description: string;
|
69
|
+
permissions: string[];
|
70
|
+
tagColor: string;
|
71
|
+
tagInfo: string;
|
72
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
73
|
+
}[];
|
74
|
+
}, {
|
75
|
+
roles: {
|
76
|
+
role: string;
|
77
|
+
id: number;
|
78
|
+
description: string;
|
79
|
+
permissions: string[];
|
80
|
+
tagColor: string;
|
81
|
+
tagInfo: string;
|
82
|
+
doesEnableAllReadOnlyLanguages: boolean;
|
83
|
+
}[];
|
84
|
+
}>;
|
85
|
+
export type ListPermissionTemplatesResponse = z.infer<typeof LIST_PERMISSION_TEMPLATES_RESPONSE>;
|
86
|
+
export {};
|