@contractspec/module.examples 1.44.1 → 1.45.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/dist/builtins.js.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.js +3 -4
- package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js +6 -0
- package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js.map +1 -0
- package/dist/libs/contracts/dist/app-config/spec.js +1 -0
- package/dist/libs/contracts/dist/capabilities/capabilities.js +1 -0
- package/dist/libs/contracts/dist/capabilities/index.js +2 -0
- package/dist/libs/contracts/dist/capabilities/openbanking.js +89 -0
- package/dist/libs/contracts/dist/capabilities/openbanking.js.map +1 -0
- package/dist/libs/contracts/dist/client/index.js +5 -0
- package/dist/libs/contracts/dist/client/react/feature-render.js +3 -0
- package/dist/libs/contracts/dist/client/react/form-render.js +6 -0
- package/dist/libs/contracts/dist/client/react/index.js +4 -0
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -0
- package/dist/libs/contracts/dist/contract-registry/schemas.js +61 -0
- package/dist/libs/contracts/dist/contract-registry/schemas.js.map +1 -0
- package/dist/libs/contracts/dist/data-views/index.js +1 -0
- package/dist/libs/contracts/dist/data-views/registry.js +1 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/index.js +27 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
- package/dist/libs/contracts/dist/docs/presentations.js +57 -0
- package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
- package/dist/libs/contracts/dist/docs/registry.js +45 -0
- package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-import.docblock.js +65 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-import.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +49 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +46 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +68 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +63 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +102 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
- package/dist/libs/contracts/dist/events.js +2 -0
- package/dist/libs/contracts/dist/examples/index.js +3 -0
- package/dist/libs/contracts/dist/examples/registry.js +145 -0
- package/dist/libs/contracts/dist/examples/registry.js.map +1 -0
- package/dist/libs/contracts/dist/examples/schema.js +102 -0
- package/dist/libs/contracts/dist/examples/schema.js.map +1 -0
- package/dist/libs/contracts/dist/examples/validation.js +1 -0
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -0
- package/dist/libs/contracts/dist/experiments/spec.js +1 -0
- package/dist/libs/contracts/dist/features/index.js +1 -0
- package/dist/libs/contracts/dist/features/registry.js +7 -0
- package/dist/libs/contracts/dist/features/registry.js.map +1 -0
- package/dist/libs/contracts/dist/forms/forms.js +2 -0
- package/dist/libs/contracts/dist/forms/index.js +1 -0
- package/dist/libs/contracts/dist/index.js +109 -0
- package/dist/libs/contracts/dist/index.js.map +1 -0
- package/dist/libs/contracts/dist/install.js +2 -0
- package/dist/libs/contracts/dist/integrations/index.js +19 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +230 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +161 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +212 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +243 -0
- package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +14 -0
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/operations.js +384 -0
- package/dist/libs/contracts/dist/integrations/operations.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -0
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -0
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -0
- package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -0
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -0
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -0
- package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -0
- package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -0
- package/dist/libs/contracts/dist/integrations/providers/powens.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -0
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/registry.js +11 -0
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -0
- package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -0
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/spec.js +1 -0
- package/dist/libs/contracts/dist/jsonschema.js +1 -0
- package/dist/libs/contracts/dist/knowledge/index.js +8 -0
- package/dist/libs/contracts/dist/knowledge/operations.js +313 -0
- package/dist/libs/contracts/dist/knowledge/operations.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -0
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -0
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spec.js +1 -0
- package/dist/libs/contracts/dist/llm/exporters.js +21 -0
- package/dist/libs/contracts/dist/llm/exporters.js.map +1 -0
- package/dist/libs/contracts/dist/llm/index.js +2 -0
- package/dist/libs/contracts/dist/llm/prompts.js +1 -0
- package/dist/libs/contracts/dist/migrations.js +1 -0
- package/dist/libs/contracts/dist/model-registry.js +1 -0
- package/dist/libs/contracts/dist/onboarding-base.js +198 -0
- package/dist/libs/contracts/dist/onboarding-base.js.map +1 -0
- package/dist/libs/contracts/dist/openapi.js +2 -0
- package/dist/libs/contracts/dist/operations/index.js +2 -0
- package/dist/libs/contracts/dist/operations/operation.js +35 -0
- package/dist/libs/contracts/dist/operations/operation.js.map +1 -0
- package/dist/libs/contracts/dist/operations/registry.js +2 -0
- package/dist/libs/contracts/dist/ownership.js +22 -0
- package/dist/libs/contracts/dist/ownership.js.map +1 -0
- package/dist/libs/contracts/dist/policy/engine.js +1 -0
- package/dist/libs/contracts/dist/policy/index.js +2 -0
- package/dist/libs/contracts/dist/policy/registry.js +1 -0
- package/dist/libs/contracts/dist/presentations/index.js +2 -0
- package/dist/libs/contracts/dist/presentations/registry.js +1 -0
- package/dist/libs/contracts/dist/presentations/transform-engine.js +13 -0
- package/dist/libs/contracts/dist/presentations/transform-engine.js.map +1 -0
- package/dist/libs/contracts/dist/prompt.js +1 -0
- package/dist/libs/contracts/dist/promptRegistry.js +2 -0
- package/dist/libs/contracts/dist/regenerator/index.js +1 -0
- package/dist/libs/contracts/dist/regenerator/service.js +5 -0
- package/dist/libs/contracts/dist/regenerator/service.js.map +1 -0
- package/dist/libs/contracts/dist/registry-utils.js +71 -0
- package/dist/libs/contracts/dist/registry-utils.js.map +1 -0
- package/dist/libs/contracts/dist/registry.js +8 -0
- package/dist/libs/contracts/dist/registry.js.map +1 -0
- package/dist/libs/contracts/dist/resources.js +1 -0
- package/dist/libs/contracts/dist/schema-to-markdown.js +1 -0
- package/dist/libs/contracts/dist/server/contracts-adapter-input.js +1 -0
- package/dist/libs/contracts/dist/server/graphql-pothos.js +8 -0
- package/dist/libs/contracts/dist/server/index.js +8 -0
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -0
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -0
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -0
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -0
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -0
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -0
- package/dist/libs/contracts/dist/server/rest-express.js +1 -0
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -0
- package/dist/libs/contracts/dist/telemetry/index.js +2 -0
- package/dist/libs/contracts/dist/telemetry/spec.js +2 -0
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -0
- package/dist/libs/contracts/dist/tests/index.js +2 -0
- package/dist/libs/contracts/dist/tests/runner.js +2 -0
- package/dist/libs/contracts/dist/tests/spec.js +1 -0
- package/dist/libs/contracts/dist/themes.js +1 -0
- package/dist/libs/contracts/dist/workflow/index.js +2 -0
- package/dist/libs/contracts/dist/workflow/overview.docblock.js +21 -0
- package/dist/libs/contracts/dist/workflow/overview.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/workflow/runner.js +1 -0
- package/dist/libs/contracts/dist/workflow/spec.js +1 -0
- package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +263 -0
- package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +1 -0
- package/dist/libs/contracts/dist/workspace-config/index.js +1 -0
- package/dist/libs/contracts/dist/workspace-config/workspace-config.docblock.js +45 -0
- package/dist/libs/contracts/dist/workspace-config/workspace-config.docblock.js.map +1 -0
- package/dist/libs/schema/dist/EnumType.js +2 -0
- package/dist/libs/schema/dist/FieldType.js +50 -0
- package/dist/libs/schema/dist/FieldType.js.map +1 -0
- package/dist/libs/schema/dist/GraphQLSchemaType.js +1 -0
- package/dist/libs/schema/dist/JsonSchemaType.js +1 -0
- package/dist/libs/schema/dist/ScalarTypeEnum.js +237 -0
- package/dist/libs/schema/dist/ScalarTypeEnum.js.map +1 -0
- package/dist/libs/schema/dist/SchemaModel.js +35 -0
- package/dist/libs/schema/dist/SchemaModel.js.map +1 -0
- package/dist/libs/schema/dist/ZodSchemaType.js +1 -0
- package/dist/libs/schema/dist/entity/defineEntity.js +1 -0
- package/dist/libs/schema/dist/entity/index.js +2 -0
- package/dist/libs/schema/dist/entity/types.js +1 -0
- package/dist/libs/schema/dist/index.js +9 -0
- package/dist/registry.d.ts +20 -6
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +24 -10
- package/dist/registry.js.map +1 -1
- package/package.json +37 -37
- package/dist/builtins.d.ts +0 -7
- package/dist/builtins.d.ts.map +0 -1
- package/dist/types.d.ts +0 -53
- package/dist/types.d.ts.map +0 -1
- package/dist/validate.d.ts +0 -19
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js +0 -90
- package/dist/validate.js.map +0 -1
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { ScalarTypeEnum } from "../../../../schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { SchemaModel } from "../../../../schema/dist/SchemaModel.js";
|
|
3
|
+
import "../../../../schema/dist/index.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../libs/contracts/dist/integrations/openbanking/models.js
|
|
6
|
+
const BankAccountRecord = new SchemaModel({
|
|
7
|
+
name: "BankAccountRecord",
|
|
8
|
+
description: "Canonical representation of a bank account synced from an open banking provider.",
|
|
9
|
+
fields: {
|
|
10
|
+
id: {
|
|
11
|
+
type: ScalarTypeEnum.ID(),
|
|
12
|
+
isOptional: false
|
|
13
|
+
},
|
|
14
|
+
tenantId: {
|
|
15
|
+
type: ScalarTypeEnum.ID(),
|
|
16
|
+
isOptional: false
|
|
17
|
+
},
|
|
18
|
+
userId: {
|
|
19
|
+
type: ScalarTypeEnum.ID(),
|
|
20
|
+
isOptional: false
|
|
21
|
+
},
|
|
22
|
+
connectionId: {
|
|
23
|
+
type: ScalarTypeEnum.ID(),
|
|
24
|
+
isOptional: false
|
|
25
|
+
},
|
|
26
|
+
externalId: {
|
|
27
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
28
|
+
isOptional: false
|
|
29
|
+
},
|
|
30
|
+
institutionId: {
|
|
31
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
32
|
+
isOptional: false
|
|
33
|
+
},
|
|
34
|
+
institutionName: {
|
|
35
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
36
|
+
isOptional: false
|
|
37
|
+
},
|
|
38
|
+
institutionLogoUrl: {
|
|
39
|
+
type: ScalarTypeEnum.URL(),
|
|
40
|
+
isOptional: true
|
|
41
|
+
},
|
|
42
|
+
iban: {
|
|
43
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
44
|
+
isOptional: true
|
|
45
|
+
},
|
|
46
|
+
bic: {
|
|
47
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
48
|
+
isOptional: true
|
|
49
|
+
},
|
|
50
|
+
accountType: {
|
|
51
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
52
|
+
isOptional: false
|
|
53
|
+
},
|
|
54
|
+
currency: {
|
|
55
|
+
type: ScalarTypeEnum.Currency(),
|
|
56
|
+
isOptional: false
|
|
57
|
+
},
|
|
58
|
+
displayName: {
|
|
59
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
60
|
+
isOptional: false
|
|
61
|
+
},
|
|
62
|
+
accountNumberMasked: {
|
|
63
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
64
|
+
isOptional: true
|
|
65
|
+
},
|
|
66
|
+
productCode: {
|
|
67
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
68
|
+
isOptional: true
|
|
69
|
+
},
|
|
70
|
+
balance: {
|
|
71
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
72
|
+
isOptional: true
|
|
73
|
+
},
|
|
74
|
+
availableBalance: {
|
|
75
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
76
|
+
isOptional: true
|
|
77
|
+
},
|
|
78
|
+
lastSyncedAt: {
|
|
79
|
+
type: ScalarTypeEnum.DateTime(),
|
|
80
|
+
isOptional: false
|
|
81
|
+
},
|
|
82
|
+
createdAt: {
|
|
83
|
+
type: ScalarTypeEnum.DateTime(),
|
|
84
|
+
isOptional: false
|
|
85
|
+
},
|
|
86
|
+
updatedAt: {
|
|
87
|
+
type: ScalarTypeEnum.DateTime(),
|
|
88
|
+
isOptional: false
|
|
89
|
+
},
|
|
90
|
+
metadata: {
|
|
91
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
92
|
+
isOptional: true
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
const BankTransactionRecord = new SchemaModel({
|
|
97
|
+
name: "BankTransactionRecord",
|
|
98
|
+
description: "Canonical transaction entry mapped from Powens into the open banking ledger.",
|
|
99
|
+
fields: {
|
|
100
|
+
id: {
|
|
101
|
+
type: ScalarTypeEnum.ID(),
|
|
102
|
+
isOptional: false
|
|
103
|
+
},
|
|
104
|
+
accountId: {
|
|
105
|
+
type: ScalarTypeEnum.ID(),
|
|
106
|
+
isOptional: false
|
|
107
|
+
},
|
|
108
|
+
tenantId: {
|
|
109
|
+
type: ScalarTypeEnum.ID(),
|
|
110
|
+
isOptional: false
|
|
111
|
+
},
|
|
112
|
+
connectionId: {
|
|
113
|
+
type: ScalarTypeEnum.ID(),
|
|
114
|
+
isOptional: false
|
|
115
|
+
},
|
|
116
|
+
externalId: {
|
|
117
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
118
|
+
isOptional: false
|
|
119
|
+
},
|
|
120
|
+
amount: {
|
|
121
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
122
|
+
isOptional: false
|
|
123
|
+
},
|
|
124
|
+
currency: {
|
|
125
|
+
type: ScalarTypeEnum.Currency(),
|
|
126
|
+
isOptional: false
|
|
127
|
+
},
|
|
128
|
+
date: {
|
|
129
|
+
type: ScalarTypeEnum.DateTime(),
|
|
130
|
+
isOptional: false
|
|
131
|
+
},
|
|
132
|
+
bookingDate: {
|
|
133
|
+
type: ScalarTypeEnum.DateTime(),
|
|
134
|
+
isOptional: true
|
|
135
|
+
},
|
|
136
|
+
valueDate: {
|
|
137
|
+
type: ScalarTypeEnum.DateTime(),
|
|
138
|
+
isOptional: true
|
|
139
|
+
},
|
|
140
|
+
description: {
|
|
141
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
142
|
+
isOptional: true
|
|
143
|
+
},
|
|
144
|
+
counterpartyName: {
|
|
145
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
146
|
+
isOptional: true
|
|
147
|
+
},
|
|
148
|
+
counterpartyAccount: {
|
|
149
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
150
|
+
isOptional: true
|
|
151
|
+
},
|
|
152
|
+
merchantCategoryCode: {
|
|
153
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
154
|
+
isOptional: true
|
|
155
|
+
},
|
|
156
|
+
rawCategory: {
|
|
157
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
158
|
+
isOptional: true
|
|
159
|
+
},
|
|
160
|
+
standardizedCategory: {
|
|
161
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
162
|
+
isOptional: true
|
|
163
|
+
},
|
|
164
|
+
transactionType: {
|
|
165
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
166
|
+
isOptional: false
|
|
167
|
+
},
|
|
168
|
+
status: {
|
|
169
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
170
|
+
isOptional: false
|
|
171
|
+
},
|
|
172
|
+
runningBalance: {
|
|
173
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
174
|
+
isOptional: true
|
|
175
|
+
},
|
|
176
|
+
metadata: {
|
|
177
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
178
|
+
isOptional: true
|
|
179
|
+
},
|
|
180
|
+
createdAt: {
|
|
181
|
+
type: ScalarTypeEnum.DateTime(),
|
|
182
|
+
isOptional: false
|
|
183
|
+
},
|
|
184
|
+
updatedAt: {
|
|
185
|
+
type: ScalarTypeEnum.DateTime(),
|
|
186
|
+
isOptional: false
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
const AccountBalanceRecord = new SchemaModel({
|
|
191
|
+
name: "AccountBalanceRecord",
|
|
192
|
+
description: "Canonical balance snapshot computed from Powens balance payloads.",
|
|
193
|
+
fields: {
|
|
194
|
+
id: {
|
|
195
|
+
type: ScalarTypeEnum.ID(),
|
|
196
|
+
isOptional: false
|
|
197
|
+
},
|
|
198
|
+
accountId: {
|
|
199
|
+
type: ScalarTypeEnum.ID(),
|
|
200
|
+
isOptional: false
|
|
201
|
+
},
|
|
202
|
+
tenantId: {
|
|
203
|
+
type: ScalarTypeEnum.ID(),
|
|
204
|
+
isOptional: false
|
|
205
|
+
},
|
|
206
|
+
connectionId: {
|
|
207
|
+
type: ScalarTypeEnum.ID(),
|
|
208
|
+
isOptional: false
|
|
209
|
+
},
|
|
210
|
+
balanceType: {
|
|
211
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
212
|
+
isOptional: false
|
|
213
|
+
},
|
|
214
|
+
currentBalance: {
|
|
215
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
216
|
+
isOptional: false
|
|
217
|
+
},
|
|
218
|
+
availableBalance: {
|
|
219
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
220
|
+
isOptional: true
|
|
221
|
+
},
|
|
222
|
+
currency: {
|
|
223
|
+
type: ScalarTypeEnum.Currency(),
|
|
224
|
+
isOptional: false
|
|
225
|
+
},
|
|
226
|
+
lastUpdatedAt: {
|
|
227
|
+
type: ScalarTypeEnum.DateTime(),
|
|
228
|
+
isOptional: false
|
|
229
|
+
},
|
|
230
|
+
createdAt: {
|
|
231
|
+
type: ScalarTypeEnum.DateTime(),
|
|
232
|
+
isOptional: false
|
|
233
|
+
},
|
|
234
|
+
metadata: {
|
|
235
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
236
|
+
isOptional: true
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
//#endregion
|
|
242
|
+
export { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord };
|
|
243
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/integrations/openbanking/models.js"],"sourcesContent":["import { ScalarTypeEnum, SchemaModel } from \"@contractspec/lib.schema\";\n\n//#region src/integrations/openbanking/models.ts\nconst BankAccountRecord = new SchemaModel({\n\tname: \"BankAccountRecord\",\n\tdescription: \"Canonical representation of a bank account synced from an open banking provider.\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalId: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tinstitutionId: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tinstitutionName: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tinstitutionLogoUrl: {\n\t\t\ttype: ScalarTypeEnum.URL(),\n\t\t\tisOptional: true\n\t\t},\n\t\tiban: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbic: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\taccountType: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcurrency: {\n\t\t\ttype: ScalarTypeEnum.Currency(),\n\t\t\tisOptional: false\n\t\t},\n\t\tdisplayName: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountNumberMasked: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tproductCode: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbalance: {\n\t\t\ttype: ScalarTypeEnum.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tavailableBalance: {\n\t\t\ttype: ScalarTypeEnum.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncedAt: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\tmetadata: {\n\t\t\ttype: ScalarTypeEnum.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst BankTransactionRecord = new SchemaModel({\n\tname: \"BankTransactionRecord\",\n\tdescription: \"Canonical transaction entry mapped from Powens into the open banking ledger.\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalId: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tamount: {\n\t\t\ttype: ScalarTypeEnum.Float_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcurrency: {\n\t\t\ttype: ScalarTypeEnum.Currency(),\n\t\t\tisOptional: false\n\t\t},\n\t\tdate: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\tbookingDate: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tvalueDate: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdescription: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcounterpartyName: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcounterpartyAccount: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tmerchantCategoryCode: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\trawCategory: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstandardizedCategory: {\n\t\t\ttype: ScalarTypeEnum.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttransactionType: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\trunningBalance: {\n\t\t\ttype: ScalarTypeEnum.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tmetadata: {\n\t\t\ttype: ScalarTypeEnum.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst AccountBalanceRecord = new SchemaModel({\n\tname: \"AccountBalanceRecord\",\n\tdescription: \"Canonical balance snapshot computed from Powens balance payloads.\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: ScalarTypeEnum.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tbalanceType: {\n\t\t\ttype: ScalarTypeEnum.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcurrentBalance: {\n\t\t\ttype: ScalarTypeEnum.Float_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tavailableBalance: {\n\t\t\ttype: ScalarTypeEnum.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcurrency: {\n\t\t\ttype: ScalarTypeEnum.Currency(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlastUpdatedAt: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: ScalarTypeEnum.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\tmetadata: {\n\t\t\ttype: ScalarTypeEnum.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\n\n//#endregion\nexport { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord };"],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region ../../libs/contracts/dist/integrations/openbanking/telemetry.js
|
|
2
|
+
const OPENBANKING_TELEMETRY_EVENTS = {
|
|
3
|
+
accountsSynced: "openbanking.accounts.synced",
|
|
4
|
+
accountsSyncFailed: "openbanking.accounts.sync_failed",
|
|
5
|
+
transactionsSynced: "openbanking.transactions.synced",
|
|
6
|
+
transactionsSyncFailed: "openbanking.transactions.sync_failed",
|
|
7
|
+
balancesRefreshed: "openbanking.balances.refreshed",
|
|
8
|
+
balancesRefreshFailed: "openbanking.balances.refresh_failed",
|
|
9
|
+
overviewGenerated: "openbanking.overview.generated"
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { OPENBANKING_TELEMETRY_EVENTS };
|
|
14
|
+
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/integrations/openbanking/telemetry.js"],"sourcesContent":["//#region src/integrations/openbanking/telemetry.ts\nconst OPENBANKING_PII_FIELDS = [\n\t\"iban\",\n\t\"bic\",\n\t\"accountNumberMasked\",\n\t\"accountNumber\",\n\t\"counterpartyName\",\n\t\"counterpartyAccount\",\n\t\"description\",\n\t\"merchantName\",\n\t\"merchantCategoryCode\",\n\t\"reference\"\n];\nconst OPENBANKING_TELEMETRY_EVENTS = {\n\taccountsSynced: \"openbanking.accounts.synced\",\n\taccountsSyncFailed: \"openbanking.accounts.sync_failed\",\n\ttransactionsSynced: \"openbanking.transactions.synced\",\n\ttransactionsSyncFailed: \"openbanking.transactions.sync_failed\",\n\tbalancesRefreshed: \"openbanking.balances.refreshed\",\n\tbalancesRefreshFailed: \"openbanking.balances.refresh_failed\",\n\toverviewGenerated: \"openbanking.overview.generated\"\n};\nfunction redactOpenBankingTelemetryPayload(payload) {\n\tconst redacted = {};\n\tfor (const [key, value] of Object.entries(payload)) if (OPENBANKING_PII_FIELDS.includes(key)) redacted[key] = maskValue(value);\n\telse if (Array.isArray(value)) redacted[key] = value.map((item) => typeof item === \"object\" && item !== null ? redactOpenBankingTelemetryPayload(item) : item);\n\telse if (typeof value === \"object\" && value !== null) redacted[key] = redactOpenBankingTelemetryPayload(value);\n\telse redacted[key] = value;\n\treturn redacted;\n}\nfunction maskValue(value) {\n\tif (value == null) return \"\";\n\tconst str = String(value);\n\tif (str.length <= 4) return \"*\".repeat(str.length);\n\treturn `${\"*\".repeat(Math.max(str.length - 4, 0))}${str.slice(-4)}`;\n}\n\n//#endregion\nexport { OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, redactOpenBankingTelemetryPayload };"],"mappings":";AAaA,MAAM,+BAA+B;CACpC,gBAAgB;CAChB,oBAAoB;CACpB,oBAAoB;CACpB,wBAAwB;CACxB,mBAAmB;CACnB,uBAAuB;CACvB,mBAAmB;CACnB"}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { ScalarTypeEnum } from "../../../schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { SchemaModel } from "../../../schema/dist/SchemaModel.js";
|
|
3
|
+
import "../../../schema/dist/index.js";
|
|
4
|
+
import { defineCommand, defineQuery } from "../operations/operation.js";
|
|
5
|
+
import "../operations/index.js";
|
|
6
|
+
|
|
7
|
+
//#region ../../libs/contracts/dist/integrations/operations.js
|
|
8
|
+
const IntegrationConnectionRecord = new SchemaModel({
|
|
9
|
+
name: "IntegrationConnectionRecord",
|
|
10
|
+
fields: {
|
|
11
|
+
id: {
|
|
12
|
+
type: ScalarTypeEnum.ID(),
|
|
13
|
+
isOptional: false
|
|
14
|
+
},
|
|
15
|
+
tenantId: {
|
|
16
|
+
type: ScalarTypeEnum.ID(),
|
|
17
|
+
isOptional: false
|
|
18
|
+
},
|
|
19
|
+
integrationKey: {
|
|
20
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
21
|
+
isOptional: false
|
|
22
|
+
},
|
|
23
|
+
integrationVersion: {
|
|
24
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
25
|
+
isOptional: false
|
|
26
|
+
},
|
|
27
|
+
label: {
|
|
28
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
+
isOptional: false
|
|
30
|
+
},
|
|
31
|
+
ownershipMode: {
|
|
32
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
+
isOptional: false
|
|
34
|
+
},
|
|
35
|
+
externalAccountId: {
|
|
36
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
37
|
+
isOptional: true
|
|
38
|
+
},
|
|
39
|
+
secretProvider: {
|
|
40
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
41
|
+
isOptional: false
|
|
42
|
+
},
|
|
43
|
+
secretRef: {
|
|
44
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
45
|
+
isOptional: false
|
|
46
|
+
},
|
|
47
|
+
status: {
|
|
48
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
+
isOptional: false
|
|
50
|
+
},
|
|
51
|
+
environment: {
|
|
52
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
53
|
+
isOptional: true
|
|
54
|
+
},
|
|
55
|
+
healthStatus: {
|
|
56
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
57
|
+
isOptional: true
|
|
58
|
+
},
|
|
59
|
+
healthCheckedAt: {
|
|
60
|
+
type: ScalarTypeEnum.DateTime(),
|
|
61
|
+
isOptional: true
|
|
62
|
+
},
|
|
63
|
+
healthLatencyMs: {
|
|
64
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
65
|
+
isOptional: true
|
|
66
|
+
},
|
|
67
|
+
healthErrorCode: {
|
|
68
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
69
|
+
isOptional: true
|
|
70
|
+
},
|
|
71
|
+
healthErrorMessage: {
|
|
72
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
73
|
+
isOptional: true
|
|
74
|
+
},
|
|
75
|
+
usageRequestCount: {
|
|
76
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
77
|
+
isOptional: true
|
|
78
|
+
},
|
|
79
|
+
usageSuccessCount: {
|
|
80
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
81
|
+
isOptional: true
|
|
82
|
+
},
|
|
83
|
+
usageErrorCount: {
|
|
84
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
85
|
+
isOptional: true
|
|
86
|
+
},
|
|
87
|
+
usageLastUsedAt: {
|
|
88
|
+
type: ScalarTypeEnum.DateTime(),
|
|
89
|
+
isOptional: true
|
|
90
|
+
},
|
|
91
|
+
usageLastErrorAt: {
|
|
92
|
+
type: ScalarTypeEnum.DateTime(),
|
|
93
|
+
isOptional: true
|
|
94
|
+
},
|
|
95
|
+
usageLastErrorCode: {
|
|
96
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
97
|
+
isOptional: true
|
|
98
|
+
},
|
|
99
|
+
createdAt: {
|
|
100
|
+
type: ScalarTypeEnum.DateTime(),
|
|
101
|
+
isOptional: true
|
|
102
|
+
},
|
|
103
|
+
updatedAt: {
|
|
104
|
+
type: ScalarTypeEnum.DateTime(),
|
|
105
|
+
isOptional: true
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
const CreateIntegrationConnectionInput = new SchemaModel({
|
|
110
|
+
name: "CreateIntegrationConnectionInput",
|
|
111
|
+
fields: {
|
|
112
|
+
tenantId: {
|
|
113
|
+
type: ScalarTypeEnum.ID(),
|
|
114
|
+
isOptional: false
|
|
115
|
+
},
|
|
116
|
+
integrationKey: {
|
|
117
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
118
|
+
isOptional: false
|
|
119
|
+
},
|
|
120
|
+
integrationVersion: {
|
|
121
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
122
|
+
isOptional: false
|
|
123
|
+
},
|
|
124
|
+
label: {
|
|
125
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
126
|
+
isOptional: false
|
|
127
|
+
},
|
|
128
|
+
ownershipMode: {
|
|
129
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
130
|
+
isOptional: false
|
|
131
|
+
},
|
|
132
|
+
externalAccountId: {
|
|
133
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
134
|
+
isOptional: true
|
|
135
|
+
},
|
|
136
|
+
secretProvider: {
|
|
137
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
138
|
+
isOptional: false
|
|
139
|
+
},
|
|
140
|
+
secretRef: {
|
|
141
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
142
|
+
isOptional: false
|
|
143
|
+
},
|
|
144
|
+
environment: {
|
|
145
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
146
|
+
isOptional: true
|
|
147
|
+
},
|
|
148
|
+
config: {
|
|
149
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
150
|
+
isOptional: false
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
const UpdateIntegrationConnectionInput = new SchemaModel({
|
|
155
|
+
name: "UpdateIntegrationConnectionInput",
|
|
156
|
+
fields: {
|
|
157
|
+
connectionId: {
|
|
158
|
+
type: ScalarTypeEnum.ID(),
|
|
159
|
+
isOptional: false
|
|
160
|
+
},
|
|
161
|
+
label: {
|
|
162
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
163
|
+
isOptional: true
|
|
164
|
+
},
|
|
165
|
+
status: {
|
|
166
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
167
|
+
isOptional: true
|
|
168
|
+
},
|
|
169
|
+
ownershipMode: {
|
|
170
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
171
|
+
isOptional: true
|
|
172
|
+
},
|
|
173
|
+
externalAccountId: {
|
|
174
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
175
|
+
isOptional: true
|
|
176
|
+
},
|
|
177
|
+
secretProvider: {
|
|
178
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
179
|
+
isOptional: true
|
|
180
|
+
},
|
|
181
|
+
secretRef: {
|
|
182
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
183
|
+
isOptional: true
|
|
184
|
+
},
|
|
185
|
+
config: {
|
|
186
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
187
|
+
isOptional: true
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
const DeleteIntegrationConnectionInput = new SchemaModel({
|
|
192
|
+
name: "DeleteIntegrationConnectionInput",
|
|
193
|
+
fields: { connectionId: {
|
|
194
|
+
type: ScalarTypeEnum.ID(),
|
|
195
|
+
isOptional: false
|
|
196
|
+
} }
|
|
197
|
+
});
|
|
198
|
+
const ListIntegrationConnectionsInput = new SchemaModel({
|
|
199
|
+
name: "ListIntegrationConnectionsInput",
|
|
200
|
+
fields: {
|
|
201
|
+
tenantId: {
|
|
202
|
+
type: ScalarTypeEnum.ID(),
|
|
203
|
+
isOptional: false
|
|
204
|
+
},
|
|
205
|
+
category: {
|
|
206
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
207
|
+
isOptional: true
|
|
208
|
+
},
|
|
209
|
+
status: {
|
|
210
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
211
|
+
isOptional: true
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
const ListIntegrationConnectionsOutput = new SchemaModel({
|
|
216
|
+
name: "ListIntegrationConnectionsOutput",
|
|
217
|
+
fields: { connections: {
|
|
218
|
+
type: IntegrationConnectionRecord,
|
|
219
|
+
isOptional: false,
|
|
220
|
+
isArray: true
|
|
221
|
+
} }
|
|
222
|
+
});
|
|
223
|
+
const TestIntegrationConnectionInput = new SchemaModel({
|
|
224
|
+
name: "TestIntegrationConnectionInput",
|
|
225
|
+
fields: { connectionId: {
|
|
226
|
+
type: ScalarTypeEnum.ID(),
|
|
227
|
+
isOptional: false
|
|
228
|
+
} }
|
|
229
|
+
});
|
|
230
|
+
const TestIntegrationConnectionOutput = new SchemaModel({
|
|
231
|
+
name: "TestIntegrationConnectionOutput",
|
|
232
|
+
fields: {
|
|
233
|
+
success: {
|
|
234
|
+
type: ScalarTypeEnum.Boolean(),
|
|
235
|
+
isOptional: false
|
|
236
|
+
},
|
|
237
|
+
status: {
|
|
238
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
239
|
+
isOptional: true
|
|
240
|
+
},
|
|
241
|
+
latencyMs: {
|
|
242
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
243
|
+
isOptional: true
|
|
244
|
+
},
|
|
245
|
+
error: {
|
|
246
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
247
|
+
isOptional: true
|
|
248
|
+
},
|
|
249
|
+
errorCode: {
|
|
250
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
251
|
+
isOptional: true
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
const DeleteIntegrationConnectionOutput = new SchemaModel({
|
|
256
|
+
name: "DeleteIntegrationConnectionOutput",
|
|
257
|
+
fields: { success: {
|
|
258
|
+
type: ScalarTypeEnum.Boolean(),
|
|
259
|
+
isOptional: false
|
|
260
|
+
} }
|
|
261
|
+
});
|
|
262
|
+
const CreateIntegrationConnection = defineCommand({
|
|
263
|
+
meta: {
|
|
264
|
+
key: "integrations.connection.create",
|
|
265
|
+
title: "Create Integration Connection",
|
|
266
|
+
version: "1.0.0",
|
|
267
|
+
description: "Create a new integration connection for a tenant.",
|
|
268
|
+
goal: "Provision a tenant-scoped connection to an external provider.",
|
|
269
|
+
context: "Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.",
|
|
270
|
+
owners: ["@platform.integrations"],
|
|
271
|
+
tags: ["integration", "connections"],
|
|
272
|
+
stability: "experimental"
|
|
273
|
+
},
|
|
274
|
+
io: {
|
|
275
|
+
input: CreateIntegrationConnectionInput,
|
|
276
|
+
output: IntegrationConnectionRecord
|
|
277
|
+
},
|
|
278
|
+
policy: {
|
|
279
|
+
auth: "admin",
|
|
280
|
+
policies: [{
|
|
281
|
+
key: "platform.integration.manage",
|
|
282
|
+
version: "1.0.0"
|
|
283
|
+
}]
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
const UpdateIntegrationConnection = defineCommand({
|
|
287
|
+
meta: {
|
|
288
|
+
key: "integrations.connection.update",
|
|
289
|
+
title: "Update Integration Connection",
|
|
290
|
+
version: "1.0.0",
|
|
291
|
+
description: "Update metadata or credentials for an integration connection.",
|
|
292
|
+
goal: "Allow secure rotation of credentials and metadata adjustments.",
|
|
293
|
+
context: "Supports rotating API keys, toggling status, or updating labels for tenant integrations.",
|
|
294
|
+
owners: ["@platform.integrations"],
|
|
295
|
+
tags: ["integration", "connections"],
|
|
296
|
+
stability: "experimental"
|
|
297
|
+
},
|
|
298
|
+
io: {
|
|
299
|
+
input: UpdateIntegrationConnectionInput,
|
|
300
|
+
output: IntegrationConnectionRecord
|
|
301
|
+
},
|
|
302
|
+
policy: {
|
|
303
|
+
auth: "admin",
|
|
304
|
+
policies: [{
|
|
305
|
+
key: "platform.integration.manage",
|
|
306
|
+
version: "1.0.0"
|
|
307
|
+
}]
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
const DeleteIntegrationConnection = defineCommand({
|
|
311
|
+
meta: {
|
|
312
|
+
key: "integrations.connection.delete",
|
|
313
|
+
title: "Delete Integration Connection",
|
|
314
|
+
version: "1.0.0",
|
|
315
|
+
description: "Delete an integration connection for a tenant.",
|
|
316
|
+
goal: "Safely remove credentials and disable connector usage.",
|
|
317
|
+
context: "Ensures connections are de-provisioned when no longer needed or breached.",
|
|
318
|
+
owners: ["@platform.integrations"],
|
|
319
|
+
tags: ["integration", "connections"],
|
|
320
|
+
stability: "experimental"
|
|
321
|
+
},
|
|
322
|
+
io: {
|
|
323
|
+
input: DeleteIntegrationConnectionInput,
|
|
324
|
+
output: DeleteIntegrationConnectionOutput
|
|
325
|
+
},
|
|
326
|
+
policy: {
|
|
327
|
+
auth: "admin",
|
|
328
|
+
policies: [{
|
|
329
|
+
key: "platform.integration.manage",
|
|
330
|
+
version: "1.0.0"
|
|
331
|
+
}]
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
const ListIntegrationConnections = defineQuery({
|
|
335
|
+
meta: {
|
|
336
|
+
key: "integrations.connection.list",
|
|
337
|
+
title: "List Integration Connections",
|
|
338
|
+
version: "1.0.0",
|
|
339
|
+
description: "List integration connections for a tenant.",
|
|
340
|
+
goal: "Provide visibility into configured integrations and their status.",
|
|
341
|
+
context: "Used by the App Studio and Ops flows to show bindings and health.",
|
|
342
|
+
owners: ["@platform.integrations"],
|
|
343
|
+
tags: ["integration", "connections"],
|
|
344
|
+
stability: "experimental"
|
|
345
|
+
},
|
|
346
|
+
io: {
|
|
347
|
+
input: ListIntegrationConnectionsInput,
|
|
348
|
+
output: ListIntegrationConnectionsOutput
|
|
349
|
+
},
|
|
350
|
+
policy: {
|
|
351
|
+
auth: "admin",
|
|
352
|
+
policies: [{
|
|
353
|
+
key: "platform.integration.read",
|
|
354
|
+
version: "1.0.0"
|
|
355
|
+
}]
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
const TestIntegrationConnection = defineCommand({
|
|
359
|
+
meta: {
|
|
360
|
+
key: "integrations.connection.test",
|
|
361
|
+
title: "Test Integration Connection",
|
|
362
|
+
version: "1.0.0",
|
|
363
|
+
description: "Run a health check against a configured integration connection.",
|
|
364
|
+
goal: "Validate credentials and connectivity for external providers.",
|
|
365
|
+
context: "Triggered manually or by background monitors to confirm provider availability.",
|
|
366
|
+
owners: ["@platform.integrations"],
|
|
367
|
+
tags: ["integration", "connections"],
|
|
368
|
+
stability: "experimental"
|
|
369
|
+
},
|
|
370
|
+
io: {
|
|
371
|
+
input: TestIntegrationConnectionInput,
|
|
372
|
+
output: TestIntegrationConnectionOutput
|
|
373
|
+
},
|
|
374
|
+
policy: {
|
|
375
|
+
auth: "admin",
|
|
376
|
+
policies: [{
|
|
377
|
+
key: "platform.integration.manage",
|
|
378
|
+
version: "1.0.0"
|
|
379
|
+
}]
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
//#endregion
|
|
384
|
+
//# sourceMappingURL=operations.js.map
|