@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
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { defineEntity, defineEntityEnum, field, index } from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/entities/index.ts
|
|
4
|
+
const schema = "lssm_service_os";
|
|
5
|
+
const QuoteStatusEnum = defineEntityEnum({
|
|
6
|
+
name: "QuoteStatus",
|
|
7
|
+
schema,
|
|
8
|
+
values: [
|
|
9
|
+
"DRAFT",
|
|
10
|
+
"SENT",
|
|
11
|
+
"ACCEPTED",
|
|
12
|
+
"REJECTED",
|
|
13
|
+
"EXPIRED"
|
|
14
|
+
],
|
|
15
|
+
description: "Lifecycle for quotes/proposals."
|
|
16
|
+
});
|
|
17
|
+
const JobStatusEnum = defineEntityEnum({
|
|
18
|
+
name: "JobStatus",
|
|
19
|
+
schema,
|
|
20
|
+
values: [
|
|
21
|
+
"SCHEDULED",
|
|
22
|
+
"IN_PROGRESS",
|
|
23
|
+
"COMPLETED",
|
|
24
|
+
"CANCELLED"
|
|
25
|
+
],
|
|
26
|
+
description: "Lifecycle for service jobs/interventions."
|
|
27
|
+
});
|
|
28
|
+
const InvoiceStatusEnum = defineEntityEnum({
|
|
29
|
+
name: "InvoiceStatus",
|
|
30
|
+
schema,
|
|
31
|
+
values: [
|
|
32
|
+
"DRAFT",
|
|
33
|
+
"SENT",
|
|
34
|
+
"PAID",
|
|
35
|
+
"OVERDUE",
|
|
36
|
+
"CANCELLED"
|
|
37
|
+
],
|
|
38
|
+
description: "Lifecycle for invoices."
|
|
39
|
+
});
|
|
40
|
+
const PaymentMethodEnum = defineEntityEnum({
|
|
41
|
+
name: "PaymentMethod",
|
|
42
|
+
schema,
|
|
43
|
+
values: [
|
|
44
|
+
"CARD",
|
|
45
|
+
"BANK_TRANSFER",
|
|
46
|
+
"CASH",
|
|
47
|
+
"CHECK"
|
|
48
|
+
],
|
|
49
|
+
description: "Payment method used."
|
|
50
|
+
});
|
|
51
|
+
const ClientEntity = defineEntity({
|
|
52
|
+
name: "Client",
|
|
53
|
+
description: "Customer organization or individual.",
|
|
54
|
+
schema,
|
|
55
|
+
map: "client",
|
|
56
|
+
fields: {
|
|
57
|
+
id: field.id({ description: "Unique client identifier" }),
|
|
58
|
+
name: field.string({ description: "Client display name" }),
|
|
59
|
+
contactEmail: field.string({
|
|
60
|
+
description: "Primary contact email",
|
|
61
|
+
isOptional: true
|
|
62
|
+
}),
|
|
63
|
+
phone: field.string({
|
|
64
|
+
description: "Primary phone",
|
|
65
|
+
isOptional: true
|
|
66
|
+
}),
|
|
67
|
+
address: field.json({
|
|
68
|
+
description: "Mailing address",
|
|
69
|
+
isOptional: true
|
|
70
|
+
}),
|
|
71
|
+
industry: field.string({
|
|
72
|
+
description: "Industry/vertical",
|
|
73
|
+
isOptional: true
|
|
74
|
+
}),
|
|
75
|
+
orgId: field.string({ description: "Owning organization" }),
|
|
76
|
+
ownerId: field.string({ description: "Account owner" }),
|
|
77
|
+
metadata: field.json({
|
|
78
|
+
description: "Additional metadata",
|
|
79
|
+
isOptional: true
|
|
80
|
+
}),
|
|
81
|
+
createdAt: field.createdAt(),
|
|
82
|
+
updatedAt: field.updatedAt(),
|
|
83
|
+
quotes: field.hasMany("Quote"),
|
|
84
|
+
jobs: field.hasMany("Job")
|
|
85
|
+
},
|
|
86
|
+
indexes: [
|
|
87
|
+
index.on(["orgId"]),
|
|
88
|
+
index.on(["ownerId"]),
|
|
89
|
+
index.on(["name"])
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
const QuoteEntity = defineEntity({
|
|
93
|
+
name: "Quote",
|
|
94
|
+
description: "Proposal/quote for a job.",
|
|
95
|
+
schema,
|
|
96
|
+
map: "quote",
|
|
97
|
+
fields: {
|
|
98
|
+
id: field.id({ description: "Unique quote identifier" }),
|
|
99
|
+
clientId: field.foreignKey({ description: "Client receiving quote" }),
|
|
100
|
+
title: field.string({ description: "Quote title" }),
|
|
101
|
+
description: field.string({
|
|
102
|
+
description: "Work summary",
|
|
103
|
+
isOptional: true
|
|
104
|
+
}),
|
|
105
|
+
amount: field.float({ description: "Total quoted amount" }),
|
|
106
|
+
currency: field.string({
|
|
107
|
+
description: "Currency code",
|
|
108
|
+
default: "\"USD\""
|
|
109
|
+
}),
|
|
110
|
+
status: field.enum("QuoteStatus", {
|
|
111
|
+
description: "Quote status",
|
|
112
|
+
default: "DRAFT"
|
|
113
|
+
}),
|
|
114
|
+
validUntil: field.dateTime({
|
|
115
|
+
description: "Expiration date",
|
|
116
|
+
isOptional: true
|
|
117
|
+
}),
|
|
118
|
+
terms: field.string({
|
|
119
|
+
description: "Payment/engagement terms",
|
|
120
|
+
isOptional: true
|
|
121
|
+
}),
|
|
122
|
+
orgId: field.string({ description: "Owning organization" }),
|
|
123
|
+
ownerId: field.string({ description: "Account owner" }),
|
|
124
|
+
createdAt: field.createdAt(),
|
|
125
|
+
updatedAt: field.updatedAt(),
|
|
126
|
+
client: field.belongsTo("Client", ["clientId"], ["id"], { onDelete: "Cascade" }),
|
|
127
|
+
jobs: field.hasMany("Job")
|
|
128
|
+
},
|
|
129
|
+
enums: [QuoteStatusEnum],
|
|
130
|
+
indexes: [
|
|
131
|
+
index.on(["orgId", "status"]),
|
|
132
|
+
index.on(["clientId"]),
|
|
133
|
+
index.on(["validUntil"])
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
const JobEntity = defineEntity({
|
|
137
|
+
name: "Job",
|
|
138
|
+
description: "Service job/intervention derived from an accepted quote.",
|
|
139
|
+
schema,
|
|
140
|
+
map: "job",
|
|
141
|
+
fields: {
|
|
142
|
+
id: field.id({ description: "Unique job identifier" }),
|
|
143
|
+
quoteId: field.foreignKey({ description: "Source quote" }),
|
|
144
|
+
clientId: field.foreignKey({ description: "Client receiving service" }),
|
|
145
|
+
title: field.string({ description: "Job title" }),
|
|
146
|
+
status: field.enum("JobStatus", {
|
|
147
|
+
description: "Job status",
|
|
148
|
+
default: "SCHEDULED"
|
|
149
|
+
}),
|
|
150
|
+
scheduledAt: field.dateTime({
|
|
151
|
+
description: "Scheduled start date/time",
|
|
152
|
+
isOptional: true
|
|
153
|
+
}),
|
|
154
|
+
completedAt: field.dateTime({
|
|
155
|
+
description: "Completion timestamp",
|
|
156
|
+
isOptional: true
|
|
157
|
+
}),
|
|
158
|
+
assignedTo: field.string({
|
|
159
|
+
description: "Assignee/technician user ID",
|
|
160
|
+
isOptional: true
|
|
161
|
+
}),
|
|
162
|
+
location: field.json({
|
|
163
|
+
description: "Location details",
|
|
164
|
+
isOptional: true
|
|
165
|
+
}),
|
|
166
|
+
notes: field.string({
|
|
167
|
+
description: "Internal notes",
|
|
168
|
+
isOptional: true
|
|
169
|
+
}),
|
|
170
|
+
orgId: field.string({ description: "Owning organization" }),
|
|
171
|
+
createdAt: field.createdAt(),
|
|
172
|
+
updatedAt: field.updatedAt(),
|
|
173
|
+
quote: field.belongsTo("Quote", ["quoteId"], ["id"], { onDelete: "SetNull" }),
|
|
174
|
+
client: field.belongsTo("Client", ["clientId"], ["id"], { onDelete: "Cascade" }),
|
|
175
|
+
invoices: field.hasMany("Invoice")
|
|
176
|
+
},
|
|
177
|
+
enums: [JobStatusEnum],
|
|
178
|
+
indexes: [
|
|
179
|
+
index.on(["orgId", "status"]),
|
|
180
|
+
index.on(["clientId"]),
|
|
181
|
+
index.on(["assignedTo", "status"]),
|
|
182
|
+
index.on(["scheduledAt"])
|
|
183
|
+
]
|
|
184
|
+
});
|
|
185
|
+
const InvoiceEntity = defineEntity({
|
|
186
|
+
name: "Invoice",
|
|
187
|
+
description: "Invoice issued for a completed job.",
|
|
188
|
+
schema,
|
|
189
|
+
map: "invoice",
|
|
190
|
+
fields: {
|
|
191
|
+
id: field.id({ description: "Unique invoice identifier" }),
|
|
192
|
+
jobId: field.foreignKey({ description: "Related job" }),
|
|
193
|
+
invoiceNumber: field.string({
|
|
194
|
+
description: "Invoice number",
|
|
195
|
+
isUnique: true
|
|
196
|
+
}),
|
|
197
|
+
amount: field.decimal({ description: "Invoice amount" }),
|
|
198
|
+
currency: field.string({
|
|
199
|
+
description: "Currency code",
|
|
200
|
+
default: "\"USD\""
|
|
201
|
+
}),
|
|
202
|
+
status: field.enum("InvoiceStatus", {
|
|
203
|
+
description: "Invoice status",
|
|
204
|
+
default: "DRAFT"
|
|
205
|
+
}),
|
|
206
|
+
dueDate: field.dateTime({
|
|
207
|
+
description: "Due date",
|
|
208
|
+
isOptional: true
|
|
209
|
+
}),
|
|
210
|
+
issuedAt: field.dateTime({
|
|
211
|
+
description: "Issued timestamp",
|
|
212
|
+
isOptional: true
|
|
213
|
+
}),
|
|
214
|
+
paidAt: field.dateTime({
|
|
215
|
+
description: "Paid timestamp",
|
|
216
|
+
isOptional: true
|
|
217
|
+
}),
|
|
218
|
+
orgId: field.string({ description: "Owning organization" }),
|
|
219
|
+
notes: field.string({
|
|
220
|
+
description: "Invoice notes",
|
|
221
|
+
isOptional: true
|
|
222
|
+
}),
|
|
223
|
+
metadata: field.json({
|
|
224
|
+
description: "Metadata",
|
|
225
|
+
isOptional: true
|
|
226
|
+
}),
|
|
227
|
+
createdAt: field.createdAt(),
|
|
228
|
+
updatedAt: field.updatedAt(),
|
|
229
|
+
job: field.belongsTo("Job", ["jobId"], ["id"], { onDelete: "Cascade" }),
|
|
230
|
+
payments: field.hasMany("Payment")
|
|
231
|
+
},
|
|
232
|
+
enums: [InvoiceStatusEnum],
|
|
233
|
+
indexes: [
|
|
234
|
+
index.on(["invoiceNumber"]),
|
|
235
|
+
index.on(["orgId", "status"]),
|
|
236
|
+
index.on(["dueDate"])
|
|
237
|
+
]
|
|
238
|
+
});
|
|
239
|
+
const PaymentEntity = defineEntity({
|
|
240
|
+
name: "Payment",
|
|
241
|
+
description: "Payment received for an invoice.",
|
|
242
|
+
schema,
|
|
243
|
+
map: "payment",
|
|
244
|
+
fields: {
|
|
245
|
+
id: field.id({ description: "Unique payment identifier" }),
|
|
246
|
+
invoiceId: field.foreignKey({ description: "Invoice being paid" }),
|
|
247
|
+
amount: field.decimal({ description: "Payment amount" }),
|
|
248
|
+
currency: field.string({
|
|
249
|
+
description: "Currency code",
|
|
250
|
+
default: "\"USD\""
|
|
251
|
+
}),
|
|
252
|
+
method: field.enum("PaymentMethod", { description: "Payment method" }),
|
|
253
|
+
reference: field.string({
|
|
254
|
+
description: "Payment reference/transaction ID",
|
|
255
|
+
isOptional: true
|
|
256
|
+
}),
|
|
257
|
+
receivedAt: field.dateTime({ description: "When payment was received" }),
|
|
258
|
+
orgId: field.string({ description: "Owning organization" }),
|
|
259
|
+
createdAt: field.createdAt(),
|
|
260
|
+
invoice: field.belongsTo("Invoice", ["invoiceId"], ["id"], { onDelete: "Cascade" })
|
|
261
|
+
},
|
|
262
|
+
enums: [PaymentMethodEnum],
|
|
263
|
+
indexes: [
|
|
264
|
+
index.on(["invoiceId"]),
|
|
265
|
+
index.on(["orgId"]),
|
|
266
|
+
index.on(["receivedAt"])
|
|
267
|
+
]
|
|
268
|
+
});
|
|
269
|
+
const serviceBusinessEntities = [
|
|
270
|
+
ClientEntity,
|
|
271
|
+
QuoteEntity,
|
|
272
|
+
JobEntity,
|
|
273
|
+
InvoiceEntity,
|
|
274
|
+
PaymentEntity
|
|
275
|
+
];
|
|
276
|
+
const serviceBusinessSchemaContribution = {
|
|
277
|
+
moduleId: "@contractspec/example.service-business-os",
|
|
278
|
+
entities: serviceBusinessEntities,
|
|
279
|
+
enums: [
|
|
280
|
+
QuoteStatusEnum,
|
|
281
|
+
JobStatusEnum,
|
|
282
|
+
InvoiceStatusEnum,
|
|
283
|
+
PaymentMethodEnum
|
|
284
|
+
]
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
//#endregion
|
|
288
|
+
export { ClientEntity, InvoiceEntity, InvoiceStatusEnum, JobEntity, JobStatusEnum, PaymentEntity, PaymentMethodEnum, QuoteEntity, QuoteStatusEnum, serviceBusinessEntities, serviceBusinessSchemaContribution };
|
|
289
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,gBAAgB,iBAAiB;CAC5C,MAAM;CACN;CACA,QAAQ;EAAC;EAAa;EAAe;EAAa;EAAY;CAC9D,aAAa;CACd,CAAC;AAEF,MAAa,oBAAoB,iBAAiB;CAChD,MAAM;CACN;CACA,QAAQ;EAAC;EAAS;EAAQ;EAAQ;EAAW;EAAY;CACzD,aAAa;CACd,CAAC;AAEF,MAAa,oBAAoB,iBAAiB;CAChD,MAAM;CACN;CACA,QAAQ;EAAC;EAAQ;EAAiB;EAAQ;EAAQ;CAClD,aAAa;CACd,CAAC;AAEF,MAAa,eAAe,aAAa;CACvC,MAAM;CACN,aAAa;CACb;CACA,KAAK;CACL,QAAQ;EACN,IAAI,MAAM,GAAG,EAAE,aAAa,4B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C;EAAiB;EAAe;EAAmB;EAAkB;CAC9E"}
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema22 from "@contractspec/lib.schema";
|
|
2
|
+
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/events.d.ts
|
|
5
|
+
declare const QuoteSentEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
6
|
+
quoteId: {
|
|
7
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
8
|
+
isOptional: false;
|
|
9
|
+
};
|
|
10
|
+
clientId: {
|
|
11
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
12
|
+
isOptional: false;
|
|
13
|
+
};
|
|
14
|
+
amount: {
|
|
15
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
16
|
+
isOptional: false;
|
|
17
|
+
};
|
|
18
|
+
status: {
|
|
19
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
20
|
+
isOptional: false;
|
|
21
|
+
};
|
|
22
|
+
orgId: {
|
|
23
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
24
|
+
isOptional: false;
|
|
25
|
+
};
|
|
26
|
+
occurredAt: {
|
|
27
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
28
|
+
isOptional: false;
|
|
29
|
+
};
|
|
30
|
+
}>>;
|
|
31
|
+
declare const QuoteAcceptedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
32
|
+
quoteId: {
|
|
33
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
34
|
+
isOptional: false;
|
|
35
|
+
};
|
|
36
|
+
clientId: {
|
|
37
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
38
|
+
isOptional: false;
|
|
39
|
+
};
|
|
40
|
+
amount: {
|
|
41
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
42
|
+
isOptional: false;
|
|
43
|
+
};
|
|
44
|
+
status: {
|
|
45
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
46
|
+
isOptional: false;
|
|
47
|
+
};
|
|
48
|
+
orgId: {
|
|
49
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
50
|
+
isOptional: false;
|
|
51
|
+
};
|
|
52
|
+
occurredAt: {
|
|
53
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
54
|
+
isOptional: false;
|
|
55
|
+
};
|
|
56
|
+
}>>;
|
|
57
|
+
declare const JobScheduledEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
58
|
+
jobId: {
|
|
59
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
quoteId: {
|
|
63
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
64
|
+
isOptional: true;
|
|
65
|
+
};
|
|
66
|
+
clientId: {
|
|
67
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
68
|
+
isOptional: true;
|
|
69
|
+
};
|
|
70
|
+
status: {
|
|
71
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
72
|
+
isOptional: false;
|
|
73
|
+
};
|
|
74
|
+
scheduledAt: {
|
|
75
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
76
|
+
isOptional: true;
|
|
77
|
+
};
|
|
78
|
+
orgId: {
|
|
79
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
80
|
+
isOptional: false;
|
|
81
|
+
};
|
|
82
|
+
occurredAt: {
|
|
83
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
84
|
+
isOptional: false;
|
|
85
|
+
};
|
|
86
|
+
}>>;
|
|
87
|
+
declare const JobCompletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
88
|
+
jobId: {
|
|
89
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
90
|
+
isOptional: false;
|
|
91
|
+
};
|
|
92
|
+
quoteId: {
|
|
93
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
94
|
+
isOptional: true;
|
|
95
|
+
};
|
|
96
|
+
clientId: {
|
|
97
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
98
|
+
isOptional: true;
|
|
99
|
+
};
|
|
100
|
+
status: {
|
|
101
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
102
|
+
isOptional: false;
|
|
103
|
+
};
|
|
104
|
+
scheduledAt: {
|
|
105
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
106
|
+
isOptional: true;
|
|
107
|
+
};
|
|
108
|
+
orgId: {
|
|
109
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
110
|
+
isOptional: false;
|
|
111
|
+
};
|
|
112
|
+
occurredAt: {
|
|
113
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
114
|
+
isOptional: false;
|
|
115
|
+
};
|
|
116
|
+
}>>;
|
|
117
|
+
declare const InvoiceIssuedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
118
|
+
invoiceId: {
|
|
119
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
120
|
+
isOptional: false;
|
|
121
|
+
};
|
|
122
|
+
jobId: {
|
|
123
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
124
|
+
isOptional: false;
|
|
125
|
+
};
|
|
126
|
+
amount: {
|
|
127
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
128
|
+
isOptional: false;
|
|
129
|
+
};
|
|
130
|
+
status: {
|
|
131
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
132
|
+
isOptional: false;
|
|
133
|
+
};
|
|
134
|
+
orgId: {
|
|
135
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
136
|
+
isOptional: false;
|
|
137
|
+
};
|
|
138
|
+
occurredAt: {
|
|
139
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
140
|
+
isOptional: false;
|
|
141
|
+
};
|
|
142
|
+
}>>;
|
|
143
|
+
declare const PaymentReceivedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
144
|
+
paymentId: {
|
|
145
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
146
|
+
isOptional: false;
|
|
147
|
+
};
|
|
148
|
+
invoiceId: {
|
|
149
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
150
|
+
isOptional: false;
|
|
151
|
+
};
|
|
152
|
+
amount: {
|
|
153
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
154
|
+
isOptional: false;
|
|
155
|
+
};
|
|
156
|
+
method: {
|
|
157
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
158
|
+
isOptional: false;
|
|
159
|
+
};
|
|
160
|
+
orgId: {
|
|
161
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
162
|
+
isOptional: false;
|
|
163
|
+
};
|
|
164
|
+
receivedAt: {
|
|
165
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
166
|
+
isOptional: false;
|
|
167
|
+
};
|
|
168
|
+
}>>;
|
|
169
|
+
declare const ServiceBusinessEvents: {
|
|
170
|
+
QuoteSentEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
171
|
+
quoteId: {
|
|
172
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
173
|
+
isOptional: false;
|
|
174
|
+
};
|
|
175
|
+
clientId: {
|
|
176
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
177
|
+
isOptional: false;
|
|
178
|
+
};
|
|
179
|
+
amount: {
|
|
180
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
181
|
+
isOptional: false;
|
|
182
|
+
};
|
|
183
|
+
status: {
|
|
184
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
185
|
+
isOptional: false;
|
|
186
|
+
};
|
|
187
|
+
orgId: {
|
|
188
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
189
|
+
isOptional: false;
|
|
190
|
+
};
|
|
191
|
+
occurredAt: {
|
|
192
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
193
|
+
isOptional: false;
|
|
194
|
+
};
|
|
195
|
+
}>>;
|
|
196
|
+
QuoteAcceptedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
197
|
+
quoteId: {
|
|
198
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
199
|
+
isOptional: false;
|
|
200
|
+
};
|
|
201
|
+
clientId: {
|
|
202
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
203
|
+
isOptional: false;
|
|
204
|
+
};
|
|
205
|
+
amount: {
|
|
206
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
207
|
+
isOptional: false;
|
|
208
|
+
};
|
|
209
|
+
status: {
|
|
210
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
211
|
+
isOptional: false;
|
|
212
|
+
};
|
|
213
|
+
orgId: {
|
|
214
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
215
|
+
isOptional: false;
|
|
216
|
+
};
|
|
217
|
+
occurredAt: {
|
|
218
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
219
|
+
isOptional: false;
|
|
220
|
+
};
|
|
221
|
+
}>>;
|
|
222
|
+
JobScheduledEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
223
|
+
jobId: {
|
|
224
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
225
|
+
isOptional: false;
|
|
226
|
+
};
|
|
227
|
+
quoteId: {
|
|
228
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
229
|
+
isOptional: true;
|
|
230
|
+
};
|
|
231
|
+
clientId: {
|
|
232
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
233
|
+
isOptional: true;
|
|
234
|
+
};
|
|
235
|
+
status: {
|
|
236
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
237
|
+
isOptional: false;
|
|
238
|
+
};
|
|
239
|
+
scheduledAt: {
|
|
240
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
241
|
+
isOptional: true;
|
|
242
|
+
};
|
|
243
|
+
orgId: {
|
|
244
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
245
|
+
isOptional: false;
|
|
246
|
+
};
|
|
247
|
+
occurredAt: {
|
|
248
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
249
|
+
isOptional: false;
|
|
250
|
+
};
|
|
251
|
+
}>>;
|
|
252
|
+
JobCompletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
253
|
+
jobId: {
|
|
254
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
255
|
+
isOptional: false;
|
|
256
|
+
};
|
|
257
|
+
quoteId: {
|
|
258
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
259
|
+
isOptional: true;
|
|
260
|
+
};
|
|
261
|
+
clientId: {
|
|
262
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
263
|
+
isOptional: true;
|
|
264
|
+
};
|
|
265
|
+
status: {
|
|
266
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
267
|
+
isOptional: false;
|
|
268
|
+
};
|
|
269
|
+
scheduledAt: {
|
|
270
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
271
|
+
isOptional: true;
|
|
272
|
+
};
|
|
273
|
+
orgId: {
|
|
274
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
275
|
+
isOptional: false;
|
|
276
|
+
};
|
|
277
|
+
occurredAt: {
|
|
278
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
279
|
+
isOptional: false;
|
|
280
|
+
};
|
|
281
|
+
}>>;
|
|
282
|
+
InvoiceIssuedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
283
|
+
invoiceId: {
|
|
284
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
285
|
+
isOptional: false;
|
|
286
|
+
};
|
|
287
|
+
jobId: {
|
|
288
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
289
|
+
isOptional: false;
|
|
290
|
+
};
|
|
291
|
+
amount: {
|
|
292
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
293
|
+
isOptional: false;
|
|
294
|
+
};
|
|
295
|
+
status: {
|
|
296
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
297
|
+
isOptional: false;
|
|
298
|
+
};
|
|
299
|
+
orgId: {
|
|
300
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
301
|
+
isOptional: false;
|
|
302
|
+
};
|
|
303
|
+
occurredAt: {
|
|
304
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
305
|
+
isOptional: false;
|
|
306
|
+
};
|
|
307
|
+
}>>;
|
|
308
|
+
PaymentReceivedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema22.SchemaModel<{
|
|
309
|
+
paymentId: {
|
|
310
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
311
|
+
isOptional: false;
|
|
312
|
+
};
|
|
313
|
+
invoiceId: {
|
|
314
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
315
|
+
isOptional: false;
|
|
316
|
+
};
|
|
317
|
+
amount: {
|
|
318
|
+
type: _contractspec_lib_schema22.FieldType<number, number>;
|
|
319
|
+
isOptional: false;
|
|
320
|
+
};
|
|
321
|
+
method: {
|
|
322
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
323
|
+
isOptional: false;
|
|
324
|
+
};
|
|
325
|
+
orgId: {
|
|
326
|
+
type: _contractspec_lib_schema22.FieldType<string, string>;
|
|
327
|
+
isOptional: false;
|
|
328
|
+
};
|
|
329
|
+
receivedAt: {
|
|
330
|
+
type: _contractspec_lib_schema22.FieldType<Date, string>;
|
|
331
|
+
isOptional: false;
|
|
332
|
+
};
|
|
333
|
+
}>>;
|
|
334
|
+
};
|
|
335
|
+
//#endregion
|
|
336
|
+
export { InvoiceIssuedEvent, JobCompletedEvent, JobScheduledEvent, PaymentReceivedEvent, QuoteAcceptedEvent, QuoteSentEvent, ServiceBusinessEvents };
|
|
337
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","names":[],"sources":["../src/events.ts"],"sourcesContent":[],"mappings":";;;;cAwDa,gBAAc,4BAAA,CAAA,qCAAA;;UAUzB,0BAAA,CAAA;;EAVW,CAAA;EAUX,QAAA,EAAA;;;;;;;;EAVyB,MAAA,EAAA;IAAA,IAAA,sCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAYd,UAAA,EAAA,KAUX;EAAA,CAAA;;;;;;;;EAV6B,CAAA;CAAA,CAAA,CAAA;AAYlB,cAZA,kBAsBX,EAtB6B,4BAAA,CAAA,SAsB7B,4BAtB6B,WAsB7B,CAAA;EAAA,OAAA,EAAA;UAZA,0BAAA,CAAA;;;;;;;;8CAE4B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAAA,CAAA;EAYjB,MAAA,EAAA;IAUX,IAAA,sCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;EAV4B,CAAA;CAAA,CAAA,CAAA;AAYjB,cAxBA,iBAkCX,EAlC4B,4BAAA,CAAA,SAkC5B,4BAlC4B,WAkC5B,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