shoal-web-sdk 0.0.45 → 0.0.46
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/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { AddEdgesData, AddEdgesErrors, AddEdgesResponses, AddNodesData, AddNodesErrors, AddNodesResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses,
|
|
2
|
+
import type { AddEdgesData, AddEdgesErrors, AddEdgesResponses, AddNodesData, AddNodesErrors, AddNodesResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, RemoveEdgesData, RemoveEdgesErrors, RemoveEdgesResponses, RemoveNodesData, RemoveNodesErrors, RemoveNodesResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses } 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
|
|
@@ -40,7 +40,7 @@ export declare const getSpaceOverview: <ThrowOnError extends boolean = false>(op
|
|
|
40
40
|
/**
|
|
41
41
|
* The space billing agreements.
|
|
42
42
|
*/
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const fetchKindeOrganisationBillingAgreements: <ThrowOnError extends boolean = false>(options: Options<FetchKindeOrganisationBillingAgreementsData, ThrowOnError>) => import("./client").RequestResult<FetchKindeOrganisationBillingAgreementsResponses, FetchKindeOrganisationBillingAgreementsErrors, ThrowOnError, "fields">;
|
|
44
44
|
/**
|
|
45
45
|
* Create a project inside a space.
|
|
46
46
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -97,7 +97,7 @@ export const getSpaceOverview = (options) => {
|
|
|
97
97
|
/**
|
|
98
98
|
* The space billing agreements.
|
|
99
99
|
*/
|
|
100
|
-
export const
|
|
100
|
+
export const fetchKindeOrganisationBillingAgreements = (options) => {
|
|
101
101
|
return (options.client ?? client).get({
|
|
102
102
|
security: [
|
|
103
103
|
{
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export type AccountProfile = {
|
|
|
78
78
|
lastSignedIn: string;
|
|
79
79
|
createdOn: string;
|
|
80
80
|
};
|
|
81
|
-
export type
|
|
81
|
+
export type KindeOrganisationBillingAgreement = {
|
|
82
82
|
/**
|
|
83
83
|
* The friendly id of an agreement
|
|
84
84
|
*/
|
|
@@ -411,7 +411,7 @@ export type GetSpaceOverviewResponses = {
|
|
|
411
411
|
200: SpaceOverview;
|
|
412
412
|
};
|
|
413
413
|
export type GetSpaceOverviewResponse = GetSpaceOverviewResponses[keyof GetSpaceOverviewResponses];
|
|
414
|
-
export type
|
|
414
|
+
export type FetchKindeOrganisationBillingAgreementsData = {
|
|
415
415
|
body?: never;
|
|
416
416
|
path: {
|
|
417
417
|
/**
|
|
@@ -422,7 +422,7 @@ export type GetSpaceBillingAgreementsData = {
|
|
|
422
422
|
query?: never;
|
|
423
423
|
url: '/auth/{spaceHandle}/billing-agreements';
|
|
424
424
|
};
|
|
425
|
-
export type
|
|
425
|
+
export type FetchKindeOrganisationBillingAgreementsErrors = {
|
|
426
426
|
/**
|
|
427
427
|
* Unauthorised user.
|
|
428
428
|
*/
|
|
@@ -440,14 +440,14 @@ export type GetSpaceBillingAgreementsErrors = {
|
|
|
440
440
|
*/
|
|
441
441
|
500: ErrorResponse;
|
|
442
442
|
};
|
|
443
|
-
export type
|
|
444
|
-
export type
|
|
443
|
+
export type FetchKindeOrganisationBillingAgreementsError = FetchKindeOrganisationBillingAgreementsErrors[keyof FetchKindeOrganisationBillingAgreementsErrors];
|
|
444
|
+
export type FetchKindeOrganisationBillingAgreementsResponses = {
|
|
445
445
|
/**
|
|
446
446
|
* A list of the space's billing agreements.
|
|
447
447
|
*/
|
|
448
|
-
200: Array<
|
|
448
|
+
200: Array<KindeOrganisationBillingAgreement>;
|
|
449
449
|
};
|
|
450
|
-
export type
|
|
450
|
+
export type FetchKindeOrganisationBillingAgreementsResponse = FetchKindeOrganisationBillingAgreementsResponses[keyof FetchKindeOrganisationBillingAgreementsResponses];
|
|
451
451
|
export type CreateProjectData = {
|
|
452
452
|
body: CreateProject;
|
|
453
453
|
path: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, GetUserProfileData, GetUserIdentitiesData, CreateSpaceData, CreateSpaceResponses, GetSpaceOverviewData,
|
|
3
|
+
import { GetServiceHealthData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, GetUserProfileData, GetUserIdentitiesData, CreateSpaceData, CreateSpaceResponses, GetSpaceOverviewData, FetchKindeOrganisationBillingAgreementsData, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, RemoveNodesData, RemoveNodesResponses, AddNodesData, AddNodesResponses, RemoveEdgesData, RemoveEdgesResponses, AddEdgesData, AddEdgesResponses } 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>;
|
|
@@ -23,9 +23,9 @@ export declare const useCreateSpace: (config?: {
|
|
|
23
23
|
export declare const useGetSpaceOverview: (options: Omit<GetSpaceOverviewData, "url"> & {
|
|
24
24
|
enabled?: boolean;
|
|
25
25
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").SpaceOverview | undefined, Error>;
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const useFetchKindeOrganisationBillingAgreements: (options: Omit<FetchKindeOrganisationBillingAgreementsData, "url"> & {
|
|
27
27
|
enabled?: boolean;
|
|
28
|
-
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").
|
|
28
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").KindeOrganisationBillingAgreement[] | undefined, Error>;
|
|
29
29
|
export declare const useCreateProject: (config?: {
|
|
30
30
|
onSuccess?: (data: GetSuccessResponse<CreateProjectResponses>) => void;
|
|
31
31
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -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, requestAccountPasswordReset, getUserProfile, getUserIdentities, createSpace, getSpaceOverview,
|
|
5
|
+
import { getServiceHealth, requestAccountPasswordReset, getUserProfile, getUserIdentities, createSpace, getSpaceOverview, fetchKindeOrganisationBillingAgreements, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, removeNodes, addNodes, removeEdges, addEdges } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -125,7 +125,7 @@ export const useGetSpaceOverview = (options) => {
|
|
|
125
125
|
staleTime: 600000
|
|
126
126
|
});
|
|
127
127
|
};
|
|
128
|
-
export const
|
|
128
|
+
export const useFetchKindeOrganisationBillingAgreements = (options) => {
|
|
129
129
|
const token = useToken();
|
|
130
130
|
let { enabled, ...rest } = options || { enabled: true };
|
|
131
131
|
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing-agreements" };
|
|
@@ -133,7 +133,7 @@ export const useGetSpaceBillingAgreements = (options) => {
|
|
|
133
133
|
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
134
134
|
if (isPromise(token) && !token)
|
|
135
135
|
return;
|
|
136
|
-
const res = await
|
|
136
|
+
const res = await fetchKindeOrganisationBillingAgreements({ ...opts, ...rest, auth });
|
|
137
137
|
return res.data;
|
|
138
138
|
};
|
|
139
139
|
if (!token)
|