@zitadel/api 0.1.0-alpha.18 → 0.1.0-alpha.19
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 +38 -3
- package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
- package/dist/generated/endpoints/zitadelNextGen.mjs +104 -98
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +6 -2
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs +5132 -262
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +2523 -110
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +2581 -143
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
- package/dist/generated/model/index.d.mts +2 -2
- package/dist/generated/model/index.mjs +29 -5
- package/dist/generated/model/index.mjs.map +1 -1
- package/dist/{index-D6qIOslB.d.mts → index-Dt_0fSH9.d.mts} +2759 -390
- package/dist/index-Dt_0fSH9.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +1 -1
- package/dist/{zitadelNextGen-BCljAZpG.d.mts → zitadelNextGen-BkDpEAS9.d.mts} +62 -35
- package/dist/zitadelNextGen-BkDpEAS9.d.mts.map +1 -0
- package/package.json +1 -1
- package/src/generated/endpoints/zitadelNextGen.msw.ts +5330 -241
- package/src/generated/endpoints/zitadelNextGen.ts +129 -209
- package/src/generated/endpoints/zitadelNextGen.zod.ts +4635 -336
- package/src/generated/model/createAuthAttemptDefault.ts +10 -0
- package/src/generated/model/createFlowDefault.ts +10 -0
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/createFlowDefinitionDefault.ts +10 -0
- package/src/generated/model/createHandoffDefault.ts +10 -0
- package/src/generated/model/createProjectDefault.ts +20 -0
- package/src/generated/model/createSchemaBody.ts +5 -34
- package/src/generated/model/createSession201Session.ts +1 -1
- package/src/generated/model/createSession201SessionState.ts +1 -1
- package/src/generated/model/createSessionDefault.ts +20 -0
- package/src/generated/model/createUser201.ts +24 -4
- package/src/generated/model/createUser201Attributes.ts +14 -0
- package/src/generated/model/{createUserBodyMetadata.ts → createUser201Metadata.ts} +3 -3
- package/src/generated/model/{createUserBodyMetadataStatus.ts → createUser201MetadataStatus.ts} +3 -3
- package/src/generated/model/createUser500.ts +20 -0
- package/src/generated/model/{deleteTeamParams.ts → createUser500Details.ts} +4 -7
- package/src/generated/model/createUserBody.ts +22 -11
- package/src/generated/model/createUserBodyAttributes.ts +14 -0
- package/src/generated/model/createUserDefault.ts +10 -0
- package/src/generated/model/deleteFlowDefinitionDefault.ts +10 -0
- package/src/generated/model/deleteUserByIDDefault.ts +10 -0
- package/src/generated/model/exchangeHandoff200Session.ts +1 -1
- package/src/generated/model/exchangeHandoff200SessionState.ts +1 -1
- package/src/generated/model/exchangeHandoffDefault.ts +10 -0
- package/src/generated/model/getEvent200.ts +1372 -0
- package/src/generated/model/getEvent401.ts +20 -0
- package/src/generated/model/{getSessionParams.ts → getEvent401Details.ts} +4 -7
- package/src/generated/model/getEvent403.ts +20 -0
- package/src/generated/model/getEvent403Details.ts +12 -0
- package/src/generated/model/getEvent404.ts +20 -0
- package/src/generated/model/getEvent404Details.ts +12 -0
- package/src/generated/model/getEventDefault.ts +20 -0
- package/src/generated/model/getEventDefaultDetails.ts +12 -0
- package/src/generated/model/{getTeamParams.ts → getEventParams.ts} +1 -1
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/getMySession200.ts +1 -1
- package/src/generated/model/getMySession200State.ts +1 -1
- package/src/generated/model/getMyUser200.ts +20 -7
- package/src/generated/model/getMyUser200Attributes.ts +14 -0
- package/src/generated/model/getSchemaById200.ts +5 -34
- package/src/generated/model/getSchemaByIdParams.ts +0 -5
- package/src/generated/model/getSession200.ts +1 -1
- package/src/generated/model/getSession200State.ts +1 -1
- package/src/generated/model/getUserByID200.ts +20 -7
- package/src/generated/model/getUserByID200Attributes.ts +14 -0
- package/src/generated/model/getUserByIDParams.ts +0 -5
- package/src/generated/model/index.ts +32 -13
- package/src/generated/model/listEvents200.ts +19 -0
- package/src/generated/model/listEvents200DataItem.ts +1372 -0
- package/src/generated/model/listEvents400.ts +20 -0
- package/src/generated/model/listEvents400Details.ts +12 -0
- package/src/generated/model/listEvents401.ts +20 -0
- package/src/generated/model/listEvents401Details.ts +12 -0
- package/src/generated/model/listEvents403.ts +20 -0
- package/src/generated/model/listEvents403Details.ts +12 -0
- package/src/generated/model/listEventsCategoryItem.ts +19 -0
- package/src/generated/model/listEventsDefault.ts +20 -0
- package/src/generated/model/{getFlowDefinitionParams.ts → listEventsDefaultDetails.ts} +4 -7
- package/src/generated/model/{getBrandingByIdParams.ts → listEventsOrder.ts} +6 -7
- package/src/generated/model/listEventsParams.ts +67 -0
- package/src/generated/model/listUserPasskeysParams.ts +0 -5
- package/src/generated/model/listUserTeamsDefault.ts +0 -20
- package/src/generated/model/listUserTeamsParams.ts +0 -5
- package/src/generated/model/listUsers200UsersItem.ts +20 -7
- package/src/generated/model/listUsers200UsersItemAttributes.ts +14 -0
- package/src/generated/model/patchProjectDefault.ts +10 -0
- package/src/generated/model/queryProjectsBodyFilterItem.ts +4 -0
- package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +4 -0
- package/src/generated/model/querySessions200SessionsItem.ts +1 -1
- package/src/generated/model/querySessions200SessionsItemState.ts +1 -1
- package/src/generated/model/querySessionsBodyFilterItem.ts +6 -1
- package/src/generated/model/querySessionsBodyFilterItemField.ts +2 -1
- package/src/generated/model/querySessionsBodyFilterItemOperation.ts +4 -0
- package/src/generated/model/querySessionsDefault.ts +10 -0
- package/src/generated/model/queryTeamsBodyFilterItem.ts +9 -0
- package/src/generated/model/queryTeamsBodyFilterItemField.ts +9 -0
- package/src/generated/model/queryTeamsBodyFilterItemOperation.ts +4 -0
- package/src/generated/model/queryTeamsBodySorting.ts +5 -0
- package/src/generated/model/queryTeamsBodySortingField.ts +9 -0
- package/src/generated/model/revokeMySessionDefault.ts +10 -0
- package/src/generated/model/revokeSessionDefault.ts +10 -0
- package/src/generated/model/setUserPasswordDefault.ts +10 -0
- package/src/generated/model/submitFlowStepDefault.ts +10 -0
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/updateFlowDefinitionDefault.ts +10 -0
- package/src/generated/model/verifyChallengeProofDefault.ts +10 -0
- package/dist/index-D6qIOslB.d.mts.map +0 -1
- package/dist/zitadelNextGen-BCljAZpG.d.mts.map +0 -1
- package/src/generated/model/deleteFlowDefinitionParams.ts +0 -15
- package/src/generated/model/deleteUserByIDParams.ts +0 -15
- package/src/generated/model/revokeSessionParams.ts +0 -15
- package/src/generated/model/setUserPasswordParams.ts +0 -15
- package/src/generated/model/updateFlowDefinitionParams.ts +0 -15
- package/src/generated/model/updateTeamParams.ts +0 -15
|
@@ -33,19 +33,16 @@ import type {
|
|
|
33
33
|
CreateUser201,
|
|
34
34
|
CreateUserBody,
|
|
35
35
|
CreateUserParams,
|
|
36
|
-
DeleteFlowDefinitionParams,
|
|
37
|
-
DeleteTeamParams,
|
|
38
|
-
DeleteUserByIDParams,
|
|
39
36
|
ExchangeHandoff200,
|
|
40
37
|
ExchangeHandoffBody,
|
|
41
38
|
ExchangeHandoffParams,
|
|
42
39
|
GetAuthAttempt200,
|
|
43
40
|
GetBrandingById200,
|
|
44
|
-
GetBrandingByIdParams,
|
|
45
41
|
GetClaimStatus200,
|
|
46
42
|
GetClaimStatusParams,
|
|
43
|
+
GetEvent200,
|
|
44
|
+
GetEventParams,
|
|
47
45
|
GetFlowDefinition200,
|
|
48
|
-
GetFlowDefinitionParams,
|
|
49
46
|
GetFlowStep200,
|
|
50
47
|
GetHealthDefault,
|
|
51
48
|
GetLiveDefault,
|
|
@@ -56,9 +53,7 @@ import type {
|
|
|
56
53
|
GetSchemaById200,
|
|
57
54
|
GetSchemaByIdParams,
|
|
58
55
|
GetSession200,
|
|
59
|
-
GetSessionParams,
|
|
60
56
|
GetTeam200,
|
|
61
|
-
GetTeamParams,
|
|
62
57
|
GetUserByID200,
|
|
63
58
|
GetUserByIDParams,
|
|
64
59
|
InitClaim201,
|
|
@@ -66,6 +61,8 @@ import type {
|
|
|
66
61
|
IssueChallengeBody,
|
|
67
62
|
ListBranding200Item,
|
|
68
63
|
ListBrandingParams,
|
|
64
|
+
ListEvents200,
|
|
65
|
+
ListEventsParams,
|
|
69
66
|
ListFlowDefinitions200,
|
|
70
67
|
ListFlowDefinitionsParams,
|
|
71
68
|
ListSchemas200Item,
|
|
@@ -86,17 +83,13 @@ import type {
|
|
|
86
83
|
QueryTeams200,
|
|
87
84
|
QueryTeamsBody,
|
|
88
85
|
QueryTeamsParams,
|
|
89
|
-
RevokeSessionParams,
|
|
90
86
|
SetUserPasswordBody,
|
|
91
|
-
SetUserPasswordParams,
|
|
92
87
|
SubmitFlowStep200,
|
|
93
88
|
SubmitFlowStepBody,
|
|
94
89
|
UpdateFlowDefinition200,
|
|
95
90
|
UpdateFlowDefinitionBody,
|
|
96
|
-
UpdateFlowDefinitionParams,
|
|
97
91
|
UpdateTeam200,
|
|
98
92
|
UpdateTeamBody,
|
|
99
|
-
UpdateTeamParams,
|
|
100
93
|
VerifyChallengeProof200,
|
|
101
94
|
VerifyChallengeProofBody,
|
|
102
95
|
} from "../model";
|
|
@@ -207,7 +200,7 @@ export const listUsers = async (
|
|
|
207
200
|
});
|
|
208
201
|
};
|
|
209
202
|
|
|
210
|
-
export const getGetUserByIDUrl = (userId: string, params
|
|
203
|
+
export const getGetUserByIDUrl = (userId: string, params?: GetUserByIDParams) => {
|
|
211
204
|
const normalizedParams = new URLSearchParams();
|
|
212
205
|
|
|
213
206
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -228,7 +221,7 @@ export const getGetUserByIDUrl = (userId: string, params: GetUserByIDParams) =>
|
|
|
228
221
|
*/
|
|
229
222
|
export const getUserByID = async (
|
|
230
223
|
userId: string,
|
|
231
|
-
params
|
|
224
|
+
params?: GetUserByIDParams,
|
|
232
225
|
options?: RequestInit,
|
|
233
226
|
): Promise<GetUserByID200> => {
|
|
234
227
|
return customFetch<GetUserByID200>(getGetUserByIDUrl(userId, params), {
|
|
@@ -237,37 +230,21 @@ export const getUserByID = async (
|
|
|
237
230
|
});
|
|
238
231
|
};
|
|
239
232
|
|
|
240
|
-
export const getDeleteUserByIDUrl = (userId: string
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
244
|
-
if (value !== undefined) {
|
|
245
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
const stringifiedParams = normalizedParams.toString();
|
|
250
|
-
|
|
251
|
-
return stringifiedParams.length > 0
|
|
252
|
-
? `${getProxyPath()}/users/${userId}?${stringifiedParams}`
|
|
253
|
-
: `${getProxyPath()}/users/${userId}`;
|
|
233
|
+
export const getDeleteUserByIDUrl = (userId: string) => {
|
|
234
|
+
return `${getProxyPath()}/users/${userId}`;
|
|
254
235
|
};
|
|
255
236
|
|
|
256
237
|
/**
|
|
257
238
|
* @summary Delete user by ID
|
|
258
239
|
*/
|
|
259
|
-
export const deleteUserByID = async (
|
|
260
|
-
userId
|
|
261
|
-
params: DeleteUserByIDParams,
|
|
262
|
-
options?: RequestInit,
|
|
263
|
-
): Promise<void> => {
|
|
264
|
-
return customFetch<void>(getDeleteUserByIDUrl(userId, params), {
|
|
240
|
+
export const deleteUserByID = async (userId: string, options?: RequestInit): Promise<void> => {
|
|
241
|
+
return customFetch<void>(getDeleteUserByIDUrl(userId), {
|
|
265
242
|
...options,
|
|
266
243
|
method: "DELETE",
|
|
267
244
|
});
|
|
268
245
|
};
|
|
269
246
|
|
|
270
|
-
export const getListUserPasskeysUrl = (userId: string, params
|
|
247
|
+
export const getListUserPasskeysUrl = (userId: string, params?: ListUserPasskeysParams) => {
|
|
271
248
|
const normalizedParams = new URLSearchParams();
|
|
272
249
|
|
|
273
250
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -288,7 +265,7 @@ export const getListUserPasskeysUrl = (userId: string, params: ListUserPasskeysP
|
|
|
288
265
|
*/
|
|
289
266
|
export const listUserPasskeys = async (
|
|
290
267
|
userId: string,
|
|
291
|
-
params
|
|
268
|
+
params?: ListUserPasskeysParams,
|
|
292
269
|
options?: RequestInit,
|
|
293
270
|
): Promise<ListUserPasskeys200> => {
|
|
294
271
|
return customFetch<ListUserPasskeys200>(getListUserPasskeysUrl(userId, params), {
|
|
@@ -297,20 +274,8 @@ export const listUserPasskeys = async (
|
|
|
297
274
|
});
|
|
298
275
|
};
|
|
299
276
|
|
|
300
|
-
export const getSetUserPasswordUrl = (userId: string
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
304
|
-
if (value !== undefined) {
|
|
305
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
const stringifiedParams = normalizedParams.toString();
|
|
310
|
-
|
|
311
|
-
return stringifiedParams.length > 0
|
|
312
|
-
? `${getProxyPath()}/users/${userId}/password?${stringifiedParams}`
|
|
313
|
-
: `${getProxyPath()}/users/${userId}/password`;
|
|
277
|
+
export const getSetUserPasswordUrl = (userId: string) => {
|
|
278
|
+
return `${getProxyPath()}/users/${userId}/password`;
|
|
314
279
|
};
|
|
315
280
|
|
|
316
281
|
/**
|
|
@@ -319,10 +284,9 @@ export const getSetUserPasswordUrl = (userId: string, params: SetUserPasswordPar
|
|
|
319
284
|
export const setUserPassword = async (
|
|
320
285
|
userId: string,
|
|
321
286
|
setUserPasswordBody: SetUserPasswordBody,
|
|
322
|
-
params: SetUserPasswordParams,
|
|
323
287
|
options?: RequestInit,
|
|
324
288
|
): Promise<void> => {
|
|
325
|
-
return customFetch<void>(getSetUserPasswordUrl(userId
|
|
289
|
+
return customFetch<void>(getSetUserPasswordUrl(userId), {
|
|
326
290
|
...options,
|
|
327
291
|
method: "PUT",
|
|
328
292
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
@@ -330,7 +294,7 @@ export const setUserPassword = async (
|
|
|
330
294
|
});
|
|
331
295
|
};
|
|
332
296
|
|
|
333
|
-
export const getListUserTeamsUrl = (userId: string, params
|
|
297
|
+
export const getListUserTeamsUrl = (userId: string, params?: ListUserTeamsParams) => {
|
|
334
298
|
const normalizedParams = new URLSearchParams();
|
|
335
299
|
|
|
336
300
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -359,7 +323,7 @@ returned.
|
|
|
359
323
|
*/
|
|
360
324
|
export const listUserTeams = async (
|
|
361
325
|
userId: string,
|
|
362
|
-
params
|
|
326
|
+
params?: ListUserTeamsParams,
|
|
363
327
|
options?: RequestInit,
|
|
364
328
|
): Promise<ListUserTeams200> => {
|
|
365
329
|
return customFetch<ListUserTeams200>(getListUserTeamsUrl(userId, params), {
|
|
@@ -906,20 +870,8 @@ export const exchangeHandoff = async (
|
|
|
906
870
|
});
|
|
907
871
|
};
|
|
908
872
|
|
|
909
|
-
export const getGetSessionUrl = (sessionId: string
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
913
|
-
if (value !== undefined) {
|
|
914
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
915
|
-
}
|
|
916
|
-
});
|
|
917
|
-
|
|
918
|
-
const stringifiedParams = normalizedParams.toString();
|
|
919
|
-
|
|
920
|
-
return stringifiedParams.length > 0
|
|
921
|
-
? `${getProxyPath()}/sessions/${sessionId}?${stringifiedParams}`
|
|
922
|
-
: `${getProxyPath()}/sessions/${sessionId}`;
|
|
873
|
+
export const getGetSessionUrl = (sessionId: string) => {
|
|
874
|
+
return `${getProxyPath()}/sessions/${sessionId}`;
|
|
923
875
|
};
|
|
924
876
|
|
|
925
877
|
/**
|
|
@@ -934,29 +886,16 @@ against the same `session_id`) to restore a dropped assurance level.
|
|
|
934
886
|
*/
|
|
935
887
|
export const getSession = async (
|
|
936
888
|
sessionId: string,
|
|
937
|
-
params: GetSessionParams,
|
|
938
889
|
options?: RequestInit,
|
|
939
890
|
): Promise<GetSession200> => {
|
|
940
|
-
return customFetch<GetSession200>(getGetSessionUrl(sessionId
|
|
891
|
+
return customFetch<GetSession200>(getGetSessionUrl(sessionId), {
|
|
941
892
|
...options,
|
|
942
893
|
method: "GET",
|
|
943
894
|
});
|
|
944
895
|
};
|
|
945
896
|
|
|
946
|
-
export const getRevokeSessionUrl = (sessionId: string
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
950
|
-
if (value !== undefined) {
|
|
951
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
952
|
-
}
|
|
953
|
-
});
|
|
954
|
-
|
|
955
|
-
const stringifiedParams = normalizedParams.toString();
|
|
956
|
-
|
|
957
|
-
return stringifiedParams.length > 0
|
|
958
|
-
? `${getProxyPath()}/sessions/${sessionId}?${stringifiedParams}`
|
|
959
|
-
: `${getProxyPath()}/sessions/${sessionId}`;
|
|
897
|
+
export const getRevokeSessionUrl = (sessionId: string) => {
|
|
898
|
+
return `${getProxyPath()}/sessions/${sessionId}`;
|
|
960
899
|
};
|
|
961
900
|
|
|
962
901
|
/**
|
|
@@ -972,12 +911,8 @@ invalidated.
|
|
|
972
911
|
|
|
973
912
|
* @summary Revoke session
|
|
974
913
|
*/
|
|
975
|
-
export const revokeSession = async (
|
|
976
|
-
sessionId
|
|
977
|
-
params: RevokeSessionParams,
|
|
978
|
-
options?: RequestInit,
|
|
979
|
-
): Promise<void> => {
|
|
980
|
-
return customFetch<void>(getRevokeSessionUrl(sessionId, params), {
|
|
914
|
+
export const revokeSession = async (sessionId: string, options?: RequestInit): Promise<void> => {
|
|
915
|
+
return customFetch<void>(getRevokeSessionUrl(sessionId), {
|
|
981
916
|
...options,
|
|
982
917
|
method: "DELETE",
|
|
983
918
|
});
|
|
@@ -1099,7 +1034,7 @@ export const listSchemas = async (
|
|
|
1099
1034
|
});
|
|
1100
1035
|
};
|
|
1101
1036
|
|
|
1102
|
-
export const getGetSchemaByIdUrl = (id: string, params
|
|
1037
|
+
export const getGetSchemaByIdUrl = (id: string, params?: GetSchemaByIdParams) => {
|
|
1103
1038
|
const normalizedParams = new URLSearchParams();
|
|
1104
1039
|
|
|
1105
1040
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1121,7 +1056,7 @@ export const getGetSchemaByIdUrl = (id: string, params: GetSchemaByIdParams) =>
|
|
|
1121
1056
|
*/
|
|
1122
1057
|
export const getSchemaById = async (
|
|
1123
1058
|
id: string,
|
|
1124
|
-
params
|
|
1059
|
+
params?: GetSchemaByIdParams,
|
|
1125
1060
|
options?: RequestInit,
|
|
1126
1061
|
): Promise<GetSchemaById200> => {
|
|
1127
1062
|
return customFetch<GetSchemaById200>(getGetSchemaByIdUrl(id, params), {
|
|
@@ -1187,20 +1122,8 @@ export const listFlowDefinitions = async (
|
|
|
1187
1122
|
});
|
|
1188
1123
|
};
|
|
1189
1124
|
|
|
1190
|
-
export const getGetFlowDefinitionUrl = (id: string
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1194
|
-
if (value !== undefined) {
|
|
1195
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1196
|
-
}
|
|
1197
|
-
});
|
|
1198
|
-
|
|
1199
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1200
|
-
|
|
1201
|
-
return stringifiedParams.length > 0
|
|
1202
|
-
? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}`
|
|
1203
|
-
: `${getProxyPath()}/flow_definitions/${id}`;
|
|
1125
|
+
export const getGetFlowDefinitionUrl = (id: string) => {
|
|
1126
|
+
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
1204
1127
|
};
|
|
1205
1128
|
|
|
1206
1129
|
/**
|
|
@@ -1209,29 +1132,16 @@ export const getGetFlowDefinitionUrl = (id: string, params: GetFlowDefinitionPar
|
|
|
1209
1132
|
*/
|
|
1210
1133
|
export const getFlowDefinition = async (
|
|
1211
1134
|
id: string,
|
|
1212
|
-
params: GetFlowDefinitionParams,
|
|
1213
1135
|
options?: RequestInit,
|
|
1214
1136
|
): Promise<GetFlowDefinition200> => {
|
|
1215
|
-
return customFetch<GetFlowDefinition200>(getGetFlowDefinitionUrl(id
|
|
1137
|
+
return customFetch<GetFlowDefinition200>(getGetFlowDefinitionUrl(id), {
|
|
1216
1138
|
...options,
|
|
1217
1139
|
method: "GET",
|
|
1218
1140
|
});
|
|
1219
1141
|
};
|
|
1220
1142
|
|
|
1221
|
-
export const getUpdateFlowDefinitionUrl = (id: string
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1225
|
-
if (value !== undefined) {
|
|
1226
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1229
|
-
|
|
1230
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1231
|
-
|
|
1232
|
-
return stringifiedParams.length > 0
|
|
1233
|
-
? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}`
|
|
1234
|
-
: `${getProxyPath()}/flow_definitions/${id}`;
|
|
1143
|
+
export const getUpdateFlowDefinitionUrl = (id: string) => {
|
|
1144
|
+
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
1235
1145
|
};
|
|
1236
1146
|
|
|
1237
1147
|
/**
|
|
@@ -1243,10 +1153,9 @@ If `flow_definition.status` is omitted, the current status is preserved
|
|
|
1243
1153
|
export const updateFlowDefinition = async (
|
|
1244
1154
|
id: string,
|
|
1245
1155
|
updateFlowDefinitionBody: UpdateFlowDefinitionBody,
|
|
1246
|
-
params: UpdateFlowDefinitionParams,
|
|
1247
1156
|
options?: RequestInit,
|
|
1248
1157
|
): Promise<UpdateFlowDefinition200> => {
|
|
1249
|
-
return customFetch<UpdateFlowDefinition200>(getUpdateFlowDefinitionUrl(id
|
|
1158
|
+
return customFetch<UpdateFlowDefinition200>(getUpdateFlowDefinitionUrl(id), {
|
|
1250
1159
|
...options,
|
|
1251
1160
|
method: "PUT",
|
|
1252
1161
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
@@ -1254,20 +1163,8 @@ export const updateFlowDefinition = async (
|
|
|
1254
1163
|
});
|
|
1255
1164
|
};
|
|
1256
1165
|
|
|
1257
|
-
export const getDeleteFlowDefinitionUrl = (id: string
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1261
|
-
if (value !== undefined) {
|
|
1262
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1263
|
-
}
|
|
1264
|
-
});
|
|
1265
|
-
|
|
1266
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1267
|
-
|
|
1268
|
-
return stringifiedParams.length > 0
|
|
1269
|
-
? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}`
|
|
1270
|
-
: `${getProxyPath()}/flow_definitions/${id}`;
|
|
1166
|
+
export const getDeleteFlowDefinitionUrl = (id: string) => {
|
|
1167
|
+
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
1271
1168
|
};
|
|
1272
1169
|
|
|
1273
1170
|
/**
|
|
@@ -1277,12 +1174,8 @@ If the flow definition is the last active flow definition for a given purpose, t
|
|
|
1277
1174
|
|
|
1278
1175
|
* @summary Delete a flow definition by id
|
|
1279
1176
|
*/
|
|
1280
|
-
export const deleteFlowDefinition = async (
|
|
1281
|
-
id
|
|
1282
|
-
params: DeleteFlowDefinitionParams,
|
|
1283
|
-
options?: RequestInit,
|
|
1284
|
-
): Promise<void> => {
|
|
1285
|
-
return customFetch<void>(getDeleteFlowDefinitionUrl(id, params), {
|
|
1177
|
+
export const deleteFlowDefinition = async (id: string, options?: RequestInit): Promise<void> => {
|
|
1178
|
+
return customFetch<void>(getDeleteFlowDefinitionUrl(id), {
|
|
1286
1179
|
...options,
|
|
1287
1180
|
method: "DELETE",
|
|
1288
1181
|
});
|
|
@@ -1338,7 +1231,6 @@ export const getQueryTeamsUrl = (params: QueryTeamsParams) => {
|
|
|
1338
1231
|
|
|
1339
1232
|
/**
|
|
1340
1233
|
* Returns the teams of a project, paginated with a cursor.
|
|
1341
|
-
Teams of every lifecycle status are returned; each carries its `status`.
|
|
1342
1234
|
|
|
1343
1235
|
* @summary Query teams
|
|
1344
1236
|
*/
|
|
@@ -1355,20 +1247,8 @@ export const queryTeams = async (
|
|
|
1355
1247
|
});
|
|
1356
1248
|
};
|
|
1357
1249
|
|
|
1358
|
-
export const getGetTeamUrl = (teamId: string
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1362
|
-
if (value !== undefined) {
|
|
1363
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1364
|
-
}
|
|
1365
|
-
});
|
|
1366
|
-
|
|
1367
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1368
|
-
|
|
1369
|
-
return stringifiedParams.length > 0
|
|
1370
|
-
? `${getProxyPath()}/teams/${teamId}?${stringifiedParams}`
|
|
1371
|
-
: `${getProxyPath()}/teams/${teamId}`;
|
|
1250
|
+
export const getGetTeamUrl = (teamId: string) => {
|
|
1251
|
+
return `${getProxyPath()}/teams/${teamId}`;
|
|
1372
1252
|
};
|
|
1373
1253
|
|
|
1374
1254
|
/**
|
|
@@ -1376,31 +1256,15 @@ export const getGetTeamUrl = (teamId: string, params: GetTeamParams) => {
|
|
|
1376
1256
|
|
|
1377
1257
|
* @summary Get team
|
|
1378
1258
|
*/
|
|
1379
|
-
export const getTeam = async (
|
|
1380
|
-
teamId
|
|
1381
|
-
params: GetTeamParams,
|
|
1382
|
-
options?: RequestInit,
|
|
1383
|
-
): Promise<GetTeam200> => {
|
|
1384
|
-
return customFetch<GetTeam200>(getGetTeamUrl(teamId, params), {
|
|
1259
|
+
export const getTeam = async (teamId: string, options?: RequestInit): Promise<GetTeam200> => {
|
|
1260
|
+
return customFetch<GetTeam200>(getGetTeamUrl(teamId), {
|
|
1385
1261
|
...options,
|
|
1386
1262
|
method: "GET",
|
|
1387
1263
|
});
|
|
1388
1264
|
};
|
|
1389
1265
|
|
|
1390
|
-
export const getDeleteTeamUrl = (teamId: string
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1394
|
-
if (value !== undefined) {
|
|
1395
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1396
|
-
}
|
|
1397
|
-
});
|
|
1398
|
-
|
|
1399
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1400
|
-
|
|
1401
|
-
return stringifiedParams.length > 0
|
|
1402
|
-
? `${getProxyPath()}/teams/${teamId}?${stringifiedParams}`
|
|
1403
|
-
: `${getProxyPath()}/teams/${teamId}`;
|
|
1266
|
+
export const getDeleteTeamUrl = (teamId: string) => {
|
|
1267
|
+
return `${getProxyPath()}/teams/${teamId}`;
|
|
1404
1268
|
};
|
|
1405
1269
|
|
|
1406
1270
|
/**
|
|
@@ -1415,31 +1279,15 @@ or doesn't exist succeeds without changing anything.
|
|
|
1415
1279
|
|
|
1416
1280
|
* @summary Delete team
|
|
1417
1281
|
*/
|
|
1418
|
-
export const deleteTeam = async (
|
|
1419
|
-
teamId
|
|
1420
|
-
params: DeleteTeamParams,
|
|
1421
|
-
options?: RequestInit,
|
|
1422
|
-
): Promise<void> => {
|
|
1423
|
-
return customFetch<void>(getDeleteTeamUrl(teamId, params), {
|
|
1282
|
+
export const deleteTeam = async (teamId: string, options?: RequestInit): Promise<void> => {
|
|
1283
|
+
return customFetch<void>(getDeleteTeamUrl(teamId), {
|
|
1424
1284
|
...options,
|
|
1425
1285
|
method: "DELETE",
|
|
1426
1286
|
});
|
|
1427
1287
|
};
|
|
1428
1288
|
|
|
1429
|
-
export const getUpdateTeamUrl = (teamId: string
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1433
|
-
if (value !== undefined) {
|
|
1434
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1435
|
-
}
|
|
1436
|
-
});
|
|
1437
|
-
|
|
1438
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1439
|
-
|
|
1440
|
-
return stringifiedParams.length > 0
|
|
1441
|
-
? `${getProxyPath()}/teams/${teamId}?${stringifiedParams}`
|
|
1442
|
-
: `${getProxyPath()}/teams/${teamId}`;
|
|
1289
|
+
export const getUpdateTeamUrl = (teamId: string) => {
|
|
1290
|
+
return `${getProxyPath()}/teams/${teamId}`;
|
|
1443
1291
|
};
|
|
1444
1292
|
|
|
1445
1293
|
/**
|
|
@@ -1450,10 +1298,9 @@ export const getUpdateTeamUrl = (teamId: string, params: UpdateTeamParams) => {
|
|
|
1450
1298
|
export const updateTeam = async (
|
|
1451
1299
|
teamId: string,
|
|
1452
1300
|
updateTeamBody: UpdateTeamBody,
|
|
1453
|
-
params: UpdateTeamParams,
|
|
1454
1301
|
options?: RequestInit,
|
|
1455
1302
|
): Promise<UpdateTeam200> => {
|
|
1456
|
-
return customFetch<UpdateTeam200>(getUpdateTeamUrl(teamId
|
|
1303
|
+
return customFetch<UpdateTeam200>(getUpdateTeamUrl(teamId), {
|
|
1457
1304
|
...options,
|
|
1458
1305
|
method: "PATCH",
|
|
1459
1306
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
@@ -1538,10 +1385,37 @@ export const listBranding = async (
|
|
|
1538
1385
|
});
|
|
1539
1386
|
};
|
|
1540
1387
|
|
|
1541
|
-
export const getGetBrandingByIdUrl = (id: string
|
|
1388
|
+
export const getGetBrandingByIdUrl = (id: string) => {
|
|
1389
|
+
return `${getProxyPath()}/branding/${id}`;
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* Retrieves a single branding revision, including its stored configuration.
|
|
1394
|
+
* @summary Get a branding revision by ID
|
|
1395
|
+
*/
|
|
1396
|
+
export const getBrandingById = async (
|
|
1397
|
+
id: string,
|
|
1398
|
+
options?: RequestInit,
|
|
1399
|
+
): Promise<GetBrandingById200> => {
|
|
1400
|
+
return customFetch<GetBrandingById200>(getGetBrandingByIdUrl(id), {
|
|
1401
|
+
...options,
|
|
1402
|
+
method: "GET",
|
|
1403
|
+
});
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
export const getListEventsUrl = (params: ListEventsParams) => {
|
|
1542
1407
|
const normalizedParams = new URLSearchParams();
|
|
1543
1408
|
|
|
1544
1409
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1410
|
+
const explodeParameters = ["category", "event_type"];
|
|
1411
|
+
|
|
1412
|
+
if (Array.isArray(value) && explodeParameters.includes(key)) {
|
|
1413
|
+
value.forEach((v) => {
|
|
1414
|
+
normalizedParams.append(key, v === null ? "null" : v.toString());
|
|
1415
|
+
});
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1545
1419
|
if (value !== undefined) {
|
|
1546
1420
|
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1547
1421
|
}
|
|
@@ -1550,20 +1424,66 @@ export const getGetBrandingByIdUrl = (id: string, params: GetBrandingByIdParams)
|
|
|
1550
1424
|
const stringifiedParams = normalizedParams.toString();
|
|
1551
1425
|
|
|
1552
1426
|
return stringifiedParams.length > 0
|
|
1553
|
-
? `${getProxyPath()}/
|
|
1554
|
-
: `${getProxyPath()}/
|
|
1427
|
+
? `${getProxyPath()}/events?${stringifiedParams}`
|
|
1428
|
+
: `${getProxyPath()}/events`;
|
|
1555
1429
|
};
|
|
1556
1430
|
|
|
1557
1431
|
/**
|
|
1558
|
-
*
|
|
1559
|
-
|
|
1432
|
+
* Returns project-scoped audit events, newest-first by keyset on
|
|
1433
|
+
`(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
|
|
1434
|
+
Requires `events.read`.
|
|
1435
|
+
|
|
1436
|
+
Pre-claim projects return an empty list (events are stored but not
|
|
1437
|
+
visible until claim succeeds). Team-scoped credentials see only events
|
|
1438
|
+
whose emit-time `team_id` matches the credential team (enforced when
|
|
1439
|
+
team-scoped tokens exist).
|
|
1440
|
+
|
|
1441
|
+
Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
|
|
1442
|
+
see docs/design/api/events-catalog.md.
|
|
1443
|
+
|
|
1444
|
+
* @summary List events
|
|
1560
1445
|
*/
|
|
1561
|
-
export const
|
|
1446
|
+
export const listEvents = async (
|
|
1447
|
+
params: ListEventsParams,
|
|
1448
|
+
options?: RequestInit,
|
|
1449
|
+
): Promise<ListEvents200> => {
|
|
1450
|
+
return customFetch<ListEvents200>(getListEventsUrl(params), {
|
|
1451
|
+
...options,
|
|
1452
|
+
method: "GET",
|
|
1453
|
+
});
|
|
1454
|
+
};
|
|
1455
|
+
|
|
1456
|
+
export const getGetEventUrl = (id: string, params: GetEventParams) => {
|
|
1457
|
+
const normalizedParams = new URLSearchParams();
|
|
1458
|
+
|
|
1459
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1460
|
+
if (value !== undefined) {
|
|
1461
|
+
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
|
|
1465
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1466
|
+
|
|
1467
|
+
return stringifiedParams.length > 0
|
|
1468
|
+
? `${getProxyPath()}/events/${id}?${stringifiedParams}`
|
|
1469
|
+
: `${getProxyPath()}/events/${id}`;
|
|
1470
|
+
};
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* Loads a single event by `(project_id, id)`. Requires `events.read`.
|
|
1474
|
+
Events are not registered in `resource_scope_index`; project scope is
|
|
1475
|
+
required on the query (ADR 049). Misses and cross-project ids return 404.
|
|
1476
|
+
|
|
1477
|
+
Pre-claim projects return 404 (stored events stay invisible until claim).
|
|
1478
|
+
|
|
1479
|
+
* @summary Get event by ID
|
|
1480
|
+
*/
|
|
1481
|
+
export const getEvent = async (
|
|
1562
1482
|
id: string,
|
|
1563
|
-
params:
|
|
1483
|
+
params: GetEventParams,
|
|
1564
1484
|
options?: RequestInit,
|
|
1565
|
-
): Promise<
|
|
1566
|
-
return customFetch<
|
|
1485
|
+
): Promise<GetEvent200> => {
|
|
1486
|
+
return customFetch<GetEvent200>(getGetEventUrl(id, params), {
|
|
1567
1487
|
...options,
|
|
1568
1488
|
method: "GET",
|
|
1569
1489
|
});
|