@hexclave/shared 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/llms/llms.d.ts +17 -0
- package/dist/ai/llms/llms.d.ts.map +1 -0
- package/dist/ai/llms/llms.js +36 -0
- package/dist/ai/llms/llms.js.map +1 -0
- package/dist/ai/unified-prompts/reminders.js +2 -2
- package/dist/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +7 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +6 -5
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +172 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +280 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt.d.ts +2 -1
- package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt.js +36 -32
- package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -1
- package/dist/config/schema-fuzzer.test.js +1 -0
- package/dist/config/schema-fuzzer.test.js.map +1 -1
- package/dist/config/schema.d.ts +192 -188
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +6 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/config-authoring.d.ts +5 -1
- package/dist/config-authoring.d.ts.map +1 -1
- package/dist/config-authoring.js +5 -0
- package/dist/config-authoring.js.map +1 -1
- package/dist/config-rendering.d.ts +6 -6
- package/dist/config-rendering.d.ts.map +1 -1
- package/dist/config-rendering.js +25 -17
- package/dist/config-rendering.js.map +1 -1
- package/dist/esm/ai/llms/llms.d.ts +17 -0
- package/dist/esm/ai/llms/llms.d.ts.map +1 -0
- package/dist/esm/ai/llms/llms.js +30 -0
- package/dist/esm/ai/llms/llms.js.map +1 -0
- package/dist/esm/ai/unified-prompts/reminders.js +2 -2
- package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +7 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +4 -4
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +173 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +279 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts +2 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js +36 -33
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -1
- package/dist/esm/config/schema-fuzzer.test.js +1 -0
- package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
- package/dist/esm/config/schema.d.ts +192 -188
- package/dist/esm/config/schema.d.ts.map +1 -1
- package/dist/esm/config/schema.js +6 -0
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/config-authoring.d.ts +5 -1
- package/dist/esm/config-authoring.d.ts.map +1 -1
- package/dist/esm/config-authoring.js +5 -1
- package/dist/esm/config-authoring.js.map +1 -1
- package/dist/esm/config-rendering.d.ts +6 -6
- package/dist/esm/config-rendering.d.ts.map +1 -1
- package/dist/esm/config-rendering.js +25 -17
- package/dist/esm/config-rendering.js.map +1 -1
- package/dist/esm/interface/admin-interface.js +1 -1
- package/dist/esm/interface/admin-metrics.d.ts +8 -8
- package/dist/esm/interface/client-interface.js +1 -1
- package/dist/esm/interface/conversations.d.ts +11 -11
- package/dist/esm/interface/crud/current-user.d.ts +9 -9
- package/dist/esm/interface/crud/email-outbox.d.ts +184 -184
- package/dist/esm/interface/crud/products.d.ts +15 -15
- package/dist/esm/interface/crud/products.d.ts.map +1 -1
- package/dist/esm/interface/crud/project-api-keys.d.ts +2 -2
- package/dist/esm/interface/crud/projects.d.ts +28 -28
- package/dist/esm/interface/crud/team-member-profiles.d.ts +20 -20
- package/dist/esm/interface/crud/transactions.d.ts +21 -21
- package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
- package/dist/esm/interface/crud/users.d.ts +14 -14
- package/dist/esm/interface/server-interface.js +1 -1
- package/dist/esm/interface/webhooks.d.ts +2 -2
- package/dist/esm/known-errors.d.ts +5 -5
- package/dist/esm/schema-fields.d.ts +7 -6
- package/dist/esm/schema-fields.d.ts.map +1 -1
- package/dist/esm/schema-fields.js +5 -1
- package/dist/esm/schema-fields.js.map +1 -1
- package/dist/esm/sessions.d.ts +7 -7
- package/dist/esm/stack-config-file.js.map +1 -1
- package/dist/esm/utils/cloud-hosts.d.ts +42 -0
- package/dist/esm/utils/cloud-hosts.d.ts.map +1 -0
- package/dist/esm/utils/cloud-hosts.js +92 -0
- package/dist/esm/utils/cloud-hosts.js.map +1 -0
- package/dist/esm/utils/errors.d.ts +9 -2
- package/dist/esm/utils/errors.d.ts.map +1 -1
- package/dist/esm/utils/errors.js +16 -5
- package/dist/esm/utils/errors.js.map +1 -1
- package/dist/esm/utils/promises.js +1 -1
- package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
- package/dist/esm/utils/redirect-urls.js +3 -3
- package/dist/esm/utils/redirect-urls.js.map +1 -1
- package/dist/esm/utils/urls.d.ts.map +1 -1
- package/dist/esm/utils/urls.js +2 -2
- package/dist/esm/utils/urls.js.map +1 -1
- package/dist/{index-D9ysacya.d.ts → index-fQbeILq7.d.ts} +1 -1
- package/dist/{index-D9ysacya.d.ts.map → index-fQbeILq7.d.ts.map} +1 -1
- package/dist/interface/admin-interface.js +1 -1
- package/dist/interface/admin-metrics.d.ts +8 -8
- package/dist/interface/client-interface.d.ts +1 -1
- package/dist/interface/client-interface.js +1 -1
- package/dist/interface/conversations.d.ts +11 -11
- package/dist/interface/crud/current-user.d.ts +9 -9
- package/dist/interface/crud/email-outbox.d.ts +184 -184
- package/dist/interface/crud/products.d.ts +15 -15
- package/dist/interface/crud/products.d.ts.map +1 -1
- package/dist/interface/crud/project-api-keys.d.ts +2 -2
- package/dist/interface/crud/projects.d.ts +28 -28
- package/dist/interface/crud/team-member-profiles.d.ts +20 -20
- package/dist/interface/crud/transactions.d.ts +21 -21
- package/dist/interface/crud/transactions.d.ts.map +1 -1
- package/dist/interface/crud/users.d.ts +14 -14
- package/dist/interface/server-interface.js +1 -1
- package/dist/interface/webhooks.d.ts +2 -2
- package/dist/known-errors.d.ts +5 -5
- package/dist/schema-fields.d.ts +7 -6
- package/dist/schema-fields.d.ts.map +1 -1
- package/dist/schema-fields.js +5 -0
- package/dist/schema-fields.js.map +1 -1
- package/dist/sessions.d.ts +7 -7
- package/dist/stack-config-file.js.map +1 -1
- package/dist/utils/cloud-hosts.d.ts +42 -0
- package/dist/utils/cloud-hosts.d.ts.map +1 -0
- package/dist/utils/cloud-hosts.js +97 -0
- package/dist/utils/cloud-hosts.js.map +1 -0
- package/dist/utils/errors.d.ts +9 -2
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +16 -4
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/passkey.d.ts +1 -1
- package/dist/utils/promises.js +1 -1
- package/dist/utils/redirect-urls.d.ts.map +1 -1
- package/dist/utils/redirect-urls.js +3 -3
- package/dist/utils/redirect-urls.js.map +1 -1
- package/dist/utils/urls.d.ts.map +1 -1
- package/dist/utils/urls.js +2 -2
- package/dist/utils/urls.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,16 +2,16 @@ import { parseStackConfigFileContent, renderConfigFileContent } from "./stack-co
|
|
|
2
2
|
|
|
3
3
|
//#region src/config-rendering.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Given a list of dependency names (from package.json), returns the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Given a list of dependency names (from package.json), returns the SDK
|
|
6
|
+
* package that should be used for the `StackConfig` import, or `undefined`
|
|
7
|
+
* if none of the known packages are installed.
|
|
8
8
|
*/
|
|
9
|
-
declare function
|
|
9
|
+
declare function detectConfigImportPackage(dependencies: string[]): string | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* Walks up from `dir` to find the nearest `package.json` and returns the
|
|
12
|
-
* best
|
|
12
|
+
* best SDK package to use for the `StackConfig` type import.
|
|
13
13
|
*/
|
|
14
14
|
declare function detectImportPackageFromDir(dir: string): string | undefined;
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { detectConfigImportPackage, detectImportPackageFromDir, parseStackConfigFileContent, renderConfigFileContent };
|
|
17
17
|
//# sourceMappingURL=config-rendering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-rendering.d.ts","names":[],"sources":["../../src/config-rendering.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"config-rendering.d.ts","names":[],"sources":["../../src/config-rendering.ts"],"mappings":";;;;AA2BA;;;;iBAAgB,yBAAA,CAA0B,YAAA;AAa1C;;;;AAAA,iBAAgB,0BAAA,CAA2B,GAAA"}
|
|
@@ -5,25 +5,31 @@ import { parseStackConfigFileContent, renderConfigFileContent } from "./stack-co
|
|
|
5
5
|
//#region src/config-rendering.ts
|
|
6
6
|
/**
|
|
7
7
|
* Packages that export the `StackConfig` type, in priority order.
|
|
8
|
-
* The first match found in a project's dependencies wins.
|
|
8
|
+
* The first match found in a project's dependencies wins. Hexclave-branded
|
|
9
|
+
* packages come first (canonical); the legacy `@stackframe/*` names remain
|
|
10
|
+
* so projects pinned to the last legacy release still render a config file
|
|
11
|
+
* that compiles against their installed SDK.
|
|
9
12
|
*/
|
|
10
|
-
const
|
|
13
|
+
const CONFIG_IMPORT_PACKAGES = [
|
|
11
14
|
"@hexclave/next",
|
|
12
15
|
"@hexclave/react",
|
|
13
16
|
"@hexclave/js",
|
|
17
|
+
"@stackframe/stack",
|
|
18
|
+
"@stackframe/react",
|
|
19
|
+
"@stackframe/js",
|
|
14
20
|
"@stackframe/template"
|
|
15
21
|
];
|
|
16
22
|
/**
|
|
17
|
-
* Given a list of dependency names (from package.json), returns the
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* Given a list of dependency names (from package.json), returns the SDK
|
|
24
|
+
* package that should be used for the `StackConfig` import, or `undefined`
|
|
25
|
+
* if none of the known packages are installed.
|
|
20
26
|
*/
|
|
21
|
-
function
|
|
22
|
-
for (const pkg of
|
|
27
|
+
function detectConfigImportPackage(dependencies) {
|
|
28
|
+
for (const pkg of CONFIG_IMPORT_PACKAGES) if (dependencies.includes(pkg)) return pkg;
|
|
23
29
|
}
|
|
24
30
|
/**
|
|
25
31
|
* Walks up from `dir` to find the nearest `package.json` and returns the
|
|
26
|
-
* best
|
|
32
|
+
* best SDK package to use for the `StackConfig` type import.
|
|
27
33
|
*/
|
|
28
34
|
function detectImportPackageFromDir(dir) {
|
|
29
35
|
let current = dir;
|
|
@@ -31,7 +37,7 @@ function detectImportPackageFromDir(dir) {
|
|
|
31
37
|
const pkgPath = path.join(current, "package.json");
|
|
32
38
|
if (existsSync(pkgPath)) try {
|
|
33
39
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
34
|
-
return
|
|
40
|
+
return detectConfigImportPackage([...Object.keys(pkg.dependencies ?? {}), ...Object.keys(pkg.devDependencies ?? {})]);
|
|
35
41
|
} catch {
|
|
36
42
|
return;
|
|
37
43
|
}
|
|
@@ -94,15 +100,17 @@ function detectImportPackageFromDir(dir) {
|
|
|
94
100
|
(void 0)?.test("renderConfigFileContent defaults to @hexclave/js", ({ expect }) => {
|
|
95
101
|
expect(renderConfigFileContent({})).toContain("import type { StackConfig } from \"@hexclave/js\";");
|
|
96
102
|
});
|
|
97
|
-
(void 0)?.test("
|
|
98
|
-
expect(
|
|
99
|
-
expect(
|
|
100
|
-
expect(
|
|
101
|
-
expect(
|
|
102
|
-
expect(
|
|
103
|
-
expect(
|
|
103
|
+
(void 0)?.test("detectConfigImportPackage picks first matching package by priority", ({ expect }) => {
|
|
104
|
+
expect(detectConfigImportPackage(["@hexclave/next", "@hexclave/js"])).toBe("@hexclave/next");
|
|
105
|
+
expect(detectConfigImportPackage(["@hexclave/react", "@hexclave/js"])).toBe("@hexclave/react");
|
|
106
|
+
expect(detectConfigImportPackage(["@hexclave/js"])).toBe("@hexclave/js");
|
|
107
|
+
expect(detectConfigImportPackage(["@stackframe/stack", "@hexclave/next"])).toBe("@hexclave/next");
|
|
108
|
+
expect(detectConfigImportPackage(["@stackframe/stack"])).toBe("@stackframe/stack");
|
|
109
|
+
expect(detectConfigImportPackage(["@stackframe/template"])).toBe("@stackframe/template");
|
|
110
|
+
expect(detectConfigImportPackage(["lodash", "express"])).toBeUndefined();
|
|
111
|
+
expect(detectConfigImportPackage([])).toBeUndefined();
|
|
104
112
|
});
|
|
105
113
|
|
|
106
114
|
//#endregion
|
|
107
|
-
export {
|
|
115
|
+
export { detectConfigImportPackage, detectImportPackageFromDir, parseStackConfigFileContent, renderConfigFileContent };
|
|
108
116
|
//# sourceMappingURL=config-rendering.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-rendering.js","names":[],"sources":["../../src/config-rendering.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"fs\";\nimport path from \"path\";\nimport { parseStackConfigFileContent, renderConfigFileContent } from \"./stack-config-file\";\nexport { parseStackConfigFileContent, renderConfigFileContent };\n\n/**\n * Packages that export the `StackConfig` type, in priority order.\n * The first match found in a project's dependencies wins.\n */\nconst
|
|
1
|
+
{"version":3,"file":"config-rendering.js","names":[],"sources":["../../src/config-rendering.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"fs\";\nimport path from \"path\";\nimport { parseStackConfigFileContent, renderConfigFileContent } from \"./stack-config-file\";\nexport { parseStackConfigFileContent, renderConfigFileContent };\n\n/**\n * Packages that export the `StackConfig` type, in priority order.\n * The first match found in a project's dependencies wins. Hexclave-branded\n * packages come first (canonical); the legacy `@stackframe/*` names remain\n * so projects pinned to the last legacy release still render a config file\n * that compiles against their installed SDK.\n */\nconst CONFIG_IMPORT_PACKAGES = [\n \"@hexclave/next\",\n \"@hexclave/react\",\n \"@hexclave/js\",\n \"@stackframe/stack\",\n \"@stackframe/react\",\n \"@stackframe/js\",\n \"@stackframe/template\",\n] as const;\n\n/**\n * Given a list of dependency names (from package.json), returns the SDK\n * package that should be used for the `StackConfig` import, or `undefined`\n * if none of the known packages are installed.\n */\nexport function detectConfigImportPackage(dependencies: string[]): string | undefined {\n for (const pkg of CONFIG_IMPORT_PACKAGES) {\n if (dependencies.includes(pkg)) {\n return pkg;\n }\n }\n return undefined;\n}\n\n/**\n * Walks up from `dir` to find the nearest `package.json` and returns the\n * best SDK package to use for the `StackConfig` type import.\n */\nexport function detectImportPackageFromDir(dir: string): string | undefined {\n let current = dir;\n while (true) {\n const pkgPath = path.join(current, \"package.json\");\n if (existsSync(pkgPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgPath, \"utf-8\"));\n const deps = [\n ...Object.keys(pkg.dependencies ?? {}),\n ...Object.keys(pkg.devDependencies ?? {}),\n ];\n return detectConfigImportPackage(deps);\n } catch {\n return undefined;\n }\n }\n const parent = path.dirname(current);\n if (parent === current) break;\n current = parent;\n }\n return undefined;\n}\n\nimport.meta.vitest?.test(\"renderConfigFileContent normalizes config exports\", ({ expect }) => {\n expect(renderConfigFileContent({\n \"payments.items.todos.displayName\": \"Todo Slots\",\n \"payments.items.todos.customerType\": \"user\",\n })).toContain(`export const config: StackConfig = {\n \"payments\": {\n \"items\": {\n \"todos\": {\n \"displayName\": \"Todo Slots\",\n \"customerType\": \"user\"\n }\n }\n }\n};`);\n});\n\nimport.meta.vitest?.test(\"parseStackConfigFileContent parses static config exports\", ({ expect }) => {\n expect(parseStackConfigFileContent(`\n import type { StackConfig } from \"@hexclave/js\";\n export const config: StackConfig = {\n auth: { allowSignUp: true },\n payments: { testMode: false },\n };\n `, \"stack.config.ts\")).toMatchInlineSnapshot(`\n {\n \"auth\": {\n \"allowSignUp\": true,\n },\n \"payments\": {\n \"testMode\": false,\n },\n }\n `);\n});\n\nimport.meta.vitest?.test(\"parseStackConfigFileContent parses show-onboarding\", ({ expect }) => {\n expect(parseStackConfigFileContent('export const config = \"show-onboarding\";', \"stack.config.ts\")).toBe(\"show-onboarding\");\n});\n\nimport.meta.vitest?.test(\"parseStackConfigFileContent rejects dynamic config exports\", ({ expect }) => {\n expect(() => parseStackConfigFileContent(\"export const config = makeConfig();\", \"stack.config.ts\")).toThrow(/Unsupported config expression/);\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent rejects conflicting dotted keys\", ({ expect }) => {\n expect(() => renderConfigFileContent({\n \"a.b\": 1,\n \"a.b.c\": 2,\n })).toThrowError(/conflicting keys.*\"a\\.b\\.c\"/);\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent rejects invalid config exports\", ({ expect }) => {\n expect(() => renderConfigFileContent(null)).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid config: expected a plain object.]`,\n );\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent uses custom import package\", ({ expect }) => {\n const content = renderConfigFileContent({}, \"@hexclave/next\");\n expect(content).toContain('import type { StackConfig } from \"@hexclave/next\";');\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent defaults to @hexclave/js\", ({ expect }) => {\n const content = renderConfigFileContent({});\n expect(content).toContain('import type { StackConfig } from \"@hexclave/js\";');\n});\n\nimport.meta.vitest?.test(\"detectConfigImportPackage picks first matching package by priority\", ({ expect }) => {\n expect(detectConfigImportPackage([\"@hexclave/next\", \"@hexclave/js\"])).toBe(\"@hexclave/next\");\n expect(detectConfigImportPackage([\"@hexclave/react\", \"@hexclave/js\"])).toBe(\"@hexclave/react\");\n expect(detectConfigImportPackage([\"@hexclave/js\"])).toBe(\"@hexclave/js\");\n // Hexclave names take priority over legacy stackframe names when both appear.\n expect(detectConfigImportPackage([\"@stackframe/stack\", \"@hexclave/next\"])).toBe(\"@hexclave/next\");\n // Legacy fallback still works for projects pinned to the last @stackframe/* release.\n expect(detectConfigImportPackage([\"@stackframe/stack\"])).toBe(\"@stackframe/stack\");\n expect(detectConfigImportPackage([\"@stackframe/template\"])).toBe(\"@stackframe/template\");\n expect(detectConfigImportPackage([\"lodash\", \"express\"])).toBeUndefined();\n expect(detectConfigImportPackage([])).toBeUndefined();\n});\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,yBAAyB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;AAOD,SAAgB,0BAA0B,cAA4C;AACpF,MAAK,MAAM,OAAO,uBAChB,KAAI,aAAa,SAAS,IAAI,CAC5B,QAAO;;;;;;AAUb,SAAgB,2BAA2B,KAAiC;CAC1E,IAAI,UAAU;AACd,QAAO,MAAM;EACX,MAAM,UAAU,KAAK,KAAK,SAAS,eAAe;AAClD,MAAI,WAAW,QAAQ,CACrB,KAAI;GACF,MAAM,MAAM,KAAK,MAAM,aAAa,SAAS,QAAQ,CAAC;AAKtD,UAAO,0BAJM,CACX,GAAG,OAAO,KAAK,IAAI,gBAAgB,EAAE,CAAC,EACtC,GAAG,OAAO,KAAK,IAAI,mBAAmB,EAAE,CAAC,CAC1C,CACqC;UAChC;AACN;;EAGJ,MAAM,SAAS,KAAK,QAAQ,QAAQ;AACpC,MAAI,WAAW,QAAS;AACxB,YAAU;;;CAKd,SAAW,KAAC,sDAAwD,EAAA,aAAa;AAC/E,QAAO,wBAAwB;EAC7B,oCAAoC;EACpC,qCAAqC;EACtC,CAAC,CAAC,CAAC,UAAU;;;;;;;;;IASZ;EACF;CAEF,SAAW,KAAC,6DAA+D,EAAA,aAAa;AACtF,QAAO,4BAA4B;;;;;;KAMhC,kBAAkB,CAAC,CAAC,sBAAsB;;;;;;;;;IAS3C;EACF;CAEF,SAAW,KAAC,uDAAsD,EAAA,aAAgB;AAChF,QAAO,4BAA4B,8CAA4C,kBAAkB,CAAC,CAAC,KAAK,kBAAkB;EAC1H;CAEF,SAAW,KAAC,+DAAiE,EAAA,aAAa;AACxF,cAAa,4BAA4B,uCAAuC,kBAAkB,CAAC,CAAC,QAAQ,gCAAgC;EAC5I;CAEF,SAAW,KAAC,4DAAgE,EAAC,aAAU;AACrF,cAAa,wBAAwB;EACnC,OAAO;EACP,SAAS;EACV,CAAC,CAAC,CAAC,aAAa,8BAA8B;EAC/C;CAEF,SAAW,KAAC,2DAA6D,EAAA,aAAa;AACpF,cAAa,wBAAwB,KAAK,CAAC,CAAC,mCAC1C,oDACD;EACD;CAEF,SAAW,KAAC,uDAAyD,EAAA,aAAa;AAEhF,QADgB,wBAAwB,EAAE,EAAE,iBAAiB,CAC9C,CAAC,UAAU,uDAAqD;EAC/E;CAEF,SAAW,KAAC,qDAAmD,EAAQ,aAAS;AAE9E,QADgB,wBAAwB,EAAE,CAAC,CAC5B,CAAC,UAAU,qDAAmD;EAC7E;CAEF,SAAW,KAAC,uEAAwE,EAAA,aAAc;AAChG,QAAO,0BAA0B,CAAC,kBAAkB,eAAe,CAAC,CAAC,CAAC,KAAK,iBAAiB;AAC5F,QAAO,0BAA0B,CAAC,mBAAmB,eAAe,CAAC,CAAC,CAAC,KAAK,kBAAkB;AAC9F,QAAO,0BAA0B,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,eAAe;AAExE,QAAO,0BAA0B,CAAC,qBAAqB,iBAAiB,CAAC,CAAC,CAAC,KAAK,iBAAiB;AAEjG,QAAO,0BAA0B,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,oBAAoB;AAClF,QAAO,0BAA0B,CAAC,uBAAuB,CAAC,CAAC,CAAC,KAAK,uBAAuB;AACxF,QAAO,0BAA0B,CAAC,UAAU,UAAU,CAAC,CAAC,CAAC,eAAe;AACxE,QAAO,0BAA0B,EAAE,CAAC,CAAC,CAAC,eAAe;EACrD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Result } from "../utils/results.js";
|
|
2
|
-
import { KnownErrors } from "../known-errors.js";
|
|
3
2
|
import { urlString } from "../utils/urls.js";
|
|
3
|
+
import { KnownErrors } from "../known-errors.js";
|
|
4
4
|
import { HexclaveServerInterface } from "./server-interface.js";
|
|
5
5
|
|
|
6
6
|
//#region src/interface/admin-interface.ts
|
|
@@ -150,16 +150,16 @@ declare const MetricsEmailOverviewSchema: yup.ObjectSchema<{
|
|
|
150
150
|
activity: number;
|
|
151
151
|
}[];
|
|
152
152
|
daily_emails_by_status: {
|
|
153
|
+
error: number;
|
|
153
154
|
date: string;
|
|
154
155
|
ok: number;
|
|
155
|
-
error: number;
|
|
156
156
|
in_progress: number;
|
|
157
157
|
}[];
|
|
158
158
|
emails_sent: number;
|
|
159
159
|
recent_emails: {
|
|
160
|
+
status: string;
|
|
160
161
|
id: string;
|
|
161
162
|
subject: string;
|
|
162
|
-
status: string;
|
|
163
163
|
created_at_millis: number;
|
|
164
164
|
}[];
|
|
165
165
|
deliverability_status: {
|
|
@@ -310,9 +310,9 @@ declare const UserActivityResponseBodySchema: yup.ObjectSchema<{
|
|
|
310
310
|
data_points: undefined;
|
|
311
311
|
}, "">;
|
|
312
312
|
declare const MetricsActiveUsersByCountrySchema: yup.MixedSchema<Record<string, {
|
|
313
|
+
primary_email: string | null;
|
|
313
314
|
display_name: string | null;
|
|
314
315
|
id: string;
|
|
315
|
-
primary_email: string | null;
|
|
316
316
|
profile_image_url: string | null;
|
|
317
317
|
signed_up_at_millis: number;
|
|
318
318
|
last_active_at_millis: number | null;
|
|
@@ -330,25 +330,25 @@ declare const MetricsResponseBodySchema: yup.ObjectSchema<{
|
|
|
330
330
|
}[];
|
|
331
331
|
users_by_country: Record<string, number>;
|
|
332
332
|
active_users_by_country: Record<string, {
|
|
333
|
+
primary_email: string | null;
|
|
333
334
|
display_name: string | null;
|
|
334
335
|
id: string;
|
|
335
|
-
primary_email: string | null;
|
|
336
336
|
profile_image_url: string | null;
|
|
337
337
|
signed_up_at_millis: number;
|
|
338
338
|
last_active_at_millis: number | null;
|
|
339
339
|
}[]>;
|
|
340
340
|
recently_registered: {
|
|
341
|
+
primary_email: string | null;
|
|
341
342
|
display_name: string | null;
|
|
342
343
|
id: string;
|
|
343
|
-
primary_email: string | null;
|
|
344
344
|
profile_image_url: string | null;
|
|
345
345
|
signed_up_at_millis: number;
|
|
346
346
|
last_active_at_millis: number | null;
|
|
347
347
|
}[];
|
|
348
348
|
recently_active: {
|
|
349
|
+
primary_email: string | null;
|
|
349
350
|
display_name: string | null;
|
|
350
351
|
id: string;
|
|
351
|
-
primary_email: string | null;
|
|
352
352
|
profile_image_url: string | null;
|
|
353
353
|
signed_up_at_millis: number;
|
|
354
354
|
last_active_at_millis: number | null;
|
|
@@ -422,16 +422,16 @@ declare const MetricsResponseBodySchema: yup.ObjectSchema<{
|
|
|
422
422
|
emails_by_status: Record<string, number>;
|
|
423
423
|
total_emails: number;
|
|
424
424
|
daily_emails_by_status: {
|
|
425
|
+
error: number;
|
|
425
426
|
date: string;
|
|
426
427
|
ok: number;
|
|
427
|
-
error: number;
|
|
428
428
|
in_progress: number;
|
|
429
429
|
}[];
|
|
430
430
|
emails_sent: number;
|
|
431
431
|
recent_emails: {
|
|
432
|
+
status: string;
|
|
432
433
|
id: string;
|
|
433
434
|
subject: string;
|
|
434
|
-
status: string;
|
|
435
435
|
created_at_millis: number;
|
|
436
436
|
}[];
|
|
437
437
|
deliverability_status: {
|
|
@@ -3,8 +3,8 @@ import { filterUndefined, filterUndefinedOrNull } from "../utils/objects.js";
|
|
|
3
3
|
import { deindent } from "../utils/strings.js";
|
|
4
4
|
import { publishableClientKeyNotNecessarySentinel } from "../utils/oauth.js";
|
|
5
5
|
import { Result } from "../utils/results.js";
|
|
6
|
-
import { KnownError, KnownErrors } from "../known-errors.js";
|
|
7
6
|
import { urlString } from "../utils/urls.js";
|
|
7
|
+
import { KnownError, KnownErrors } from "../known-errors.js";
|
|
8
8
|
import { AccessToken, InternalSession } from "../sessions.js";
|
|
9
9
|
import { generateSecureRandomString } from "../utils/crypto.js";
|
|
10
10
|
import { globalVar } from "../utils/globals.js";
|
|
@@ -49,7 +49,7 @@ declare const conversationSummarySchema: yup$1.ObjectSchema<{
|
|
|
49
49
|
userPrimaryEmail: string | null;
|
|
50
50
|
userProfileImageUrl: string | null;
|
|
51
51
|
subject: string;
|
|
52
|
-
status: "
|
|
52
|
+
status: "open" | "pending" | "closed";
|
|
53
53
|
priority: "low" | "normal" | "high" | "urgent";
|
|
54
54
|
source: "email" | "manual" | "chat" | "api";
|
|
55
55
|
lastMessageType: "message" | "internal-note" | "status-change";
|
|
@@ -129,7 +129,7 @@ declare const conversationMessageSchema: yup$1.ObjectSchema<{
|
|
|
129
129
|
userId: string | null;
|
|
130
130
|
teamId: string | null;
|
|
131
131
|
subject: string;
|
|
132
|
-
status: "
|
|
132
|
+
status: "open" | "pending" | "closed";
|
|
133
133
|
priority: "low" | "normal" | "high" | "urgent";
|
|
134
134
|
source: "email" | "manual" | "chat" | "api";
|
|
135
135
|
messageType: "message" | "internal-note" | "status-change";
|
|
@@ -173,15 +173,15 @@ declare const conversationListResponseSchema: yup$1.ObjectSchema<{
|
|
|
173
173
|
lastOutboundAt?: string | null | undefined;
|
|
174
174
|
closedAt?: string | null | undefined;
|
|
175
175
|
recordMetadata?: {} | null | undefined;
|
|
176
|
+
status: "open" | "pending" | "closed";
|
|
177
|
+
priority: "low" | "normal" | "high" | "urgent";
|
|
178
|
+
subject: string;
|
|
176
179
|
conversationId: string;
|
|
177
180
|
userId: string | null;
|
|
178
181
|
teamId: string | null;
|
|
179
182
|
userDisplayName: string | null;
|
|
180
183
|
userPrimaryEmail: string | null;
|
|
181
184
|
userProfileImageUrl: string | null;
|
|
182
|
-
subject: string;
|
|
183
|
-
status: "pending" | "open" | "closed";
|
|
184
|
-
priority: "low" | "normal" | "high" | "urgent";
|
|
185
185
|
source: "email" | "manual" | "chat" | "api";
|
|
186
186
|
lastMessageType: "message" | "internal-note" | "status-change";
|
|
187
187
|
preview: string | null;
|
|
@@ -211,15 +211,15 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
|
|
|
211
211
|
lastOutboundAt?: string | null | undefined;
|
|
212
212
|
closedAt?: string | null | undefined;
|
|
213
213
|
recordMetadata?: {} | null | undefined;
|
|
214
|
+
status: "open" | "pending" | "closed";
|
|
215
|
+
priority: "low" | "normal" | "high" | "urgent";
|
|
216
|
+
subject: string;
|
|
214
217
|
conversationId: string;
|
|
215
218
|
userId: string | null;
|
|
216
219
|
teamId: string | null;
|
|
217
220
|
userDisplayName: string | null;
|
|
218
221
|
userPrimaryEmail: string | null;
|
|
219
222
|
userProfileImageUrl: string | null;
|
|
220
|
-
subject: string;
|
|
221
|
-
status: "pending" | "open" | "closed";
|
|
222
|
-
priority: "low" | "normal" | "high" | "urgent";
|
|
223
223
|
source: "email" | "manual" | "chat" | "api";
|
|
224
224
|
lastMessageType: "message" | "internal-note" | "status-change";
|
|
225
225
|
preview: string | null;
|
|
@@ -236,13 +236,13 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
|
|
|
236
236
|
};
|
|
237
237
|
};
|
|
238
238
|
messages: {
|
|
239
|
+
status: "open" | "pending" | "closed";
|
|
239
240
|
id: string;
|
|
241
|
+
priority: "low" | "normal" | "high" | "urgent";
|
|
242
|
+
subject: string;
|
|
240
243
|
conversationId: string;
|
|
241
244
|
userId: string | null;
|
|
242
245
|
teamId: string | null;
|
|
243
|
-
subject: string;
|
|
244
|
-
status: "pending" | "open" | "closed";
|
|
245
|
-
priority: "low" | "normal" | "high" | "urgent";
|
|
246
246
|
source: "email" | "manual" | "chat" | "api";
|
|
247
247
|
metadata: {} | null;
|
|
248
248
|
createdAt: string;
|
|
@@ -5,21 +5,21 @@ import { CrudTypeOf } from "../../crud";
|
|
|
5
5
|
//#region src/interface/crud/current-user.d.ts
|
|
6
6
|
declare const currentUserCrud: ______crud0.CrudSchemaFromOptions<{
|
|
7
7
|
clientReadSchema: yup$1.ObjectSchema<{
|
|
8
|
-
selected_team_id: string | null;
|
|
9
|
-
is_anonymous: boolean;
|
|
10
|
-
is_restricted: boolean;
|
|
11
8
|
restricted_reason: {
|
|
12
9
|
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
13
10
|
} | null;
|
|
14
|
-
|
|
11
|
+
primary_email: string | null;
|
|
15
12
|
display_name: string | null;
|
|
16
13
|
client_metadata: {} | null;
|
|
17
14
|
client_read_only_metadata: {} | null;
|
|
18
15
|
id: string;
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
selected_team_id: string | null;
|
|
17
|
+
is_anonymous: boolean;
|
|
18
|
+
is_restricted: boolean;
|
|
19
|
+
requires_totp_mfa: boolean;
|
|
21
20
|
profile_image_url: string | null;
|
|
22
21
|
signed_up_at_millis: number;
|
|
22
|
+
primary_email_verified: boolean;
|
|
23
23
|
has_password: boolean;
|
|
24
24
|
otp_auth_enabled: boolean;
|
|
25
25
|
passkey_auth_enabled: boolean;
|
|
@@ -93,8 +93,8 @@ declare const currentUserCrud: ______crud0.CrudSchemaFromOptions<{
|
|
|
93
93
|
server_metadata?: {} | null | undefined;
|
|
94
94
|
display_name: string;
|
|
95
95
|
id: string;
|
|
96
|
-
profile_image_url: string | null;
|
|
97
96
|
created_at_millis: number;
|
|
97
|
+
profile_image_url: string | null;
|
|
98
98
|
} | null;
|
|
99
99
|
selected_team_id: string | null;
|
|
100
100
|
profile_image_url: string | null;
|
|
@@ -173,10 +173,10 @@ declare const currentUserCrud: ______crud0.CrudSchemaFromOptions<{
|
|
|
173
173
|
requires_totp_mfa: undefined;
|
|
174
174
|
}, "">;
|
|
175
175
|
clientUpdateSchema: yup$1.ObjectSchema<{
|
|
176
|
-
|
|
176
|
+
primary_email: string | null | undefined;
|
|
177
177
|
display_name: string | null | undefined;
|
|
178
178
|
client_metadata: {} | null | undefined;
|
|
179
|
-
|
|
179
|
+
selected_team_id: string | null | undefined;
|
|
180
180
|
profile_image_url: string | null | undefined;
|
|
181
181
|
otp_auth_enabled: boolean | undefined;
|
|
182
182
|
passkey_auth_enabled: boolean | undefined;
|