@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
package/package.json CHANGED
@@ -1,58 +1,69 @@
1
1
  {
2
2
  "name": "@contractspec/example.service-business-os",
3
- "version": "1.56.1",
3
+ "version": "1.58.0",
4
4
  "description": "Service Business OS example (clients, quotes, jobs, invoices) for ContractSpec",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
9
9
  "publish:pkg:canary": "bun publish:pkg --tag canary",
10
- "build": "bun build:types && bun build:bundle",
11
- "build:bundle": "tsdown",
12
- "build:types": "tsc --noEmit",
13
- "dev": "bun build:bundle --watch",
10
+ "build": "bun run prebuild && bun run build:bundle && bun run build:types",
11
+ "build:bundle": "contractspec-bun-build transpile",
12
+ "build:types": "contractspec-bun-build types",
13
+ "dev": "contractspec-bun-build dev",
14
14
  "clean": "rimraf dist .turbo",
15
15
  "lint": "bun lint:fix",
16
16
  "lint:fix": "eslint src --fix",
17
- "lint:check": "eslint src"
17
+ "lint:check": "eslint src",
18
+ "prebuild": "contractspec-bun-build prebuild",
19
+ "typecheck": "tsc --noEmit"
18
20
  },
19
21
  "dependencies": {
20
- "@contractspec/lib.schema": "1.56.1",
21
- "@contractspec/lib.contracts": "1.56.1"
22
+ "@contractspec/lib.schema": "1.58.0",
23
+ "@contractspec/lib.contracts": "1.58.0"
22
24
  },
23
25
  "devDependencies": {
24
- "@contractspec/tool.typescript": "1.56.1",
25
- "@contractspec/tool.tsdown": "1.56.1",
26
- "typescript": "^5.9.3"
26
+ "@contractspec/tool.typescript": "1.58.0",
27
+ "typescript": "^5.9.3",
28
+ "@contractspec/tool.bun": "1.57.0"
27
29
  },
28
30
  "exports": {
29
- ".": "./dist/index.js",
30
- "./client": "./dist/client/index.js",
31
- "./client/client.operations": "./dist/client/client.operations.js",
32
- "./client/client.schema": "./dist/client/client.schema.js",
33
- "./docs": "./dist/docs/index.js",
34
- "./docs/service-business-os.docblock": "./dist/docs/service-business-os.docblock.js",
35
- "./entities": "./dist/entities/index.js",
36
- "./events": "./dist/events.js",
37
- "./example": "./dist/example.js",
38
- "./handlers": "./dist/handlers/index.js",
39
- "./invoice": "./dist/invoice/index.js",
40
- "./invoice/invoice.operations": "./dist/invoice/invoice.operations.js",
41
- "./invoice/invoice.schema": "./dist/invoice/invoice.schema.js",
42
- "./job": "./dist/job/index.js",
43
- "./job/job.operations": "./dist/job/job.operations.js",
44
- "./job/job.schema": "./dist/job/job.schema.js",
45
- "./operations": "./dist/operations/index.js",
46
- "./payment": "./dist/payment/index.js",
47
- "./payment/payment.operations": "./dist/payment/payment.operations.js",
48
- "./payment/payment.schema": "./dist/payment/payment.schema.js",
49
- "./presentations": "./dist/presentations/index.js",
50
- "./quote": "./dist/quote/index.js",
51
- "./quote/quote.operations": "./dist/quote/quote.operations.js",
52
- "./quote/quote.schema": "./dist/quote/quote.schema.js",
53
- "./service-business-os.capability": "./dist/service-business-os.capability.js",
54
- "./service.feature": "./dist/service.feature.js",
55
- "./*": "./*"
31
+ ".": "./src/index.ts",
32
+ "./client": "./src/client/index.ts",
33
+ "./client/client.operations": "./src/client/client.operations.ts",
34
+ "./client/client.schema": "./src/client/client.schema.ts",
35
+ "./client/index": "./src/client/index.ts",
36
+ "./docs": "./src/docs/index.ts",
37
+ "./docs/index": "./src/docs/index.ts",
38
+ "./docs/service-business-os.docblock": "./src/docs/service-business-os.docblock.ts",
39
+ "./entities": "./src/entities/index.ts",
40
+ "./entities/index": "./src/entities/index.ts",
41
+ "./events": "./src/events.ts",
42
+ "./example": "./src/example.ts",
43
+ "./handlers": "./src/handlers/index.ts",
44
+ "./handlers/index": "./src/handlers/index.ts",
45
+ "./invoice": "./src/invoice/index.ts",
46
+ "./invoice/index": "./src/invoice/index.ts",
47
+ "./invoice/invoice.operations": "./src/invoice/invoice.operations.ts",
48
+ "./invoice/invoice.schema": "./src/invoice/invoice.schema.ts",
49
+ "./job": "./src/job/index.ts",
50
+ "./job/index": "./src/job/index.ts",
51
+ "./job/job.operations": "./src/job/job.operations.ts",
52
+ "./job/job.schema": "./src/job/job.schema.ts",
53
+ "./operations": "./src/operations/index.ts",
54
+ "./operations/index": "./src/operations/index.ts",
55
+ "./payment": "./src/payment/index.ts",
56
+ "./payment/index": "./src/payment/index.ts",
57
+ "./payment/payment.operations": "./src/payment/payment.operations.ts",
58
+ "./payment/payment.schema": "./src/payment/payment.schema.ts",
59
+ "./presentations": "./src/presentations.ts",
60
+ "./presentations/index": "./src/presentations/index.ts",
61
+ "./quote": "./src/quote/index.ts",
62
+ "./quote/index": "./src/quote/index.ts",
63
+ "./quote/quote.operations": "./src/quote/quote.operations.ts",
64
+ "./quote/quote.schema": "./src/quote/quote.schema.ts",
65
+ "./service-business-os.capability": "./src/service-business-os.capability.ts",
66
+ "./service.feature": "./src/service.feature.ts"
56
67
  },
57
68
  "files": [
58
69
  "dist",
@@ -61,32 +72,258 @@
61
72
  "publishConfig": {
62
73
  "access": "public",
63
74
  "exports": {
64
- ".": "./dist/index.js",
65
- "./client": "./dist/client/index.js",
66
- "./client/client.contracts": "./dist/client/client.operations.js",
67
- "./client/client.schema": "./dist/client/client.schema.js",
68
- "./contracts": "./dist/contracts/index.js",
69
- "./docs": "./dist/docs/index.js",
70
- "./docs/service-business-os.docblock": "./dist/docs/service-business-os.docblock.js",
71
- "./entities": "./dist/entities/index.js",
72
- "./events": "./dist/events.js",
73
- "./example": "./dist/example.js",
74
- "./handlers": "./dist/handlers/index.js",
75
- "./invoice": "./dist/invoice/index.js",
76
- "./invoice/invoice.contracts": "./dist/invoice/invoice.operations.js",
77
- "./invoice/invoice.schema": "./dist/invoice/invoice.schema.js",
78
- "./job": "./dist/job/index.js",
79
- "./job/job.contracts": "./dist/job/job.operations.js",
80
- "./job/job.schema": "./dist/job/job.schema.js",
81
- "./payment": "./dist/payment/index.js",
82
- "./payment/payment.contracts": "./dist/payment/payment.operations.js",
83
- "./payment/payment.schema": "./dist/payment/payment.schema.js",
84
- "./presentations": "./dist/presentations/index.js",
85
- "./quote": "./dist/quote/index.js",
86
- "./quote/quote.contracts": "./dist/quote/quote.operations.js",
87
- "./quote/quote.schema": "./dist/quote/quote.schema.js",
88
- "./service.feature": "./dist/service.feature.js",
89
- "./*": "./*"
75
+ ".": {
76
+ "types": "./dist/index.d.ts",
77
+ "bun": "./dist/index.js",
78
+ "node": "./dist/node/index.mjs",
79
+ "browser": "./dist/browser/index.js",
80
+ "default": "./dist/index.js"
81
+ },
82
+ "./client": {
83
+ "types": "./dist/client/index.d.ts",
84
+ "bun": "./dist/client/index.js",
85
+ "node": "./dist/node/client/index.mjs",
86
+ "browser": "./dist/browser/client/index.js",
87
+ "default": "./dist/client/index.js"
88
+ },
89
+ "./client/client.operations": {
90
+ "types": "./dist/client/client.operations.d.ts",
91
+ "bun": "./dist/client/client.operations.js",
92
+ "node": "./dist/node/client/client.operations.mjs",
93
+ "browser": "./dist/browser/client/client.operations.js",
94
+ "default": "./dist/client/client.operations.js"
95
+ },
96
+ "./client/client.schema": {
97
+ "types": "./dist/client/client.schema.d.ts",
98
+ "bun": "./dist/client/client.schema.js",
99
+ "node": "./dist/node/client/client.schema.mjs",
100
+ "browser": "./dist/browser/client/client.schema.js",
101
+ "default": "./dist/client/client.schema.js"
102
+ },
103
+ "./client/index": {
104
+ "types": "./dist/client/index.d.ts",
105
+ "bun": "./dist/client/index.js",
106
+ "node": "./dist/node/client/index.mjs",
107
+ "browser": "./dist/browser/client/index.js",
108
+ "default": "./dist/client/index.js"
109
+ },
110
+ "./docs": {
111
+ "types": "./dist/docs/index.d.ts",
112
+ "bun": "./dist/docs/index.js",
113
+ "node": "./dist/node/docs/index.mjs",
114
+ "browser": "./dist/browser/docs/index.js",
115
+ "default": "./dist/docs/index.js"
116
+ },
117
+ "./docs/index": {
118
+ "types": "./dist/docs/index.d.ts",
119
+ "bun": "./dist/docs/index.js",
120
+ "node": "./dist/node/docs/index.mjs",
121
+ "browser": "./dist/browser/docs/index.js",
122
+ "default": "./dist/docs/index.js"
123
+ },
124
+ "./docs/service-business-os.docblock": {
125
+ "types": "./dist/docs/service-business-os.docblock.d.ts",
126
+ "bun": "./dist/docs/service-business-os.docblock.js",
127
+ "node": "./dist/node/docs/service-business-os.docblock.mjs",
128
+ "browser": "./dist/browser/docs/service-business-os.docblock.js",
129
+ "default": "./dist/docs/service-business-os.docblock.js"
130
+ },
131
+ "./entities": {
132
+ "types": "./dist/entities/index.d.ts",
133
+ "bun": "./dist/entities/index.js",
134
+ "node": "./dist/node/entities/index.mjs",
135
+ "browser": "./dist/browser/entities/index.js",
136
+ "default": "./dist/entities/index.js"
137
+ },
138
+ "./entities/index": {
139
+ "types": "./dist/entities/index.d.ts",
140
+ "bun": "./dist/entities/index.js",
141
+ "node": "./dist/node/entities/index.mjs",
142
+ "browser": "./dist/browser/entities/index.js",
143
+ "default": "./dist/entities/index.js"
144
+ },
145
+ "./events": {
146
+ "types": "./dist/events.d.ts",
147
+ "bun": "./dist/events.js",
148
+ "node": "./dist/node/events.mjs",
149
+ "browser": "./dist/browser/events.js",
150
+ "default": "./dist/events.js"
151
+ },
152
+ "./example": {
153
+ "types": "./dist/example.d.ts",
154
+ "bun": "./dist/example.js",
155
+ "node": "./dist/node/example.mjs",
156
+ "browser": "./dist/browser/example.js",
157
+ "default": "./dist/example.js"
158
+ },
159
+ "./handlers": {
160
+ "types": "./dist/handlers/index.d.ts",
161
+ "bun": "./dist/handlers/index.js",
162
+ "node": "./dist/node/handlers/index.mjs",
163
+ "browser": "./dist/browser/handlers/index.js",
164
+ "default": "./dist/handlers/index.js"
165
+ },
166
+ "./handlers/index": {
167
+ "types": "./dist/handlers/index.d.ts",
168
+ "bun": "./dist/handlers/index.js",
169
+ "node": "./dist/node/handlers/index.mjs",
170
+ "browser": "./dist/browser/handlers/index.js",
171
+ "default": "./dist/handlers/index.js"
172
+ },
173
+ "./invoice": {
174
+ "types": "./dist/invoice/index.d.ts",
175
+ "bun": "./dist/invoice/index.js",
176
+ "node": "./dist/node/invoice/index.mjs",
177
+ "browser": "./dist/browser/invoice/index.js",
178
+ "default": "./dist/invoice/index.js"
179
+ },
180
+ "./invoice/index": {
181
+ "types": "./dist/invoice/index.d.ts",
182
+ "bun": "./dist/invoice/index.js",
183
+ "node": "./dist/node/invoice/index.mjs",
184
+ "browser": "./dist/browser/invoice/index.js",
185
+ "default": "./dist/invoice/index.js"
186
+ },
187
+ "./invoice/invoice.operations": {
188
+ "types": "./dist/invoice/invoice.operations.d.ts",
189
+ "bun": "./dist/invoice/invoice.operations.js",
190
+ "node": "./dist/node/invoice/invoice.operations.mjs",
191
+ "browser": "./dist/browser/invoice/invoice.operations.js",
192
+ "default": "./dist/invoice/invoice.operations.js"
193
+ },
194
+ "./invoice/invoice.schema": {
195
+ "types": "./dist/invoice/invoice.schema.d.ts",
196
+ "bun": "./dist/invoice/invoice.schema.js",
197
+ "node": "./dist/node/invoice/invoice.schema.mjs",
198
+ "browser": "./dist/browser/invoice/invoice.schema.js",
199
+ "default": "./dist/invoice/invoice.schema.js"
200
+ },
201
+ "./job": {
202
+ "types": "./dist/job/index.d.ts",
203
+ "bun": "./dist/job/index.js",
204
+ "node": "./dist/node/job/index.mjs",
205
+ "browser": "./dist/browser/job/index.js",
206
+ "default": "./dist/job/index.js"
207
+ },
208
+ "./job/index": {
209
+ "types": "./dist/job/index.d.ts",
210
+ "bun": "./dist/job/index.js",
211
+ "node": "./dist/node/job/index.mjs",
212
+ "browser": "./dist/browser/job/index.js",
213
+ "default": "./dist/job/index.js"
214
+ },
215
+ "./job/job.operations": {
216
+ "types": "./dist/job/job.operations.d.ts",
217
+ "bun": "./dist/job/job.operations.js",
218
+ "node": "./dist/node/job/job.operations.mjs",
219
+ "browser": "./dist/browser/job/job.operations.js",
220
+ "default": "./dist/job/job.operations.js"
221
+ },
222
+ "./job/job.schema": {
223
+ "types": "./dist/job/job.schema.d.ts",
224
+ "bun": "./dist/job/job.schema.js",
225
+ "node": "./dist/node/job/job.schema.mjs",
226
+ "browser": "./dist/browser/job/job.schema.js",
227
+ "default": "./dist/job/job.schema.js"
228
+ },
229
+ "./operations": {
230
+ "types": "./dist/operations/index.d.ts",
231
+ "bun": "./dist/operations/index.js",
232
+ "node": "./dist/node/operations/index.mjs",
233
+ "browser": "./dist/browser/operations/index.js",
234
+ "default": "./dist/operations/index.js"
235
+ },
236
+ "./operations/index": {
237
+ "types": "./dist/operations/index.d.ts",
238
+ "bun": "./dist/operations/index.js",
239
+ "node": "./dist/node/operations/index.mjs",
240
+ "browser": "./dist/browser/operations/index.js",
241
+ "default": "./dist/operations/index.js"
242
+ },
243
+ "./payment": {
244
+ "types": "./dist/payment/index.d.ts",
245
+ "bun": "./dist/payment/index.js",
246
+ "node": "./dist/node/payment/index.mjs",
247
+ "browser": "./dist/browser/payment/index.js",
248
+ "default": "./dist/payment/index.js"
249
+ },
250
+ "./payment/index": {
251
+ "types": "./dist/payment/index.d.ts",
252
+ "bun": "./dist/payment/index.js",
253
+ "node": "./dist/node/payment/index.mjs",
254
+ "browser": "./dist/browser/payment/index.js",
255
+ "default": "./dist/payment/index.js"
256
+ },
257
+ "./payment/payment.operations": {
258
+ "types": "./dist/payment/payment.operations.d.ts",
259
+ "bun": "./dist/payment/payment.operations.js",
260
+ "node": "./dist/node/payment/payment.operations.mjs",
261
+ "browser": "./dist/browser/payment/payment.operations.js",
262
+ "default": "./dist/payment/payment.operations.js"
263
+ },
264
+ "./payment/payment.schema": {
265
+ "types": "./dist/payment/payment.schema.d.ts",
266
+ "bun": "./dist/payment/payment.schema.js",
267
+ "node": "./dist/node/payment/payment.schema.mjs",
268
+ "browser": "./dist/browser/payment/payment.schema.js",
269
+ "default": "./dist/payment/payment.schema.js"
270
+ },
271
+ "./presentations": {
272
+ "types": "./dist/presentations.d.ts",
273
+ "bun": "./dist/presentations.js",
274
+ "node": "./dist/node/presentations.mjs",
275
+ "browser": "./dist/browser/presentations.js",
276
+ "default": "./dist/presentations.js"
277
+ },
278
+ "./presentations/index": {
279
+ "types": "./dist/presentations/index.d.ts",
280
+ "bun": "./dist/presentations/index.js",
281
+ "node": "./dist/node/presentations/index.mjs",
282
+ "browser": "./dist/browser/presentations/index.js",
283
+ "default": "./dist/presentations/index.js"
284
+ },
285
+ "./quote": {
286
+ "types": "./dist/quote/index.d.ts",
287
+ "bun": "./dist/quote/index.js",
288
+ "node": "./dist/node/quote/index.mjs",
289
+ "browser": "./dist/browser/quote/index.js",
290
+ "default": "./dist/quote/index.js"
291
+ },
292
+ "./quote/index": {
293
+ "types": "./dist/quote/index.d.ts",
294
+ "bun": "./dist/quote/index.js",
295
+ "node": "./dist/node/quote/index.mjs",
296
+ "browser": "./dist/browser/quote/index.js",
297
+ "default": "./dist/quote/index.js"
298
+ },
299
+ "./quote/quote.operations": {
300
+ "types": "./dist/quote/quote.operations.d.ts",
301
+ "bun": "./dist/quote/quote.operations.js",
302
+ "node": "./dist/node/quote/quote.operations.mjs",
303
+ "browser": "./dist/browser/quote/quote.operations.js",
304
+ "default": "./dist/quote/quote.operations.js"
305
+ },
306
+ "./quote/quote.schema": {
307
+ "types": "./dist/quote/quote.schema.d.ts",
308
+ "bun": "./dist/quote/quote.schema.js",
309
+ "node": "./dist/node/quote/quote.schema.mjs",
310
+ "browser": "./dist/browser/quote/quote.schema.js",
311
+ "default": "./dist/quote/quote.schema.js"
312
+ },
313
+ "./service-business-os.capability": {
314
+ "types": "./dist/service-business-os.capability.d.ts",
315
+ "bun": "./dist/service-business-os.capability.js",
316
+ "node": "./dist/node/service-business-os.capability.mjs",
317
+ "browser": "./dist/browser/service-business-os.capability.js",
318
+ "default": "./dist/service-business-os.capability.js"
319
+ },
320
+ "./service.feature": {
321
+ "types": "./dist/service.feature.d.ts",
322
+ "bun": "./dist/service.feature.js",
323
+ "node": "./dist/node/service.feature.mjs",
324
+ "browser": "./dist/browser/service.feature.js",
325
+ "default": "./dist/service.feature.js"
326
+ }
90
327
  },
91
328
  "registry": "https://registry.npmjs.org/"
92
329
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.operations.js","names":[],"sources":["../../src/client/client.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport { ClientModel, CreateClientInputModel } from './client.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n/**\n * Create a new client.\n */\nexport const CreateClientContract = defineCommand({\n meta: {\n key: 'service.client.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'client', 'create'],\n description: 'Create a new client.',\n goal: 'Onboard clients.',\n context: 'CRM.',\n },\n io: {\n input: CreateClientInputModel,\n output: ClientModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'create-client-happy-path',\n given: ['User is authenticated'],\n when: ['User creates a new client'],\n then: ['Client is created'],\n },\n ],\n examples: [\n {\n key: 'create-basic',\n input: {\n name: 'Acme Corp',\n email: 'contact@acme.com',\n phone: '555-0123',\n },\n output: { id: 'client-123', name: 'Acme Corp' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,gCAAgC;;;;AAKhD,MAAa,uBAAuB,cAAc;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAU;GAAS;EACjD,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,wBAAwB;GAChC,MAAM,CAAC,4BAA4B;GACnC,MAAM,CAAC,oBAAoB;GAC5B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,MAAM;IACN,OAAO;IACP,OAAO;IACR;GACD,QAAQ;IAAE,IAAI;IAAc,MAAM;IAAa;GAChD,CACF;EACF;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.schema.js","names":[],"sources":["../../src/client/client.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\n\n/**\n * Client profile.\n */\nexport const ClientModel = defineSchemaModel({\n name: 'Client',\n description: 'Client profile',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n contactEmail: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n phone: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a client.\n */\nexport const CreateClientInputModel = defineSchemaModel({\n name: 'CreateClientInput',\n description: 'Input for creating a client',\n fields: {\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n contactEmail: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n phone: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;AAKA,MAAa,cAAc,kBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAC1E,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACnE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,kBAAkB;CACtD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAC1E,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACnE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,UAAU;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAC5D;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"service-business-os.docblock.js","names":[],"sources":["../../src/docs/service-business-os.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst serviceBusinessDocBlocks: DocBlock[] = [\n {\n id: 'docs.examples.service-business-os',\n title: 'Service Business OS',\n summary:\n 'Field/service business flow from client intake to quote, job scheduling, invoicing, and payments with notifications and audit trail.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/service-business-os',\n tags: ['services', 'quotes', 'jobs', 'invoices', 'payments'],\n body: `## Flows\n\n1) **Client intake** → create client, capture contact + owner.\n2) **Quote** → draft, send, accept/reject (events + notifications).\n3) **Job** → schedule, assign technician, complete with notes and attachments.\n4) **Invoice** → issue after completion, track status.\n5) **Payment** → record payment and emit analytics/audit.\n\n## Modules reused\n- Identity/RBAC for org + roles\n- Files for attachments (proposals, receipts)\n- Notifications for quote sent/accepted, job reminders, overdue invoices\n- Jobs for reminder/schedule tasks\n- Audit trail for all lifecycle changes\n\n## Presentations\n- Dashboard, client list, quote list/detail, job board, invoice list, payment list (React + Markdown targets).\n`,\n },\n {\n id: 'docs.examples.service-business-os.goal',\n title: 'Service Business OS — Goal',\n summary: 'Why this field-service OS exists and outcomes it targets.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/service-business-os/goal',\n tags: ['services', 'goal'],\n body: `## Why it matters\n- Provides a regenerable, end-to-end service lifecycle (client → quote → job → invoice → payment).\n- Keeps pricing, scheduling, invoicing, and payments consistent across surfaces.\n\n## Business/Product goal\n- Deliver auditable quotes/jobs/invoices with notifications and reminders.\n- Support attachments and PII-safe flows; stage new payment rules via feature flags.\n\n## Success criteria\n- Spec changes regenerate UI/API/events cleanly across lifecycle steps.\n- Audit/Notifications/Jobs remain wired for every mutation.`,\n },\n {\n id: 'docs.examples.service-business-os.usage',\n title: 'Service Business OS — Usage',\n summary: 'How to operate, extend, and regenerate the service OS safely.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/service-business-os/usage',\n tags: ['services', 'usage'],\n body: `## Setup\n1) Seed (if provided) or create client → quote → job → invoice → payment via UI.\n2) Configure Files for attachments and Notifications for quote/job/invoice events.\n\n## Extend & regenerate\n1) Adjust schemas: quote line items, job statuses, invoice terms, payment methods.\n2) Regenerate to sync UI/API/events; mark PII paths in policy.\n3) Use Feature Flags to trial new payment rules or reminder cadences.\n\n## Guardrails\n- Emit events for quote accepted/rejected, job scheduled/completed, invoice overdue, payment recorded.\n- Keep pricing/tax rules explicit in spec; avoid implicit handler math.\n- Use Audit Trail for lifecycle mutations; schedule reminders via Jobs.`,\n },\n {\n id: 'docs.examples.service-business-os.constraints',\n title: 'Service Business OS — Constraints & Safety',\n summary:\n 'Internal guardrails for quotes/jobs/invoices/payments and regeneration safety.',\n kind: 'reference',\n visibility: 'internal',\n route: '/docs/examples/service-business-os/constraints',\n tags: ['services', 'constraints', 'internal'],\n body: `## Constraints\n- Commission/tax/payment rules must be explicit in spec; no hidden handler math.\n- Events to emit: quote.sent/accepted/rejected, job.scheduled/completed, invoice.issued/overdue, payment.recorded.\n- Regeneration must not alter payment semantics without reviewed spec changes.\n\n## PII & Attachments\n- Mark PII paths (client contact, address); redact in markdown/JSON.\n- Files (quotes, receipts) should use presigned URLs with scoped access.\n\n## Verification\n- Add fixtures for quote/job/invoice state transitions.\n- Ensure Notifications/Audit/Jobs wiring persists after regeneration.\n- Use Feature Flags to trial new payment rules/reminder cadences; default safe/off.`,\n },\n];\n\nregisterDocBlocks(serviceBusinessDocBlocks);\n"],"mappings":";;;AAmGA,kBAhG6C;CAC3C;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAY;GAAU;GAAQ;GAAY;GAAW;EAC5D,MAAM;;;;;;;;;;;;;;;;;;EAkBP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,YAAY,OAAO;EAC1B,MAAM;;;;;;;;;;;EAWP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,YAAY,QAAQ;EAC3B,MAAM;;;;;;;;;;;;;EAaP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAY;GAAe;GAAW;EAC7C,MAAM;;;;;;;;;;;;;EAaP;CACF,CAE0C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/entities/index.ts"],"sourcesContent":["import {\n defineEntity,\n defineEntityEnum,\n field,\n index,\n} from '@contractspec/lib.schema';\nimport type { ModuleSchemaContribution } from '@contractspec/lib.schema';\n\nconst schema = 'lssm_service_os';\n\nexport const QuoteStatusEnum = defineEntityEnum({\n name: 'QuoteStatus',\n schema,\n values: ['DRAFT', 'SENT', 'ACCEPTED', 'REJECTED', 'EXPIRED'] as const,\n description: 'Lifecycle for quotes/proposals.',\n});\n\nexport const JobStatusEnum = defineEntityEnum({\n name: 'JobStatus',\n schema,\n values: ['SCHEDULED', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'] as const,\n description: 'Lifecycle for service jobs/interventions.',\n});\n\nexport const InvoiceStatusEnum = defineEntityEnum({\n name: 'InvoiceStatus',\n schema,\n values: ['DRAFT', 'SENT', 'PAID', 'OVERDUE', 'CANCELLED'] as const,\n description: 'Lifecycle for invoices.',\n});\n\nexport const PaymentMethodEnum = defineEntityEnum({\n name: 'PaymentMethod',\n schema,\n values: ['CARD', 'BANK_TRANSFER', 'CASH', 'CHECK'] as const,\n description: 'Payment method used.',\n});\n\nexport const ClientEntity = defineEntity({\n name: 'Client',\n description: 'Customer organization or individual.',\n schema,\n map: 'client',\n fields: {\n id: field.id({ description: 'Unique client identifier' }),\n name: field.string({ description: 'Client display name' }),\n contactEmail: field.string({\n description: 'Primary contact email',\n isOptional: true,\n }),\n phone: field.string({ description: 'Primary phone', isOptional: true }),\n address: field.json({ description: 'Mailing address', isOptional: true }),\n industry: field.string({\n description: 'Industry/vertical',\n isOptional: true,\n }),\n orgId: field.string({ description: 'Owning organization' }),\n ownerId: field.string({ description: 'Account owner' }),\n metadata: field.json({\n description: 'Additional metadata',\n isOptional: true,\n }),\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n quotes: field.hasMany('Quote'),\n jobs: field.hasMany('Job'),\n },\n indexes: [index.on(['orgId']), index.on(['ownerId']), index.on(['name'])],\n});\n\nexport const QuoteEntity = defineEntity({\n name: 'Quote',\n description: 'Proposal/quote for a job.',\n schema,\n map: 'quote',\n fields: {\n id: field.id({ description: 'Unique quote identifier' }),\n clientId: field.foreignKey({ description: 'Client receiving quote' }),\n title: field.string({ description: 'Quote title' }),\n description: field.string({\n description: 'Work summary',\n isOptional: true,\n }),\n amount: field.float({ description: 'Total quoted amount' }),\n currency: field.string({ description: 'Currency code', default: '\"USD\"' }),\n status: field.enum('QuoteStatus', {\n description: 'Quote status',\n default: 'DRAFT',\n }),\n validUntil: field.dateTime({\n description: 'Expiration date',\n isOptional: true,\n }),\n terms: field.string({\n description: 'Payment/engagement terms',\n isOptional: true,\n }),\n orgId: field.string({ description: 'Owning organization' }),\n ownerId: field.string({ description: 'Account owner' }),\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n client: field.belongsTo('Client', ['clientId'], ['id'], {\n onDelete: 'Cascade',\n }),\n jobs: field.hasMany('Job'),\n },\n enums: [QuoteStatusEnum],\n indexes: [\n index.on(['orgId', 'status']),\n index.on(['clientId']),\n index.on(['validUntil']),\n ],\n});\n\nexport const JobEntity = defineEntity({\n name: 'Job',\n description: 'Service job/intervention derived from an accepted quote.',\n schema,\n map: 'job',\n fields: {\n id: field.id({ description: 'Unique job identifier' }),\n quoteId: field.foreignKey({ description: 'Source quote' }),\n clientId: field.foreignKey({ description: 'Client receiving service' }),\n title: field.string({ description: 'Job title' }),\n status: field.enum('JobStatus', {\n description: 'Job status',\n default: 'SCHEDULED',\n }),\n scheduledAt: field.dateTime({\n description: 'Scheduled start date/time',\n isOptional: true,\n }),\n completedAt: field.dateTime({\n description: 'Completion timestamp',\n isOptional: true,\n }),\n assignedTo: field.string({\n description: 'Assignee/technician user ID',\n isOptional: true,\n }),\n location: field.json({ description: 'Location details', isOptional: true }),\n notes: field.string({ description: 'Internal notes', isOptional: true }),\n orgId: field.string({ description: 'Owning organization' }),\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n quote: field.belongsTo('Quote', ['quoteId'], ['id'], {\n onDelete: 'SetNull',\n }),\n client: field.belongsTo('Client', ['clientId'], ['id'], {\n onDelete: 'Cascade',\n }),\n invoices: field.hasMany('Invoice'),\n },\n enums: [JobStatusEnum],\n indexes: [\n index.on(['orgId', 'status']),\n index.on(['clientId']),\n index.on(['assignedTo', 'status']),\n index.on(['scheduledAt']),\n ],\n});\n\nexport const InvoiceEntity = defineEntity({\n name: 'Invoice',\n description: 'Invoice issued for a completed job.',\n schema,\n map: 'invoice',\n fields: {\n id: field.id({ description: 'Unique invoice identifier' }),\n jobId: field.foreignKey({ description: 'Related job' }),\n invoiceNumber: field.string({\n description: 'Invoice number',\n isUnique: true,\n }),\n amount: field.decimal({ description: 'Invoice amount' }),\n currency: field.string({ description: 'Currency code', default: '\"USD\"' }),\n status: field.enum('InvoiceStatus', {\n description: 'Invoice status',\n default: 'DRAFT',\n }),\n dueDate: field.dateTime({ description: 'Due date', isOptional: true }),\n issuedAt: field.dateTime({\n description: 'Issued timestamp',\n isOptional: true,\n }),\n paidAt: field.dateTime({ description: 'Paid timestamp', isOptional: true }),\n orgId: field.string({ description: 'Owning organization' }),\n notes: field.string({ description: 'Invoice notes', isOptional: true }),\n metadata: field.json({ description: 'Metadata', isOptional: true }),\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n job: field.belongsTo('Job', ['jobId'], ['id'], { onDelete: 'Cascade' }),\n payments: field.hasMany('Payment'),\n },\n enums: [InvoiceStatusEnum],\n indexes: [\n index.on(['invoiceNumber']),\n index.on(['orgId', 'status']),\n index.on(['dueDate']),\n ],\n});\n\nexport const PaymentEntity = defineEntity({\n name: 'Payment',\n description: 'Payment received for an invoice.',\n schema,\n map: 'payment',\n fields: {\n id: field.id({ description: 'Unique payment identifier' }),\n invoiceId: field.foreignKey({ description: 'Invoice being paid' }),\n amount: field.decimal({ description: 'Payment amount' }),\n currency: field.string({ description: 'Currency code', default: '\"USD\"' }),\n method: field.enum('PaymentMethod', { description: 'Payment method' }),\n reference: field.string({\n description: 'Payment reference/transaction ID',\n isOptional: true,\n }),\n receivedAt: field.dateTime({ description: 'When payment was received' }),\n orgId: field.string({ description: 'Owning organization' }),\n createdAt: field.createdAt(),\n invoice: field.belongsTo('Invoice', ['invoiceId'], ['id'], {\n onDelete: 'Cascade',\n }),\n },\n enums: [PaymentMethodEnum],\n indexes: [\n index.on(['invoiceId']),\n index.on(['orgId']),\n index.on(['receivedAt']),\n ],\n});\n\nexport const serviceBusinessEntities = [\n ClientEntity,\n QuoteEntity,\n JobEntity,\n InvoiceEntity,\n PaymentEntity,\n];\n\nexport const serviceBusinessSchemaContribution: ModuleSchemaContribution = {\n moduleId: '@contractspec/example.service-business-os',\n // schema,\n entities: serviceBusinessEntities,\n enums: [QuoteStatusEnum, JobStatusEnum, InvoiceStatusEnum, PaymentMethodEnum],\n};\n"],"mappings":";;;AAQA,MAAM,SAAS;AAEf,MAAa,kBAAkB,iBAAiB;CAC9C,MAAM;CACN;CACA,QAAQ;EAAC;EAAS;EAAQ;EAAY;EAAY;EAAU;CAC5D,aAAa;CACd,CAAC;AAEF,MAAa,gB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C;EACxE,OAAO,MAAM,OAAO,EAAE,aAAa,uBAAuB,CAAC;EAC3D,WAAW,MAAM,WAAW;EAC5B,SAAS,MAAM,UAAU,WAAW,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,EACzD,UAAU,WACX,CAAC;EACH;CACD,OAAO,CAAC,kBAAkB;CAC1B,SAAS;EACP,MAAM,GAAG,CAAC,YAAY,CAAC;EACvB,MAAM,GAAG,CAAC,QAAQ,CAAC;EACnB,MAAM,GAAG,CAAC,aAAa,CAAC;EACzB;CACF,CAAC;AAEF,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,oCAA8D;CACzE,UAAU;CAEV,UAAU;CACV,OAAO;EAAC;EAAiB;EAAe;EAAmB;EAAkB;CAC9E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst QuoteEventPayload = defineSchemaModel({\n name: 'QuoteEventPayload',\n description: 'Event payload for quote lifecycle',\n fields: {\n quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst JobEventPayload = defineSchemaModel({\n name: 'JobEventPayload',\n description: 'Event payload for job lifecycle',\n fields: {\n jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n scheduledAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst InvoiceEventPayload = defineSchemaModel({\n name: 'InvoiceEventPayload',\n description: 'Event payload for invoices',\n fields: {\n invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst PaymentEventPayload = defineSchemaModel({\n name: 'PaymentEventPayload',\n description: 'Event payload for payments',\n fields: {\n paymentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const QuoteSentEvent = defineEvent({\n meta: {\n key: 'service.quote.sent',\n version: '1.0.0',\n description: 'A quote was sent to the client.',\n stability: 'stable',\n owners: ['@service-os'],\n tags: ['service', 'quote', 'sent'],\n },\n payload: QuoteEventPayload,\n});\n\nexport const QuoteAcceptedEvent = defineEvent({\n meta: {\n key: 'service.quote.accepted',\n version: '1.0.0',\n description: 'A quote was accepted.',\n stability: 'stable',\n owners: ['@service-os'],\n tags: ['service', 'quote', 'accepted'],\n },\n payload: QuoteEventPayload,\n});\n\nexport const JobScheduledEvent = defineEvent({\n meta: {\n key: 'service.job.scheduled',\n version: '1.0.0',\n description: 'A job was scheduled.',\n stability: 'stable',\n owners: ['@service-os'],\n tags: ['service', 'job', 'scheduled'],\n },\n payload: JobEventPayload,\n});\n\nexport const JobCompletedEvent = defineEvent({\n meta: {\n key: 'service.job.completed',\n version: '1.0.0',\n description: 'A job was completed.',\n stability: 'stable',\n owners: ['@service-os'],\n tags: ['service', 'job', 'completed'],\n },\n payload: JobEventPayload,\n});\n\nexport const InvoiceIssuedEvent = defineEvent({\n meta: {\n key: 'service.invoice.issued',\n version: '1.0.0',\n description: 'An invoice was issued.',\n stability: 'stable',\n owners: ['@service-os'],\n tags: ['service', 'invoice', 'issued'],\n },\n payload: InvoiceEventPayload,\n});\n\nexport const PaymentReceivedEvent = defineEvent({\n meta: {\n key: 'service.payment.received',\n version: '1.0.0',\n description: 'A payment was recorded.',\n stability: 'stable',\n owners: ['@service-os'],\n tags: ['service', 'payment', 'received'],\n },\n payload: PaymentEventPayload,\n});\n\nexport const ServiceBusinessEvents = {\n QuoteSentEvent,\n QuoteAcceptedEvent,\n JobScheduledEvent,\n JobCompletedEvent,\n InvoiceIssuedEvent,\n PaymentReceivedEvent,\n};\n"],"mappings":";;;;AAGA,MAAM,oBAAoB,kBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,QAAQ;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACpE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACnE;CACF,CAAC;AAEF,MAAM,kBAAkB,kBAAkB;CACxC,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,SAAS;GAAE,MAAM,eAAe,iBAA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b,WAAW;EACX,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAW;GAAS;GAAO;EACnC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,qBAAqB,YAAY;CAC5C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAW;GAAS;GAAW;EACvC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAW;GAAO;GAAY;EACtC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAW;GAAO;GAAY;EACtC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,qBAAqB,YAAY;CAC5C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAW;GAAW;GAAS;EACvC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAW;GAAW;GAAW;EACzC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'service-business-os',\n version: '1.0.0',\n title: 'Service Business OS',\n description:\n 'Service business operating system: jobs, clients, scheduling, invoicing, and ops dashboards.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['service-business', 'jobs', 'scheduling', 'invoicing'],\n },\n docs: {\n rootDocId: 'docs.examples.service-business-os',\n },\n entrypoints: {\n packageName: '@contractspec/example.service-business-os',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAoB;GAAQ;GAAc;GAAY;EAC9D;CACD,MAAM,EACJ,WAAW,qCACZ;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/handlers/index.ts"],"sourcesContent":["/**\n * Placeholder handlers for Service Business OS.\n * Implementations would persist to DB and integrate with Files, Notifications, and Jobs.\n */\nimport type { CreateClientContract } from '../client';\nimport type { CreateQuoteContract, AcceptQuoteContract } from '../quote';\nimport type { ScheduleJobContract, CompleteJobContract } from '../job';\nimport type { IssueInvoiceContract } from '../invoice';\nimport type { RecordPaymentContract } from '../payment';\n\nexport function registerServiceBusinessHandlers() {\n // Wire contract names to runtime handlers in the host app.\n // Example:\n // registry.command(CreateQuoteContract.meta.name, handleCreateQuote);\n}\n\nexport type ServiceBusinessHandlers =\n | typeof AcceptQuoteContract\n | typeof CreateClientContract\n | typeof CreateQuoteContract\n | typeof ScheduleJobContract\n | typeof CompleteJobContract\n | typeof IssueInvoiceContract\n | typeof RecordPaymentContract;\n"],"mappings":";AAUA,SAAgB,kCAAkC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"invoice.operations.js","names":[],"sources":["../../src/invoice/invoice.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport { InvoiceModel, IssueInvoiceInputModel } from './invoice.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n/**\n * Issue an invoice.\n */\nexport const IssueInvoiceContract = defineCommand({\n meta: {\n key: 'service.invoice.issue',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'invoice', 'issue'],\n description: 'Issue an invoice for a job.',\n goal: 'Bill clients.',\n context: 'Billing.',\n },\n io: {\n input: IssueInvoiceInputModel,\n output: InvoiceModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'issue-invoice-happy-path',\n given: ['Job is complete'],\n when: ['User issues invoice'],\n then: ['Invoice is created and sent'],\n },\n ],\n examples: [\n {\n key: 'issue-standard',\n input: {\n jobId: 'job-123',\n dueDate: '2025-02-01',\n items: [{ description: 'Service', amount: 100 }],\n },\n output: { id: 'inv-456', status: 'issued', total: 100 },\n },\n ],\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,gCAAgC;;;;AAKhD,MAAa,uBAAuB,cAAc;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAW;GAAQ;EACjD,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,kBAAkB;GAC1B,MAAM,CAAC,sBAAsB;GAC7B,MAAM,CAAC,8BAA8B;GACtC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,OAAO;IACP,SAAS;IACT,OAAO,CAAC;KAAE,aAAa;KAAW,QAAQ;KAAK,CAAC;IACjD;GACD,QAAQ;IAAE,IAAI;IAAW,QAAQ;IAAU,OAAO;IAAK;GACxD,CACF;EACF;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"invoice.schema.js","names":[],"sources":["../../src/invoice/invoice.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\n\n/**\n * Invoice issued for a job.\n */\nexport const InvoiceModel = defineSchemaModel({\n name: 'Invoice',\n description: 'Invoice issued for a job',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n invoiceNumber: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n issuedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n paidAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\n/**\n * Input for issuing an invoice.\n */\nexport const IssueInvoiceInputModel = defineSchemaModel({\n name: 'IssueInvoiceInput',\n description: 'Input for issuing an invoice',\n fields: {\n jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n lineItems: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;AAKA,MAAa,eAAe,kBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,QAAQ;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACpE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,SAAS;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAC9D,UAAU;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAC/D,QAAQ;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAC9D;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,kBAAkB;CACtD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,SAAS;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAC9D,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACnE,WAAW;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAC7D;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"job.operations.js","names":[],"sources":["../../src/job/job.operations.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@contractspec/lib.contracts';\nimport { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport {\n JobModel,\n ScheduleJobInputModel,\n CompleteJobInputModel,\n} from './job.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n// ============ List Jobs Query ============\n\nexport const ListJobsInputModel = defineSchemaModel({\n name: 'ListJobsInput',\n description: 'Input for listing jobs',\n fields: {\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nexport const ListJobsOutputModel = defineSchemaModel({\n name: 'ListJobsOutput',\n description: 'Output for listing jobs',\n fields: {\n jobs: { type: JobModel, isOptional: false, isList: true },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nexport const ListJobsOperation = defineQuery({\n meta: {\n key: 'service.job.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'job', 'list', 'query'],\n description: 'List all jobs with filtering',\n goal: 'Retrieve list of jobs',\n context: 'Job management',\n },\n io: {\n input: ListJobsInputModel,\n output: ListJobsOutputModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'list-jobs-happy-path',\n given: ['Jobs exist'],\n when: ['User lists jobs'],\n then: ['List of jobs is returned'],\n },\n ],\n examples: [\n {\n key: 'list-active',\n input: { status: 'scheduled', limit: 10 },\n output: { jobs: [], total: 5 },\n },\n ],\n },\n});\n\n// ============ Job Commands ============\n\n/**\n * Schedule a job.\n */\nexport const ScheduleJobContract = defineCommand({\n meta: {\n key: 'service.job.schedule',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'job', 'schedule'],\n description: 'Schedule a job.',\n goal: 'Schedule work.',\n context: 'Job scheduling.',\n },\n io: {\n input: ScheduleJobInputModel,\n output: JobModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'schedule-job-happy-path',\n given: ['Client exists'],\n when: ['User schedules job'],\n then: ['Job is created with status SCHEDULED'],\n },\n ],\n examples: [\n {\n key: 'schedule-repair',\n input: {\n clientId: 'client-123',\n date: '2025-01-20T10:00:00Z',\n type: 'repair',\n },\n output: { id: 'job-456', status: 'scheduled' },\n },\n ],\n },\n});\n\n/**\n * Complete a job.\n */\nexport const CompleteJobContract = defineCommand({\n meta: {\n key: 'service.job.complete',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'job', 'complete'],\n description: 'Mark a job as complete.',\n goal: 'Record job completion.',\n context: 'Job management.',\n },\n io: {\n input: CompleteJobInputModel,\n output: JobModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'complete-job-happy-path',\n given: ['Job is scheduled'],\n when: ['User completes job'],\n then: ['Job status becomes COMPLETED'],\n },\n ],\n examples: [\n {\n key: 'mark-complete',\n input: { jobId: 'job-456', notes: 'Done successfully' },\n output: { id: 'job-456', status: 'completed' },\n },\n ],\n },\n});\n"],"mappings":";;;;;AAQA,MAAM,SAAS,CAAC,gCAAgC;AAIhD,MAAa,qBAAqB,kBAAkB;CAClD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACtE,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EAChE,QAAQ;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EAClE;CACF,CAAC;AAEF,MAAa,sBAAsB,kBAAkB;CACnD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,MAAM;GAAE,MAAM;GAAU,YAAY;GAAO,QAAQ;GAAM;EACzD,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAO;GAAQ;GAAQ;EACrD,aAAa;EACb,MAAM;EACN,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AAM,CAAC,+BAA+B;GACvC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,OAAO;IAAW,OAAO;IAAqB;GACvD,QAAQ;IAAE,IAAI;IAAW,QAAQ;IAAa;GAC/C,CACF;EACF;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"job.schema.js","names":[],"sources":["../../src/job/job.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\n\n/**\n * Scheduled job.\n */\nexport const JobModel = defineSchemaModel({\n name: 'Job',\n description: 'Scheduled job',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n scheduledAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n/**\n * Input for scheduling a job.\n */\nexport const ScheduleJobInputModel = defineSchemaModel({\n name: 'ScheduleJobInput',\n description: 'Input for scheduling a job',\n fields: {\n quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n scheduledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n location: { type: ScalarTypeEnum.JSON(), isOptional: true },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n/**\n * Input for completing a job.\n */\nexport const CompleteJobInputModel = defineSchemaModel({\n name: 'CompleteJobInput',\n description: 'Input for completing a job',\n fields: {\n jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n notes: { type: ScalarType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":[],"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 +0,0 @@
1
- {"version":3,"file":"payment.schema.js","names":[],"sources":["../../src/payment/payment.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\n\n/**\n * Payment applied to invoice.\n */\nexport const PaymentModel = defineSchemaModel({\n name: 'Payment',\n description: 'Payment applied to invoice',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for recording a payment.\n */\nexport const RecordPaymentInputModel = defineSchemaModel({\n name: 'RecordPaymentInput',\n description: 'Input for recording a payment',\n fields: {\n invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;AAKA,MAAa,eAAe,kBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACpE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACnE;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,kBAAkB;CACvD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACpE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAClE;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":["/**\n * Presentation descriptors for Service Business OS.\n * These names map to renderers in Studio (react/markdown) to keep specs multi-surface.\n */\nexport const ServiceBusinessPresentations = [\n 'service-business-os.dashboard',\n 'service-business-os.client.list',\n 'service-business-os.quote.list',\n 'service-business-os.quote.detail',\n 'service-business-os.job.board',\n 'service-business-os.invoice.list',\n 'service-business-os.payment.list',\n];\n"],"mappings":";;;;;AAIA,MAAa,+BAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"presentations.js","names":[],"sources":["../src/presentations.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const ServiceDashboardPresentation = definePresentation({\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 = definePresentation({\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 = definePresentation({\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 = definePresentation({\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 = definePresentation({\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 = definePresentation({\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 = definePresentation({\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":";;;AAEA,MAAa,+BAA+B,mBAAmB;CAC7D,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,CAAC;AAEF,MAAa,yBAAyB,mBAAmB;CACvD,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,SA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C;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,CAAC;AAEF,MAAa,0BAA0B,mBAAmB;CACxD,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,CAAC"}
@@ -1 +0,0 @@
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"}