@carlonicora/nextjs-jsonapi 1.0.4 → 1.0.5
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/{AbstractService-BKlpJA61.d.mts → AbstractService-B2n_JdiC.d.mts} +1 -1
- package/dist/{AbstractService-D9eSVKNa.d.ts → AbstractService-DtQTYovo.d.ts} +1 -1
- package/dist/{content.interface-Dg2lt_An.d.mts → AuthComponent-CPLvEerw.d.mts} +11 -15
- package/dist/{content.interface-BhyAiOFq.d.ts → AuthComponent-m6Qp4Hz6.d.ts} +11 -15
- package/dist/{BlockNoteEditor-UVO3VZZE.mjs → BlockNoteEditor-BLVXQPXV.mjs} +14 -18
- package/dist/{BlockNoteEditor-UVO3VZZE.mjs.map → BlockNoteEditor-BLVXQPXV.mjs.map} +1 -1
- package/dist/{BlockNoteEditor-VFWG6LXI.js → BlockNoteEditor-ZTDHULFT.js} +15 -19
- package/dist/BlockNoteEditor-ZTDHULFT.js.map +1 -0
- package/dist/JsonApiRequest-O7BGUMFO.mjs +23 -0
- package/dist/JsonApiRequest-VARLNKAF.js +23 -0
- package/dist/JsonApiRequest-VARLNKAF.js.map +1 -0
- package/dist/chunk-2LM6LCJW.mjs +1 -0
- package/dist/chunk-3APORDYP.mjs +7783 -0
- package/dist/chunk-3APORDYP.mjs.map +1 -0
- package/dist/{chunk-TMVHSY3Y.js → chunk-5ZEADNNP.js} +36 -17
- package/dist/chunk-5ZEADNNP.js.map +1 -0
- package/dist/{chunk-ECDTZBYO.mjs → chunk-74F6BBHH.mjs} +21 -2
- package/dist/chunk-74F6BBHH.mjs.map +1 -0
- package/dist/{chunk-GYWPEPOH.mjs → chunk-7C5RAEBO.mjs} +72 -68
- package/dist/chunk-7C5RAEBO.mjs.map +1 -0
- package/dist/chunk-A5DDIABK.js +1 -0
- package/dist/{chunk-TEGF6ZWG.js → chunk-AGAJMJ4T.js} +47 -9
- package/dist/chunk-AGAJMJ4T.js.map +1 -0
- package/dist/{chunk-CXQOWQSY.js → chunk-AYHKQWHH.js} +15 -2
- package/dist/chunk-AYHKQWHH.js.map +1 -0
- package/dist/{chunk-I2REI7OA.js → chunk-HMHGLXWC.js} +33 -15
- package/dist/chunk-HMHGLXWC.js.map +1 -0
- package/dist/chunk-IWFGEPAA.mjs +1 -0
- package/dist/chunk-JC3WJK65.js +1 -0
- package/dist/{chunk-L6EQEAXU.mjs → chunk-PYF2U6WG.mjs} +25 -7
- package/dist/chunk-PYF2U6WG.mjs.map +1 -0
- package/dist/{chunk-YDVTFM7X.mjs → chunk-RBIVEH2K.mjs} +42 -4
- package/dist/chunk-RBIVEH2K.mjs.map +1 -0
- package/dist/{chunk-V2JJPI7N.js → chunk-RZO2LOW4.js} +237 -233
- package/dist/chunk-RZO2LOW4.js.map +1 -0
- package/dist/{chunk-X4BIHJ2B.mjs → chunk-SM63SZCP.mjs} +15 -2
- package/dist/chunk-SM63SZCP.mjs.map +1 -0
- package/dist/chunk-WEC4YMOS.js +7783 -0
- package/dist/chunk-WEC4YMOS.js.map +1 -0
- package/dist/client/index.d.mts +21 -2
- package/dist/client/index.d.ts +21 -2
- package/dist/client/index.js +18 -245
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +28 -255
- package/dist/client/index.mjs.map +1 -1
- package/dist/components/index.d.mts +293 -8
- package/dist/components/index.d.ts +293 -8
- package/dist/components/index.js +78 -2323
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +172 -2417
- package/dist/components/index.mjs.map +1 -1
- package/dist/{config-hXufftVS.d.ts → config-BmnK65TD.d.mts} +1 -0
- package/dist/{config-hXufftVS.d.mts → config-BmnK65TD.d.ts} +1 -0
- package/dist/config-DQeAo9Kf.d.mts +49 -0
- package/dist/config-DQeAo9Kf.d.ts +49 -0
- package/dist/contexts/index.d.mts +109 -21
- package/dist/contexts/index.d.ts +109 -21
- package/dist/contexts/index.js +39 -7
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +40 -8
- package/dist/core/index.d.mts +3 -4
- package/dist/core/index.d.ts +3 -4
- package/dist/core/index.js +3 -7
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +4 -8
- package/dist/{d3.link.interface-QMdB22bC.d.mts → d3.link.interface-ClC4Irqp.d.mts} +2 -1
- package/dist/{d3.link.interface-QMdB22bC.d.ts → d3.link.interface-ClC4Irqp.d.ts} +2 -1
- package/dist/features/index.d.mts +17 -86
- package/dist/features/index.d.ts +17 -86
- package/dist/features/index.js +7 -16
- package/dist/features/index.js.map +1 -1
- package/dist/features/index.mjs +10 -19
- package/dist/hooks/index.d.mts +18 -43
- package/dist/hooks/index.d.ts +18 -43
- package/dist/hooks/index.js +20 -7
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +19 -6
- package/dist/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +13 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -19
- package/dist/interfaces/index.d.mts +2 -1
- package/dist/interfaces/index.d.ts +2 -1
- package/dist/notification.interface-BBgMUdLR.d.mts +14 -0
- package/dist/notification.interface-gyvT-Z2F.d.ts +14 -0
- package/dist/permissions/index.d.mts +2 -3
- package/dist/permissions/index.d.ts +2 -3
- package/dist/server/index.d.mts +38 -18
- package/dist/server/index.d.ts +38 -18
- package/dist/server/index.js +70 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +68 -0
- package/dist/server/index.mjs.map +1 -1
- package/dist/types-BUAlgqqh.d.ts +39 -0
- package/dist/{types-DluCaP1I.d.ts → types-Bl61ob-7.d.mts} +19 -2
- package/dist/{types-lQVA8d_P.d.mts → types-Bl61ob-7.d.ts} +19 -2
- package/dist/types-iVdVY7ba.d.mts +39 -0
- package/dist/useSocket-Cn7fB_B1.d.mts +25 -0
- package/dist/useSocket-DzMKRKCA.d.ts +25 -0
- package/dist/user.fields-CbdObSmS.d.mts +18 -0
- package/dist/user.fields-CbdObSmS.d.ts +18 -0
- package/dist/utils/index.d.mts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/package.json +5 -3
- package/src/client/index.ts +13 -0
- package/src/components/forms/index.ts +1 -0
- package/src/components/index.ts +5 -0
- package/src/components/tables/ContentListTable.tsx +1 -0
- package/src/contexts/CommonContext.tsx +52 -0
- package/src/contexts/SharedContext.tsx +2 -0
- package/src/contexts/SocketContext.tsx +65 -0
- package/src/contexts/index.ts +6 -1
- package/src/features/auth/components/containers/AuthContainer.tsx +32 -0
- package/src/features/auth/components/containers/index.ts +1 -0
- package/src/features/auth/components/details/LandingComponent.tsx +39 -0
- package/src/features/auth/components/details/index.ts +1 -0
- package/src/features/auth/components/forms/AcceptInvitation.tsx +136 -0
- package/src/features/auth/components/forms/ActivateAccount.tsx +75 -0
- package/src/features/auth/components/forms/Cookies.tsx +32 -0
- package/src/features/auth/components/forms/ForgotPassword.tsx +108 -0
- package/src/features/auth/components/forms/Login.tsx +118 -0
- package/src/features/auth/components/forms/Logout.tsx +19 -0
- package/src/features/auth/components/forms/RefreshUser.tsx +39 -0
- package/src/features/auth/components/forms/Register.tsx +150 -0
- package/src/features/auth/components/forms/ResetPassword.tsx +126 -0
- package/src/features/auth/components/forms/index.ts +9 -0
- package/src/features/auth/components/index.ts +3 -0
- package/src/features/auth/contexts/AuthContext.tsx +77 -0
- package/src/features/auth/contexts/index.ts +1 -0
- package/src/features/auth/enums/AuthComponent.ts +9 -0
- package/src/features/auth/enums/index.ts +1 -0
- package/src/features/auth/index.ts +2 -1
- package/src/features/auth/utils/AuthCookies.ts +134 -0
- package/src/features/auth/utils/index.ts +1 -0
- package/src/features/company/components/containers/AdminCompanyContainer.tsx +26 -0
- package/src/features/company/components/containers/CompanyContainer.tsx +17 -0
- package/src/features/company/components/containers/index.ts +2 -0
- package/src/features/company/components/details/CompanyDetails.tsx +26 -0
- package/src/features/company/components/details/index.ts +1 -0
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +151 -0
- package/src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx +97 -0
- package/src/features/company/components/forms/CompanyDeleter.tsx +121 -0
- package/src/features/company/components/forms/CompanyEditor.tsx +245 -0
- package/src/features/company/components/forms/CompanyLicense.tsx +213 -0
- package/src/features/company/components/forms/index.ts +5 -0
- package/src/features/company/components/index.ts +4 -0
- package/src/features/company/components/lists/CompaniesList.tsx +31 -0
- package/src/features/company/components/lists/index.ts +1 -0
- package/src/features/company/contexts/CompanyContext.tsx +99 -0
- package/src/features/company/contexts/index.ts +0 -0
- package/src/features/company/hooks/index.ts +1 -0
- package/src/features/company/hooks/useCompanyTableStructure.tsx +82 -0
- package/src/features/feature/components/forms/FormFeatures.tsx +141 -140
- package/src/features/feature/components/forms/index.ts +1 -0
- package/src/features/feature/components/index.ts +1 -1
- package/src/features/feature/index.ts +1 -2
- package/src/features/module/index.ts +1 -1
- package/src/features/notification/components/common/NotificationErrorBoundary.tsx +51 -0
- package/src/features/notification/components/common/index.ts +1 -0
- package/src/features/notification/components/containers/NotificationsListContainer.tsx +44 -0
- package/src/features/notification/components/containers/index.ts +1 -0
- package/src/features/notification/components/index.ts +5 -0
- package/src/features/notification/components/lists/NotificationsList.tsx +129 -0
- package/src/features/notification/components/lists/index.ts +1 -0
- package/src/features/notification/components/modals/NotificationModal.tsx +220 -0
- package/src/features/notification/components/modals/index.ts +1 -0
- package/src/features/notification/components/notifications/Notification.tsx +120 -0
- package/src/features/notification/components/notifications/PushNotificationProvider.tsx +9 -0
- package/src/features/notification/components/notifications/index.ts +2 -0
- package/src/features/notification/contexts/NotificationContext.tsx +187 -0
- package/src/features/notification/contexts/index.ts +1 -0
- package/src/features/notification/index.ts +1 -1
- package/src/features/push/index.ts +1 -1
- package/src/features/role/components/containers/RoleContainer.tsx +18 -0
- package/src/features/role/components/containers/index.ts +1 -0
- package/src/features/role/components/details/RoleDetails.tsx +21 -0
- package/src/features/role/components/details/index.ts +1 -0
- package/src/features/role/components/forms/FormRoles.tsx +82 -0
- package/src/features/role/components/forms/RemoveUserFromRole.tsx +108 -0
- package/src/features/role/components/forms/UserRoleAdd.tsx +128 -0
- package/src/features/role/components/forms/index.ts +3 -0
- package/src/features/role/components/index.ts +4 -0
- package/src/features/role/components/lists/RolesList.tsx +27 -0
- package/src/features/role/components/lists/UserRolesList.tsx +31 -0
- package/src/features/role/components/lists/index.ts +2 -0
- package/src/features/role/contexts/RoleContext.tsx +84 -0
- package/src/features/role/contexts/index.ts +1 -0
- package/src/features/role/hooks/index.ts +1 -0
- package/src/features/role/hooks/useRoleTableStructure.tsx +72 -0
- package/src/features/s3/index.ts +1 -1
- package/src/features/user/components/containers/UserContainer.tsx +23 -0
- package/src/features/user/components/containers/UserIndexContainer.tsx +12 -0
- package/src/features/user/components/containers/UsersListContainer.tsx +36 -0
- package/src/features/user/components/containers/index.ts +3 -0
- package/src/features/user/components/details/UserDetails.tsx +74 -0
- package/src/features/user/components/details/UserIndexDetails.tsx +28 -0
- package/src/features/user/components/details/index.ts +2 -0
- package/src/features/user/components/forms/RoleUserAdd.tsx +93 -0
- package/src/features/user/components/forms/UserAvatarEditor.tsx +78 -0
- package/src/features/user/components/forms/UserDeleter.tsx +49 -0
- package/src/features/user/components/forms/UserEditor.tsx +319 -0
- package/src/features/user/components/forms/UserMultiSelect.tsx +218 -0
- package/src/features/user/components/forms/UserReactivator.tsx +79 -0
- package/src/features/user/components/forms/UserResentInvitationEmail.tsx +88 -0
- package/src/features/user/components/forms/UserSelector.tsx +185 -0
- package/src/features/user/components/forms/index.ts +8 -0
- package/src/features/user/components/index.ts +3 -0
- package/src/features/user/components/lists/AdminUsersList.tsx +41 -0
- package/src/features/user/components/lists/CompanyUsersList.tsx +44 -0
- package/src/features/user/components/lists/RelevantUsersList.tsx +30 -0
- package/src/features/user/components/lists/RoleUsersList.tsx +31 -0
- package/src/features/user/components/lists/UserListInAdd.tsx +53 -0
- package/src/features/user/components/lists/UsersList.tsx +30 -0
- package/src/features/user/components/lists/UsersListByContentIds.tsx +30 -0
- package/src/features/user/components/lists/index.ts +7 -0
- package/src/features/user/components/widgets/UserAvatarList.tsx +31 -0
- package/src/features/user/components/widgets/UserSearchPopover.tsx +89 -0
- package/src/features/user/contexts/UserContext.tsx +106 -0
- package/src/features/user/contexts/index.ts +1 -0
- package/src/features/user/hooks/index.ts +2 -0
- package/src/features/user/hooks/useUserSearch.ts +53 -0
- package/src/features/user/hooks/useUserTableStructure.tsx +115 -0
- package/src/features/user/index.ts +0 -1
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useCustomD3Graph.tsx +2 -0
- package/src/hooks/useNotificationSync.ts +20 -0
- package/src/hooks/usePageTracker.ts +69 -0
- package/src/hooks/usePushNotifications.ts +82 -0
- package/src/hooks/useSocket.ts +201 -0
- package/src/hooks/useTableGenerator.ts +6 -2
- package/src/i18n/config.ts +1 -0
- package/src/index.ts +4 -0
- package/src/interfaces/d3.link.interface.ts +2 -1
- package/src/server/ServerSession.ts +103 -0
- package/src/server/index.ts +2 -1
- package/src/unified/JsonApiRequest.ts +23 -0
- package/dist/ApiRequestDataTypeInterface-CUKFDBx2.d.mts +0 -20
- package/dist/ApiRequestDataTypeInterface-CUKFDBx2.d.ts +0 -20
- package/dist/BlockNoteEditor-VFWG6LXI.js.map +0 -1
- package/dist/JsonApiRequest-S3ICLM7B.mjs +0 -20
- package/dist/JsonApiRequest-ZZLSP26T.js +0 -20
- package/dist/JsonApiRequest-ZZLSP26T.js.map +0 -1
- package/dist/chunk-366S2JCC.mjs +0 -31
- package/dist/chunk-366S2JCC.mjs.map +0 -1
- package/dist/chunk-5W6AKZE6.mjs +0 -131
- package/dist/chunk-5W6AKZE6.mjs.map +0 -1
- package/dist/chunk-A3J3AAYM.mjs +0 -97
- package/dist/chunk-A3J3AAYM.mjs.map +0 -1
- package/dist/chunk-AWONBQQP.js +0 -97
- package/dist/chunk-AWONBQQP.js.map +0 -1
- package/dist/chunk-CXQOWQSY.js.map +0 -1
- package/dist/chunk-DKKMWBP4.mjs +0 -1
- package/dist/chunk-DKKMWBP4.mjs.map +0 -1
- package/dist/chunk-DO2HLAZO.js +0 -48
- package/dist/chunk-DO2HLAZO.js.map +0 -1
- package/dist/chunk-DZXDB3K2.mjs +0 -17
- package/dist/chunk-DZXDB3K2.mjs.map +0 -1
- package/dist/chunk-ECDTZBYO.mjs.map +0 -1
- package/dist/chunk-FY4SXJGU.js +0 -806
- package/dist/chunk-FY4SXJGU.js.map +0 -1
- package/dist/chunk-GYWPEPOH.mjs.map +0 -1
- package/dist/chunk-H6FMOA6B.js +0 -1
- package/dist/chunk-H6FMOA6B.js.map +0 -1
- package/dist/chunk-I2REI7OA.js.map +0 -1
- package/dist/chunk-J4Q36PMP.js +0 -31
- package/dist/chunk-J4Q36PMP.js.map +0 -1
- package/dist/chunk-L6EQEAXU.mjs.map +0 -1
- package/dist/chunk-MFO27OHB.mjs +0 -48
- package/dist/chunk-MFO27OHB.mjs.map +0 -1
- package/dist/chunk-RAF7PNLG.js +0 -131
- package/dist/chunk-RAF7PNLG.js.map +0 -1
- package/dist/chunk-RUR22SVM.js +0 -17
- package/dist/chunk-RUR22SVM.js.map +0 -1
- package/dist/chunk-TEGF6ZWG.js.map +0 -1
- package/dist/chunk-TMVHSY3Y.js.map +0 -1
- package/dist/chunk-V2JJPI7N.js.map +0 -1
- package/dist/chunk-WWWMJZEF.mjs +0 -806
- package/dist/chunk-WWWMJZEF.mjs.map +0 -1
- package/dist/chunk-X4BIHJ2B.mjs.map +0 -1
- package/dist/chunk-YDVTFM7X.mjs.map +0 -1
- /package/dist/{JsonApiRequest-S3ICLM7B.mjs.map → JsonApiRequest-O7BGUMFO.mjs.map} +0 -0
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
|
|
2
2
|
|
|
3
|
+
var _chunkAYHKQWHHjs = require('./chunk-AYHKQWHH.js');
|
|
3
4
|
|
|
4
5
|
|
|
5
|
-
var _chunkTMVHSY3Yjs = require('./chunk-TMVHSY3Y.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
var _chunk5ZEADNNPjs = require('./chunk-5ZEADNNP.js');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkHMHGLXWCjs = require('./chunk-HMHGLXWC.js');
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
|
|
@@ -23,7 +26,7 @@ var AuthModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory)
|
|
|
23
26
|
}), "AuthModule");
|
|
24
27
|
|
|
25
28
|
// src/features/auth/data/auth.ts
|
|
26
|
-
var Auth = class extends
|
|
29
|
+
var Auth = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
27
30
|
static {
|
|
28
31
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Auth");
|
|
29
32
|
}
|
|
@@ -46,13 +49,13 @@ var Auth = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
46
49
|
super.rehydrate(data);
|
|
47
50
|
this._token = _nullishCoalesce(data.jsonApi.attributes.token, () => ( void 0));
|
|
48
51
|
this._refreshToken = _nullishCoalesce(data.jsonApi.attributes.refreshToken, () => ( void 0));
|
|
49
|
-
this._user = this._readIncluded(data, "user",
|
|
52
|
+
this._user = this._readIncluded(data, "user", _chunkHMHGLXWCjs.Modules.User);
|
|
50
53
|
return this;
|
|
51
54
|
}
|
|
52
55
|
createJsonApi(data) {
|
|
53
56
|
const response = {
|
|
54
57
|
data: {
|
|
55
|
-
type:
|
|
58
|
+
type: _chunkHMHGLXWCjs.Modules.Auth.name,
|
|
56
59
|
attributes: {}
|
|
57
60
|
}
|
|
58
61
|
};
|
|
@@ -67,33 +70,22 @@ var Auth = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
67
70
|
}
|
|
68
71
|
};
|
|
69
72
|
|
|
70
|
-
// src/features/auth/config.ts
|
|
71
|
-
var _tokenHandler = null;
|
|
72
|
-
function configureAuth(handler) {
|
|
73
|
-
_tokenHandler = handler;
|
|
74
|
-
}
|
|
75
|
-
_chunk7QVYU63Ejs.__name.call(void 0, configureAuth, "configureAuth");
|
|
76
|
-
function getTokenHandler() {
|
|
77
|
-
return _tokenHandler;
|
|
78
|
-
}
|
|
79
|
-
_chunk7QVYU63Ejs.__name.call(void 0, getTokenHandler, "getTokenHandler");
|
|
80
|
-
|
|
81
73
|
// src/features/auth/data/auth.service.ts
|
|
82
|
-
var AuthService = class extends
|
|
74
|
+
var AuthService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
83
75
|
static {
|
|
84
76
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "AuthService");
|
|
85
77
|
}
|
|
86
78
|
static async login(params) {
|
|
87
79
|
const language = params.language || "en-US";
|
|
88
|
-
const apiResponse = await
|
|
89
|
-
classKey:
|
|
90
|
-
endpoint: new (0,
|
|
80
|
+
const apiResponse = await _chunk5ZEADNNPjs.JsonApiPost.call(void 0, {
|
|
81
|
+
classKey: _chunkHMHGLXWCjs.Modules.Auth,
|
|
82
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth, id: "login" }).generate(),
|
|
91
83
|
body: { email: params.email, password: params.password },
|
|
92
84
|
language
|
|
93
85
|
});
|
|
94
86
|
if (!apiResponse.ok) throw new Error(apiResponse.error);
|
|
95
87
|
const auth = apiResponse.data;
|
|
96
|
-
const handler = getTokenHandler();
|
|
88
|
+
const handler = _chunkAYHKQWHHjs.getTokenHandler.call(void 0, );
|
|
97
89
|
if (handler) {
|
|
98
90
|
await handler.updateToken({
|
|
99
91
|
token: auth.token,
|
|
@@ -113,21 +105,21 @@ var AuthService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
113
105
|
}
|
|
114
106
|
static async logout(params) {
|
|
115
107
|
const language = _optionalChain([params, 'optionalAccess', _12 => _12.language]) || "en-US";
|
|
116
|
-
await
|
|
117
|
-
classKey:
|
|
118
|
-
endpoint: new (0,
|
|
108
|
+
await _chunk5ZEADNNPjs.JsonApiDelete.call(void 0, {
|
|
109
|
+
classKey: _chunkHMHGLXWCjs.Modules.Auth,
|
|
110
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth }).generate(),
|
|
119
111
|
language
|
|
120
112
|
});
|
|
121
|
-
const handler = getTokenHandler();
|
|
113
|
+
const handler = _chunkAYHKQWHHjs.getTokenHandler.call(void 0, );
|
|
122
114
|
if (handler) {
|
|
123
115
|
await handler.removeToken();
|
|
124
116
|
}
|
|
125
117
|
}
|
|
126
118
|
static async initialiseForgotPassword(params) {
|
|
127
119
|
const language = params.language || "en-US";
|
|
128
|
-
const response = await
|
|
129
|
-
classKey:
|
|
130
|
-
endpoint: new (0,
|
|
120
|
+
const response = await _chunk5ZEADNNPjs.JsonApiPost.call(void 0, {
|
|
121
|
+
classKey: _chunkHMHGLXWCjs.Modules.Auth,
|
|
122
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth, id: "forgot" }).generate(),
|
|
131
123
|
body: { email: params.email },
|
|
132
124
|
language
|
|
133
125
|
});
|
|
@@ -136,51 +128,51 @@ var AuthService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
136
128
|
}
|
|
137
129
|
}
|
|
138
130
|
static async register(params) {
|
|
139
|
-
const endpoint = new (0,
|
|
131
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth, id: "register" });
|
|
140
132
|
await this.callApi({
|
|
141
|
-
type:
|
|
133
|
+
type: _chunkHMHGLXWCjs.Modules.Auth,
|
|
142
134
|
method: "POST" /* POST */,
|
|
143
135
|
endpoint: endpoint.generate(),
|
|
144
136
|
input: params
|
|
145
137
|
});
|
|
146
138
|
}
|
|
147
139
|
static async activate(params) {
|
|
148
|
-
const endpoint = new (0,
|
|
149
|
-
endpoint:
|
|
140
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
141
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Auth,
|
|
150
142
|
id: "activate",
|
|
151
143
|
childEndpoint: params.activationCode
|
|
152
144
|
});
|
|
153
|
-
await this.callApi({ type:
|
|
145
|
+
await this.callApi({ type: _chunkHMHGLXWCjs.Modules.Auth, method: "POST" /* POST */, endpoint: endpoint.generate() });
|
|
154
146
|
}
|
|
155
147
|
static async validateCode(params) {
|
|
156
148
|
const language = params.language || "en-US";
|
|
157
|
-
const apiResponse = await
|
|
158
|
-
classKey:
|
|
159
|
-
endpoint: new (0,
|
|
149
|
+
const apiResponse = await _chunk5ZEADNNPjs.JsonApiGet.call(void 0, {
|
|
150
|
+
classKey: _chunkHMHGLXWCjs.Modules.Auth,
|
|
151
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth, id: "validate", childEndpoint: params.code }).generate(),
|
|
160
152
|
language
|
|
161
153
|
});
|
|
162
154
|
if (!apiResponse.ok) throw new Error(apiResponse.error);
|
|
163
155
|
}
|
|
164
156
|
static async resetPassword(params) {
|
|
165
|
-
const endpoint = new (0,
|
|
157
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth, id: "reset", childEndpoint: params.code });
|
|
166
158
|
const input = { password: params.password };
|
|
167
|
-
await this.callApi({ type:
|
|
159
|
+
await this.callApi({ type: _chunkHMHGLXWCjs.Modules.Auth, method: "POST" /* POST */, endpoint: endpoint.generate(), input });
|
|
168
160
|
}
|
|
169
161
|
static async acceptInvitation(params) {
|
|
170
|
-
const endpoint = new (0,
|
|
162
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth, id: "invitation", childEndpoint: params.code });
|
|
171
163
|
const input = { password: params.password };
|
|
172
|
-
await this.callApi({ type:
|
|
164
|
+
await this.callApi({ type: _chunkHMHGLXWCjs.Modules.Auth, method: "POST" /* POST */, endpoint: endpoint.generate(), input });
|
|
173
165
|
}
|
|
174
166
|
static async findToken(params) {
|
|
175
167
|
return await this.callApi({
|
|
176
|
-
type:
|
|
168
|
+
type: _chunkHMHGLXWCjs.Modules.Auth,
|
|
177
169
|
method: "POST" /* POST */,
|
|
178
|
-
endpoint: new (0,
|
|
170
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Auth }).addAdditionalParam("code", params.tokenCode).generate()
|
|
179
171
|
});
|
|
180
172
|
}
|
|
181
173
|
static async saveToken(params) {
|
|
182
|
-
const auth =
|
|
183
|
-
const handler = getTokenHandler();
|
|
174
|
+
const auth = _chunkHMHGLXWCjs.rehydrate.call(void 0, _chunkHMHGLXWCjs.Modules.Auth, params.dehydratedAuth);
|
|
175
|
+
const handler = _chunkAYHKQWHHjs.getTokenHandler.call(void 0, );
|
|
184
176
|
if (handler) {
|
|
185
177
|
await handler.updateToken({
|
|
186
178
|
token: auth.token,
|
|
@@ -199,6 +191,18 @@ var AuthService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
199
191
|
}
|
|
200
192
|
};
|
|
201
193
|
|
|
194
|
+
// src/features/auth/enums/AuthComponent.ts
|
|
195
|
+
var AuthComponent = /* @__PURE__ */ ((AuthComponent2) => {
|
|
196
|
+
AuthComponent2[AuthComponent2["Login"] = 0] = "Login";
|
|
197
|
+
AuthComponent2[AuthComponent2["ForgotPassword"] = 1] = "ForgotPassword";
|
|
198
|
+
AuthComponent2[AuthComponent2["ResetPassword"] = 2] = "ResetPassword";
|
|
199
|
+
AuthComponent2[AuthComponent2["ActivateAccount"] = 3] = "ActivateAccount";
|
|
200
|
+
AuthComponent2[AuthComponent2["AcceptInvitation"] = 4] = "AcceptInvitation";
|
|
201
|
+
AuthComponent2[AuthComponent2["Register"] = 5] = "Register";
|
|
202
|
+
AuthComponent2[AuthComponent2["Landing"] = 6] = "Landing";
|
|
203
|
+
return AuthComponent2;
|
|
204
|
+
})(AuthComponent || {});
|
|
205
|
+
|
|
202
206
|
// src/features/company/company.module.ts
|
|
203
207
|
var CompanyModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
204
208
|
pageUrl: "/companies",
|
|
@@ -208,7 +212,7 @@ var CompanyModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factor
|
|
|
208
212
|
}), "CompanyModule");
|
|
209
213
|
|
|
210
214
|
// src/features/company/data/company.ts
|
|
211
|
-
var Company = class extends
|
|
215
|
+
var Company = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
212
216
|
static {
|
|
213
217
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Company");
|
|
214
218
|
}
|
|
@@ -248,14 +252,14 @@ var Company = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
248
252
|
this._logo = data.jsonApi.attributes.logo;
|
|
249
253
|
this._logoUrl = data.jsonApi.attributes.logoUrl;
|
|
250
254
|
this._licenseExpirationDate = data.jsonApi.attributes.licenseExpirationDate ? new Date(data.jsonApi.attributes.licenseExpirationDate) : void 0;
|
|
251
|
-
this._features = this._readIncluded(data, "features",
|
|
252
|
-
this._modules = this._readIncluded(data, "modules",
|
|
255
|
+
this._features = this._readIncluded(data, "features", _chunkHMHGLXWCjs.Modules.Feature);
|
|
256
|
+
this._modules = this._readIncluded(data, "modules", _chunkHMHGLXWCjs.Modules.Module);
|
|
253
257
|
return this;
|
|
254
258
|
}
|
|
255
259
|
createJsonApi(data) {
|
|
256
260
|
const response = {
|
|
257
261
|
data: {
|
|
258
|
-
type:
|
|
262
|
+
type: _chunkHMHGLXWCjs.Modules.Company.name,
|
|
259
263
|
id: data.id,
|
|
260
264
|
attributes: {},
|
|
261
265
|
meta: {},
|
|
@@ -271,7 +275,7 @@ var Company = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
271
275
|
if (data.featureIds && data.featureIds.length > 0) {
|
|
272
276
|
response.data.relationships.features = {
|
|
273
277
|
data: data.featureIds.map((featureId) => ({
|
|
274
|
-
type:
|
|
278
|
+
type: _chunkHMHGLXWCjs.Modules.Feature.name,
|
|
275
279
|
id: featureId
|
|
276
280
|
}))
|
|
277
281
|
};
|
|
@@ -279,7 +283,7 @@ var Company = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
279
283
|
if (data.moduleIds && data.moduleIds.length > 0) {
|
|
280
284
|
response.data.relationships.modules = {
|
|
281
285
|
data: data.moduleIds.map((moduleId) => ({
|
|
282
|
-
type:
|
|
286
|
+
type: _chunkHMHGLXWCjs.Modules.Module.name,
|
|
283
287
|
id: moduleId
|
|
284
288
|
}))
|
|
285
289
|
};
|
|
@@ -298,22 +302,22 @@ var CompanyFields = /* @__PURE__ */ ((CompanyFields2) => {
|
|
|
298
302
|
})(CompanyFields || {});
|
|
299
303
|
|
|
300
304
|
// src/features/company/data/company.service.ts
|
|
301
|
-
var CompanyService = class extends
|
|
305
|
+
var CompanyService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
302
306
|
static {
|
|
303
307
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "CompanyService");
|
|
304
308
|
}
|
|
305
309
|
static async findOne(params) {
|
|
306
310
|
return this.callApi({
|
|
307
|
-
type:
|
|
311
|
+
type: _chunkHMHGLXWCjs.Modules.Company,
|
|
308
312
|
method: "GET" /* GET */,
|
|
309
|
-
endpoint: new (0,
|
|
313
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Company, id: params.companyId }).generate()
|
|
310
314
|
});
|
|
311
315
|
}
|
|
312
316
|
static async findMany(params) {
|
|
313
|
-
const endpoint = new (0,
|
|
317
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Company });
|
|
314
318
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
315
319
|
return this.callApi({
|
|
316
|
-
type:
|
|
320
|
+
type: _chunkHMHGLXWCjs.Modules.Company,
|
|
317
321
|
method: "GET" /* GET */,
|
|
318
322
|
endpoint: endpoint.generate(),
|
|
319
323
|
next: params.next
|
|
@@ -321,33 +325,33 @@ var CompanyService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
321
325
|
}
|
|
322
326
|
static async delete(params) {
|
|
323
327
|
await this.callApi({
|
|
324
|
-
type:
|
|
328
|
+
type: _chunkHMHGLXWCjs.Modules.Company,
|
|
325
329
|
method: "DELETE" /* DELETE */,
|
|
326
|
-
endpoint: new (0,
|
|
330
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Company, id: params.companyId }).generate()
|
|
327
331
|
});
|
|
328
332
|
}
|
|
329
333
|
static async create(params) {
|
|
330
334
|
return this.callApi({
|
|
331
|
-
type:
|
|
335
|
+
type: _chunkHMHGLXWCjs.Modules.Company,
|
|
332
336
|
method: "POST" /* POST */,
|
|
333
|
-
endpoint: new (0,
|
|
337
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Company }).generate(),
|
|
334
338
|
input: params
|
|
335
339
|
});
|
|
336
340
|
}
|
|
337
341
|
static async update(params) {
|
|
338
342
|
return this.callApi({
|
|
339
|
-
type:
|
|
343
|
+
type: _chunkHMHGLXWCjs.Modules.Company,
|
|
340
344
|
method: "PUT" /* PUT */,
|
|
341
|
-
endpoint: new (0,
|
|
345
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Company, id: params.id }).generate(),
|
|
342
346
|
input: params
|
|
343
347
|
});
|
|
344
348
|
}
|
|
345
349
|
static async updateConfigurations(params) {
|
|
346
350
|
return this.callApi({
|
|
347
|
-
type:
|
|
351
|
+
type: _chunkHMHGLXWCjs.Modules.Company,
|
|
348
352
|
method: "PUT" /* PUT */,
|
|
349
|
-
endpoint: new (0,
|
|
350
|
-
endpoint:
|
|
353
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
354
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Company,
|
|
351
355
|
id: params.id,
|
|
352
356
|
childEndpoint: "configurations"
|
|
353
357
|
}).generate(),
|
|
@@ -356,9 +360,9 @@ var CompanyService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
356
360
|
}
|
|
357
361
|
static async activateLicense(params) {
|
|
358
362
|
return this.callApi({
|
|
359
|
-
type:
|
|
363
|
+
type: _chunkHMHGLXWCjs.Modules.Company,
|
|
360
364
|
method: "PUT" /* PUT */,
|
|
361
|
-
endpoint: new (0,
|
|
365
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Company, id: params.id, childEndpoint: "license" }).generate(),
|
|
362
366
|
input: params
|
|
363
367
|
});
|
|
364
368
|
}
|
|
@@ -372,17 +376,17 @@ var ContentModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factor
|
|
|
372
376
|
inclusions: {
|
|
373
377
|
lists: {
|
|
374
378
|
fields: [
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
+
_chunkHMHGLXWCjs.createJsonApiInclusion.call(void 0, "content", [`name`, `tldr`, `abstract`, `aiStatus`, `relevance`]),
|
|
380
|
+
_chunkHMHGLXWCjs.createJsonApiInclusion.call(void 0, "users", [`name`, `avatar`]),
|
|
381
|
+
_chunkHMHGLXWCjs.createJsonApiInclusion.call(void 0, "topics", [`name`]),
|
|
382
|
+
_chunkHMHGLXWCjs.createJsonApiInclusion.call(void 0, "expertises", [`name`])
|
|
379
383
|
]
|
|
380
384
|
}
|
|
381
385
|
}
|
|
382
386
|
}), "ContentModule");
|
|
383
387
|
|
|
384
388
|
// src/features/content/data/content.ts
|
|
385
|
-
var Content = class extends
|
|
389
|
+
var Content = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
386
390
|
static {
|
|
387
391
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Content");
|
|
388
392
|
}
|
|
@@ -431,8 +435,8 @@ var Content = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
431
435
|
this._tldr = data.jsonApi.attributes.tldr;
|
|
432
436
|
this._aiStatus = data.jsonApi.meta.aiStatus;
|
|
433
437
|
this._relevance = data.jsonApi.meta.relevance;
|
|
434
|
-
this._author = this._readIncluded(data, "author",
|
|
435
|
-
this._editors = this._readIncluded(data, "editors",
|
|
438
|
+
this._author = this._readIncluded(data, "author", _chunkHMHGLXWCjs.Modules.User);
|
|
439
|
+
this._editors = this._readIncluded(data, "editors", _chunkHMHGLXWCjs.Modules.User);
|
|
436
440
|
return this;
|
|
437
441
|
}
|
|
438
442
|
addContentInput(response, data) {
|
|
@@ -440,7 +444,7 @@ var Content = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
440
444
|
if (data.authorId) {
|
|
441
445
|
response.data.relationships.author = {
|
|
442
446
|
data: {
|
|
443
|
-
type:
|
|
447
|
+
type: _chunkHMHGLXWCjs.Modules.User.name,
|
|
444
448
|
id: data.authorId
|
|
445
449
|
}
|
|
446
450
|
};
|
|
@@ -462,12 +466,12 @@ var ContentFields = /* @__PURE__ */ ((ContentFields2) => {
|
|
|
462
466
|
})(ContentFields || {});
|
|
463
467
|
|
|
464
468
|
// src/features/content/data/content.service.ts
|
|
465
|
-
var ContentService = class extends
|
|
469
|
+
var ContentService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
466
470
|
static {
|
|
467
471
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "ContentService");
|
|
468
472
|
}
|
|
469
473
|
static async findMany(params) {
|
|
470
|
-
const endpoint = new (0,
|
|
474
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Content });
|
|
471
475
|
if (params.contentIds) {
|
|
472
476
|
endpoint.addAdditionalParam("contentIds", params.contentIds.join(","));
|
|
473
477
|
endpoint.addAdditionalParam("fetchAll", "true");
|
|
@@ -475,42 +479,42 @@ var ContentService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
475
479
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
476
480
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
477
481
|
}
|
|
478
|
-
if (_optionalChain([
|
|
479
|
-
if (_optionalChain([
|
|
482
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _24 => _24.Content, 'access', _25 => _25.inclusions, 'optionalAccess', _26 => _26.lists, 'optionalAccess', _27 => _27.fields])) endpoint.limitToFields(_chunkHMHGLXWCjs.Modules.Content.inclusions.lists.fields);
|
|
483
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _28 => _28.Content, 'access', _29 => _29.inclusions, 'optionalAccess', _30 => _30.lists, 'optionalAccess', _31 => _31.types])) endpoint.limitToType(_chunkHMHGLXWCjs.Modules.Content.inclusions.lists.types);
|
|
480
484
|
return this.callApi({
|
|
481
|
-
type:
|
|
485
|
+
type: _chunkHMHGLXWCjs.Modules.Content,
|
|
482
486
|
method: "GET" /* GET */,
|
|
483
487
|
endpoint: endpoint.generate(),
|
|
484
488
|
next: params.next
|
|
485
489
|
});
|
|
486
490
|
}
|
|
487
491
|
static async findRelevant(params) {
|
|
488
|
-
const endpoint = new (0,
|
|
489
|
-
endpoint:
|
|
492
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
493
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Content,
|
|
490
494
|
id: params.id,
|
|
491
495
|
childEndpoint: "relevance"
|
|
492
496
|
});
|
|
493
|
-
if (_optionalChain([
|
|
494
|
-
if (_optionalChain([
|
|
497
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _32 => _32.Content, 'access', _33 => _33.inclusions, 'optionalAccess', _34 => _34.lists, 'optionalAccess', _35 => _35.fields])) endpoint.limitToFields(_chunkHMHGLXWCjs.Modules.Content.inclusions.lists.fields);
|
|
498
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _36 => _36.Content, 'access', _37 => _37.inclusions, 'optionalAccess', _38 => _38.lists, 'optionalAccess', _39 => _39.types])) endpoint.limitToType(_chunkHMHGLXWCjs.Modules.Content.inclusions.lists.types);
|
|
495
499
|
return this.callApi({
|
|
496
|
-
type:
|
|
500
|
+
type: _chunkHMHGLXWCjs.Modules.Content,
|
|
497
501
|
method: "GET" /* GET */,
|
|
498
502
|
endpoint: endpoint.generate(),
|
|
499
503
|
next: params.next
|
|
500
504
|
});
|
|
501
505
|
}
|
|
502
506
|
static async findManyByAuthor(params) {
|
|
503
|
-
const endpoint = new (0,
|
|
504
|
-
endpoint:
|
|
507
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
508
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Author,
|
|
505
509
|
id: params.userId,
|
|
506
|
-
childEndpoint:
|
|
510
|
+
childEndpoint: _chunkHMHGLXWCjs.Modules.Content
|
|
507
511
|
});
|
|
508
512
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
509
513
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
510
|
-
if (_optionalChain([
|
|
511
|
-
if (_optionalChain([
|
|
514
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _40 => _40.Content, 'access', _41 => _41.inclusions, 'optionalAccess', _42 => _42.lists, 'optionalAccess', _43 => _43.fields])) endpoint.limitToFields(_chunkHMHGLXWCjs.Modules.Content.inclusions.lists.fields);
|
|
515
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _44 => _44.Content, 'access', _45 => _45.inclusions, 'optionalAccess', _46 => _46.lists, 'optionalAccess', _47 => _47.types])) endpoint.limitToType(_chunkHMHGLXWCjs.Modules.Content.inclusions.lists.types);
|
|
512
516
|
return this.callApi({
|
|
513
|
-
type:
|
|
517
|
+
type: _chunkHMHGLXWCjs.Modules.Content,
|
|
514
518
|
method: "GET" /* GET */,
|
|
515
519
|
endpoint: endpoint.generate(),
|
|
516
520
|
next: params.next
|
|
@@ -519,7 +523,7 @@ var ContentService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
519
523
|
};
|
|
520
524
|
|
|
521
525
|
// src/features/feature/data/feature.ts
|
|
522
|
-
var Feature = (_class = class extends
|
|
526
|
+
var Feature = (_class = class extends _chunkHMHGLXWCjs.AbstractApiData {constructor(...args) { super(...args); _class.prototype.__init.call(this); }
|
|
523
527
|
static {
|
|
524
528
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Feature");
|
|
525
529
|
}
|
|
@@ -539,22 +543,30 @@ var Feature = (_class = class extends _chunkI2REI7OAjs.AbstractApiData {construc
|
|
|
539
543
|
super.rehydrate(data);
|
|
540
544
|
this._name = data.jsonApi.attributes.name;
|
|
541
545
|
this._isProduction = _nullishCoalesce(data.jsonApi.attributes.isProduction, () => ( false));
|
|
542
|
-
this._modules = this._readIncluded(data, `modules`,
|
|
546
|
+
this._modules = this._readIncluded(data, `modules`, _chunkHMHGLXWCjs.Modules.Module);
|
|
543
547
|
return this;
|
|
544
548
|
}
|
|
545
549
|
}, _class);
|
|
546
550
|
|
|
551
|
+
// src/features/feature/feature.module.ts
|
|
552
|
+
var FeatureModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
553
|
+
pageUrl: "/features",
|
|
554
|
+
name: "features",
|
|
555
|
+
model: Feature,
|
|
556
|
+
moduleId: "025fdd23-2803-4360-9fd9-eaa3612c2e23"
|
|
557
|
+
}), "FeatureModule");
|
|
558
|
+
|
|
547
559
|
// src/features/feature/data/feature.service.ts
|
|
548
|
-
var FeatureService = class extends
|
|
560
|
+
var FeatureService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
549
561
|
static {
|
|
550
562
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "FeatureService");
|
|
551
563
|
}
|
|
552
564
|
static async findMany(params) {
|
|
553
|
-
const endpoint = new (0,
|
|
554
|
-
if (params.companyId) endpoint.endpoint(
|
|
565
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Feature });
|
|
566
|
+
if (params.companyId) endpoint.endpoint(_chunkHMHGLXWCjs.Modules.Company).id(params.companyId).childEndpoint(_chunkHMHGLXWCjs.Modules.Feature);
|
|
555
567
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
556
568
|
return this.callApi({
|
|
557
|
-
type:
|
|
569
|
+
type: _chunkHMHGLXWCjs.Modules.Feature,
|
|
558
570
|
method: "GET" /* GET */,
|
|
559
571
|
endpoint: endpoint.generate(),
|
|
560
572
|
next: params.next
|
|
@@ -562,16 +574,8 @@ var FeatureService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
562
574
|
}
|
|
563
575
|
};
|
|
564
576
|
|
|
565
|
-
// src/features/feature/feature.module.ts
|
|
566
|
-
var FeatureModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
567
|
-
pageUrl: "/features",
|
|
568
|
-
name: "features",
|
|
569
|
-
model: Feature,
|
|
570
|
-
moduleId: "025fdd23-2803-4360-9fd9-eaa3612c2e23"
|
|
571
|
-
}), "FeatureModule");
|
|
572
|
-
|
|
573
577
|
// src/features/module/data/module.ts
|
|
574
|
-
var Module = class extends
|
|
578
|
+
var Module = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
575
579
|
static {
|
|
576
580
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Module");
|
|
577
581
|
}
|
|
@@ -607,7 +611,7 @@ var ModuleModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory
|
|
|
607
611
|
}), "ModuleModule");
|
|
608
612
|
|
|
609
613
|
// src/features/notification/data/notification.ts
|
|
610
|
-
var Notification = class extends
|
|
614
|
+
var Notification = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
611
615
|
static {
|
|
612
616
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Notification");
|
|
613
617
|
}
|
|
@@ -628,13 +632,13 @@ var Notification = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
628
632
|
super.rehydrate(data);
|
|
629
633
|
this._notificationType = data.jsonApi.attributes.notificationType;
|
|
630
634
|
this._isRead = data.jsonApi.attributes.isRead;
|
|
631
|
-
this._actor = this._readIncluded(data, "actor",
|
|
635
|
+
this._actor = this._readIncluded(data, "actor", _chunkHMHGLXWCjs.Modules.User);
|
|
632
636
|
return this;
|
|
633
637
|
}
|
|
634
638
|
createJsonApi(data) {
|
|
635
639
|
const response = {
|
|
636
640
|
data: {
|
|
637
|
-
type:
|
|
641
|
+
type: _chunkHMHGLXWCjs.Modules.Notification.name,
|
|
638
642
|
id: data.id,
|
|
639
643
|
attributes: {
|
|
640
644
|
isRead: data.isRead
|
|
@@ -648,6 +652,14 @@ var Notification = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
648
652
|
}
|
|
649
653
|
};
|
|
650
654
|
|
|
655
|
+
// src/features/notification/notification.module.ts
|
|
656
|
+
var NotificationModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
657
|
+
pageUrl: "/notifications",
|
|
658
|
+
name: "notifications",
|
|
659
|
+
model: Notification,
|
|
660
|
+
moduleId: "9259d704-c670-4e77-a3a1-a728ffc5be3d"
|
|
661
|
+
}), "NotificationModule");
|
|
662
|
+
|
|
651
663
|
// src/features/notification/data/notification.fields.ts
|
|
652
664
|
var NotificationFields = /* @__PURE__ */ ((NotificationFields2) => {
|
|
653
665
|
NotificationFields2["notificationId"] = "notificationId";
|
|
@@ -658,24 +670,24 @@ var NotificationFields = /* @__PURE__ */ ((NotificationFields2) => {
|
|
|
658
670
|
})(NotificationFields || {});
|
|
659
671
|
|
|
660
672
|
// src/features/notification/data/notification.service.ts
|
|
661
|
-
var NotificationService = class extends
|
|
673
|
+
var NotificationService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
662
674
|
static {
|
|
663
675
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "NotificationService");
|
|
664
676
|
}
|
|
665
677
|
static async findMany(params) {
|
|
666
|
-
const endpoint = new (0,
|
|
678
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Notification });
|
|
667
679
|
if (params.isArchived) endpoint.addAdditionalParam("isArchived", "true");
|
|
668
680
|
return this.callApi({
|
|
669
|
-
type:
|
|
681
|
+
type: _chunkHMHGLXWCjs.Modules.Notification,
|
|
670
682
|
method: "GET" /* GET */,
|
|
671
683
|
endpoint: endpoint.generate(),
|
|
672
684
|
next: params.next
|
|
673
685
|
});
|
|
674
686
|
}
|
|
675
687
|
static async markAsRead(params) {
|
|
676
|
-
const endpoint = new (0,
|
|
688
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Notification });
|
|
677
689
|
await this.callApi({
|
|
678
|
-
type:
|
|
690
|
+
type: _chunkHMHGLXWCjs.Modules.Notification,
|
|
679
691
|
method: "PATCH" /* PATCH */,
|
|
680
692
|
endpoint: endpoint.generate(),
|
|
681
693
|
input: params.data,
|
|
@@ -683,28 +695,20 @@ var NotificationService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
683
695
|
});
|
|
684
696
|
}
|
|
685
697
|
static async archive(params) {
|
|
686
|
-
const endpoint = new (0,
|
|
687
|
-
await this.callApi({ type:
|
|
698
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Notification, id: params.id, childEndpoint: "archive" });
|
|
699
|
+
await this.callApi({ type: _chunkHMHGLXWCjs.Modules.Notification, method: "POST" /* POST */, endpoint: endpoint.generate() });
|
|
688
700
|
}
|
|
689
701
|
};
|
|
690
702
|
|
|
691
|
-
// src/features/notification/notification.module.ts
|
|
692
|
-
var NotificationModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
693
|
-
pageUrl: "/notifications",
|
|
694
|
-
name: "notifications",
|
|
695
|
-
model: Notification,
|
|
696
|
-
moduleId: "9259d704-c670-4e77-a3a1-a728ffc5be3d"
|
|
697
|
-
}), "NotificationModule");
|
|
698
|
-
|
|
699
703
|
// src/features/push/data/push.ts
|
|
700
|
-
var Push = class extends
|
|
704
|
+
var Push = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
701
705
|
static {
|
|
702
706
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Push");
|
|
703
707
|
}
|
|
704
708
|
createJsonApi(data) {
|
|
705
709
|
const response = {
|
|
706
710
|
data: {
|
|
707
|
-
type:
|
|
711
|
+
type: _chunkHMHGLXWCjs.Modules.Push.name,
|
|
708
712
|
attributes: {
|
|
709
713
|
key: data.key
|
|
710
714
|
}
|
|
@@ -715,15 +719,23 @@ var Push = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
715
719
|
}
|
|
716
720
|
};
|
|
717
721
|
|
|
722
|
+
// src/features/push/push.module.ts
|
|
723
|
+
var PushModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
724
|
+
pageUrl: "/push",
|
|
725
|
+
name: "push",
|
|
726
|
+
model: Push,
|
|
727
|
+
moduleId: ""
|
|
728
|
+
}), "PushModule");
|
|
729
|
+
|
|
718
730
|
// src/features/push/data/push.service.ts
|
|
719
|
-
var PushService = class extends
|
|
731
|
+
var PushService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
720
732
|
static {
|
|
721
733
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "PushService");
|
|
722
734
|
}
|
|
723
735
|
static async register(params) {
|
|
724
|
-
const endpoint = new (0,
|
|
736
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Push });
|
|
725
737
|
await this.callApi({
|
|
726
|
-
type:
|
|
738
|
+
type: _chunkHMHGLXWCjs.Modules.Push,
|
|
727
739
|
method: "POST" /* POST */,
|
|
728
740
|
endpoint: endpoint.generate(),
|
|
729
741
|
input: params.data,
|
|
@@ -732,16 +744,8 @@ var PushService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
732
744
|
}
|
|
733
745
|
};
|
|
734
746
|
|
|
735
|
-
// src/features/push/push.module.ts
|
|
736
|
-
var PushModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
737
|
-
pageUrl: "/push",
|
|
738
|
-
name: "push",
|
|
739
|
-
model: Push,
|
|
740
|
-
moduleId: ""
|
|
741
|
-
}), "PushModule");
|
|
742
|
-
|
|
743
747
|
// src/features/role/data/role.ts
|
|
744
|
-
var Role = class extends
|
|
748
|
+
var Role = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
745
749
|
static {
|
|
746
750
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Role");
|
|
747
751
|
}
|
|
@@ -770,14 +774,14 @@ var Role = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
770
774
|
this._requiredFeature = this._readIncluded(
|
|
771
775
|
data,
|
|
772
776
|
"requiredFeature",
|
|
773
|
-
|
|
777
|
+
_chunkHMHGLXWCjs.Modules.Feature
|
|
774
778
|
);
|
|
775
779
|
return this;
|
|
776
780
|
}
|
|
777
781
|
createJsonApi(data) {
|
|
778
782
|
const response = {
|
|
779
783
|
data: {
|
|
780
|
-
type:
|
|
784
|
+
type: _chunkHMHGLXWCjs.Modules.Role.name,
|
|
781
785
|
id: data.id,
|
|
782
786
|
attributes: {
|
|
783
787
|
name: data.name
|
|
@@ -802,46 +806,46 @@ var RoleFields = /* @__PURE__ */ ((RoleFields2) => {
|
|
|
802
806
|
})(RoleFields || {});
|
|
803
807
|
|
|
804
808
|
// src/features/role/data/role.service.ts
|
|
805
|
-
var RoleService = class extends
|
|
809
|
+
var RoleService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
806
810
|
static {
|
|
807
811
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "RoleService");
|
|
808
812
|
}
|
|
809
813
|
static async findById(params) {
|
|
810
814
|
return this.callApi({
|
|
811
|
-
type:
|
|
815
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
812
816
|
method: "GET" /* GET */,
|
|
813
|
-
endpoint: new (0,
|
|
817
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Role, id: params.roleId }).generate()
|
|
814
818
|
});
|
|
815
819
|
}
|
|
816
820
|
static async findAllRoles(params) {
|
|
817
|
-
const endpoint = new (0,
|
|
821
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Role });
|
|
818
822
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
819
823
|
return this.callApi({
|
|
820
|
-
type:
|
|
824
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
821
825
|
method: "GET" /* GET */,
|
|
822
826
|
endpoint: endpoint.generate(),
|
|
823
827
|
next: params.next
|
|
824
828
|
});
|
|
825
829
|
}
|
|
826
830
|
static async findAllRolesByUser(params) {
|
|
827
|
-
const endpoint = new (0,
|
|
831
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: params.userId, childEndpoint: _chunkHMHGLXWCjs.Modules.Role });
|
|
828
832
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
829
833
|
return this.callApi({
|
|
830
|
-
type:
|
|
834
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
831
835
|
method: "GET" /* GET */,
|
|
832
836
|
endpoint: endpoint.generate(),
|
|
833
837
|
next: params.next
|
|
834
838
|
});
|
|
835
839
|
}
|
|
836
840
|
static async findAllRolesUserNotIn(params) {
|
|
837
|
-
const endpoint = new (0,
|
|
838
|
-
endpoint:
|
|
841
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
842
|
+
endpoint: _chunkHMHGLXWCjs.Modules.User,
|
|
839
843
|
id: params.userId,
|
|
840
|
-
childEndpoint:
|
|
844
|
+
childEndpoint: _chunkHMHGLXWCjs.Modules.Role
|
|
841
845
|
}).addAdditionalParam("userNotIn", "true");
|
|
842
846
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
843
847
|
return this.callApi({
|
|
844
|
-
type:
|
|
848
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
845
849
|
method: "GET" /* GET */,
|
|
846
850
|
endpoint: endpoint.generate(),
|
|
847
851
|
next: params.next
|
|
@@ -849,49 +853,49 @@ var RoleService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
849
853
|
}
|
|
850
854
|
static async addUserToRole(params) {
|
|
851
855
|
this.callApi({
|
|
852
|
-
type:
|
|
856
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
853
857
|
method: "POST" /* POST */,
|
|
854
|
-
endpoint: new (0,
|
|
855
|
-
endpoint:
|
|
858
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
859
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Role,
|
|
856
860
|
id: params.roleId,
|
|
857
|
-
childEndpoint:
|
|
861
|
+
childEndpoint: _chunkHMHGLXWCjs.Modules.User,
|
|
858
862
|
childId: params.userId
|
|
859
863
|
}).generate()
|
|
860
864
|
});
|
|
861
865
|
}
|
|
862
866
|
static async removeUserFromRole(params) {
|
|
863
867
|
this.callApi({
|
|
864
|
-
type:
|
|
868
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
865
869
|
method: "DELETE" /* DELETE */,
|
|
866
|
-
endpoint: new (0,
|
|
867
|
-
endpoint:
|
|
870
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
871
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Role,
|
|
868
872
|
id: params.roleId,
|
|
869
|
-
childEndpoint:
|
|
873
|
+
childEndpoint: _chunkHMHGLXWCjs.Modules.User,
|
|
870
874
|
childId: params.userId
|
|
871
875
|
}).generate()
|
|
872
876
|
});
|
|
873
877
|
}
|
|
874
878
|
static async create(params) {
|
|
875
879
|
return this.callApi({
|
|
876
|
-
type:
|
|
880
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
877
881
|
method: "POST" /* POST */,
|
|
878
|
-
endpoint: new (0,
|
|
882
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Role }).generate(),
|
|
879
883
|
input: { id: params.roleId, name: params.name, description: params.description }
|
|
880
884
|
});
|
|
881
885
|
}
|
|
882
886
|
static async update(params) {
|
|
883
887
|
return this.callApi({
|
|
884
|
-
type:
|
|
888
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
885
889
|
method: "PUT" /* PUT */,
|
|
886
|
-
endpoint: new (0,
|
|
890
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Role, id: params.roleId }).generate(),
|
|
887
891
|
input: { id: params.roleId, name: params.name, description: params.description }
|
|
888
892
|
});
|
|
889
893
|
}
|
|
890
894
|
static async delete(params) {
|
|
891
895
|
return this.callApi({
|
|
892
|
-
type:
|
|
896
|
+
type: _chunkHMHGLXWCjs.Modules.Role,
|
|
893
897
|
method: "DELETE" /* DELETE */,
|
|
894
|
-
endpoint: new (0,
|
|
898
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Role, id: params.roleId }).generate()
|
|
895
899
|
});
|
|
896
900
|
}
|
|
897
901
|
};
|
|
@@ -905,7 +909,7 @@ var RoleModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory)
|
|
|
905
909
|
}), "RoleModule");
|
|
906
910
|
|
|
907
911
|
// src/features/s3/data/s3.ts
|
|
908
|
-
var S3 = class extends
|
|
912
|
+
var S3 = class extends _chunkHMHGLXWCjs.AbstractApiData {
|
|
909
913
|
static {
|
|
910
914
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "S3");
|
|
911
915
|
}
|
|
@@ -943,7 +947,7 @@ var S3 = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
943
947
|
createJsonApi(data) {
|
|
944
948
|
const response = {
|
|
945
949
|
data: {
|
|
946
|
-
type:
|
|
950
|
+
type: _chunkHMHGLXWCjs.Modules.S3.name,
|
|
947
951
|
attributes: {
|
|
948
952
|
key: data.key
|
|
949
953
|
}
|
|
@@ -955,40 +959,40 @@ var S3 = class extends _chunkI2REI7OAjs.AbstractApiData {
|
|
|
955
959
|
}
|
|
956
960
|
};
|
|
957
961
|
|
|
962
|
+
// src/features/s3/s3.module.ts
|
|
963
|
+
var S3Module = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
964
|
+
pageUrl: "/s3",
|
|
965
|
+
name: "s3",
|
|
966
|
+
model: S3,
|
|
967
|
+
moduleId: "db41ba46-e171-4324-8845-99353eba8568"
|
|
968
|
+
}), "S3Module");
|
|
969
|
+
|
|
958
970
|
// src/features/s3/data/s3.service.ts
|
|
959
|
-
var S3Service = class extends
|
|
971
|
+
var S3Service = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
960
972
|
static {
|
|
961
973
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "S3Service");
|
|
962
974
|
}
|
|
963
975
|
static async getPreSignedUrl(params) {
|
|
964
|
-
const endpoint = new (0,
|
|
976
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.S3 }).addAdditionalParam("key", params.key).addAdditionalParam("contentType", params.contentType);
|
|
965
977
|
if (params.isPublic) endpoint.addAdditionalParam("isPublic", "true");
|
|
966
|
-
return this.callApi({ type:
|
|
978
|
+
return this.callApi({ type: _chunkHMHGLXWCjs.Modules.S3, method: "GET" /* GET */, endpoint: endpoint.generate() });
|
|
967
979
|
}
|
|
968
980
|
static async getSignedUrl(params) {
|
|
969
|
-
const endpoint = new (0,
|
|
981
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.S3, id: "sign" }).addAdditionalParam("key", params.key);
|
|
970
982
|
if (params.isPublic) endpoint.addAdditionalParam("isPublic", "true");
|
|
971
|
-
return this.callApi({ type:
|
|
983
|
+
return this.callApi({ type: _chunkHMHGLXWCjs.Modules.S3, method: "GET" /* GET */, endpoint: endpoint.generate() });
|
|
972
984
|
}
|
|
973
985
|
static async deleteFile(params) {
|
|
974
986
|
this.callApi({
|
|
975
|
-
type:
|
|
987
|
+
type: _chunkHMHGLXWCjs.Modules.S3,
|
|
976
988
|
method: "DELETE" /* DELETE */,
|
|
977
|
-
endpoint: new (0,
|
|
989
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.S3 }).addAdditionalParam("key", params.key).generate()
|
|
978
990
|
});
|
|
979
991
|
}
|
|
980
992
|
};
|
|
981
993
|
|
|
982
|
-
// src/features/s3/s3.module.ts
|
|
983
|
-
var S3Module = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
984
|
-
pageUrl: "/s3",
|
|
985
|
-
name: "s3",
|
|
986
|
-
model: S3,
|
|
987
|
-
moduleId: "db41ba46-e171-4324-8845-99353eba8568"
|
|
988
|
-
}), "S3Module");
|
|
989
|
-
|
|
990
994
|
// src/features/user/data/user.ts
|
|
991
|
-
var User = (_class2 = class extends
|
|
995
|
+
var User = (_class2 = class extends _chunkHMHGLXWCjs.AbstractApiData {constructor(...args2) { super(...args2); _class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this); }
|
|
992
996
|
static {
|
|
993
997
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "User");
|
|
994
998
|
}
|
|
@@ -1069,15 +1073,15 @@ var User = (_class2 = class extends _chunkI2REI7OAjs.AbstractApiData {constructo
|
|
|
1069
1073
|
this._isDeleted = data.jsonApi.meta.isDeleted;
|
|
1070
1074
|
this._lastLogin = data.jsonApi.meta.lastLogin ? new Date(data.jsonApi.meta.lastLogin) : void 0;
|
|
1071
1075
|
this._relevance = data.jsonApi.meta.relevance;
|
|
1072
|
-
this._roles = this._readIncluded(data, "roles",
|
|
1073
|
-
this._company = this._readIncluded(data, "company",
|
|
1074
|
-
this._modules = this._readIncluded(data, "modules",
|
|
1076
|
+
this._roles = this._readIncluded(data, "roles", _chunkHMHGLXWCjs.Modules.Role);
|
|
1077
|
+
this._company = this._readIncluded(data, "company", _chunkHMHGLXWCjs.Modules.Company);
|
|
1078
|
+
this._modules = this._readIncluded(data, "modules", _chunkHMHGLXWCjs.Modules.Module);
|
|
1075
1079
|
return this;
|
|
1076
1080
|
}
|
|
1077
1081
|
createJsonApi(data) {
|
|
1078
1082
|
const response = {
|
|
1079
1083
|
data: {
|
|
1080
|
-
type:
|
|
1084
|
+
type: _chunkHMHGLXWCjs.Modules.User.name,
|
|
1081
1085
|
id: data.id,
|
|
1082
1086
|
attributes: {
|
|
1083
1087
|
name: data.name
|
|
@@ -1099,7 +1103,7 @@ var User = (_class2 = class extends _chunkI2REI7OAjs.AbstractApiData {constructo
|
|
|
1099
1103
|
if (data.roleIds) {
|
|
1100
1104
|
response.data.relationships.roles = {
|
|
1101
1105
|
data: data.roleIds.map((roleId) => ({
|
|
1102
|
-
type:
|
|
1106
|
+
type: _chunkHMHGLXWCjs.Modules.Role.name,
|
|
1103
1107
|
id: roleId
|
|
1104
1108
|
}))
|
|
1105
1109
|
};
|
|
@@ -1107,7 +1111,7 @@ var User = (_class2 = class extends _chunkI2REI7OAjs.AbstractApiData {constructo
|
|
|
1107
1111
|
if (data.companyId) {
|
|
1108
1112
|
response.data.relationships.company = {
|
|
1109
1113
|
data: {
|
|
1110
|
-
type:
|
|
1114
|
+
type: _chunkHMHGLXWCjs.Modules.Company.name,
|
|
1111
1115
|
id: data.companyId
|
|
1112
1116
|
}
|
|
1113
1117
|
};
|
|
@@ -1128,65 +1132,65 @@ var UserFields = /* @__PURE__ */ ((UserFields2) => {
|
|
|
1128
1132
|
})(UserFields || {});
|
|
1129
1133
|
|
|
1130
1134
|
// src/features/user/data/user.service.ts
|
|
1131
|
-
var UserService = class extends
|
|
1135
|
+
var UserService = class extends _chunkHMHGLXWCjs.AbstractService {
|
|
1132
1136
|
static {
|
|
1133
1137
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "UserService");
|
|
1134
1138
|
}
|
|
1135
1139
|
static async findFullUser() {
|
|
1136
|
-
const endpoint = new (0,
|
|
1140
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: "me", childEndpoint: "full" });
|
|
1137
1141
|
return this.callApi({
|
|
1138
|
-
type:
|
|
1142
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1139
1143
|
method: "GET" /* GET */,
|
|
1140
1144
|
endpoint: endpoint.generate()
|
|
1141
1145
|
});
|
|
1142
1146
|
}
|
|
1143
1147
|
static async findById(params) {
|
|
1144
1148
|
return this.callApi({
|
|
1145
|
-
type:
|
|
1149
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1146
1150
|
method: "GET" /* GET */,
|
|
1147
|
-
endpoint: new (0,
|
|
1151
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: params.userId }).generate()
|
|
1148
1152
|
});
|
|
1149
1153
|
}
|
|
1150
1154
|
static async findByEmail(params) {
|
|
1151
|
-
const endpoint = new (0,
|
|
1152
|
-
return this.callApi({ type:
|
|
1155
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: "email", childEndpoint: params.email });
|
|
1156
|
+
return this.callApi({ type: _chunkHMHGLXWCjs.Modules.User, method: "GET" /* GET */, endpoint: endpoint.generate() });
|
|
1153
1157
|
}
|
|
1154
1158
|
static async findMany(params) {
|
|
1155
|
-
const endpoint = new (0,
|
|
1159
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User });
|
|
1156
1160
|
if (params.roleId) endpoint.addAdditionalParam("roleId", params.roleId);
|
|
1157
1161
|
if (params.includeDeleted) endpoint.addAdditionalParam("includeDeleted", "true");
|
|
1158
1162
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
1159
1163
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
1160
1164
|
return this.callApi({
|
|
1161
|
-
type:
|
|
1165
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1162
1166
|
method: "GET" /* GET */,
|
|
1163
1167
|
endpoint: endpoint.generate(),
|
|
1164
1168
|
next: params.next
|
|
1165
1169
|
});
|
|
1166
1170
|
}
|
|
1167
1171
|
static async findManyByContentIds(params) {
|
|
1168
|
-
const endpoint = new (0,
|
|
1172
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User });
|
|
1169
1173
|
endpoint.addAdditionalParam("contentIds", params.contentIds.map((id) => id).join(","));
|
|
1170
1174
|
endpoint.addAdditionalParam("includeDeleted", "true");
|
|
1171
1175
|
endpoint.addAdditionalParam("fetchAll", "true");
|
|
1172
1176
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
1173
1177
|
return this.callApi({
|
|
1174
|
-
type:
|
|
1178
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1175
1179
|
method: "GET" /* GET */,
|
|
1176
1180
|
endpoint: endpoint.generate(),
|
|
1177
1181
|
next: params.next
|
|
1178
1182
|
});
|
|
1179
1183
|
}
|
|
1180
1184
|
static async findRelevant(params) {
|
|
1181
|
-
const endpoint = new (0,
|
|
1182
|
-
endpoint:
|
|
1185
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
1186
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Content,
|
|
1183
1187
|
id: params.id,
|
|
1184
1188
|
childEndpoint: "user-relevance"
|
|
1185
1189
|
});
|
|
1186
|
-
if (_optionalChain([
|
|
1187
|
-
if (_optionalChain([
|
|
1190
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _48 => _48.User, 'access', _49 => _49.inclusions, 'optionalAccess', _50 => _50.lists, 'optionalAccess', _51 => _51.fields])) endpoint.limitToFields(_chunkHMHGLXWCjs.Modules.User.inclusions.lists.fields);
|
|
1191
|
+
if (_optionalChain([_chunkHMHGLXWCjs.Modules, 'access', _52 => _52.User, 'access', _53 => _53.inclusions, 'optionalAccess', _54 => _54.lists, 'optionalAccess', _55 => _55.types])) endpoint.limitToType(_chunkHMHGLXWCjs.Modules.User.inclusions.lists.types);
|
|
1188
1192
|
return this.callApi({
|
|
1189
|
-
type:
|
|
1193
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1190
1194
|
method: "GET" /* GET */,
|
|
1191
1195
|
endpoint: endpoint.generate(),
|
|
1192
1196
|
next: params.next
|
|
@@ -1194,14 +1198,14 @@ var UserService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
1194
1198
|
}
|
|
1195
1199
|
static async findManyForAmin(params) {
|
|
1196
1200
|
if (!params.companyId) return [];
|
|
1197
|
-
const endpoint = new (0,
|
|
1198
|
-
endpoint:
|
|
1201
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
1202
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Company,
|
|
1199
1203
|
id: params.companyId,
|
|
1200
|
-
childEndpoint:
|
|
1204
|
+
childEndpoint: _chunkHMHGLXWCjs.Modules.User
|
|
1201
1205
|
});
|
|
1202
1206
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
1203
1207
|
return this.callApi({
|
|
1204
|
-
type:
|
|
1208
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1205
1209
|
method: "GET" /* GET */,
|
|
1206
1210
|
endpoint: endpoint.generate(),
|
|
1207
1211
|
next: params.next,
|
|
@@ -1209,41 +1213,41 @@ var UserService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
1209
1213
|
});
|
|
1210
1214
|
}
|
|
1211
1215
|
static async findAllUsers(params) {
|
|
1212
|
-
const endpoint = new (0,
|
|
1213
|
-
endpoint:
|
|
1216
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
1217
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Company,
|
|
1214
1218
|
id: params.companyId,
|
|
1215
|
-
childEndpoint:
|
|
1219
|
+
childEndpoint: _chunkHMHGLXWCjs.Modules.User
|
|
1216
1220
|
});
|
|
1217
1221
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
1218
1222
|
if (params.isDeleted) endpoint.addAdditionalParam("isDeleted", "true");
|
|
1219
1223
|
if (params.limitToRoles && params.limitToRoles.length > 0)
|
|
1220
1224
|
endpoint.addAdditionalParam("limitToRoles", params.limitToRoles.join(","));
|
|
1221
1225
|
return this.callApi({
|
|
1222
|
-
type:
|
|
1226
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1223
1227
|
method: "GET" /* GET */,
|
|
1224
1228
|
endpoint: endpoint.generate(),
|
|
1225
1229
|
next: params.next
|
|
1226
1230
|
});
|
|
1227
1231
|
}
|
|
1228
1232
|
static async findAllUsersByRole(params) {
|
|
1229
|
-
const endpoint = new (0,
|
|
1233
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.Role, id: params.roleId, childEndpoint: _chunkHMHGLXWCjs.Modules.User });
|
|
1230
1234
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
1231
1235
|
return this.callApi({
|
|
1232
|
-
type:
|
|
1236
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1233
1237
|
method: "GET" /* GET */,
|
|
1234
1238
|
endpoint: endpoint.generate(),
|
|
1235
1239
|
next: params.next
|
|
1236
1240
|
});
|
|
1237
1241
|
}
|
|
1238
1242
|
static async findAllUsersNotInRole(params) {
|
|
1239
|
-
const endpoint = new (0,
|
|
1240
|
-
endpoint:
|
|
1243
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
1244
|
+
endpoint: _chunkHMHGLXWCjs.Modules.Role,
|
|
1241
1245
|
id: params.roleId,
|
|
1242
|
-
childEndpoint:
|
|
1246
|
+
childEndpoint: _chunkHMHGLXWCjs.Modules.User
|
|
1243
1247
|
}).addAdditionalParam("notInRole", "true");
|
|
1244
1248
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
1245
1249
|
return this.callApi({
|
|
1246
|
-
type:
|
|
1250
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1247
1251
|
method: "GET" /* GET */,
|
|
1248
1252
|
endpoint: endpoint.generate(),
|
|
1249
1253
|
next: params.next
|
|
@@ -1251,56 +1255,56 @@ var UserService = class extends _chunkI2REI7OAjs.AbstractService {
|
|
|
1251
1255
|
}
|
|
1252
1256
|
static async create(params) {
|
|
1253
1257
|
return this.callApi({
|
|
1254
|
-
type:
|
|
1258
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1255
1259
|
method: "POST" /* POST */,
|
|
1256
|
-
endpoint: new (0,
|
|
1260
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User }).generate(),
|
|
1257
1261
|
companyId: params.companyId,
|
|
1258
1262
|
input: params
|
|
1259
1263
|
});
|
|
1260
1264
|
}
|
|
1261
1265
|
static async reactivate(params) {
|
|
1262
1266
|
return this.callApi({
|
|
1263
|
-
type:
|
|
1267
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1264
1268
|
method: "PATCH" /* PATCH */,
|
|
1265
|
-
endpoint: new (0,
|
|
1269
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: params.userId }).generate()
|
|
1266
1270
|
});
|
|
1267
1271
|
}
|
|
1268
1272
|
static async sendInvitation(params) {
|
|
1269
|
-
const endpoint = new (0,
|
|
1270
|
-
endpoint:
|
|
1273
|
+
const endpoint = new (0, _chunkHMHGLXWCjs.EndpointCreator)({
|
|
1274
|
+
endpoint: _chunkHMHGLXWCjs.Modules.User,
|
|
1271
1275
|
id: params.userId,
|
|
1272
1276
|
childEndpoint: "send-invitation-email"
|
|
1273
1277
|
});
|
|
1274
1278
|
if (params.companyId) endpoint.addAdditionalParam("companyId", params.companyId);
|
|
1275
1279
|
this.callApi({
|
|
1276
|
-
type:
|
|
1280
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1277
1281
|
method: "POST" /* POST */,
|
|
1278
1282
|
endpoint: endpoint.generate()
|
|
1279
1283
|
});
|
|
1280
1284
|
}
|
|
1281
1285
|
static async update(params) {
|
|
1282
1286
|
return this.callApi({
|
|
1283
|
-
type:
|
|
1287
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1284
1288
|
method: "PUT" /* PUT */,
|
|
1285
|
-
endpoint: new (0,
|
|
1289
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: params.id }).generate(),
|
|
1286
1290
|
companyId: params.companyId,
|
|
1287
1291
|
input: params
|
|
1288
1292
|
});
|
|
1289
1293
|
}
|
|
1290
1294
|
static async patchRate(params) {
|
|
1291
1295
|
return this.callApi({
|
|
1292
|
-
type:
|
|
1296
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1293
1297
|
method: "PATCH" /* PATCH */,
|
|
1294
|
-
endpoint: new (0,
|
|
1298
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: params.id, childEndpoint: "rates" }).generate(),
|
|
1295
1299
|
companyId: params.companyId,
|
|
1296
1300
|
input: params
|
|
1297
1301
|
});
|
|
1298
1302
|
}
|
|
1299
1303
|
static async delete(params) {
|
|
1300
1304
|
await this.callApi({
|
|
1301
|
-
type:
|
|
1305
|
+
type: _chunkHMHGLXWCjs.Modules.User,
|
|
1302
1306
|
method: "DELETE" /* DELETE */,
|
|
1303
|
-
endpoint: new (0,
|
|
1307
|
+
endpoint: new (0, _chunkHMHGLXWCjs.EndpointCreator)({ endpoint: _chunkHMHGLXWCjs.Modules.User, id: params.userId }).generate(),
|
|
1304
1308
|
companyId: params.companyId
|
|
1305
1309
|
});
|
|
1306
1310
|
}
|
|
@@ -1350,5 +1354,5 @@ var AuthorModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory
|
|
|
1350
1354
|
|
|
1351
1355
|
|
|
1352
1356
|
|
|
1353
|
-
exports.
|
|
1354
|
-
//# sourceMappingURL=chunk-
|
|
1357
|
+
exports.Role = Role; exports.RoleFields = RoleFields; exports.RoleService = RoleService; exports.RoleModule = RoleModule; exports.User = User; exports.UserFields = UserFields; exports.UserService = UserService; exports.S3 = S3; exports.S3Module = S3Module; exports.S3Service = S3Service; exports.AuthorModule = AuthorModule; exports.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; exports.Feature = Feature; exports.FeatureModule = FeatureModule; exports.FeatureService = FeatureService; exports.Notification = Notification; exports.NotificationFields = NotificationFields; exports.NotificationService = NotificationService; exports.AuthModule = AuthModule; exports.Auth = Auth; exports.AuthService = AuthService; exports.AuthComponent = AuthComponent; exports.CompanyModule = CompanyModule; exports.ContentModule = ContentModule; exports.Content = Content; exports.ContentFields = ContentFields; exports.ContentService = ContentService; exports.Module = Module; exports.ModuleModule = ModuleModule; exports.NotificationModule = NotificationModule; exports.Push = Push; exports.PushModule = PushModule; exports.PushService = PushService;
|
|
1358
|
+
//# sourceMappingURL=chunk-RZO2LOW4.js.map
|