shoal-web-sdk 1.0.17 → 1.0.18
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.js
CHANGED
|
@@ -361,12 +361,6 @@ export const recordOnboardingAnalytics = (options) => {
|
|
|
361
361
|
*/
|
|
362
362
|
export const previewBlueprint = (options) => {
|
|
363
363
|
return (options.client ?? client).get({
|
|
364
|
-
security: [
|
|
365
|
-
{
|
|
366
|
-
scheme: 'bearer',
|
|
367
|
-
type: 'http'
|
|
368
|
-
}
|
|
369
|
-
],
|
|
370
364
|
url: '/blueprints/preview/{blueprint}',
|
|
371
365
|
...options
|
|
372
366
|
});
|
|
@@ -376,12 +370,6 @@ export const previewBlueprint = (options) => {
|
|
|
376
370
|
*/
|
|
377
371
|
export const viewBlueprints = (options) => {
|
|
378
372
|
return (options?.client ?? client).get({
|
|
379
|
-
security: [
|
|
380
|
-
{
|
|
381
|
-
scheme: 'bearer',
|
|
382
|
-
type: 'http'
|
|
383
|
-
}
|
|
384
|
-
],
|
|
385
373
|
url: '/blueprints/view',
|
|
386
374
|
...options
|
|
387
375
|
});
|
|
@@ -391,12 +379,6 @@ export const viewBlueprints = (options) => {
|
|
|
391
379
|
*/
|
|
392
380
|
export const getBlueprint = (options) => {
|
|
393
381
|
return (options.client ?? client).get({
|
|
394
|
-
security: [
|
|
395
|
-
{
|
|
396
|
-
scheme: 'bearer',
|
|
397
|
-
type: 'http'
|
|
398
|
-
}
|
|
399
|
-
],
|
|
400
382
|
url: '/blueprints/{blueprint}',
|
|
401
383
|
...options
|
|
402
384
|
});
|
|
@@ -404,18 +404,12 @@ export const useRecordOnboardingAnalytics = (config) => {
|
|
|
404
404
|
});
|
|
405
405
|
};
|
|
406
406
|
export const usePreviewBlueprint = (options) => {
|
|
407
|
-
const token = useToken();
|
|
408
407
|
let { enabled, ...rest } = options || { enabled: true };
|
|
409
408
|
const opts = { throwOnError: true, url: "/blueprints/preview/{blueprint}" };
|
|
410
409
|
const funcer = async () => {
|
|
411
|
-
const
|
|
412
|
-
if (isPromise(token) && !token)
|
|
413
|
-
return;
|
|
414
|
-
const res = await previewBlueprint({ ...opts, ...rest, auth });
|
|
410
|
+
const res = await previewBlueprint({ ...opts, ...rest, });
|
|
415
411
|
return res.data;
|
|
416
412
|
};
|
|
417
|
-
if (!token)
|
|
418
|
-
enabled = false;
|
|
419
413
|
return useQuery({
|
|
420
414
|
queryKey: ["blueprints", "preview", options?.path?.blueprint, options.query ?? {}],
|
|
421
415
|
queryFn: funcer,
|
|
@@ -425,18 +419,12 @@ export const usePreviewBlueprint = (options) => {
|
|
|
425
419
|
});
|
|
426
420
|
};
|
|
427
421
|
export const useViewBlueprints = (options) => {
|
|
428
|
-
const token = useToken();
|
|
429
422
|
let { enabled, ...rest } = options || { enabled: true };
|
|
430
423
|
const opts = { throwOnError: true, url: "/blueprints/view" };
|
|
431
424
|
const funcer = async () => {
|
|
432
|
-
const
|
|
433
|
-
if (isPromise(token) && !token)
|
|
434
|
-
return;
|
|
435
|
-
const res = await viewBlueprints({ ...opts, ...rest, auth });
|
|
425
|
+
const res = await viewBlueprints({ ...opts, ...rest, });
|
|
436
426
|
return res.data;
|
|
437
427
|
};
|
|
438
|
-
if (!token)
|
|
439
|
-
enabled = false;
|
|
440
428
|
return useQuery({
|
|
441
429
|
queryKey: ["blueprints", "view", options?.query ?? {}],
|
|
442
430
|
queryFn: funcer,
|
|
@@ -446,18 +434,12 @@ export const useViewBlueprints = (options) => {
|
|
|
446
434
|
});
|
|
447
435
|
};
|
|
448
436
|
export const useGetBlueprint = (options) => {
|
|
449
|
-
const token = useToken();
|
|
450
437
|
let { enabled, ...rest } = options || { enabled: true };
|
|
451
438
|
const opts = { throwOnError: true, url: "/blueprints/{blueprint}" };
|
|
452
439
|
const funcer = async () => {
|
|
453
|
-
const
|
|
454
|
-
if (isPromise(token) && !token)
|
|
455
|
-
return;
|
|
456
|
-
const res = await getBlueprint({ ...opts, ...rest, auth });
|
|
440
|
+
const res = await getBlueprint({ ...opts, ...rest, });
|
|
457
441
|
return res.data;
|
|
458
442
|
};
|
|
459
|
-
if (!token)
|
|
460
|
-
enabled = false;
|
|
461
443
|
return useQuery({
|
|
462
444
|
queryKey: ["blueprints", options?.path?.blueprint, options.query ?? {}],
|
|
463
445
|
queryFn: funcer,
|