@carlonicora/nextjs-jsonapi 3.0.1 → 3.1.1
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/AbstractApiData-DtitRWPz.d.ts +47 -0
- package/dist/AbstractApiData-XLhBP5Tl.d.mts +47 -0
- package/dist/{BlockNoteEditor-G4XNDV2O.mjs → BlockNoteEditor-FIMPVA7K.mjs} +5 -5
- package/dist/{BlockNoteEditor-3IZ7PMFM.js → BlockNoteEditor-GJPTMKS7.js} +20 -20
- package/dist/{BlockNoteEditor-3IZ7PMFM.js.map → BlockNoteEditor-GJPTMKS7.js.map} +1 -1
- package/dist/{JsonApiRequest-3UWVIIFL.mjs → JsonApiRequest-2OQCZAK6.mjs} +2 -2
- package/dist/JsonApiRequest-6TYNBVUL.js +26 -0
- package/dist/{JsonApiRequest-QRU3IPIU.js.map → JsonApiRequest-6TYNBVUL.js.map} +1 -1
- package/dist/ai-connection.module-28f-hux0.d.mts +255 -0
- package/dist/ai-connection.module-Bqwh_DnR.d.ts +255 -0
- package/dist/billing/index.js +399 -399
- package/dist/billing/index.mjs +4 -4
- package/dist/{chunk-TWXKAY34.mjs → chunk-CGJW7ZZM.mjs} +310 -5
- package/dist/chunk-CGJW7ZZM.mjs.map +1 -0
- package/dist/{chunk-E5YA5Z5X.mjs → chunk-CMGXH5SA.mjs} +2 -1
- package/dist/chunk-CMGXH5SA.mjs.map +1 -0
- package/dist/{chunk-5GVBUTS4.js → chunk-E5FWGOP5.js} +1454 -794
- package/dist/chunk-E5FWGOP5.js.map +1 -0
- package/dist/{chunk-JKGEJGSD.js → chunk-H7DOSB7W.js} +9 -9
- package/dist/{chunk-JKGEJGSD.js.map → chunk-H7DOSB7W.js.map} +1 -1
- package/dist/{chunk-FPO4DLZN.js → chunk-PFAZPP54.js} +2 -1
- package/dist/chunk-PFAZPP54.js.map +1 -0
- package/dist/{chunk-WCX4CLRJ.mjs → chunk-VUMM7V5G.mjs} +1740 -1080
- package/dist/chunk-VUMM7V5G.mjs.map +1 -0
- package/dist/{chunk-53B6NPGA.js → chunk-YUXCJ35V.js} +377 -72
- package/dist/chunk-YUXCJ35V.js.map +1 -0
- package/dist/{chunk-PHEFWL6L.mjs → chunk-ZMYZFQN3.mjs} +3 -3
- package/dist/client/index.js +5 -5
- package/dist/client/index.mjs +4 -4
- package/dist/components/index.d.mts +122 -4
- package/dist/components/index.d.ts +122 -4
- package/dist/components/index.js +31 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +30 -4
- package/dist/{config-BIjrg5wd.d.ts → config-B6UB7j69.d.ts} +1 -46
- package/dist/{config-BRUjtCd1.d.mts → config-n-ZpPmOL.d.mts} +1 -46
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +5 -4
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.js +11 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +10 -2
- package/dist/features/help/index.js +38 -38
- package/dist/features/help/index.mjs +4 -4
- package/dist/features/tokenusage/index.d.mts +2 -2
- package/dist/features/tokenusage/index.d.ts +2 -2
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/server/index.js +12 -12
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/tables/ContentListTable.tsx +1 -1
- package/src/core/index.ts +5 -0
- package/src/core/registry/ModuleRegistry.ts +2 -0
- package/src/core/utils/translateResponse.ts +6 -0
- package/src/features/administration/components/AdminIndexContainer.tsx +9 -2
- package/src/features/ai-connection/ai-connection.module.ts +14 -0
- package/src/features/ai-connection/components/containers/AiConnectionsContainer.tsx +109 -0
- package/src/features/ai-connection/components/forms/AiConnectionDeleter.tsx +58 -0
- package/src/features/ai-connection/components/forms/AiConnectionEditor.tsx +329 -0
- package/src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx +223 -0
- package/src/features/ai-connection/contexts/AiConnectionsContext.tsx +111 -0
- package/src/features/ai-connection/data/__tests__/ai-connection.test.ts +202 -0
- package/src/features/ai-connection/data/ai-connection.fields.ts +6 -0
- package/src/features/ai-connection/data/ai-connection.interface.ts +87 -0
- package/src/features/ai-connection/data/ai-connection.service.ts +90 -0
- package/src/features/ai-connection/data/ai-connection.ts +244 -0
- package/src/features/ai-connection/data/index.ts +4 -0
- package/src/features/ai-connection/i18n-keys.ts +66 -0
- package/src/features/ai-connection/index.ts +11 -0
- package/src/features/index.ts +1 -0
- package/dist/AuthComponent-Cik96ElA.d.mts +0 -56
- package/dist/AuthComponent-DTTKu3VK.d.ts +0 -56
- package/dist/JsonApiRequest-QRU3IPIU.js +0 -26
- package/dist/chunk-53B6NPGA.js.map +0 -1
- package/dist/chunk-5GVBUTS4.js.map +0 -1
- package/dist/chunk-E5YA5Z5X.mjs.map +0 -1
- package/dist/chunk-FPO4DLZN.js.map +0 -1
- package/dist/chunk-TWXKAY34.mjs.map +0 -1
- package/dist/chunk-WCX4CLRJ.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-G4XNDV2O.mjs.map → BlockNoteEditor-FIMPVA7K.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-3UWVIIFL.mjs.map → JsonApiRequest-2OQCZAK6.mjs.map} +0 -0
- /package/dist/{chunk-PHEFWL6L.mjs.map → chunk-ZMYZFQN3.mjs.map} +0 -0
|
@@ -14,7 +14,7 @@ var _chunkIBS6NI7Djs = require('./chunk-IBS6NI7D.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkPFAZPP54js = require('./chunk-PFAZPP54.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 = _chunkPFAZPP54js.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 = _chunkPFAZPP54js.DataClassRegistry.get(classKey);
|
|
34
34
|
const response = data.map((item) => {
|
|
35
35
|
const instance = new factoryClass();
|
|
36
36
|
return instance.rehydrate(item);
|
|
@@ -335,7 +335,7 @@ var AbstractService = class {
|
|
|
335
335
|
* Make an API call with automatic environment detection and error handling.
|
|
336
336
|
*/
|
|
337
337
|
static async callApi(params) {
|
|
338
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
338
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-6TYNBVUL.js")));
|
|
339
339
|
let apiResponse;
|
|
340
340
|
let language = "en";
|
|
341
341
|
if (typeof window === "undefined") {
|
|
@@ -436,7 +436,7 @@ var AbstractService = class {
|
|
|
436
436
|
* Make an API call and return both data and meta from the response.
|
|
437
437
|
*/
|
|
438
438
|
static async callApiWithMeta(params) {
|
|
439
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
439
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-6TYNBVUL.js")));
|
|
440
440
|
let apiResponse;
|
|
441
441
|
let language = "en";
|
|
442
442
|
if (typeof window === "undefined") {
|
|
@@ -522,7 +522,7 @@ var AbstractService = class {
|
|
|
522
522
|
* Get raw JSON:API response data without deserialization.
|
|
523
523
|
*/
|
|
524
524
|
static async getRawData(params) {
|
|
525
|
-
const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
525
|
+
const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-6TYNBVUL.js")));
|
|
526
526
|
let language = "en";
|
|
527
527
|
if (typeof window === "undefined") {
|
|
528
528
|
const { getLocale } = await Promise.resolve().then(() => _interopRequireWildcard(require("next-intl/server")));
|
|
@@ -558,7 +558,7 @@ var _clientConfig = null;
|
|
|
558
558
|
function configureClientJsonApi(config) {
|
|
559
559
|
_clientConfig = config;
|
|
560
560
|
if (config.bootstrapper) {
|
|
561
|
-
|
|
561
|
+
_chunkPFAZPP54js.setBootstrapper.call(void 0, config.bootstrapper);
|
|
562
562
|
config.bootstrapper();
|
|
563
563
|
}
|
|
564
564
|
}
|
|
@@ -616,7 +616,7 @@ async function ClientJsonApiGet(params) {
|
|
|
616
616
|
language: params.language,
|
|
617
617
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _26 => _26.additionalHeaders])
|
|
618
618
|
});
|
|
619
|
-
return
|
|
619
|
+
return _chunkPFAZPP54js.translateResponse.call(void 0, {
|
|
620
620
|
classKey: params.classKey,
|
|
621
621
|
apiResponse,
|
|
622
622
|
companyId: params.companyId,
|
|
@@ -638,7 +638,7 @@ async function ClientJsonApiPost(params) {
|
|
|
638
638
|
if (!body) {
|
|
639
639
|
body = {};
|
|
640
640
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
641
|
-
body =
|
|
641
|
+
body = _chunkPFAZPP54js.JsonApiDataFactory.create(params.classKey, body);
|
|
642
642
|
}
|
|
643
643
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
644
644
|
method: "POST",
|
|
@@ -650,7 +650,7 @@ async function ClientJsonApiPost(params) {
|
|
|
650
650
|
language: params.language,
|
|
651
651
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _27 => _27.additionalHeaders])
|
|
652
652
|
});
|
|
653
|
-
return
|
|
653
|
+
return _chunkPFAZPP54js.translateResponse.call(void 0, {
|
|
654
654
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
655
655
|
apiResponse,
|
|
656
656
|
companyId: params.companyId,
|
|
@@ -665,7 +665,7 @@ async function ClientJsonApiPut(params) {
|
|
|
665
665
|
if (!body) {
|
|
666
666
|
body = {};
|
|
667
667
|
} else {
|
|
668
|
-
body =
|
|
668
|
+
body = _chunkPFAZPP54js.JsonApiDataFactory.create(params.classKey, body);
|
|
669
669
|
}
|
|
670
670
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
671
671
|
method: "PUT",
|
|
@@ -677,7 +677,7 @@ async function ClientJsonApiPut(params) {
|
|
|
677
677
|
language: params.language,
|
|
678
678
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _28 => _28.additionalHeaders])
|
|
679
679
|
});
|
|
680
|
-
return
|
|
680
|
+
return _chunkPFAZPP54js.translateResponse.call(void 0, {
|
|
681
681
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
682
682
|
apiResponse,
|
|
683
683
|
companyId: params.companyId,
|
|
@@ -692,7 +692,7 @@ async function ClientJsonApiPatch(params) {
|
|
|
692
692
|
if (!body) {
|
|
693
693
|
body = {};
|
|
694
694
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
695
|
-
body =
|
|
695
|
+
body = _chunkPFAZPP54js.JsonApiDataFactory.create(params.classKey, body);
|
|
696
696
|
}
|
|
697
697
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
698
698
|
method: "PATCH",
|
|
@@ -704,7 +704,7 @@ async function ClientJsonApiPatch(params) {
|
|
|
704
704
|
language: params.language,
|
|
705
705
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _29 => _29.additionalHeaders])
|
|
706
706
|
});
|
|
707
|
-
return
|
|
707
|
+
return _chunkPFAZPP54js.translateResponse.call(void 0, {
|
|
708
708
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
709
709
|
apiResponse,
|
|
710
710
|
companyId: params.companyId,
|
|
@@ -723,7 +723,7 @@ async function ClientJsonApiDelete(params) {
|
|
|
723
723
|
language: params.language,
|
|
724
724
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _30 => _30.additionalHeaders])
|
|
725
725
|
});
|
|
726
|
-
return
|
|
726
|
+
return _chunkPFAZPP54js.translateResponse.call(void 0, {
|
|
727
727
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
728
728
|
apiResponse,
|
|
729
729
|
companyId: params.companyId,
|
|
@@ -935,7 +935,7 @@ var ModuleRegistrar = (_class2 = class {
|
|
|
935
935
|
}).map((key) => modulesClass[key]);
|
|
936
936
|
data.forEach((item) => {
|
|
937
937
|
if (item && item.model) {
|
|
938
|
-
|
|
938
|
+
_chunkPFAZPP54js.DataClassRegistry.registerObjectClass(item, item.model);
|
|
939
939
|
}
|
|
940
940
|
});
|
|
941
941
|
this._isBootstrapped = true;
|
|
@@ -945,7 +945,7 @@ var ModuleRegistrar = (_class2 = class {
|
|
|
945
945
|
*/
|
|
946
946
|
static reset() {
|
|
947
947
|
this._isBootstrapped = false;
|
|
948
|
-
|
|
948
|
+
_chunkPFAZPP54js.DataClassRegistry.clear();
|
|
949
949
|
}
|
|
950
950
|
}, _class2.__initStatic2(), _class2);
|
|
951
951
|
|
|
@@ -968,20 +968,20 @@ var ModuleRegistryClass = class {
|
|
|
968
968
|
get(name) {
|
|
969
969
|
let module = this._modules.get(name);
|
|
970
970
|
if (!module) {
|
|
971
|
-
const didBootstrap =
|
|
971
|
+
const didBootstrap = _chunkPFAZPP54js.tryBootstrap.call(void 0, );
|
|
972
972
|
if (didBootstrap) {
|
|
973
973
|
module = this._modules.get(name);
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
if (!module) {
|
|
977
|
-
const hint =
|
|
977
|
+
const hint = _chunkPFAZPP54js.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.";
|
|
978
978
|
throw new Error(`Module "${String(name)}" not registered. ${hint}`);
|
|
979
979
|
}
|
|
980
980
|
return module;
|
|
981
981
|
}
|
|
982
982
|
findByName(moduleName) {
|
|
983
983
|
if (this._modules.size === 0) {
|
|
984
|
-
|
|
984
|
+
_chunkPFAZPP54js.tryBootstrap.call(void 0, );
|
|
985
985
|
}
|
|
986
986
|
for (const module of this._modules.values()) {
|
|
987
987
|
if (module.name === moduleName) {
|
|
@@ -992,7 +992,7 @@ var ModuleRegistryClass = class {
|
|
|
992
992
|
}
|
|
993
993
|
getAllPageUrls() {
|
|
994
994
|
if (this._modules.size === 0) {
|
|
995
|
-
|
|
995
|
+
_chunkPFAZPP54js.tryBootstrap.call(void 0, );
|
|
996
996
|
}
|
|
997
997
|
const seen = /* @__PURE__ */ new Set();
|
|
998
998
|
const result = [];
|
|
@@ -1009,7 +1009,7 @@ var ModuleRegistryClass = class {
|
|
|
1009
1009
|
findByModelName(modelName) {
|
|
1010
1010
|
let module = this._modules.get(modelName);
|
|
1011
1011
|
if (!module) {
|
|
1012
|
-
const didBootstrap =
|
|
1012
|
+
const didBootstrap = _chunkPFAZPP54js.tryBootstrap.call(void 0, );
|
|
1013
1013
|
if (didBootstrap) {
|
|
1014
1014
|
module = this._modules.get(modelName);
|
|
1015
1015
|
}
|
|
@@ -1031,7 +1031,7 @@ var ModuleRegistryClass = class {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
getAll() {
|
|
1033
1033
|
if (this._modules.size === 0) {
|
|
1034
|
-
|
|
1034
|
+
_chunkPFAZPP54js.tryBootstrap.call(void 0, );
|
|
1035
1035
|
}
|
|
1036
1036
|
return Array.from(this._modules.values());
|
|
1037
1037
|
}
|
|
@@ -2984,7 +2984,7 @@ var AuthService = class extends AbstractService {
|
|
|
2984
2984
|
}
|
|
2985
2985
|
static async login(params) {
|
|
2986
2986
|
const language = params.language || "en-US";
|
|
2987
|
-
const apiResponse = await
|
|
2987
|
+
const apiResponse = await _chunkPFAZPP54js.JsonApiPost.call(void 0, {
|
|
2988
2988
|
classKey: Modules.Auth,
|
|
2989
2989
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "login" }).generate(),
|
|
2990
2990
|
body: { email: params.email, password: params.password },
|
|
@@ -3018,7 +3018,7 @@ var AuthService = class extends AbstractService {
|
|
|
3018
3018
|
}
|
|
3019
3019
|
static async logout(params) {
|
|
3020
3020
|
const language = _optionalChain([params, 'optionalAccess', _71 => _71.language]) || "en-US";
|
|
3021
|
-
await
|
|
3021
|
+
await _chunkPFAZPP54js.JsonApiDelete.call(void 0, {
|
|
3022
3022
|
classKey: Modules.Auth,
|
|
3023
3023
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth }).generate(),
|
|
3024
3024
|
language
|
|
@@ -3030,7 +3030,7 @@ var AuthService = class extends AbstractService {
|
|
|
3030
3030
|
}
|
|
3031
3031
|
static async initialiseForgotPassword(params) {
|
|
3032
3032
|
const language = params.language || "en-US";
|
|
3033
|
-
const response = await
|
|
3033
|
+
const response = await _chunkPFAZPP54js.JsonApiPost.call(void 0, {
|
|
3034
3034
|
classKey: Modules.Auth,
|
|
3035
3035
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "forgot" }).generate(),
|
|
3036
3036
|
body: { email: params.email },
|
|
@@ -3059,7 +3059,7 @@ var AuthService = class extends AbstractService {
|
|
|
3059
3059
|
}
|
|
3060
3060
|
static async validateCode(params) {
|
|
3061
3061
|
const language = params.language || "en-US";
|
|
3062
|
-
const apiResponse = await
|
|
3062
|
+
const apiResponse = await _chunkPFAZPP54js.JsonApiGet.call(void 0, {
|
|
3063
3063
|
classKey: Modules.Auth,
|
|
3064
3064
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "validate", childEndpoint: params.code }).generate(),
|
|
3065
3065
|
language
|
|
@@ -3103,7 +3103,7 @@ var AuthService = class extends AbstractService {
|
|
|
3103
3103
|
}
|
|
3104
3104
|
static async completeOAuthRegistration(params) {
|
|
3105
3105
|
const endpoint = new EndpointCreator({ endpoint: Modules.Auth, id: "oauth", childEndpoint: "complete" });
|
|
3106
|
-
const response = await
|
|
3106
|
+
const response = await _chunkPFAZPP54js.JsonApiPost.call(void 0, {
|
|
3107
3107
|
classKey: Modules.Auth,
|
|
3108
3108
|
endpoint: endpoint.generate(),
|
|
3109
3109
|
body: params,
|
|
@@ -4894,7 +4894,7 @@ var StripePromotionCodeService = class {
|
|
|
4894
4894
|
* @returns Validation result with discount details if valid
|
|
4895
4895
|
*/
|
|
4896
4896
|
static async validatePromotionCode(params) {
|
|
4897
|
-
const response = await
|
|
4897
|
+
const response = await _chunkPFAZPP54js.JsonApiPost.call(void 0, {
|
|
4898
4898
|
classKey: Modules.StripePromotionCode,
|
|
4899
4899
|
endpoint: `${STRIPE_PROMOTION_CODE_ENDPOINT}/validate`,
|
|
4900
4900
|
body: {
|
|
@@ -4995,6 +4995,307 @@ var StripePromotionCodeModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
4995
4995
|
moduleId: "b8e4f6a2-9d0c-5b3f-c7e8-4g2d9f0a5c6e"
|
|
4996
4996
|
}), "StripePromotionCodeModule");
|
|
4997
4997
|
|
|
4998
|
+
// src/features/ai-connection/data/ai-connection.ts
|
|
4999
|
+
var AiConnection = class extends AbstractApiData {
|
|
5000
|
+
static {
|
|
5001
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "AiConnection");
|
|
5002
|
+
}
|
|
5003
|
+
|
|
5004
|
+
|
|
5005
|
+
|
|
5006
|
+
|
|
5007
|
+
|
|
5008
|
+
|
|
5009
|
+
|
|
5010
|
+
|
|
5011
|
+
|
|
5012
|
+
|
|
5013
|
+
|
|
5014
|
+
|
|
5015
|
+
|
|
5016
|
+
|
|
5017
|
+
|
|
5018
|
+
|
|
5019
|
+
|
|
5020
|
+
|
|
5021
|
+
|
|
5022
|
+
|
|
5023
|
+
|
|
5024
|
+
|
|
5025
|
+
|
|
5026
|
+
|
|
5027
|
+
|
|
5028
|
+
|
|
5029
|
+
get name() {
|
|
5030
|
+
return _nullishCoalesce(this._name, () => ( ""));
|
|
5031
|
+
}
|
|
5032
|
+
get connectionType() {
|
|
5033
|
+
return _nullishCoalesce(this._connectionType, () => ( ""));
|
|
5034
|
+
}
|
|
5035
|
+
get provider() {
|
|
5036
|
+
return _nullishCoalesce(this._provider, () => ( ""));
|
|
5037
|
+
}
|
|
5038
|
+
get position() {
|
|
5039
|
+
return _nullishCoalesce(this._position, () => ( 0));
|
|
5040
|
+
}
|
|
5041
|
+
get enabled() {
|
|
5042
|
+
return _nullishCoalesce(this._enabled, () => ( true));
|
|
5043
|
+
}
|
|
5044
|
+
get model() {
|
|
5045
|
+
return this._model;
|
|
5046
|
+
}
|
|
5047
|
+
get url() {
|
|
5048
|
+
return this._url;
|
|
5049
|
+
}
|
|
5050
|
+
get region() {
|
|
5051
|
+
return this._region;
|
|
5052
|
+
}
|
|
5053
|
+
get instance() {
|
|
5054
|
+
return this._instance;
|
|
5055
|
+
}
|
|
5056
|
+
get apiVersion() {
|
|
5057
|
+
return this._apiVersion;
|
|
5058
|
+
}
|
|
5059
|
+
get allowFallbacks() {
|
|
5060
|
+
return this._allowFallbacks;
|
|
5061
|
+
}
|
|
5062
|
+
get reasoningEffort() {
|
|
5063
|
+
return this._reasoningEffort;
|
|
5064
|
+
}
|
|
5065
|
+
get maxOutputTokens() {
|
|
5066
|
+
return this._maxOutputTokens;
|
|
5067
|
+
}
|
|
5068
|
+
get dimensions() {
|
|
5069
|
+
return this._dimensions;
|
|
5070
|
+
}
|
|
5071
|
+
get inputCostPer1MTokens() {
|
|
5072
|
+
return this._inputCostPer1MTokens;
|
|
5073
|
+
}
|
|
5074
|
+
get outputCostPer1MTokens() {
|
|
5075
|
+
return this._outputCostPer1MTokens;
|
|
5076
|
+
}
|
|
5077
|
+
get cachedInputCostPer1MTokens() {
|
|
5078
|
+
return this._cachedInputCostPer1MTokens;
|
|
5079
|
+
}
|
|
5080
|
+
get costPerMinute() {
|
|
5081
|
+
return this._costPerMinute;
|
|
5082
|
+
}
|
|
5083
|
+
get costPerPage() {
|
|
5084
|
+
return this._costPerPage;
|
|
5085
|
+
}
|
|
5086
|
+
get directUrl() {
|
|
5087
|
+
return this._directUrl;
|
|
5088
|
+
}
|
|
5089
|
+
get language() {
|
|
5090
|
+
return this._language;
|
|
5091
|
+
}
|
|
5092
|
+
get directFormat() {
|
|
5093
|
+
return this._directFormat;
|
|
5094
|
+
}
|
|
5095
|
+
get directProvider() {
|
|
5096
|
+
return this._directProvider;
|
|
5097
|
+
}
|
|
5098
|
+
get hasApiKey() {
|
|
5099
|
+
return _nullishCoalesce(this._hasApiKey, () => ( false));
|
|
5100
|
+
}
|
|
5101
|
+
get hasGoogleCredentials() {
|
|
5102
|
+
return _nullishCoalesce(this._hasGoogleCredentials, () => ( false));
|
|
5103
|
+
}
|
|
5104
|
+
get companyId() {
|
|
5105
|
+
return this._companyId;
|
|
5106
|
+
}
|
|
5107
|
+
rehydrate(data) {
|
|
5108
|
+
super.rehydrate(data);
|
|
5109
|
+
const attributes = _nullishCoalesce(data.jsonApi.attributes, () => ( {}));
|
|
5110
|
+
this._name = attributes.name;
|
|
5111
|
+
this._connectionType = attributes.connectionType;
|
|
5112
|
+
this._provider = attributes.provider;
|
|
5113
|
+
this._position = attributes.position;
|
|
5114
|
+
this._enabled = attributes.enabled;
|
|
5115
|
+
this._model = attributes.model;
|
|
5116
|
+
this._url = attributes.url;
|
|
5117
|
+
this._region = attributes.region;
|
|
5118
|
+
this._instance = attributes.instance;
|
|
5119
|
+
this._apiVersion = attributes.apiVersion;
|
|
5120
|
+
this._allowFallbacks = attributes.allowFallbacks;
|
|
5121
|
+
this._reasoningEffort = attributes.reasoningEffort;
|
|
5122
|
+
this._maxOutputTokens = attributes.maxOutputTokens;
|
|
5123
|
+
this._dimensions = attributes.dimensions;
|
|
5124
|
+
this._inputCostPer1MTokens = attributes.inputCostPer1MTokens;
|
|
5125
|
+
this._outputCostPer1MTokens = attributes.outputCostPer1MTokens;
|
|
5126
|
+
this._cachedInputCostPer1MTokens = attributes.cachedInputCostPer1MTokens;
|
|
5127
|
+
this._costPerMinute = attributes.costPerMinute;
|
|
5128
|
+
this._costPerPage = attributes.costPerPage;
|
|
5129
|
+
this._directUrl = attributes.directUrl;
|
|
5130
|
+
this._language = attributes.language;
|
|
5131
|
+
this._directFormat = attributes.directFormat;
|
|
5132
|
+
this._directProvider = attributes.directProvider;
|
|
5133
|
+
this._hasApiKey = attributes.hasApiKey;
|
|
5134
|
+
this._hasGoogleCredentials = attributes.hasGoogleCredentials;
|
|
5135
|
+
this._companyId = attributes.companyId;
|
|
5136
|
+
return this;
|
|
5137
|
+
}
|
|
5138
|
+
createJsonApi(data) {
|
|
5139
|
+
const response = {
|
|
5140
|
+
data: {
|
|
5141
|
+
type: Modules.AiConnection.name,
|
|
5142
|
+
id: data.id,
|
|
5143
|
+
attributes: {},
|
|
5144
|
+
relationships: {}
|
|
5145
|
+
},
|
|
5146
|
+
included: []
|
|
5147
|
+
};
|
|
5148
|
+
const setIfDefined = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (key) => {
|
|
5149
|
+
if (data[key] !== void 0) response.data.attributes[key] = data[key];
|
|
5150
|
+
}, "setIfDefined");
|
|
5151
|
+
[
|
|
5152
|
+
"name",
|
|
5153
|
+
"connectionType",
|
|
5154
|
+
"provider",
|
|
5155
|
+
"position",
|
|
5156
|
+
"enabled",
|
|
5157
|
+
"model",
|
|
5158
|
+
"url",
|
|
5159
|
+
"region",
|
|
5160
|
+
"instance",
|
|
5161
|
+
"apiVersion",
|
|
5162
|
+
"allowFallbacks",
|
|
5163
|
+
"reasoningEffort",
|
|
5164
|
+
"maxOutputTokens",
|
|
5165
|
+
"dimensions",
|
|
5166
|
+
"inputCostPer1MTokens",
|
|
5167
|
+
"outputCostPer1MTokens",
|
|
5168
|
+
"cachedInputCostPer1MTokens",
|
|
5169
|
+
"costPerMinute",
|
|
5170
|
+
"costPerPage",
|
|
5171
|
+
"directUrl",
|
|
5172
|
+
"language",
|
|
5173
|
+
"directFormat",
|
|
5174
|
+
"directProvider"
|
|
5175
|
+
].forEach(setIfDefined);
|
|
5176
|
+
if (data.apiKey) response.data.attributes.apiKey = data.apiKey;
|
|
5177
|
+
if (data.googleCredentialsBase64) {
|
|
5178
|
+
response.data.attributes.googleCredentialsBase64 = data.googleCredentialsBase64;
|
|
5179
|
+
}
|
|
5180
|
+
if (data.companyId) {
|
|
5181
|
+
response.data.relationships.company = {
|
|
5182
|
+
data: { type: Modules.Company.name, id: data.companyId }
|
|
5183
|
+
};
|
|
5184
|
+
}
|
|
5185
|
+
return response;
|
|
5186
|
+
}
|
|
5187
|
+
/**
|
|
5188
|
+
* Body for POST /ai-connections/reorder. A dedicated model method so the
|
|
5189
|
+
* service never constructs a JSON:API payload itself — the sanctioned pairing
|
|
5190
|
+
* for `overridesJsonApiCreation`.
|
|
5191
|
+
*/
|
|
5192
|
+
createReorderJsonApi(params) {
|
|
5193
|
+
return {
|
|
5194
|
+
data: {
|
|
5195
|
+
type: Modules.AiConnection.name,
|
|
5196
|
+
ids: params.ids
|
|
5197
|
+
}
|
|
5198
|
+
};
|
|
5199
|
+
}
|
|
5200
|
+
};
|
|
5201
|
+
|
|
5202
|
+
// src/features/ai-connection/data/ai-connection.fields.ts
|
|
5203
|
+
var AiConnectionFields = /* @__PURE__ */ ((AiConnectionFields2) => {
|
|
5204
|
+
AiConnectionFields2["name"] = "name";
|
|
5205
|
+
AiConnectionFields2["provider"] = "provider";
|
|
5206
|
+
AiConnectionFields2["model"] = "model";
|
|
5207
|
+
AiConnectionFields2["enabled"] = "enabled";
|
|
5208
|
+
return AiConnectionFields2;
|
|
5209
|
+
})(AiConnectionFields || {});
|
|
5210
|
+
|
|
5211
|
+
// src/features/ai-connection/data/ai-connection.service.ts
|
|
5212
|
+
var AiConnectionService = class extends AbstractService {
|
|
5213
|
+
static {
|
|
5214
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "AiConnectionService");
|
|
5215
|
+
}
|
|
5216
|
+
/**
|
|
5217
|
+
* Full list plus the editor meta in one round-trip: the list endpoint carries
|
|
5218
|
+
* the provider registry and the `.env` defaults as top-level JSON:API `meta`.
|
|
5219
|
+
*/
|
|
5220
|
+
static async listConnections() {
|
|
5221
|
+
const endpoint = new EndpointCreator({ endpoint: Modules.AiConnection });
|
|
5222
|
+
endpoint.addAdditionalParam("fetchAll", "true");
|
|
5223
|
+
const { data, meta } = await this.callApiWithMeta({
|
|
5224
|
+
type: Modules.AiConnection,
|
|
5225
|
+
method: "GET" /* GET */,
|
|
5226
|
+
endpoint: endpoint.generate()
|
|
5227
|
+
});
|
|
5228
|
+
return {
|
|
5229
|
+
connections: _nullishCoalesce(data, () => ( [])),
|
|
5230
|
+
providerRegistry: _nullishCoalesce(_optionalChain([meta, 'optionalAccess', _108 => _108.providerRegistry]), () => ( {})),
|
|
5231
|
+
envDefaults: _nullishCoalesce(_optionalChain([meta, 'optionalAccess', _109 => _109.envDefaults]), () => ( {}))
|
|
5232
|
+
};
|
|
5233
|
+
}
|
|
5234
|
+
/**
|
|
5235
|
+
* Create a connection. The optional `companyId` fixes its scope forever.
|
|
5236
|
+
*/
|
|
5237
|
+
static async create(params) {
|
|
5238
|
+
return this.callApi({
|
|
5239
|
+
type: Modules.AiConnection,
|
|
5240
|
+
method: "POST" /* POST */,
|
|
5241
|
+
endpoint: new EndpointCreator({ endpoint: Modules.AiConnection }).generate(),
|
|
5242
|
+
input: params
|
|
5243
|
+
});
|
|
5244
|
+
}
|
|
5245
|
+
/**
|
|
5246
|
+
* Update a connection. Blank/omitted secrets keep the stored values.
|
|
5247
|
+
*/
|
|
5248
|
+
static async update(params) {
|
|
5249
|
+
return this.callApi({
|
|
5250
|
+
type: Modules.AiConnection,
|
|
5251
|
+
method: "PUT" /* PUT */,
|
|
5252
|
+
endpoint: new EndpointCreator({ endpoint: Modules.AiConnection, id: params.id }).generate(),
|
|
5253
|
+
input: params
|
|
5254
|
+
});
|
|
5255
|
+
}
|
|
5256
|
+
/**
|
|
5257
|
+
* Delete a connection.
|
|
5258
|
+
*/
|
|
5259
|
+
static async delete(params) {
|
|
5260
|
+
await this.callApi({
|
|
5261
|
+
type: Modules.AiConnection,
|
|
5262
|
+
method: "DELETE" /* DELETE */,
|
|
5263
|
+
endpoint: new EndpointCreator({ endpoint: Modules.AiConnection, id: params.id }).generate()
|
|
5264
|
+
});
|
|
5265
|
+
}
|
|
5266
|
+
/**
|
|
5267
|
+
* Reorder one chain: the ordered id list is renumbered 0..n-1 server-side.
|
|
5268
|
+
* Dedicated model method + `overridesJsonApiCreation` — the sanctioned
|
|
5269
|
+
* pairing, never a hand-built payload here.
|
|
5270
|
+
*/
|
|
5271
|
+
static async reorder(params) {
|
|
5272
|
+
const model = new AiConnection();
|
|
5273
|
+
await this.callApi({
|
|
5274
|
+
type: Modules.AiConnection,
|
|
5275
|
+
method: "POST" /* POST */,
|
|
5276
|
+
endpoint: new EndpointCreator({
|
|
5277
|
+
endpoint: Modules.AiConnection,
|
|
5278
|
+
childEndpoint: "reorder"
|
|
5279
|
+
}).generate(),
|
|
5280
|
+
input: model.createReorderJsonApi({ ids: params.ids }),
|
|
5281
|
+
overridesJsonApiCreation: true
|
|
5282
|
+
// OK — the model method provides the structure
|
|
5283
|
+
});
|
|
5284
|
+
}
|
|
5285
|
+
};
|
|
5286
|
+
|
|
5287
|
+
// src/features/ai-connection/ai-connection.module.ts
|
|
5288
|
+
var AiConnectionModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
5289
|
+
name: "ai-connections",
|
|
5290
|
+
// The administration route this entity is served at. `name` above stays the
|
|
5291
|
+
// API endpoint; this drives generateUrl / rewriteUrl / EditorSheet
|
|
5292
|
+
// navigation, so it must match the real Next.js route or RoundPageContainer
|
|
5293
|
+
// rewrites the URL to a 404 on the first tab change.
|
|
5294
|
+
pageUrl: "/administration/ai-connections",
|
|
5295
|
+
model: AiConnection,
|
|
5296
|
+
moduleId: "7d3f2b8a-91c4-4e6d-a5f0-2c9b8e4d1a37"
|
|
5297
|
+
}), "AiConnectionModule");
|
|
5298
|
+
|
|
4998
5299
|
// src/features/company/company.module.ts
|
|
4999
5300
|
var _lucidereact = require('lucide-react');
|
|
5000
5301
|
|
|
@@ -5355,8 +5656,8 @@ var ContentService = class extends AbstractService {
|
|
|
5355
5656
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
5356
5657
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
5357
5658
|
}
|
|
5358
|
-
if (_optionalChain([Modules, 'access',
|
|
5359
|
-
if (_optionalChain([Modules, 'access',
|
|
5659
|
+
if (_optionalChain([Modules, 'access', _110 => _110.Content, 'access', _111 => _111.inclusions, 'optionalAccess', _112 => _112.lists, 'optionalAccess', _113 => _113.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
|
|
5660
|
+
if (_optionalChain([Modules, 'access', _114 => _114.Content, 'access', _115 => _115.inclusions, 'optionalAccess', _116 => _116.lists, 'optionalAccess', _117 => _117.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
|
|
5360
5661
|
return this.callApi({
|
|
5361
5662
|
type: Modules.Content,
|
|
5362
5663
|
method: "GET" /* GET */,
|
|
@@ -5370,8 +5671,8 @@ var ContentService = class extends AbstractService {
|
|
|
5370
5671
|
id: params.id,
|
|
5371
5672
|
childEndpoint: "relevance"
|
|
5372
5673
|
});
|
|
5373
|
-
if (_optionalChain([Modules, 'access',
|
|
5374
|
-
if (_optionalChain([Modules, 'access',
|
|
5674
|
+
if (_optionalChain([Modules, 'access', _118 => _118.Content, 'access', _119 => _119.inclusions, 'optionalAccess', _120 => _120.lists, 'optionalAccess', _121 => _121.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
|
|
5675
|
+
if (_optionalChain([Modules, 'access', _122 => _122.Content, 'access', _123 => _123.inclusions, 'optionalAccess', _124 => _124.lists, 'optionalAccess', _125 => _125.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
|
|
5375
5676
|
return this.callApi({
|
|
5376
5677
|
type: Modules.Content,
|
|
5377
5678
|
method: "GET" /* GET */,
|
|
@@ -5387,8 +5688,8 @@ var ContentService = class extends AbstractService {
|
|
|
5387
5688
|
});
|
|
5388
5689
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
5389
5690
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
5390
|
-
if (_optionalChain([Modules, 'access',
|
|
5391
|
-
if (_optionalChain([Modules, 'access',
|
|
5691
|
+
if (_optionalChain([Modules, 'access', _126 => _126.Content, 'access', _127 => _127.inclusions, 'optionalAccess', _128 => _128.lists, 'optionalAccess', _129 => _129.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
|
|
5692
|
+
if (_optionalChain([Modules, 'access', _130 => _130.Content, 'access', _131 => _131.inclusions, 'optionalAccess', _132 => _132.lists, 'optionalAccess', _133 => _133.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
|
|
5392
5693
|
return this.callApi({
|
|
5393
5694
|
type: Modules.Content,
|
|
5394
5695
|
method: "GET" /* GET */,
|
|
@@ -5581,8 +5882,8 @@ var HowToService = class extends AbstractService {
|
|
|
5581
5882
|
const endpoint = new EndpointCreator({ endpoint: Modules.HowTo });
|
|
5582
5883
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
5583
5884
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
5584
|
-
if (_optionalChain([Modules, 'access',
|
|
5585
|
-
if (_optionalChain([Modules, 'access',
|
|
5885
|
+
if (_optionalChain([Modules, 'access', _134 => _134.HowTo, 'access', _135 => _135.inclusions, 'optionalAccess', _136 => _136.lists, 'optionalAccess', _137 => _137.fields])) endpoint.limitToFields(Modules.HowTo.inclusions.lists.fields);
|
|
5886
|
+
if (_optionalChain([Modules, 'access', _138 => _138.HowTo, 'access', _139 => _139.inclusions, 'optionalAccess', _140 => _140.lists, 'optionalAccess', _141 => _141.types])) endpoint.limitToType(Modules.HowTo.inclusions.lists.types);
|
|
5586
5887
|
return this.callApi({
|
|
5587
5888
|
type: Modules.HowTo,
|
|
5588
5889
|
method: "GET" /* GET */,
|
|
@@ -5701,15 +6002,15 @@ var Assistant = class extends AbstractApiData {
|
|
|
5701
6002
|
}
|
|
5702
6003
|
rehydrate(data) {
|
|
5703
6004
|
super.rehydrate(data);
|
|
5704
|
-
this._title = _optionalChain([data, 'access',
|
|
5705
|
-
this._engine = _optionalChain([data, 'access',
|
|
5706
|
-
const fromMeta = _optionalChain([data, 'access',
|
|
5707
|
-
const fromAttrs = _optionalChain([data, 'access',
|
|
6005
|
+
this._title = _optionalChain([data, 'access', _142 => _142.jsonApi, 'access', _143 => _143.attributes, 'optionalAccess', _144 => _144.title]);
|
|
6006
|
+
this._engine = _optionalChain([data, 'access', _145 => _145.jsonApi, 'access', _146 => _146.attributes, 'optionalAccess', _147 => _147.engine]);
|
|
6007
|
+
const fromMeta = _optionalChain([data, 'access', _148 => _148.jsonApi, 'access', _149 => _149.meta, 'optionalAccess', _150 => _150.messageCount]);
|
|
6008
|
+
const fromAttrs = _optionalChain([data, 'access', _151 => _151.jsonApi, 'access', _152 => _152.attributes, 'optionalAccess', _153 => _153.messageCount]);
|
|
5708
6009
|
this._messageCount = typeof fromMeta === "number" ? fromMeta : typeof fromAttrs === "number" ? fromAttrs : 0;
|
|
5709
|
-
const contentLinkage = _optionalChain([data, 'access',
|
|
6010
|
+
const contentLinkage = _optionalChain([data, 'access', _154 => _154.jsonApi, 'access', _155 => _155.relationships, 'optionalAccess', _156 => _156.content, 'optionalAccess', _157 => _157.data]);
|
|
5710
6011
|
const boundContent = Array.isArray(contentLinkage) ? contentLinkage[0] : contentLinkage;
|
|
5711
|
-
this._boundContentType = _optionalChain([boundContent, 'optionalAccess',
|
|
5712
|
-
this._boundContentId = _optionalChain([boundContent, 'optionalAccess',
|
|
6012
|
+
this._boundContentType = _optionalChain([boundContent, 'optionalAccess', _158 => _158.type]);
|
|
6013
|
+
this._boundContentId = _optionalChain([boundContent, 'optionalAccess', _159 => _159.id]);
|
|
5713
6014
|
return this;
|
|
5714
6015
|
}
|
|
5715
6016
|
createJsonApi(data) {
|
|
@@ -5823,11 +6124,11 @@ var AssistantMessage = (_class19 = class _AssistantMessage extends AbstractApiDa
|
|
|
5823
6124
|
this._inputTokens = attrs.inputTokens;
|
|
5824
6125
|
this._outputTokens = attrs.outputTokens;
|
|
5825
6126
|
this._messageType = attrs.messageType;
|
|
5826
|
-
const actionRelationship = _optionalChain([data, 'access',
|
|
5827
|
-
this._actionId = Array.isArray(actionRelationship) ? _optionalChain([actionRelationship, 'access',
|
|
6127
|
+
const actionRelationship = _optionalChain([data, 'access', _160 => _160.jsonApi, 'access', _161 => _161.relationships, 'optionalAccess', _162 => _162.action, 'optionalAccess', _163 => _163.data]);
|
|
6128
|
+
this._actionId = Array.isArray(actionRelationship) ? _optionalChain([actionRelationship, 'access', _164 => _164[0], 'optionalAccess', _165 => _165.id]) : _optionalChain([actionRelationship, 'optionalAccess', _166 => _166.id]);
|
|
5828
6129
|
const refs = this._readIncludedPolymorphic(data, "references", resolveReferenceableModules());
|
|
5829
6130
|
this._references = Array.isArray(refs) ? refs : refs ? [refs] : [];
|
|
5830
|
-
if (_optionalChain([data, 'access',
|
|
6131
|
+
if (_optionalChain([data, 'access', _167 => _167.jsonApi, 'access', _168 => _168.relationships, 'optionalAccess', _169 => _169.citations, 'optionalAccess', _170 => _170.data])) {
|
|
5831
6132
|
const citations = this._readIncludedWithMeta(
|
|
5832
6133
|
data,
|
|
5833
6134
|
"citations",
|
|
@@ -6067,9 +6368,9 @@ var AssistantMessageService = class extends AbstractService {
|
|
|
6067
6368
|
id: params.assistantId,
|
|
6068
6369
|
childEndpoint: Modules.AssistantMessage
|
|
6069
6370
|
});
|
|
6070
|
-
if (_optionalChain([Modules, 'access',
|
|
6371
|
+
if (_optionalChain([Modules, 'access', _171 => _171.AssistantMessage, 'access', _172 => _172.inclusions, 'optionalAccess', _173 => _173.lists, 'optionalAccess', _174 => _174.fields]))
|
|
6071
6372
|
endpoint.limitToFields(Modules.AssistantMessage.inclusions.lists.fields);
|
|
6072
|
-
if (_optionalChain([Modules, 'access',
|
|
6373
|
+
if (_optionalChain([Modules, 'access', _175 => _175.AssistantMessage, 'access', _176 => _176.inclusions, 'optionalAccess', _177 => _177.lists, 'optionalAccess', _178 => _178.types]))
|
|
6073
6374
|
endpoint.limitToType(Modules.AssistantMessage.inclusions.lists.types);
|
|
6074
6375
|
return this.callApi({
|
|
6075
6376
|
type: Modules.AssistantMessage,
|
|
@@ -6083,9 +6384,9 @@ var AssistantMessageService = class extends AbstractService {
|
|
|
6083
6384
|
endpoint: Modules.AssistantMessage,
|
|
6084
6385
|
id: params.id
|
|
6085
6386
|
});
|
|
6086
|
-
if (_optionalChain([Modules, 'access',
|
|
6387
|
+
if (_optionalChain([Modules, 'access', _179 => _179.AssistantMessage, 'access', _180 => _180.inclusions, 'optionalAccess', _181 => _181.lists, 'optionalAccess', _182 => _182.fields]))
|
|
6087
6388
|
endpoint.limitToFields(Modules.AssistantMessage.inclusions.lists.fields);
|
|
6088
|
-
if (_optionalChain([Modules, 'access',
|
|
6389
|
+
if (_optionalChain([Modules, 'access', _183 => _183.AssistantMessage, 'access', _184 => _184.inclusions, 'optionalAccess', _185 => _185.lists, 'optionalAccess', _186 => _186.types]))
|
|
6089
6390
|
endpoint.limitToType(Modules.AssistantMessage.inclusions.lists.types);
|
|
6090
6391
|
return this.callApi({
|
|
6091
6392
|
type: Modules.AssistantMessage,
|
|
@@ -6400,10 +6701,10 @@ var Notification = class extends AbstractApiData {
|
|
|
6400
6701
|
this._message = data.jsonApi.attributes.message;
|
|
6401
6702
|
this._actionUrl = data.jsonApi.attributes.actionUrl;
|
|
6402
6703
|
const rels = _nullishCoalesce(data.jsonApi.relationships, () => ( {}));
|
|
6403
|
-
const actorType = _optionalChain([rels, 'access',
|
|
6704
|
+
const actorType = _optionalChain([rels, 'access', _187 => _187.actor, 'optionalAccess', _188 => _188.data, 'optionalAccess', _189 => _189.type]);
|
|
6404
6705
|
this._actor = actorType ? this._readIncluded(data, "actor", Modules.findByName(actorType)) : void 0;
|
|
6405
|
-
const subjectName = Object.keys(rels).find((name) => name !== "actor" && _optionalChain([rels, 'access',
|
|
6406
|
-
const subjectType = subjectName ? _optionalChain([rels, 'access',
|
|
6706
|
+
const subjectName = Object.keys(rels).find((name) => name !== "actor" && _optionalChain([rels, 'access', _190 => _190[name], 'optionalAccess', _191 => _191.data, 'optionalAccess', _192 => _192.type]));
|
|
6707
|
+
const subjectType = subjectName ? _optionalChain([rels, 'access', _193 => _193[subjectName], 'optionalAccess', _194 => _194.data, 'optionalAccess', _195 => _195.type]) : void 0;
|
|
6407
6708
|
this._subject = subjectName && subjectType ? this._readIncluded(data, subjectName, Modules.findByName(subjectType)) : void 0;
|
|
6408
6709
|
return this;
|
|
6409
6710
|
}
|
|
@@ -6964,8 +7265,8 @@ var UserService = class extends AbstractService {
|
|
|
6964
7265
|
id: params.id,
|
|
6965
7266
|
childEndpoint: "user-relevance"
|
|
6966
7267
|
});
|
|
6967
|
-
if (_optionalChain([Modules, 'access',
|
|
6968
|
-
if (_optionalChain([Modules, 'access',
|
|
7268
|
+
if (_optionalChain([Modules, 'access', _196 => _196.User, 'access', _197 => _197.inclusions, 'optionalAccess', _198 => _198.lists, 'optionalAccess', _199 => _199.fields])) endpoint.limitToFields(Modules.User.inclusions.lists.fields);
|
|
7269
|
+
if (_optionalChain([Modules, 'access', _200 => _200.User, 'access', _201 => _201.inclusions, 'optionalAccess', _202 => _202.lists, 'optionalAccess', _203 => _203.types])) endpoint.limitToType(Modules.User.inclusions.lists.types);
|
|
6969
7270
|
return this.callApi({
|
|
6970
7271
|
type: Modules.User,
|
|
6971
7272
|
method: "GET" /* GET */,
|
|
@@ -7224,7 +7525,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7224
7525
|
type: Modules.OAuth,
|
|
7225
7526
|
method: "GET" /* GET */,
|
|
7226
7527
|
endpoint: new EndpointCreator({ endpoint: "oauth/clients" }).generate(),
|
|
7227
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
7528
|
+
next: _optionalChain([params, 'optionalAccess', _204 => _204.next])
|
|
7228
7529
|
});
|
|
7229
7530
|
}
|
|
7230
7531
|
/**
|
|
@@ -7250,7 +7551,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7250
7551
|
});
|
|
7251
7552
|
return {
|
|
7252
7553
|
client: result.data,
|
|
7253
|
-
clientSecret: _optionalChain([result, 'access',
|
|
7554
|
+
clientSecret: _optionalChain([result, 'access', _205 => _205.meta, 'optionalAccess', _206 => _206.clientSecret])
|
|
7254
7555
|
};
|
|
7255
7556
|
}
|
|
7256
7557
|
/**
|
|
@@ -7289,7 +7590,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7289
7590
|
}).generate()
|
|
7290
7591
|
});
|
|
7291
7592
|
return {
|
|
7292
|
-
clientSecret: _optionalChain([result, 'access',
|
|
7593
|
+
clientSecret: _optionalChain([result, 'access', _207 => _207.meta, 'optionalAccess', _208 => _208.clientSecret])
|
|
7293
7594
|
};
|
|
7294
7595
|
}
|
|
7295
7596
|
// ==========================================
|
|
@@ -7333,7 +7634,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7333
7634
|
overridesJsonApiCreation: true
|
|
7334
7635
|
});
|
|
7335
7636
|
return {
|
|
7336
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
7637
|
+
redirectUrl: _optionalChain([result, 'access', _209 => _209.meta, 'optionalAccess', _210 => _210.redirectUrl])
|
|
7337
7638
|
};
|
|
7338
7639
|
}
|
|
7339
7640
|
/**
|
|
@@ -7353,7 +7654,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7353
7654
|
overridesJsonApiCreation: true
|
|
7354
7655
|
});
|
|
7355
7656
|
return {
|
|
7356
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
7657
|
+
redirectUrl: _optionalChain([result, 'access', _211 => _211.meta, 'optionalAccess', _212 => _212.redirectUrl])
|
|
7357
7658
|
};
|
|
7358
7659
|
}
|
|
7359
7660
|
};
|
|
@@ -7537,15 +7838,15 @@ var WaitlistService = class extends AbstractService {
|
|
|
7537
7838
|
*/
|
|
7538
7839
|
static async findMany(params) {
|
|
7539
7840
|
const endpoint = new EndpointCreator({ endpoint: Modules.Waitlist });
|
|
7540
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
7541
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
7542
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
7841
|
+
if (_optionalChain([params, 'optionalAccess', _213 => _213.status])) endpoint.addAdditionalParam("status", params.status);
|
|
7842
|
+
if (_optionalChain([params, 'optionalAccess', _214 => _214.search])) endpoint.addAdditionalParam("search", params.search);
|
|
7843
|
+
if (_optionalChain([params, 'optionalAccess', _215 => _215.fetchAll])) endpoint.addAdditionalParam("fetchAll", "true");
|
|
7543
7844
|
return this.callApi({
|
|
7544
7845
|
type: Modules.Waitlist,
|
|
7545
7846
|
method: "GET" /* GET */,
|
|
7546
7847
|
endpoint: endpoint.generate(),
|
|
7547
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
7548
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
7848
|
+
next: _optionalChain([params, 'optionalAccess', _216 => _216.next]),
|
|
7849
|
+
previous: _optionalChain([params, 'optionalAccess', _217 => _217.prev])
|
|
7549
7850
|
});
|
|
7550
7851
|
}
|
|
7551
7852
|
/**
|
|
@@ -7613,10 +7914,10 @@ var WaitlistService = class extends AbstractService {
|
|
|
7613
7914
|
method: "GET" /* GET */,
|
|
7614
7915
|
endpoint: endpoint.generate()
|
|
7615
7916
|
});
|
|
7616
|
-
const attributes = _optionalChain([response, 'access',
|
|
7917
|
+
const attributes = _optionalChain([response, 'access', _218 => _218.data, 'optionalAccess', _219 => _219._jsonApi, 'optionalAccess', _220 => _220.attributes]);
|
|
7617
7918
|
return {
|
|
7618
|
-
email: _optionalChain([attributes, 'optionalAccess',
|
|
7619
|
-
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess',
|
|
7919
|
+
email: _optionalChain([attributes, 'optionalAccess', _221 => _221.email]),
|
|
7920
|
+
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess', _222 => _222.valid]), () => ( false))
|
|
7620
7921
|
};
|
|
7621
7922
|
} catch (_error) {
|
|
7622
7923
|
return null;
|
|
@@ -7702,7 +8003,7 @@ var PermissionMapping = class extends AbstractApiData {
|
|
|
7702
8003
|
super.rehydrate(data);
|
|
7703
8004
|
this._roleId = data.jsonApi.attributes.roleId;
|
|
7704
8005
|
this._moduleId = data.jsonApi.attributes.moduleId;
|
|
7705
|
-
this._permissions = _optionalChain([data, 'access',
|
|
8006
|
+
this._permissions = _optionalChain([data, 'access', _223 => _223.jsonApi, 'access', _224 => _224.meta, 'optionalAccess', _225 => _225.permissions]);
|
|
7706
8007
|
return this;
|
|
7707
8008
|
}
|
|
7708
8009
|
};
|
|
@@ -8656,5 +8957,9 @@ var AuditLogModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
|
|
|
8656
8957
|
|
|
8657
8958
|
|
|
8658
8959
|
|
|
8659
|
-
|
|
8660
|
-
|
|
8960
|
+
|
|
8961
|
+
|
|
8962
|
+
|
|
8963
|
+
|
|
8964
|
+
exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; exports.getLastApiMeta = getLastApiMeta; exports.clearLastApiMeta = clearLastApiMeta; 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.MOBILE_BREAKPOINT = MOBILE_BREAKPOINT; exports.VIEWPORT_COOKIE_NAME = VIEWPORT_COOKIE_NAME; exports.getViewportContext = getViewportContext; exports.measureViewport = measureViewport; exports.persistViewport = persistViewport; exports.subscribeViewport = subscribeViewport; 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.isRemoteImageSrc = isRemoteImageSrc; exports.validatePartitaIva = validatePartitaIva; exports.validateCodiceFiscale = validateCodiceFiscale; exports.validateItalianTaxCode = validateItalianTaxCode; exports.formatPartitaIva = formatPartitaIva; exports.formatCodiceFiscale = formatCodiceFiscale; 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.StripePriceFields = StripePriceFields; exports.StripePriceService = StripePriceService; exports.StripePriceModule = StripePriceModule; exports.StripeProduct = StripeProduct; exports.StripeProductFields = StripeProductFields; 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.AiConnection = AiConnection; exports.AiConnectionFields = AiConnectionFields; exports.AiConnectionService = AiConnectionService; exports.AiConnectionModule = AiConnectionModule; exports.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; exports.EntityAiStatus = EntityAiStatus; 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.AssistantAction = AssistantAction; exports.AssistantActionModule = AssistantActionModule; exports.AssistantActionService = AssistantActionService; 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.TokenUsageAdminBreakdown = TokenUsageAdminBreakdown; exports.TokenUsageAdminSummary = TokenUsageAdminSummary; exports.TokenUsageAdminTimeline = TokenUsageAdminTimeline; exports.TokenUsageAdminSummaryModule = TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = TokenUsageAdminTimelineModule; exports.TokenUsageAdminBreakdownModule = TokenUsageAdminBreakdownModule; exports.TokenUsageReportBreakdown = TokenUsageReportBreakdown; exports.TokenUsageReportSummary = TokenUsageReportSummary; exports.TokenUsageReportTimeline = TokenUsageReportTimeline; exports.tokenUsageModules = tokenUsageModules; exports.configureTokenUsage = configureTokenUsage; exports.getTokenUsageCurrency = getTokenUsageCurrency; exports.AuditLog = AuditLog; exports.AuditLogService = AuditLogService; exports.AuditLogModule = AuditLogModule;
|
|
8965
|
+
//# sourceMappingURL=chunk-YUXCJ35V.js.map
|