@contractspec/example.service-business-os 0.0.0-canary-20260113162409
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.
- package/LICENSE +21 -0
- package/README.md +16 -0
- package/dist/client/client.operations.d.ts +65 -0
- package/dist/client/client.operations.d.ts.map +1 -0
- package/dist/client/client.operations.js +53 -0
- package/dist/client/client.operations.js.map +1 -0
- package/dist/client/client.schema.d.ts +68 -0
- package/dist/client/client.schema.d.ts.map +1 -0
- package/dist/client/client.schema.js +77 -0
- package/dist/client/client.schema.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +4 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/service-business-os.docblock.d.ts +1 -0
- package/dist/docs/service-business-os.docblock.js +109 -0
- package/dist/docs/service-business-os.docblock.js.map +1 -0
- package/dist/entities/index.d.ts +168 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +289 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/events.d.ts +337 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +230 -0
- package/dist/events.js.map +1 -0
- package/dist/example.d.ts +7 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +53 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +17 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +6 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +19 -0
- package/dist/invoice/index.d.ts +3 -0
- package/dist/invoice/index.js +4 -0
- package/dist/invoice/invoice.operations.d.ts +65 -0
- package/dist/invoice/invoice.operations.d.ts.map +1 -0
- package/dist/invoice/invoice.operations.js +57 -0
- package/dist/invoice/invoice.operations.js.map +1 -0
- package/dist/invoice/invoice.schema.d.ts +68 -0
- package/dist/invoice/invoice.schema.d.ts.map +1 -0
- package/dist/invoice/invoice.schema.js +77 -0
- package/dist/invoice/invoice.schema.js.map +1 -0
- package/dist/job/index.d.ts +3 -0
- package/dist/job/index.js +4 -0
- package/dist/job/job.operations.d.ts +238 -0
- package/dist/job/job.operations.d.ts.map +1 -0
- package/dist/job/job.operations.js +175 -0
- package/dist/job/job.operations.js.map +1 -0
- package/dist/job/job.schema.d.ts +85 -0
- package/dist/job/job.schema.d.ts.map +1 -0
- package/dist/job/job.schema.js +98 -0
- package/dist/job/job.schema.js.map +1 -0
- package/dist/operations/index.d.ts +16 -0
- package/dist/operations/index.js +17 -0
- package/dist/payment/index.d.ts +3 -0
- package/dist/payment/index.js +4 -0
- package/dist/payment/payment.operations.d.ts +61 -0
- package/dist/payment/payment.operations.d.ts.map +1 -0
- package/dist/payment/payment.operations.js +53 -0
- package/dist/payment/payment.operations.js.map +1 -0
- package/dist/payment/payment.schema.d.ts +64 -0
- package/dist/payment/payment.schema.d.ts.map +1 -0
- package/dist/payment/payment.schema.js +73 -0
- package/dist/payment/payment.schema.js.map +1 -0
- package/dist/presentations/index.d.ts +9 -0
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +18 -0
- package/dist/presentations/index.js.map +1 -0
- package/dist/presentations.d.ts +13 -0
- package/dist/presentations.d.ts.map +1 -0
- package/dist/presentations.js +179 -0
- package/dist/presentations.js.map +1 -0
- package/dist/quote/index.d.ts +3 -0
- package/dist/quote/index.js +4 -0
- package/dist/quote/quote.operations.d.ts +135 -0
- package/dist/quote/quote.operations.d.ts.map +1 -0
- package/dist/quote/quote.operations.js +99 -0
- package/dist/quote/quote.operations.js.map +1 -0
- package/dist/quote/quote.schema.d.ts +101 -0
- package/dist/quote/quote.schema.d.ts.map +1 -0
- package/dist/quote/quote.schema.js +114 -0
- package/dist/quote/quote.schema.js.map +1 -0
- package/dist/service-business-os.capability.d.ts +8 -0
- package/dist/service-business-os.capability.d.ts.map +1 -0
- package/dist/service-business-os.capability.js +29 -0
- package/dist/service-business-os.capability.js.map +1 -0
- package/dist/service.feature.d.ts +7 -0
- package/dist/service.feature.d.ts.map +1 -0
- package/dist/service.feature.js +166 -0
- package/dist/service.feature.js.map +1 -0
- package/package.json +100 -0
package/dist/events.js
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
|
+
import { defineEvent } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/events.ts
|
|
5
|
+
const QuoteEventPayload = defineSchemaModel({
|
|
6
|
+
name: "QuoteEventPayload",
|
|
7
|
+
description: "Event payload for quote lifecycle",
|
|
8
|
+
fields: {
|
|
9
|
+
quoteId: {
|
|
10
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
11
|
+
isOptional: false
|
|
12
|
+
},
|
|
13
|
+
clientId: {
|
|
14
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
15
|
+
isOptional: false
|
|
16
|
+
},
|
|
17
|
+
amount: {
|
|
18
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
19
|
+
isOptional: false
|
|
20
|
+
},
|
|
21
|
+
status: {
|
|
22
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
+
isOptional: false
|
|
24
|
+
},
|
|
25
|
+
orgId: {
|
|
26
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
+
isOptional: false
|
|
28
|
+
},
|
|
29
|
+
occurredAt: {
|
|
30
|
+
type: ScalarTypeEnum.DateTime(),
|
|
31
|
+
isOptional: false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const JobEventPayload = defineSchemaModel({
|
|
36
|
+
name: "JobEventPayload",
|
|
37
|
+
description: "Event payload for job lifecycle",
|
|
38
|
+
fields: {
|
|
39
|
+
jobId: {
|
|
40
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
41
|
+
isOptional: false
|
|
42
|
+
},
|
|
43
|
+
quoteId: {
|
|
44
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
45
|
+
isOptional: true
|
|
46
|
+
},
|
|
47
|
+
clientId: {
|
|
48
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
+
isOptional: true
|
|
50
|
+
},
|
|
51
|
+
status: {
|
|
52
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
53
|
+
isOptional: false
|
|
54
|
+
},
|
|
55
|
+
scheduledAt: {
|
|
56
|
+
type: ScalarTypeEnum.DateTime(),
|
|
57
|
+
isOptional: true
|
|
58
|
+
},
|
|
59
|
+
orgId: {
|
|
60
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
61
|
+
isOptional: false
|
|
62
|
+
},
|
|
63
|
+
occurredAt: {
|
|
64
|
+
type: ScalarTypeEnum.DateTime(),
|
|
65
|
+
isOptional: false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const InvoiceEventPayload = defineSchemaModel({
|
|
70
|
+
name: "InvoiceEventPayload",
|
|
71
|
+
description: "Event payload for invoices",
|
|
72
|
+
fields: {
|
|
73
|
+
invoiceId: {
|
|
74
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
75
|
+
isOptional: false
|
|
76
|
+
},
|
|
77
|
+
jobId: {
|
|
78
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
79
|
+
isOptional: false
|
|
80
|
+
},
|
|
81
|
+
amount: {
|
|
82
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
83
|
+
isOptional: false
|
|
84
|
+
},
|
|
85
|
+
status: {
|
|
86
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
87
|
+
isOptional: false
|
|
88
|
+
},
|
|
89
|
+
orgId: {
|
|
90
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
+
isOptional: false
|
|
92
|
+
},
|
|
93
|
+
occurredAt: {
|
|
94
|
+
type: ScalarTypeEnum.DateTime(),
|
|
95
|
+
isOptional: false
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
const PaymentEventPayload = defineSchemaModel({
|
|
100
|
+
name: "PaymentEventPayload",
|
|
101
|
+
description: "Event payload for payments",
|
|
102
|
+
fields: {
|
|
103
|
+
paymentId: {
|
|
104
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
105
|
+
isOptional: false
|
|
106
|
+
},
|
|
107
|
+
invoiceId: {
|
|
108
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
109
|
+
isOptional: false
|
|
110
|
+
},
|
|
111
|
+
amount: {
|
|
112
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
113
|
+
isOptional: false
|
|
114
|
+
},
|
|
115
|
+
method: {
|
|
116
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
117
|
+
isOptional: false
|
|
118
|
+
},
|
|
119
|
+
orgId: {
|
|
120
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
121
|
+
isOptional: false
|
|
122
|
+
},
|
|
123
|
+
receivedAt: {
|
|
124
|
+
type: ScalarTypeEnum.DateTime(),
|
|
125
|
+
isOptional: false
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
const QuoteSentEvent = defineEvent({
|
|
130
|
+
meta: {
|
|
131
|
+
key: "service.quote.sent",
|
|
132
|
+
version: "1.0.0",
|
|
133
|
+
description: "A quote was sent to the client.",
|
|
134
|
+
stability: "stable",
|
|
135
|
+
owners: ["@service-os"],
|
|
136
|
+
tags: [
|
|
137
|
+
"service",
|
|
138
|
+
"quote",
|
|
139
|
+
"sent"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
payload: QuoteEventPayload
|
|
143
|
+
});
|
|
144
|
+
const QuoteAcceptedEvent = defineEvent({
|
|
145
|
+
meta: {
|
|
146
|
+
key: "service.quote.accepted",
|
|
147
|
+
version: "1.0.0",
|
|
148
|
+
description: "A quote was accepted.",
|
|
149
|
+
stability: "stable",
|
|
150
|
+
owners: ["@service-os"],
|
|
151
|
+
tags: [
|
|
152
|
+
"service",
|
|
153
|
+
"quote",
|
|
154
|
+
"accepted"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
payload: QuoteEventPayload
|
|
158
|
+
});
|
|
159
|
+
const JobScheduledEvent = defineEvent({
|
|
160
|
+
meta: {
|
|
161
|
+
key: "service.job.scheduled",
|
|
162
|
+
version: "1.0.0",
|
|
163
|
+
description: "A job was scheduled.",
|
|
164
|
+
stability: "stable",
|
|
165
|
+
owners: ["@service-os"],
|
|
166
|
+
tags: [
|
|
167
|
+
"service",
|
|
168
|
+
"job",
|
|
169
|
+
"scheduled"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
payload: JobEventPayload
|
|
173
|
+
});
|
|
174
|
+
const JobCompletedEvent = defineEvent({
|
|
175
|
+
meta: {
|
|
176
|
+
key: "service.job.completed",
|
|
177
|
+
version: "1.0.0",
|
|
178
|
+
description: "A job was completed.",
|
|
179
|
+
stability: "stable",
|
|
180
|
+
owners: ["@service-os"],
|
|
181
|
+
tags: [
|
|
182
|
+
"service",
|
|
183
|
+
"job",
|
|
184
|
+
"completed"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
payload: JobEventPayload
|
|
188
|
+
});
|
|
189
|
+
const InvoiceIssuedEvent = defineEvent({
|
|
190
|
+
meta: {
|
|
191
|
+
key: "service.invoice.issued",
|
|
192
|
+
version: "1.0.0",
|
|
193
|
+
description: "An invoice was issued.",
|
|
194
|
+
stability: "stable",
|
|
195
|
+
owners: ["@service-os"],
|
|
196
|
+
tags: [
|
|
197
|
+
"service",
|
|
198
|
+
"invoice",
|
|
199
|
+
"issued"
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
payload: InvoiceEventPayload
|
|
203
|
+
});
|
|
204
|
+
const PaymentReceivedEvent = defineEvent({
|
|
205
|
+
meta: {
|
|
206
|
+
key: "service.payment.received",
|
|
207
|
+
version: "1.0.0",
|
|
208
|
+
description: "A payment was recorded.",
|
|
209
|
+
stability: "stable",
|
|
210
|
+
owners: ["@service-os"],
|
|
211
|
+
tags: [
|
|
212
|
+
"service",
|
|
213
|
+
"payment",
|
|
214
|
+
"received"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
payload: PaymentEventPayload
|
|
218
|
+
});
|
|
219
|
+
const ServiceBusinessEvents = {
|
|
220
|
+
QuoteSentEvent,
|
|
221
|
+
QuoteAcceptedEvent,
|
|
222
|
+
JobScheduledEvent,
|
|
223
|
+
JobCompletedEvent,
|
|
224
|
+
InvoiceIssuedEvent,
|
|
225
|
+
PaymentReceivedEvent
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
//#endregion
|
|
229
|
+
export { InvoiceIssuedEvent, JobCompletedEvent, JobScheduledEvent, PaymentReceivedEvent, QuoteAcceptedEvent, QuoteSentEvent, ServiceBusinessEvents };
|
|
230
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAiCJ,6BAAA,CAjCW"}
|
package/dist/example.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/example.ts
|
|
4
|
+
const example = defineExample({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "service-business-os",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
title: "Service Business OS",
|
|
9
|
+
description: "Service business operating system: jobs, clients, scheduling, invoicing, and ops dashboards.",
|
|
10
|
+
kind: "template",
|
|
11
|
+
visibility: "public",
|
|
12
|
+
stability: "experimental",
|
|
13
|
+
owners: ["@platform.core"],
|
|
14
|
+
tags: [
|
|
15
|
+
"service-business",
|
|
16
|
+
"jobs",
|
|
17
|
+
"scheduling",
|
|
18
|
+
"invoicing"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
docs: { rootDocId: "docs.examples.service-business-os" },
|
|
22
|
+
entrypoints: {
|
|
23
|
+
packageName: "@contractspec/example.service-business-os",
|
|
24
|
+
feature: "./feature",
|
|
25
|
+
contracts: "./contracts",
|
|
26
|
+
presentations: "./presentations",
|
|
27
|
+
handlers: "./handlers",
|
|
28
|
+
docs: "./docs"
|
|
29
|
+
},
|
|
30
|
+
surfaces: {
|
|
31
|
+
templates: true,
|
|
32
|
+
sandbox: {
|
|
33
|
+
enabled: true,
|
|
34
|
+
modes: [
|
|
35
|
+
"playground",
|
|
36
|
+
"specs",
|
|
37
|
+
"builder",
|
|
38
|
+
"markdown",
|
|
39
|
+
"evolution"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
studio: {
|
|
43
|
+
enabled: true,
|
|
44
|
+
installable: true
|
|
45
|
+
},
|
|
46
|
+
mcp: { enabled: true }
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
var example_default = example;
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { example_default as default };
|
|
53
|
+
//# sourceMappingURL=example.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CreateClientContract } from "../client/client.operations.js";
|
|
2
|
+
import "../client/index.js";
|
|
3
|
+
import { AcceptQuoteContract, CreateQuoteContract } from "../quote/quote.operations.js";
|
|
4
|
+
import "../quote/index.js";
|
|
5
|
+
import { CompleteJobContract, ScheduleJobContract } from "../job/job.operations.js";
|
|
6
|
+
import "../job/index.js";
|
|
7
|
+
import { IssueInvoiceContract } from "../invoice/invoice.operations.js";
|
|
8
|
+
import "../invoice/index.js";
|
|
9
|
+
import { RecordPaymentContract } from "../payment/payment.operations.js";
|
|
10
|
+
import "../payment/index.js";
|
|
11
|
+
|
|
12
|
+
//#region src/handlers/index.d.ts
|
|
13
|
+
declare function registerServiceBusinessHandlers(): void;
|
|
14
|
+
type ServiceBusinessHandlers = typeof AcceptQuoteContract | typeof CreateClientContract | typeof CreateQuoteContract | typeof ScheduleJobContract | typeof CompleteJobContract | typeof IssueInvoiceContract | typeof RecordPaymentContract;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ServiceBusinessHandlers, registerServiceBusinessHandlers };
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/handlers/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;iBAUgB,+BAAA,CAAA;KAMJ,uBAAA,UACD,6BACA,8BACA,6BACA,6BACA,6BACA,8BACA"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CreateClientContract } from "./client/client.operations.js";
|
|
2
|
+
import { ClientModel, CreateClientInputModel } from "./client/client.schema.js";
|
|
3
|
+
import "./client/index.js";
|
|
4
|
+
import { AcceptQuoteInputModel, CreateQuoteInputModel, QuoteModel } from "./quote/quote.schema.js";
|
|
5
|
+
import { AcceptQuoteContract, CreateQuoteContract } from "./quote/quote.operations.js";
|
|
6
|
+
import "./quote/index.js";
|
|
7
|
+
import { CompleteJobInputModel, JobModel, ScheduleJobInputModel } from "./job/job.schema.js";
|
|
8
|
+
import { CompleteJobContract, ListJobsInputModel, ListJobsOperation, ListJobsOutputModel, ScheduleJobContract } from "./job/job.operations.js";
|
|
9
|
+
import "./job/index.js";
|
|
10
|
+
import { InvoiceModel, IssueInvoiceInputModel } from "./invoice/invoice.schema.js";
|
|
11
|
+
import { IssueInvoiceContract } from "./invoice/invoice.operations.js";
|
|
12
|
+
import "./invoice/index.js";
|
|
13
|
+
import { PaymentModel, RecordPaymentInputModel } from "./payment/payment.schema.js";
|
|
14
|
+
import { RecordPaymentContract } from "./payment/payment.operations.js";
|
|
15
|
+
import "./payment/index.js";
|
|
16
|
+
import { ClientListPresentation, InvoiceListPresentation, JobBoardPresentation, PaymentListPresentation, QuoteDetailPresentation, QuoteListPresentation, ServiceDashboardPresentation } from "./presentations.js";
|
|
17
|
+
import { ServiceBusinessFeature } from "./service.feature.js";
|
|
18
|
+
export { AcceptQuoteContract, AcceptQuoteInputModel, ClientListPresentation, ClientModel, CompleteJobContract, CompleteJobInputModel, CreateClientContract, CreateClientInputModel, CreateQuoteContract, CreateQuoteInputModel, InvoiceListPresentation, InvoiceModel, IssueInvoiceContract, IssueInvoiceInputModel, JobBoardPresentation, JobModel, ListJobsInputModel, ListJobsOperation, ListJobsOutputModel, PaymentListPresentation, PaymentModel, QuoteDetailPresentation, QuoteListPresentation, QuoteModel, RecordPaymentContract, RecordPaymentInputModel, ScheduleJobContract, ScheduleJobInputModel, ServiceBusinessFeature, ServiceDashboardPresentation };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ClientModel, CreateClientInputModel } from "./client/client.schema.js";
|
|
2
|
+
import { CreateClientContract } from "./client/client.operations.js";
|
|
3
|
+
import "./client/index.js";
|
|
4
|
+
import { AcceptQuoteInputModel, CreateQuoteInputModel, QuoteModel } from "./quote/quote.schema.js";
|
|
5
|
+
import { AcceptQuoteContract, CreateQuoteContract } from "./quote/quote.operations.js";
|
|
6
|
+
import "./quote/index.js";
|
|
7
|
+
import { CompleteJobInputModel, JobModel, ScheduleJobInputModel } from "./job/job.schema.js";
|
|
8
|
+
import { CompleteJobContract, ListJobsInputModel, ListJobsOperation, ListJobsOutputModel, ScheduleJobContract } from "./job/job.operations.js";
|
|
9
|
+
import "./job/index.js";
|
|
10
|
+
import { InvoiceModel, IssueInvoiceInputModel } from "./invoice/invoice.schema.js";
|
|
11
|
+
import { IssueInvoiceContract } from "./invoice/invoice.operations.js";
|
|
12
|
+
import "./invoice/index.js";
|
|
13
|
+
import { PaymentModel, RecordPaymentInputModel } from "./payment/payment.schema.js";
|
|
14
|
+
import { RecordPaymentContract } from "./payment/payment.operations.js";
|
|
15
|
+
import "./payment/index.js";
|
|
16
|
+
import { ClientListPresentation, InvoiceListPresentation, JobBoardPresentation, PaymentListPresentation, QuoteDetailPresentation, QuoteListPresentation, ServiceDashboardPresentation } from "./presentations.js";
|
|
17
|
+
import { ServiceBusinessFeature } from "./service.feature.js";
|
|
18
|
+
|
|
19
|
+
export { AcceptQuoteContract, AcceptQuoteInputModel, ClientListPresentation, ClientModel, CompleteJobContract, CompleteJobInputModel, CreateClientContract, CreateClientInputModel, CreateQuoteContract, CreateQuoteInputModel, InvoiceListPresentation, InvoiceModel, IssueInvoiceContract, IssueInvoiceInputModel, JobBoardPresentation, JobModel, ListJobsInputModel, ListJobsOperation, ListJobsOutputModel, PaymentListPresentation, PaymentModel, QuoteDetailPresentation, QuoteListPresentation, QuoteModel, RecordPaymentContract, RecordPaymentInputModel, ScheduleJobContract, ScheduleJobInputModel, ServiceBusinessFeature, ServiceDashboardPresentation };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema387 from "@contractspec/lib.schema";
|
|
2
|
+
import * as _contractspec_lib_contracts27 from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/invoice/invoice.operations.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Issue an invoice.
|
|
7
|
+
*/
|
|
8
|
+
declare const IssueInvoiceContract: _contractspec_lib_contracts27.OperationSpec<_contractspec_lib_schema387.SchemaModel<{
|
|
9
|
+
jobId: {
|
|
10
|
+
type: _contractspec_lib_schema387.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
dueDate: {
|
|
14
|
+
type: _contractspec_lib_schema387.FieldType<Date, string>;
|
|
15
|
+
isOptional: true;
|
|
16
|
+
};
|
|
17
|
+
notes: {
|
|
18
|
+
type: _contractspec_lib_schema387.FieldType<string, string>;
|
|
19
|
+
isOptional: true;
|
|
20
|
+
};
|
|
21
|
+
lineItems: {
|
|
22
|
+
type: _contractspec_lib_schema387.FieldType<unknown, unknown>;
|
|
23
|
+
isOptional: true;
|
|
24
|
+
};
|
|
25
|
+
}>, _contractspec_lib_schema387.SchemaModel<{
|
|
26
|
+
id: {
|
|
27
|
+
type: _contractspec_lib_schema387.FieldType<string, string>;
|
|
28
|
+
isOptional: false;
|
|
29
|
+
};
|
|
30
|
+
jobId: {
|
|
31
|
+
type: _contractspec_lib_schema387.FieldType<string, string>;
|
|
32
|
+
isOptional: false;
|
|
33
|
+
};
|
|
34
|
+
invoiceNumber: {
|
|
35
|
+
type: _contractspec_lib_schema387.FieldType<string, string>;
|
|
36
|
+
isOptional: false;
|
|
37
|
+
};
|
|
38
|
+
amount: {
|
|
39
|
+
type: _contractspec_lib_schema387.FieldType<number, number>;
|
|
40
|
+
isOptional: false;
|
|
41
|
+
};
|
|
42
|
+
currency: {
|
|
43
|
+
type: _contractspec_lib_schema387.FieldType<string, string>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
status: {
|
|
47
|
+
type: _contractspec_lib_schema387.FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
dueDate: {
|
|
51
|
+
type: _contractspec_lib_schema387.FieldType<Date, string>;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
issuedAt: {
|
|
55
|
+
type: _contractspec_lib_schema387.FieldType<Date, string>;
|
|
56
|
+
isOptional: true;
|
|
57
|
+
};
|
|
58
|
+
paidAt: {
|
|
59
|
+
type: _contractspec_lib_schema387.FieldType<Date, string>;
|
|
60
|
+
isOptional: true;
|
|
61
|
+
};
|
|
62
|
+
}>, undefined>;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { IssueInvoiceContract };
|
|
65
|
+
//# sourceMappingURL=invoice.operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.operations.d.ts","names":[],"sources":["../../src/invoice/invoice.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAQa,oDAAoB,0CAAA;EAApB,KAAA,EAAA;IAqCX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;EArC+B,CAAA;;;;;;;;;;;UAAA,2BAAA,CAAA;;;EAAA,KAAA,EAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { InvoiceModel, IssueInvoiceInputModel } from "./invoice.schema.js";
|
|
2
|
+
import { defineCommand } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/invoice/invoice.operations.ts
|
|
5
|
+
const OWNERS = ["@examples.service-business-os"];
|
|
6
|
+
/**
|
|
7
|
+
* Issue an invoice.
|
|
8
|
+
*/
|
|
9
|
+
const IssueInvoiceContract = defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
key: "service.invoice.issue",
|
|
12
|
+
version: "1.0.0",
|
|
13
|
+
stability: "stable",
|
|
14
|
+
owners: [...OWNERS],
|
|
15
|
+
tags: [
|
|
16
|
+
"service-business-os",
|
|
17
|
+
"invoice",
|
|
18
|
+
"issue"
|
|
19
|
+
],
|
|
20
|
+
description: "Issue an invoice for a job.",
|
|
21
|
+
goal: "Bill clients.",
|
|
22
|
+
context: "Billing."
|
|
23
|
+
},
|
|
24
|
+
io: {
|
|
25
|
+
input: IssueInvoiceInputModel,
|
|
26
|
+
output: InvoiceModel
|
|
27
|
+
},
|
|
28
|
+
policy: { auth: "user" },
|
|
29
|
+
acceptance: {
|
|
30
|
+
scenarios: [{
|
|
31
|
+
key: "issue-invoice-happy-path",
|
|
32
|
+
given: ["Job is complete"],
|
|
33
|
+
when: ["User issues invoice"],
|
|
34
|
+
then: ["Invoice is created and sent"]
|
|
35
|
+
}],
|
|
36
|
+
examples: [{
|
|
37
|
+
key: "issue-standard",
|
|
38
|
+
input: {
|
|
39
|
+
jobId: "job-123",
|
|
40
|
+
dueDate: "2025-02-01",
|
|
41
|
+
items: [{
|
|
42
|
+
description: "Service",
|
|
43
|
+
amount: 100
|
|
44
|
+
}]
|
|
45
|
+
},
|
|
46
|
+
output: {
|
|
47
|
+
id: "inv-456",
|
|
48
|
+
status: "issued",
|
|
49
|
+
total: 100
|
|
50
|
+
}
|
|
51
|
+
}]
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { IssueInvoiceContract };
|
|
57
|
+
//# sourceMappingURL=invoice.operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema449 from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/invoice/invoice.schema.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Invoice issued for a job.
|
|
6
|
+
*/
|
|
7
|
+
declare const InvoiceModel: _contractspec_lib_schema449.SchemaModel<{
|
|
8
|
+
id: {
|
|
9
|
+
type: _contractspec_lib_schema449.FieldType<string, string>;
|
|
10
|
+
isOptional: false;
|
|
11
|
+
};
|
|
12
|
+
jobId: {
|
|
13
|
+
type: _contractspec_lib_schema449.FieldType<string, string>;
|
|
14
|
+
isOptional: false;
|
|
15
|
+
};
|
|
16
|
+
invoiceNumber: {
|
|
17
|
+
type: _contractspec_lib_schema449.FieldType<string, string>;
|
|
18
|
+
isOptional: false;
|
|
19
|
+
};
|
|
20
|
+
amount: {
|
|
21
|
+
type: _contractspec_lib_schema449.FieldType<number, number>;
|
|
22
|
+
isOptional: false;
|
|
23
|
+
};
|
|
24
|
+
currency: {
|
|
25
|
+
type: _contractspec_lib_schema449.FieldType<string, string>;
|
|
26
|
+
isOptional: false;
|
|
27
|
+
};
|
|
28
|
+
status: {
|
|
29
|
+
type: _contractspec_lib_schema449.FieldType<string, string>;
|
|
30
|
+
isOptional: false;
|
|
31
|
+
};
|
|
32
|
+
dueDate: {
|
|
33
|
+
type: _contractspec_lib_schema449.FieldType<Date, string>;
|
|
34
|
+
isOptional: true;
|
|
35
|
+
};
|
|
36
|
+
issuedAt: {
|
|
37
|
+
type: _contractspec_lib_schema449.FieldType<Date, string>;
|
|
38
|
+
isOptional: true;
|
|
39
|
+
};
|
|
40
|
+
paidAt: {
|
|
41
|
+
type: _contractspec_lib_schema449.FieldType<Date, string>;
|
|
42
|
+
isOptional: true;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Input for issuing an invoice.
|
|
47
|
+
*/
|
|
48
|
+
declare const IssueInvoiceInputModel: _contractspec_lib_schema449.SchemaModel<{
|
|
49
|
+
jobId: {
|
|
50
|
+
type: _contractspec_lib_schema449.FieldType<string, string>;
|
|
51
|
+
isOptional: false;
|
|
52
|
+
};
|
|
53
|
+
dueDate: {
|
|
54
|
+
type: _contractspec_lib_schema449.FieldType<Date, string>;
|
|
55
|
+
isOptional: true;
|
|
56
|
+
};
|
|
57
|
+
notes: {
|
|
58
|
+
type: _contractspec_lib_schema449.FieldType<string, string>;
|
|
59
|
+
isOptional: true;
|
|
60
|
+
};
|
|
61
|
+
lineItems: {
|
|
62
|
+
type: _contractspec_lib_schema449.FieldType<unknown, unknown>;
|
|
63
|
+
isOptional: true;
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { InvoiceModel, IssueInvoiceInputModel };
|
|
68
|
+
//# sourceMappingURL=invoice.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.schema.d.ts","names":[],"sources":["../../src/invoice/invoice.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,YAiBX,8BAjBuB,WAiBvB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;;;;;IAjBuB,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAsBZ,UAAA,EAAA,KAAA;EASX,CAAA;;;;;;IATiC,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAAtB,oDAAsB;;UASjC,2BAAA,CAAA"}
|