@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,61 +1,55 @@
1
- import * as _contractspec_lib_schema384 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts27 from "@contractspec/lib.contracts";
3
-
4
- //#region src/payment/payment.operations.d.ts
5
1
  /**
6
2
  * Record a payment.
7
3
  */
8
- declare const RecordPaymentContract: _contractspec_lib_contracts27.OperationSpec<_contractspec_lib_schema384.SchemaModel<{
9
- invoiceId: {
10
- type: _contractspec_lib_schema384.FieldType<string, string>;
11
- isOptional: false;
12
- };
13
- amount: {
14
- type: _contractspec_lib_schema384.FieldType<number, number>;
15
- isOptional: false;
16
- };
17
- method: {
18
- type: _contractspec_lib_schema384.FieldType<string, string>;
19
- isOptional: false;
20
- };
21
- reference: {
22
- type: _contractspec_lib_schema384.FieldType<string, string>;
23
- isOptional: true;
24
- };
25
- receivedAt: {
26
- type: _contractspec_lib_schema384.FieldType<Date, string>;
27
- isOptional: true;
28
- };
29
- }>, _contractspec_lib_schema384.SchemaModel<{
30
- id: {
31
- type: _contractspec_lib_schema384.FieldType<string, string>;
32
- isOptional: false;
33
- };
34
- invoiceId: {
35
- type: _contractspec_lib_schema384.FieldType<string, string>;
36
- isOptional: false;
37
- };
38
- amount: {
39
- type: _contractspec_lib_schema384.FieldType<number, number>;
40
- isOptional: false;
41
- };
42
- currency: {
43
- type: _contractspec_lib_schema384.FieldType<string, string>;
44
- isOptional: false;
45
- };
46
- method: {
47
- type: _contractspec_lib_schema384.FieldType<string, string>;
48
- isOptional: false;
49
- };
50
- reference: {
51
- type: _contractspec_lib_schema384.FieldType<string, string>;
52
- isOptional: true;
53
- };
54
- receivedAt: {
55
- type: _contractspec_lib_schema384.FieldType<Date, string>;
56
- isOptional: false;
57
- };
4
+ export declare const RecordPaymentContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
5
+ invoiceId: {
6
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
7
+ isOptional: false;
8
+ };
9
+ amount: {
10
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
11
+ isOptional: false;
12
+ };
13
+ method: {
14
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ reference: {
18
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
19
+ isOptional: true;
20
+ };
21
+ receivedAt: {
22
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
23
+ isOptional: true;
24
+ };
25
+ }>, import("@contractspec/lib.schema").SchemaModel<{
26
+ id: {
27
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
28
+ isOptional: false;
29
+ };
30
+ invoiceId: {
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
+ method: {
43
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
44
+ isOptional: false;
45
+ };
46
+ reference: {
47
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
48
+ isOptional: true;
49
+ };
50
+ receivedAt: {
51
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
52
+ isOptional: false;
53
+ };
58
54
  }>, undefined>;
59
- //#endregion
60
- export { RecordPaymentContract };
61
55
  //# sourceMappingURL=payment.operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.operations.d.ts","names":[],"sources":["../../src/payment/payment.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAQa,qDAAqB,0CAAA;EAArB,SAAA,EAAA;IAiCX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;EAjCgC,MAAA,EAAA;;;;;;;;;+CAAA,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;UAAA,2BAAA,CAAA"}
1
+ {"version":3,"file":"payment.operations.d.ts","sourceRoot":"","sources":["../../src/payment/payment.operations.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiChC,CAAC"}
@@ -1,53 +1,68 @@
1
- import { PaymentModel, RecordPaymentInputModel } from "./payment.schema.js";
2
- import { defineCommand } from "@contractspec/lib.contracts";
3
-
4
- //#region src/payment/payment.operations.ts
5
- const OWNERS = ["@examples.service-business-os"];
6
- /**
7
- * Record a payment.
8
- */
9
- const RecordPaymentContract = defineCommand({
10
- meta: {
11
- key: "service.payment.record",
12
- version: "1.0.0",
13
- stability: "stable",
14
- owners: [...OWNERS],
15
- tags: [
16
- "service-business-os",
17
- "payment",
18
- "record"
19
- ],
20
- description: "Record a payment.",
21
- goal: "Track payments.",
22
- context: "Billing."
23
- },
24
- io: {
25
- input: RecordPaymentInputModel,
26
- output: PaymentModel
27
- },
28
- policy: { auth: "user" },
29
- acceptance: {
30
- scenarios: [{
31
- key: "record-payment-happy-path",
32
- given: ["Invoice exists"],
33
- when: ["User records payment"],
34
- then: ["Payment is recorded"]
35
- }],
36
- examples: [{
37
- key: "record-check",
38
- input: {
39
- invoiceId: "inv-456",
40
- amount: 100,
41
- method: "check"
42
- },
43
- output: {
44
- id: "pay-123",
45
- status: "completed"
46
- }
47
- }]
48
- }
1
+ // @bun
2
+ // src/payment/payment.schema.ts
3
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
4
+ var PaymentModel = defineSchemaModel({
5
+ name: "Payment",
6
+ description: "Payment applied to invoice",
7
+ fields: {
8
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
11
+ currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
12
+ method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
+ reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
14
+ receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
15
+ }
16
+ });
17
+ var RecordPaymentInputModel = defineSchemaModel({
18
+ name: "RecordPaymentInput",
19
+ description: "Input for recording a payment",
20
+ fields: {
21
+ invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
22
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
23
+ method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
24
+ reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
25
+ receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
26
+ }
49
27
  });
50
28
 
51
- //#endregion
52
- export { RecordPaymentContract };
53
- //# sourceMappingURL=payment.operations.js.map
29
+ // src/payment/payment.operations.ts
30
+ import { defineCommand } from "@contractspec/lib.contracts";
31
+ var OWNERS = ["@examples.service-business-os"];
32
+ var RecordPaymentContract = defineCommand({
33
+ meta: {
34
+ key: "service.payment.record",
35
+ version: "1.0.0",
36
+ stability: "stable",
37
+ owners: [...OWNERS],
38
+ tags: ["service-business-os", "payment", "record"],
39
+ description: "Record a payment.",
40
+ goal: "Track payments.",
41
+ context: "Billing."
42
+ },
43
+ io: {
44
+ input: RecordPaymentInputModel,
45
+ output: PaymentModel
46
+ },
47
+ policy: { auth: "user" },
48
+ acceptance: {
49
+ scenarios: [
50
+ {
51
+ key: "record-payment-happy-path",
52
+ given: ["Invoice exists"],
53
+ when: ["User records payment"],
54
+ then: ["Payment is recorded"]
55
+ }
56
+ ],
57
+ examples: [
58
+ {
59
+ key: "record-check",
60
+ input: { invoiceId: "inv-456", amount: 100, method: "check" },
61
+ output: { id: "pay-123", status: "completed" }
62
+ }
63
+ ]
64
+ }
65
+ });
66
+ export {
67
+ RecordPaymentContract
68
+ };
@@ -1,64 +1,59 @@
1
- import * as _contractspec_lib_schema417 from "@contractspec/lib.schema";
2
-
3
- //#region src/payment/payment.schema.d.ts
4
1
  /**
5
2
  * Payment applied to invoice.
6
3
  */
7
- declare const PaymentModel: _contractspec_lib_schema417.SchemaModel<{
8
- id: {
9
- type: _contractspec_lib_schema417.FieldType<string, string>;
10
- isOptional: false;
11
- };
12
- invoiceId: {
13
- type: _contractspec_lib_schema417.FieldType<string, string>;
14
- isOptional: false;
15
- };
16
- amount: {
17
- type: _contractspec_lib_schema417.FieldType<number, number>;
18
- isOptional: false;
19
- };
20
- currency: {
21
- type: _contractspec_lib_schema417.FieldType<string, string>;
22
- isOptional: false;
23
- };
24
- method: {
25
- type: _contractspec_lib_schema417.FieldType<string, string>;
26
- isOptional: false;
27
- };
28
- reference: {
29
- type: _contractspec_lib_schema417.FieldType<string, string>;
30
- isOptional: true;
31
- };
32
- receivedAt: {
33
- type: _contractspec_lib_schema417.FieldType<Date, string>;
34
- isOptional: false;
35
- };
4
+ export declare const PaymentModel: import("@contractspec/lib.schema").SchemaModel<{
5
+ id: {
6
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
7
+ isOptional: false;
8
+ };
9
+ invoiceId: {
10
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ amount: {
14
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
15
+ isOptional: false;
16
+ };
17
+ currency: {
18
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ method: {
22
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
23
+ isOptional: false;
24
+ };
25
+ reference: {
26
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
27
+ isOptional: true;
28
+ };
29
+ receivedAt: {
30
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
31
+ isOptional: false;
32
+ };
36
33
  }>;
37
34
  /**
38
35
  * Input for recording a payment.
39
36
  */
40
- declare const RecordPaymentInputModel: _contractspec_lib_schema417.SchemaModel<{
41
- invoiceId: {
42
- type: _contractspec_lib_schema417.FieldType<string, string>;
43
- isOptional: false;
44
- };
45
- amount: {
46
- type: _contractspec_lib_schema417.FieldType<number, number>;
47
- isOptional: false;
48
- };
49
- method: {
50
- type: _contractspec_lib_schema417.FieldType<string, string>;
51
- isOptional: false;
52
- };
53
- reference: {
54
- type: _contractspec_lib_schema417.FieldType<string, string>;
55
- isOptional: true;
56
- };
57
- receivedAt: {
58
- type: _contractspec_lib_schema417.FieldType<Date, string>;
59
- isOptional: true;
60
- };
37
+ export declare const RecordPaymentInputModel: import("@contractspec/lib.schema").SchemaModel<{
38
+ invoiceId: {
39
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
40
+ isOptional: false;
41
+ };
42
+ amount: {
43
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
44
+ isOptional: false;
45
+ };
46
+ method: {
47
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
48
+ isOptional: false;
49
+ };
50
+ reference: {
51
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
52
+ isOptional: true;
53
+ };
54
+ receivedAt: {
55
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
56
+ isOptional: true;
57
+ };
61
58
  }>;
62
- //#endregion
63
- export { PaymentModel, RecordPaymentInputModel };
64
59
  //# sourceMappingURL=payment.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.schema.d.ts","names":[],"sources":["../../src/payment/payment.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,YAYX,8BAZuB,WAYvB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;IAZuB,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAiBZ,UAAA,EAAA,KAAA;EAUX,CAAA;;;;;;+CAVkC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;cAAvB,qDAAuB;;UAUlC,2BAAA,CAAA"}
1
+ {"version":3,"file":"payment.schema.d.ts","sourceRoot":"","sources":["../../src/payment/payment.schema.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;EAUlC,CAAC"}
@@ -1,73 +1,31 @@
1
- import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
2
-
3
- //#region src/payment/payment.schema.ts
4
- /**
5
- * Payment applied to invoice.
6
- */
7
- const PaymentModel = defineSchemaModel({
8
- name: "Payment",
9
- description: "Payment applied to invoice",
10
- fields: {
11
- id: {
12
- type: ScalarTypeEnum.String_unsecure(),
13
- isOptional: false
14
- },
15
- invoiceId: {
16
- type: ScalarTypeEnum.String_unsecure(),
17
- isOptional: false
18
- },
19
- amount: {
20
- type: ScalarTypeEnum.Float_unsecure(),
21
- isOptional: false
22
- },
23
- currency: {
24
- type: ScalarTypeEnum.String_unsecure(),
25
- isOptional: false
26
- },
27
- method: {
28
- type: ScalarTypeEnum.String_unsecure(),
29
- isOptional: false
30
- },
31
- reference: {
32
- type: ScalarTypeEnum.String_unsecure(),
33
- isOptional: true
34
- },
35
- receivedAt: {
36
- type: ScalarTypeEnum.DateTime(),
37
- isOptional: false
38
- }
39
- }
1
+ // @bun
2
+ // src/payment/payment.schema.ts
3
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
4
+ var PaymentModel = defineSchemaModel({
5
+ name: "Payment",
6
+ description: "Payment applied to invoice",
7
+ fields: {
8
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
11
+ currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
12
+ method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
+ reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
14
+ receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
15
+ }
40
16
  });
41
- /**
42
- * Input for recording a payment.
43
- */
44
- const RecordPaymentInputModel = defineSchemaModel({
45
- name: "RecordPaymentInput",
46
- description: "Input for recording a payment",
47
- fields: {
48
- invoiceId: {
49
- type: ScalarTypeEnum.String_unsecure(),
50
- isOptional: false
51
- },
52
- amount: {
53
- type: ScalarTypeEnum.Float_unsecure(),
54
- isOptional: false
55
- },
56
- method: {
57
- type: ScalarTypeEnum.String_unsecure(),
58
- isOptional: false
59
- },
60
- reference: {
61
- type: ScalarTypeEnum.String_unsecure(),
62
- isOptional: true
63
- },
64
- receivedAt: {
65
- type: ScalarTypeEnum.DateTime(),
66
- isOptional: true
67
- }
68
- }
17
+ var RecordPaymentInputModel = defineSchemaModel({
18
+ name: "RecordPaymentInput",
19
+ description: "Input for recording a payment",
20
+ fields: {
21
+ invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
22
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
23
+ method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
24
+ reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
25
+ receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
26
+ }
69
27
  });
70
-
71
- //#endregion
72
- export { PaymentModel, RecordPaymentInputModel };
73
- //# sourceMappingURL=payment.schema.js.map
28
+ export {
29
+ RecordPaymentInputModel,
30
+ PaymentModel
31
+ };
@@ -1,9 +1,6 @@
1
- //#region src/presentations/index.d.ts
2
1
  /**
3
2
  * Presentation descriptors for Service Business OS.
4
3
  * These names map to renderers in Studio (react/markdown) to keep specs multi-surface.
5
4
  */
6
- declare const ServiceBusinessPresentations: string[];
7
- //#endregion
8
- export { ServiceBusinessPresentations };
5
+ export declare const ServiceBusinessPresentations: string[];
9
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":[],"mappings":";;AAIA;;;cAAa"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presentations/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAQxC,CAAC"}
@@ -1,18 +1,14 @@
1
- //#region src/presentations/index.ts
2
- /**
3
- * Presentation descriptors for Service Business OS.
4
- * These names map to renderers in Studio (react/markdown) to keep specs multi-surface.
5
- */
6
- const ServiceBusinessPresentations = [
7
- "service-business-os.dashboard",
8
- "service-business-os.client.list",
9
- "service-business-os.quote.list",
10
- "service-business-os.quote.detail",
11
- "service-business-os.job.board",
12
- "service-business-os.invoice.list",
13
- "service-business-os.payment.list"
1
+ // @bun
2
+ // src/presentations/index.ts
3
+ var ServiceBusinessPresentations = [
4
+ "service-business-os.dashboard",
5
+ "service-business-os.client.list",
6
+ "service-business-os.quote.list",
7
+ "service-business-os.quote.detail",
8
+ "service-business-os.job.board",
9
+ "service-business-os.invoice.list",
10
+ "service-business-os.payment.list"
14
11
  ];
15
-
16
- //#endregion
17
- export { ServiceBusinessPresentations };
18
- //# sourceMappingURL=index.js.map
12
+ export {
13
+ ServiceBusinessPresentations
14
+ };
@@ -1,13 +1,8 @@
1
- import * as _contractspec_lib_contracts12 from "@contractspec/lib.contracts";
2
-
3
- //#region src/presentations.d.ts
4
- declare const ServiceDashboardPresentation: _contractspec_lib_contracts12.PresentationSpec;
5
- declare const ClientListPresentation: _contractspec_lib_contracts12.PresentationSpec;
6
- declare const QuoteListPresentation: _contractspec_lib_contracts12.PresentationSpec;
7
- declare const QuoteDetailPresentation: _contractspec_lib_contracts12.PresentationSpec;
8
- declare const JobBoardPresentation: _contractspec_lib_contracts12.PresentationSpec;
9
- declare const InvoiceListPresentation: _contractspec_lib_contracts12.PresentationSpec;
10
- declare const PaymentListPresentation: _contractspec_lib_contracts12.PresentationSpec;
11
- //#endregion
12
- export { ClientListPresentation, InvoiceListPresentation, JobBoardPresentation, PaymentListPresentation, QuoteDetailPresentation, QuoteListPresentation, ServiceDashboardPresentation };
1
+ export declare const ServiceDashboardPresentation: import("@contractspec/lib.contracts").PresentationSpec;
2
+ export declare const ClientListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
3
+ export declare const QuoteListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
4
+ export declare const QuoteDetailPresentation: import("@contractspec/lib.contracts").PresentationSpec;
5
+ export declare const JobBoardPresentation: import("@contractspec/lib.contracts").PresentationSpec;
6
+ export declare const InvoiceListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
7
+ export declare const PaymentListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
13
8
  //# sourceMappingURL=presentations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presentations.d.ts","names":[],"sources":["../src/presentations.ts"],"sourcesContent":[],"mappings":";;;cAEa,8BAsBX,6BAAA,CAtBuC;cAwB5B,wBAsBX,6BAAA,CAtBiC;cAwBtB,uBAsBX,6BAAA,CAtBgC;AAhDrB,cAwEA,uBAlDX,EAwEA,6BAAA,CAtBkC,gBAlDlC;AAEW,cAwEA,oBAlDX,EAwEA,6BAAA,CAtB+B,gBAlD/B;AAEW,cAwEA,uBAlDX,EAwEA,6BAAA,CAtBkC,gBAlDlC;AAEW,cAwEA,uBAlDX,EAwEA,6BAAA,CAtBkC,gBAlDlC"}
1
+ {"version":3,"file":"presentations.d.ts","sourceRoot":"","sources":["../src/presentations.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,wDAsBvC,CAAC;AAEH,eAAO,MAAM,sBAAsB,wDAsBjC,CAAC;AAEH,eAAO,MAAM,qBAAqB,wDAsBhC,CAAC;AAEH,eAAO,MAAM,uBAAuB,wDAsBlC,CAAC;AAEH,eAAO,MAAM,oBAAoB,wDAsB/B,CAAC;AAEH,eAAO,MAAM,uBAAuB,wDAsBlC,CAAC;AAEH,eAAO,MAAM,uBAAuB,wDAsBlC,CAAC"}