authula 0.7.5 → 0.7.7
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/{index-DMNC6oKY.d.ts → index-BkTYd6bt.d.ts} +63 -4
- package/dist/index.d.ts +2 -2
- package/dist/plugins/index.d.ts +106 -46
- package/dist/plugins/index.js +104 -51
- package/dist/plugins/index.js.map +1 -1
- package/package.json +2 -1
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,
|
|
@@ -4136,46 +4146,6 @@ function useGetOrganizationInvitation(organizationId, invitationId, options, que
|
|
|
4136
4146
|
const query = useQuery(queryOptions, queryClient);
|
|
4137
4147
|
return withQueryKey$4(query, queryOptions.queryKey);
|
|
4138
4148
|
}
|
|
4139
|
-
const getRevokeOrganizationInvitationUrl = (organizationId, invitationId) => {
|
|
4140
|
-
return `/organizations/${organizationId}/invitations/${invitationId}`;
|
|
4141
|
-
};
|
|
4142
|
-
/**
|
|
4143
|
-
* Revokes a pending invitation.
|
|
4144
|
-
* @summary Revoke invitation
|
|
4145
|
-
*/
|
|
4146
|
-
const revokeOrganizationInvitation = async (organizationId, invitationId, options) => {
|
|
4147
|
-
return customFetch(getRevokeOrganizationInvitationUrl(organizationId, invitationId), {
|
|
4148
|
-
...options,
|
|
4149
|
-
method: "PATCH"
|
|
4150
|
-
});
|
|
4151
|
-
};
|
|
4152
|
-
const getRevokeOrganizationInvitationMutationOptions = (options) => {
|
|
4153
|
-
const mutationKey = ["revokeOrganizationInvitation"];
|
|
4154
|
-
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4155
|
-
...options,
|
|
4156
|
-
mutation: {
|
|
4157
|
-
...options.mutation,
|
|
4158
|
-
mutationKey
|
|
4159
|
-
}
|
|
4160
|
-
} : {
|
|
4161
|
-
mutation: { mutationKey },
|
|
4162
|
-
request: void 0
|
|
4163
|
-
};
|
|
4164
|
-
const mutationFn = (props) => {
|
|
4165
|
-
const { organizationId, invitationId } = props ?? {};
|
|
4166
|
-
return revokeOrganizationInvitation(organizationId, invitationId, requestOptions);
|
|
4167
|
-
};
|
|
4168
|
-
return {
|
|
4169
|
-
mutationFn,
|
|
4170
|
-
...mutationOptions
|
|
4171
|
-
};
|
|
4172
|
-
};
|
|
4173
|
-
/**
|
|
4174
|
-
* @summary Revoke invitation
|
|
4175
|
-
*/
|
|
4176
|
-
const useRevokeOrganizationInvitation = (options, queryClient) => {
|
|
4177
|
-
return useMutation(getRevokeOrganizationInvitationMutationOptions(options), queryClient);
|
|
4178
|
-
};
|
|
4179
4149
|
const getAcceptOrganizationInvitationUrl = (organizationId, invitationId, params) => {
|
|
4180
4150
|
const normalizedParams = new URLSearchParams();
|
|
4181
4151
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -4185,13 +4155,13 @@ const getAcceptOrganizationInvitationUrl = (organizationId, invitationId, params
|
|
|
4185
4155
|
return stringifiedParams.length > 0 ? `/organizations/${organizationId}/invitations/${invitationId}/accept?${stringifiedParams}` : `/organizations/${organizationId}/invitations/${invitationId}/accept`;
|
|
4186
4156
|
};
|
|
4187
4157
|
/**
|
|
4188
|
-
* Accepts an invitation to join an organization.
|
|
4158
|
+
* Accepts an invitation to join an organization.
|
|
4189
4159
|
* @summary Accept invitation
|
|
4190
4160
|
*/
|
|
4191
4161
|
const acceptOrganizationInvitation = async (organizationId, invitationId, acceptOrganizationInvitationQuery, params, options) => {
|
|
4192
4162
|
return customFetch(getAcceptOrganizationInvitationUrl(organizationId, invitationId, params), {
|
|
4193
4163
|
...options,
|
|
4194
|
-
method: "
|
|
4164
|
+
method: "PATCH",
|
|
4195
4165
|
headers: {
|
|
4196
4166
|
"Content-Type": "application/json",
|
|
4197
4167
|
...options?.headers
|
|
@@ -4236,7 +4206,7 @@ const getRejectOrganizationInvitationUrl = (organizationId, invitationId) => {
|
|
|
4236
4206
|
const rejectOrganizationInvitation = async (organizationId, invitationId, options) => {
|
|
4237
4207
|
return customFetch(getRejectOrganizationInvitationUrl(organizationId, invitationId), {
|
|
4238
4208
|
...options,
|
|
4239
|
-
method: "
|
|
4209
|
+
method: "PATCH"
|
|
4240
4210
|
});
|
|
4241
4211
|
};
|
|
4242
4212
|
const getRejectOrganizationInvitationMutationOptions = (options) => {
|
|
@@ -4266,6 +4236,89 @@ const getRejectOrganizationInvitationMutationOptions = (options) => {
|
|
|
4266
4236
|
const useRejectOrganizationInvitation = (options, queryClient) => {
|
|
4267
4237
|
return useMutation(getRejectOrganizationInvitationMutationOptions(options), queryClient);
|
|
4268
4238
|
};
|
|
4239
|
+
const getRevokeOrganizationInvitationUrl = (organizationId, invitationId) => {
|
|
4240
|
+
return `/organizations/${organizationId}/invitations/${invitationId}/revoke`;
|
|
4241
|
+
};
|
|
4242
|
+
/**
|
|
4243
|
+
* Revokes a pending invitation.
|
|
4244
|
+
* @summary Revoke invitation
|
|
4245
|
+
*/
|
|
4246
|
+
const revokeOrganizationInvitation = async (organizationId, invitationId, options) => {
|
|
4247
|
+
return customFetch(getRevokeOrganizationInvitationUrl(organizationId, invitationId), {
|
|
4248
|
+
...options,
|
|
4249
|
+
method: "PATCH"
|
|
4250
|
+
});
|
|
4251
|
+
};
|
|
4252
|
+
const getRevokeOrganizationInvitationMutationOptions = (options) => {
|
|
4253
|
+
const mutationKey = ["revokeOrganizationInvitation"];
|
|
4254
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4255
|
+
...options,
|
|
4256
|
+
mutation: {
|
|
4257
|
+
...options.mutation,
|
|
4258
|
+
mutationKey
|
|
4259
|
+
}
|
|
4260
|
+
} : {
|
|
4261
|
+
mutation: { mutationKey },
|
|
4262
|
+
request: void 0
|
|
4263
|
+
};
|
|
4264
|
+
const mutationFn = (props) => {
|
|
4265
|
+
const { organizationId, invitationId } = props ?? {};
|
|
4266
|
+
return revokeOrganizationInvitation(organizationId, invitationId, requestOptions);
|
|
4267
|
+
};
|
|
4268
|
+
return {
|
|
4269
|
+
mutationFn,
|
|
4270
|
+
...mutationOptions
|
|
4271
|
+
};
|
|
4272
|
+
};
|
|
4273
|
+
/**
|
|
4274
|
+
* @summary Revoke invitation
|
|
4275
|
+
*/
|
|
4276
|
+
const useRevokeOrganizationInvitation = (options, queryClient) => {
|
|
4277
|
+
return useMutation(getRevokeOrganizationInvitationMutationOptions(options), queryClient);
|
|
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
|