@hexabot-ai/types 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +120 -0
- package/README.md +172 -0
- package/dist/cjs/analytics/index.js +18 -0
- package/dist/cjs/analytics/integration-health.js +30 -0
- package/dist/cjs/analytics/stats.js +32 -0
- package/dist/cjs/attachment/attachment.js +53 -0
- package/dist/cjs/attachment/index.js +16 -0
- package/dist/cjs/audit/audit-log.js +33 -0
- package/dist/cjs/audit/index.js +11 -0
- package/dist/cjs/channel/channel-metadata.js +15 -0
- package/dist/cjs/channel/index.js +15 -0
- package/dist/cjs/channel/source-full.js +16 -0
- package/dist/cjs/channel/source.js +25 -0
- package/dist/cjs/chat/attachment.js +32 -0
- package/dist/cjs/chat/button.js +70 -0
- package/dist/cjs/chat/index.js +87 -0
- package/dist/cjs/chat/label-group.js +22 -0
- package/dist/cjs/chat/label.js +37 -0
- package/dist/cjs/chat/message-contract.js +183 -0
- package/dist/cjs/chat/message.js +107 -0
- package/dist/cjs/chat/options.js +122 -0
- package/dist/cjs/chat/quick-reply.js +35 -0
- package/dist/cjs/chat/subscriber.js +36 -0
- package/dist/cjs/chat/thread.js +36 -0
- package/dist/cjs/cms/content-type.js +17 -0
- package/dist/cjs/cms/content.js +29 -0
- package/dist/cjs/cms/index.js +21 -0
- package/dist/cjs/cms/menu.js +36 -0
- package/dist/cjs/dummy/dummy.js +18 -0
- package/dist/cjs/dummy/index.js +12 -0
- package/dist/cjs/i18n/index.js +16 -0
- package/dist/cjs/i18n/language.js +19 -0
- package/dist/cjs/i18n/translation.js +17 -0
- package/dist/cjs/index.js +32 -0
- package/dist/cjs/setting/index.js +18 -0
- package/dist/cjs/setting/metadata.js +17 -0
- package/dist/cjs/setting/setting.js +36 -0
- package/dist/cjs/shared/aliases.js +41 -0
- package/dist/cjs/shared/base.js +14 -0
- package/dist/cjs/shared/object.js +19 -0
- package/dist/cjs/shared/preprocess.js +13 -0
- package/dist/cjs/shared/profile.js +33 -0
- package/dist/cjs/user/credential.js +26 -0
- package/dist/cjs/user/domain.js +56 -0
- package/dist/cjs/user/index.js +39 -0
- package/dist/cjs/user/model.js +24 -0
- package/dist/cjs/user/permission.js +32 -0
- package/dist/cjs/user/role.js +24 -0
- package/dist/cjs/user/user-profile-assigned.js +38 -0
- package/dist/cjs/user/user-profile.js +12 -0
- package/dist/cjs/user/user.js +44 -0
- package/dist/cjs/workflow/domain.js +44 -0
- package/dist/cjs/workflow/helpers.js +35 -0
- package/dist/cjs/workflow/index.js +40 -0
- package/dist/cjs/workflow/mcp-server.js +33 -0
- package/dist/cjs/workflow/memory-definition.js +21 -0
- package/dist/cjs/workflow/memory-record.js +44 -0
- package/dist/cjs/workflow/workflow-run.js +100 -0
- package/dist/cjs/workflow/workflow-version.js +39 -0
- package/dist/cjs/workflow/workflow.js +98 -0
- package/dist/esm/analytics/index.js +7 -0
- package/dist/esm/analytics/integration-health.js +27 -0
- package/dist/esm/analytics/stats.js +29 -0
- package/dist/esm/attachment/attachment.js +50 -0
- package/dist/esm/attachment/index.js +6 -0
- package/dist/esm/audit/audit-log.js +30 -0
- package/dist/esm/audit/index.js +6 -0
- package/dist/esm/channel/channel-metadata.js +12 -0
- package/dist/esm/channel/index.js +8 -0
- package/dist/esm/channel/source-full.js +13 -0
- package/dist/esm/channel/source.js +22 -0
- package/dist/esm/chat/attachment.js +29 -0
- package/dist/esm/chat/button.js +67 -0
- package/dist/esm/chat/index.js +15 -0
- package/dist/esm/chat/label-group.js +19 -0
- package/dist/esm/chat/label.js +34 -0
- package/dist/esm/chat/message-contract.js +180 -0
- package/dist/esm/chat/message.js +104 -0
- package/dist/esm/chat/options.js +119 -0
- package/dist/esm/chat/quick-reply.js +32 -0
- package/dist/esm/chat/subscriber.js +33 -0
- package/dist/esm/chat/thread.js +33 -0
- package/dist/esm/cms/content-type.js +14 -0
- package/dist/esm/cms/content.js +26 -0
- package/dist/esm/cms/index.js +8 -0
- package/dist/esm/cms/menu.js +33 -0
- package/dist/esm/dummy/dummy.js +15 -0
- package/dist/esm/dummy/index.js +6 -0
- package/dist/esm/i18n/index.js +7 -0
- package/dist/esm/i18n/language.js +16 -0
- package/dist/esm/i18n/translation.js +14 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/setting/index.js +7 -0
- package/dist/esm/setting/metadata.js +14 -0
- package/dist/esm/setting/setting.js +33 -0
- package/dist/esm/shared/aliases.js +35 -0
- package/dist/esm/shared/base.js +11 -0
- package/dist/esm/shared/object.js +14 -0
- package/dist/esm/shared/preprocess.js +9 -0
- package/dist/esm/shared/profile.js +30 -0
- package/dist/esm/user/credential.js +23 -0
- package/dist/esm/user/domain.js +53 -0
- package/dist/esm/user/index.js +13 -0
- package/dist/esm/user/model.js +21 -0
- package/dist/esm/user/permission.js +29 -0
- package/dist/esm/user/role.js +21 -0
- package/dist/esm/user/user-profile-assigned.js +35 -0
- package/dist/esm/user/user-profile.js +9 -0
- package/dist/esm/user/user.js +41 -0
- package/dist/esm/workflow/domain.js +41 -0
- package/dist/esm/workflow/helpers.js +30 -0
- package/dist/esm/workflow/index.js +12 -0
- package/dist/esm/workflow/mcp-server.js +30 -0
- package/dist/esm/workflow/memory-definition.js +18 -0
- package/dist/esm/workflow/memory-record.js +41 -0
- package/dist/esm/workflow/workflow-run.js +96 -0
- package/dist/esm/workflow/workflow-version.js +36 -0
- package/dist/esm/workflow/workflow.js +94 -0
- package/dist/types/analytics/index.d.ts +3 -0
- package/dist/types/analytics/index.d.ts.map +1 -0
- package/dist/types/analytics/integration-health.d.ts +55 -0
- package/dist/types/analytics/integration-health.d.ts.map +1 -0
- package/dist/types/analytics/stats.d.ts +43 -0
- package/dist/types/analytics/stats.d.ts.map +1 -0
- package/dist/types/attachment/attachment.d.ts +212 -0
- package/dist/types/attachment/attachment.d.ts.map +1 -0
- package/dist/types/attachment/index.d.ts +2 -0
- package/dist/types/attachment/index.d.ts.map +1 -0
- package/dist/types/audit/audit-log.d.ts +58 -0
- package/dist/types/audit/audit-log.d.ts.map +1 -0
- package/dist/types/audit/index.d.ts +2 -0
- package/dist/types/audit/index.d.ts.map +1 -0
- package/dist/types/channel/channel-metadata.d.ts +7 -0
- package/dist/types/channel/channel-metadata.d.ts.map +1 -0
- package/dist/types/channel/index.d.ts +4 -0
- package/dist/types/channel/index.d.ts.map +1 -0
- package/dist/types/channel/source-full.d.ts +58 -0
- package/dist/types/channel/source-full.d.ts.map +1 -0
- package/dist/types/channel/source.d.ts +44 -0
- package/dist/types/channel/source.d.ts.map +1 -0
- package/dist/types/chat/attachment.d.ts +34 -0
- package/dist/types/chat/attachment.d.ts.map +1 -0
- package/dist/types/chat/button.d.ts +31 -0
- package/dist/types/chat/button.d.ts.map +1 -0
- package/dist/types/chat/index.d.ts +11 -0
- package/dist/types/chat/index.d.ts.map +1 -0
- package/dist/types/chat/label-group.d.ts +47 -0
- package/dist/types/chat/label-group.d.ts.map +1 -0
- package/dist/types/chat/label.d.ts +102 -0
- package/dist/types/chat/label.d.ts.map +1 -0
- package/dist/types/chat/message-contract.d.ts +883 -0
- package/dist/types/chat/message-contract.d.ts.map +1 -0
- package/dist/types/chat/message.d.ts +1132 -0
- package/dist/types/chat/message.d.ts.map +1 -0
- package/dist/types/chat/options.d.ts +64 -0
- package/dist/types/chat/options.d.ts.map +1 -0
- package/dist/types/chat/quick-reply.d.ts +32 -0
- package/dist/types/chat/quick-reply.d.ts.map +1 -0
- package/dist/types/chat/subscriber.d.ts +236 -0
- package/dist/types/chat/subscriber.d.ts.map +1 -0
- package/dist/types/chat/thread.d.ts +126 -0
- package/dist/types/chat/thread.d.ts.map +1 -0
- package/dist/types/cms/content-type.d.ts +26 -0
- package/dist/types/cms/content-type.d.ts.map +1 -0
- package/dist/types/cms/content.d.ts +49 -0
- package/dist/types/cms/content.d.ts.map +1 -0
- package/dist/types/cms/index.d.ts +4 -0
- package/dist/types/cms/index.d.ts.map +1 -0
- package/dist/types/cms/menu.d.ts +85 -0
- package/dist/types/cms/menu.d.ts.map +1 -0
- package/dist/types/dummy/dummy.d.ts +26 -0
- package/dist/types/dummy/dummy.d.ts.map +1 -0
- package/dist/types/dummy/index.d.ts +2 -0
- package/dist/types/dummy/index.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +3 -0
- package/dist/types/i18n/index.d.ts.map +1 -0
- package/dist/types/i18n/language.d.ts +32 -0
- package/dist/types/i18n/language.d.ts.map +1 -0
- package/dist/types/i18n/translation.d.ts +26 -0
- package/dist/types/i18n/translation.d.ts.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/setting/index.d.ts +3 -0
- package/dist/types/setting/index.d.ts.map +1 -0
- package/dist/types/setting/metadata.d.ts +26 -0
- package/dist/types/setting/metadata.d.ts.map +1 -0
- package/dist/types/setting/setting.d.ts +41 -0
- package/dist/types/setting/setting.d.ts.map +1 -0
- package/dist/types/shared/aliases.d.ts +4 -0
- package/dist/types/shared/aliases.d.ts.map +1 -0
- package/dist/types/shared/base.d.ts +7 -0
- package/dist/types/shared/base.d.ts.map +1 -0
- package/dist/types/shared/object.d.ts +3 -0
- package/dist/types/shared/object.d.ts.map +1 -0
- package/dist/types/shared/preprocess.d.ts +3 -0
- package/dist/types/shared/preprocess.d.ts.map +1 -0
- package/dist/types/shared/profile.d.ts +40 -0
- package/dist/types/shared/profile.d.ts.map +1 -0
- package/dist/types/user/credential.d.ts +97 -0
- package/dist/types/user/credential.d.ts.map +1 -0
- package/dist/types/user/domain.d.ts +54 -0
- package/dist/types/user/domain.d.ts.map +1 -0
- package/dist/types/user/index.d.ts +9 -0
- package/dist/types/user/index.d.ts.map +1 -0
- package/dist/types/user/model.d.ts +142 -0
- package/dist/types/user/model.d.ts.map +1 -0
- package/dist/types/user/permission.d.ts +90 -0
- package/dist/types/user/permission.d.ts.map +1 -0
- package/dist/types/user/role.d.ts +111 -0
- package/dist/types/user/role.d.ts.map +1 -0
- package/dist/types/user/user-profile-assigned.d.ts +181 -0
- package/dist/types/user/user-profile-assigned.d.ts.map +1 -0
- package/dist/types/user/user-profile.d.ts +32 -0
- package/dist/types/user/user-profile.d.ts.map +1 -0
- package/dist/types/user/user.d.ts +270 -0
- package/dist/types/user/user.d.ts.map +1 -0
- package/dist/types/workflow/domain.d.ts +32 -0
- package/dist/types/workflow/domain.d.ts.map +1 -0
- package/dist/types/workflow/helpers.d.ts +117 -0
- package/dist/types/workflow/helpers.d.ts.map +1 -0
- package/dist/types/workflow/index.d.ts +8 -0
- package/dist/types/workflow/index.d.ts.map +1 -0
- package/dist/types/workflow/mcp-server.d.ts +67 -0
- package/dist/types/workflow/mcp-server.d.ts.map +1 -0
- package/dist/types/workflow/memory-definition.d.ts +35 -0
- package/dist/types/workflow/memory-definition.d.ts.map +1 -0
- package/dist/types/workflow/memory-record.d.ts +284 -0
- package/dist/types/workflow/memory-record.d.ts.map +1 -0
- package/dist/types/workflow/workflow-run.d.ts +375 -0
- package/dist/types/workflow/workflow-run.d.ts.map +1 -0
- package/dist/types/workflow/workflow-version.d.ts +179 -0
- package/dist/types/workflow/workflow-version.d.ts.map +1 -0
- package/dist/types/workflow/workflow.d.ts +366 -0
- package/dist/types/workflow/workflow.d.ts.map +1 -0
- package/package.json +59 -0
- package/src/analytics/index.ts +26 -0
- package/src/analytics/integration-health.ts +44 -0
- package/src/analytics/stats.ts +41 -0
- package/src/attachment/attachment.ts +75 -0
- package/src/attachment/index.ts +19 -0
- package/src/audit/audit-log.ts +42 -0
- package/src/audit/index.ts +12 -0
- package/src/channel/channel-metadata.ts +20 -0
- package/src/channel/index.ts +19 -0
- package/src/channel/source-full.ts +25 -0
- package/src/channel/source.ts +42 -0
- package/src/chat/attachment.ts +44 -0
- package/src/chat/button.ts +90 -0
- package/src/chat/index.ts +173 -0
- package/src/chat/label-group.ts +35 -0
- package/src/chat/label.ts +56 -0
- package/src/chat/message-contract.ts +370 -0
- package/src/chat/message.ts +164 -0
- package/src/chat/options.ts +130 -0
- package/src/chat/quick-reply.ts +41 -0
- package/src/chat/subscriber.ts +73 -0
- package/src/chat/thread.ts +55 -0
- package/src/cms/content-type.ts +26 -0
- package/src/cms/content.ts +48 -0
- package/src/cms/index.ts +33 -0
- package/src/cms/menu.ts +54 -0
- package/src/dummy/dummy.ts +30 -0
- package/src/dummy/index.ts +14 -0
- package/src/i18n/index.ts +23 -0
- package/src/i18n/language.ts +28 -0
- package/src/i18n/translation.ts +26 -0
- package/src/index.test.ts +1271 -0
- package/src/index.ts +27 -0
- package/src/setting/index.ts +25 -0
- package/src/setting/metadata.ts +26 -0
- package/src/setting/setting.ts +46 -0
- package/src/shared/aliases.ts +48 -0
- package/src/shared/base.ts +13 -0
- package/src/shared/object.ts +19 -0
- package/src/shared/preprocess.ts +14 -0
- package/src/shared/profile.ts +49 -0
- package/src/user/credential.ts +45 -0
- package/src/user/domain.ts +94 -0
- package/src/user/index.ts +78 -0
- package/src/user/model.ts +40 -0
- package/src/user/permission.ts +51 -0
- package/src/user/role.ts +43 -0
- package/src/user/user-profile-assigned.ts +70 -0
- package/src/user/user-profile.ts +21 -0
- package/src/user/user.ts +87 -0
- package/src/workflow/domain.ts +47 -0
- package/src/workflow/helpers.ts +40 -0
- package/src/workflow/index.ts +70 -0
- package/src/workflow/mcp-server.ts +64 -0
- package/src/workflow/memory-definition.ts +31 -0
- package/src/workflow/memory-record.ts +71 -0
- package/src/workflow/workflow-run.ts +156 -0
- package/src/workflow/workflow-version.ts +68 -0
- package/src/workflow/workflow.ts +163 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.threadFullSchema = exports.threadSchema = exports.threadStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const source_1 = require("../channel/source");
|
|
11
|
+
const aliases_1 = require("../shared/aliases");
|
|
12
|
+
const base_1 = require("../shared/base");
|
|
13
|
+
const preprocess_1 = require("../shared/preprocess");
|
|
14
|
+
const subscriber_1 = require("./subscriber");
|
|
15
|
+
const nullableOptionalDateSchema = zod_1.z.coerce.date().nullable().optional();
|
|
16
|
+
const nullableOptionalStringSchema = zod_1.z.string().nullable().optional();
|
|
17
|
+
const threadAliasMap = {
|
|
18
|
+
subscriberId: "subscriber",
|
|
19
|
+
sourceId: "source",
|
|
20
|
+
};
|
|
21
|
+
const threadStubObjectSchema = base_1.baseStubSchema.extend({
|
|
22
|
+
status: zod_1.z.enum(["open", "closed"]),
|
|
23
|
+
lastMessageAt: nullableOptionalDateSchema,
|
|
24
|
+
closedAt: nullableOptionalDateSchema,
|
|
25
|
+
closeReason: zod_1.z.enum(["manual", "inactivity"]).nullable().optional(),
|
|
26
|
+
title: nullableOptionalStringSchema,
|
|
27
|
+
});
|
|
28
|
+
exports.threadStubSchema = threadStubObjectSchema;
|
|
29
|
+
exports.threadSchema = (0, preprocess_1.preprocess)((value) => (0, aliases_1.withAliases)(value, threadAliasMap), threadStubObjectSchema.extend({
|
|
30
|
+
subscriber: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string()),
|
|
31
|
+
source: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string()),
|
|
32
|
+
}));
|
|
33
|
+
exports.threadFullSchema = threadStubObjectSchema.extend({
|
|
34
|
+
subscriber: subscriber_1.subscriberSchema,
|
|
35
|
+
source: source_1.sourceSchema,
|
|
36
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.contentTypeFullSchema = exports.contentTypeSchema = exports.contentTypeStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("../shared/base");
|
|
11
|
+
const contentTypeObjectSchema = base_1.baseStubSchema.extend({
|
|
12
|
+
name: zod_1.z.string(),
|
|
13
|
+
schema: zod_1.z.any(),
|
|
14
|
+
});
|
|
15
|
+
exports.contentTypeStubSchema = contentTypeObjectSchema;
|
|
16
|
+
exports.contentTypeSchema = contentTypeObjectSchema;
|
|
17
|
+
exports.contentTypeFullSchema = contentTypeObjectSchema;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.contentFullSchema = exports.contentSchema = exports.contentStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const aliases_1 = require("../shared/aliases");
|
|
11
|
+
const base_1 = require("../shared/base");
|
|
12
|
+
const preprocess_1 = require("../shared/preprocess");
|
|
13
|
+
const content_type_1 = require("./content-type");
|
|
14
|
+
const contentAliasMap = {
|
|
15
|
+
contentTypeId: "contentType",
|
|
16
|
+
};
|
|
17
|
+
const contentStubObjectSchema = base_1.baseStubSchema.extend({
|
|
18
|
+
title: zod_1.z.string(),
|
|
19
|
+
status: zod_1.z.coerce.boolean(),
|
|
20
|
+
properties: (0, preprocess_1.preprocess)((value) => (value == null ? null : value), zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).nullable()),
|
|
21
|
+
searchText: zod_1.z.string(),
|
|
22
|
+
});
|
|
23
|
+
exports.contentStubSchema = contentStubObjectSchema;
|
|
24
|
+
exports.contentSchema = (0, preprocess_1.preprocess)((value) => (0, aliases_1.withAliases)(value, contentAliasMap), contentStubObjectSchema.extend({
|
|
25
|
+
contentType: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string()),
|
|
26
|
+
}));
|
|
27
|
+
exports.contentFullSchema = contentStubObjectSchema.extend({
|
|
28
|
+
contentType: content_type_1.contentTypeSchema,
|
|
29
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.menuStubSchema = exports.menuSchema = exports.menuFullSchema = exports.MenuType = exports.contentStubSchema = exports.contentSchema = exports.contentFullSchema = exports.contentTypeStubSchema = exports.contentTypeSchema = exports.contentTypeFullSchema = void 0;
|
|
9
|
+
var content_type_1 = require("./content-type");
|
|
10
|
+
Object.defineProperty(exports, "contentTypeFullSchema", { enumerable: true, get: function () { return content_type_1.contentTypeFullSchema; } });
|
|
11
|
+
Object.defineProperty(exports, "contentTypeSchema", { enumerable: true, get: function () { return content_type_1.contentTypeSchema; } });
|
|
12
|
+
Object.defineProperty(exports, "contentTypeStubSchema", { enumerable: true, get: function () { return content_type_1.contentTypeStubSchema; } });
|
|
13
|
+
var content_1 = require("./content");
|
|
14
|
+
Object.defineProperty(exports, "contentFullSchema", { enumerable: true, get: function () { return content_1.contentFullSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "contentSchema", { enumerable: true, get: function () { return content_1.contentSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "contentStubSchema", { enumerable: true, get: function () { return content_1.contentStubSchema; } });
|
|
17
|
+
var menu_1 = require("./menu");
|
|
18
|
+
Object.defineProperty(exports, "MenuType", { enumerable: true, get: function () { return menu_1.MenuType; } });
|
|
19
|
+
Object.defineProperty(exports, "menuFullSchema", { enumerable: true, get: function () { return menu_1.menuFullSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "menuSchema", { enumerable: true, get: function () { return menu_1.menuSchema; } });
|
|
21
|
+
Object.defineProperty(exports, "menuStubSchema", { enumerable: true, get: function () { return menu_1.menuStubSchema; } });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.menuFullSchema = exports.menuSchema = exports.menuStubSchema = exports.MenuType = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const aliases_1 = require("../shared/aliases");
|
|
11
|
+
const base_1 = require("../shared/base");
|
|
12
|
+
const preprocess_1 = require("../shared/preprocess");
|
|
13
|
+
var MenuType;
|
|
14
|
+
(function (MenuType) {
|
|
15
|
+
MenuType["web_url"] = "web_url";
|
|
16
|
+
MenuType["postback"] = "postback";
|
|
17
|
+
MenuType["nested"] = "nested";
|
|
18
|
+
})(MenuType || (exports.MenuType = MenuType = {}));
|
|
19
|
+
const menuTypeSchema = zod_1.z.enum(MenuType);
|
|
20
|
+
const menuAliasMap = {
|
|
21
|
+
parentId: "parent",
|
|
22
|
+
};
|
|
23
|
+
const menuStubObjectSchema = base_1.baseStubSchema.extend({
|
|
24
|
+
title: zod_1.z.string(),
|
|
25
|
+
type: menuTypeSchema,
|
|
26
|
+
payload: zod_1.z.string().nullable().optional(),
|
|
27
|
+
url: zod_1.z.string().nullable().optional(),
|
|
28
|
+
});
|
|
29
|
+
exports.menuStubSchema = menuStubObjectSchema;
|
|
30
|
+
exports.menuSchema = (0, preprocess_1.preprocess)((value) => (0, aliases_1.withAliases)(value, menuAliasMap), menuStubObjectSchema.extend({
|
|
31
|
+
parent: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string().nullable()).optional(),
|
|
32
|
+
}));
|
|
33
|
+
exports.menuFullSchema = menuStubObjectSchema.extend({
|
|
34
|
+
parent: exports.menuSchema.nullable().optional(),
|
|
35
|
+
children: (0, preprocess_1.preprocess)((value) => (Array.isArray(value) ? value : []), zod_1.z.array(exports.menuSchema)).optional(),
|
|
36
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.dummyFullSchema = exports.dummySchema = exports.dummyStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("../shared/base");
|
|
11
|
+
const preprocess_1 = require("../shared/preprocess");
|
|
12
|
+
const dummyObjectSchema = base_1.baseStubSchema.extend({
|
|
13
|
+
dummy: zod_1.z.string(),
|
|
14
|
+
dynamicField: (0, preprocess_1.preprocess)((value) => (value == null ? undefined : value), zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional()).optional(),
|
|
15
|
+
});
|
|
16
|
+
exports.dummyStubSchema = dummyObjectSchema;
|
|
17
|
+
exports.dummySchema = dummyObjectSchema;
|
|
18
|
+
exports.dummyFullSchema = dummyObjectSchema;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.dummyStubSchema = exports.dummySchema = exports.dummyFullSchema = void 0;
|
|
9
|
+
var dummy_1 = require("./dummy");
|
|
10
|
+
Object.defineProperty(exports, "dummyFullSchema", { enumerable: true, get: function () { return dummy_1.dummyFullSchema; } });
|
|
11
|
+
Object.defineProperty(exports, "dummySchema", { enumerable: true, get: function () { return dummy_1.dummySchema; } });
|
|
12
|
+
Object.defineProperty(exports, "dummyStubSchema", { enumerable: true, get: function () { return dummy_1.dummyStubSchema; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.translationStubSchema = exports.translationSchema = exports.translationFullSchema = exports.languageStubSchema = exports.languageSchema = exports.languageFullSchema = void 0;
|
|
9
|
+
var language_1 = require("./language");
|
|
10
|
+
Object.defineProperty(exports, "languageFullSchema", { enumerable: true, get: function () { return language_1.languageFullSchema; } });
|
|
11
|
+
Object.defineProperty(exports, "languageSchema", { enumerable: true, get: function () { return language_1.languageSchema; } });
|
|
12
|
+
Object.defineProperty(exports, "languageStubSchema", { enumerable: true, get: function () { return language_1.languageStubSchema; } });
|
|
13
|
+
var translation_1 = require("./translation");
|
|
14
|
+
Object.defineProperty(exports, "translationFullSchema", { enumerable: true, get: function () { return translation_1.translationFullSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "translationSchema", { enumerable: true, get: function () { return translation_1.translationSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "translationStubSchema", { enumerable: true, get: function () { return translation_1.translationStubSchema; } });
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.languageFullSchema = exports.languageSchema = exports.languageStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("../shared/base");
|
|
11
|
+
const languageObjectSchema = base_1.baseStubSchema.extend({
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
code: zod_1.z.string(),
|
|
14
|
+
isDefault: zod_1.z.coerce.boolean(),
|
|
15
|
+
isRTL: zod_1.z.coerce.boolean(),
|
|
16
|
+
});
|
|
17
|
+
exports.languageStubSchema = languageObjectSchema;
|
|
18
|
+
exports.languageSchema = languageObjectSchema;
|
|
19
|
+
exports.languageFullSchema = languageObjectSchema;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.translationFullSchema = exports.translationSchema = exports.translationStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("../shared/base");
|
|
11
|
+
const translationObjectSchema = base_1.baseStubSchema.extend({
|
|
12
|
+
str: zod_1.z.string(),
|
|
13
|
+
translations: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
|
14
|
+
});
|
|
15
|
+
exports.translationStubSchema = translationObjectSchema;
|
|
16
|
+
exports.translationSchema = translationObjectSchema;
|
|
17
|
+
exports.translationFullSchema = translationObjectSchema;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./attachment"), exports);
|
|
23
|
+
__exportStar(require("./analytics"), exports);
|
|
24
|
+
__exportStar(require("./audit"), exports);
|
|
25
|
+
__exportStar(require("./channel"), exports);
|
|
26
|
+
__exportStar(require("./chat"), exports);
|
|
27
|
+
__exportStar(require("./cms"), exports);
|
|
28
|
+
__exportStar(require("./i18n"), exports);
|
|
29
|
+
__exportStar(require("./setting"), exports);
|
|
30
|
+
__exportStar(require("./user"), exports);
|
|
31
|
+
__exportStar(require("./workflow"), exports);
|
|
32
|
+
__exportStar(require("./dummy"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.metadataStubSchema = exports.metadataSchema = exports.metadataFullSchema = exports.settingValueSchema = exports.settingStubSchema = exports.settingSchema = exports.settingFullSchema = exports.FieldType = void 0;
|
|
9
|
+
var setting_1 = require("./setting");
|
|
10
|
+
Object.defineProperty(exports, "FieldType", { enumerable: true, get: function () { return setting_1.FieldType; } });
|
|
11
|
+
Object.defineProperty(exports, "settingFullSchema", { enumerable: true, get: function () { return setting_1.settingFullSchema; } });
|
|
12
|
+
Object.defineProperty(exports, "settingSchema", { enumerable: true, get: function () { return setting_1.settingSchema; } });
|
|
13
|
+
Object.defineProperty(exports, "settingStubSchema", { enumerable: true, get: function () { return setting_1.settingStubSchema; } });
|
|
14
|
+
Object.defineProperty(exports, "settingValueSchema", { enumerable: true, get: function () { return setting_1.settingValueSchema; } });
|
|
15
|
+
var metadata_1 = require("./metadata");
|
|
16
|
+
Object.defineProperty(exports, "metadataFullSchema", { enumerable: true, get: function () { return metadata_1.metadataFullSchema; } });
|
|
17
|
+
Object.defineProperty(exports, "metadataSchema", { enumerable: true, get: function () { return metadata_1.metadataSchema; } });
|
|
18
|
+
Object.defineProperty(exports, "metadataStubSchema", { enumerable: true, get: function () { return metadata_1.metadataStubSchema; } });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.metadataFullSchema = exports.metadataSchema = exports.metadataStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("../shared/base");
|
|
11
|
+
const metadataObjectSchema = base_1.baseStubSchema.extend({
|
|
12
|
+
name: zod_1.z.string(),
|
|
13
|
+
value: zod_1.z.any(),
|
|
14
|
+
});
|
|
15
|
+
exports.metadataStubSchema = metadataObjectSchema;
|
|
16
|
+
exports.metadataSchema = metadataObjectSchema;
|
|
17
|
+
exports.metadataFullSchema = metadataObjectSchema;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.FieldType = exports.settingFullSchema = exports.settingSchema = exports.settingStubSchema = exports.settingValueSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("../shared/base");
|
|
11
|
+
exports.settingValueSchema = zod_1.z.union([
|
|
12
|
+
zod_1.z.null(),
|
|
13
|
+
zod_1.z.string(),
|
|
14
|
+
zod_1.z.number(),
|
|
15
|
+
zod_1.z.boolean(),
|
|
16
|
+
zod_1.z.array(zod_1.z.string()),
|
|
17
|
+
zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
18
|
+
]);
|
|
19
|
+
const settingObjectSchema = base_1.baseStubSchema.extend({
|
|
20
|
+
group: zod_1.z.string(),
|
|
21
|
+
subgroup: zod_1.z.string().nullable().optional(),
|
|
22
|
+
label: zod_1.z.string(),
|
|
23
|
+
value: exports.settingValueSchema,
|
|
24
|
+
});
|
|
25
|
+
exports.settingStubSchema = settingObjectSchema;
|
|
26
|
+
exports.settingSchema = settingObjectSchema;
|
|
27
|
+
exports.settingFullSchema = settingObjectSchema;
|
|
28
|
+
var FieldType;
|
|
29
|
+
(function (FieldType) {
|
|
30
|
+
FieldType["text"] = "text";
|
|
31
|
+
FieldType["url"] = "url";
|
|
32
|
+
FieldType["textarea"] = "textarea";
|
|
33
|
+
FieldType["checkbox"] = "checkbox";
|
|
34
|
+
FieldType["file"] = "file";
|
|
35
|
+
FieldType["html"] = "html";
|
|
36
|
+
})(FieldType || (exports.FieldType = FieldType = {}));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.asIdArray = exports.asId = exports.withAliases = void 0;
|
|
9
|
+
const object_1 = require("./object");
|
|
10
|
+
const withAliases = (value, aliases) => {
|
|
11
|
+
const record = (0, object_1.toRecord)(value);
|
|
12
|
+
if (!record) {
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
const next = (0, object_1.cloneWithPrototype)(record);
|
|
16
|
+
for (const [from, to] of Object.entries(aliases)) {
|
|
17
|
+
if (next[to] === undefined && next[from] !== undefined) {
|
|
18
|
+
next[to] = next[from];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return next;
|
|
22
|
+
};
|
|
23
|
+
exports.withAliases = withAliases;
|
|
24
|
+
const asId = (value) => {
|
|
25
|
+
if (value == null || typeof value === "string") {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
const record = (0, object_1.toRecord)(value);
|
|
29
|
+
if (!record) {
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
return typeof record.id === "string" ? record.id : value;
|
|
33
|
+
};
|
|
34
|
+
exports.asId = asId;
|
|
35
|
+
const asIdArray = (value) => {
|
|
36
|
+
if (!Array.isArray(value)) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return value.map((entry) => (0, exports.asId)(entry));
|
|
40
|
+
};
|
|
41
|
+
exports.asIdArray = asIdArray;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.baseStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
exports.baseStubSchema = zod_1.z.object({
|
|
11
|
+
id: zod_1.z.string(),
|
|
12
|
+
createdAt: zod_1.z.coerce.date(),
|
|
13
|
+
updatedAt: zod_1.z.coerce.date(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.cloneWithPrototype = exports.toRecord = void 0;
|
|
9
|
+
const toRecord = (value) => {
|
|
10
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
exports.toRecord = toRecord;
|
|
16
|
+
const cloneWithPrototype = (value) => {
|
|
17
|
+
return Object.assign(Object.create(Object.getPrototypeOf(value)), value);
|
|
18
|
+
};
|
|
19
|
+
exports.cloneWithPrototype = cloneWithPrototype;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.preprocess = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const preprocess = (transformer, schema) => {
|
|
11
|
+
return zod_1.z.preprocess(transformer, schema);
|
|
12
|
+
};
|
|
13
|
+
exports.preprocess = preprocess;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.subscriberBaseSchema = exports.subscriberChannelSchema = exports.userProfileBaseSchema = exports.nullableDateSchema = exports.nullableStringSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("./base");
|
|
11
|
+
const preprocess_1 = require("./preprocess");
|
|
12
|
+
exports.nullableStringSchema = (0, preprocess_1.preprocess)((value) => (value == null ? null : value), zod_1.z.string().nullable());
|
|
13
|
+
exports.nullableDateSchema = (0, preprocess_1.preprocess)((value) => (value == null ? null : value), zod_1.z.coerce.date().nullable());
|
|
14
|
+
exports.userProfileBaseSchema = base_1.baseStubSchema.extend({
|
|
15
|
+
firstName: zod_1.z.string(),
|
|
16
|
+
lastName: zod_1.z.string(),
|
|
17
|
+
language: exports.nullableStringSchema,
|
|
18
|
+
timezone: zod_1.z.coerce.number().default(0),
|
|
19
|
+
});
|
|
20
|
+
exports.subscriberChannelSchema = zod_1.z.object({
|
|
21
|
+
name: exports.nullableStringSchema,
|
|
22
|
+
data: (0, preprocess_1.preprocess)((value) => (value == null ? null : value), zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable()).optional(),
|
|
23
|
+
});
|
|
24
|
+
exports.subscriberBaseSchema = exports.userProfileBaseSchema.extend({
|
|
25
|
+
locale: exports.nullableStringSchema,
|
|
26
|
+
gender: exports.nullableStringSchema,
|
|
27
|
+
country: exports.nullableStringSchema,
|
|
28
|
+
foreignId: exports.nullableStringSchema,
|
|
29
|
+
assignedAt: exports.nullableDateSchema,
|
|
30
|
+
lastvisit: exports.nullableDateSchema,
|
|
31
|
+
retainedFrom: exports.nullableDateSchema,
|
|
32
|
+
channel: (0, preprocess_1.preprocess)((value) => value ?? { name: null, data: null }, exports.subscriberChannelSchema),
|
|
33
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.credentialFullSchema = exports.credentialSchema = exports.credentialStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const aliases_1 = require("../shared/aliases");
|
|
11
|
+
const base_1 = require("../shared/base");
|
|
12
|
+
const preprocess_1 = require("../shared/preprocess");
|
|
13
|
+
const user_1 = require("./user");
|
|
14
|
+
const credentialAliasMap = {
|
|
15
|
+
ownerId: "owner",
|
|
16
|
+
};
|
|
17
|
+
const credentialStubObjectSchema = base_1.baseStubSchema.extend({
|
|
18
|
+
name: zod_1.z.string(),
|
|
19
|
+
});
|
|
20
|
+
exports.credentialStubSchema = credentialStubObjectSchema;
|
|
21
|
+
exports.credentialSchema = (0, preprocess_1.preprocess)((value) => (0, aliases_1.withAliases)(value, credentialAliasMap), credentialStubObjectSchema.extend({
|
|
22
|
+
owner: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string()),
|
|
23
|
+
}));
|
|
24
|
+
exports.credentialFullSchema = credentialStubObjectSchema.extend({
|
|
25
|
+
owner: (0, preprocess_1.preprocess)((value) => (value == null ? null : value), zod_1.z.lazy(() => user_1.userSchema).nullable()),
|
|
26
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.modelIdentitySchema = exports.relationSchema = exports.MethodToAction = exports.Action = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
var Action;
|
|
11
|
+
(function (Action) {
|
|
12
|
+
Action["CREATE"] = "create";
|
|
13
|
+
Action["READ"] = "read";
|
|
14
|
+
Action["UPDATE"] = "update";
|
|
15
|
+
Action["DELETE"] = "delete";
|
|
16
|
+
})(Action || (exports.Action = Action = {}));
|
|
17
|
+
var MethodToAction;
|
|
18
|
+
(function (MethodToAction) {
|
|
19
|
+
MethodToAction["POST"] = "create";
|
|
20
|
+
MethodToAction["GET"] = "read";
|
|
21
|
+
MethodToAction["PATCH"] = "update";
|
|
22
|
+
MethodToAction["DELETE"] = "delete";
|
|
23
|
+
})(MethodToAction || (exports.MethodToAction = MethodToAction = {}));
|
|
24
|
+
exports.relationSchema = zod_1.z.enum(["role", "createdBy"]);
|
|
25
|
+
exports.modelIdentitySchema = zod_1.z.enum([
|
|
26
|
+
"contenttype",
|
|
27
|
+
"content",
|
|
28
|
+
"nlpentity",
|
|
29
|
+
"nlpsampleentity",
|
|
30
|
+
"nlpsample",
|
|
31
|
+
"nlpvalue",
|
|
32
|
+
"setting",
|
|
33
|
+
"attachment",
|
|
34
|
+
"auditlog",
|
|
35
|
+
"user",
|
|
36
|
+
"role",
|
|
37
|
+
"permission",
|
|
38
|
+
"label",
|
|
39
|
+
"labelgroup",
|
|
40
|
+
"message",
|
|
41
|
+
"thread",
|
|
42
|
+
"subscriber",
|
|
43
|
+
"source",
|
|
44
|
+
"language",
|
|
45
|
+
"translation",
|
|
46
|
+
"stats",
|
|
47
|
+
"menu",
|
|
48
|
+
"workflow",
|
|
49
|
+
"workflowversion",
|
|
50
|
+
"workflowrun",
|
|
51
|
+
"memorydefinition",
|
|
52
|
+
"memoryrecord",
|
|
53
|
+
"mcpserver",
|
|
54
|
+
"model",
|
|
55
|
+
"credential",
|
|
56
|
+
]);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.credentialStubSchema = exports.credentialSchema = exports.credentialFullSchema = exports.permissionStubSchema = exports.permissionSchema = exports.permissionFullSchema = exports.modelStubSchema = exports.modelSchema = exports.modelFullSchema = exports.roleStubSchema = exports.roleSchema = exports.roleFullSchema = exports.userStubSchema = exports.userSchema = exports.userFullSchema = exports.userProfileAssignedStubSchema = exports.userProfileAssignedSchema = exports.userProfileAssignedFullSchema = exports.userProfileStubSchema = exports.userProfileSchema = exports.userProfileFullSchema = exports.MethodToAction = exports.Action = void 0;
|
|
9
|
+
var domain_1 = require("./domain");
|
|
10
|
+
Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return domain_1.Action; } });
|
|
11
|
+
Object.defineProperty(exports, "MethodToAction", { enumerable: true, get: function () { return domain_1.MethodToAction; } });
|
|
12
|
+
var user_profile_1 = require("./user-profile");
|
|
13
|
+
Object.defineProperty(exports, "userProfileFullSchema", { enumerable: true, get: function () { return user_profile_1.userProfileFullSchema; } });
|
|
14
|
+
Object.defineProperty(exports, "userProfileSchema", { enumerable: true, get: function () { return user_profile_1.userProfileSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "userProfileStubSchema", { enumerable: true, get: function () { return user_profile_1.userProfileStubSchema; } });
|
|
16
|
+
var user_profile_assigned_1 = require("./user-profile-assigned");
|
|
17
|
+
Object.defineProperty(exports, "userProfileAssignedFullSchema", { enumerable: true, get: function () { return user_profile_assigned_1.userProfileAssignedFullSchema; } });
|
|
18
|
+
Object.defineProperty(exports, "userProfileAssignedSchema", { enumerable: true, get: function () { return user_profile_assigned_1.userProfileAssignedSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "userProfileAssignedStubSchema", { enumerable: true, get: function () { return user_profile_assigned_1.userProfileAssignedStubSchema; } });
|
|
20
|
+
var user_1 = require("./user");
|
|
21
|
+
Object.defineProperty(exports, "userFullSchema", { enumerable: true, get: function () { return user_1.userFullSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "userSchema", { enumerable: true, get: function () { return user_1.userSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "userStubSchema", { enumerable: true, get: function () { return user_1.userStubSchema; } });
|
|
24
|
+
var role_1 = require("./role");
|
|
25
|
+
Object.defineProperty(exports, "roleFullSchema", { enumerable: true, get: function () { return role_1.roleFullSchema; } });
|
|
26
|
+
Object.defineProperty(exports, "roleSchema", { enumerable: true, get: function () { return role_1.roleSchema; } });
|
|
27
|
+
Object.defineProperty(exports, "roleStubSchema", { enumerable: true, get: function () { return role_1.roleStubSchema; } });
|
|
28
|
+
var model_1 = require("./model");
|
|
29
|
+
Object.defineProperty(exports, "modelFullSchema", { enumerable: true, get: function () { return model_1.modelFullSchema; } });
|
|
30
|
+
Object.defineProperty(exports, "modelSchema", { enumerable: true, get: function () { return model_1.modelSchema; } });
|
|
31
|
+
Object.defineProperty(exports, "modelStubSchema", { enumerable: true, get: function () { return model_1.modelStubSchema; } });
|
|
32
|
+
var permission_1 = require("./permission");
|
|
33
|
+
Object.defineProperty(exports, "permissionFullSchema", { enumerable: true, get: function () { return permission_1.permissionFullSchema; } });
|
|
34
|
+
Object.defineProperty(exports, "permissionSchema", { enumerable: true, get: function () { return permission_1.permissionSchema; } });
|
|
35
|
+
Object.defineProperty(exports, "permissionStubSchema", { enumerable: true, get: function () { return permission_1.permissionStubSchema; } });
|
|
36
|
+
var credential_1 = require("./credential");
|
|
37
|
+
Object.defineProperty(exports, "credentialFullSchema", { enumerable: true, get: function () { return credential_1.credentialFullSchema; } });
|
|
38
|
+
Object.defineProperty(exports, "credentialSchema", { enumerable: true, get: function () { return credential_1.credentialSchema; } });
|
|
39
|
+
Object.defineProperty(exports, "credentialStubSchema", { enumerable: true, get: function () { return credential_1.credentialStubSchema; } });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
4
|
+
* Copyright (c) 2026 Hexastack.
|
|
5
|
+
* Full terms: see LICENSE.md.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.modelFullSchema = exports.modelSchema = exports.modelStubSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const base_1 = require("../shared/base");
|
|
11
|
+
const preprocess_1 = require("../shared/preprocess");
|
|
12
|
+
const domain_1 = require("./domain");
|
|
13
|
+
const permission_1 = require("./permission");
|
|
14
|
+
const modelStubObjectSchema = base_1.baseStubSchema.extend({
|
|
15
|
+
name: zod_1.z.string(),
|
|
16
|
+
identity: domain_1.modelIdentitySchema,
|
|
17
|
+
attributes: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
18
|
+
relation: (0, preprocess_1.preprocess)((value) => (value == null ? undefined : value), domain_1.relationSchema.optional()).optional(),
|
|
19
|
+
});
|
|
20
|
+
exports.modelStubSchema = modelStubObjectSchema;
|
|
21
|
+
exports.modelSchema = modelStubObjectSchema;
|
|
22
|
+
exports.modelFullSchema = modelStubObjectSchema.extend({
|
|
23
|
+
permissions: (0, preprocess_1.preprocess)((value) => (Array.isArray(value) ? value : []), zod_1.z.array(zod_1.z.lazy(() => permission_1.permissionSchema))).optional(),
|
|
24
|
+
});
|