@contractspec/example.service-business-os 1.44.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/client/client.operations.d.ts +17 -17
  2. package/dist/client/client.operations.js +1 -1
  3. package/dist/client/client.operations.js.map +1 -1
  4. package/dist/client/client.schema.d.ts +16 -16
  5. package/dist/entities/index.d.ts +155 -155
  6. package/dist/events.d.ts +89 -89
  7. package/dist/events.d.ts.map +1 -1
  8. package/dist/events.js +6 -6
  9. package/dist/events.js.map +1 -1
  10. package/dist/example.d.ts +3 -33
  11. package/dist/example.d.ts.map +1 -1
  12. package/dist/example.js +16 -11
  13. package/dist/example.js.map +1 -1
  14. package/dist/invoice/invoice.operations.d.ts +17 -17
  15. package/dist/invoice/invoice.operations.d.ts.map +1 -1
  16. package/dist/invoice/invoice.operations.js +1 -1
  17. package/dist/invoice/invoice.operations.js.map +1 -1
  18. package/dist/invoice/invoice.schema.d.ts +16 -16
  19. package/dist/job/job.operations.d.ts +61 -61
  20. package/dist/job/job.operations.js +3 -3
  21. package/dist/job/job.operations.js.map +1 -1
  22. package/dist/job/job.schema.d.ts +20 -20
  23. package/dist/payment/payment.operations.d.ts +15 -15
  24. package/dist/payment/payment.operations.js +1 -1
  25. package/dist/payment/payment.operations.js.map +1 -1
  26. package/dist/payment/payment.schema.d.ts +15 -15
  27. package/dist/presentations.js +7 -7
  28. package/dist/presentations.js.map +1 -1
  29. package/dist/quote/quote.operations.d.ts +34 -34
  30. package/dist/quote/quote.operations.js +2 -2
  31. package/dist/quote/quote.operations.js.map +1 -1
  32. package/dist/quote/quote.schema.d.ts +24 -24
  33. package/dist/quote/quote.schema.d.ts.map +1 -1
  34. package/dist/service.feature.js +32 -32
  35. package/dist/service.feature.js.map +1 -1
  36. package/package.json +11 -11
@@ -1,58 +1,58 @@
1
- import * as _contractspec_lib_schema403 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema365 from "@contractspec/lib.schema";
2
2
  import * as _contractspec_lib_contracts16 from "@contractspec/lib.contracts";
3
3
 
4
4
  //#region src/payment/payment.operations.d.ts
5
5
  /**
6
6
  * Record a payment.
7
7
  */
8
- declare const RecordPaymentContract: _contractspec_lib_contracts16.OperationSpec<_contractspec_lib_schema403.SchemaModel<{
8
+ declare const RecordPaymentContract: _contractspec_lib_contracts16.OperationSpec<_contractspec_lib_schema365.SchemaModel<{
9
9
  invoiceId: {
10
- type: _contractspec_lib_schema403.FieldType<string, string>;
10
+ type: _contractspec_lib_schema365.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  amount: {
14
- type: _contractspec_lib_schema403.FieldType<number, number>;
14
+ type: _contractspec_lib_schema365.FieldType<number, number>;
15
15
  isOptional: false;
16
16
  };
17
17
  method: {
18
- type: _contractspec_lib_schema403.FieldType<string, string>;
18
+ type: _contractspec_lib_schema365.FieldType<string, string>;
19
19
  isOptional: false;
20
20
  };
21
21
  reference: {
22
- type: _contractspec_lib_schema403.FieldType<string, string>;
22
+ type: _contractspec_lib_schema365.FieldType<string, string>;
23
23
  isOptional: true;
24
24
  };
25
25
  receivedAt: {
26
- type: _contractspec_lib_schema403.FieldType<Date, string>;
26
+ type: _contractspec_lib_schema365.FieldType<Date, string>;
27
27
  isOptional: true;
28
28
  };
29
- }>, _contractspec_lib_schema403.SchemaModel<{
29
+ }>, _contractspec_lib_schema365.SchemaModel<{
30
30
  id: {
31
- type: _contractspec_lib_schema403.FieldType<string, string>;
31
+ type: _contractspec_lib_schema365.FieldType<string, string>;
32
32
  isOptional: false;
33
33
  };
34
34
  invoiceId: {
35
- type: _contractspec_lib_schema403.FieldType<string, string>;
35
+ type: _contractspec_lib_schema365.FieldType<string, string>;
36
36
  isOptional: false;
37
37
  };
38
38
  amount: {
39
- type: _contractspec_lib_schema403.FieldType<number, number>;
39
+ type: _contractspec_lib_schema365.FieldType<number, number>;
40
40
  isOptional: false;
41
41
  };
42
42
  currency: {
43
- type: _contractspec_lib_schema403.FieldType<string, string>;
43
+ type: _contractspec_lib_schema365.FieldType<string, string>;
44
44
  isOptional: false;
45
45
  };
46
46
  method: {
47
- type: _contractspec_lib_schema403.FieldType<string, string>;
47
+ type: _contractspec_lib_schema365.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  reference: {
51
- type: _contractspec_lib_schema403.FieldType<string, string>;
51
+ type: _contractspec_lib_schema365.FieldType<string, string>;
52
52
  isOptional: true;
53
53
  };
54
54
  receivedAt: {
55
- type: _contractspec_lib_schema403.FieldType<Date, string>;
55
+ type: _contractspec_lib_schema365.FieldType<Date, string>;
56
56
  isOptional: false;
57
57
  };
58
58
  }>, undefined>;
@@ -9,7 +9,7 @@ const OWNERS = ["@examples.service-business-os"];
9
9
  const RecordPaymentContract = defineCommand({
10
10
  meta: {
11
11
  key: "service.payment.record",
12
- version: 1,
12
+ version: "1.0.0",
13
13
  stability: "stable",
14
14
  owners: [...OWNERS],
15
15
  tags: [
@@ -1 +1 @@
1
- {"version":3,"file":"payment.operations.js","names":[],"sources":["../../src/payment/payment.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport { PaymentModel, RecordPaymentInputModel } from './payment.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n/**\n * Record a payment.\n */\nexport const RecordPaymentContract = defineCommand({\n meta: {\n key: 'service.payment.record',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'payment', 'record'],\n description: 'Record a payment.',\n goal: 'Track payments.',\n context: 'Billing.',\n },\n io: {\n input: RecordPaymentInputModel,\n output: PaymentModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'record-payment-happy-path',\n given: ['Invoice exists'],\n when: ['User records payment'],\n then: ['Payment is recorded'],\n },\n ],\n examples: [\n {\n key: 'record-check',\n input: { invoiceId: 'inv-456', amount: 100, method: 'check' },\n output: { id: 'pay-123', status: 'completed' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,gCAAgC;;;;AAKhD,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAW;GAAS;EAClD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,iBAAiB;GACzB,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,sBAAsB;GAC9B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,WAAW;IAAW,QAAQ;IAAK,QAAQ;IAAS;GAC7D,QAAQ;IAAE,IAAI;IAAW,QAAQ;IAAa;GAC/C,CACF;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"payment.operations.js","names":[],"sources":["../../src/payment/payment.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport { PaymentModel, RecordPaymentInputModel } from './payment.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n/**\n * Record a payment.\n */\nexport const RecordPaymentContract = defineCommand({\n meta: {\n key: 'service.payment.record',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'payment', 'record'],\n description: 'Record a payment.',\n goal: 'Track payments.',\n context: 'Billing.',\n },\n io: {\n input: RecordPaymentInputModel,\n output: PaymentModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'record-payment-happy-path',\n given: ['Invoice exists'],\n when: ['User records payment'],\n then: ['Payment is recorded'],\n },\n ],\n examples: [\n {\n key: 'record-check',\n input: { invoiceId: 'inv-456', amount: 100, method: 'check' },\n output: { id: 'pay-123', status: 'completed' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,gCAAgC;;;;AAKhD,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAW;GAAS;EAClD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,iBAAiB;GACzB,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,sBAAsB;GAC9B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,WAAW;IAAW,QAAQ;IAAK,QAAQ;IAAS;GAC7D,QAAQ;IAAE,IAAI;IAAW,QAAQ;IAAa;GAC/C,CACF;EACF;CACF,CAAC"}
@@ -1,61 +1,61 @@
1
- import * as _contractspec_lib_schema417 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema427 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/payment/payment.schema.d.ts
4
4
  /**
5
5
  * Payment applied to invoice.
6
6
  */
7
- declare const PaymentModel: _contractspec_lib_schema417.SchemaModel<{
7
+ declare const PaymentModel: _contractspec_lib_schema427.SchemaModel<{
8
8
  id: {
9
- type: _contractspec_lib_schema417.FieldType<string, string>;
9
+ type: _contractspec_lib_schema427.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  invoiceId: {
13
- type: _contractspec_lib_schema417.FieldType<string, string>;
13
+ type: _contractspec_lib_schema427.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  amount: {
17
- type: _contractspec_lib_schema417.FieldType<number, number>;
17
+ type: _contractspec_lib_schema427.FieldType<number, number>;
18
18
  isOptional: false;
19
19
  };
20
20
  currency: {
21
- type: _contractspec_lib_schema417.FieldType<string, string>;
21
+ type: _contractspec_lib_schema427.FieldType<string, string>;
22
22
  isOptional: false;
23
23
  };
24
24
  method: {
25
- type: _contractspec_lib_schema417.FieldType<string, string>;
25
+ type: _contractspec_lib_schema427.FieldType<string, string>;
26
26
  isOptional: false;
27
27
  };
28
28
  reference: {
29
- type: _contractspec_lib_schema417.FieldType<string, string>;
29
+ type: _contractspec_lib_schema427.FieldType<string, string>;
30
30
  isOptional: true;
31
31
  };
32
32
  receivedAt: {
33
- type: _contractspec_lib_schema417.FieldType<Date, string>;
33
+ type: _contractspec_lib_schema427.FieldType<Date, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  }>;
37
37
  /**
38
38
  * Input for recording a payment.
39
39
  */
40
- declare const RecordPaymentInputModel: _contractspec_lib_schema417.SchemaModel<{
40
+ declare const RecordPaymentInputModel: _contractspec_lib_schema427.SchemaModel<{
41
41
  invoiceId: {
42
- type: _contractspec_lib_schema417.FieldType<string, string>;
42
+ type: _contractspec_lib_schema427.FieldType<string, string>;
43
43
  isOptional: false;
44
44
  };
45
45
  amount: {
46
- type: _contractspec_lib_schema417.FieldType<number, number>;
46
+ type: _contractspec_lib_schema427.FieldType<number, number>;
47
47
  isOptional: false;
48
48
  };
49
49
  method: {
50
- type: _contractspec_lib_schema417.FieldType<string, string>;
50
+ type: _contractspec_lib_schema427.FieldType<string, string>;
51
51
  isOptional: false;
52
52
  };
53
53
  reference: {
54
- type: _contractspec_lib_schema417.FieldType<string, string>;
54
+ type: _contractspec_lib_schema427.FieldType<string, string>;
55
55
  isOptional: true;
56
56
  };
57
57
  receivedAt: {
58
- type: _contractspec_lib_schema417.FieldType<Date, string>;
58
+ type: _contractspec_lib_schema427.FieldType<Date, string>;
59
59
  isOptional: true;
60
60
  };
61
61
  }>;
@@ -4,7 +4,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
4
4
  const ServiceDashboardPresentation = {
5
5
  meta: {
6
6
  key: "service-business-os.dashboard",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  title: "Service Dashboard",
9
9
  description: "Service business dashboard with overview metrics",
10
10
  domain: "services",
@@ -25,7 +25,7 @@ const ServiceDashboardPresentation = {
25
25
  const ClientListPresentation = {
26
26
  meta: {
27
27
  key: "service-business-os.client.list",
28
- version: 1,
28
+ version: "1.0.0",
29
29
  title: "Client List",
30
30
  description: "List of service clients",
31
31
  domain: "services",
@@ -50,7 +50,7 @@ const ClientListPresentation = {
50
50
  const QuoteListPresentation = {
51
51
  meta: {
52
52
  key: "service-business-os.quote.list",
53
- version: 1,
53
+ version: "1.0.0",
54
54
  title: "Quote List",
55
55
  description: "List of quotes with status",
56
56
  domain: "services",
@@ -75,7 +75,7 @@ const QuoteListPresentation = {
75
75
  const QuoteDetailPresentation = {
76
76
  meta: {
77
77
  key: "service-business-os.quote.detail",
78
- version: 1,
78
+ version: "1.0.0",
79
79
  title: "Quote Details",
80
80
  description: "Quote detail with line items",
81
81
  domain: "services",
@@ -100,7 +100,7 @@ const QuoteDetailPresentation = {
100
100
  const JobBoardPresentation = {
101
101
  meta: {
102
102
  key: "service-business-os.job.board",
103
- version: 1,
103
+ version: "1.0.0",
104
104
  title: "Job Board",
105
105
  description: "Job board with kanban view",
106
106
  domain: "services",
@@ -126,7 +126,7 @@ const JobBoardPresentation = {
126
126
  const InvoiceListPresentation = {
127
127
  meta: {
128
128
  key: "service-business-os.invoice.list",
129
- version: 1,
129
+ version: "1.0.0",
130
130
  title: "Invoice List",
131
131
  description: "List of invoices with payment status",
132
132
  domain: "services",
@@ -151,7 +151,7 @@ const InvoiceListPresentation = {
151
151
  const PaymentListPresentation = {
152
152
  meta: {
153
153
  key: "service-business-os.payment.list",
154
- version: 1,
154
+ version: "1.0.0",
155
155
  title: "Payment List",
156
156
  description: "List of payments received",
157
157
  domain: "services",
@@ -1 +1 @@
1
- {"version":3,"file":"presentations.js","names":["ServiceDashboardPresentation: PresentationSpec","ClientListPresentation: PresentationSpec","QuoteListPresentation: PresentationSpec","QuoteDetailPresentation: PresentationSpec","JobBoardPresentation: PresentationSpec","InvoiceListPresentation: PresentationSpec","PaymentListPresentation: PresentationSpec"],"sources":["../src/presentations.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const ServiceDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.dashboard',\n version: 1,\n title: 'Service Dashboard',\n description: 'Service business dashboard with overview metrics',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'dashboard'],\n stability: StabilityEnum.Experimental,\n goal: 'Overview of service business metrics',\n context: 'Service home page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ServiceDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.dashboard.enabled'],\n },\n};\n\nexport const ClientListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.client.list',\n version: 1,\n title: 'Client List',\n description: 'List of service clients',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'clients', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Browse and manage service clients',\n context: 'Client management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ClientList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.clients.enabled'],\n },\n};\n\nexport const QuoteListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.quote.list',\n version: 1,\n title: 'Quote List',\n description: 'List of quotes with status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quotes', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track and manage quotes',\n context: 'Quote management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n};\n\nexport const QuoteDetailPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.quote.detail',\n version: 1,\n title: 'Quote Details',\n description: 'Quote detail with line items',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quote', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'View and edit quote details',\n context: 'Quote inspection',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteDetail',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n};\n\nexport const JobBoardPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.job.board',\n version: 1,\n title: 'Job Board',\n description: 'Job board with kanban view',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'jobs', 'board', 'kanban'],\n stability: StabilityEnum.Experimental,\n goal: 'Visual job management',\n context: 'Field service scheduling',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'JobBoard',\n },\n targets: ['react'],\n policy: {\n flags: ['service.jobs.enabled'],\n },\n};\n\nexport const InvoiceListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.invoice.list',\n version: 1,\n title: 'Invoice List',\n description: 'List of invoices with payment status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'invoices', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track invoices and payments',\n context: 'Billing management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'InvoiceList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.invoices.enabled'],\n },\n};\n\nexport const PaymentListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.payment.list',\n version: 1,\n title: 'Payment List',\n description: 'List of payments received',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'payments', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track received payments',\n context: 'Payment reconciliation',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PaymentList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.payments.enabled'],\n },\n};\n"],"mappings":";;;AAGA,MAAaA,+BAAiD;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM,CAAC,YAAY,YAAY;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,4BAA4B,EACrC;CACF;AAED,MAAaC,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAW;GAAO;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,0BAA0B,EACnC;CACF;AAED,MAAaC,wBAA0C;CACrD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAU;GAAO;EACpC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,yBAAyB,EAClC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAS;GAAS;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,yBAAyB,EAClC;CACF;AAED,MAAaC,uBAAyC;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAQ;GAAS;GAAS;EAC7C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF"}
1
+ {"version":3,"file":"presentations.js","names":["ServiceDashboardPresentation: PresentationSpec","ClientListPresentation: PresentationSpec","QuoteListPresentation: PresentationSpec","QuoteDetailPresentation: PresentationSpec","JobBoardPresentation: PresentationSpec","InvoiceListPresentation: PresentationSpec","PaymentListPresentation: PresentationSpec"],"sources":["../src/presentations.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const ServiceDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.dashboard',\n version: '1.0.0',\n title: 'Service Dashboard',\n description: 'Service business dashboard with overview metrics',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'dashboard'],\n stability: StabilityEnum.Experimental,\n goal: 'Overview of service business metrics',\n context: 'Service home page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ServiceDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.dashboard.enabled'],\n },\n};\n\nexport const ClientListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.client.list',\n version: '1.0.0',\n title: 'Client List',\n description: 'List of service clients',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'clients', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Browse and manage service clients',\n context: 'Client management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ClientList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.clients.enabled'],\n },\n};\n\nexport const QuoteListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.quote.list',\n version: '1.0.0',\n title: 'Quote List',\n description: 'List of quotes with status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quotes', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track and manage quotes',\n context: 'Quote management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n};\n\nexport const QuoteDetailPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.quote.detail',\n version: '1.0.0',\n title: 'Quote Details',\n description: 'Quote detail with line items',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quote', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'View and edit quote details',\n context: 'Quote inspection',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteDetail',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n};\n\nexport const JobBoardPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.job.board',\n version: '1.0.0',\n title: 'Job Board',\n description: 'Job board with kanban view',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'jobs', 'board', 'kanban'],\n stability: StabilityEnum.Experimental,\n goal: 'Visual job management',\n context: 'Field service scheduling',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'JobBoard',\n },\n targets: ['react'],\n policy: {\n flags: ['service.jobs.enabled'],\n },\n};\n\nexport const InvoiceListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.invoice.list',\n version: '1.0.0',\n title: 'Invoice List',\n description: 'List of invoices with payment status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'invoices', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track invoices and payments',\n context: 'Billing management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'InvoiceList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.invoices.enabled'],\n },\n};\n\nexport const PaymentListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.payment.list',\n version: '1.0.0',\n title: 'Payment List',\n description: 'List of payments received',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'payments', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track received payments',\n context: 'Payment reconciliation',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PaymentList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.payments.enabled'],\n },\n};\n"],"mappings":";;;AAGA,MAAaA,+BAAiD;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM,CAAC,YAAY,YAAY;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,4BAA4B,EACrC;CACF;AAED,MAAaC,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAW;GAAO;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,0BAA0B,EACnC;CACF;AAED,MAAaC,wBAA0C;CACrD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAU;GAAO;EACpC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,yBAAyB,EAClC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAS;GAAS;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,yBAAyB,EAClC;CACF;AAED,MAAaC,uBAAyC;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAQ;GAAS;GAAS;EAC7C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF"}
@@ -1,132 +1,132 @@
1
- import * as _contractspec_lib_schema431 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema379 from "@contractspec/lib.schema";
2
2
  import * as _contractspec_lib_contracts17 from "@contractspec/lib.contracts";
3
3
 
4
4
  //#region src/quote/quote.operations.d.ts
5
5
  /**
6
6
  * Create a new quote.
7
7
  */
8
- declare const CreateQuoteContract: _contractspec_lib_contracts17.OperationSpec<_contractspec_lib_schema431.SchemaModel<{
8
+ declare const CreateQuoteContract: _contractspec_lib_contracts17.OperationSpec<_contractspec_lib_schema379.SchemaModel<{
9
9
  clientId: {
10
- type: _contractspec_lib_schema431.FieldType<string, string>;
10
+ type: _contractspec_lib_schema379.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  title: {
14
- type: _contractspec_lib_schema431.FieldType<string, string>;
14
+ type: _contractspec_lib_schema379.FieldType<string, string>;
15
15
  isOptional: false;
16
16
  };
17
17
  description: {
18
- type: _contractspec_lib_schema431.FieldType<string, string>;
18
+ type: _contractspec_lib_schema379.FieldType<string, string>;
19
19
  isOptional: true;
20
20
  };
21
21
  amount: {
22
- type: _contractspec_lib_schema431.FieldType<number, number>;
22
+ type: _contractspec_lib_schema379.FieldType<number, number>;
23
23
  isOptional: false;
24
24
  };
25
25
  currency: {
26
- type: _contractspec_lib_schema431.FieldType<string, string>;
26
+ type: _contractspec_lib_schema379.FieldType<string, string>;
27
27
  isOptional: true;
28
28
  };
29
29
  validUntil: {
30
- type: _contractspec_lib_schema431.FieldType<Date, string>;
30
+ type: _contractspec_lib_schema379.FieldType<Date, string>;
31
31
  isOptional: true;
32
32
  };
33
33
  orgId: {
34
- type: _contractspec_lib_schema431.FieldType<string, string>;
34
+ type: _contractspec_lib_schema379.FieldType<string, string>;
35
35
  isOptional: false;
36
36
  };
37
37
  ownerId: {
38
- type: _contractspec_lib_schema431.FieldType<string, string>;
38
+ type: _contractspec_lib_schema379.FieldType<string, string>;
39
39
  isOptional: false;
40
40
  };
41
- }>, _contractspec_lib_schema431.SchemaModel<{
41
+ }>, _contractspec_lib_schema379.SchemaModel<{
42
42
  id: {
43
- type: _contractspec_lib_schema431.FieldType<string, string>;
43
+ type: _contractspec_lib_schema379.FieldType<string, string>;
44
44
  isOptional: false;
45
45
  };
46
46
  clientId: {
47
- type: _contractspec_lib_schema431.FieldType<string, string>;
47
+ type: _contractspec_lib_schema379.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  title: {
51
- type: _contractspec_lib_schema431.FieldType<string, string>;
51
+ type: _contractspec_lib_schema379.FieldType<string, string>;
52
52
  isOptional: false;
53
53
  };
54
54
  description: {
55
- type: _contractspec_lib_schema431.FieldType<string, string>;
55
+ type: _contractspec_lib_schema379.FieldType<string, string>;
56
56
  isOptional: true;
57
57
  };
58
58
  amount: {
59
- type: _contractspec_lib_schema431.FieldType<number, number>;
59
+ type: _contractspec_lib_schema379.FieldType<number, number>;
60
60
  isOptional: false;
61
61
  };
62
62
  currency: {
63
- type: _contractspec_lib_schema431.FieldType<string, string>;
63
+ type: _contractspec_lib_schema379.FieldType<string, string>;
64
64
  isOptional: false;
65
65
  };
66
66
  status: {
67
- type: _contractspec_lib_schema431.FieldType<string, string>;
67
+ type: _contractspec_lib_schema379.FieldType<string, string>;
68
68
  isOptional: false;
69
69
  };
70
70
  validUntil: {
71
- type: _contractspec_lib_schema431.FieldType<Date, string>;
71
+ type: _contractspec_lib_schema379.FieldType<Date, string>;
72
72
  isOptional: true;
73
73
  };
74
74
  createdAt: {
75
- type: _contractspec_lib_schema431.FieldType<Date, string>;
75
+ type: _contractspec_lib_schema379.FieldType<Date, string>;
76
76
  isOptional: false;
77
77
  };
78
78
  }>, undefined>;
79
79
  /**
80
80
  * Accept a quote.
81
81
  */
82
- declare const AcceptQuoteContract: _contractspec_lib_contracts17.OperationSpec<_contractspec_lib_schema431.SchemaModel<{
82
+ declare const AcceptQuoteContract: _contractspec_lib_contracts17.OperationSpec<_contractspec_lib_schema379.SchemaModel<{
83
83
  quoteId: {
84
- type: _contractspec_lib_schema431.FieldType<string, string>;
84
+ type: _contractspec_lib_schema379.FieldType<string, string>;
85
85
  isOptional: false;
86
86
  };
87
87
  acceptedBy: {
88
- type: _contractspec_lib_schema431.FieldType<string, string>;
88
+ type: _contractspec_lib_schema379.FieldType<string, string>;
89
89
  isOptional: false;
90
90
  };
91
91
  notes: {
92
- type: _contractspec_lib_schema431.FieldType<string, string>;
92
+ type: _contractspec_lib_schema379.FieldType<string, string>;
93
93
  isOptional: true;
94
94
  };
95
- }>, _contractspec_lib_schema431.SchemaModel<{
95
+ }>, _contractspec_lib_schema379.SchemaModel<{
96
96
  id: {
97
- type: _contractspec_lib_schema431.FieldType<string, string>;
97
+ type: _contractspec_lib_schema379.FieldType<string, string>;
98
98
  isOptional: false;
99
99
  };
100
100
  clientId: {
101
- type: _contractspec_lib_schema431.FieldType<string, string>;
101
+ type: _contractspec_lib_schema379.FieldType<string, string>;
102
102
  isOptional: false;
103
103
  };
104
104
  title: {
105
- type: _contractspec_lib_schema431.FieldType<string, string>;
105
+ type: _contractspec_lib_schema379.FieldType<string, string>;
106
106
  isOptional: false;
107
107
  };
108
108
  description: {
109
- type: _contractspec_lib_schema431.FieldType<string, string>;
109
+ type: _contractspec_lib_schema379.FieldType<string, string>;
110
110
  isOptional: true;
111
111
  };
112
112
  amount: {
113
- type: _contractspec_lib_schema431.FieldType<number, number>;
113
+ type: _contractspec_lib_schema379.FieldType<number, number>;
114
114
  isOptional: false;
115
115
  };
116
116
  currency: {
117
- type: _contractspec_lib_schema431.FieldType<string, string>;
117
+ type: _contractspec_lib_schema379.FieldType<string, string>;
118
118
  isOptional: false;
119
119
  };
120
120
  status: {
121
- type: _contractspec_lib_schema431.FieldType<string, string>;
121
+ type: _contractspec_lib_schema379.FieldType<string, string>;
122
122
  isOptional: false;
123
123
  };
124
124
  validUntil: {
125
- type: _contractspec_lib_schema431.FieldType<Date, string>;
125
+ type: _contractspec_lib_schema379.FieldType<Date, string>;
126
126
  isOptional: true;
127
127
  };
128
128
  createdAt: {
129
- type: _contractspec_lib_schema431.FieldType<Date, string>;
129
+ type: _contractspec_lib_schema379.FieldType<Date, string>;
130
130
  isOptional: false;
131
131
  };
132
132
  }>, undefined>;
@@ -9,7 +9,7 @@ const OWNERS = ["@examples.service-business-os"];
9
9
  const CreateQuoteContract = defineCommand({
10
10
  meta: {
11
11
  key: "service.quote.create",
12
- version: 1,
12
+ version: "1.0.0",
13
13
  stability: "stable",
14
14
  owners: [...OWNERS],
15
15
  tags: [
@@ -56,7 +56,7 @@ const CreateQuoteContract = defineCommand({
56
56
  const AcceptQuoteContract = defineCommand({
57
57
  meta: {
58
58
  key: "service.quote.accept",
59
- version: 1,
59
+ version: "1.0.0",
60
60
  stability: "stable",
61
61
  owners: [...OWNERS],
62
62
  tags: [
@@ -1 +1 @@
1
- {"version":3,"file":"quote.operations.js","names":[],"sources":["../../src/quote/quote.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport {\n AcceptQuoteInputModel,\n CreateQuoteInputModel,\n QuoteModel,\n} from './quote.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n/**\n * Create a new quote.\n */\nexport const CreateQuoteContract = defineCommand({\n meta: {\n key: 'service.quote.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'quote', 'create'],\n description: 'Create a quote/proposal.',\n goal: 'Quote clients.',\n context: 'Quote creation.',\n },\n io: {\n input: CreateQuoteInputModel,\n output: QuoteModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'create-quote-happy-path',\n given: ['Client exists'],\n when: ['User creates quote'],\n then: ['Quote is created'],\n },\n ],\n examples: [\n {\n key: 'create-proposal',\n input: {\n clientId: 'client-123',\n items: [{ description: 'Project A', price: 5000 }],\n },\n output: { id: 'quote-123', status: 'draft', total: 5000 },\n },\n ],\n },\n});\n\n/**\n * Accept a quote.\n */\nexport const AcceptQuoteContract = defineCommand({\n meta: {\n key: 'service.quote.accept',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'quote', 'accept'],\n description: 'Accept a quote.',\n goal: 'Confirm quote.',\n context: 'Quote acceptance.',\n },\n io: {\n input: AcceptQuoteInputModel,\n output: QuoteModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'accept-quote-happy-path',\n given: ['Quote is open'],\n when: ['Client accepts quote'],\n then: ['Quote status becomes ACCEPTED'],\n },\n ],\n examples: [\n {\n key: 'client-accepts',\n input: { quoteId: 'quote-123', signature: 'John Doe' },\n output: { id: 'quote-123', status: 'accepted' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAOA,MAAM,SAAS,CAAC,gCAAgC;;;;AAKhD,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAS;GAAS;EAChD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,gBAAgB;GACxB,MAAM,CAAC,qBAAqB;GAC5B,MAAM,CAAC,mBAAmB;GAC3B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,UAAU;IACV,OAAO,CAAC;KAAE,aAAa;KAAa,OAAO;KAAM,CAAC;IACnD;GACD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAS,OAAO;IAAM;GAC1D,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAS;GAAS;EAChD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,gBAAgB;GACxB,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,gCAAgC;GACxC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,SAAS;IAAa,WAAW;IAAY;GACtD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAY;GAChD,CACF;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"quote.operations.js","names":[],"sources":["../../src/quote/quote.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport {\n AcceptQuoteInputModel,\n CreateQuoteInputModel,\n QuoteModel,\n} from './quote.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n/**\n * Create a new quote.\n */\nexport const CreateQuoteContract = defineCommand({\n meta: {\n key: 'service.quote.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'quote', 'create'],\n description: 'Create a quote/proposal.',\n goal: 'Quote clients.',\n context: 'Quote creation.',\n },\n io: {\n input: CreateQuoteInputModel,\n output: QuoteModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'create-quote-happy-path',\n given: ['Client exists'],\n when: ['User creates quote'],\n then: ['Quote is created'],\n },\n ],\n examples: [\n {\n key: 'create-proposal',\n input: {\n clientId: 'client-123',\n items: [{ description: 'Project A', price: 5000 }],\n },\n output: { id: 'quote-123', status: 'draft', total: 5000 },\n },\n ],\n },\n});\n\n/**\n * Accept a quote.\n */\nexport const AcceptQuoteContract = defineCommand({\n meta: {\n key: 'service.quote.accept',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'quote', 'accept'],\n description: 'Accept a quote.',\n goal: 'Confirm quote.',\n context: 'Quote acceptance.',\n },\n io: {\n input: AcceptQuoteInputModel,\n output: QuoteModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'accept-quote-happy-path',\n given: ['Quote is open'],\n when: ['Client accepts quote'],\n then: ['Quote status becomes ACCEPTED'],\n },\n ],\n examples: [\n {\n key: 'client-accepts',\n input: { quoteId: 'quote-123', signature: 'John Doe' },\n output: { id: 'quote-123', status: 'accepted' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAOA,MAAM,SAAS,CAAC,gCAAgC;;;;AAKhD,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAS;GAAS;EAChD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,gBAAgB;GACxB,MAAM,CAAC,qBAAqB;GAC5B,MAAM,CAAC,mBAAmB;GAC3B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,UAAU;IACV,OAAO,CAAC;KAAE,aAAa;KAAa,OAAO;KAAM,CAAC;IACnD;GACD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAS,OAAO;IAAM;GAC1D,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAS;GAAS;EAChD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,gBAAgB;GACxB,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,gCAAgC;GACxC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,SAAS;IAAa,WAAW;IAAY;GACtD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAY;GAChD,CACF;EACF;CACF,CAAC"}
@@ -1,98 +1,98 @@
1
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema441 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/quote/quote.schema.d.ts
4
4
  /**
5
5
  * Quote/proposal.
6
6
  */
7
- declare const QuoteModel: _contractspec_lib_schema0.SchemaModel<{
7
+ declare const QuoteModel: _contractspec_lib_schema441.SchemaModel<{
8
8
  id: {
9
- type: _contractspec_lib_schema0.FieldType<string, string>;
9
+ type: _contractspec_lib_schema441.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  clientId: {
13
- type: _contractspec_lib_schema0.FieldType<string, string>;
13
+ type: _contractspec_lib_schema441.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  title: {
17
- type: _contractspec_lib_schema0.FieldType<string, string>;
17
+ type: _contractspec_lib_schema441.FieldType<string, string>;
18
18
  isOptional: false;
19
19
  };
20
20
  description: {
21
- type: _contractspec_lib_schema0.FieldType<string, string>;
21
+ type: _contractspec_lib_schema441.FieldType<string, string>;
22
22
  isOptional: true;
23
23
  };
24
24
  amount: {
25
- type: _contractspec_lib_schema0.FieldType<number, number>;
25
+ type: _contractspec_lib_schema441.FieldType<number, number>;
26
26
  isOptional: false;
27
27
  };
28
28
  currency: {
29
- type: _contractspec_lib_schema0.FieldType<string, string>;
29
+ type: _contractspec_lib_schema441.FieldType<string, string>;
30
30
  isOptional: false;
31
31
  };
32
32
  status: {
33
- type: _contractspec_lib_schema0.FieldType<string, string>;
33
+ type: _contractspec_lib_schema441.FieldType<string, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  validUntil: {
37
- type: _contractspec_lib_schema0.FieldType<Date, string>;
37
+ type: _contractspec_lib_schema441.FieldType<Date, string>;
38
38
  isOptional: true;
39
39
  };
40
40
  createdAt: {
41
- type: _contractspec_lib_schema0.FieldType<Date, string>;
41
+ type: _contractspec_lib_schema441.FieldType<Date, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  }>;
45
45
  /**
46
46
  * Input for creating a quote.
47
47
  */
48
- declare const CreateQuoteInputModel: _contractspec_lib_schema0.SchemaModel<{
48
+ declare const CreateQuoteInputModel: _contractspec_lib_schema441.SchemaModel<{
49
49
  clientId: {
50
- type: _contractspec_lib_schema0.FieldType<string, string>;
50
+ type: _contractspec_lib_schema441.FieldType<string, string>;
51
51
  isOptional: false;
52
52
  };
53
53
  title: {
54
- type: _contractspec_lib_schema0.FieldType<string, string>;
54
+ type: _contractspec_lib_schema441.FieldType<string, string>;
55
55
  isOptional: false;
56
56
  };
57
57
  description: {
58
- type: _contractspec_lib_schema0.FieldType<string, string>;
58
+ type: _contractspec_lib_schema441.FieldType<string, string>;
59
59
  isOptional: true;
60
60
  };
61
61
  amount: {
62
- type: _contractspec_lib_schema0.FieldType<number, number>;
62
+ type: _contractspec_lib_schema441.FieldType<number, number>;
63
63
  isOptional: false;
64
64
  };
65
65
  currency: {
66
- type: _contractspec_lib_schema0.FieldType<string, string>;
66
+ type: _contractspec_lib_schema441.FieldType<string, string>;
67
67
  isOptional: true;
68
68
  };
69
69
  validUntil: {
70
- type: _contractspec_lib_schema0.FieldType<Date, string>;
70
+ type: _contractspec_lib_schema441.FieldType<Date, string>;
71
71
  isOptional: true;
72
72
  };
73
73
  orgId: {
74
- type: _contractspec_lib_schema0.FieldType<string, string>;
74
+ type: _contractspec_lib_schema441.FieldType<string, string>;
75
75
  isOptional: false;
76
76
  };
77
77
  ownerId: {
78
- type: _contractspec_lib_schema0.FieldType<string, string>;
78
+ type: _contractspec_lib_schema441.FieldType<string, string>;
79
79
  isOptional: false;
80
80
  };
81
81
  }>;
82
82
  /**
83
83
  * Input for accepting a quote.
84
84
  */
85
- declare const AcceptQuoteInputModel: _contractspec_lib_schema0.SchemaModel<{
85
+ declare const AcceptQuoteInputModel: _contractspec_lib_schema441.SchemaModel<{
86
86
  quoteId: {
87
- type: _contractspec_lib_schema0.FieldType<string, string>;
87
+ type: _contractspec_lib_schema441.FieldType<string, string>;
88
88
  isOptional: false;
89
89
  };
90
90
  acceptedBy: {
91
- type: _contractspec_lib_schema0.FieldType<string, string>;
91
+ type: _contractspec_lib_schema441.FieldType<string, string>;
92
92
  isOptional: false;
93
93
  };
94
94
  notes: {
95
- type: _contractspec_lib_schema0.FieldType<string, string>;
95
+ type: _contractspec_lib_schema441.FieldType<string, string>;
96
96
  isOptional: true;
97
97
  };
98
98
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"quote.schema.d.ts","names":[],"sources":["../../src/quote/quote.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,UAcX,4BAdqB,WAcrB,CAAA;EAAA,EAAA,EAAA;UAAA,yBAAA,CAAA;;;;;;;;;;;EAdqB,WAAA,EAAA;IAmBV,IAAA,qCAaX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;EAbgC,MAAA,EAAA;IAkBrB,IAAA,qCAQX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;6CARgC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;cAlBrB,iDAAqB;;UAahC,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,iDAAqB;;UAQhC,yBAAA,CAAA"}
1
+ {"version":3,"file":"quote.schema.d.ts","names":[],"sources":["../../src/quote/quote.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,UAcX,8BAdqB,WAcrB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;;;;EAdqB,WAAA,EAAA;IAmBV,IAAA,uCAaX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;EAbgC,MAAA,EAAA;IAkBrB,IAAA,uCAQX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;+CARgC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;cAlBrB,mDAAqB;;UAahC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,mDAAqB;;UAQhC,2BAAA,CAAA"}