@endora-commerce/mod-credentials 0.100.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 +21 -0
- package/README.md +59 -0
- package/dist/admin/api/credentials-client.d.ts +11 -0
- package/dist/admin/api/credentials-client.d.ts.map +1 -0
- package/dist/admin/api/credentials-client.js +38 -0
- package/dist/admin/api/credentials-client.js.map +1 -0
- package/dist/admin/components/ConfigurationForm.d.ts +22 -0
- package/dist/admin/components/ConfigurationForm.d.ts.map +1 -0
- package/dist/admin/components/ConfigurationForm.js +89 -0
- package/dist/admin/components/ConfigurationForm.js.map +1 -0
- package/dist/admin/index.d.ts +47 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +65 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/pages/CredentialsNewPage.d.ts +19 -0
- package/dist/admin/pages/CredentialsNewPage.d.ts.map +1 -0
- package/dist/admin/pages/CredentialsNewPage.js +22 -0
- package/dist/admin/pages/CredentialsNewPage.js.map +1 -0
- package/dist/admin/pages/CredentialsPage.d.ts +22 -0
- package/dist/admin/pages/CredentialsPage.d.ts.map +1 -0
- package/dist/admin/pages/CredentialsPage.js +154 -0
- package/dist/admin/pages/CredentialsPage.js.map +1 -0
- package/dist/admin-ui/ConfigurationPreviewModal.d.ts +16 -0
- package/dist/admin-ui/ConfigurationPreviewModal.d.ts.map +1 -0
- package/dist/admin-ui/ConfigurationPreviewModal.js +15 -0
- package/dist/admin-ui/ConfigurationPreviewModal.js.map +1 -0
- package/dist/admin-ui/index.d.ts +57 -0
- package/dist/admin-ui/index.d.ts.map +1 -0
- package/dist/admin-ui/index.js +56 -0
- package/dist/admin-ui/index.js.map +1 -0
- package/dist/backend/commands/create-configuration.command.d.ts +20 -0
- package/dist/backend/commands/create-configuration.command.d.ts.map +1 -0
- package/dist/backend/commands/create-configuration.command.js +70 -0
- package/dist/backend/commands/create-configuration.command.js.map +1 -0
- package/dist/backend/commands/delete-configuration.command.d.ts +16 -0
- package/dist/backend/commands/delete-configuration.command.d.ts.map +1 -0
- package/dist/backend/commands/delete-configuration.command.js +48 -0
- package/dist/backend/commands/delete-configuration.command.js.map +1 -0
- package/dist/backend/commands/update-configuration.command.d.ts +20 -0
- package/dist/backend/commands/update-configuration.command.d.ts.map +1 -0
- package/dist/backend/commands/update-configuration.command.js +94 -0
- package/dist/backend/commands/update-configuration.command.js.map +1 -0
- package/dist/backend/entities/credential-configuration.entity.d.ts +30 -0
- package/dist/backend/entities/credential-configuration.entity.d.ts.map +1 -0
- package/dist/backend/entities/credential-configuration.entity.js +84 -0
- package/dist/backend/entities/credential-configuration.entity.js.map +1 -0
- package/dist/backend/index.d.ts +73 -0
- package/dist/backend/index.d.ts.map +1 -0
- package/dist/backend/index.js +80 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/plugin.d.ts +43 -0
- package/dist/backend/plugin.d.ts.map +1 -0
- package/dist/backend/plugin.js +25 -0
- package/dist/backend/plugin.js.map +1 -0
- package/dist/backend/routes.admin.d.ts +27 -0
- package/dist/backend/routes.admin.d.ts.map +1 -0
- package/dist/backend/routes.admin.js +50 -0
- package/dist/backend/routes.admin.js.map +1 -0
- package/dist/backend/services/configuration-type-registry.d.ts +105 -0
- package/dist/backend/services/configuration-type-registry.d.ts.map +1 -0
- package/dist/backend/services/configuration-type-registry.js +111 -0
- package/dist/backend/services/configuration-type-registry.js.map +1 -0
- package/dist/backend/services/credentials.service.d.ts +63 -0
- package/dist/backend/services/credentials.service.d.ts.map +1 -0
- package/dist/backend/services/credentials.service.js +128 -0
- package/dist/backend/services/credentials.service.js.map +1 -0
- package/dist/backend/services/field-validator.d.ts +65 -0
- package/dist/backend/services/field-validator.d.ts.map +1 -0
- package/dist/backend/services/field-validator.js +165 -0
- package/dist/backend/services/field-validator.js.map +1 -0
- package/dist/backend/services/registry-singleton.d.ts +28 -0
- package/dist/backend/services/registry-singleton.d.ts.map +1 -0
- package/dist/backend/services/registry-singleton.js +29 -0
- package/dist/backend/services/registry-singleton.js.map +1 -0
- package/dist/backend/services/secret-value-codec.d.ts +55 -0
- package/dist/backend/services/secret-value-codec.d.ts.map +1 -0
- package/dist/backend/services/secret-value-codec.js +105 -0
- package/dist/backend/services/secret-value-codec.js.map +1 -0
- package/dist/backend/types/email-adapter.type.d.ts +10 -0
- package/dist/backend/types/email-adapter.type.d.ts.map +1 -0
- package/dist/backend/types/email-adapter.type.js +49 -0
- package/dist/backend/types/email-adapter.type.js.map +1 -0
- package/dist/backend/types/llm.type.d.ts +3 -0
- package/dist/backend/types/llm.type.d.ts.map +1 -0
- package/dist/backend/types/llm.type.js +35 -0
- package/dist/backend/types/llm.type.js.map +1 -0
- package/dist/manifest.d.ts +176 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +167 -0
- package/dist/manifest.js.map +1 -0
- package/dist/migrations/20260721T011509_credentials_init.d.ts +17 -0
- package/dist/migrations/20260721T011509_credentials_init.d.ts.map +1 -0
- package/dist/migrations/20260721T011509_credentials_init.js +36 -0
- package/dist/migrations/20260721T011509_credentials_init.js.map +1 -0
- package/dist/migrations/index.d.ts +27 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +29 -0
- package/dist/migrations/index.js.map +1 -0
- package/docs/credentials.md +202 -0
- package/i18n/en.json +47 -0
- package/i18n/pl.json +47 -0
- package/package.json +98 -0
- package/tailwind.css +16 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core `email_adapter` configuration type (feature 058, US1 / research §R2).
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the newsletter SMTP/SES field set. Each provider declares exactly one
|
|
5
|
+
* secret field (`password` / `secretAccessKey` / `apiKey`); the rest are plain.
|
|
6
|
+
* Provider meaning (how mail is actually sent) is owned by the consumer.
|
|
7
|
+
*/
|
|
8
|
+
export const emailAdapterConfigurationType = {
|
|
9
|
+
code: 'email_adapter',
|
|
10
|
+
label: 'Email adapter',
|
|
11
|
+
ownerModule: 'credentials',
|
|
12
|
+
providers: [
|
|
13
|
+
{
|
|
14
|
+
code: 'smtp',
|
|
15
|
+
label: 'SMTP',
|
|
16
|
+
fields: [
|
|
17
|
+
{ key: 'host', label: 'Host', kind: 'string', required: true, secret: false },
|
|
18
|
+
{ key: 'port', label: 'Port', kind: 'number', required: true, secret: false },
|
|
19
|
+
{ key: 'secure', label: 'Use TLS', kind: 'boolean', required: false, secret: false },
|
|
20
|
+
{ key: 'username', label: 'Username', kind: 'string', required: false, secret: false },
|
|
21
|
+
{ key: 'password', label: 'Password', kind: 'string', required: false, secret: true },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
code: 'amazon_ses',
|
|
26
|
+
label: 'Amazon SES',
|
|
27
|
+
fields: [
|
|
28
|
+
{ key: 'region', label: 'Region', kind: 'string', required: true, secret: false },
|
|
29
|
+
{ key: 'accessKeyId', label: 'Access key ID', kind: 'string', required: true, secret: false },
|
|
30
|
+
{
|
|
31
|
+
key: 'secretAccessKey',
|
|
32
|
+
label: 'Secret access key',
|
|
33
|
+
kind: 'string',
|
|
34
|
+
required: true,
|
|
35
|
+
secret: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
code: 'sendgrid',
|
|
41
|
+
label: 'SendGrid',
|
|
42
|
+
fields: [
|
|
43
|
+
{ key: 'apiKey', label: 'API Key', kind: 'string', required: true, secret: true },
|
|
44
|
+
{ key: 'senderEmail', label: 'Sender email', kind: 'string', required: true, secret: false },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=email-adapter.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-adapter.type.js","sourceRoot":"","sources":["../../../src/backend/types/email-adapter.type.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAgC;IACxE,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE;QACT;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE;gBACN,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC7E,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC7E,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;gBACpF,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;gBACtF,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;aACtF;SACF;QACD;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE;gBACN,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;gBACjF,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC7F;oBACE,GAAG,EAAE,iBAAiB;oBACtB,KAAK,EAAE,mBAAmB;oBAC1B,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,MAAM,EAAE,IAAI;iBACb;aACF;SACF;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,UAAU;YACjB,MAAM,EAAE;gBACN,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;gBACjF,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;aAC7F;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.type.d.ts","sourceRoot":"","sources":["../../../src/backend/types/llm.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAmB,MAAM,4BAA4B,CAAC;AA2B/F,eAAO,MAAM,oBAAoB,EAAE,2BAUlC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core `llm` configuration type (feature 058, US1 / research §R2).
|
|
3
|
+
*
|
|
4
|
+
* Provider codes align with the existing `prompt_actions.provider` enum
|
|
5
|
+
* (`anthropic | google | openai`) extended with `deepseek`. Every provider
|
|
6
|
+
* shares the same field set: a secret `apiKey`, a required `model`, and an
|
|
7
|
+
* optional `baseUrl` override. The credentials core stays type-agnostic — how a
|
|
8
|
+
* provider is actually called is owned by the consumer (Principle XIV).
|
|
9
|
+
*/
|
|
10
|
+
function llmFields() {
|
|
11
|
+
return [
|
|
12
|
+
{ key: 'apiKey', label: 'API Key', kind: 'string', required: true, secret: true },
|
|
13
|
+
{ key: 'model', label: 'Model', kind: 'string', required: true, secret: false },
|
|
14
|
+
{
|
|
15
|
+
key: 'baseUrl',
|
|
16
|
+
label: 'Base URL',
|
|
17
|
+
kind: 'string',
|
|
18
|
+
required: false,
|
|
19
|
+
secret: false,
|
|
20
|
+
placeholder: 'Optional — override the provider default endpoint',
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
export const llmConfigurationType = {
|
|
25
|
+
code: 'llm',
|
|
26
|
+
label: 'LLM',
|
|
27
|
+
ownerModule: 'credentials',
|
|
28
|
+
providers: [
|
|
29
|
+
{ code: 'openai', label: 'OpenAI (GPT)', fields: llmFields() },
|
|
30
|
+
{ code: 'google', label: 'Google (Gemini)', fields: llmFields() },
|
|
31
|
+
{ code: 'anthropic', label: 'Anthropic (Claude)', fields: llmFields() },
|
|
32
|
+
{ code: 'deepseek', label: 'DeepSeek', fields: llmFields() },
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=llm.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.type.js","sourceRoot":"","sources":["../../../src/backend/types/llm.type.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,SAAS,SAAS;IAChB,OAAO;QACL,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QACjF,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;QAC/E;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,mDAAmD;SACjE;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAgC;IAC/D,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE;QACT,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;QAC9D,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;QACjE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;QACvE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;KAC7D;CACF,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credentials module — feature 058.
|
|
3
|
+
*
|
|
4
|
+
* Reusable credential configurations: each an instance of a code-registered
|
|
5
|
+
* configuration type (LLM, email adapter, …). The core stores and validates
|
|
6
|
+
* declared field values (secrets encrypted at rest, masked on read) but never
|
|
7
|
+
* interprets provider meaning (Principle XIV). It owns NO settings — it
|
|
8
|
+
* *provides* the `credential_ref` value type consumed by other modules.
|
|
9
|
+
*
|
|
10
|
+
* Depends on `settings` for the reference/delete-integrity lookup (US2) and on
|
|
11
|
+
* the platform `_lifecycle` / `_i18n` modules for registration + translations.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CREDENTIALS_READ_PERMISSION = "credentials:read";
|
|
14
|
+
export declare const CREDENTIALS_WRITE_PERMISSION = "credentials:write";
|
|
15
|
+
export declare const CREDENTIALS_ACTIVATION_SETTING_CODE = "credentials.enabled";
|
|
16
|
+
export declare const manifest: {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
version: string;
|
|
20
|
+
dependencies: string[];
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
acknowledgedDependencies?: {
|
|
23
|
+
moduleId: string;
|
|
24
|
+
port: string;
|
|
25
|
+
reason: string;
|
|
26
|
+
}[] | undefined;
|
|
27
|
+
nonBindingDependencies?: {
|
|
28
|
+
moduleId: string;
|
|
29
|
+
name: string;
|
|
30
|
+
kind: "contributes-to" | "degrades-without" | "refuses-without";
|
|
31
|
+
reason: string;
|
|
32
|
+
whenAbsent?: string | undefined;
|
|
33
|
+
}[] | undefined;
|
|
34
|
+
activation?: {
|
|
35
|
+
settingCode: string;
|
|
36
|
+
default: boolean;
|
|
37
|
+
} | {
|
|
38
|
+
nonDeactivatable: true;
|
|
39
|
+
reason: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
settings?: {
|
|
42
|
+
moduleCode: string;
|
|
43
|
+
groups: {
|
|
44
|
+
code: string;
|
|
45
|
+
name: string;
|
|
46
|
+
salesChannelCodes?: string[] | undefined;
|
|
47
|
+
isSystemProtected?: boolean | undefined;
|
|
48
|
+
}[];
|
|
49
|
+
settings: {
|
|
50
|
+
code: string;
|
|
51
|
+
name: string;
|
|
52
|
+
valueType: "string" | "number" | "boolean" | "json" | "string_list" | "secret" | "credential_ref";
|
|
53
|
+
defaultValue: unknown;
|
|
54
|
+
description?: string | undefined;
|
|
55
|
+
groupCode?: string | undefined;
|
|
56
|
+
previousDefaultValues?: unknown[] | undefined;
|
|
57
|
+
salesChannelCodes?: string[] | undefined;
|
|
58
|
+
enumOptions?: string[] | undefined;
|
|
59
|
+
configurationType?: string | undefined;
|
|
60
|
+
hidden?: boolean | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
} | undefined;
|
|
63
|
+
i18n?: {
|
|
64
|
+
bundlesDir: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
docs?: false | {
|
|
67
|
+
dir: string;
|
|
68
|
+
} | undefined;
|
|
69
|
+
demo?: false | {
|
|
70
|
+
summary: string;
|
|
71
|
+
seed: (context: import("@endora-commerce/contracts").ModuleDemoContext<never>) => Promise<import("@endora-commerce/contracts").DemoSeedResult>;
|
|
72
|
+
reset: (context: import("@endora-commerce/contracts").ModuleDemoContext<never>) => Promise<import("@endora-commerce/contracts").DemoResetResult>;
|
|
73
|
+
after?: readonly string[] | undefined;
|
|
74
|
+
package?: string | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
actions?: {
|
|
77
|
+
id: string;
|
|
78
|
+
labelKey: string;
|
|
79
|
+
icon: "Plus" | "Sparkles" | "Settings" | "Search" | "Boxes" | "Layers" | "Menu" | "PlusCircle" | "PlusSquare" | "FilePlus" | "FolderPlus" | "Upload" | "FileUp" | "CloudUpload" | "Download" | "FileDown" | "FileText" | "BookOpen" | "Rss" | "Package" | "Tag" | "ShoppingCart" | "Receipt" | "CreditCard" | "Users" | "UserPlus" | "Inbox" | "ListChecks" | "ClipboardList" | "Image" | "Video" | "LayoutDashboard" | "PanelLeft" | "KeyRound" | "ShieldCheck" | "Edit" | "Archive" | "Box" | "Truck" | "CircleDollarSign" | "Activity" | "LineChart" | "Smartphone" | "Webhook" | "Scale" | "PlugZap" | "PercentDiamond" | "Newspaper" | "Languages" | "Eraser" | "Warehouse" | "TrendingDown" | "Bell" | "PackageOpen" | "Building2" | "Store" | "ClipboardCheck";
|
|
80
|
+
targetRoute: string;
|
|
81
|
+
keywords: string[];
|
|
82
|
+
weight: number;
|
|
83
|
+
descriptionKey?: string | undefined;
|
|
84
|
+
requiredPermission?: string | undefined;
|
|
85
|
+
}[] | undefined;
|
|
86
|
+
permissions?: {
|
|
87
|
+
code: string;
|
|
88
|
+
label: string;
|
|
89
|
+
module?: string | undefined;
|
|
90
|
+
description?: string | undefined;
|
|
91
|
+
requires?: string[] | undefined;
|
|
92
|
+
}[] | undefined;
|
|
93
|
+
transactionalEmails?: {
|
|
94
|
+
code: string;
|
|
95
|
+
name: string;
|
|
96
|
+
variables: {
|
|
97
|
+
key: string;
|
|
98
|
+
label: string;
|
|
99
|
+
sampleValue?: string | undefined;
|
|
100
|
+
description?: string | undefined;
|
|
101
|
+
}[];
|
|
102
|
+
description?: string | undefined;
|
|
103
|
+
group?: string | undefined;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
capabilities?: string[] | undefined;
|
|
106
|
+
exclusiveCapabilities?: {
|
|
107
|
+
key: string;
|
|
108
|
+
errorCode: string;
|
|
109
|
+
}[] | undefined;
|
|
110
|
+
errorCodes?: {
|
|
111
|
+
code: string;
|
|
112
|
+
tokens?: string[] | undefined;
|
|
113
|
+
}[] | undefined;
|
|
114
|
+
blocks?: {
|
|
115
|
+
name: string;
|
|
116
|
+
labelKey: string;
|
|
117
|
+
category: string;
|
|
118
|
+
contexts: ("invoice" | "email" | "cms" | "newsletter")[];
|
|
119
|
+
fields: Record<string, {
|
|
120
|
+
type: "number" | "object" | "array" | "text" | "textarea" | "select" | "radio" | "external" | "uuid" | "richtext";
|
|
121
|
+
label?: string | undefined;
|
|
122
|
+
required?: boolean | undefined;
|
|
123
|
+
options?: {
|
|
124
|
+
label: string;
|
|
125
|
+
value: string | number;
|
|
126
|
+
}[] | undefined;
|
|
127
|
+
refKind?: string | undefined;
|
|
128
|
+
}>;
|
|
129
|
+
descriptionKey?: string | undefined;
|
|
130
|
+
defaultProps?: Record<string, unknown> | undefined;
|
|
131
|
+
responsiveFields?: string[] | undefined;
|
|
132
|
+
previewIcon?: string | undefined;
|
|
133
|
+
weight?: number | undefined;
|
|
134
|
+
}[] | undefined;
|
|
135
|
+
blockCategories?: {
|
|
136
|
+
key: string;
|
|
137
|
+
titleKey: string;
|
|
138
|
+
contexts: ("invoice" | "email" | "cms" | "newsletter")[];
|
|
139
|
+
weight?: number | undefined;
|
|
140
|
+
visible?: boolean | undefined;
|
|
141
|
+
}[] | undefined;
|
|
142
|
+
env?: {
|
|
143
|
+
name: string;
|
|
144
|
+
describes: {
|
|
145
|
+
en: string;
|
|
146
|
+
pl: string;
|
|
147
|
+
};
|
|
148
|
+
requirement: {
|
|
149
|
+
kind: "required";
|
|
150
|
+
} | {
|
|
151
|
+
kind: "requiredWhen";
|
|
152
|
+
input: string;
|
|
153
|
+
equals: string;
|
|
154
|
+
} | {
|
|
155
|
+
kind: "optional";
|
|
156
|
+
without: {
|
|
157
|
+
en: string;
|
|
158
|
+
pl: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
secret: boolean;
|
|
162
|
+
generable: boolean;
|
|
163
|
+
owner: {
|
|
164
|
+
kind: "platform";
|
|
165
|
+
} | {
|
|
166
|
+
kind: "application";
|
|
167
|
+
application: "admin" | "backend" | "storefront";
|
|
168
|
+
} | {
|
|
169
|
+
kind: "module";
|
|
170
|
+
moduleId: string;
|
|
171
|
+
};
|
|
172
|
+
consumers: ("admin" | "backend" | "storefront")[];
|
|
173
|
+
addressOf: "admin" | "backend" | "storefront" | null;
|
|
174
|
+
}[] | undefined;
|
|
175
|
+
};
|
|
176
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,2BAA2B,qBAAqB,CAAC;AAC9D,eAAO,MAAM,4BAA4B,sBAAsB,CAAC;AAEhE,eAAO,MAAM,mCAAmC,wBAAwB,CAAC;AA+BzE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2HnB,CAAC"}
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { defineModuleManifest, defineModuleSettingsManifest } from '@endora-commerce/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Credentials module — feature 058.
|
|
4
|
+
*
|
|
5
|
+
* Reusable credential configurations: each an instance of a code-registered
|
|
6
|
+
* configuration type (LLM, email adapter, …). The core stores and validates
|
|
7
|
+
* declared field values (secrets encrypted at rest, masked on read) but never
|
|
8
|
+
* interprets provider meaning (Principle XIV). It owns NO settings — it
|
|
9
|
+
* *provides* the `credential_ref` value type consumed by other modules.
|
|
10
|
+
*
|
|
11
|
+
* Depends on `settings` for the reference/delete-integrity lookup (US2) and on
|
|
12
|
+
* the platform `_lifecycle` / `_i18n` modules for registration + translations.
|
|
13
|
+
*/
|
|
14
|
+
export const CREDENTIALS_READ_PERMISSION = 'credentials:read';
|
|
15
|
+
export const CREDENTIALS_WRITE_PERMISSION = 'credentials:write';
|
|
16
|
+
export const CREDENTIALS_ACTIVATION_SETTING_CODE = 'credentials.enabled';
|
|
17
|
+
/**
|
|
18
|
+
* Feature 074 — the module's one Setting, and it exists to hold the operator's
|
|
19
|
+
* activation choice.
|
|
20
|
+
*
|
|
21
|
+
* The doc comment above still holds: this module owns no *configuration*. It
|
|
22
|
+
* provides the `credential_ref` value type other modules consume, and it stores
|
|
23
|
+
* their credential instances. The activation control is not configuration —
|
|
24
|
+
* it is the operator axis of Constitution XVII, which is a Setting row by
|
|
25
|
+
* construction — so declaring it here does not make this a settings-owning
|
|
26
|
+
* module.
|
|
27
|
+
*/
|
|
28
|
+
const settings = defineModuleSettingsManifest({
|
|
29
|
+
moduleCode: 'credentials',
|
|
30
|
+
groups: [{ code: 'credentials', name: 'Credentials' }],
|
|
31
|
+
settings: [
|
|
32
|
+
{
|
|
33
|
+
// Platform-wide, never channel-scoped: activation does not join the
|
|
34
|
+
// per-channel tier, and the reconciler's channel scope is additive-only.
|
|
35
|
+
code: CREDENTIALS_ACTIVATION_SETTING_CODE,
|
|
36
|
+
name: 'Credentials enabled',
|
|
37
|
+
description: 'Switches the credential store on or off: the Credentials screens, their API, and the resolution of a `credential_ref` setting by any module that references one. Nothing is dropped — every stored configuration and its encrypted secrets stay in the database and resolve again exactly as before when you switch it back on.',
|
|
38
|
+
groupCode: 'credentials',
|
|
39
|
+
valueType: 'boolean',
|
|
40
|
+
defaultValue: true,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
});
|
|
44
|
+
export const manifest = defineModuleManifest({
|
|
45
|
+
id: 'credentials',
|
|
46
|
+
name: 'Credentials',
|
|
47
|
+
description: 'Reusable credential configurations (LLM, email adapter, …) referenced by settings and resolved by consumers; secrets encrypted at rest and write-only at the boundary.',
|
|
48
|
+
version: '1.0.0',
|
|
49
|
+
dependencies: ['_i18n', '_lifecycle', 'auth', 'settings'],
|
|
50
|
+
settings,
|
|
51
|
+
// Feature 074 (Constitution XVII) — a control this module never had, so an
|
|
52
|
+
// operator could not decline it at all. It is the secret store for the
|
|
53
|
+
// integration surfaces; with those switched off it is dead weight, which is
|
|
54
|
+
// exactly the "additional capability" ruling 1 means. Default `true` so that
|
|
55
|
+
// merging this changes no deployment's state (FR-012).
|
|
56
|
+
activation: { settingCode: CREDENTIALS_ACTIVATION_SETTING_CODE, default: true },
|
|
57
|
+
/**
|
|
58
|
+
* Feature 090 Phase 3 — the six error codes the incumbent prefix chain routes
|
|
59
|
+
* to this module.
|
|
60
|
+
*
|
|
61
|
+
* The list is copied from the frozen capture
|
|
62
|
+
* (`backend/test/fixtures/error-code-routing/chain-answers.ts`), which records
|
|
63
|
+
* what `moduleIdForErrorCode` answered, and is not a judgement about where a
|
|
64
|
+
* code belongs. Reading the chain's *source* would have coincided here — the
|
|
65
|
+
* `CREDENTIAL_` branch is unshadowed and no later branch claims a
|
|
66
|
+
* `CREDENTIAL_`-prefixed code — but that is a conclusion of having read the
|
|
67
|
+
* whole chain, never a premise (trap T1), and the six below still come off the
|
|
68
|
+
* answer.
|
|
69
|
+
*
|
|
70
|
+
* **Three read like somebody else's and all three stay** (trap T2).
|
|
71
|
+
* `CREDENTIAL_TYPE_UNKNOWN` refuses a configuration *type* that no module has
|
|
72
|
+
* contributed to `ConfigurationTypeRegistry`, so the module a reader would
|
|
73
|
+
* blame is whichever one was supposed to register it; `CREDENTIAL_IN_USE` is
|
|
74
|
+
* decided entirely by a `settings` read — `listReferencesToConfiguration`,
|
|
75
|
+
* whose result is the refusal's `referencedBy` list; and
|
|
76
|
+
* `CREDENTIAL_VALIDATION_FAILED` is a field-level validation refusal of the
|
|
77
|
+
* shape `core` owns as `VALIDATION_FAILED`. All three are refusals *about a
|
|
78
|
+
* credential configuration*, which is the noun the chain follows (D-95.2).
|
|
79
|
+
*
|
|
80
|
+
* **The inverse is the larger half, and every code in it is somebody else's.**
|
|
81
|
+
* `INVALID_CREDENTIALS` is auth's sign-in failure and routes to `core` — the
|
|
82
|
+
* chain says so in its own comment above the `CREDENTIAL_` branch, because the
|
|
83
|
+
* plural noun is a password and not a stored configuration.
|
|
84
|
+
* `KSEF_CREDENTIAL_EXISTS` and `KSEF_CREDENTIAL_INVALID` route to `core` as
|
|
85
|
+
* well, which surprises twice over: not here, and not `ksef` either.
|
|
86
|
+
* `MFA_SOCIAL_LAST_CREDENTIAL` is `mfa`'s. And `SETTING_SECRET_KEY_MISSING` is
|
|
87
|
+
* `settings`' (!1133) although it is raised out of a secret codec that
|
|
88
|
+
* `@endora-commerce/platform`, this module and `ksef` each ship a byte-identical
|
|
89
|
+
* copy of — see `services/secret-value-codec.ts`, whose own header calls the
|
|
90
|
+
* duplication debt. This module raises one code it does not own in the other
|
|
91
|
+
* direction: `VERSION_CONFLICT`, in the optimistic-concurrency guard of
|
|
92
|
+
* `update-configuration.command.ts`, which routes to `core` and is not declared
|
|
93
|
+
* here. Re-routing any of this is out of scope (§6.5); disagreement belongs in
|
|
94
|
+
* `specs/082-error-code-ownership/rulings.md` §9.
|
|
95
|
+
*
|
|
96
|
+
* **All six are raised**, in both spellings (trap T12): `ERROR_CODES.<CODE>`
|
|
97
|
+
* and the bare quoted literal, over `packages`, `backend/src`, `admin` and
|
|
98
|
+
* `storefront`. Every raise is inside this package — twelve `HttpError`
|
|
99
|
+
* throws — so unlike `settings` and `invoices` this module's raise sites and
|
|
100
|
+
* its package coincide. No entry for the deferred-defect register. The
|
|
101
|
+
* thirteenth mention is not a throw and is worth naming, because a grep counts
|
|
102
|
+
* it as one: `ConfigurationTypeUnknown` in
|
|
103
|
+
* `services/configuration-type-registry.ts` carries
|
|
104
|
+
* `readonly code = ERROR_CODES.CREDENTIAL_TYPE_UNKNOWN` on a plain `Error`
|
|
105
|
+
* subclass, and that field is read by nothing — the envelope's error handler
|
|
106
|
+
* takes `code` off an `HttpError` and off nothing else. What makes the code
|
|
107
|
+
* reach a client is the `instanceof` catch in
|
|
108
|
+
* `commands/create-configuration.command.ts`, which rethrows as an `HttpError`
|
|
109
|
+
* by hand.
|
|
110
|
+
*
|
|
111
|
+
* **No `tokens`, derived rather than assumed.** `refusalToken`
|
|
112
|
+
* (`packages/platform/src/http/error-envelope.ts`) reads `details.code` off a
|
|
113
|
+
* free-form object and nothing else. Of the twelve throws, nine pass no
|
|
114
|
+
* fourth argument at all; the two `CREDENTIAL_VALIDATION_FAILED` raises pass
|
|
115
|
+
* the Zod-style `Array<{path, issue}>`, which `refusalToken` returns `null`
|
|
116
|
+
* for by construction; and the one `CREDENTIAL_IN_USE` raise passes
|
|
117
|
+
* `{ referencedBy }`, a free-form object with no `code` member. The runbook's
|
|
118
|
+
* §5 raise-site scan attributes the tree's ten token-carrying codes over 41
|
|
119
|
+
* sites to `core`, `invoices` and `carts`, naming none of these, and the
|
|
120
|
+
* bundles hold no `errors.<CODE>.<token>` key in the other direction.
|
|
121
|
+
*/
|
|
122
|
+
errorCodes: [
|
|
123
|
+
{ code: 'CREDENTIAL_CODE_TAKEN' },
|
|
124
|
+
{ code: 'CREDENTIAL_IN_USE' },
|
|
125
|
+
{ code: 'CREDENTIAL_NOT_FOUND' },
|
|
126
|
+
{ code: 'CREDENTIAL_TYPE_IMMUTABLE' },
|
|
127
|
+
{ code: 'CREDENTIAL_TYPE_UNKNOWN' },
|
|
128
|
+
{ code: 'CREDENTIAL_VALIDATION_FAILED' },
|
|
129
|
+
],
|
|
130
|
+
i18n: { bundlesDir: 'i18n' },
|
|
131
|
+
docs: { dir: 'docs' },
|
|
132
|
+
permissions: [
|
|
133
|
+
{
|
|
134
|
+
code: CREDENTIALS_READ_PERMISSION,
|
|
135
|
+
label: 'View credential configurations',
|
|
136
|
+
description: 'Allows viewing credential configurations and the configuration-type catalogue (secrets masked).',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
code: CREDENTIALS_WRITE_PERMISSION,
|
|
140
|
+
label: 'Manage credential configurations',
|
|
141
|
+
description: 'Allows creating, editing, and deleting credential configurations, including writing secret fields.',
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
actions: [
|
|
145
|
+
{
|
|
146
|
+
id: 'open-credentials',
|
|
147
|
+
labelKey: 'actions.openCredentials.label',
|
|
148
|
+
descriptionKey: 'actions.openCredentials.description',
|
|
149
|
+
icon: 'KeyRound',
|
|
150
|
+
targetRoute: '/credentials',
|
|
151
|
+
requiredPermission: CREDENTIALS_READ_PERMISSION,
|
|
152
|
+
keywords: ['credentials', 'secrets', 'api key', 'poświadczenia', 'sekrety', 'klucze'],
|
|
153
|
+
weight: 250,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'new-credential',
|
|
157
|
+
labelKey: 'actions.newCredential.label',
|
|
158
|
+
descriptionKey: 'actions.newCredential.description',
|
|
159
|
+
icon: 'Plus',
|
|
160
|
+
targetRoute: '/credentials/new',
|
|
161
|
+
requiredPermission: CREDENTIALS_WRITE_PERMISSION,
|
|
162
|
+
keywords: ['credential', 'configuration', 'nowe poświadczenie', 'konfiguracja'],
|
|
163
|
+
weight: 251,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
});
|
|
167
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAEhG;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG,kBAAkB,CAAC;AAC9D,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAEhE,MAAM,CAAC,MAAM,mCAAmC,GAAG,qBAAqB,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,MAAM,QAAQ,GAAG,4BAA4B,CAAC;IAC5C,UAAU,EAAE,aAAa;IACzB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IACtD,QAAQ,EAAE;QACR;YACE,oEAAoE;YACpE,yEAAyE;YACzE,IAAI,EAAE,mCAAmC;YACzC,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EACT,iUAAiU;YACnU,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE,SAAS;YACpB,YAAY,EAAE,IAAI;SACnB;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,oBAAoB,CAAC;IAC3C,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,wKAAwK;IAC1K,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC;IACzD,QAAQ;IACR,2EAA2E;IAC3E,uEAAuE;IACvE,4EAA4E;IAC5E,6EAA6E;IAC7E,uDAAuD;IACvD,UAAU,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,OAAO,EAAE,IAAI,EAAE;IAC/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IACH,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,uBAAuB,EAAE;QACjC,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7B,EAAE,IAAI,EAAE,sBAAsB,EAAE;QAChC,EAAE,IAAI,EAAE,2BAA2B,EAAE;QACrC,EAAE,IAAI,EAAE,yBAAyB,EAAE;QACnC,EAAE,IAAI,EAAE,8BAA8B,EAAE;KACzC;IACD,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;IAC5B,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE;IACrB,WAAW,EAAE;QACX;YACE,IAAI,EAAE,2BAA2B;YACjC,KAAK,EAAE,gCAAgC;YACvC,WAAW,EAAE,iGAAiG;SAC/G;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,KAAK,EAAE,kCAAkC;YACzC,WAAW,EAAE,oGAAoG;SAClH;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,kBAAkB;YACtB,QAAQ,EAAE,+BAA+B;YACzC,cAAc,EAAE,qCAAqC;YACrD,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,cAAc;YAC3B,kBAAkB,EAAE,2BAA2B;YAC/C,QAAQ,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,CAAC;YACrF,MAAM,EAAE,GAAG;SACZ;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,QAAQ,EAAE,6BAA6B;YACvC,cAAc,EAAE,mCAAmC;YACnD,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,kBAAkB;YAC/B,kBAAkB,EAAE,4BAA4B;YAChD,QAAQ,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,CAAC;YAC/E,MAAM,EAAE,GAAG;SACZ;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
/**
|
|
3
|
+
* Feature 058 — Credentials module (init).
|
|
4
|
+
*
|
|
5
|
+
* Creates `credential_configurations` — reusable, named instances of a
|
|
6
|
+
* code-registered configuration type. Secret field values are stored as
|
|
7
|
+
* AES-256-GCM envelopes inside the `values` JSONB bag; the type/provider codes
|
|
8
|
+
* are resolved against the in-process registry (no DB-level FK).
|
|
9
|
+
*
|
|
10
|
+
* `code` is globally unique (stable reference target). `type_code` is indexed
|
|
11
|
+
* for the "list by type" picker query.
|
|
12
|
+
*/
|
|
13
|
+
export declare class Migration20260721T011509CredentialsInit extends Migration {
|
|
14
|
+
up(): Promise<void>;
|
|
15
|
+
down(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=20260721T011509_credentials_init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260721T011509_credentials_init.d.ts","sourceRoot":"","sources":["../../src/migrations/20260721T011509_credentials_init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,qBAAa,uCAAwC,SAAQ,SAAS;IACrD,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
/**
|
|
3
|
+
* Feature 058 — Credentials module (init).
|
|
4
|
+
*
|
|
5
|
+
* Creates `credential_configurations` — reusable, named instances of a
|
|
6
|
+
* code-registered configuration type. Secret field values are stored as
|
|
7
|
+
* AES-256-GCM envelopes inside the `values` JSONB bag; the type/provider codes
|
|
8
|
+
* are resolved against the in-process registry (no DB-level FK).
|
|
9
|
+
*
|
|
10
|
+
* `code` is globally unique (stable reference target). `type_code` is indexed
|
|
11
|
+
* for the "list by type" picker query.
|
|
12
|
+
*/
|
|
13
|
+
export class Migration20260721T011509CredentialsInit extends Migration {
|
|
14
|
+
async up() {
|
|
15
|
+
this.addSql(`
|
|
16
|
+
create table "credential_configurations" (
|
|
17
|
+
"id" uuid not null,
|
|
18
|
+
"code" varchar(128) not null,
|
|
19
|
+
"name" varchar(255) not null,
|
|
20
|
+
"type_code" varchar(64) not null,
|
|
21
|
+
"provider_code" varchar(64) not null,
|
|
22
|
+
"values" jsonb not null default '{}',
|
|
23
|
+
"version" int not null default 1,
|
|
24
|
+
"created_at" timestamptz not null,
|
|
25
|
+
"updated_at" timestamptz not null,
|
|
26
|
+
constraint "credential_configurations_pkey" primary key ("id")
|
|
27
|
+
);
|
|
28
|
+
`);
|
|
29
|
+
this.addSql(`alter table "credential_configurations" add constraint "credential_configurations_code_unique" unique ("code");`);
|
|
30
|
+
this.addSql(`create index "credential_configurations_type_code_idx" on "credential_configurations" ("type_code");`);
|
|
31
|
+
}
|
|
32
|
+
async down() {
|
|
33
|
+
this.addSql(`drop table if exists "credential_configurations" cascade;`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=20260721T011509_credentials_init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260721T011509_credentials_init.js","sourceRoot":"","sources":["../../src/migrations/20260721T011509_credentials_init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,uCAAwC,SAAQ,SAAS;IAC3D,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;KAaX,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CACT,iHAAiH,CAClH,CAAC;QACF,IAAI,CAAC,MAAM,CACT,sGAAsG,CACvG,CAAC;IACJ,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,2DAA2D,CAAC,CAAC;IAC3E,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `./migrations` subpath — every migration class this module owns, as one
|
|
3
|
+
* ordered `migrations` array.
|
|
4
|
+
*
|
|
5
|
+
* The array is what the platform reads when this module is **installed**:
|
|
6
|
+
* `src/packages/package-runtime.ts` takes `exported['migrations']` and refuses
|
|
7
|
+
* the package outright when it is absent (D-168).
|
|
8
|
+
*
|
|
9
|
+
* Listed in ascending timestamp, which is the order of this module's own
|
|
10
|
+
* migrations and of nothing else (feature 081): a manifest `dependencies` array
|
|
11
|
+
* is the only thing ordering this block against another module's.
|
|
12
|
+
*
|
|
13
|
+
* The **named** exports stay beside the array, and the asymmetry with
|
|
14
|
+
* `./backend` — which publishes an array and no named class (D-168) — is
|
|
15
|
+
* deliberate. `db/migrations-registry.generated.ts` imports each class by name
|
|
16
|
+
* from this specifier, and a migration class name is contract in a way an entity
|
|
17
|
+
* class name is not: `mikro_orm_migrations` persists it, so it is a string every
|
|
18
|
+
* already-migrated database holds.
|
|
19
|
+
*
|
|
20
|
+
* A class that is in neither the array nor the barrel is a migration that does
|
|
21
|
+
* not run: `migration:pending` reports nothing pending and the first symptom is
|
|
22
|
+
* a query against a table nobody created.
|
|
23
|
+
*/
|
|
24
|
+
import { Migration20260721T011509CredentialsInit } from './20260721T011509_credentials_init.js';
|
|
25
|
+
export declare const migrations: (typeof Migration20260721T011509CredentialsInit)[];
|
|
26
|
+
export { Migration20260721T011509CredentialsInit, };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,uCAAuC,EAAE,MAAM,uCAAuC,CAAC;AAEhG,eAAO,MAAM,UAAU,oDAEtB,CAAC;AAEF,OAAO,EACL,uCAAuC,GACxC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `./migrations` subpath — every migration class this module owns, as one
|
|
3
|
+
* ordered `migrations` array.
|
|
4
|
+
*
|
|
5
|
+
* The array is what the platform reads when this module is **installed**:
|
|
6
|
+
* `src/packages/package-runtime.ts` takes `exported['migrations']` and refuses
|
|
7
|
+
* the package outright when it is absent (D-168).
|
|
8
|
+
*
|
|
9
|
+
* Listed in ascending timestamp, which is the order of this module's own
|
|
10
|
+
* migrations and of nothing else (feature 081): a manifest `dependencies` array
|
|
11
|
+
* is the only thing ordering this block against another module's.
|
|
12
|
+
*
|
|
13
|
+
* The **named** exports stay beside the array, and the asymmetry with
|
|
14
|
+
* `./backend` — which publishes an array and no named class (D-168) — is
|
|
15
|
+
* deliberate. `db/migrations-registry.generated.ts` imports each class by name
|
|
16
|
+
* from this specifier, and a migration class name is contract in a way an entity
|
|
17
|
+
* class name is not: `mikro_orm_migrations` persists it, so it is a string every
|
|
18
|
+
* already-migrated database holds.
|
|
19
|
+
*
|
|
20
|
+
* A class that is in neither the array nor the barrel is a migration that does
|
|
21
|
+
* not run: `migration:pending` reports nothing pending and the first symptom is
|
|
22
|
+
* a query against a table nobody created.
|
|
23
|
+
*/
|
|
24
|
+
import { Migration20260721T011509CredentialsInit } from './20260721T011509_credentials_init.js';
|
|
25
|
+
export const migrations = [
|
|
26
|
+
Migration20260721T011509CredentialsInit,
|
|
27
|
+
];
|
|
28
|
+
export { Migration20260721T011509CredentialsInit, };
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,uCAAuC,EAAE,MAAM,uCAAuC,CAAC;AAEhG,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,uCAAuC;CACxC,CAAC;AAEF,OAAO,EACL,uCAAuC,GACxC,CAAC"}
|