@lssm/example.pocket-family-office 0.0.0-canary-20251217062943 → 0.0.0-canary-20251217072406

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.
Files changed (47) hide show
  1. package/dist/blueprint.js +200 -1
  2. package/dist/connections/samples.js +226 -1
  3. package/dist/contracts/index.js +270 -1
  4. package/dist/index.js +18 -1
  5. package/dist/knowledge/sources.sample.js +49 -1
  6. package/dist/libs/contracts/dist/integrations/index.js +18 -1
  7. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
  8. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
  9. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
  10. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
  11. package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
  12. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +25 -1
  13. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
  14. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
  15. package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
  16. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
  17. package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
  18. package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
  19. package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
  20. package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
  21. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
  22. package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
  23. package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
  24. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
  25. package/dist/libs/contracts/dist/ownership.js +38 -1
  26. package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
  27. package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
  28. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
  29. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -1
  30. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
  31. package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
  32. package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
  33. package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
  34. package/dist/libs/contracts/dist/spec.js +34 -1
  35. package/dist/pocket-family-office.feature.js +46 -1
  36. package/dist/telemetry.js +170 -1
  37. package/dist/tenant.sample.js +89 -1
  38. package/dist/workflows/generate-financial-summary.js +60 -1
  39. package/dist/workflows/generate-openbanking-overview.js +57 -1
  40. package/dist/workflows/index.js +10 -1
  41. package/dist/workflows/ingest-email-threads.js +52 -1
  42. package/dist/workflows/process-uploaded-document.js +50 -1
  43. package/dist/workflows/refresh-openbanking-balances.js +66 -1
  44. package/dist/workflows/sync-openbanking-accounts.js +66 -1
  45. package/dist/workflows/sync-openbanking-transactions.js +66 -1
  46. package/dist/workflows/upcoming-payments-reminder.js +55 -1
  47. package/package.json +5 -5
@@ -1 +1,83 @@
1
- import{e}from"../../ownership.js";e.Stable;
1
+ import { StabilityEnum } from "../../ownership.js";
2
+
3
+ //#region ../../libs/contracts/dist/integrations/providers/stripe.js
4
+ const stripeIntegrationSpec = {
5
+ meta: {
6
+ key: "payments.stripe",
7
+ version: 1,
8
+ category: "payments",
9
+ displayName: "Stripe",
10
+ title: "Stripe Payments",
11
+ description: "Stripe integration for payment processing, charges, and payouts.",
12
+ domain: "payments",
13
+ owners: ["platform.payments"],
14
+ tags: ["payments", "psp"],
15
+ stability: StabilityEnum.Stable
16
+ },
17
+ supportedModes: ["managed", "byok"],
18
+ capabilities: {
19
+ provides: [{
20
+ key: "payments.psp",
21
+ version: 1
22
+ }],
23
+ requires: [{
24
+ key: "platform.webhooks",
25
+ optional: true,
26
+ reason: "Recommended for reliable event ingestion"
27
+ }]
28
+ },
29
+ configSchema: {
30
+ schema: {
31
+ type: "object",
32
+ properties: {
33
+ accountId: {
34
+ type: "string",
35
+ description: "Connected account ID when using Stripe Connect (BYOK)."
36
+ },
37
+ region: {
38
+ type: "string",
39
+ description: "Optional Stripe region or data residency hint."
40
+ }
41
+ }
42
+ },
43
+ example: {
44
+ accountId: "acct_123",
45
+ region: "us-east-1"
46
+ }
47
+ },
48
+ secretSchema: {
49
+ schema: {
50
+ type: "object",
51
+ required: ["apiKey", "webhookSecret"],
52
+ properties: {
53
+ apiKey: {
54
+ type: "string",
55
+ description: "Stripe secret API key (sk_live_... or sk_test_...)."
56
+ },
57
+ webhookSecret: {
58
+ type: "string",
59
+ description: "Signing secret for webhook verification."
60
+ }
61
+ }
62
+ },
63
+ example: {
64
+ apiKey: "sk_live_***",
65
+ webhookSecret: "whsec_***"
66
+ }
67
+ },
68
+ healthCheck: {
69
+ method: "ping",
70
+ timeoutMs: 5e3
71
+ },
72
+ docsUrl: "https://stripe.com/docs/api",
73
+ constraints: { rateLimit: {
74
+ rpm: 1e3,
75
+ rph: 2e4
76
+ } },
77
+ byokSetup: {
78
+ setupInstructions: "Create a restricted Stripe API key with write access to Charges and provide a webhook signing secret.",
79
+ requiredScopes: ["charges:write", "customers:read"]
80
+ }
81
+ };
82
+
83
+ //#endregion
@@ -1 +1,61 @@
1
- import{e}from"../../ownership.js";e.Stable;
1
+ import { StabilityEnum } from "../../ownership.js";
2
+
3
+ //#region ../../libs/contracts/dist/integrations/providers/twilio-sms.js
4
+ const twilioSmsIntegrationSpec = {
5
+ meta: {
6
+ key: "sms.twilio",
7
+ version: 1,
8
+ category: "sms",
9
+ displayName: "Twilio SMS",
10
+ title: "Twilio Messaging",
11
+ description: "Twilio SMS integration for transactional and notification messaging.",
12
+ domain: "communications",
13
+ owners: ["platform.messaging"],
14
+ tags: ["sms", "messaging"],
15
+ stability: StabilityEnum.Stable
16
+ },
17
+ supportedModes: ["managed", "byok"],
18
+ capabilities: { provides: [{
19
+ key: "sms.outbound",
20
+ version: 1
21
+ }] },
22
+ configSchema: {
23
+ schema: {
24
+ type: "object",
25
+ properties: { fromNumber: {
26
+ type: "string",
27
+ description: "Default Twilio phone number used as sender."
28
+ } }
29
+ },
30
+ example: { fromNumber: "+15551234567" }
31
+ },
32
+ secretSchema: {
33
+ schema: {
34
+ type: "object",
35
+ required: ["accountSid", "authToken"],
36
+ properties: {
37
+ accountSid: {
38
+ type: "string",
39
+ description: "Twilio Account SID."
40
+ },
41
+ authToken: {
42
+ type: "string",
43
+ description: "Twilio Auth Token."
44
+ }
45
+ }
46
+ },
47
+ example: {
48
+ accountSid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
49
+ authToken: "auth-token"
50
+ }
51
+ },
52
+ healthCheck: {
53
+ method: "custom",
54
+ timeoutMs: 3e3
55
+ },
56
+ docsUrl: "https://www.twilio.com/docs/sms/api",
57
+ constraints: { rateLimit: { rpm: 200 } },
58
+ byokSetup: { setupInstructions: "Provide a Twilio account SID, auth token, and verify the outbound sending numbers used by the integration." }
59
+ };
60
+
61
+ //#endregion
@@ -1 +1,38 @@
1
- const e={Idea:`idea`,InCreation:`in_creation`,Experimental:`experimental`,Beta:`beta`,Stable:`stable`,Deprecated:`deprecated`},t={ProductColiving:`product.coliving`,ProductStrit:`product.strit`,ProductArtisanos:`product.artisanos`,PlatformSigil:`platform.sigil`,PlatformMarketplace:`platform.marketplace`,PlatformContent:`platform.content`,PlatformFeatureFlags:`platform.featureflags`},n={Spots:`spots`,Collectivity:`collectivity`,Marketplace:`marketplace`,Sellers:`sellers`,Auth:`auth`,Login:`login`,Signup:`signup`,Guide:`guide`,Docs:`docs`,I18n:`i18n`,AtomicPages:`atomic:pages`,Incident:`incident`,Hygiene:`hygiene`,WeeklyPulse:`weekly_pulse`,WebAuth:`webauth`};export{e,n as r,t};
1
+ //#region ../../libs/contracts/dist/ownership.js
2
+ const StabilityEnum = {
3
+ Idea: "idea",
4
+ InCreation: "in_creation",
5
+ Experimental: "experimental",
6
+ Beta: "beta",
7
+ Stable: "stable",
8
+ Deprecated: "deprecated"
9
+ };
10
+ const OwnersEnum = {
11
+ ProductColiving: "product.coliving",
12
+ ProductStrit: "product.strit",
13
+ ProductArtisanos: "product.artisanos",
14
+ PlatformSigil: "platform.sigil",
15
+ PlatformMarketplace: "platform.marketplace",
16
+ PlatformContent: "platform.content",
17
+ PlatformFeatureFlags: "platform.featureflags"
18
+ };
19
+ const TagsEnum = {
20
+ Spots: "spots",
21
+ Collectivity: "collectivity",
22
+ Marketplace: "marketplace",
23
+ Sellers: "sellers",
24
+ Auth: "auth",
25
+ Login: "login",
26
+ Signup: "signup",
27
+ Guide: "guide",
28
+ Docs: "docs",
29
+ I18n: "i18n",
30
+ AtomicPages: "atomic:pages",
31
+ Incident: "incident",
32
+ Hygiene: "hygiene",
33
+ WeeklyPulse: "weekly_pulse",
34
+ WebAuth: "webauth"
35
+ };
36
+
37
+ //#endregion
38
+ export { OwnersEnum, StabilityEnum, TagsEnum };
@@ -1 +1,2 @@
1
- import"zod";import"graphql";
1
+ import "zod";
2
+ import "graphql";
@@ -1 +1,49 @@
1
- import"zod";import{GraphQLScalarType as e}from"graphql";var t=class extends e{zodSchema;jsonSchemaDef;constructor(e){super(e),this.zodSchema=e.zod,this.jsonSchemaDef=e.jsonSchema}getZod(){return this.zodSchema}getPothos(){return this}getJson(){return typeof this.jsonSchemaDef==`function`?this.jsonSchemaDef():this.jsonSchemaDef}getJsonSchemaDef(){return this.jsonSchemaDef}getJsonSchema(){let e=t=>{let n=typeof t==`function`?t():t;if(Array.isArray(n))return n.map(t=>e(t));if(n&&typeof n==`object`){let t={};for(let[r,i]of Object.entries(n))t[r]=e(i);return t}return n};return e(this.getJson())}};export{t};
1
+ import "zod";
2
+ import { GraphQLScalarType } from "graphql";
3
+
4
+ //#region ../../libs/contracts/dist/schema/dist/FieldType.js
5
+ /**
6
+ * GraphQL scalar wrapper that carries zod and JSON Schema metadata.
7
+ *
8
+ * TInternal is the runtime representation; TExternal is the GraphQL output.
9
+ */
10
+ var FieldType = class extends GraphQLScalarType {
11
+ zodSchema;
12
+ jsonSchemaDef;
13
+ constructor(config) {
14
+ super(config);
15
+ this.zodSchema = config.zod;
16
+ this.jsonSchemaDef = config.jsonSchema;
17
+ }
18
+ /** Return the attached zod schema for validation. */
19
+ getZod() {
20
+ return this.zodSchema;
21
+ }
22
+ /** GraphQL scalar instance usable by Pothos or vanilla GraphQL. */
23
+ getPothos() {
24
+ return this;
25
+ }
26
+ /** Return the JSON Schema (evaluates factory if provided). */
27
+ getJson() {
28
+ return typeof this.jsonSchemaDef === "function" ? this.jsonSchemaDef() : this.jsonSchemaDef;
29
+ }
30
+ getJsonSchemaDef() {
31
+ return this.jsonSchemaDef;
32
+ }
33
+ getJsonSchema() {
34
+ const deepResolve = (v) => {
35
+ const value = typeof v === "function" ? v() : v;
36
+ if (Array.isArray(value)) return value.map((item) => deepResolve(item));
37
+ if (value && typeof value === "object") {
38
+ const obj = {};
39
+ for (const [k, val] of Object.entries(value)) obj[k] = deepResolve(val);
40
+ return obj;
41
+ }
42
+ return value;
43
+ };
44
+ return deepResolve(this.getJson());
45
+ }
46
+ };
47
+
48
+ //#endregion
49
+ export { FieldType };
@@ -1 +1,236 @@
1
- import{t as e}from"./FieldType.js";import*as t from"zod";import{Kind as n}from"graphql";const r=/^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/,i=/^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/,a=/^[+]?\d[\d\s().-]{3,}$/,o=/^[A-Z]{3}$/,s=/^[A-Z]{2}$/,c=-180,l={String_unsecure:()=>new e({name:`String_unsecure`,description:`Unvalidated string scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),Int_unsecure:()=>new e({name:`Int_unsecure`,description:`Unvalidated integer scalar`,zod:t.number().int(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().int().parse(n)},serialize:e=>Math.trunc(typeof e==`number`?e:Number(e)),parseLiteral:e=>{if(e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`integer`}}),Float_unsecure:()=>new e({name:`Float_unsecure`,description:`Unvalidated float scalar`,zod:t.number(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().parse(n)},serialize:e=>Number(e),parseLiteral:e=>{if(e.kind!==n.FLOAT&&e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`number`}}),Boolean:()=>new e({name:`Boolean`,description:`Unvalidated boolean scalar`,zod:t.boolean(),parseValue:e=>t.coerce.boolean().parse(e),serialize:e=>!!e,parseLiteral:e=>{if(e.kind!==n.BOOLEAN)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`boolean`}}),ID:()=>new e({name:`ID`,description:`Unvalidated id scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),JSON:()=>new e({name:`JSON`,zod:t.any(),parseValue:e=>e,serialize:e=>e,jsonSchema:{}}),JSONObject:()=>new e({name:`JSONObject`,zod:t.record(t.string(),t.any()),parseValue:e=>t.record(t.string(),t.any()).parse(e),serialize:e=>e??{},jsonSchema:{type:`object`}}),Date:()=>new e({name:`Date`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString().split(`T`)[0]:String(e),jsonSchema:{type:`string`,format:`date`}}),DateTime:()=>new e({name:`DateTime`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString():String(e),jsonSchema:{type:`string`,format:`date-time`}}),Time:()=>new e({name:`Time`,zod:t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/),parseValue:e=>t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:`^\\d{2}:\\d{2}(:\\d{2})?$`}}),EmailAddress:()=>new e({name:`EmailAddress`,zod:t.string().email(),parseValue:e=>t.string().email().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`email`}}),URL:()=>new e({name:`URL`,zod:t.string().url(),parseValue:e=>t.string().url().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`uri`}}),PhoneNumber:()=>new e({name:`PhoneNumber`,zod:t.string().regex(a),parseValue:e=>t.string().regex(a).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:a.source}}),NonEmptyString:()=>new e({name:`NonEmptyString`,zod:t.string().min(1),parseValue:e=>t.string().min(1).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,minLength:1}}),Locale:()=>new e({name:`Locale`,zod:t.string().regex(r),parseValue:e=>t.string().regex(r).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:r.source}}),TimeZone:()=>new e({name:`TimeZone`,zod:t.string().regex(i),parseValue:e=>t.string().regex(i).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:i.source}}),Latitude:()=>new e({name:`Latitude`,zod:t.number().min(-90).max(90),parseValue:e=>t.coerce.number().min(-90).max(90).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:-90,maximum:90}}),Longitude:()=>new e({name:`Longitude`,zod:t.number().min(c).max(180),parseValue:e=>t.coerce.number().min(c).max(180).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:c,maximum:180}}),Currency:()=>new e({name:`Currency`,zod:t.string().regex(o),parseValue:e=>t.string().regex(o).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:o.source}}),CountryCode:()=>new e({name:`CountryCode`,zod:t.string().regex(s),parseValue:e=>t.string().regex(s).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:s.source}})};export{l};
1
+ import { FieldType } from "./FieldType.js";
2
+ import * as z$1 from "zod";
3
+ import { Kind } from "graphql";
4
+
5
+ //#region ../../libs/contracts/dist/schema/dist/ScalarTypeEnum.js
6
+ const localeRegex = /^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/;
7
+ const timezoneRegex = /^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/;
8
+ const phoneRegex = /^[+]?\d[\d\s().-]{3,}$/;
9
+ const currencyRegex = /^[A-Z]{3}$/;
10
+ const countryRegex = /^[A-Z]{2}$/;
11
+ const latMin = -90;
12
+ const latMax = 90;
13
+ const lonMin = -180;
14
+ const lonMax = 180;
15
+ /**
16
+ * Factory functions for common scalar FieldTypes with zod/GraphQL/JSON Schema.
17
+ */
18
+ const ScalarTypeEnum = {
19
+ String_unsecure: () => new FieldType({
20
+ name: "String_unsecure",
21
+ description: "Unvalidated string scalar",
22
+ zod: z$1.string(),
23
+ parseValue: (v) => z$1.string().parse(v),
24
+ serialize: (v) => String(v),
25
+ parseLiteral: (ast) => {
26
+ if (ast.kind !== Kind.STRING) throw new TypeError("Invalid literal");
27
+ return ast.value;
28
+ },
29
+ jsonSchema: { type: "string" }
30
+ }),
31
+ Int_unsecure: () => new FieldType({
32
+ name: "Int_unsecure",
33
+ description: "Unvalidated integer scalar",
34
+ zod: z$1.number().int(),
35
+ parseValue: (v) => {
36
+ const num = typeof v === "number" ? v : Number(v);
37
+ return z$1.number().int().parse(num);
38
+ },
39
+ serialize: (v) => Math.trunc(typeof v === "number" ? v : Number(v)),
40
+ parseLiteral: (ast) => {
41
+ if (ast.kind !== Kind.INT) throw new TypeError("Invalid literal");
42
+ return Number(ast.value);
43
+ },
44
+ jsonSchema: { type: "integer" }
45
+ }),
46
+ Float_unsecure: () => new FieldType({
47
+ name: "Float_unsecure",
48
+ description: "Unvalidated float scalar",
49
+ zod: z$1.number(),
50
+ parseValue: (v) => {
51
+ const num = typeof v === "number" ? v : Number(v);
52
+ return z$1.number().parse(num);
53
+ },
54
+ serialize: (v) => Number(v),
55
+ parseLiteral: (ast) => {
56
+ if (ast.kind !== Kind.FLOAT && ast.kind !== Kind.INT) throw new TypeError("Invalid literal");
57
+ return Number(ast.value);
58
+ },
59
+ jsonSchema: { type: "number" }
60
+ }),
61
+ Boolean: () => new FieldType({
62
+ name: "Boolean",
63
+ description: "Unvalidated boolean scalar",
64
+ zod: z$1.boolean(),
65
+ parseValue: (v) => z$1.coerce.boolean().parse(v),
66
+ serialize: (v) => Boolean(v),
67
+ parseLiteral: (ast) => {
68
+ if (ast.kind !== Kind.BOOLEAN) throw new TypeError("Invalid literal");
69
+ return ast.value;
70
+ },
71
+ jsonSchema: { type: "boolean" }
72
+ }),
73
+ ID: () => new FieldType({
74
+ name: "ID",
75
+ description: "Unvalidated id scalar",
76
+ zod: z$1.string(),
77
+ parseValue: (v) => z$1.string().parse(v),
78
+ serialize: (v) => String(v),
79
+ parseLiteral: (ast) => {
80
+ if (ast.kind !== Kind.STRING) throw new TypeError("Invalid literal");
81
+ return ast.value;
82
+ },
83
+ jsonSchema: { type: "string" }
84
+ }),
85
+ JSON: () => new FieldType({
86
+ name: "JSON",
87
+ zod: z$1.any(),
88
+ parseValue: (v) => v,
89
+ serialize: (v) => v,
90
+ jsonSchema: {}
91
+ }),
92
+ JSONObject: () => new FieldType({
93
+ name: "JSONObject",
94
+ zod: z$1.record(z$1.string(), z$1.any()),
95
+ parseValue: (v) => z$1.record(z$1.string(), z$1.any()).parse(v),
96
+ serialize: (v) => v ?? {},
97
+ jsonSchema: { type: "object" }
98
+ }),
99
+ Date: () => new FieldType({
100
+ name: "Date",
101
+ zod: z$1.date(),
102
+ parseValue: (v) => v instanceof Date ? v : new Date(String(v)),
103
+ serialize: (v) => v instanceof Date ? v.toISOString().split("T")[0] : String(v),
104
+ jsonSchema: {
105
+ type: "string",
106
+ format: "date"
107
+ }
108
+ }),
109
+ DateTime: () => new FieldType({
110
+ name: "DateTime",
111
+ zod: z$1.date(),
112
+ parseValue: (v) => v instanceof Date ? v : new Date(String(v)),
113
+ serialize: (v) => {
114
+ return v instanceof Date ? v.toISOString() : String(v);
115
+ },
116
+ jsonSchema: {
117
+ type: "string",
118
+ format: "date-time"
119
+ }
120
+ }),
121
+ Time: () => new FieldType({
122
+ name: "Time",
123
+ zod: z$1.string().regex(/^\d{2}:\d{2}(:\d{2})?$/),
124
+ parseValue: (v) => z$1.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(v),
125
+ serialize: (v) => String(v),
126
+ jsonSchema: {
127
+ type: "string",
128
+ pattern: "^\\d{2}:\\d{2}(:\\d{2})?$"
129
+ }
130
+ }),
131
+ EmailAddress: () => new FieldType({
132
+ name: "EmailAddress",
133
+ zod: z$1.string().email(),
134
+ parseValue: (v) => z$1.string().email().parse(v),
135
+ serialize: (v) => String(v),
136
+ jsonSchema: {
137
+ type: "string",
138
+ format: "email"
139
+ }
140
+ }),
141
+ URL: () => new FieldType({
142
+ name: "URL",
143
+ zod: z$1.string().url(),
144
+ parseValue: (v) => z$1.string().url().parse(v),
145
+ serialize: (v) => String(v),
146
+ jsonSchema: {
147
+ type: "string",
148
+ format: "uri"
149
+ }
150
+ }),
151
+ PhoneNumber: () => new FieldType({
152
+ name: "PhoneNumber",
153
+ zod: z$1.string().regex(phoneRegex),
154
+ parseValue: (v) => z$1.string().regex(phoneRegex).parse(v),
155
+ serialize: (v) => String(v),
156
+ jsonSchema: {
157
+ type: "string",
158
+ pattern: phoneRegex.source
159
+ }
160
+ }),
161
+ NonEmptyString: () => new FieldType({
162
+ name: "NonEmptyString",
163
+ zod: z$1.string().min(1),
164
+ parseValue: (v) => z$1.string().min(1).parse(v),
165
+ serialize: (v) => String(v),
166
+ jsonSchema: {
167
+ type: "string",
168
+ minLength: 1
169
+ }
170
+ }),
171
+ Locale: () => new FieldType({
172
+ name: "Locale",
173
+ zod: z$1.string().regex(localeRegex),
174
+ parseValue: (v) => z$1.string().regex(localeRegex).parse(v),
175
+ serialize: (v) => String(v),
176
+ jsonSchema: {
177
+ type: "string",
178
+ pattern: localeRegex.source
179
+ }
180
+ }),
181
+ TimeZone: () => new FieldType({
182
+ name: "TimeZone",
183
+ zod: z$1.string().regex(timezoneRegex),
184
+ parseValue: (v) => z$1.string().regex(timezoneRegex).parse(v),
185
+ serialize: (v) => String(v),
186
+ jsonSchema: {
187
+ type: "string",
188
+ pattern: timezoneRegex.source
189
+ }
190
+ }),
191
+ Latitude: () => new FieldType({
192
+ name: "Latitude",
193
+ zod: z$1.number().min(latMin).max(latMax),
194
+ parseValue: (v) => z$1.coerce.number().min(latMin).max(latMax).parse(v),
195
+ serialize: (v) => Number(v),
196
+ jsonSchema: {
197
+ type: "number",
198
+ minimum: latMin,
199
+ maximum: latMax
200
+ }
201
+ }),
202
+ Longitude: () => new FieldType({
203
+ name: "Longitude",
204
+ zod: z$1.number().min(lonMin).max(lonMax),
205
+ parseValue: (v) => z$1.coerce.number().min(lonMin).max(lonMax).parse(v),
206
+ serialize: (v) => Number(v),
207
+ jsonSchema: {
208
+ type: "number",
209
+ minimum: lonMin,
210
+ maximum: lonMax
211
+ }
212
+ }),
213
+ Currency: () => new FieldType({
214
+ name: "Currency",
215
+ zod: z$1.string().regex(currencyRegex),
216
+ parseValue: (v) => z$1.string().regex(currencyRegex).parse(v),
217
+ serialize: (v) => String(v),
218
+ jsonSchema: {
219
+ type: "string",
220
+ pattern: currencyRegex.source
221
+ }
222
+ }),
223
+ CountryCode: () => new FieldType({
224
+ name: "CountryCode",
225
+ zod: z$1.string().regex(countryRegex),
226
+ parseValue: (v) => z$1.string().regex(countryRegex).parse(v),
227
+ serialize: (v) => String(v),
228
+ jsonSchema: {
229
+ type: "string",
230
+ pattern: countryRegex.source
231
+ }
232
+ })
233
+ };
234
+
235
+ //#endregion
236
+ export { ScalarTypeEnum };
@@ -1 +1,34 @@
1
- import"./FieldType.js";import"./EnumType.js";import*as e from"zod";var t=class{constructor(e){this.config=e}getZod(){let t=Object.entries(this.config.fields).reduce((t,[n,r])=>{let i=r.type.getZod(),a=r.isArray?e.array(i):i;return t[n]=r.isOptional?a.optional():a,t},{});return e.object(t)}getPothosInput(){return this.config.name}};export{t};
1
+ import "./FieldType.js";
2
+ import "./EnumType.js";
3
+ import * as z$1 from "zod";
4
+
5
+ //#region ../../libs/contracts/dist/schema/dist/SchemaModel.js
6
+ /**
7
+ * Named object model built from FieldType/EnumType/SchemaModel fields.
8
+ * Provides zod and GraphQL input helpers, and supports arrays/optional fields.
9
+ */
10
+ var SchemaModel = class {
11
+ constructor(config) {
12
+ this.config = config;
13
+ }
14
+ /**
15
+ * Build a typed ZodObject from the model fields, preserving each field's
16
+ * Zod schema and optionality at the type level when possible.
17
+ */
18
+ getZod() {
19
+ const shape = Object.entries(this.config.fields).reduce((acc, [key, def]) => {
20
+ const base = def.type.getZod();
21
+ const withArray = def.isArray ? z$1.array(base) : base;
22
+ acc[key] = def.isOptional ? withArray.optional() : withArray;
23
+ return acc;
24
+ }, {});
25
+ return z$1.object(shape);
26
+ }
27
+ /** Input object name for GraphQL builder adapters. */
28
+ getPothosInput() {
29
+ return this.config.name;
30
+ }
31
+ };
32
+
33
+ //#endregion
34
+ export { SchemaModel };
@@ -1 +1 @@
1
- import"zod";
1
+ import "zod";
@@ -1 +1,2 @@
1
- import"./defineEntity.js";import"./types.js";
1
+ import "./defineEntity.js";
2
+ import "./types.js";
@@ -1 +1 @@
1
- import"zod";
1
+ import "zod";
@@ -1 +1,6 @@
1
- import"./FieldType.js";import"./ScalarTypeEnum.js";import"./EnumType.js";import"./SchemaModel.js";import"./entity/defineEntity.js";import"./entity/index.js";
1
+ import "./FieldType.js";
2
+ import "./ScalarTypeEnum.js";
3
+ import "./EnumType.js";
4
+ import "./SchemaModel.js";
5
+ import "./entity/defineEntity.js";
6
+ import "./entity/index.js";
@@ -1 +1,34 @@
1
- const e=e=>({...e,meta:{...e.meta,kind:`command`},policy:{...e.policy,idempotent:e.policy?.policy?.idempotent??!1}}),t=e=>({...e,meta:{...e.meta,kind:`query`},policy:{...e.policy,idempotent:!0}});export{t as n,e as t};
1
+ //#region ../../libs/contracts/dist/spec.js
2
+ /**
3
+ * Helper to define a Command (write operation).
4
+ * Sets `kind: 'command'` and defaults `idempotent: false`.
5
+ */
6
+ const defineCommand = (spec) => ({
7
+ ...spec,
8
+ meta: {
9
+ ...spec.meta,
10
+ kind: "command"
11
+ },
12
+ policy: {
13
+ ...spec.policy,
14
+ idempotent: spec.policy?.["policy"]?.idempotent ?? false
15
+ }
16
+ });
17
+ /**
18
+ * Helper to define a Query (read-only operation).
19
+ * Sets `kind: 'query'` and forces `idempotent: true`.
20
+ */
21
+ const defineQuery = (spec) => ({
22
+ ...spec,
23
+ meta: {
24
+ ...spec.meta,
25
+ kind: "query"
26
+ },
27
+ policy: {
28
+ ...spec.policy,
29
+ idempotent: true
30
+ }
31
+ });
32
+
33
+ //#endregion
34
+ export { defineCommand, defineQuery };
@@ -1 +1,46 @@
1
- const e={meta:{key:`pocket-family-office`,title:`Pocket Family Office`,description:`Personal finance automation with document ingestion, open banking, and AI summaries`,domain:`finance`,owners:[`@platform.finance`],tags:[`finance`,`open-banking`,`documents`,`automation`,`family-office`],stability:`experimental`},operations:[{name:`pfo.documents.upload`,version:1}],events:[],presentations:[],opToPresentation:[],presentationsTargets:[],capabilities:{provides:[{key:`pocket-family-office`,version:1}],requires:[{key:`identity`,version:1},{key:`openbanking`,version:1}]}};export{e as PocketFamilyOfficeFeature};
1
+ //#region src/pocket-family-office.feature.ts
2
+ /**
3
+ * Pocket Family Office feature module that bundles financial document
4
+ * management, open banking integration, and automated summaries.
5
+ */
6
+ const PocketFamilyOfficeFeature = {
7
+ meta: {
8
+ key: "pocket-family-office",
9
+ title: "Pocket Family Office",
10
+ description: "Personal finance automation with document ingestion, open banking, and AI summaries",
11
+ domain: "finance",
12
+ owners: ["@platform.finance"],
13
+ tags: [
14
+ "finance",
15
+ "open-banking",
16
+ "documents",
17
+ "automation",
18
+ "family-office"
19
+ ],
20
+ stability: "experimental"
21
+ },
22
+ operations: [{
23
+ name: "pfo.documents.upload",
24
+ version: 1
25
+ }],
26
+ events: [],
27
+ presentations: [],
28
+ opToPresentation: [],
29
+ presentationsTargets: [],
30
+ capabilities: {
31
+ provides: [{
32
+ key: "pocket-family-office",
33
+ version: 1
34
+ }],
35
+ requires: [{
36
+ key: "identity",
37
+ version: 1
38
+ }, {
39
+ key: "openbanking",
40
+ version: 1
41
+ }]
42
+ }
43
+ };
44
+
45
+ //#endregion
46
+ export { PocketFamilyOfficeFeature };