shoal-web-sdk 0.0.83 → 0.0.84
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/sdk/@tanstack/react-query.gen.d.ts +5 -5
- package/dist/sdk/@tanstack/react-query.gen.js +5 -5
- package/dist/sdk/sdk.gen.d.ts +2 -2
- package/dist/sdk/sdk.gen.js +1 -1
- package/dist/sdk/types.gen.d.ts +5 -5
- package/dist/sdk/zod.gen.d.ts +2 -2
- package/dist/sdk/zod.gen.js +2 -2
- package/dist/tanstack-codegen/generated/generated.d.ts +2 -2
- package/dist/tanstack-codegen/generated/generated.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InfiniteData, type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSpaceData, CreateSpaceError, CreateSpaceResponse, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse,
|
|
3
|
+
import type { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSpaceData, CreateSpaceError, CreateSpaceResponse, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserProfileData, LeaveSpaceData, LeaveSpaceError, ListInstallationBranchesData, ListInstallationRepositoriesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RequestAccountPasswordResetData, RequestAccountPasswordResetError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphStateData, UpdateGraphStateError } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -36,7 +36,7 @@ export declare const getServiceHealthOptions: (options?: Options<GetServiceHealt
|
|
|
36
36
|
[dataTagErrorSymbol]: Error;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
export declare const
|
|
39
|
+
export declare const fetchGraphM2mQueryKey: (options: Options<FetchGraphM2mData>) => [Pick<Options<FetchGraphM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
40
40
|
_id: string;
|
|
41
41
|
_infinite?: boolean;
|
|
42
42
|
tags?: ReadonlyArray<string>;
|
|
@@ -44,18 +44,18 @@ export declare const fetchGraphQueryKey: (options: Options<FetchGraphData>) => [
|
|
|
44
44
|
/**
|
|
45
45
|
* Fetch a graph by version ID for M2M
|
|
46
46
|
*/
|
|
47
|
-
export declare const
|
|
47
|
+
export declare const fetchGraphM2mOptions: (options: Options<FetchGraphM2mData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").Graph, Error, import("../types.gen").Graph, [Pick<Options<FetchGraphM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
48
48
|
_id: string;
|
|
49
49
|
_infinite?: boolean;
|
|
50
50
|
tags?: ReadonlyArray<string>;
|
|
51
51
|
}]>, "queryFn"> & {
|
|
52
|
-
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Graph, [Pick<Options<
|
|
52
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Graph, [Pick<Options<FetchGraphM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
53
53
|
_id: string;
|
|
54
54
|
_infinite?: boolean;
|
|
55
55
|
tags?: ReadonlyArray<string>;
|
|
56
56
|
}], never> | undefined;
|
|
57
57
|
} & {
|
|
58
|
-
queryKey: [Pick<Options<
|
|
58
|
+
queryKey: [Pick<Options<FetchGraphM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
59
59
|
_id: string;
|
|
60
60
|
_infinite?: boolean;
|
|
61
61
|
tags?: ReadonlyArray<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { createEnvironment, createProject, createSpace, deleteAccountIdentity,
|
|
4
|
+
import { createEnvironment, createProject, createSpace, deleteAccountIdentity, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceOverview, getUserIdentities, getUserProfile, leaveSpace, listInstallationBranches, listInstallationRepositories, listSpaceMembers, listUserInstallations, listUserSpaces, requestAccountPasswordReset, updateConnectedAppToken, updateGraphState } from '../sdk.gen';
|
|
5
5
|
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
6
|
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
7
|
if (infinite) {
|
|
@@ -44,14 +44,14 @@ export const getServiceHealthOptions = (options) => {
|
|
|
44
44
|
queryKey: getServiceHealthQueryKey(options)
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
export const
|
|
47
|
+
export const fetchGraphM2mQueryKey = (options) => createQueryKey('fetchGraphM2M', options);
|
|
48
48
|
/**
|
|
49
49
|
* Fetch a graph by version ID for M2M
|
|
50
50
|
*/
|
|
51
|
-
export const
|
|
51
|
+
export const fetchGraphM2mOptions = (options) => {
|
|
52
52
|
return queryOptions({
|
|
53
53
|
queryFn: async ({ queryKey, signal }) => {
|
|
54
|
-
const { data } = await
|
|
54
|
+
const { data } = await fetchGraphM2M({
|
|
55
55
|
...options,
|
|
56
56
|
...queryKey[0],
|
|
57
57
|
signal,
|
|
@@ -59,7 +59,7 @@ export const fetchGraphOptions = (options) => {
|
|
|
59
59
|
});
|
|
60
60
|
return data;
|
|
61
61
|
},
|
|
62
|
-
queryKey:
|
|
62
|
+
queryKey: fetchGraphM2mQueryKey(options)
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
/**
|
package/dist/sdk/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses,
|
|
2
|
+
import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -20,7 +20,7 @@ export declare const getServiceHealth: <ThrowOnError extends boolean = false>(op
|
|
|
20
20
|
/**
|
|
21
21
|
* Fetch a graph by version ID for M2M
|
|
22
22
|
*/
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const fetchGraphM2M: <ThrowOnError extends boolean = false>(options: Options<FetchGraphM2mData, ThrowOnError>) => import("./client").RequestResult<FetchGraphM2mResponses, FetchGraphM2mErrors, ThrowOnError, "fields">;
|
|
24
24
|
/**
|
|
25
25
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
26
26
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -364,7 +364,7 @@ export type GetServiceHealthResponses = {
|
|
|
364
364
|
200: HealthResponse;
|
|
365
365
|
};
|
|
366
366
|
export type GetServiceHealthResponse = GetServiceHealthResponses[keyof GetServiceHealthResponses];
|
|
367
|
-
export type
|
|
367
|
+
export type FetchGraphM2mData = {
|
|
368
368
|
body?: never;
|
|
369
369
|
path: {
|
|
370
370
|
versionId: string;
|
|
@@ -372,7 +372,7 @@ export type FetchGraphData = {
|
|
|
372
372
|
query?: never;
|
|
373
373
|
url: '/auth/m2m/graph/{versionId}';
|
|
374
374
|
};
|
|
375
|
-
export type
|
|
375
|
+
export type FetchGraphM2mErrors = {
|
|
376
376
|
/**
|
|
377
377
|
* Unauthorised user.
|
|
378
378
|
*/
|
|
@@ -386,14 +386,14 @@ export type FetchGraphErrors = {
|
|
|
386
386
|
*/
|
|
387
387
|
404: ErrorResponse;
|
|
388
388
|
};
|
|
389
|
-
export type
|
|
390
|
-
export type
|
|
389
|
+
export type FetchGraphM2mError = FetchGraphM2mErrors[keyof FetchGraphM2mErrors];
|
|
390
|
+
export type FetchGraphM2mResponses = {
|
|
391
391
|
/**
|
|
392
392
|
* Graph fetched successfully.
|
|
393
393
|
*/
|
|
394
394
|
200: Graph;
|
|
395
395
|
};
|
|
396
|
-
export type
|
|
396
|
+
export type FetchGraphM2mResponse = FetchGraphM2mResponses[keyof FetchGraphM2mResponses];
|
|
397
397
|
export type RequestAccountPasswordResetData = {
|
|
398
398
|
body?: never;
|
|
399
399
|
path?: never;
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -946,7 +946,7 @@ export declare const zGetServiceHealthData: z.ZodObject<{
|
|
|
946
946
|
export declare const zGetServiceHealthResponse: z.ZodObject<{
|
|
947
947
|
status: z.ZodString;
|
|
948
948
|
}, z.core.$strip>;
|
|
949
|
-
export declare const
|
|
949
|
+
export declare const zFetchGraphM2mData: z.ZodObject<{
|
|
950
950
|
body: z.ZodOptional<z.ZodNever>;
|
|
951
951
|
path: z.ZodObject<{
|
|
952
952
|
versionId: z.ZodUUID;
|
|
@@ -956,7 +956,7 @@ export declare const zFetchGraphData: z.ZodObject<{
|
|
|
956
956
|
/**
|
|
957
957
|
* Graph fetched successfully.
|
|
958
958
|
*/
|
|
959
|
-
export declare const
|
|
959
|
+
export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
960
960
|
versionUUID: z.ZodUUID;
|
|
961
961
|
nodes: z.ZodArray<z.ZodObject<{
|
|
962
962
|
id: z.ZodUUID;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -436,7 +436,7 @@ export const zGetServiceHealthData = z.object({
|
|
|
436
436
|
* Service is healthy!
|
|
437
437
|
*/
|
|
438
438
|
export const zGetServiceHealthResponse = zHealthResponse;
|
|
439
|
-
export const
|
|
439
|
+
export const zFetchGraphM2mData = z.object({
|
|
440
440
|
body: z.optional(z.never()),
|
|
441
441
|
path: z.object({
|
|
442
442
|
versionId: z.uuid()
|
|
@@ -446,7 +446,7 @@ export const zFetchGraphData = z.object({
|
|
|
446
446
|
/**
|
|
447
447
|
* Graph fetched successfully.
|
|
448
448
|
*/
|
|
449
|
-
export const
|
|
449
|
+
export const zFetchGraphM2mResponse = zGraph;
|
|
450
450
|
export const zRequestAccountPasswordResetData = z.object({
|
|
451
451
|
body: z.optional(z.never()),
|
|
452
452
|
path: z.optional(z.never()),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData,
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, GetUserProfileData, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateSpaceData, CreateSpaceResponses, GetSpaceOverviewData, FetchKindeOrganisationBillingAgreementsData, ListSpaceMembersData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses } from "../../sdk/types.gen";
|
|
4
4
|
export declare const useGetServiceHealth: (options?: Omit<GetServiceHealthData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").HealthResponse | undefined, Error>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const useFetchGraphM2M: (options: Omit<FetchGraphM2mData, "url"> & {
|
|
8
8
|
enabled?: boolean;
|
|
9
9
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Graph | undefined, Error>;
|
|
10
10
|
export declare const useRequestAccountPasswordReset: (config?: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth,
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, requestAccountPasswordReset, getUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createSpace, getSpaceOverview, fetchKindeOrganisationBillingAgreements, listSpaceMembers, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -24,7 +24,7 @@ export const useGetServiceHealth = (options) => {
|
|
|
24
24
|
staleTime: 600000
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
export const
|
|
27
|
+
export const useFetchGraphM2M = (options) => {
|
|
28
28
|
const token = useToken();
|
|
29
29
|
let { enabled, ...rest } = options || { enabled: true };
|
|
30
30
|
const opts = { throwOnError: true, url: "/auth/m2m/graph/{versionId}" };
|
|
@@ -32,7 +32,7 @@ export const useFetchGraph = (options) => {
|
|
|
32
32
|
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
33
33
|
if (isPromise(token) && !token)
|
|
34
34
|
return;
|
|
35
|
-
const res = await
|
|
35
|
+
const res = await fetchGraphM2M({ ...opts, ...rest, auth });
|
|
36
36
|
return res.data;
|
|
37
37
|
};
|
|
38
38
|
if (!token)
|