@lssm/example.wealth-snapshot 0.0.0-canary-20251220030446 → 0.0.0-canary-20251221114240
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/contracts/index.d.ts +111 -111
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
- package/dist/libs/contracts/dist/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +1 -1
- package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -1
- package/dist/libs/contracts/dist/llm/exporters.js.map +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
- package/dist/libs/contracts/dist/{spec.js → operation.js} +2 -2
- package/dist/libs/contracts/dist/operation.js.map +1 -0
- package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +98 -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/identity-rbac/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
- package/dist/libs/identity-rbac/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/index.js +2 -0
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/contracts.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/contracts.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/openbanking/contracts/balances.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/knowledge/contracts.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/knowledge/contracts.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/onboarding-base.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/onboarding-base.js.map +1 -1
- package/dist/{modules/audit-trail/dist/libs/contracts/dist/spec.js → libs/identity-rbac/dist/contracts/dist/operation.js} +2 -2
- package/dist/libs/identity-rbac/dist/contracts/dist/operation.js.map +1 -0
- package/dist/libs/identity-rbac/dist/contracts/dist/workspace-config/contractsrc-schema.js +94 -0
- package/dist/libs/identity-rbac/dist/contracts/dist/workspace-config/contractsrc-schema.js.map +1 -0
- package/dist/libs/identity-rbac/dist/contracts/dist/workspace-config/index.js +1 -0
- package/dist/libs/identity-rbac/dist/contracts/organization.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/organization.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/rbac.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/rbac.js.map +1 -1
- package/dist/libs/identity-rbac/dist/contracts/user.js +1 -1
- package/dist/libs/identity-rbac/dist/contracts/user.js.map +1 -1
- package/dist/modules/audit-trail/dist/contracts/index.js +1 -1
- package/dist/modules/audit-trail/dist/contracts/index.js.map +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
- package/dist/modules/audit-trail/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/index.js +2 -0
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/contracts.js +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/contracts.js.map +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/knowledge/contracts.js +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/onboarding-base.js +1 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
- package/dist/{libs/identity-rbac/dist/contracts/dist/spec.js → modules/audit-trail/dist/libs/contracts/dist/operation.js} +2 -2
- package/dist/modules/audit-trail/dist/libs/contracts/dist/operation.js.map +1 -0
- package/dist/modules/audit-trail/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +94 -0
- package/dist/modules/audit-trail/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +1 -0
- package/dist/modules/audit-trail/dist/libs/contracts/dist/workspace-config/index.js +1 -0
- package/dist/modules/notifications/dist/contracts/index.js +1 -1
- package/dist/modules/notifications/dist/contracts/index.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
- package/dist/modules/notifications/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/index.js +2 -0
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/contracts.js +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/contracts.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/knowledge/contracts.js +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/onboarding-base.js +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/{spec.js → operation.js} +2 -2
- package/dist/modules/notifications/dist/libs/contracts/dist/operation.js.map +1 -0
- package/dist/modules/notifications/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +94 -0
- package/dist/modules/notifications/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +1 -0
- package/dist/modules/notifications/dist/libs/contracts/dist/workspace-config/index.js +1 -0
- package/package.json +9 -9
- package/dist/libs/contracts/dist/spec.js.map +0 -1
- package/dist/libs/identity-rbac/dist/contracts/dist/spec.js.map +0 -1
- package/dist/modules/audit-trail/dist/libs/contracts/dist/spec.js.map +0 -1
- package/dist/modules/notifications/dist/libs/contracts/dist/spec.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.js","names":[],"sources":["../../../../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../
|
|
1
|
+
{"version":3,"file":"balances.js","names":[],"sources":["../../../../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../operation.js\";\nimport { AccountBalanceRecord } from \"../models.js\";\nimport { OPENBANKING_TELEMETRY_EVENTS } from \"../telemetry.js\";\n\n//#region ../../libs/contracts/dist/integrations/openbanking/contracts/balances.js\nconst OpenBankingGetBalancesInput = new x8({\n\tname: \"OpenBankingGetBalancesInput\",\n\tdescription: \"Parameters for retrieving bank account balances from the canonical ledger.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tbalanceTypes: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingGetBalancesOutput = new x8({\n\tname: \"OpenBankingGetBalancesOutput\",\n\tdescription: \"Canonical balances for a bank account.\",\n\tfields: {\n\t\tbalances: {\n\t\t\ttype: AccountBalanceRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\tasOf: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingRefreshBalancesInput = new x8({\n\tname: \"OpenBankingRefreshBalancesInput\",\n\tdescription: \"Command payload to refresh balances for a bank account via the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbalanceTypes: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tforceRefresh: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingRefreshBalancesOutput = new x8({\n\tname: \"OpenBankingRefreshBalancesOutput\",\n\tdescription: \"Result of a balance refresh against the open banking provider.\",\n\tfields: {\n\t\tbalances: {\n\t\t\ttype: AccountBalanceRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\trefreshedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\terrors: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingGetBalances = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.balances.get\",\n\t\tversion: 1,\n\t\tdescription: \"Retrieve the latest cached balances for a bank account.\",\n\t\tgoal: \"Expose current and available balances required by dashboards and analytics.\",\n\t\tcontext: \"Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"balances\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingGetBalancesInput,\n\t\toutput: OpenBankingGetBalancesOutput\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingRefreshBalances = defineCommand({\n\tmeta: {\n\t\tname: \"openbanking.balances.refresh\",\n\t\tversion: 1,\n\t\tdescription: \"Refresh balances for a bank account via the configured open banking provider.\",\n\t\tgoal: \"Ensure canonical balance records reflect the latest values from Powens.\",\n\t\tcontext: \"Triggered by scheduled workflows before generating summaries or forecasting cashflow.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"balances\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingRefreshBalancesInput,\n\t\toutput: OpenBankingRefreshBalancesOutput\n\t},\n\tpolicy: { auth: \"admin\" },\n\ttelemetry: {\n\t\tsuccess: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },\n\t\t\tproperties: ({ input, output }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\tconst result = output;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\trefreshedAt: result?.refreshedAt,\n\t\t\t\t\tbalanceCount: Array.isArray(result?.balances) ? result?.balances.length : void 0\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tfailure: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },\n\t\t\tproperties: ({ input, error }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error ?? \"unknown\")\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n});\n\n//#endregion\n//# sourceMappingURL=balances.js.map"],"mappings":";;;;;;AAMA,MAAM,8BAA8B,I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AAM,QAAQ;CACxB,CAAC;AACiC,cAAc;CAChD,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,mBAAmB;EAC5B,MAAM;GACL;GACA;GACA;GACA;EACD,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ,EAAE,MAAM,SAAS;CACzB,WAAW;EACV,SAAS;GACR,OAAO,EAAE,MAAM,6BAA6B,mBAAmB;GAC/D,aAAa,EAAE,OAAO,aAAa;IAClC,MAAM,UAAU;IAChB,MAAM,SAAS;AACf,WAAO;KACN,UAAU,SAAS;KACnB,WAAW,SAAS;KACpB,aAAa,QAAQ;KACrB,cAAc,MAAM,QAAQ,QAAQ,SAAS,GAAG,QAAQ,SAAS,SAAS,KAAK;KAC/E;;GAEF;EACD,SAAS;GACR,OAAO,EAAE,MAAM,6BAA6B,uBAAuB;GACnE,aAAa,EAAE,OAAO,YAAY;IACjC,MAAM,UAAU;AAChB,WAAO;KACN,UAAU,SAAS;KACnB,WAAW,SAAS;KACpB,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,SAAS,UAAU;KAC1E;;GAEF;EACD;CACD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E5, x8 } from "../../../schema/dist/index.js";
|
|
2
|
-
import { defineCommand, defineQuery } from "../../../
|
|
2
|
+
import { defineCommand, defineQuery } from "../../../operation.js";
|
|
3
3
|
import { BankTransactionRecord } from "../models.js";
|
|
4
4
|
import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","names":[],"sources":["../../../../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../
|
|
1
|
+
{"version":3,"file":"transactions.js","names":[],"sources":["../../../../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../operation.js\";\nimport { BankTransactionRecord } from \"../models.js\";\nimport { OPENBANKING_TELEMETRY_EVENTS } from \"../telemetry.js\";\n\n//#region ../../libs/contracts/dist/integrations/openbanking/contracts/transactions.js\nconst OpenBankingListTransactionsInput = new x8({\n\tname: \"OpenBankingListTransactionsInput\",\n\tdescription: \"Parameters for listing bank transactions from the canonical ledger.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfrom: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tto: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tpageSize: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdirection: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tminimumAmount: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tmaximumAmount: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcategory: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListTransactionsOutput = new x8({\n\tname: \"OpenBankingListTransactionsOutput\",\n\tdescription: \"Paginated list of transactions for a bank account.\",\n\tfields: {\n\t\ttransactions: {\n\t\t\ttype: BankTransactionRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\tnextCursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thasMore: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncTransactionsInput = new x8({\n\tname: \"OpenBankingSyncTransactionsInput\",\n\tdescription: \"Command payload to synchronise transactions from the open banking provider into the canonical ledger.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfrom: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tto: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludePending: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbackfillDays: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncTransactionsOutput = new x8({\n\tname: \"OpenBankingSyncTransactionsOutput\",\n\tdescription: \"Result of a transaction synchronisation run.\",\n\tfields: {\n\t\tsynced: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfailed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tearliestSyncedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlatestSyncedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tnextSinceToken: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terrors: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListTransactions = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.transactions.list\",\n\t\tversion: 1,\n\t\tdescription: \"List bank transactions that have been normalised into the canonical ledger.\",\n\t\tgoal: \"Allow downstream analytics and UI surfaces to page through canonical bank transactions.\",\n\t\tcontext: \"Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"transactions\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingListTransactionsInput,\n\t\toutput: OpenBankingListTransactionsOutput\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingSyncTransactions = defineCommand({\n\tmeta: {\n\t\tname: \"openbanking.transactions.sync\",\n\t\tversion: 1,\n\t\tdescription: \"Synchronise transactions for a bank account by calling the configured open banking provider.\",\n\t\tgoal: \"Ensure the canonical transaction ledger stays aligned with the external provider.\",\n\t\tcontext: \"Triggered by scheduled workflows or on-demand actions when activity is expected on an account.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"transactions\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingSyncTransactionsInput,\n\t\toutput: OpenBankingSyncTransactionsOutput\n\t},\n\tpolicy: { auth: \"admin\" },\n\ttelemetry: {\n\t\tsuccess: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced },\n\t\t\tproperties: ({ input, output }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\tconst result = output;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\tsynced: result?.synced,\n\t\t\t\t\tfailed: result?.failed,\n\t\t\t\t\tearliestSyncedAt: result?.earliestSyncedAt,\n\t\t\t\t\tlatestSyncedAt: result?.latestSyncedAt\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tfailure: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSyncFailed },\n\t\t\tproperties: ({ input, error }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error ?? \"unknown\")\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n});\n\n//#endregion\n//# sourceMappingURL=transactions.js.map"],"mappings":";;;;;;AAMA,MAAM,mCAAmC,IAAI,GAAG;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,MAAM;GACL,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,IAAI;GACH,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,eAAe;GACd,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,eAAe;GACd,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,oCAAoC,IAAI,GAAG;CAChD,MAAM;CACN,aAAa;CACb,QAAQ;EACP,cAAc;GACb,MAAM;GACN,YAAY;GACZ,SAAS;GACT;EACD,YAAY;GACX,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,SAAS;GACR,MAAM,GAAG,SAAS;GAClB,YAAY;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5B,MAAM;GACL;GACA;GACA;GACA;EACD,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ,EAAE,MAAM,SAAS;CACzB,WAAW;EACV,SAAS;GACR,OAAO,EAAE,MAAM,6BAA6B,oBAAoB;GAChE,aAAa,EAAE,OAAO,aAAa;IAClC,MAAM,UAAU;IAChB,MAAM,SAAS;AACf,WAAO;KACN,UAAU,SAAS;KACnB,WAAW,SAAS;KACpB,QAAQ,QAAQ;KAChB,QAAQ,QAAQ;KAChB,kBAAkB,QAAQ;KAC1B,gBAAgB,QAAQ;KACxB;;GAEF;EACD,SAAS;GACR,OAAO,EAAE,MAAM,6BAA6B,wBAAwB;GACpE,aAAa,EAAE,OAAO,YAAY;IACjC,MAAM,UAAU;AAChB,WAAO;KACN,UAAU,SAAS;KACnB,WAAW,SAAS;KACpB,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,SAAS,UAAU;KAC1E;;GAEF;EACD;CACD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E5, x8 } from "../schema/dist/index.js";
|
|
2
|
-
import { defineCommand, defineQuery } from "../
|
|
2
|
+
import { defineCommand, defineQuery } from "../operation.js";
|
|
3
3
|
|
|
4
4
|
//#region ../../modules/audit-trail/dist/libs/contracts/dist/knowledge/contracts.js
|
|
5
5
|
const KnowledgeSyncSchedule = new x8({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/knowledge/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../spec.js\";\n\n//#region ../../libs/contracts/dist/knowledge/contracts.js\nconst KnowledgeSyncSchedule = new x8({\n\tname: \"KnowledgeSyncSchedule\",\n\tfields: {\n\t\tenabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcron: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tintervalMs: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst KnowledgeSourceRecord = new x8({\n\tname: \"KnowledgeSourceRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSourceInput = new x8({\n\tname: \"CreateKnowledgeSourceInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst UpdateKnowledgeSourceInput = new x8({\n\tname: \"UpdateKnowledgeSourceInput\",\n\tfields: {\n\t\tsourceId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteKnowledgeSourceInput = new x8({\n\tname: \"DeleteKnowledgeSourceInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst DeleteKnowledgeSourceOutput = new x8({\n\tname: \"DeleteKnowledgeSourceOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst ListKnowledgeSourcesInput = new x8({\n\tname: \"ListKnowledgeSourcesInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListKnowledgeSourcesOutput = new x8({\n\tname: \"ListKnowledgeSourcesOutput\",\n\tfields: { sources: {\n\t\ttype: KnowledgeSourceRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TriggerKnowledgeSyncInput = new x8({\n\tname: \"TriggerKnowledgeSyncInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TriggerKnowledgeSyncOutput = new x8({\n\tname: \"TriggerKnowledgeSyncOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a knowledge source binding for a tenant.\",\n\t\tgoal: \"Onboard a new knowledge ingestion source such as Notion or uploads.\",\n\t\tcontext: \"Used by Ops and App Studio to configure knowledge ingestion per tenant and space.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or configuration for a knowledge source.\",\n\t\tgoal: \"Allow rotation of credentials, sync schedules, and labels.\",\n\t\tcontext: \"Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete a knowledge source binding for a tenant.\",\n\t\tgoal: \"Remove obsolete or compromised knowledge ingestion paths.\",\n\t\tcontext: \"Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteKnowledgeSourceInput,\n\t\toutput: DeleteKnowledgeSourceOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListKnowledgeSources = defineQuery({\n\tmeta: {\n\t\tname: \"knowledge.source.list\",\n\t\tversion: 1,\n\t\tdescription: \"List knowledge sources configured for a tenant.\",\n\t\tgoal: \"Provide visibility into knowledge ingest configuration and schedules.\",\n\t\tcontext: \"Used by App Studio and Ops flows to surface knowledge sources and their health.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListKnowledgeSourcesInput,\n\t\toutput: ListKnowledgeSourcesOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TriggerKnowledgeSourceSync = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.triggerSync\",\n\t\tversion: 1,\n\t\tdescription: \"Trigger an immediate sync for a knowledge source.\",\n\t\tgoal: \"Support manual or automated sync retries for knowledge ingestion.\",\n\t\tcontext: \"Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TriggerKnowledgeSyncInput,\n\t\toutput: TriggerKnowledgeSyncOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\n\n//#endregion\n//# sourceMappingURL=contracts.js.map"],"mappings":";;;;AAIA,MAAM,wBAAwB,IAAI,GAAG;CACpC,MAAM;CACN,QAAQ;EACP,SAAS;GACR,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD,MAAM;GACL,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,YAAY;GACX,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,wBAAwB,IAAI,GAAG;CACpC,MAAM;CACN,QAAQ;EACP,IAAI;GACH,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,OAAO;GACN,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,YAAY;GACX,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,cAAc;GACb,MAAM;GACN,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,YAAY;GACX,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,WAAW;G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V,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC;AAC2B,YAAY;CACxC,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC;AACiC,cAAc;CAChD,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/knowledge/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../operation.js\";\n\n//#region ../../libs/contracts/dist/knowledge/contracts.js\nconst KnowledgeSyncSchedule = new x8({\n\tname: \"KnowledgeSyncSchedule\",\n\tfields: {\n\t\tenabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcron: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tintervalMs: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst KnowledgeSourceRecord = new x8({\n\tname: \"KnowledgeSourceRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSourceInput = new x8({\n\tname: \"CreateKnowledgeSourceInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst UpdateKnowledgeSourceInput = new x8({\n\tname: \"UpdateKnowledgeSourceInput\",\n\tfields: {\n\t\tsourceId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteKnowledgeSourceInput = new x8({\n\tname: \"DeleteKnowledgeSourceInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst DeleteKnowledgeSourceOutput = new x8({\n\tname: \"DeleteKnowledgeSourceOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst ListKnowledgeSourcesInput = new x8({\n\tname: \"ListKnowledgeSourcesInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListKnowledgeSourcesOutput = new x8({\n\tname: \"ListKnowledgeSourcesOutput\",\n\tfields: { sources: {\n\t\ttype: KnowledgeSourceRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TriggerKnowledgeSyncInput = new x8({\n\tname: \"TriggerKnowledgeSyncInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TriggerKnowledgeSyncOutput = new x8({\n\tname: \"TriggerKnowledgeSyncOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a knowledge source binding for a tenant.\",\n\t\tgoal: \"Onboard a new knowledge ingestion source such as Notion or uploads.\",\n\t\tcontext: \"Used by Ops and App Studio to configure knowledge ingestion per tenant and space.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or configuration for a knowledge source.\",\n\t\tgoal: \"Allow rotation of credentials, sync schedules, and labels.\",\n\t\tcontext: \"Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete a knowledge source binding for a tenant.\",\n\t\tgoal: \"Remove obsolete or compromised knowledge ingestion paths.\",\n\t\tcontext: \"Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteKnowledgeSourceInput,\n\t\toutput: DeleteKnowledgeSourceOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListKnowledgeSources = defineQuery({\n\tmeta: {\n\t\tname: \"knowledge.source.list\",\n\t\tversion: 1,\n\t\tdescription: \"List knowledge sources configured for a tenant.\",\n\t\tgoal: \"Provide visibility into knowledge ingest configuration and schedules.\",\n\t\tcontext: \"Used by App Studio and Ops flows to surface knowledge sources and their health.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListKnowledgeSourcesInput,\n\t\toutput: ListKnowledgeSourcesOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TriggerKnowledgeSourceSync = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.triggerSync\",\n\t\tversion: 1,\n\t\tdescription: \"Trigger an immediate sync for a knowledge source.\",\n\t\tgoal: \"Support manual or automated sync retries for knowledge ingestion.\",\n\t\tcontext: \"Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TriggerKnowledgeSyncInput,\n\t\toutput: TriggerKnowledgeSyncOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\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ACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC;AACiC,cAAc;CAChD,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E5, x8 } from "./schema/dist/index.js";
|
|
2
|
-
import { defineCommand, defineQuery } from "./
|
|
2
|
+
import { defineCommand, defineQuery } from "./operation.js";
|
|
3
3
|
import { OwnersEnum, StabilityEnum } from "./ownership.js";
|
|
4
4
|
|
|
5
5
|
//#region ../../modules/audit-trail/dist/libs/contracts/dist/onboarding-base.js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding-base.js","names":[],"sources":["../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/onboarding-base.js"],"sourcesContent":["import { E5, x8 } from \"./schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"./
|
|
1
|
+
{"version":3,"file":"onboarding-base.js","names":[],"sources":["../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/onboarding-base.js"],"sourcesContent":["import { E5, x8 } from \"./schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"./operation.js\";\nimport { OwnersEnum, StabilityEnum } from \"./ownership.js\";\n\n//#region ../../libs/contracts/dist/onboarding-base.js\n/**\n* Shared base contracts for onboarding flows across verticals.\n* These operations are reusable for any app that needs multi-step onboarding with draft persistence.\n*/\n/** Save/update onboarding draft (auto-save during flow) */\nconst SaveOnboardingDraftInput = new x8({\n\tname: \"SaveOnboardingDraftInput\",\n\tdescription: \"Input for saving onboarding draft\",\n\tfields: { data: {\n\t\ttype: E5.JSON(),\n\t\tisOptional: false\n\t} }\n});\nconst SaveOnboardingDraftOutput = new x8({\n\tname: \"SaveOnboardingDraftOutput\",\n\tdescription: \"Output for saving onboarding draft\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\torganizationId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst SaveOnboardingDraftBaseSpec = defineCommand({\n\tmeta: {\n\t\tname: \"base.onboarding.saveDraft\",\n\t\tversion: 1,\n\t\tstability: StabilityEnum.Beta,\n\t\towners: [OwnersEnum.PlatformSigil],\n\t\ttags: [\"onboarding\", \"draft\"],\n\t\tdescription: \"Save or update onboarding draft for active organization\",\n\t\tgoal: \"Persist onboarding progress incrementally for resumption and safety\",\n\t\tcontext: \"Auto-saves every few seconds during onboarding; enables users to leave and resume\"\n\t},\n\tio: {\n\t\tinput: SaveOnboardingDraftInput,\n\t\toutput: SaveOnboardingDraftOutput\n\t},\n\tpolicy: {\n\t\tauth: \"user\",\n\t\tescalate: null\n\t},\n\ttransport: {\n\t\tgql: { field: \"saveOnboardingDraft\" },\n\t\trest: { method: \"POST\" }\n\t}\n});\n/** Get current onboarding draft (on mount/restore) */\nconst GetOnboardingDraftOutput = new x8({\n\tname: \"GetOnboardingDraftOutput\",\n\tdescription: \"Onboarding draft payload\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\torganizationId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdata: {\n\t\t\ttype: E5.JSON(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst GetOnboardingDraftBaseSpec = defineQuery({\n\tmeta: {\n\t\tname: \"base.onboarding.getDraft\",\n\t\tversion: 1,\n\t\tstability: StabilityEnum.Beta,\n\t\towners: [OwnersEnum.PlatformSigil],\n\t\ttags: [\"onboarding\", \"draft\"],\n\t\tdescription: \"Get onboarding draft for active organization\",\n\t\tgoal: \"Retrieve saved onboarding progress\",\n\t\tcontext: \"Called on mount to restore in-progress onboarding\"\n\t},\n\tio: {\n\t\tinput: null,\n\t\toutput: GetOnboardingDraftOutput\n\t},\n\tpolicy: {\n\t\tauth: \"user\",\n\t\tescalate: null\n\t},\n\ttransport: {\n\t\tgql: { field: \"getOnboardingDraft\" },\n\t\trest: { method: \"GET\" }\n\t}\n});\n/** Delete onboarding draft (cleanup after completion or cancel) */\nconst DeleteOnboardingDraftOutput = new x8({\n\tname: \"DeleteOnboardingDraftOutput\",\n\tdescription: \"Result of delete operation\",\n\tfields: { ok: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst DeleteOnboardingDraftBaseSpec = defineCommand({\n\tmeta: {\n\t\tname: \"base.onboarding.deleteDraft\",\n\t\tversion: 1,\n\t\tstability: StabilityEnum.Beta,\n\t\towners: [OwnersEnum.PlatformSigil],\n\t\ttags: [\"onboarding\", \"draft\"],\n\t\tdescription: \"Delete onboarding draft for active organization\",\n\t\tgoal: \"Clear draft after completion or if user wants to restart\",\n\t\tcontext: \"Called after successful onboarding or explicit user reset\"\n\t},\n\tio: {\n\t\tinput: null,\n\t\toutput: DeleteOnboardingDraftOutput\n\t},\n\tpolicy: {\n\t\tauth: \"user\",\n\t\tescalate: null\n\t},\n\ttransport: {\n\t\tgql: { field: \"deleteOnboardingDraft\" },\n\t\trest: { method: \"POST\" }\n\t}\n});\n/** Complete onboarding (final submit, creates entities) */\nconst CompleteOnboardingBaseInput = new x8({\n\tname: \"CompleteOnboardingBaseInput\",\n\tdescription: \"Input for completing onboarding\",\n\tfields: { data: {\n\t\ttype: E5.JSON(),\n\t\tisOptional: false\n\t} }\n});\nconst CompleteOnboardingBaseOutput = new x8({\n\tname: \"CompleteOnboardingBaseOutput\",\n\tdescription: \"Result of onboarding completion\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\torganizationId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CompleteOnboardingBaseSpec = defineCommand({\n\tmeta: {\n\t\tname: \"base.onboarding.complete\",\n\t\tversion: 1,\n\t\tstability: StabilityEnum.Beta,\n\t\towners: [OwnersEnum.PlatformSigil],\n\t\ttags: [\"onboarding\"],\n\t\tdescription: \"Complete onboarding and finalize user/organization setup\",\n\t\tgoal: \"Transition from draft to active profile\",\n\t\tcontext: \"Validates all required fields, creates/updates entities, marks onboarding complete\"\n\t},\n\tio: {\n\t\tinput: CompleteOnboardingBaseInput,\n\t\toutput: CompleteOnboardingBaseOutput\n\t},\n\tpolicy: {\n\t\tauth: \"user\",\n\t\tescalate: null\n\t},\n\ttransport: {\n\t\tgql: { field: \"completeOnboarding\" },\n\t\trest: { method: \"POST\" }\n\t}\n});\n\n//#endregion\nexport { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, DeleteOnboardingDraftOutput, GetOnboardingDraftOutput, SaveOnboardingDraftInput, SaveOnboardingDraftOutput };\n//# sourceMappingURL=onboarding-base.js.map"],"mappings":";;;;;;;;;;AAUA,MAAM,2BAA2B,IAAI,GAAG;CACvC,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,MAAM;EACf,MAAM,GAAG,MAAM;EACf,YAAY;EACZ,EAAE;CACH,CAAC;AACF,MAAM,4BAA4B,IAAI,GAAG;CACxC,MAAM;CACN,aAAa;CACb,QAAQ;EACP,IAAI;GACH,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD;CACD,CAAC;AACkC,cAAc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AClC,MAAM,CAAC,cAAc,QAAQ;EAC7B,aAAa;EACb,MAAM;EACN,SAAS;EACT;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU;EACV;CACD,WAAW;EACV,KAAK,EAAE,OAAO,yBAAyB;EACvC,MAAM,EAAE,QAAQ,QAAQ;EACxB;CACD,CAAC;;AAEF,MAAM,8BAA8B,IAAI,GAAG;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,MAAM;EACf,MAAM,GAAG,MAAM;EACf,YAAY;EACZ,EAAE;CACH,CAAC;AACF,MAAM,+BAA+B,IAAI,GAAG;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,SAAS;GACR,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD;CACD,CAAC;AACiC,cAAc;CAChD,MAAM;EACL,MAAM;EACN,SAAS;EACT,WAAW,cAAc;EACzB,QAAQ,CAAC,WAAW,cAAc;EAClC,MAAM,CAAC,aAAa;EACpB,aAAa;EACb,MAAM;EACN,SAAS;EACT;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU;EACV;CACD,WAAW;EACV,KAAK,EAAE,OAAO,sBAAsB;EACpC,MAAM,EAAE,QAAQ,QAAQ;EACxB;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../
|
|
1
|
+
//#region ../../modules/audit-trail/dist/libs/contracts/dist/operation.js
|
|
2
2
|
/**
|
|
3
3
|
* Helper to define a Command (write operation).
|
|
4
4
|
* Sets `kind: 'command'` and defaults `idempotent: false`.
|
|
@@ -32,4 +32,4 @@ const defineQuery = (spec) => ({
|
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
export { defineCommand, defineQuery };
|
|
35
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation.js","names":[],"sources":["../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/operation.js"],"sourcesContent":["//#region ../../libs/contracts/dist/operation.js\n/**\n* Helper to define a Command (write operation).\n* Sets `kind: 'command'` and defaults `idempotent: false`.\n*/\nconst defineCommand = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"command\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: spec.policy?.[\"policy\"]?.idempotent ?? false\n\t}\n});\n/**\n* Helper to define a Query (read-only operation).\n* Sets `kind: 'query'` and forces `idempotent: true`.\n*/\nconst defineQuery = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"query\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: true\n\t}\n});\n\n//#endregion\nexport { defineCommand, defineQuery };\n//# sourceMappingURL=operation.js.map"],"mappings":";;;;;AAKA,MAAM,iBAAiB,UAAU;CAChC,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY,KAAK,SAAS,WAAW,cAAc;EACnD;CACD;;;;;AAKD,MAAM,eAAe,UAAU;CAC9B,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY;EACZ;CACD"}
|
package/dist/modules/audit-trail/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as z$1 from "zod";
|
|
2
|
+
|
|
3
|
+
//#region ../../modules/audit-trail/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js
|
|
4
|
+
/**
|
|
5
|
+
* ContractSpec configuration schema definitions.
|
|
6
|
+
*
|
|
7
|
+
* These schemas define the structure of .contractsrc.json files
|
|
8
|
+
* and are shared across CLI tools and libraries.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* OpenAPI source configuration for import/sync/validate operations.
|
|
12
|
+
*/
|
|
13
|
+
const OpenApiSourceConfigSchema = z$1.object({
|
|
14
|
+
name: z$1.string(),
|
|
15
|
+
url: z$1.url().optional(),
|
|
16
|
+
file: z$1.string().optional(),
|
|
17
|
+
syncMode: z$1.enum([
|
|
18
|
+
"import",
|
|
19
|
+
"sync",
|
|
20
|
+
"validate"
|
|
21
|
+
]).default("validate"),
|
|
22
|
+
tags: z$1.array(z$1.string()).optional(),
|
|
23
|
+
exclude: z$1.array(z$1.string()).optional(),
|
|
24
|
+
include: z$1.array(z$1.string()).optional(),
|
|
25
|
+
prefix: z$1.string().optional(),
|
|
26
|
+
defaultStability: z$1.enum([
|
|
27
|
+
"experimental",
|
|
28
|
+
"beta",
|
|
29
|
+
"stable",
|
|
30
|
+
"deprecated"
|
|
31
|
+
]).optional(),
|
|
32
|
+
defaultAuth: z$1.enum([
|
|
33
|
+
"anonymous",
|
|
34
|
+
"user",
|
|
35
|
+
"admin"
|
|
36
|
+
]).optional(),
|
|
37
|
+
defaultOwners: z$1.array(z$1.string()).optional()
|
|
38
|
+
});
|
|
39
|
+
const OpenApiExportConfigSchema = z$1.object({
|
|
40
|
+
outputPath: z$1.string().default("./openapi.json"),
|
|
41
|
+
format: z$1.enum(["json", "yaml"]).default("json"),
|
|
42
|
+
title: z$1.string().optional(),
|
|
43
|
+
version: z$1.string().optional(),
|
|
44
|
+
description: z$1.string().optional(),
|
|
45
|
+
servers: z$1.array(z$1.object({
|
|
46
|
+
url: z$1.string(),
|
|
47
|
+
description: z$1.string().optional()
|
|
48
|
+
})).optional()
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* OpenAPI configuration section.
|
|
52
|
+
*/
|
|
53
|
+
const OpenApiConfigSchema = z$1.object({
|
|
54
|
+
sources: z$1.array(OpenApiSourceConfigSchema).optional(),
|
|
55
|
+
export: OpenApiExportConfigSchema.optional()
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Output directory conventions for generated specs.
|
|
59
|
+
*/
|
|
60
|
+
const FolderConventionsSchema = z$1.object({
|
|
61
|
+
models: z$1.string().default("models"),
|
|
62
|
+
operations: z$1.string().default("operations/commands|queries"),
|
|
63
|
+
events: z$1.string().default("events"),
|
|
64
|
+
presentations: z$1.string().default("presentations"),
|
|
65
|
+
forms: z$1.string().default("forms")
|
|
66
|
+
});
|
|
67
|
+
z$1.object({
|
|
68
|
+
aiProvider: z$1.enum([
|
|
69
|
+
"claude",
|
|
70
|
+
"openai",
|
|
71
|
+
"ollama",
|
|
72
|
+
"custom"
|
|
73
|
+
]).default("claude"),
|
|
74
|
+
aiModel: z$1.string().optional(),
|
|
75
|
+
agentMode: z$1.enum([
|
|
76
|
+
"simple",
|
|
77
|
+
"cursor",
|
|
78
|
+
"claude-code",
|
|
79
|
+
"openai-codex"
|
|
80
|
+
]).default("simple"),
|
|
81
|
+
customEndpoint: z$1.url().nullable().optional(),
|
|
82
|
+
customApiKey: z$1.string().nullable().optional(),
|
|
83
|
+
outputDir: z$1.string().default("./src"),
|
|
84
|
+
conventions: FolderConventionsSchema,
|
|
85
|
+
defaultOwners: z$1.array(z$1.string()).default([]),
|
|
86
|
+
defaultTags: z$1.array(z$1.string()).default([]),
|
|
87
|
+
packages: z$1.array(z$1.string()).optional(),
|
|
88
|
+
excludePackages: z$1.array(z$1.string()).optional(),
|
|
89
|
+
recursive: z$1.boolean().optional(),
|
|
90
|
+
openapi: OpenApiConfigSchema.optional()
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
//# sourceMappingURL=contractsrc-schema.js.map
|
package/dist/modules/audit-trail/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractsrc-schema.js","names":[],"sources":["../../../../../../../../../../modules/audit-trail/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js"],"sourcesContent":["import * as z$1 from \"zod\";\n\n//#region ../../libs/contracts/dist/workspace-config/contractsrc-schema.js\n/**\n* ContractSpec configuration schema definitions.\n*\n* These schemas define the structure of .contractsrc.json files\n* and are shared across CLI tools and libraries.\n*/\n/**\n* OpenAPI source configuration for import/sync/validate operations.\n*/\nconst OpenApiSourceConfigSchema = z$1.object({\n\tname: z$1.string(),\n\turl: z$1.url().optional(),\n\tfile: z$1.string().optional(),\n\tsyncMode: z$1.enum([\n\t\t\"import\",\n\t\t\"sync\",\n\t\t\"validate\"\n\t]).default(\"validate\"),\n\ttags: z$1.array(z$1.string()).optional(),\n\texclude: z$1.array(z$1.string()).optional(),\n\tinclude: z$1.array(z$1.string()).optional(),\n\tprefix: z$1.string().optional(),\n\tdefaultStability: z$1.enum([\n\t\t\"experimental\",\n\t\t\"beta\",\n\t\t\"stable\",\n\t\t\"deprecated\"\n\t]).optional(),\n\tdefaultAuth: z$1.enum([\n\t\t\"anonymous\",\n\t\t\"user\",\n\t\t\"admin\"\n\t]).optional(),\n\tdefaultOwners: z$1.array(z$1.string()).optional()\n});\nconst OpenApiExportConfigSchema = z$1.object({\n\toutputPath: z$1.string().default(\"./openapi.json\"),\n\tformat: z$1.enum([\"json\", \"yaml\"]).default(\"json\"),\n\ttitle: z$1.string().optional(),\n\tversion: z$1.string().optional(),\n\tdescription: z$1.string().optional(),\n\tservers: z$1.array(z$1.object({\n\t\turl: z$1.string(),\n\t\tdescription: z$1.string().optional()\n\t})).optional()\n});\n/**\n* OpenAPI configuration section.\n*/\nconst OpenApiConfigSchema = z$1.object({\n\tsources: z$1.array(OpenApiSourceConfigSchema).optional(),\n\texport: OpenApiExportConfigSchema.optional()\n});\n/**\n* Output directory conventions for generated specs.\n*/\nconst FolderConventionsSchema = z$1.object({\n\tmodels: z$1.string().default(\"models\"),\n\toperations: z$1.string().default(\"operations/commands|queries\"),\n\tevents: z$1.string().default(\"events\"),\n\tpresentations: z$1.string().default(\"presentations\"),\n\tforms: z$1.string().default(\"forms\")\n});\n/**\n* Full ContractSpec configuration schema (.contractsrc.json).\n*/\nconst ContractsrcSchema = z$1.object({\n\taiProvider: z$1.enum([\n\t\t\"claude\",\n\t\t\"openai\",\n\t\t\"ollama\",\n\t\t\"custom\"\n\t]).default(\"claude\"),\n\taiModel: z$1.string().optional(),\n\tagentMode: z$1.enum([\n\t\t\"simple\",\n\t\t\"cursor\",\n\t\t\"claude-code\",\n\t\t\"openai-codex\"\n\t]).default(\"simple\"),\n\tcustomEndpoint: z$1.url().nullable().optional(),\n\tcustomApiKey: z$1.string().nullable().optional(),\n\toutputDir: z$1.string().default(\"./src\"),\n\tconventions: FolderConventionsSchema,\n\tdefaultOwners: z$1.array(z$1.string()).default([]),\n\tdefaultTags: z$1.array(z$1.string()).default([]),\n\tpackages: z$1.array(z$1.string()).optional(),\n\texcludePackages: z$1.array(z$1.string()).optional(),\n\trecursive: z$1.boolean().optional(),\n\topenapi: OpenApiConfigSchema.optional()\n});\n\n//#endregion\nexport { FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema };\n//# sourceMappingURL=contractsrc-schema.js.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,4BAA4B,IAAI,OAAO;CAC5C,MAAM,IAAI,QAAQ;CAClB,KAAK,IAAI,KAAK,CAAC,UAAU;CACzB,MAAM,IAAI,QAAQ,CAAC,UAAU;CAC7B,UAAU,IAAI,KAAK;EAClB;EACA;EACA;EACA,CAAC,CAAC,QAAQ,WAAW;CACtB,MAAM,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CACxC,SAAS,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CAC3C,SAAS,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CAC3C,QAAQ,IAAI,QAAQ,CAAC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,IAAI,KAAK,CAAC,UAAU,CAAC,UAAU;CAC/C,cAAc,IAAI,QAAQ,CAAC,UAAU,CAAC,UAAU;CAChD,WAAW,IAAI,QAAQ,CAAC,QAAQ,QAAQ;CACxC,aAAa;CACb,eAAe,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;CAClD,aAAa,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;CAChD,UAAU,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CAC5C,iBAAiB,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,UAAU;CACnD,WAAW,IAAI,SAAS,CAAC,UAAU;CACnC,SAAS,oBAAoB,UAAU;CACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./contractsrc-schema.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E5, N5 } from "../libs/schema/dist/index.js";
|
|
2
2
|
import { K5 } from "../libs/contracts/dist/schema/dist/index.js";
|
|
3
|
-
import { defineCommand, defineQuery } from "../libs/contracts/dist/
|
|
3
|
+
import { defineCommand, defineQuery } from "../libs/contracts/dist/operation.js";
|
|
4
4
|
import "../libs/contracts/dist/index.js";
|
|
5
5
|
|
|
6
6
|
//#region ../../modules/notifications/dist/contracts/index.js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../../modules/notifications/dist/contracts/index.js"],"sourcesContent":["import { E5, N5 } from \"../libs/schema/dist/index.js\";\nimport { K5 } from \"../libs/contracts/dist/schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../libs/contracts/dist/spec.js\";\nimport \"../libs/contracts/dist/index.js\";\n\n//#region src/contracts/index.ts\nconst OWNERS = [\"platform.notifications\"];\nconst NotificationStatusSchemaEnum = N5(\"NotificationStatus\", [\n\t\"PENDING\",\n\t\"SENT\",\n\t\"DELIVERED\",\n\t\"READ\",\n\t\"FAILED\",\n\t\"CANCELLED\"\n]);\nconst NotificationChannelSchemaEnum = N5(\"NotificationChannel\", [\n\t\"EMAIL\",\n\t\"IN_APP\",\n\t\"PUSH\",\n\t\"WEBHOOK\"\n]);\nconst NotificationFilterEnum = N5(\"NotificationFilter\", [\n\t\"unread\",\n\t\"read\",\n\t\"all\"\n]);\nconst NotificationModel = K5({\n\tname: \"Notification\",\n\tdescription: \"A notification sent to a user\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttitle: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tbody: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttype: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: NotificationStatusSchemaEnum,\n\t\t\tisOptional: false\n\t\t},\n\t\tchannels: {\n\t\t\ttype: NotificationChannelSchemaEnum,\n\t\t\tisArray: true,\n\t\t\tisOptional: false\n\t\t},\n\t\tactionUrl: {\n\t\t\ttype: E5.URL(),\n\t\t\tisOptional: true\n\t\t},\n\t\treadAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst NotificationPreferenceModel = K5({\n\tname: \"NotificationPreference\",\n\tdescription: \"User notification preferences\",\n\tfields: {\n\t\tuserId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tglobalEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tchannelPreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttypePreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\tquietHoursStart: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tquietHoursEnd: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttimezone: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tdigestEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tdigestFrequency: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst SendNotificationInputModel = K5({\n\tname: \"SendNotificationInput\",\n\tdescription: \"Input for sending a notification\",\n\tfields: {\n\t\tuserId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttemplateId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttitle: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbody: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttype: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tchannels: {\n\t\t\ttype: NotificationChannelSchemaEnum,\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tactionUrl: {\n\t\t\ttype: E5.URL(),\n\t\t\tisOptional: true\n\t\t},\n\t\tvariables: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tmetadata: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListNotificationsInputModel = K5({\n\tname: \"ListNotificationsInput\",\n\tdescription: \"Input for listing notifications\",\n\tfields: {\n\t\tstatus: {\n\t\t\ttype: NotificationFilterEnum,\n\t\t\tisOptional: true\n\t\t},\n\t\ttype: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlimit: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true,\n\t\t\tdefaultValue: 20\n\t\t},\n\t\toffset: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true,\n\t\t\tdefaultValue: 0\n\t\t}\n\t}\n});\nconst ListNotificationsOutputModel = K5({\n\tname: \"ListNotificationsOutput\",\n\tdescription: \"Output for listing notifications\",\n\tfields: {\n\t\tnotifications: {\n\t\t\ttype: NotificationModel,\n\t\t\tisArray: true,\n\t\t\tisOptional: false\n\t\t},\n\t\ttotal: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tunreadCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst UpdatePreferencesInputModel = K5({\n\tname: \"UpdateNotificationPreferencesInput\",\n\tdescription: \"Input for updating notification preferences\",\n\tfields: {\n\t\tglobalEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tchannelPreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttypePreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tquietHoursStart: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tquietHoursEnd: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttimezone: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdigestEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdigestFrequency: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\n/**\n* Send a notification.\n*/\nconst SendNotificationContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.send\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"send\"],\n\t\tdescription: \"Send a notification to a user.\",\n\t\tgoal: \"Deliver notifications across multiple channels.\",\n\t\tcontext: \"Called by services when events require user notification.\"\n\t},\n\tio: {\n\t\tinput: SendNotificationInputModel,\n\t\toutput: NotificationModel,\n\t\terrors: {\n\t\t\tUSER_NOT_FOUND: {\n\t\t\t\tdescription: \"Target user does not exist\",\n\t\t\t\thttp: 404,\n\t\t\t\tgqlCode: \"USER_NOT_FOUND\",\n\t\t\t\twhen: \"User ID is invalid\"\n\t\t\t},\n\t\t\tTEMPLATE_NOT_FOUND: {\n\t\t\t\tdescription: \"Notification template does not exist\",\n\t\t\t\thttp: 404,\n\t\t\t\tgqlCode: \"TEMPLATE_NOT_FOUND\",\n\t\t\t\twhen: \"Template ID is invalid\"\n\t\t\t}\n\t\t}\n\t},\n\tpolicy: { auth: \"user\" },\n\tsideEffects: { emits: [{\n\t\tname: \"notification.sent\",\n\t\tversion: 1,\n\t\twhen: \"Notification is sent\",\n\t\tpayload: NotificationModel\n\t}] }\n});\n/**\n* List notifications for current user.\n*/\nconst ListNotificationsContract = defineQuery({\n\tmeta: {\n\t\tname: \"notifications.list\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"list\"],\n\t\tdescription: \"List notifications for the current user.\",\n\t\tgoal: \"Show user their notifications.\",\n\t\tcontext: \"Notification center UI.\"\n\t},\n\tio: {\n\t\tinput: ListNotificationsInputModel,\n\t\toutput: ListNotificationsOutputModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Mark notification as read.\n*/\nconst MarkNotificationReadContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.markRead\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"read\"],\n\t\tdescription: \"Mark a notification as read.\",\n\t\tgoal: \"Track which notifications user has seen.\",\n\t\tcontext: \"User clicks on a notification.\"\n\t},\n\tio: {\n\t\tinput: K5({\n\t\t\tname: \"MarkNotificationReadInput\",\n\t\t\tfields: { notificationId: {\n\t\t\t\ttype: E5.String_unsecure(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t}),\n\t\toutput: NotificationModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Mark all notifications as read.\n*/\nconst MarkAllNotificationsReadContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.markAllRead\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"read\"],\n\t\tdescription: \"Mark all notifications as read.\",\n\t\tgoal: \"Clear notification badge.\",\n\t\tcontext: \"User clicks \\\"mark all as read\\\".\"\n\t},\n\tio: {\n\t\tinput: null,\n\t\toutput: K5({\n\t\t\tname: \"MarkAllNotificationsReadOutput\",\n\t\t\tfields: { markedCount: {\n\t\t\t\ttype: E5.Int_unsecure(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t})\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Get notification preferences.\n*/\nconst GetNotificationPreferencesContract = defineQuery({\n\tmeta: {\n\t\tname: \"notifications.preferences.get\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\n\t\t\t\"notifications\",\n\t\t\t\"preferences\",\n\t\t\t\"get\"\n\t\t],\n\t\tdescription: \"Get notification preferences for current user.\",\n\t\tgoal: \"Show user their notification settings.\",\n\t\tcontext: \"Notification settings page.\"\n\t},\n\tio: {\n\t\tinput: null,\n\t\toutput: NotificationPreferenceModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Update notification preferences.\n*/\nconst UpdateNotificationPreferencesContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.preferences.update\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\n\t\t\t\"notifications\",\n\t\t\t\"preferences\",\n\t\t\t\"update\"\n\t\t],\n\t\tdescription: \"Update notification preferences.\",\n\t\tgoal: \"Allow user to control notification delivery.\",\n\t\tcontext: \"Notification settings page.\"\n\t},\n\tio: {\n\t\tinput: UpdatePreferencesInputModel,\n\t\toutput: NotificationPreferenceModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Delete a notification.\n*/\nconst DeleteNotificationContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.delete\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"delete\"],\n\t\tdescription: \"Delete a notification.\",\n\t\tgoal: \"Allow user to remove unwanted notifications.\",\n\t\tcontext: \"User dismisses a notification.\"\n\t},\n\tio: {\n\t\tinput: K5({\n\t\t\tname: \"DeleteNotificationInput\",\n\t\t\tfields: { notificationId: {\n\t\t\t\ttype: E5.String_unsecure(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t}),\n\t\toutput: K5({\n\t\t\tname: \"DeleteNotificationOutput\",\n\t\t\tfields: { success: {\n\t\t\t\ttype: E5.Boolean(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t})\n\t},\n\tpolicy: { auth: \"user\" }\n});\n\n//#endregion\nexport { DeleteNotificationContract, GetNotificationPreferencesContract, ListNotificationsContract, ListNotificationsInputModel, ListNotificationsOutputModel, MarkAllNotificationsReadContract, MarkNotificationReadContract, NotificationFilterEnum, NotificationModel, NotificationPreferenceModel, SendNotificationContract, SendNotificationInputModel, UpdateNotificationPreferencesContract, UpdatePreferencesInputModel };\n//# sourceMappingURL=index.js.map"],"mappings":";;;;;;AAMA,MAAM,SAAS,CAAC,yBAAyB;AACzC,MAAM,+BAA+B,GAAG,sBAAsB;CAC7D;CACA;CACA;CACA;CACA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B,cAAc;CAChD,MAAM;EACL,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,iBAAiB,SAAS;EACjC,aAAa;EACb,MAAM;EACN,SAAS;EACT;CACD,IAAI;EACH,OAAO,GAAG;GACT,MAAM;GACN,QAAQ,EAAE,gBAAgB;IACzB,MAAM,GAAG,iBAAiB;IAC1B,YAAY;IACZ,EAAE;GACH,CAAC;EACF,QAAQ,GAAG;GACV,MAAM;GACN,QAAQ,EAAE,SAAS;IAClB,MAAM,GAAG,SAAS;IAClB,YAAY;IACZ,EAAE;GACH,CAAC;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../../modules/notifications/dist/contracts/index.js"],"sourcesContent":["import { E5, N5 } from \"../libs/schema/dist/index.js\";\nimport { K5 } from \"../libs/contracts/dist/schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../libs/contracts/dist/operation.js\";\nimport \"../libs/contracts/dist/index.js\";\n\n//#region src/contracts/index.ts\nconst OWNERS = [\"platform.notifications\"];\nconst NotificationStatusSchemaEnum = N5(\"NotificationStatus\", [\n\t\"PENDING\",\n\t\"SENT\",\n\t\"DELIVERED\",\n\t\"READ\",\n\t\"FAILED\",\n\t\"CANCELLED\"\n]);\nconst NotificationChannelSchemaEnum = N5(\"NotificationChannel\", [\n\t\"EMAIL\",\n\t\"IN_APP\",\n\t\"PUSH\",\n\t\"WEBHOOK\"\n]);\nconst NotificationFilterEnum = N5(\"NotificationFilter\", [\n\t\"unread\",\n\t\"read\",\n\t\"all\"\n]);\nconst NotificationModel = K5({\n\tname: \"Notification\",\n\tdescription: \"A notification sent to a user\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttitle: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tbody: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttype: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: NotificationStatusSchemaEnum,\n\t\t\tisOptional: false\n\t\t},\n\t\tchannels: {\n\t\t\ttype: NotificationChannelSchemaEnum,\n\t\t\tisArray: true,\n\t\t\tisOptional: false\n\t\t},\n\t\tactionUrl: {\n\t\t\ttype: E5.URL(),\n\t\t\tisOptional: true\n\t\t},\n\t\treadAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst NotificationPreferenceModel = K5({\n\tname: \"NotificationPreference\",\n\tdescription: \"User notification preferences\",\n\tfields: {\n\t\tuserId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tglobalEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tchannelPreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttypePreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\tquietHoursStart: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tquietHoursEnd: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttimezone: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tdigestEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tdigestFrequency: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst SendNotificationInputModel = K5({\n\tname: \"SendNotificationInput\",\n\tdescription: \"Input for sending a notification\",\n\tfields: {\n\t\tuserId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttemplateId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttitle: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbody: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttype: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tchannels: {\n\t\t\ttype: NotificationChannelSchemaEnum,\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tactionUrl: {\n\t\t\ttype: E5.URL(),\n\t\t\tisOptional: true\n\t\t},\n\t\tvariables: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tmetadata: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListNotificationsInputModel = K5({\n\tname: \"ListNotificationsInput\",\n\tdescription: \"Input for listing notifications\",\n\tfields: {\n\t\tstatus: {\n\t\t\ttype: NotificationFilterEnum,\n\t\t\tisOptional: true\n\t\t},\n\t\ttype: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlimit: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true,\n\t\t\tdefaultValue: 20\n\t\t},\n\t\toffset: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true,\n\t\t\tdefaultValue: 0\n\t\t}\n\t}\n});\nconst ListNotificationsOutputModel = K5({\n\tname: \"ListNotificationsOutput\",\n\tdescription: \"Output for listing notifications\",\n\tfields: {\n\t\tnotifications: {\n\t\t\ttype: NotificationModel,\n\t\t\tisArray: true,\n\t\t\tisOptional: false\n\t\t},\n\t\ttotal: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tunreadCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst UpdatePreferencesInputModel = K5({\n\tname: \"UpdateNotificationPreferencesInput\",\n\tdescription: \"Input for updating notification preferences\",\n\tfields: {\n\t\tglobalEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tchannelPreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttypePreferences: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tquietHoursStart: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tquietHoursEnd: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttimezone: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdigestEnabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdigestFrequency: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\n/**\n* Send a notification.\n*/\nconst SendNotificationContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.send\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"send\"],\n\t\tdescription: \"Send a notification to a user.\",\n\t\tgoal: \"Deliver notifications across multiple channels.\",\n\t\tcontext: \"Called by services when events require user notification.\"\n\t},\n\tio: {\n\t\tinput: SendNotificationInputModel,\n\t\toutput: NotificationModel,\n\t\terrors: {\n\t\t\tUSER_NOT_FOUND: {\n\t\t\t\tdescription: \"Target user does not exist\",\n\t\t\t\thttp: 404,\n\t\t\t\tgqlCode: \"USER_NOT_FOUND\",\n\t\t\t\twhen: \"User ID is invalid\"\n\t\t\t},\n\t\t\tTEMPLATE_NOT_FOUND: {\n\t\t\t\tdescription: \"Notification template does not exist\",\n\t\t\t\thttp: 404,\n\t\t\t\tgqlCode: \"TEMPLATE_NOT_FOUND\",\n\t\t\t\twhen: \"Template ID is invalid\"\n\t\t\t}\n\t\t}\n\t},\n\tpolicy: { auth: \"user\" },\n\tsideEffects: { emits: [{\n\t\tname: \"notification.sent\",\n\t\tversion: 1,\n\t\twhen: \"Notification is sent\",\n\t\tpayload: NotificationModel\n\t}] }\n});\n/**\n* List notifications for current user.\n*/\nconst ListNotificationsContract = defineQuery({\n\tmeta: {\n\t\tname: \"notifications.list\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"list\"],\n\t\tdescription: \"List notifications for the current user.\",\n\t\tgoal: \"Show user their notifications.\",\n\t\tcontext: \"Notification center UI.\"\n\t},\n\tio: {\n\t\tinput: ListNotificationsInputModel,\n\t\toutput: ListNotificationsOutputModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Mark notification as read.\n*/\nconst MarkNotificationReadContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.markRead\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"read\"],\n\t\tdescription: \"Mark a notification as read.\",\n\t\tgoal: \"Track which notifications user has seen.\",\n\t\tcontext: \"User clicks on a notification.\"\n\t},\n\tio: {\n\t\tinput: K5({\n\t\t\tname: \"MarkNotificationReadInput\",\n\t\t\tfields: { notificationId: {\n\t\t\t\ttype: E5.String_unsecure(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t}),\n\t\toutput: NotificationModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Mark all notifications as read.\n*/\nconst MarkAllNotificationsReadContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.markAllRead\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"read\"],\n\t\tdescription: \"Mark all notifications as read.\",\n\t\tgoal: \"Clear notification badge.\",\n\t\tcontext: \"User clicks \\\"mark all as read\\\".\"\n\t},\n\tio: {\n\t\tinput: null,\n\t\toutput: K5({\n\t\t\tname: \"MarkAllNotificationsReadOutput\",\n\t\t\tfields: { markedCount: {\n\t\t\t\ttype: E5.Int_unsecure(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t})\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Get notification preferences.\n*/\nconst GetNotificationPreferencesContract = defineQuery({\n\tmeta: {\n\t\tname: \"notifications.preferences.get\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\n\t\t\t\"notifications\",\n\t\t\t\"preferences\",\n\t\t\t\"get\"\n\t\t],\n\t\tdescription: \"Get notification preferences for current user.\",\n\t\tgoal: \"Show user their notification settings.\",\n\t\tcontext: \"Notification settings page.\"\n\t},\n\tio: {\n\t\tinput: null,\n\t\toutput: NotificationPreferenceModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Update notification preferences.\n*/\nconst UpdateNotificationPreferencesContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.preferences.update\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\n\t\t\t\"notifications\",\n\t\t\t\"preferences\",\n\t\t\t\"update\"\n\t\t],\n\t\tdescription: \"Update notification preferences.\",\n\t\tgoal: \"Allow user to control notification delivery.\",\n\t\tcontext: \"Notification settings page.\"\n\t},\n\tio: {\n\t\tinput: UpdatePreferencesInputModel,\n\t\toutput: NotificationPreferenceModel\n\t},\n\tpolicy: { auth: \"user\" }\n});\n/**\n* Delete a notification.\n*/\nconst DeleteNotificationContract = defineCommand({\n\tmeta: {\n\t\tname: \"notifications.delete\",\n\t\tversion: 1,\n\t\tstability: \"stable\",\n\t\towners: [...OWNERS],\n\t\ttags: [\"notifications\", \"delete\"],\n\t\tdescription: \"Delete a notification.\",\n\t\tgoal: \"Allow user to remove unwanted notifications.\",\n\t\tcontext: \"User dismisses a notification.\"\n\t},\n\tio: {\n\t\tinput: K5({\n\t\t\tname: \"DeleteNotificationInput\",\n\t\t\tfields: { notificationId: {\n\t\t\t\ttype: E5.String_unsecure(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t}),\n\t\toutput: K5({\n\t\t\tname: \"DeleteNotificationOutput\",\n\t\t\tfields: { success: {\n\t\t\t\ttype: E5.Boolean(),\n\t\t\t\tisOptional: false\n\t\t\t} }\n\t\t})\n\t},\n\tpolicy: { auth: \"user\" }\n});\n\n//#endregion\nexport { DeleteNotificationContract, GetNotificationPreferencesContract, ListNotificationsContract, ListNotificationsInputModel, ListNotificationsOutputModel, MarkAllNotificationsReadContract, MarkNotificationReadContract, NotificationFilterEnum, NotificationModel, NotificationPreferenceModel, SendNotificationContract, SendNotificationInputModel, UpdateNotificationPreferencesContract, UpdatePreferencesInputModel };\n//# sourceMappingURL=index.js.map"],"mappings":";;;;;;AAMA,MAAM,SAAS,CAAC,yBAAyB;AACzC,MAAM,+BAA+B,GAAG,sBAAsB;CAC7D;CACA;CACA;CACA;CACA;CACA;CACA,CAAC;AACF,MAAM,gCAAgC,GAAG,uBAAuB;CAC/D;CACA;CACA;CACA;CACA,CAAC;AACF,MAAM,yBAAyB,GAAG,sBAAsB;CACvD;CACA;CACA;CACA,CAAC;AACF,MAAM,oBAAoB,GAAG;CAC5B,MAAM;CACN,aAAa;CACb,QAAQ;EACP,IAAI;GACH,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,OAAO;GACN,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,MAAM;GACL,MAAM,GAAG,iBAAiB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Q,EAAE,MAAM,QAAQ;CACxB,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { registerDocBlocks } from "../../registry.js";
|
|
|
3
3
|
//#region ../../modules/notifications/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js
|
|
4
4
|
registerDocBlocks([{
|
|
5
5
|
id: "docs.tech.contracts.openapi-export",
|
|
6
|
-
title: "OpenAPI export (OpenAPI 3.1) from
|
|
7
|
-
summary: "Generate a deterministic OpenAPI document from a
|
|
6
|
+
title: "OpenAPI export (OpenAPI 3.1) from OperationSpecRegistry",
|
|
7
|
+
summary: "Generate a deterministic OpenAPI document from a OperationSpecRegistry using jsonSchemaForSpec + REST transport metadata.",
|
|
8
8
|
kind: "reference",
|
|
9
9
|
visibility: "public",
|
|
10
10
|
route: "/docs/tech/contracts/openapi-export",
|
|
@@ -13,7 +13,7 @@ registerDocBlocks([{
|
|
|
13
13
|
"openapi",
|
|
14
14
|
"rest"
|
|
15
15
|
],
|
|
16
|
-
body: `## OpenAPI export (OpenAPI 3.1) from
|
|
16
|
+
body: `## OpenAPI export (OpenAPI 3.1) from OperationSpecRegistry
|
|
17
17
|
|
|
18
18
|
### Purpose
|
|
19
19
|
|
|
@@ -42,9 +42,9 @@ contractspec openapi --registry ./src/registry.ts --out ./openapi.json
|
|
|
42
42
|
|
|
43
43
|
The registry module must export one of:
|
|
44
44
|
|
|
45
|
-
- \`registry:
|
|
46
|
-
- \`default():
|
|
47
|
-
- \`createRegistry():
|
|
45
|
+
- \`registry: OperationSpecRegistry\`
|
|
46
|
+
- \`default(): OperationSpecRegistry | Promise<OperationSpecRegistry>\`
|
|
47
|
+
- \`createRegistry(): OperationSpecRegistry | Promise<OperationSpecRegistry>\`
|
|
48
48
|
|
|
49
49
|
### Notes / limitations (current)
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-export.docblock.js","names":[],"sources":["../../../../../../../../../../../../modules/notifications/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region ../../libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js\nconst tech_contracts_openapi_export_DocBlocks = [{\n\tid: \"docs.tech.contracts.openapi-export\",\n\ttitle: \"OpenAPI export (OpenAPI 3.1) from
|
|
1
|
+
{"version":3,"file":"openapi-export.docblock.js","names":[],"sources":["../../../../../../../../../../../../modules/notifications/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region ../../libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js\nconst tech_contracts_openapi_export_DocBlocks = [{\n\tid: \"docs.tech.contracts.openapi-export\",\n\ttitle: \"OpenAPI export (OpenAPI 3.1) from OperationSpecRegistry\",\n\tsummary: \"Generate a deterministic OpenAPI document from a OperationSpecRegistry using jsonSchemaForSpec + REST transport metadata.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/contracts/openapi-export\",\n\ttags: [\n\t\t\"contracts\",\n\t\t\"openapi\",\n\t\t\"rest\"\n\t],\n\tbody: `## OpenAPI export (OpenAPI 3.1) from OperationSpecRegistry\n\n### Purpose\n\nContractSpec specs can be exported into an **OpenAPI 3.1** document for tooling (SDK generation, docs, gateways).\n\nThe export is **spec-first**:\n\n- Uses \\`jsonSchemaForSpec(spec)\\` for input/output JSON Schema (from SchemaModel → zod → JSON Schema)\n- Uses \\`spec.transport.rest.method/path\\` when present\n- Falls back to deterministic defaults:\n - Method: \\`POST\\` for commands, \\`GET\\` for queries\n - Path: \\`defaultRestPath(name, version)\\` → \\`/<dot/name>/v<version>\\`\n\n### Library API\n\n- Function: \\`openApiForRegistry(registry, options?)\\`\n- Location: \\`@lssm/lib.contracts/openapi\\`\n\n### CLI\n\nExport OpenAPI from a registry module:\n\n\\`\\`\\`bash\ncontractspec openapi --registry ./src/registry.ts --out ./openapi.json\n\\`\\`\\`\n\nThe registry module must export one of:\n\n- \\`registry: OperationSpecRegistry\\`\n- \\`default(): OperationSpecRegistry | Promise<OperationSpecRegistry>\\`\n- \\`createRegistry(): OperationSpecRegistry | Promise<OperationSpecRegistry>\\`\n\n### Notes / limitations (current)\n\n- Responses are generated as a basic \\`200\\` response (plus schemas when available).\n- Query (GET) inputs are currently represented as a JSON request body when an input schema exists.\n- Errors are not yet expanded into OpenAPI responses; that will be added when we standardize error envelopes.`\n}];\nregisterDocBlocks(tech_contracts_openapi_export_DocBlocks);\n\n//#endregion\n//# sourceMappingURL=openapi-export.docblock.js.map"],"mappings":";;;AAsDA,kBAnDgD,CAAC;CAChD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCN,CAAC,CACwD"}
|
|
@@ -58,6 +58,8 @@ import "./integrations/contracts.js";
|
|
|
58
58
|
import "./knowledge/contracts.js";
|
|
59
59
|
import "./regenerator/service.js";
|
|
60
60
|
import "./regenerator/index.js";
|
|
61
|
+
import "./workspace-config/contractsrc-schema.js";
|
|
62
|
+
import "./workspace-config/index.js";
|
|
61
63
|
import "./workflow/runner.js";
|
|
62
64
|
import "./workflow/index.js";
|
|
63
65
|
import "./docs/tech-contracts.docs.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E5, x8 } from "../schema/dist/index.js";
|
|
2
|
-
import { defineCommand, defineQuery } from "../
|
|
2
|
+
import { defineCommand, defineQuery } from "../operation.js";
|
|
3
3
|
|
|
4
4
|
//#region ../../modules/notifications/dist/libs/contracts/dist/integrations/contracts.js
|
|
5
5
|
const IntegrationConnectionRecord = new x8({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../../../../modules/notifications/dist/libs/contracts/dist/integrations/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../spec.js\";\n\n//#region ../../libs/contracts/dist/integrations/contracts.js\nconst IntegrationConnectionRecord = new x8({\n\tname: \"IntegrationConnectionRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthCheckedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthLatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorMessage: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageRequestCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageSuccessCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageErrorCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastUsedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateIntegrationConnectionInput = new x8({\n\tname: \"CreateIntegrationConnectionInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst UpdateIntegrationConnectionInput = new x8({\n\tname: \"UpdateIntegrationConnectionInput\",\n\tfields: {\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionInput = new x8({\n\tname: \"DeleteIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst ListIntegrationConnectionsInput = new x8({\n\tname: \"ListIntegrationConnectionsInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcategory: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListIntegrationConnectionsOutput = new x8({\n\tname: \"ListIntegrationConnectionsOutput\",\n\tfields: { connections: {\n\t\ttype: IntegrationConnectionRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TestIntegrationConnectionInput = new x8({\n\tname: \"TestIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TestIntegrationConnectionOutput = new x8({\n\tname: \"TestIntegrationConnectionOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionOutput = new x8({\n\tname: \"DeleteIntegrationConnectionOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst CreateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a new integration connection for a tenant.\",\n\t\tgoal: \"Provision a tenant-scoped connection to an external provider.\",\n\t\tcontext: \"Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or credentials for an integration connection.\",\n\t\tgoal: \"Allow secure rotation of credentials and metadata adjustments.\",\n\t\tcontext: \"Supports rotating API keys, toggling status, or updating labels for tenant integrations.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete an integration connection for a tenant.\",\n\t\tgoal: \"Safely remove credentials and disable connector usage.\",\n\t\tcontext: \"Ensures connections are de-provisioned when no longer needed or breached.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteIntegrationConnectionInput,\n\t\toutput: DeleteIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListIntegrationConnections = defineQuery({\n\tmeta: {\n\t\tname: \"integrations.connection.list\",\n\t\tversion: 1,\n\t\tdescription: \"List integration connections for a tenant.\",\n\t\tgoal: \"Provide visibility into configured integrations and their status.\",\n\t\tcontext: \"Used by the App Studio and Ops flows to show bindings and health.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListIntegrationConnectionsInput,\n\t\toutput: ListIntegrationConnectionsOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TestIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.test\",\n\t\tversion: 1,\n\t\tdescription: \"Run a health check against a configured integration connection.\",\n\t\tgoal: \"Validate credentials and connectivity for external providers.\",\n\t\tcontext: \"Triggered manually or by background monitors to confirm provider availability.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TestIntegrationConnectionInput,\n\t\toutput: TestIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\n\n//#endregion\n//# sourceMappingURL=contracts.js.map"],"mappings":";;;;AAIA,MAAM,8BAA8B,IAAI,GAAG;CAC1C,MAAM;CACN,QAAQ;EACP,IAAI;GACH,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,oBAAoB;GACnB,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,OAAO;GACN,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,eAAe;GACd,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,mBAAmB;GAClB,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,aAAa;GACZ,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,iBAAiB;GAChB,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD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Y;CAC9C,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,wBAAwB;EACjC,MAAM,CAAC,eAAe,cAAc;EACpC,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC;AACgC,cAAc;CAC/C,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,wBAAwB;EACjC,MAAM,CAAC,eAAe,cAAc;EACpC,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../../../../modules/notifications/dist/libs/contracts/dist/integrations/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../operation.js\";\n\n//#region ../../libs/contracts/dist/integrations/contracts.js\nconst IntegrationConnectionRecord = new x8({\n\tname: \"IntegrationConnectionRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthCheckedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthLatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorMessage: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageRequestCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageSuccessCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageErrorCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastUsedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateIntegrationConnectionInput = new x8({\n\tname: \"CreateIntegrationConnectionInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst UpdateIntegrationConnectionInput = new x8({\n\tname: \"UpdateIntegrationConnectionInput\",\n\tfields: {\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionInput = new x8({\n\tname: \"DeleteIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst ListIntegrationConnectionsInput = new x8({\n\tname: \"ListIntegrationConnectionsInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcategory: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListIntegrationConnectionsOutput = new x8({\n\tname: \"ListIntegrationConnectionsOutput\",\n\tfields: { connections: {\n\t\ttype: IntegrationConnectionRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TestIntegrationConnectionInput = new x8({\n\tname: \"TestIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TestIntegrationConnectionOutput = new x8({\n\tname: \"TestIntegrationConnectionOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionOutput = new x8({\n\tname: \"DeleteIntegrationConnectionOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst CreateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a new integration connection for a tenant.\",\n\t\tgoal: \"Provision a tenant-scoped connection to an external provider.\",\n\t\tcontext: \"Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or credentials for an integration connection.\",\n\t\tgoal: \"Allow secure rotation of credentials and metadata adjustments.\",\n\t\tcontext: \"Supports rotating API keys, toggling status, or updating labels for tenant integrations.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete an integration connection for a tenant.\",\n\t\tgoal: \"Safely remove credentials and disable connector usage.\",\n\t\tcontext: \"Ensures connections are de-provisioned when no longer needed or breached.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteIntegrationConnectionInput,\n\t\toutput: DeleteIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListIntegrationConnections = defineQuery({\n\tmeta: {\n\t\tname: \"integrations.connection.list\",\n\t\tversion: 1,\n\t\tdescription: \"List integration connections for a tenant.\",\n\t\tgoal: \"Provide visibility into configured integrations and their status.\",\n\t\tcontext: \"Used by the App Studio and Ops flows to show bindings and health.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListIntegrationConnectionsInput,\n\t\toutput: ListIntegrationConnectionsOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TestIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.test\",\n\t\tversion: 1,\n\t\tdescription: \"Run a health check against a configured integration connection.\",\n\t\tgoal: \"Validate credentials and connectivity for external providers.\",\n\t\tcontext: \"Triggered manually or by background monitors to confirm provider availability.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TestIntegrationConnectionInput,\n\t\toutput: TestIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\n\n//#endregion\n//# sourceMappingURL=contracts.js.map"],"mappings":";;;;AAIA,MAAM,8BAA8B,IAAI,GAAG;CAC1C,MAAM;CACN,QAAQ;EACP,IAAI;GACH,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,UAAU;GACT,MA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|
|
1
1
|
import { E5, x8 } from "../../../schema/dist/index.js";
|
|
2
|
-
import { defineCommand, defineQuery } from "../../../
|
|
2
|
+
import { defineCommand, defineQuery } from "../../../operation.js";
|
|
3
3
|
import { BankAccountRecord } from "../models.js";
|
|
4
4
|
import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
|
|
5
5
|
|