@carlonicora/nextjs-jsonapi 1.118.0 → 1.119.0
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/{BlockNoteEditor-5FFVS7KW.js → BlockNoteEditor-BPACLNMB.js} +20 -20
- package/dist/{BlockNoteEditor-5FFVS7KW.js.map → BlockNoteEditor-BPACLNMB.js.map} +1 -1
- package/dist/{BlockNoteEditor-6GRZW6BL.mjs → BlockNoteEditor-CEDKBT67.mjs} +5 -5
- package/dist/JsonApiRequest-HE5LTEYK.js +26 -0
- package/dist/JsonApiRequest-HE5LTEYK.js.map +1 -0
- package/dist/{JsonApiRequest-IYL5RZ7I.mjs → JsonApiRequest-SN3DNFDR.mjs} +4 -2
- package/dist/billing/index.js +347 -347
- package/dist/billing/index.mjs +4 -4
- package/dist/{chunk-KXHEOLPZ.mjs → chunk-4SPL6QH3.mjs} +6 -6
- package/dist/{chunk-6KLR3WJQ.js → chunk-55Q43DI5.js} +9 -9
- package/dist/{chunk-6KLR3WJQ.js.map → chunk-55Q43DI5.js.map} +1 -1
- package/dist/{chunk-WEPQD5MP.mjs → chunk-5U7QDGDQ.mjs} +3 -3
- package/dist/{chunk-S2PTWBN6.js → chunk-6P7MEU7Q.js} +64 -50
- package/dist/chunk-6P7MEU7Q.js.map +1 -0
- package/dist/{chunk-M2ODDWY3.js → chunk-DXTOA7OO.js} +701 -701
- package/dist/{chunk-M2ODDWY3.js.map → chunk-DXTOA7OO.js.map} +1 -1
- package/dist/{chunk-M7XAKLSP.mjs → chunk-FWOS6PC5.mjs} +38 -24
- package/dist/chunk-FWOS6PC5.mjs.map +1 -0
- package/dist/{chunk-J5LROFGL.js → chunk-RCMIVTVL.js} +14 -11
- package/dist/chunk-RCMIVTVL.js.map +1 -0
- package/dist/{chunk-KK7PYKVI.mjs → chunk-WC2BTKJP.mjs} +13 -10
- package/dist/{chunk-KK7PYKVI.mjs.map → chunk-WC2BTKJP.mjs.map} +1 -1
- package/dist/client/index.d.mts +15 -1
- package/dist/client/index.d.ts +15 -1
- package/dist/client/index.js +7 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +6 -4
- package/dist/components/index.js +5 -5
- package/dist/components/index.mjs +4 -4
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +7 -2
- package/dist/core/index.d.ts +7 -2
- package/dist/core/index.js +3 -3
- package/dist/core/index.mjs +2 -2
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +4 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/{s3.service-CihgBy97.d.mts → s3.service-CBqyDZyz.d.mts} +7 -0
- package/dist/{s3.service-Cyvfk3qV.d.ts → s3.service-gcEjq8gF.d.ts} +7 -0
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +12 -12
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
- package/src/client/JsonApiClient.ts +23 -8
- package/src/client/__tests__/JsonApiClient.test.ts +31 -0
- package/src/core/abstracts/AbstractService.ts +13 -0
- package/src/core/abstracts/ClientAbstractService.ts +10 -0
- package/src/unified/JsonApiRequest.ts +22 -8
- package/src/unified/__tests__/JsonApiRequest.test.ts +29 -0
- package/dist/JsonApiRequest-OSGJ63XR.js +0 -24
- package/dist/JsonApiRequest-OSGJ63XR.js.map +0 -1
- package/dist/chunk-J5LROFGL.js.map +0 -1
- package/dist/chunk-M7XAKLSP.mjs.map +0 -1
- package/dist/chunk-S2PTWBN6.js.map +0 -1
- /package/dist/{BlockNoteEditor-6GRZW6BL.mjs.map → BlockNoteEditor-CEDKBT67.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-IYL5RZ7I.mjs.map → JsonApiRequest-SN3DNFDR.mjs.map} +0 -0
- /package/dist/{chunk-KXHEOLPZ.mjs.map → chunk-4SPL6QH3.mjs.map} +0 -0
- /package/dist/{chunk-WEPQD5MP.mjs.map → chunk-5U7QDGDQ.mjs.map} +0 -0
|
@@ -14,7 +14,7 @@ var _chunkIBS6NI7Djs = require('./chunk-IBS6NI7D.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkRCMIVTVLjs = require('./chunk-RCMIVTVL.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
|
|
@@ -25,12 +25,12 @@ var RehydrationFactory = class {
|
|
|
25
25
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "RehydrationFactory");
|
|
26
26
|
}
|
|
27
27
|
static rehydrate(classKey, data) {
|
|
28
|
-
const factoryClass =
|
|
28
|
+
const factoryClass = _chunkRCMIVTVLjs.DataClassRegistry.get(classKey);
|
|
29
29
|
const instance = new factoryClass();
|
|
30
30
|
return instance.rehydrate(data);
|
|
31
31
|
}
|
|
32
32
|
static rehydrateList(classKey, data) {
|
|
33
|
-
const factoryClass =
|
|
33
|
+
const factoryClass = _chunkRCMIVTVLjs.DataClassRegistry.get(classKey);
|
|
34
34
|
const response = data.map((item) => {
|
|
35
35
|
const instance = new factoryClass();
|
|
36
36
|
return instance.rehydrate(item);
|
|
@@ -326,7 +326,7 @@ var AbstractService = class {
|
|
|
326
326
|
* Make an API call with automatic environment detection and error handling.
|
|
327
327
|
*/
|
|
328
328
|
static async callApi(params) {
|
|
329
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
329
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-HE5LTEYK.js")));
|
|
330
330
|
let apiResponse;
|
|
331
331
|
let language = "en";
|
|
332
332
|
if (typeof window === "undefined") {
|
|
@@ -341,7 +341,8 @@ var AbstractService = class {
|
|
|
341
341
|
classKey: params.type,
|
|
342
342
|
endpoint: params.endpoint,
|
|
343
343
|
companyId: params.companyId,
|
|
344
|
-
language
|
|
344
|
+
language,
|
|
345
|
+
baseUrl: params.baseUrl
|
|
345
346
|
});
|
|
346
347
|
break;
|
|
347
348
|
case "POST" /* POST */:
|
|
@@ -354,7 +355,8 @@ var AbstractService = class {
|
|
|
354
355
|
language,
|
|
355
356
|
responseType: params.responseType,
|
|
356
357
|
files: params.files,
|
|
357
|
-
token: params.token
|
|
358
|
+
token: params.token,
|
|
359
|
+
baseUrl: params.baseUrl
|
|
358
360
|
});
|
|
359
361
|
break;
|
|
360
362
|
case "PUT" /* PUT */:
|
|
@@ -365,7 +367,8 @@ var AbstractService = class {
|
|
|
365
367
|
body: params.input,
|
|
366
368
|
language,
|
|
367
369
|
responseType: params.responseType,
|
|
368
|
-
files: params.files
|
|
370
|
+
files: params.files,
|
|
371
|
+
baseUrl: params.baseUrl
|
|
369
372
|
});
|
|
370
373
|
break;
|
|
371
374
|
case "PATCH" /* PATCH */:
|
|
@@ -377,7 +380,8 @@ var AbstractService = class {
|
|
|
377
380
|
overridesJsonApiCreation: params.overridesJsonApiCreation,
|
|
378
381
|
language,
|
|
379
382
|
responseType: params.responseType,
|
|
380
|
-
files: params.files
|
|
383
|
+
files: params.files,
|
|
384
|
+
baseUrl: params.baseUrl
|
|
381
385
|
});
|
|
382
386
|
break;
|
|
383
387
|
case "DELETE" /* DELETE */:
|
|
@@ -386,7 +390,8 @@ var AbstractService = class {
|
|
|
386
390
|
endpoint: params.endpoint,
|
|
387
391
|
companyId: params.companyId,
|
|
388
392
|
language,
|
|
389
|
-
responseType: params.responseType
|
|
393
|
+
responseType: params.responseType,
|
|
394
|
+
baseUrl: params.baseUrl
|
|
390
395
|
});
|
|
391
396
|
break;
|
|
392
397
|
default:
|
|
@@ -416,7 +421,7 @@ var AbstractService = class {
|
|
|
416
421
|
* Make an API call and return both data and meta from the response.
|
|
417
422
|
*/
|
|
418
423
|
static async callApiWithMeta(params) {
|
|
419
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
424
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-HE5LTEYK.js")));
|
|
420
425
|
let apiResponse;
|
|
421
426
|
let language = "en";
|
|
422
427
|
if (typeof window === "undefined") {
|
|
@@ -501,7 +506,7 @@ var AbstractService = class {
|
|
|
501
506
|
* Get raw JSON:API response data without deserialization.
|
|
502
507
|
*/
|
|
503
508
|
static async getRawData(params) {
|
|
504
|
-
const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
509
|
+
const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-HE5LTEYK.js")));
|
|
505
510
|
let language = "en";
|
|
506
511
|
if (typeof window === "undefined") {
|
|
507
512
|
const { getLocale } = await Promise.resolve().then(() => _interopRequireWildcard(require("next-intl/server")));
|
|
@@ -513,6 +518,7 @@ var AbstractService = class {
|
|
|
513
518
|
classKey: params.type,
|
|
514
519
|
endpoint: params.endpoint,
|
|
515
520
|
companyId: params.companyId,
|
|
521
|
+
baseUrl: params.baseUrl,
|
|
516
522
|
language
|
|
517
523
|
});
|
|
518
524
|
if (!apiResponse.ok) {
|
|
@@ -535,7 +541,7 @@ var _clientConfig = null;
|
|
|
535
541
|
function configureClientJsonApi(config) {
|
|
536
542
|
_clientConfig = config;
|
|
537
543
|
if (config.bootstrapper) {
|
|
538
|
-
|
|
544
|
+
_chunkRCMIVTVLjs.setBootstrapper.call(void 0, config.bootstrapper);
|
|
539
545
|
config.bootstrapper();
|
|
540
546
|
}
|
|
541
547
|
}
|
|
@@ -576,9 +582,10 @@ function runClientBootstrapper() {
|
|
|
576
582
|
}
|
|
577
583
|
}
|
|
578
584
|
_chunk7QVYU63Ejs.__name.call(void 0, runClientBootstrapper, "runClientBootstrapper");
|
|
579
|
-
function buildClientUrl(endpoint) {
|
|
580
|
-
|
|
581
|
-
|
|
585
|
+
function buildClientUrl(endpoint, baseUrl) {
|
|
586
|
+
if (endpoint.startsWith("http")) return endpoint;
|
|
587
|
+
const apiUrl = _nullishCoalesce(baseUrl, () => ( getClientApiUrl()));
|
|
588
|
+
return `${apiUrl}${endpoint}`;
|
|
582
589
|
}
|
|
583
590
|
_chunk7QVYU63Ejs.__name.call(void 0, buildClientUrl, "buildClientUrl");
|
|
584
591
|
async function ClientJsonApiGet(params) {
|
|
@@ -586,13 +593,13 @@ async function ClientJsonApiGet(params) {
|
|
|
586
593
|
const token = await _chunkLXKSUWAVjs.getClientToken.call(void 0, );
|
|
587
594
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
588
595
|
method: "GET",
|
|
589
|
-
url: buildClientUrl(params.endpoint),
|
|
596
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
590
597
|
token,
|
|
591
598
|
companyId: params.companyId,
|
|
592
599
|
language: params.language,
|
|
593
600
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _26 => _26.additionalHeaders])
|
|
594
601
|
});
|
|
595
|
-
return
|
|
602
|
+
return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
|
|
596
603
|
classKey: params.classKey,
|
|
597
604
|
apiResponse,
|
|
598
605
|
companyId: params.companyId,
|
|
@@ -601,7 +608,8 @@ async function ClientJsonApiGet(params) {
|
|
|
601
608
|
classKey: params.classKey,
|
|
602
609
|
endpoint,
|
|
603
610
|
companyId: params.companyId,
|
|
604
|
-
language: params.language
|
|
611
|
+
language: params.language,
|
|
612
|
+
baseUrl: params.baseUrl
|
|
605
613
|
}), "paginationHandler")
|
|
606
614
|
});
|
|
607
615
|
}
|
|
@@ -613,11 +621,11 @@ async function ClientJsonApiPost(params) {
|
|
|
613
621
|
if (!body) {
|
|
614
622
|
body = {};
|
|
615
623
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
616
|
-
body =
|
|
624
|
+
body = _chunkRCMIVTVLjs.JsonApiDataFactory.create(params.classKey, body);
|
|
617
625
|
}
|
|
618
626
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
619
627
|
method: "POST",
|
|
620
|
-
url: buildClientUrl(params.endpoint),
|
|
628
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
621
629
|
token,
|
|
622
630
|
body,
|
|
623
631
|
files: params.files,
|
|
@@ -625,7 +633,7 @@ async function ClientJsonApiPost(params) {
|
|
|
625
633
|
language: params.language,
|
|
626
634
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _27 => _27.additionalHeaders])
|
|
627
635
|
});
|
|
628
|
-
return
|
|
636
|
+
return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
|
|
629
637
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
630
638
|
apiResponse,
|
|
631
639
|
companyId: params.companyId,
|
|
@@ -640,11 +648,11 @@ async function ClientJsonApiPut(params) {
|
|
|
640
648
|
if (!body) {
|
|
641
649
|
body = {};
|
|
642
650
|
} else {
|
|
643
|
-
body =
|
|
651
|
+
body = _chunkRCMIVTVLjs.JsonApiDataFactory.create(params.classKey, body);
|
|
644
652
|
}
|
|
645
653
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
646
654
|
method: "PUT",
|
|
647
|
-
url: buildClientUrl(params.endpoint),
|
|
655
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
648
656
|
token,
|
|
649
657
|
body,
|
|
650
658
|
files: params.files,
|
|
@@ -652,7 +660,7 @@ async function ClientJsonApiPut(params) {
|
|
|
652
660
|
language: params.language,
|
|
653
661
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _28 => _28.additionalHeaders])
|
|
654
662
|
});
|
|
655
|
-
return
|
|
663
|
+
return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
|
|
656
664
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
657
665
|
apiResponse,
|
|
658
666
|
companyId: params.companyId,
|
|
@@ -667,11 +675,11 @@ async function ClientJsonApiPatch(params) {
|
|
|
667
675
|
if (!body) {
|
|
668
676
|
body = {};
|
|
669
677
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
670
|
-
body =
|
|
678
|
+
body = _chunkRCMIVTVLjs.JsonApiDataFactory.create(params.classKey, body);
|
|
671
679
|
}
|
|
672
680
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
673
681
|
method: "PATCH",
|
|
674
|
-
url: buildClientUrl(params.endpoint),
|
|
682
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
675
683
|
token,
|
|
676
684
|
body,
|
|
677
685
|
files: params.files,
|
|
@@ -679,7 +687,7 @@ async function ClientJsonApiPatch(params) {
|
|
|
679
687
|
language: params.language,
|
|
680
688
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _29 => _29.additionalHeaders])
|
|
681
689
|
});
|
|
682
|
-
return
|
|
690
|
+
return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
|
|
683
691
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
684
692
|
apiResponse,
|
|
685
693
|
companyId: params.companyId,
|
|
@@ -692,13 +700,13 @@ async function ClientJsonApiDelete(params) {
|
|
|
692
700
|
const token = await _chunkLXKSUWAVjs.getClientToken.call(void 0, );
|
|
693
701
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
694
702
|
method: "DELETE",
|
|
695
|
-
url: buildClientUrl(params.endpoint),
|
|
703
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
696
704
|
token,
|
|
697
705
|
companyId: params.companyId,
|
|
698
706
|
language: params.language,
|
|
699
707
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _30 => _30.additionalHeaders])
|
|
700
708
|
});
|
|
701
|
-
return
|
|
709
|
+
return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
|
|
702
710
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
703
711
|
apiResponse,
|
|
704
712
|
companyId: params.companyId,
|
|
@@ -790,7 +798,8 @@ var ClientAbstractService = class {
|
|
|
790
798
|
classKey: params.type,
|
|
791
799
|
endpoint: params.endpoint,
|
|
792
800
|
companyId: params.companyId,
|
|
793
|
-
language
|
|
801
|
+
language,
|
|
802
|
+
baseUrl: params.baseUrl
|
|
794
803
|
});
|
|
795
804
|
break;
|
|
796
805
|
case "POST" /* POST */:
|
|
@@ -802,7 +811,8 @@ var ClientAbstractService = class {
|
|
|
802
811
|
overridesJsonApiCreation: params.overridesJsonApiCreation,
|
|
803
812
|
language,
|
|
804
813
|
responseType: params.responseType,
|
|
805
|
-
files: params.files
|
|
814
|
+
files: params.files,
|
|
815
|
+
baseUrl: params.baseUrl
|
|
806
816
|
});
|
|
807
817
|
break;
|
|
808
818
|
case "PUT" /* PUT */:
|
|
@@ -813,7 +823,8 @@ var ClientAbstractService = class {
|
|
|
813
823
|
body: params.input,
|
|
814
824
|
language,
|
|
815
825
|
responseType: params.responseType,
|
|
816
|
-
files: params.files
|
|
826
|
+
files: params.files,
|
|
827
|
+
baseUrl: params.baseUrl
|
|
817
828
|
});
|
|
818
829
|
break;
|
|
819
830
|
case "PATCH" /* PATCH */:
|
|
@@ -825,7 +836,8 @@ var ClientAbstractService = class {
|
|
|
825
836
|
overridesJsonApiCreation: params.overridesJsonApiCreation,
|
|
826
837
|
language,
|
|
827
838
|
responseType: params.responseType,
|
|
828
|
-
files: params.files
|
|
839
|
+
files: params.files,
|
|
840
|
+
baseUrl: params.baseUrl
|
|
829
841
|
});
|
|
830
842
|
break;
|
|
831
843
|
case "DELETE" /* DELETE */:
|
|
@@ -834,7 +846,8 @@ var ClientAbstractService = class {
|
|
|
834
846
|
endpoint: params.endpoint,
|
|
835
847
|
companyId: params.companyId,
|
|
836
848
|
language,
|
|
837
|
-
responseType: params.responseType
|
|
849
|
+
responseType: params.responseType,
|
|
850
|
+
baseUrl: params.baseUrl
|
|
838
851
|
});
|
|
839
852
|
break;
|
|
840
853
|
default:
|
|
@@ -903,7 +916,7 @@ var ModuleRegistrar = (_class2 = class {
|
|
|
903
916
|
}).map((key) => modulesClass[key]);
|
|
904
917
|
data.forEach((item) => {
|
|
905
918
|
if (item && item.model) {
|
|
906
|
-
|
|
919
|
+
_chunkRCMIVTVLjs.DataClassRegistry.registerObjectClass(item, item.model);
|
|
907
920
|
}
|
|
908
921
|
});
|
|
909
922
|
this._isBootstrapped = true;
|
|
@@ -913,7 +926,7 @@ var ModuleRegistrar = (_class2 = class {
|
|
|
913
926
|
*/
|
|
914
927
|
static reset() {
|
|
915
928
|
this._isBootstrapped = false;
|
|
916
|
-
|
|
929
|
+
_chunkRCMIVTVLjs.DataClassRegistry.clear();
|
|
917
930
|
}
|
|
918
931
|
}, _class2.__initStatic2(), _class2);
|
|
919
932
|
|
|
@@ -936,20 +949,20 @@ var ModuleRegistryClass = class {
|
|
|
936
949
|
get(name) {
|
|
937
950
|
let module = this._modules.get(name);
|
|
938
951
|
if (!module) {
|
|
939
|
-
const didBootstrap =
|
|
952
|
+
const didBootstrap = _chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
|
|
940
953
|
if (didBootstrap) {
|
|
941
954
|
module = this._modules.get(name);
|
|
942
955
|
}
|
|
943
956
|
}
|
|
944
957
|
if (!module) {
|
|
945
|
-
const hint =
|
|
958
|
+
const hint = _chunkRCMIVTVLjs.hasBootstrapper.call(void 0, ) ? "Bootstrap was called but module still not found. Check module registration." : "No bootstrapper registered. Ensure configureJsonApi({ bootstrapper }) is called before accessing modules.";
|
|
946
959
|
throw new Error(`Module "${String(name)}" not registered. ${hint}`);
|
|
947
960
|
}
|
|
948
961
|
return module;
|
|
949
962
|
}
|
|
950
963
|
findByName(moduleName) {
|
|
951
964
|
if (this._modules.size === 0) {
|
|
952
|
-
|
|
965
|
+
_chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
|
|
953
966
|
}
|
|
954
967
|
for (const module of this._modules.values()) {
|
|
955
968
|
if (module.name === moduleName) {
|
|
@@ -960,7 +973,7 @@ var ModuleRegistryClass = class {
|
|
|
960
973
|
}
|
|
961
974
|
getAllPageUrls() {
|
|
962
975
|
if (this._modules.size === 0) {
|
|
963
|
-
|
|
976
|
+
_chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
|
|
964
977
|
}
|
|
965
978
|
const seen = /* @__PURE__ */ new Set();
|
|
966
979
|
const result = [];
|
|
@@ -977,7 +990,7 @@ var ModuleRegistryClass = class {
|
|
|
977
990
|
findByModelName(modelName) {
|
|
978
991
|
let module = this._modules.get(modelName);
|
|
979
992
|
if (!module) {
|
|
980
|
-
const didBootstrap =
|
|
993
|
+
const didBootstrap = _chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
|
|
981
994
|
if (didBootstrap) {
|
|
982
995
|
module = this._modules.get(modelName);
|
|
983
996
|
}
|
|
@@ -999,7 +1012,7 @@ var ModuleRegistryClass = class {
|
|
|
999
1012
|
}
|
|
1000
1013
|
getAll() {
|
|
1001
1014
|
if (this._modules.size === 0) {
|
|
1002
|
-
|
|
1015
|
+
_chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
|
|
1003
1016
|
}
|
|
1004
1017
|
return Array.from(this._modules.values());
|
|
1005
1018
|
}
|
|
@@ -2853,7 +2866,7 @@ var AuthService = class extends AbstractService {
|
|
|
2853
2866
|
}
|
|
2854
2867
|
static async login(params) {
|
|
2855
2868
|
const language = params.language || "en-US";
|
|
2856
|
-
const apiResponse = await
|
|
2869
|
+
const apiResponse = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
|
|
2857
2870
|
classKey: Modules.Auth,
|
|
2858
2871
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "login" }).generate(),
|
|
2859
2872
|
body: { email: params.email, password: params.password },
|
|
@@ -2887,7 +2900,7 @@ var AuthService = class extends AbstractService {
|
|
|
2887
2900
|
}
|
|
2888
2901
|
static async logout(params) {
|
|
2889
2902
|
const language = _optionalChain([params, 'optionalAccess', _70 => _70.language]) || "en-US";
|
|
2890
|
-
await
|
|
2903
|
+
await _chunkRCMIVTVLjs.JsonApiDelete.call(void 0, {
|
|
2891
2904
|
classKey: Modules.Auth,
|
|
2892
2905
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth }).generate(),
|
|
2893
2906
|
language
|
|
@@ -2899,7 +2912,7 @@ var AuthService = class extends AbstractService {
|
|
|
2899
2912
|
}
|
|
2900
2913
|
static async initialiseForgotPassword(params) {
|
|
2901
2914
|
const language = params.language || "en-US";
|
|
2902
|
-
const response = await
|
|
2915
|
+
const response = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
|
|
2903
2916
|
classKey: Modules.Auth,
|
|
2904
2917
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "forgot" }).generate(),
|
|
2905
2918
|
body: { email: params.email },
|
|
@@ -2928,7 +2941,7 @@ var AuthService = class extends AbstractService {
|
|
|
2928
2941
|
}
|
|
2929
2942
|
static async validateCode(params) {
|
|
2930
2943
|
const language = params.language || "en-US";
|
|
2931
|
-
const apiResponse = await
|
|
2944
|
+
const apiResponse = await _chunkRCMIVTVLjs.JsonApiGet.call(void 0, {
|
|
2932
2945
|
classKey: Modules.Auth,
|
|
2933
2946
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "validate", childEndpoint: params.code }).generate(),
|
|
2934
2947
|
language
|
|
@@ -2972,7 +2985,7 @@ var AuthService = class extends AbstractService {
|
|
|
2972
2985
|
}
|
|
2973
2986
|
static async completeOAuthRegistration(params) {
|
|
2974
2987
|
const endpoint = new EndpointCreator({ endpoint: Modules.Auth, id: "oauth", childEndpoint: "complete" });
|
|
2975
|
-
const response = await
|
|
2988
|
+
const response = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
|
|
2976
2989
|
classKey: Modules.Auth,
|
|
2977
2990
|
endpoint: endpoint.generate(),
|
|
2978
2991
|
body: params,
|
|
@@ -4735,7 +4748,7 @@ var StripePromotionCodeService = class {
|
|
|
4735
4748
|
* @returns Validation result with discount details if valid
|
|
4736
4749
|
*/
|
|
4737
4750
|
static async validatePromotionCode(params) {
|
|
4738
|
-
const response = await
|
|
4751
|
+
const response = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
|
|
4739
4752
|
classKey: Modules.StripePromotionCode,
|
|
4740
4753
|
endpoint: `${STRIPE_PROMOTION_CODE_ENDPOINT}/validate`,
|
|
4741
4754
|
body: {
|
|
@@ -7830,5 +7843,6 @@ var AuditLogModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
|
|
|
7830
7843
|
|
|
7831
7844
|
|
|
7832
7845
|
|
|
7833
|
-
|
|
7834
|
-
|
|
7846
|
+
|
|
7847
|
+
exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; exports.setGlobalErrorHandler = setGlobalErrorHandler; exports.getGlobalErrorHandler = getGlobalErrorHandler; exports.AbstractService = AbstractService; exports.configureClientJsonApi = configureClientJsonApi; exports.getClientApiUrl = getClientApiUrl; exports.getClientAppUrl = getClientAppUrl; exports.getClientTrackablePages = getClientTrackablePages; exports.buildClientUrl = buildClientUrl; exports.ClientJsonApiGet = ClientJsonApiGet; exports.ClientJsonApiPost = ClientJsonApiPost; exports.ClientJsonApiPut = ClientJsonApiPut; exports.ClientJsonApiPatch = ClientJsonApiPatch; exports.ClientJsonApiDelete = ClientJsonApiDelete; exports.ClientHttpMethod = ClientHttpMethod; exports.setClientGlobalErrorHandler = setClientGlobalErrorHandler; exports.getClientGlobalErrorHandler = getClientGlobalErrorHandler; exports.ClientAbstractService = ClientAbstractService; exports.ModuleRegistrar = ModuleRegistrar; exports.ModuleRegistry = ModuleRegistry; exports.Modules = Modules; exports.EndpointCreator = EndpointCreator; exports.createJsonApiInclusion = createJsonApiInclusion; exports.rehydrate = rehydrate; exports.rehydrateList = rehydrateList; exports.cn = cn; exports.composeRefs = composeRefs; exports.useComposedRefs = useComposedRefs; exports.useIsMobile = useIsMobile; exports.formatLocalDate = formatLocalDate; exports.formatDate = formatDate; exports.exists = exists; exports.TableOptions = TableOptions; exports.getTableOptions = getTableOptions; exports.getTableComponents = getTableComponents; exports.userObjectSchema = userObjectSchema; exports.entityObjectSchema = entityObjectSchema; exports.getInitials = getInitials; exports.BlockNoteDiffUtil = BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = BlockNoteWordDiffRendererUtil; exports.getIconByModule = getIconByModule; exports.getIcon = getIcon; exports.getIconByModuleName = getIconByModuleName; exports.getLucideIcon = getLucideIcon; exports.getLucideIconByModule = getLucideIconByModule; exports.getLucideIconByModuleName = getLucideIconByModuleName; exports.showToast = showToast; exports.showError = showError; exports.dismissToast = dismissToast; exports.showCustomToast = showCustomToast; exports.Action = Action; exports.checkPermissions = checkPermissions; exports.checkPermissionsFromServer = checkPermissionsFromServer; exports.getValueFromPath = getValueFromPath; exports.TotpAuthenticator = TotpAuthenticator; exports.TotpAuthenticatorModule = TotpAuthenticatorModule; exports.TotpSetup = TotpSetup; exports.TotpSetupModule = TotpSetupModule; exports.TotpVerify = TotpVerify; exports.TotpVerifyModule = TotpVerifyModule; exports.TotpVerifyLogin = TotpVerifyLogin; exports.TotpVerifyLoginModule = TotpVerifyLoginModule; exports.Passkey = Passkey; exports.PasskeyModule = PasskeyModule; exports.PasskeyRegistrationOptions = PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = PasskeyRegistrationVerifyModule; exports.PasskeyRename = PasskeyRename; exports.PasskeyRenameModule = PasskeyRenameModule; exports.PasskeyVerifyLogin = PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = PasskeyVerifyLoginModule; exports.PasskeyAuthenticationOptions = PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = PasskeyAuthenticationOptionsModule; exports.TwoFactorEnable = TwoFactorEnable; exports.TwoFactorEnableModule = TwoFactorEnableModule; exports.TwoFactorChallenge = TwoFactorChallenge; exports.TwoFactorChallengeModule = TwoFactorChallengeModule; exports.BackupCodeVerify = BackupCodeVerify; exports.BackupCodeVerifyModule = BackupCodeVerifyModule; exports.configureAuth = configureAuth; exports.getTokenHandler = getTokenHandler; exports.Auth = Auth; exports.AuthService = AuthService; exports.TwoFactorStatus = TwoFactorStatus; exports.TwoFactorService = TwoFactorService; exports.AuthComponent = AuthComponent; exports.AuthModule = AuthModule; exports.TwoFactorStatusModule = TwoFactorStatusModule; exports.BillingService = BillingService; exports.Billing = Billing; exports.BillingModule = BillingModule; exports.PaymentMethod = PaymentMethod; exports.StripeCustomer = StripeCustomer; exports.StripeCustomerService = StripeCustomerService; exports.StripeCustomerModule = StripeCustomerModule; exports.StripePaymentMethodModule = StripePaymentMethodModule; exports.StripeInvoice = StripeInvoice; exports.InvoiceStatus = InvoiceStatus; exports.StripeInvoiceService = StripeInvoiceService; exports.StripeInvoiceModule = StripeInvoiceModule; exports.StripePrice = StripePrice; exports.StripePriceService = StripePriceService; exports.StripePriceModule = StripePriceModule; exports.StripeProduct = StripeProduct; exports.StripeProductService = StripeProductService; exports.StripeProductModule = StripeProductModule; exports.StripeSubscription = StripeSubscription; exports.SubscriptionStatus = SubscriptionStatus; exports.StripeSubscriptionService = StripeSubscriptionService; exports.StripeSubscriptionModule = StripeSubscriptionModule; exports.StripeUsage = StripeUsage; exports.StripeUsageService = StripeUsageService; exports.StripeUsageModule = StripeUsageModule; exports.StripePromotionCodeService = StripePromotionCodeService; exports.StripePromotionCode = StripePromotionCode; exports.StripePromotionCodeModule = StripePromotionCodeModule; exports.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; exports.CompanyModule = CompanyModule; exports.Content = Content; exports.ContentFields = ContentFields; exports.ContentService = ContentService; exports.ContentModule = ContentModule; exports.HowTo = HowTo; exports.HowToModule = HowToModule; exports.HowToFields = HowToFields; exports.HowToService = HowToService; exports.Assistant = Assistant; exports.AssistantModule = AssistantModule; exports.AssistantMessage = AssistantMessage; exports.AssistantService = AssistantService; exports.AssistantMessageModule = AssistantMessageModule; exports.AssistantMessageService = AssistantMessageService; exports.Chunk = Chunk; exports.ChunkModule = ChunkModule; exports.Feature = Feature; exports.FeatureService = FeatureService; exports.FeatureModule = FeatureModule; exports.Module = Module; exports.ModuleModule = ModuleModule; exports.Notification = Notification; exports.NotificationFields = NotificationFields; exports.NotificationService = NotificationService; exports.NotificationModule = NotificationModule; exports.Push = Push; exports.PushService = PushService; exports.PushModule = PushModule; exports.Role = Role; exports.RoleFields = RoleFields; exports.RoleService = RoleService; exports.RoleModule = RoleModule; exports.S3 = S3; exports.S3Module = S3Module; exports.S3Service = S3Service; exports.User = User; exports.UserFields = UserFields; exports.UserService = UserService; exports.AuthorModule = AuthorModule; exports.UserModule = UserModule; exports.OAuthClient = OAuthClient; exports.OAuthModule = OAuthModule; exports.OAuthService = OAuthService; exports.OAUTH_SCOPE_DISPLAY = OAUTH_SCOPE_DISPLAY; exports.AVAILABLE_OAUTH_SCOPES = AVAILABLE_OAUTH_SCOPES; exports.DEFAULT_GRANT_TYPES = DEFAULT_GRANT_TYPES; exports.Waitlist = Waitlist; exports.WaitlistService = WaitlistService; exports.WaitlistStats = WaitlistStats; exports.WaitlistModule = WaitlistModule; exports.WaitlistStatsModule = WaitlistStatsModule; exports.PermissionMapping = PermissionMapping; exports.ModulePaths = ModulePaths; exports.RbacMatrixModel = RbacMatrixModel; exports.PermissionMappingModule = PermissionMappingModule; exports.ModulePathsModule = ModulePathsModule; exports.RbacMatrixModule = RbacMatrixModule; exports.ReferralStats = ReferralStats; exports.ReferralService = ReferralService; exports.ReferralModule = ReferralModule; exports.ReferralStatsModule = ReferralStatsModule; exports.AuditLog = AuditLog; exports.AuditLogService = AuditLogService; exports.AuditLogModule = AuditLogModule;
|
|
7848
|
+
//# sourceMappingURL=chunk-6P7MEU7Q.js.map
|