@lokalise/harmony 1.6.0-exp-jwtutils.19 → 1.6.0-exp-jwtutils.21
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/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +292 -286
- package/dist/types/src/features/auth/frontend/hooks/useGetPromotedClassicSessionJwtQuery.d.ts +202 -4
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +1 -0
- package/dist/types/src/features/publicApi/hooks/useGetUserTokenQuery.d.ts +2 -1
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +1 -0
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +1 -0
- package/dist/types/src/features/publicApi/projects.d.ts +12 -0
- package/dist/types/src/features/publicApi/types/project.d.ts +3 -0
- package/dist/types/src/features/publicApi/userToken.d.ts +11 -8
- package/package.json +1 -1
package/dist/types/src/features/auth/frontend/hooks/useGetPromotedClassicSessionJwtQuery.d.ts
CHANGED
@@ -1,5 +1,203 @@
|
|
1
1
|
import { Wretch } from 'wretch';
|
2
|
-
export declare function useGetPromotedClassicSessionJwtQuery<T>(api: Wretch<T>, teamId: number):
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
export declare function useGetPromotedClassicSessionJwtQuery<T>(api: Wretch<T>, teamId: number): {
|
3
|
+
isFetching: boolean;
|
4
|
+
data: {
|
5
|
+
accessToken: string;
|
6
|
+
refreshToken: string;
|
7
|
+
};
|
8
|
+
error: undefined;
|
9
|
+
isError: true;
|
10
|
+
isPending: false;
|
11
|
+
isLoading: false;
|
12
|
+
isLoadingError: false;
|
13
|
+
isRefetchError: true;
|
14
|
+
isSuccess: false;
|
15
|
+
isPlaceholderData: false;
|
16
|
+
status: "error";
|
17
|
+
dataUpdatedAt: number;
|
18
|
+
errorUpdatedAt: number;
|
19
|
+
failureCount: number;
|
20
|
+
failureReason: null | undefined;
|
21
|
+
errorUpdateCount: number;
|
22
|
+
isFetched: boolean;
|
23
|
+
isFetchedAfterMount: boolean;
|
24
|
+
isInitialLoading: boolean;
|
25
|
+
isPaused: boolean;
|
26
|
+
isRefetching: boolean;
|
27
|
+
isStale: boolean;
|
28
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
29
|
+
accessToken: string;
|
30
|
+
refreshToken: string;
|
31
|
+
}, undefined>>;
|
32
|
+
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
33
|
+
promise: Promise<{
|
34
|
+
accessToken: string;
|
35
|
+
refreshToken: string;
|
36
|
+
}>;
|
37
|
+
} | {
|
38
|
+
isFetching: boolean;
|
39
|
+
data: {
|
40
|
+
accessToken: string;
|
41
|
+
refreshToken: string;
|
42
|
+
};
|
43
|
+
error: null;
|
44
|
+
isError: false;
|
45
|
+
isPending: false;
|
46
|
+
isLoading: false;
|
47
|
+
isLoadingError: false;
|
48
|
+
isRefetchError: false;
|
49
|
+
isSuccess: true;
|
50
|
+
isPlaceholderData: false;
|
51
|
+
status: "success";
|
52
|
+
dataUpdatedAt: number;
|
53
|
+
errorUpdatedAt: number;
|
54
|
+
failureCount: number;
|
55
|
+
failureReason: null | undefined;
|
56
|
+
errorUpdateCount: number;
|
57
|
+
isFetched: boolean;
|
58
|
+
isFetchedAfterMount: boolean;
|
59
|
+
isInitialLoading: boolean;
|
60
|
+
isPaused: boolean;
|
61
|
+
isRefetching: boolean;
|
62
|
+
isStale: boolean;
|
63
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
64
|
+
accessToken: string;
|
65
|
+
refreshToken: string;
|
66
|
+
}, undefined>>;
|
67
|
+
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
68
|
+
promise: Promise<{
|
69
|
+
accessToken: string;
|
70
|
+
refreshToken: string;
|
71
|
+
}>;
|
72
|
+
} | {
|
73
|
+
isFetching: boolean;
|
74
|
+
data: undefined;
|
75
|
+
error: undefined;
|
76
|
+
isError: true;
|
77
|
+
isPending: false;
|
78
|
+
isLoading: false;
|
79
|
+
isLoadingError: true;
|
80
|
+
isRefetchError: false;
|
81
|
+
isSuccess: false;
|
82
|
+
isPlaceholderData: false;
|
83
|
+
status: "error";
|
84
|
+
dataUpdatedAt: number;
|
85
|
+
errorUpdatedAt: number;
|
86
|
+
failureCount: number;
|
87
|
+
failureReason: null | undefined;
|
88
|
+
errorUpdateCount: number;
|
89
|
+
isFetched: boolean;
|
90
|
+
isFetchedAfterMount: boolean;
|
91
|
+
isInitialLoading: boolean;
|
92
|
+
isPaused: boolean;
|
93
|
+
isRefetching: boolean;
|
94
|
+
isStale: boolean;
|
95
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
96
|
+
accessToken: string;
|
97
|
+
refreshToken: string;
|
98
|
+
}, undefined>>;
|
99
|
+
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
100
|
+
promise: Promise<{
|
101
|
+
accessToken: string;
|
102
|
+
refreshToken: string;
|
103
|
+
}>;
|
104
|
+
} | {
|
105
|
+
isFetching: boolean;
|
106
|
+
data: undefined;
|
107
|
+
error: null;
|
108
|
+
isError: false;
|
109
|
+
isPending: true;
|
110
|
+
isLoading: true;
|
111
|
+
isLoadingError: false;
|
112
|
+
isRefetchError: false;
|
113
|
+
isSuccess: false;
|
114
|
+
isPlaceholderData: false;
|
115
|
+
status: "pending";
|
116
|
+
dataUpdatedAt: number;
|
117
|
+
errorUpdatedAt: number;
|
118
|
+
failureCount: number;
|
119
|
+
failureReason: null | undefined;
|
120
|
+
errorUpdateCount: number;
|
121
|
+
isFetched: boolean;
|
122
|
+
isFetchedAfterMount: boolean;
|
123
|
+
isInitialLoading: boolean;
|
124
|
+
isPaused: boolean;
|
125
|
+
isRefetching: boolean;
|
126
|
+
isStale: boolean;
|
127
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
128
|
+
accessToken: string;
|
129
|
+
refreshToken: string;
|
130
|
+
}, undefined>>;
|
131
|
+
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
132
|
+
promise: Promise<{
|
133
|
+
accessToken: string;
|
134
|
+
refreshToken: string;
|
135
|
+
}>;
|
136
|
+
} | {
|
137
|
+
isFetching: boolean;
|
138
|
+
data: undefined;
|
139
|
+
error: null;
|
140
|
+
isError: false;
|
141
|
+
isPending: true;
|
142
|
+
isLoadingError: false;
|
143
|
+
isRefetchError: false;
|
144
|
+
isSuccess: false;
|
145
|
+
isPlaceholderData: false;
|
146
|
+
status: "pending";
|
147
|
+
dataUpdatedAt: number;
|
148
|
+
errorUpdatedAt: number;
|
149
|
+
failureCount: number;
|
150
|
+
failureReason: null | undefined;
|
151
|
+
errorUpdateCount: number;
|
152
|
+
isFetched: boolean;
|
153
|
+
isFetchedAfterMount: boolean;
|
154
|
+
isLoading: boolean;
|
155
|
+
isInitialLoading: boolean;
|
156
|
+
isPaused: boolean;
|
157
|
+
isRefetching: boolean;
|
158
|
+
isStale: boolean;
|
159
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
160
|
+
accessToken: string;
|
161
|
+
refreshToken: string;
|
162
|
+
}, undefined>>;
|
163
|
+
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
164
|
+
promise: Promise<{
|
165
|
+
accessToken: string;
|
166
|
+
refreshToken: string;
|
167
|
+
}>;
|
168
|
+
} | {
|
169
|
+
isFetching: boolean;
|
170
|
+
data: {
|
171
|
+
accessToken: string;
|
172
|
+
refreshToken: string;
|
173
|
+
};
|
174
|
+
isError: false;
|
175
|
+
error: null;
|
176
|
+
isPending: false;
|
177
|
+
isLoading: false;
|
178
|
+
isLoadingError: false;
|
179
|
+
isRefetchError: false;
|
180
|
+
isSuccess: true;
|
181
|
+
isPlaceholderData: true;
|
182
|
+
status: "success";
|
183
|
+
dataUpdatedAt: number;
|
184
|
+
errorUpdatedAt: number;
|
185
|
+
failureCount: number;
|
186
|
+
failureReason: null | undefined;
|
187
|
+
errorUpdateCount: number;
|
188
|
+
isFetched: boolean;
|
189
|
+
isFetchedAfterMount: boolean;
|
190
|
+
isInitialLoading: boolean;
|
191
|
+
isPaused: boolean;
|
192
|
+
isRefetching: boolean;
|
193
|
+
isStale: boolean;
|
194
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
|
195
|
+
accessToken: string;
|
196
|
+
refreshToken: string;
|
197
|
+
}, undefined>>;
|
198
|
+
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
199
|
+
promise: Promise<{
|
200
|
+
accessToken: string;
|
201
|
+
refreshToken: string;
|
202
|
+
}>;
|
203
|
+
};
|
@@ -14,6 +14,7 @@ export declare function useCreateProjectMutation<T>(api: Wretch<T>, overrides?:
|
|
14
14
|
}[];
|
15
15
|
project_id: string;
|
16
16
|
description: string;
|
17
|
+
uuid: string;
|
17
18
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
18
19
|
created_by: number;
|
19
20
|
created_by_email: string;
|
@@ -2,7 +2,8 @@ import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
|
|
2
2
|
import { Wretch } from 'wretch/types';
|
3
3
|
import { JwtToken } from '../userToken';
|
4
4
|
export declare const getUserTokenKey: {
|
5
|
-
|
5
|
+
teamKeyCsrf: (teamId: number, csrf: string) => readonly ["getUserToken", "x-csrf-token", string, number];
|
6
|
+
teamKeyJwt: (teamId: number, refreshToken: string) => readonly ["getUserToken", "Authorization", `Bearer ${string}`, number];
|
6
7
|
};
|
7
8
|
export declare const useGetUserTokenQuery: <T>(api: Wretch<T>, overrides: ApiQueryOverrides<JwtToken, typeof getUserTokenKey>) => import('@tanstack/react-query').UseQueryResult<{
|
8
9
|
accessToken: string;
|
@@ -24,6 +24,7 @@ export declare function useListProjectsQuery<T>(api: Wretch<T>, overrides: ApiQu
|
|
24
24
|
}[];
|
25
25
|
project_id: string;
|
26
26
|
description: string;
|
27
|
+
uuid: string;
|
27
28
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
28
29
|
created_by: number;
|
29
30
|
created_by_email: string;
|
@@ -16,6 +16,7 @@ export declare function useRetrieveProjectQuery<T>(api: Wretch<T>, overrides: Ap
|
|
16
16
|
}[];
|
17
17
|
project_id: string;
|
18
18
|
description: string;
|
19
|
+
uuid: string;
|
19
20
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
20
21
|
created_by: number;
|
21
22
|
created_by_email: string;
|
@@ -75,6 +75,7 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
75
75
|
is_segmentation_enabled: boolean;
|
76
76
|
}>, z.ZodObject<{
|
77
77
|
project_id: z.ZodString;
|
78
|
+
uuid: z.ZodString;
|
78
79
|
project_type: z.ZodUnion<[z.ZodLiteral<"localization_files">, z.ZodLiteral<"paged_documents">, z.ZodLiteral<"marketing">]>;
|
79
80
|
name: z.ZodString;
|
80
81
|
description: z.ZodString;
|
@@ -254,6 +255,7 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
254
255
|
}[];
|
255
256
|
project_id: string;
|
256
257
|
description: string;
|
258
|
+
uuid: string;
|
257
259
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
258
260
|
created_by: number;
|
259
261
|
created_by_email: string;
|
@@ -309,6 +311,7 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
309
311
|
}[];
|
310
312
|
project_id: string;
|
311
313
|
description: string;
|
314
|
+
uuid: string;
|
312
315
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
313
316
|
created_by: number;
|
314
317
|
created_by_email: string;
|
@@ -381,6 +384,7 @@ declare const LIST_PROJECTS_REQUEST_QUERY_SCHEMA: z.ZodObject<{
|
|
381
384
|
export type ListProjectsRequestQuery = z.infer<typeof LIST_PROJECTS_REQUEST_QUERY_SCHEMA>;
|
382
385
|
declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodObject<Omit<{
|
383
386
|
project_id: z.ZodString;
|
387
|
+
uuid: z.ZodString;
|
384
388
|
project_type: z.ZodUnion<[z.ZodLiteral<"localization_files">, z.ZodLiteral<"paged_documents">, z.ZodLiteral<"marketing">]>;
|
385
389
|
name: z.ZodString;
|
386
390
|
description: z.ZodString;
|
@@ -560,6 +564,7 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
560
564
|
}[];
|
561
565
|
project_id: string;
|
562
566
|
description: string;
|
567
|
+
uuid: string;
|
563
568
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
564
569
|
created_by: number;
|
565
570
|
created_by_email: string;
|
@@ -578,6 +583,7 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
578
583
|
}[];
|
579
584
|
project_id: string;
|
580
585
|
description: string;
|
586
|
+
uuid: string;
|
581
587
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
582
588
|
created_by: number;
|
583
589
|
created_by_email: string;
|
@@ -806,6 +812,7 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
806
812
|
export type ListProjectsSuccessResponseBody = z.infer<typeof LIST_PROJECTS_SUCCESS_RESPONSE_BODY>;
|
807
813
|
export declare const listProjects: import('@lokalise/universal-ts-utils/node').GetRouteDefinition<never, z.ZodArray<z.ZodUnion<[z.ZodObject<Omit<{
|
808
814
|
project_id: z.ZodString;
|
815
|
+
uuid: z.ZodString;
|
809
816
|
project_type: z.ZodUnion<[z.ZodLiteral<"localization_files">, z.ZodLiteral<"paged_documents">, z.ZodLiteral<"marketing">]>;
|
810
817
|
name: z.ZodString;
|
811
818
|
description: z.ZodString;
|
@@ -985,6 +992,7 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
985
992
|
}[];
|
986
993
|
project_id: string;
|
987
994
|
description: string;
|
995
|
+
uuid: string;
|
988
996
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
989
997
|
created_by: number;
|
990
998
|
created_by_email: string;
|
@@ -1003,6 +1011,7 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
1003
1011
|
}[];
|
1004
1012
|
project_id: string;
|
1005
1013
|
description: string;
|
1014
|
+
uuid: string;
|
1006
1015
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
1007
1016
|
created_by: number;
|
1008
1017
|
created_by_email: string;
|
@@ -1254,6 +1263,7 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
1254
1263
|
}>, undefined, false, false>;
|
1255
1264
|
export declare const retrieveProject: import('@lokalise/universal-ts-utils/node').GetRouteDefinition<never, z.ZodObject<{
|
1256
1265
|
project_id: z.ZodString;
|
1266
|
+
uuid: z.ZodString;
|
1257
1267
|
project_type: z.ZodUnion<[z.ZodLiteral<"localization_files">, z.ZodLiteral<"paged_documents">, z.ZodLiteral<"marketing">]>;
|
1258
1268
|
name: z.ZodString;
|
1259
1269
|
description: z.ZodString;
|
@@ -1433,6 +1443,7 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1433
1443
|
}[];
|
1434
1444
|
project_id: string;
|
1435
1445
|
description: string;
|
1446
|
+
uuid: string;
|
1436
1447
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
1437
1448
|
created_by: number;
|
1438
1449
|
created_by_email: string;
|
@@ -1488,6 +1499,7 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1488
1499
|
}[];
|
1489
1500
|
project_id: string;
|
1490
1501
|
description: string;
|
1502
|
+
uuid: string;
|
1491
1503
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
1492
1504
|
created_by: number;
|
1493
1505
|
created_by_email: string;
|
@@ -198,6 +198,7 @@ export declare const PROJECT_STATISTICS_SCHEMA: z.ZodObject<{
|
|
198
198
|
}>;
|
199
199
|
export declare const PROJECT_SCHEMA: z.ZodObject<{
|
200
200
|
project_id: z.ZodString;
|
201
|
+
uuid: z.ZodString;
|
201
202
|
project_type: z.ZodUnion<[z.ZodLiteral<"localization_files">, z.ZodLiteral<"paged_documents">, z.ZodLiteral<"marketing">]>;
|
202
203
|
name: z.ZodString;
|
203
204
|
description: z.ZodString;
|
@@ -377,6 +378,7 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
377
378
|
}[];
|
378
379
|
project_id: string;
|
379
380
|
description: string;
|
381
|
+
uuid: string;
|
380
382
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
381
383
|
created_by: number;
|
382
384
|
created_by_email: string;
|
@@ -432,6 +434,7 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
432
434
|
}[];
|
433
435
|
project_id: string;
|
434
436
|
description: string;
|
437
|
+
uuid: string;
|
435
438
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
436
439
|
created_by: number;
|
437
440
|
created_by_email: string;
|
@@ -31,13 +31,16 @@ export declare const getUserToken: import('@lokalise/universal-ts-utils/node').P
|
|
31
31
|
teamId: number;
|
32
32
|
}, {
|
33
33
|
teamId: number;
|
34
|
-
}>, undefined, z.ZodObject<{
|
35
|
-
Authorization: z.
|
36
|
-
'x-csrf-token': z.ZodOptional<z.ZodString>;
|
34
|
+
}>, undefined, z.ZodUnion<[z.ZodObject<{
|
35
|
+
Authorization: z.ZodString;
|
37
36
|
}, "strip", z.ZodTypeAny, {
|
38
|
-
Authorization
|
39
|
-
'x-csrf-token'?: string | undefined;
|
37
|
+
Authorization: string;
|
40
38
|
}, {
|
41
|
-
Authorization
|
42
|
-
|
43
|
-
|
39
|
+
Authorization: string;
|
40
|
+
}>, z.ZodObject<{
|
41
|
+
'x-csrf-token': z.ZodString;
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
43
|
+
'x-csrf-token': string;
|
44
|
+
}, {
|
45
|
+
'x-csrf-token': string;
|
46
|
+
}>]>, false, false>;
|