@contractspec/example.service-business-os 1.56.1 → 1.58.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 (155) hide show
  1. package/dist/browser/client/client.operations.js +72 -0
  2. package/dist/browser/client/client.schema.js +31 -0
  3. package/dist/browser/client/index.js +74 -0
  4. package/dist/browser/docs/index.js +96 -0
  5. package/dist/browser/docs/service-business-os.docblock.js +96 -0
  6. package/dist/browser/entities/index.js +246 -0
  7. package/dist/browser/events.js +135 -0
  8. package/dist/browser/example.js +39 -0
  9. package/dist/browser/handlers/index.js +5 -0
  10. package/dist/browser/index.js +752 -0
  11. package/dist/browser/invoice/index.js +77 -0
  12. package/dist/browser/invoice/invoice.operations.js +75 -0
  13. package/dist/browser/invoice/invoice.schema.js +34 -0
  14. package/dist/browser/job/index.js +175 -0
  15. package/dist/browser/job/job.operations.js +172 -0
  16. package/dist/browser/job/job.schema.js +41 -0
  17. package/dist/browser/operations/index.js +506 -0
  18. package/dist/browser/payment/index.js +69 -0
  19. package/dist/browser/payment/payment.operations.js +67 -0
  20. package/dist/browser/payment/payment.schema.js +30 -0
  21. package/dist/browser/presentations/index.js +13 -0
  22. package/dist/browser/presentations.js +172 -0
  23. package/dist/browser/quote/index.js +122 -0
  24. package/dist/browser/quote/quote.operations.js +119 -0
  25. package/dist/browser/quote/quote.schema.js +45 -0
  26. package/dist/browser/service-business-os.capability.js +28 -0
  27. package/dist/browser/service.feature.js +74 -0
  28. package/dist/client/client.operations.d.ts +54 -60
  29. package/dist/client/client.operations.d.ts.map +1 -1
  30. package/dist/client/client.operations.js +71 -51
  31. package/dist/client/client.schema.d.ts +54 -59
  32. package/dist/client/client.schema.d.ts.map +1 -1
  33. package/dist/client/client.schema.js +30 -75
  34. package/dist/client/index.d.ts +6 -3
  35. package/dist/client/index.d.ts.map +1 -0
  36. package/dist/client/index.js +74 -3
  37. package/dist/docs/index.d.ts +2 -1
  38. package/dist/docs/index.d.ts.map +1 -0
  39. package/dist/docs/index.js +97 -1
  40. package/dist/docs/service-business-os.docblock.d.ts +2 -1
  41. package/dist/docs/service-business-os.docblock.d.ts.map +1 -0
  42. package/dist/docs/service-business-os.docblock.js +52 -64
  43. package/dist/entities/index.d.ts +156 -161
  44. package/dist/entities/index.d.ts.map +1 -1
  45. package/dist/entities/index.js +236 -278
  46. package/dist/events.d.ts +253 -259
  47. package/dist/events.d.ts.map +1 -1
  48. package/dist/events.js +123 -217
  49. package/dist/example.d.ts +2 -6
  50. package/dist/example.d.ts.map +1 -1
  51. package/dist/example.js +37 -50
  52. package/dist/handlers/index.d.ts +11 -16
  53. package/dist/handlers/index.d.ts.map +1 -1
  54. package/dist/handlers/index.js +5 -5
  55. package/dist/index.d.ts +13 -18
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +752 -18
  58. package/dist/invoice/index.d.ts +6 -3
  59. package/dist/invoice/index.d.ts.map +1 -0
  60. package/dist/invoice/index.js +77 -3
  61. package/dist/invoice/invoice.operations.d.ts +54 -60
  62. package/dist/invoice/invoice.operations.d.ts.map +1 -1
  63. package/dist/invoice/invoice.operations.js +74 -55
  64. package/dist/invoice/invoice.schema.d.ts +54 -59
  65. package/dist/invoice/invoice.schema.d.ts.map +1 -1
  66. package/dist/invoice/invoice.schema.js +33 -75
  67. package/dist/job/index.d.ts +6 -3
  68. package/dist/job/index.d.ts.map +1 -0
  69. package/dist/job/index.js +175 -3
  70. package/dist/job/job.operations.d.ts +220 -226
  71. package/dist/job/job.operations.d.ts.map +1 -1
  72. package/dist/job/job.operations.js +167 -169
  73. package/dist/job/job.schema.d.ts +67 -72
  74. package/dist/job/job.schema.d.ts.map +1 -1
  75. package/dist/job/job.schema.js +39 -95
  76. package/dist/node/client/client.operations.js +72 -0
  77. package/dist/node/client/client.schema.js +31 -0
  78. package/dist/node/client/index.js +74 -0
  79. package/dist/node/docs/index.js +96 -0
  80. package/dist/node/docs/service-business-os.docblock.js +96 -0
  81. package/dist/node/entities/index.js +246 -0
  82. package/dist/node/events.js +135 -0
  83. package/dist/node/example.js +39 -0
  84. package/dist/node/handlers/index.js +5 -0
  85. package/dist/node/index.js +752 -0
  86. package/dist/node/invoice/index.js +77 -0
  87. package/dist/node/invoice/invoice.operations.js +75 -0
  88. package/dist/node/invoice/invoice.schema.js +34 -0
  89. package/dist/node/job/index.js +175 -0
  90. package/dist/node/job/job.operations.js +172 -0
  91. package/dist/node/job/job.schema.js +41 -0
  92. package/dist/node/operations/index.js +506 -0
  93. package/dist/node/payment/index.js +69 -0
  94. package/dist/node/payment/payment.operations.js +67 -0
  95. package/dist/node/payment/payment.schema.js +30 -0
  96. package/dist/node/presentations/index.js +13 -0
  97. package/dist/node/presentations.js +172 -0
  98. package/dist/node/quote/index.js +122 -0
  99. package/dist/node/quote/quote.operations.js +119 -0
  100. package/dist/node/quote/quote.schema.js +45 -0
  101. package/dist/node/service-business-os.capability.js +28 -0
  102. package/dist/node/service.feature.js +74 -0
  103. package/dist/operations/index.d.ts +6 -16
  104. package/dist/operations/index.d.ts.map +1 -0
  105. package/dist/operations/index.js +506 -16
  106. package/dist/payment/index.d.ts +6 -3
  107. package/dist/payment/index.d.ts.map +1 -0
  108. package/dist/payment/index.js +69 -3
  109. package/dist/payment/payment.operations.d.ts +50 -56
  110. package/dist/payment/payment.operations.d.ts.map +1 -1
  111. package/dist/payment/payment.operations.js +66 -51
  112. package/dist/payment/payment.schema.d.ts +50 -55
  113. package/dist/payment/payment.schema.d.ts.map +1 -1
  114. package/dist/payment/payment.schema.js +29 -71
  115. package/dist/presentations/index.d.ts +1 -4
  116. package/dist/presentations/index.d.ts.map +1 -1
  117. package/dist/presentations/index.js +13 -17
  118. package/dist/presentations.d.ts +7 -12
  119. package/dist/presentations.d.ts.map +1 -1
  120. package/dist/presentations.js +166 -172
  121. package/dist/quote/index.d.ts +6 -3
  122. package/dist/quote/index.d.ts.map +1 -0
  123. package/dist/quote/index.js +122 -3
  124. package/dist/quote/quote.operations.d.ts +120 -126
  125. package/dist/quote/quote.operations.d.ts.map +1 -1
  126. package/dist/quote/quote.operations.js +117 -96
  127. package/dist/quote/quote.schema.d.ts +83 -88
  128. package/dist/quote/quote.schema.d.ts.map +1 -1
  129. package/dist/quote/quote.schema.js +43 -111
  130. package/dist/service-business-os.capability.d.ts +2 -7
  131. package/dist/service-business-os.capability.d.ts.map +1 -1
  132. package/dist/service-business-os.capability.js +29 -29
  133. package/dist/service.feature.d.ts +1 -6
  134. package/dist/service.feature.d.ts.map +1 -1
  135. package/dist/service.feature.js +73 -164
  136. package/package.json +301 -64
  137. package/dist/client/client.operations.js.map +0 -1
  138. package/dist/client/client.schema.js.map +0 -1
  139. package/dist/docs/service-business-os.docblock.js.map +0 -1
  140. package/dist/entities/index.js.map +0 -1
  141. package/dist/events.js.map +0 -1
  142. package/dist/example.js.map +0 -1
  143. package/dist/handlers/index.js.map +0 -1
  144. package/dist/invoice/invoice.operations.js.map +0 -1
  145. package/dist/invoice/invoice.schema.js.map +0 -1
  146. package/dist/job/job.operations.js.map +0 -1
  147. package/dist/job/job.schema.js.map +0 -1
  148. package/dist/payment/payment.operations.js.map +0 -1
  149. package/dist/payment/payment.schema.js.map +0 -1
  150. package/dist/presentations/index.js.map +0 -1
  151. package/dist/presentations.js.map +0 -1
  152. package/dist/quote/quote.operations.js.map +0 -1
  153. package/dist/quote/quote.schema.js.map +0 -1
  154. package/dist/service-business-os.capability.js.map +0 -1
  155. package/dist/service.feature.js.map +0 -1
@@ -1,3 +1,6 @@
1
- import { InvoiceModel, IssueInvoiceInputModel } from "./invoice.schema.js";
2
- import { IssueInvoiceContract } from "./invoice.operations.js";
3
- export { InvoiceModel, IssueInvoiceContract, IssueInvoiceInputModel };
1
+ /**
2
+ * Invoice domain - Invoice management.
3
+ */
4
+ export { InvoiceModel, IssueInvoiceInputModel } from './invoice.schema';
5
+ export { IssueInvoiceContract } from './invoice.operations';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/invoice/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,4 +1,78 @@
1
- import { InvoiceModel, IssueInvoiceInputModel } from "./invoice.schema.js";
2
- import { IssueInvoiceContract } from "./invoice.operations.js";
1
+ // @bun
2
+ // src/invoice/invoice.schema.ts
3
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
4
+ var InvoiceModel = defineSchemaModel({
5
+ name: "Invoice",
6
+ description: "Invoice issued for a job",
7
+ fields: {
8
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ invoiceNumber: {
11
+ type: ScalarTypeEnum.String_unsecure(),
12
+ isOptional: false
13
+ },
14
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
15
+ currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
18
+ issuedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
19
+ paidAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
20
+ }
21
+ });
22
+ var IssueInvoiceInputModel = defineSchemaModel({
23
+ name: "IssueInvoiceInput",
24
+ description: "Input for issuing an invoice",
25
+ fields: {
26
+ jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
27
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
28
+ notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
29
+ lineItems: { type: ScalarTypeEnum.JSON(), isOptional: true }
30
+ }
31
+ });
3
32
 
4
- export { InvoiceModel, IssueInvoiceContract, IssueInvoiceInputModel };
33
+ // src/invoice/invoice.operations.ts
34
+ import { defineCommand } from "@contractspec/lib.contracts";
35
+ var OWNERS = ["@examples.service-business-os"];
36
+ var IssueInvoiceContract = defineCommand({
37
+ meta: {
38
+ key: "service.invoice.issue",
39
+ version: "1.0.0",
40
+ stability: "stable",
41
+ owners: [...OWNERS],
42
+ tags: ["service-business-os", "invoice", "issue"],
43
+ description: "Issue an invoice for a job.",
44
+ goal: "Bill clients.",
45
+ context: "Billing."
46
+ },
47
+ io: {
48
+ input: IssueInvoiceInputModel,
49
+ output: InvoiceModel
50
+ },
51
+ policy: { auth: "user" },
52
+ acceptance: {
53
+ scenarios: [
54
+ {
55
+ key: "issue-invoice-happy-path",
56
+ given: ["Job is complete"],
57
+ when: ["User issues invoice"],
58
+ then: ["Invoice is created and sent"]
59
+ }
60
+ ],
61
+ examples: [
62
+ {
63
+ key: "issue-standard",
64
+ input: {
65
+ jobId: "job-123",
66
+ dueDate: "2025-02-01",
67
+ items: [{ description: "Service", amount: 100 }]
68
+ },
69
+ output: { id: "inv-456", status: "issued", total: 100 }
70
+ }
71
+ ]
72
+ }
73
+ });
74
+ export {
75
+ IssueInvoiceInputModel,
76
+ IssueInvoiceContract,
77
+ InvoiceModel
78
+ };
@@ -1,65 +1,59 @@
1
- import * as _contractspec_lib_schema294 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts23 from "@contractspec/lib.contracts";
3
-
4
- //#region src/invoice/invoice.operations.d.ts
5
1
  /**
6
2
  * Issue an invoice.
7
3
  */
8
- declare const IssueInvoiceContract: _contractspec_lib_contracts23.OperationSpec<_contractspec_lib_schema294.SchemaModel<{
9
- jobId: {
10
- type: _contractspec_lib_schema294.FieldType<string, string>;
11
- isOptional: false;
12
- };
13
- dueDate: {
14
- type: _contractspec_lib_schema294.FieldType<Date, string>;
15
- isOptional: true;
16
- };
17
- notes: {
18
- type: _contractspec_lib_schema294.FieldType<string, string>;
19
- isOptional: true;
20
- };
21
- lineItems: {
22
- type: _contractspec_lib_schema294.FieldType<unknown, unknown>;
23
- isOptional: true;
24
- };
25
- }>, _contractspec_lib_schema294.SchemaModel<{
26
- id: {
27
- type: _contractspec_lib_schema294.FieldType<string, string>;
28
- isOptional: false;
29
- };
30
- jobId: {
31
- type: _contractspec_lib_schema294.FieldType<string, string>;
32
- isOptional: false;
33
- };
34
- invoiceNumber: {
35
- type: _contractspec_lib_schema294.FieldType<string, string>;
36
- isOptional: false;
37
- };
38
- amount: {
39
- type: _contractspec_lib_schema294.FieldType<number, number>;
40
- isOptional: false;
41
- };
42
- currency: {
43
- type: _contractspec_lib_schema294.FieldType<string, string>;
44
- isOptional: false;
45
- };
46
- status: {
47
- type: _contractspec_lib_schema294.FieldType<string, string>;
48
- isOptional: false;
49
- };
50
- dueDate: {
51
- type: _contractspec_lib_schema294.FieldType<Date, string>;
52
- isOptional: true;
53
- };
54
- issuedAt: {
55
- type: _contractspec_lib_schema294.FieldType<Date, string>;
56
- isOptional: true;
57
- };
58
- paidAt: {
59
- type: _contractspec_lib_schema294.FieldType<Date, string>;
60
- isOptional: true;
61
- };
4
+ export declare const IssueInvoiceContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
5
+ jobId: {
6
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
7
+ isOptional: false;
8
+ };
9
+ dueDate: {
10
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
11
+ isOptional: true;
12
+ };
13
+ notes: {
14
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
15
+ isOptional: true;
16
+ };
17
+ lineItems: {
18
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
19
+ isOptional: true;
20
+ };
21
+ }>, import("@contractspec/lib.schema").SchemaModel<{
22
+ id: {
23
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
24
+ isOptional: false;
25
+ };
26
+ jobId: {
27
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
28
+ isOptional: false;
29
+ };
30
+ invoiceNumber: {
31
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
32
+ isOptional: false;
33
+ };
34
+ amount: {
35
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
36
+ isOptional: false;
37
+ };
38
+ currency: {
39
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
40
+ isOptional: false;
41
+ };
42
+ status: {
43
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
44
+ isOptional: false;
45
+ };
46
+ dueDate: {
47
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
48
+ isOptional: true;
49
+ };
50
+ issuedAt: {
51
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
52
+ isOptional: true;
53
+ };
54
+ paidAt: {
55
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
56
+ isOptional: true;
57
+ };
62
58
  }>, undefined>;
63
- //#endregion
64
- export { IssueInvoiceContract };
65
59
  //# sourceMappingURL=invoice.operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"invoice.operations.d.ts","names":[],"sources":["../../src/invoice/invoice.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAQa,oDAAoB,0CAAA;EAApB,KAAA,EAAA;IAqCX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;EArC+B,CAAA;;;;;;;;;;;UAAA,2BAAA,CAAA;;;EAAA,KAAA,EAAA"}
1
+ {"version":3,"file":"invoice.operations.d.ts","sourceRoot":"","sources":["../../src/invoice/invoice.operations.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqC/B,CAAC"}
@@ -1,57 +1,76 @@
1
- import { InvoiceModel, IssueInvoiceInputModel } from "./invoice.schema.js";
2
- import { defineCommand } from "@contractspec/lib.contracts";
3
-
4
- //#region src/invoice/invoice.operations.ts
5
- const OWNERS = ["@examples.service-business-os"];
6
- /**
7
- * Issue an invoice.
8
- */
9
- const IssueInvoiceContract = defineCommand({
10
- meta: {
11
- key: "service.invoice.issue",
12
- version: "1.0.0",
13
- stability: "stable",
14
- owners: [...OWNERS],
15
- tags: [
16
- "service-business-os",
17
- "invoice",
18
- "issue"
19
- ],
20
- description: "Issue an invoice for a job.",
21
- goal: "Bill clients.",
22
- context: "Billing."
23
- },
24
- io: {
25
- input: IssueInvoiceInputModel,
26
- output: InvoiceModel
27
- },
28
- policy: { auth: "user" },
29
- acceptance: {
30
- scenarios: [{
31
- key: "issue-invoice-happy-path",
32
- given: ["Job is complete"],
33
- when: ["User issues invoice"],
34
- then: ["Invoice is created and sent"]
35
- }],
36
- examples: [{
37
- key: "issue-standard",
38
- input: {
39
- jobId: "job-123",
40
- dueDate: "2025-02-01",
41
- items: [{
42
- description: "Service",
43
- amount: 100
44
- }]
45
- },
46
- output: {
47
- id: "inv-456",
48
- status: "issued",
49
- total: 100
50
- }
51
- }]
52
- }
1
+ // @bun
2
+ // src/invoice/invoice.schema.ts
3
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
4
+ var InvoiceModel = defineSchemaModel({
5
+ name: "Invoice",
6
+ description: "Invoice issued for a job",
7
+ fields: {
8
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ invoiceNumber: {
11
+ type: ScalarTypeEnum.String_unsecure(),
12
+ isOptional: false
13
+ },
14
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
15
+ currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
18
+ issuedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
19
+ paidAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
20
+ }
21
+ });
22
+ var IssueInvoiceInputModel = defineSchemaModel({
23
+ name: "IssueInvoiceInput",
24
+ description: "Input for issuing an invoice",
25
+ fields: {
26
+ jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
27
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
28
+ notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
29
+ lineItems: { type: ScalarTypeEnum.JSON(), isOptional: true }
30
+ }
53
31
  });
54
32
 
55
- //#endregion
56
- export { IssueInvoiceContract };
57
- //# sourceMappingURL=invoice.operations.js.map
33
+ // src/invoice/invoice.operations.ts
34
+ import { defineCommand } from "@contractspec/lib.contracts";
35
+ var OWNERS = ["@examples.service-business-os"];
36
+ var IssueInvoiceContract = defineCommand({
37
+ meta: {
38
+ key: "service.invoice.issue",
39
+ version: "1.0.0",
40
+ stability: "stable",
41
+ owners: [...OWNERS],
42
+ tags: ["service-business-os", "invoice", "issue"],
43
+ description: "Issue an invoice for a job.",
44
+ goal: "Bill clients.",
45
+ context: "Billing."
46
+ },
47
+ io: {
48
+ input: IssueInvoiceInputModel,
49
+ output: InvoiceModel
50
+ },
51
+ policy: { auth: "user" },
52
+ acceptance: {
53
+ scenarios: [
54
+ {
55
+ key: "issue-invoice-happy-path",
56
+ given: ["Job is complete"],
57
+ when: ["User issues invoice"],
58
+ then: ["Invoice is created and sent"]
59
+ }
60
+ ],
61
+ examples: [
62
+ {
63
+ key: "issue-standard",
64
+ input: {
65
+ jobId: "job-123",
66
+ dueDate: "2025-02-01",
67
+ items: [{ description: "Service", amount: 100 }]
68
+ },
69
+ output: { id: "inv-456", status: "issued", total: 100 }
70
+ }
71
+ ]
72
+ }
73
+ });
74
+ export {
75
+ IssueInvoiceContract
76
+ };
@@ -1,68 +1,63 @@
1
- import * as _contractspec_lib_schema309 from "@contractspec/lib.schema";
2
-
3
- //#region src/invoice/invoice.schema.d.ts
4
1
  /**
5
2
  * Invoice issued for a job.
6
3
  */
7
- declare const InvoiceModel: _contractspec_lib_schema309.SchemaModel<{
8
- id: {
9
- type: _contractspec_lib_schema309.FieldType<string, string>;
10
- isOptional: false;
11
- };
12
- jobId: {
13
- type: _contractspec_lib_schema309.FieldType<string, string>;
14
- isOptional: false;
15
- };
16
- invoiceNumber: {
17
- type: _contractspec_lib_schema309.FieldType<string, string>;
18
- isOptional: false;
19
- };
20
- amount: {
21
- type: _contractspec_lib_schema309.FieldType<number, number>;
22
- isOptional: false;
23
- };
24
- currency: {
25
- type: _contractspec_lib_schema309.FieldType<string, string>;
26
- isOptional: false;
27
- };
28
- status: {
29
- type: _contractspec_lib_schema309.FieldType<string, string>;
30
- isOptional: false;
31
- };
32
- dueDate: {
33
- type: _contractspec_lib_schema309.FieldType<Date, string>;
34
- isOptional: true;
35
- };
36
- issuedAt: {
37
- type: _contractspec_lib_schema309.FieldType<Date, string>;
38
- isOptional: true;
39
- };
40
- paidAt: {
41
- type: _contractspec_lib_schema309.FieldType<Date, string>;
42
- isOptional: true;
43
- };
4
+ export declare const InvoiceModel: import("@contractspec/lib.schema").SchemaModel<{
5
+ id: {
6
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
7
+ isOptional: false;
8
+ };
9
+ jobId: {
10
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ invoiceNumber: {
14
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ amount: {
18
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
19
+ isOptional: false;
20
+ };
21
+ currency: {
22
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
23
+ isOptional: false;
24
+ };
25
+ status: {
26
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ dueDate: {
30
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
31
+ isOptional: true;
32
+ };
33
+ issuedAt: {
34
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
35
+ isOptional: true;
36
+ };
37
+ paidAt: {
38
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
39
+ isOptional: true;
40
+ };
44
41
  }>;
45
42
  /**
46
43
  * Input for issuing an invoice.
47
44
  */
48
- declare const IssueInvoiceInputModel: _contractspec_lib_schema309.SchemaModel<{
49
- jobId: {
50
- type: _contractspec_lib_schema309.FieldType<string, string>;
51
- isOptional: false;
52
- };
53
- dueDate: {
54
- type: _contractspec_lib_schema309.FieldType<Date, string>;
55
- isOptional: true;
56
- };
57
- notes: {
58
- type: _contractspec_lib_schema309.FieldType<string, string>;
59
- isOptional: true;
60
- };
61
- lineItems: {
62
- type: _contractspec_lib_schema309.FieldType<unknown, unknown>;
63
- isOptional: true;
64
- };
45
+ export declare const IssueInvoiceInputModel: import("@contractspec/lib.schema").SchemaModel<{
46
+ jobId: {
47
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
48
+ isOptional: false;
49
+ };
50
+ dueDate: {
51
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
52
+ isOptional: true;
53
+ };
54
+ notes: {
55
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
56
+ isOptional: true;
57
+ };
58
+ lineItems: {
59
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
60
+ isOptional: true;
61
+ };
65
62
  }>;
66
- //#endregion
67
- export { InvoiceModel, IssueInvoiceInputModel };
68
63
  //# sourceMappingURL=invoice.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"invoice.schema.d.ts","names":[],"sources":["../../src/invoice/invoice.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,YAiBX,8BAjBuB,WAiBvB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;;;;;IAjBuB,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAsBZ,UAAA,EAAA,KAAA;EASX,CAAA;;;;;;IATiC,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAAtB,oDAAsB;;UASjC,2BAAA,CAAA"}
1
+ {"version":3,"file":"invoice.schema.d.ts","sourceRoot":"","sources":["../../src/invoice/invoice.schema.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;EASjC,CAAC"}
@@ -1,77 +1,35 @@
1
- import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
2
-
3
- //#region src/invoice/invoice.schema.ts
4
- /**
5
- * Invoice issued for a job.
6
- */
7
- const InvoiceModel = defineSchemaModel({
8
- name: "Invoice",
9
- description: "Invoice issued for a job",
10
- fields: {
11
- id: {
12
- type: ScalarTypeEnum.String_unsecure(),
13
- isOptional: false
14
- },
15
- jobId: {
16
- type: ScalarTypeEnum.String_unsecure(),
17
- isOptional: false
18
- },
19
- invoiceNumber: {
20
- type: ScalarTypeEnum.String_unsecure(),
21
- isOptional: false
22
- },
23
- amount: {
24
- type: ScalarTypeEnum.Float_unsecure(),
25
- isOptional: false
26
- },
27
- currency: {
28
- type: ScalarTypeEnum.String_unsecure(),
29
- isOptional: false
30
- },
31
- status: {
32
- type: ScalarTypeEnum.String_unsecure(),
33
- isOptional: false
34
- },
35
- dueDate: {
36
- type: ScalarTypeEnum.DateTime(),
37
- isOptional: true
38
- },
39
- issuedAt: {
40
- type: ScalarTypeEnum.DateTime(),
41
- isOptional: true
42
- },
43
- paidAt: {
44
- type: ScalarTypeEnum.DateTime(),
45
- isOptional: true
46
- }
47
- }
1
+ // @bun
2
+ // src/invoice/invoice.schema.ts
3
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
4
+ var InvoiceModel = defineSchemaModel({
5
+ name: "Invoice",
6
+ description: "Invoice issued for a job",
7
+ fields: {
8
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ invoiceNumber: {
11
+ type: ScalarTypeEnum.String_unsecure(),
12
+ isOptional: false
13
+ },
14
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
15
+ currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
18
+ issuedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
19
+ paidAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
20
+ }
48
21
  });
49
- /**
50
- * Input for issuing an invoice.
51
- */
52
- const IssueInvoiceInputModel = defineSchemaModel({
53
- name: "IssueInvoiceInput",
54
- description: "Input for issuing an invoice",
55
- fields: {
56
- jobId: {
57
- type: ScalarTypeEnum.String_unsecure(),
58
- isOptional: false
59
- },
60
- dueDate: {
61
- type: ScalarTypeEnum.DateTime(),
62
- isOptional: true
63
- },
64
- notes: {
65
- type: ScalarTypeEnum.String_unsecure(),
66
- isOptional: true
67
- },
68
- lineItems: {
69
- type: ScalarTypeEnum.JSON(),
70
- isOptional: true
71
- }
72
- }
22
+ var IssueInvoiceInputModel = defineSchemaModel({
23
+ name: "IssueInvoiceInput",
24
+ description: "Input for issuing an invoice",
25
+ fields: {
26
+ jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
27
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
28
+ notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
29
+ lineItems: { type: ScalarTypeEnum.JSON(), isOptional: true }
30
+ }
73
31
  });
74
-
75
- //#endregion
76
- export { InvoiceModel, IssueInvoiceInputModel };
77
- //# sourceMappingURL=invoice.schema.js.map
32
+ export {
33
+ IssueInvoiceInputModel,
34
+ InvoiceModel
35
+ };
@@ -1,3 +1,6 @@
1
- import { CompleteJobInputModel, JobModel, ScheduleJobInputModel } from "./job.schema.js";
2
- import { CompleteJobContract, ListJobsInputModel, ListJobsOperation, ListJobsOutputModel, ScheduleJobContract } from "./job.operations.js";
3
- export { CompleteJobContract, CompleteJobInputModel, JobModel, ListJobsInputModel, ListJobsOperation, ListJobsOutputModel, ScheduleJobContract, ScheduleJobInputModel };
1
+ /**
2
+ * Job domain - Job scheduling and management.
3
+ */
4
+ export { JobModel, ScheduleJobInputModel, CompleteJobInputModel, } from './job.schema';
5
+ export { ScheduleJobContract, CompleteJobContract, ListJobsOperation, ListJobsInputModel, ListJobsOutputModel, } from './job.operations';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/job/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}