authula 0.7.4 → 0.7.6
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/plugins/index.js
CHANGED
|
@@ -3993,6 +3993,9 @@ var organization_invitations_exports = /* @__PURE__ */ __exportAll({
|
|
|
3993
3993
|
getRejectOrganizationInvitationUrl: () => getRejectOrganizationInvitationUrl,
|
|
3994
3994
|
getRevokeOrganizationInvitationMutationOptions: () => getRevokeOrganizationInvitationMutationOptions,
|
|
3995
3995
|
getRevokeOrganizationInvitationUrl: () => getRevokeOrganizationInvitationUrl,
|
|
3996
|
+
getVerifyOrganizationInvitationQueryKey: () => getVerifyOrganizationInvitationQueryKey,
|
|
3997
|
+
getVerifyOrganizationInvitationQueryOptions: () => getVerifyOrganizationInvitationQueryOptions,
|
|
3998
|
+
getVerifyOrganizationInvitationUrl: () => getVerifyOrganizationInvitationUrl,
|
|
3996
3999
|
listOrganizationInvitations: () => listOrganizationInvitations,
|
|
3997
4000
|
rejectOrganizationInvitation: () => rejectOrganizationInvitation,
|
|
3998
4001
|
revokeOrganizationInvitation: () => revokeOrganizationInvitation,
|
|
@@ -4001,7 +4004,9 @@ var organization_invitations_exports = /* @__PURE__ */ __exportAll({
|
|
|
4001
4004
|
useGetOrganizationInvitation: () => useGetOrganizationInvitation,
|
|
4002
4005
|
useListOrganizationInvitations: () => useListOrganizationInvitations,
|
|
4003
4006
|
useRejectOrganizationInvitation: () => useRejectOrganizationInvitation,
|
|
4004
|
-
useRevokeOrganizationInvitation: () => useRevokeOrganizationInvitation
|
|
4007
|
+
useRevokeOrganizationInvitation: () => useRevokeOrganizationInvitation,
|
|
4008
|
+
useVerifyOrganizationInvitation: () => useVerifyOrganizationInvitation,
|
|
4009
|
+
verifyOrganizationInvitation: () => verifyOrganizationInvitation
|
|
4005
4010
|
});
|
|
4006
4011
|
const withQueryKey$4 = (query, queryKey) => {
|
|
4007
4012
|
const result = { queryKey };
|
|
@@ -4053,22 +4058,27 @@ function useListOrganizationInvitations(organizationId, options, queryClient) {
|
|
|
4053
4058
|
const query = useQuery(queryOptions, queryClient);
|
|
4054
4059
|
return withQueryKey$4(query, queryOptions.queryKey);
|
|
4055
4060
|
}
|
|
4056
|
-
const getCreateOrganizationInvitationUrl = (organizationId) => {
|
|
4057
|
-
|
|
4061
|
+
const getCreateOrganizationInvitationUrl = (organizationId, params) => {
|
|
4062
|
+
const normalizedParams = new URLSearchParams();
|
|
4063
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4064
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4065
|
+
});
|
|
4066
|
+
const stringifiedParams = normalizedParams.toString();
|
|
4067
|
+
return stringifiedParams.length > 0 ? `/organizations/${organizationId}/invitations?${stringifiedParams}` : `/organizations/${organizationId}/invitations`;
|
|
4058
4068
|
};
|
|
4059
4069
|
/**
|
|
4060
4070
|
* Creates an invitation for a user to join an organization.
|
|
4061
4071
|
* @summary Create invitation
|
|
4062
4072
|
*/
|
|
4063
|
-
const createOrganizationInvitation = async (organizationId,
|
|
4064
|
-
return customFetch(getCreateOrganizationInvitationUrl(organizationId), {
|
|
4073
|
+
const createOrganizationInvitation = async (organizationId, createOrganizationInvitationQuery, params, options) => {
|
|
4074
|
+
return customFetch(getCreateOrganizationInvitationUrl(organizationId, params), {
|
|
4065
4075
|
...options,
|
|
4066
4076
|
method: "POST",
|
|
4067
4077
|
headers: {
|
|
4068
4078
|
"Content-Type": "application/json",
|
|
4069
4079
|
...options?.headers
|
|
4070
4080
|
},
|
|
4071
|
-
body: JSON.stringify(
|
|
4081
|
+
body: JSON.stringify(createOrganizationInvitationQuery)
|
|
4072
4082
|
});
|
|
4073
4083
|
};
|
|
4074
4084
|
const getCreateOrganizationInvitationMutationOptions = (options) => {
|
|
@@ -4084,8 +4094,8 @@ const getCreateOrganizationInvitationMutationOptions = (options) => {
|
|
|
4084
4094
|
request: void 0
|
|
4085
4095
|
};
|
|
4086
4096
|
const mutationFn = (props) => {
|
|
4087
|
-
const { organizationId, data } = props ?? {};
|
|
4088
|
-
return createOrganizationInvitation(organizationId, data, requestOptions);
|
|
4097
|
+
const { organizationId, data, params } = props ?? {};
|
|
4098
|
+
return createOrganizationInvitation(organizationId, data, params, requestOptions);
|
|
4089
4099
|
};
|
|
4090
4100
|
return {
|
|
4091
4101
|
mutationFn,
|
|
@@ -4185,7 +4195,7 @@ const getAcceptOrganizationInvitationUrl = (organizationId, invitationId, params
|
|
|
4185
4195
|
return stringifiedParams.length > 0 ? `/organizations/${organizationId}/invitations/${invitationId}/accept?${stringifiedParams}` : `/organizations/${organizationId}/invitations/${invitationId}/accept`;
|
|
4186
4196
|
};
|
|
4187
4197
|
/**
|
|
4188
|
-
* Accepts an invitation to join an organization.
|
|
4198
|
+
* Accepts an invitation to join an organization.
|
|
4189
4199
|
* @summary Accept invitation
|
|
4190
4200
|
*/
|
|
4191
4201
|
const acceptOrganizationInvitation = async (organizationId, invitationId, acceptOrganizationInvitationQuery, params, options) => {
|
|
@@ -4266,6 +4276,49 @@ const getRejectOrganizationInvitationMutationOptions = (options) => {
|
|
|
4266
4276
|
const useRejectOrganizationInvitation = (options, queryClient) => {
|
|
4267
4277
|
return useMutation(getRejectOrganizationInvitationMutationOptions(options), queryClient);
|
|
4268
4278
|
};
|
|
4279
|
+
const getVerifyOrganizationInvitationUrl = (organizationId, invitationId, params) => {
|
|
4280
|
+
const normalizedParams = new URLSearchParams();
|
|
4281
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4282
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4283
|
+
});
|
|
4284
|
+
const stringifiedParams = normalizedParams.toString();
|
|
4285
|
+
return stringifiedParams.length > 0 ? `/organizations/${organizationId}/invitations/${invitationId}/verify?${stringifiedParams}` : `/organizations/${organizationId}/invitations/${invitationId}/verify`;
|
|
4286
|
+
};
|
|
4287
|
+
/**
|
|
4288
|
+
* Verifies an invitation token.
|
|
4289
|
+
* @summary Verify invitation
|
|
4290
|
+
*/
|
|
4291
|
+
const verifyOrganizationInvitation = async (organizationId, invitationId, params, options) => {
|
|
4292
|
+
return customFetch(getVerifyOrganizationInvitationUrl(organizationId, invitationId, params), {
|
|
4293
|
+
...options,
|
|
4294
|
+
method: "GET"
|
|
4295
|
+
});
|
|
4296
|
+
};
|
|
4297
|
+
const getVerifyOrganizationInvitationQueryKey = (organizationId, invitationId, params) => {
|
|
4298
|
+
return [`/organizations/${organizationId}/invitations/${invitationId}/verify`, ...params ? [params] : []];
|
|
4299
|
+
};
|
|
4300
|
+
const getVerifyOrganizationInvitationQueryOptions = (organizationId, invitationId, params, options) => {
|
|
4301
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4302
|
+
const queryKey = queryOptions?.queryKey ?? getVerifyOrganizationInvitationQueryKey(organizationId, invitationId, params);
|
|
4303
|
+
const queryFn = ({ signal }) => verifyOrganizationInvitation(organizationId, invitationId, params, {
|
|
4304
|
+
signal,
|
|
4305
|
+
...requestOptions
|
|
4306
|
+
});
|
|
4307
|
+
return {
|
|
4308
|
+
queryKey,
|
|
4309
|
+
queryFn,
|
|
4310
|
+
enabled: organizationId !== null && organizationId !== void 0 && invitationId !== null && invitationId !== void 0,
|
|
4311
|
+
...queryOptions
|
|
4312
|
+
};
|
|
4313
|
+
};
|
|
4314
|
+
/**
|
|
4315
|
+
* @summary Verify invitation
|
|
4316
|
+
*/
|
|
4317
|
+
function useVerifyOrganizationInvitation(organizationId, invitationId, params, options, queryClient) {
|
|
4318
|
+
const queryOptions = getVerifyOrganizationInvitationQueryOptions(organizationId, invitationId, params, options);
|
|
4319
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4320
|
+
return withQueryKey$4(query, queryOptions.queryKey);
|
|
4321
|
+
}
|
|
4269
4322
|
|
|
4270
4323
|
//#endregion
|
|
4271
4324
|
//#region src/gen/endpoints/organization-members/organization-members.ts
|
|
@@ -4402,7 +4455,7 @@ const getGetOrganizationMemberByUserIDUrl = (organizationId, userId) => {
|
|
|
4402
4455
|
return `/organizations/${organizationId}/members/by-user/${userId}`;
|
|
4403
4456
|
};
|
|
4404
4457
|
/**
|
|
4405
|
-
* Retrieves an organization member by the user's ID.
|
|
4458
|
+
* Retrieves an organization member by the user's ID with nested user data.
|
|
4406
4459
|
* @summary Get member by user ID
|
|
4407
4460
|
*/
|
|
4408
4461
|
const getOrganizationMemberByUserID = async (organizationId, userId, options) => {
|
|
@@ -4440,7 +4493,7 @@ const getGetOrganizationMemberUrl = (organizationId, memberId) => {
|
|
|
4440
4493
|
return `/organizations/${organizationId}/members/${memberId}`;
|
|
4441
4494
|
};
|
|
4442
4495
|
/**
|
|
4443
|
-
* Retrieves a single organization member by ID.
|
|
4496
|
+
* Retrieves a single organization member by ID with nested user data.
|
|
4444
4497
|
* @summary Get member
|
|
4445
4498
|
*/
|
|
4446
4499
|
const getOrganizationMember = async (organizationId, memberId, options) => {
|
|
@@ -4931,7 +4984,7 @@ const getGetOrganizationTeamMemberUrl = (organizationId, teamId, memberId) => {
|
|
|
4931
4984
|
return `/organizations/${organizationId}/teams/${teamId}/members/${memberId}`;
|
|
4932
4985
|
};
|
|
4933
4986
|
/**
|
|
4934
|
-
* Retrieves a single team member by ID.
|
|
4987
|
+
* Retrieves a single team member by ID with nested member and user data.
|
|
4935
4988
|
* @summary Get team member
|
|
4936
4989
|
*/
|
|
4937
4990
|
const getOrganizationTeamMember = async (organizationId, teamId, memberId, options) => {
|