@contractspec/example.service-business-os 3.7.17 → 3.7.18
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/dist/browser/client/client.operations.js +1 -72
- package/dist/browser/client/client.schema.js +1 -31
- package/dist/browser/client/index.js +1 -74
- package/dist/browser/docs/index.js +5 -49
- package/dist/browser/docs/service-business-os.docblock.js +5 -49
- package/dist/browser/entities/index.js +1 -246
- package/dist/browser/events.js +1 -135
- package/dist/browser/example.js +1 -39
- package/dist/browser/handlers/index.js +1 -5
- package/dist/browser/index.js +1 -766
- package/dist/browser/invoice/index.js +1 -77
- package/dist/browser/invoice/invoice.operations.js +1 -75
- package/dist/browser/invoice/invoice.schema.js +1 -34
- package/dist/browser/job/index.js +1 -175
- package/dist/browser/job/job.operations.js +1 -172
- package/dist/browser/job/job.schema.js +1 -41
- package/dist/browser/operations/index.js +1 -506
- package/dist/browser/payment/index.js +1 -69
- package/dist/browser/payment/payment.operations.js +1 -67
- package/dist/browser/payment/payment.schema.js +1 -30
- package/dist/browser/presentations/index.js +1 -13
- package/dist/browser/presentations.js +1 -175
- package/dist/browser/quote/index.js +1 -122
- package/dist/browser/quote/quote.operations.js +1 -119
- package/dist/browser/quote/quote.schema.js +1 -45
- package/dist/browser/service-business-os.capability.js +1 -31
- package/dist/browser/service.feature.js +1 -85
- package/dist/client/client.operations.js +1 -72
- package/dist/client/client.schema.js +1 -31
- package/dist/client/index.js +1 -74
- package/dist/docs/index.js +5 -49
- package/dist/docs/service-business-os.docblock.js +5 -49
- package/dist/entities/index.js +1 -246
- package/dist/events.js +1 -135
- package/dist/example.js +1 -39
- package/dist/handlers/index.js +1 -5
- package/dist/index.js +1 -766
- package/dist/invoice/index.js +1 -77
- package/dist/invoice/invoice.operations.js +1 -75
- package/dist/invoice/invoice.schema.js +1 -34
- package/dist/job/index.js +1 -175
- package/dist/job/job.operations.js +1 -172
- package/dist/job/job.schema.js +1 -41
- package/dist/node/client/client.operations.js +1 -72
- package/dist/node/client/client.schema.js +1 -31
- package/dist/node/client/index.js +1 -74
- package/dist/node/docs/index.js +5 -49
- package/dist/node/docs/service-business-os.docblock.js +5 -49
- package/dist/node/entities/index.js +1 -246
- package/dist/node/events.js +1 -135
- package/dist/node/example.js +1 -39
- package/dist/node/handlers/index.js +1 -5
- package/dist/node/index.js +1 -766
- package/dist/node/invoice/index.js +1 -77
- package/dist/node/invoice/invoice.operations.js +1 -75
- package/dist/node/invoice/invoice.schema.js +1 -34
- package/dist/node/job/index.js +1 -175
- package/dist/node/job/job.operations.js +1 -172
- package/dist/node/job/job.schema.js +1 -41
- package/dist/node/operations/index.js +1 -506
- package/dist/node/payment/index.js +1 -69
- package/dist/node/payment/payment.operations.js +1 -67
- package/dist/node/payment/payment.schema.js +1 -30
- package/dist/node/presentations/index.js +1 -13
- package/dist/node/presentations.js +1 -175
- package/dist/node/quote/index.js +1 -122
- package/dist/node/quote/quote.operations.js +1 -119
- package/dist/node/quote/quote.schema.js +1 -45
- package/dist/node/service-business-os.capability.js +1 -31
- package/dist/node/service.feature.js +1 -85
- package/dist/operations/index.js +1 -506
- package/dist/payment/index.js +1 -69
- package/dist/payment/payment.operations.js +1 -67
- package/dist/payment/payment.schema.js +1 -30
- package/dist/presentations/index.js +1 -13
- package/dist/presentations.js +1 -175
- package/dist/quote/index.js +1 -122
- package/dist/quote/quote.operations.js +1 -119
- package/dist/quote/quote.schema.js +1 -45
- package/dist/service-business-os.capability.js +1 -31
- package/dist/service.feature.js +1 -85
- package/package.json +5 -5
|
@@ -1,30 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
3
|
-
var PaymentModel = defineSchemaModel({
|
|
4
|
-
name: "Payment",
|
|
5
|
-
description: "Payment applied to invoice",
|
|
6
|
-
fields: {
|
|
7
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
8
|
-
invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
10
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
-
method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
-
reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
13
|
-
receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
var RecordPaymentInputModel = defineSchemaModel({
|
|
17
|
-
name: "RecordPaymentInput",
|
|
18
|
-
description: "Input for recording a payment",
|
|
19
|
-
fields: {
|
|
20
|
-
invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
22
|
-
method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
-
reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
24
|
-
receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
RecordPaymentInputModel,
|
|
29
|
-
PaymentModel
|
|
30
|
-
};
|
|
1
|
+
import{defineSchemaModel as k,ScalarTypeEnum as j}from"@contractspec/lib.schema";var v=k({name:"Payment",description:"Payment applied to invoice",fields:{id:{type:j.String_unsecure(),isOptional:!1},invoiceId:{type:j.String_unsecure(),isOptional:!1},amount:{type:j.Float_unsecure(),isOptional:!1},currency:{type:j.String_unsecure(),isOptional:!1},method:{type:j.String_unsecure(),isOptional:!1},reference:{type:j.String_unsecure(),isOptional:!0},receivedAt:{type:j.DateTime(),isOptional:!1}}}),w=k({name:"RecordPaymentInput",description:"Input for recording a payment",fields:{invoiceId:{type:j.String_unsecure(),isOptional:!1},amount:{type:j.Float_unsecure(),isOptional:!1},method:{type:j.String_unsecure(),isOptional:!1},reference:{type:j.String_unsecure(),isOptional:!0},receivedAt:{type:j.DateTime(),isOptional:!0}}});export{w as RecordPaymentInputModel,v as PaymentModel};
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var ServiceBusinessPresentations = [
|
|
3
|
-
"service-business-os.dashboard",
|
|
4
|
-
"service-business-os.client.list",
|
|
5
|
-
"service-business-os.quote.list",
|
|
6
|
-
"service-business-os.quote.detail",
|
|
7
|
-
"service-business-os.job.board",
|
|
8
|
-
"service-business-os.invoice.list",
|
|
9
|
-
"service-business-os.payment.list"
|
|
10
|
-
];
|
|
11
|
-
export {
|
|
12
|
-
ServiceBusinessPresentations
|
|
13
|
-
};
|
|
1
|
+
var s=["service-business-os.dashboard","service-business-os.client.list","service-business-os.quote.list","service-business-os.quote.detail","service-business-os.job.board","service-business-os.invoice.list","service-business-os.payment.list"];export{s as ServiceBusinessPresentations};
|
|
@@ -1,175 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
definePresentation,
|
|
4
|
-
StabilityEnum
|
|
5
|
-
} from "@contractspec/lib.contracts-spec";
|
|
6
|
-
var ServiceDashboardPresentation = definePresentation({
|
|
7
|
-
meta: {
|
|
8
|
-
key: "service-business-os.dashboard",
|
|
9
|
-
version: "1.0.0",
|
|
10
|
-
title: "Service Dashboard",
|
|
11
|
-
description: "Service business dashboard with overview metrics",
|
|
12
|
-
domain: "services",
|
|
13
|
-
owners: ["@service-os"],
|
|
14
|
-
tags: ["services", "dashboard"],
|
|
15
|
-
stability: StabilityEnum.Experimental,
|
|
16
|
-
goal: "Overview of service business metrics",
|
|
17
|
-
context: "Service home page"
|
|
18
|
-
},
|
|
19
|
-
source: {
|
|
20
|
-
type: "component",
|
|
21
|
-
framework: "react",
|
|
22
|
-
componentKey: "ServiceDashboard"
|
|
23
|
-
},
|
|
24
|
-
targets: ["react", "markdown"],
|
|
25
|
-
policy: {
|
|
26
|
-
flags: ["service.dashboard.enabled"]
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
var ClientListPresentation = definePresentation({
|
|
30
|
-
meta: {
|
|
31
|
-
key: "service-business-os.client.list",
|
|
32
|
-
version: "1.0.0",
|
|
33
|
-
title: "Client List",
|
|
34
|
-
description: "List of service clients",
|
|
35
|
-
domain: "services",
|
|
36
|
-
owners: ["@service-os"],
|
|
37
|
-
tags: ["services", "clients", "list"],
|
|
38
|
-
stability: StabilityEnum.Experimental,
|
|
39
|
-
goal: "Browse and manage service clients",
|
|
40
|
-
context: "Client management"
|
|
41
|
-
},
|
|
42
|
-
source: {
|
|
43
|
-
type: "component",
|
|
44
|
-
framework: "react",
|
|
45
|
-
componentKey: "ClientList"
|
|
46
|
-
},
|
|
47
|
-
targets: ["react", "markdown"],
|
|
48
|
-
policy: {
|
|
49
|
-
flags: ["service.clients.enabled"]
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
var QuoteListPresentation = definePresentation({
|
|
53
|
-
meta: {
|
|
54
|
-
key: "service-business-os.quote.list",
|
|
55
|
-
version: "1.0.0",
|
|
56
|
-
title: "Quote List",
|
|
57
|
-
description: "List of quotes with status",
|
|
58
|
-
domain: "services",
|
|
59
|
-
owners: ["@service-os"],
|
|
60
|
-
tags: ["services", "quotes", "list"],
|
|
61
|
-
stability: StabilityEnum.Experimental,
|
|
62
|
-
goal: "Track and manage quotes",
|
|
63
|
-
context: "Quote management"
|
|
64
|
-
},
|
|
65
|
-
source: {
|
|
66
|
-
type: "component",
|
|
67
|
-
framework: "react",
|
|
68
|
-
componentKey: "QuoteList"
|
|
69
|
-
},
|
|
70
|
-
targets: ["react", "markdown"],
|
|
71
|
-
policy: {
|
|
72
|
-
flags: ["service.quotes.enabled"]
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
var QuoteDetailPresentation = definePresentation({
|
|
76
|
-
meta: {
|
|
77
|
-
key: "service-business-os.quote.detail",
|
|
78
|
-
version: "1.0.0",
|
|
79
|
-
title: "Quote Details",
|
|
80
|
-
description: "Quote detail with line items",
|
|
81
|
-
domain: "services",
|
|
82
|
-
owners: ["@service-os"],
|
|
83
|
-
tags: ["services", "quote", "detail"],
|
|
84
|
-
stability: StabilityEnum.Experimental,
|
|
85
|
-
goal: "View and edit quote details",
|
|
86
|
-
context: "Quote inspection"
|
|
87
|
-
},
|
|
88
|
-
source: {
|
|
89
|
-
type: "component",
|
|
90
|
-
framework: "react",
|
|
91
|
-
componentKey: "QuoteDetail"
|
|
92
|
-
},
|
|
93
|
-
targets: ["react", "markdown"],
|
|
94
|
-
policy: {
|
|
95
|
-
flags: ["service.quotes.enabled"]
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
var JobBoardPresentation = definePresentation({
|
|
99
|
-
meta: {
|
|
100
|
-
key: "service-business-os.job.board",
|
|
101
|
-
version: "1.0.0",
|
|
102
|
-
title: "Job Board",
|
|
103
|
-
description: "Job board with kanban view",
|
|
104
|
-
domain: "services",
|
|
105
|
-
owners: ["@service-os"],
|
|
106
|
-
tags: ["services", "jobs", "board", "kanban"],
|
|
107
|
-
stability: StabilityEnum.Experimental,
|
|
108
|
-
goal: "Visual job management",
|
|
109
|
-
context: "Field service scheduling"
|
|
110
|
-
},
|
|
111
|
-
source: {
|
|
112
|
-
type: "component",
|
|
113
|
-
framework: "react",
|
|
114
|
-
componentKey: "JobBoard"
|
|
115
|
-
},
|
|
116
|
-
targets: ["react"],
|
|
117
|
-
policy: {
|
|
118
|
-
flags: ["service.jobs.enabled"]
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
var InvoiceListPresentation = definePresentation({
|
|
122
|
-
meta: {
|
|
123
|
-
key: "service-business-os.invoice.list",
|
|
124
|
-
version: "1.0.0",
|
|
125
|
-
title: "Invoice List",
|
|
126
|
-
description: "List of invoices with payment status",
|
|
127
|
-
domain: "services",
|
|
128
|
-
owners: ["@service-os"],
|
|
129
|
-
tags: ["services", "invoices", "list"],
|
|
130
|
-
stability: StabilityEnum.Experimental,
|
|
131
|
-
goal: "Track invoices and payments",
|
|
132
|
-
context: "Billing management"
|
|
133
|
-
},
|
|
134
|
-
source: {
|
|
135
|
-
type: "component",
|
|
136
|
-
framework: "react",
|
|
137
|
-
componentKey: "InvoiceList"
|
|
138
|
-
},
|
|
139
|
-
targets: ["react", "markdown"],
|
|
140
|
-
policy: {
|
|
141
|
-
flags: ["service.invoices.enabled"]
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
var PaymentListPresentation = definePresentation({
|
|
145
|
-
meta: {
|
|
146
|
-
key: "service-business-os.payment.list",
|
|
147
|
-
version: "1.0.0",
|
|
148
|
-
title: "Payment List",
|
|
149
|
-
description: "List of payments received",
|
|
150
|
-
domain: "services",
|
|
151
|
-
owners: ["@service-os"],
|
|
152
|
-
tags: ["services", "payments", "list"],
|
|
153
|
-
stability: StabilityEnum.Experimental,
|
|
154
|
-
goal: "Track received payments",
|
|
155
|
-
context: "Payment reconciliation"
|
|
156
|
-
},
|
|
157
|
-
source: {
|
|
158
|
-
type: "component",
|
|
159
|
-
framework: "react",
|
|
160
|
-
componentKey: "PaymentList"
|
|
161
|
-
},
|
|
162
|
-
targets: ["react", "markdown"],
|
|
163
|
-
policy: {
|
|
164
|
-
flags: ["service.payments.enabled"]
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
export {
|
|
168
|
-
ServiceDashboardPresentation,
|
|
169
|
-
QuoteListPresentation,
|
|
170
|
-
QuoteDetailPresentation,
|
|
171
|
-
PaymentListPresentation,
|
|
172
|
-
JobBoardPresentation,
|
|
173
|
-
InvoiceListPresentation,
|
|
174
|
-
ClientListPresentation
|
|
175
|
-
};
|
|
1
|
+
import{definePresentation as g,StabilityEnum as h}from"@contractspec/lib.contracts-spec";var k=g({meta:{key:"service-business-os.dashboard",version:"1.0.0",title:"Service Dashboard",description:"Service business dashboard with overview metrics",domain:"services",owners:["@service-os"],tags:["services","dashboard"],stability:h.Experimental,goal:"Overview of service business metrics",context:"Service home page"},source:{type:"component",framework:"react",componentKey:"ServiceDashboard"},targets:["react","markdown"],policy:{flags:["service.dashboard.enabled"]}}),q=g({meta:{key:"service-business-os.client.list",version:"1.0.0",title:"Client List",description:"List of service clients",domain:"services",owners:["@service-os"],tags:["services","clients","list"],stability:h.Experimental,goal:"Browse and manage service clients",context:"Client management"},source:{type:"component",framework:"react",componentKey:"ClientList"},targets:["react","markdown"],policy:{flags:["service.clients.enabled"]}}),v=g({meta:{key:"service-business-os.quote.list",version:"1.0.0",title:"Quote List",description:"List of quotes with status",domain:"services",owners:["@service-os"],tags:["services","quotes","list"],stability:h.Experimental,goal:"Track and manage quotes",context:"Quote management"},source:{type:"component",framework:"react",componentKey:"QuoteList"},targets:["react","markdown"],policy:{flags:["service.quotes.enabled"]}}),w=g({meta:{key:"service-business-os.quote.detail",version:"1.0.0",title:"Quote Details",description:"Quote detail with line items",domain:"services",owners:["@service-os"],tags:["services","quote","detail"],stability:h.Experimental,goal:"View and edit quote details",context:"Quote inspection"},source:{type:"component",framework:"react",componentKey:"QuoteDetail"},targets:["react","markdown"],policy:{flags:["service.quotes.enabled"]}}),x=g({meta:{key:"service-business-os.job.board",version:"1.0.0",title:"Job Board",description:"Job board with kanban view",domain:"services",owners:["@service-os"],tags:["services","jobs","board","kanban"],stability:h.Experimental,goal:"Visual job management",context:"Field service scheduling"},source:{type:"component",framework:"react",componentKey:"JobBoard"},targets:["react"],policy:{flags:["service.jobs.enabled"]}}),z=g({meta:{key:"service-business-os.invoice.list",version:"1.0.0",title:"Invoice List",description:"List of invoices with payment status",domain:"services",owners:["@service-os"],tags:["services","invoices","list"],stability:h.Experimental,goal:"Track invoices and payments",context:"Billing management"},source:{type:"component",framework:"react",componentKey:"InvoiceList"},targets:["react","markdown"],policy:{flags:["service.invoices.enabled"]}}),A=g({meta:{key:"service-business-os.payment.list",version:"1.0.0",title:"Payment List",description:"List of payments received",domain:"services",owners:["@service-os"],tags:["services","payments","list"],stability:h.Experimental,goal:"Track received payments",context:"Payment reconciliation"},source:{type:"component",framework:"react",componentKey:"PaymentList"},targets:["react","markdown"],policy:{flags:["service.payments.enabled"]}});export{k as ServiceDashboardPresentation,v as QuoteListPresentation,w as QuoteDetailPresentation,A as PaymentListPresentation,x as JobBoardPresentation,z as InvoiceListPresentation,q as ClientListPresentation};
|
package/dist/node/quote/index.js
CHANGED
|
@@ -1,122 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
3
|
-
var QuoteModel = defineSchemaModel({
|
|
4
|
-
name: "Quote",
|
|
5
|
-
description: "Quote/proposal",
|
|
6
|
-
fields: {
|
|
7
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
8
|
-
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
11
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
12
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
-
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
14
|
-
validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
15
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var CreateQuoteInputModel = defineSchemaModel({
|
|
19
|
-
name: "CreateQuoteInput",
|
|
20
|
-
description: "Input for creating a quote",
|
|
21
|
-
fields: {
|
|
22
|
-
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
26
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
27
|
-
validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
28
|
-
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
29
|
-
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var AcceptQuoteInputModel = defineSchemaModel({
|
|
33
|
-
name: "AcceptQuoteInput",
|
|
34
|
-
description: "Input for accepting a quote",
|
|
35
|
-
fields: {
|
|
36
|
-
quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
acceptedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
38
|
-
notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
// src/quote/quote.operations.ts
|
|
43
|
-
import { defineCommand } from "@contractspec/lib.contracts-spec";
|
|
44
|
-
var OWNERS = ["@examples.service-business-os"];
|
|
45
|
-
var CreateQuoteContract = defineCommand({
|
|
46
|
-
meta: {
|
|
47
|
-
key: "service.quote.create",
|
|
48
|
-
version: "1.0.0",
|
|
49
|
-
stability: "stable",
|
|
50
|
-
owners: [...OWNERS],
|
|
51
|
-
tags: ["service-business-os", "quote", "create"],
|
|
52
|
-
description: "Create a quote/proposal.",
|
|
53
|
-
goal: "Quote clients.",
|
|
54
|
-
context: "Quote creation."
|
|
55
|
-
},
|
|
56
|
-
io: {
|
|
57
|
-
input: CreateQuoteInputModel,
|
|
58
|
-
output: QuoteModel
|
|
59
|
-
},
|
|
60
|
-
policy: { auth: "user" },
|
|
61
|
-
acceptance: {
|
|
62
|
-
scenarios: [
|
|
63
|
-
{
|
|
64
|
-
key: "create-quote-happy-path",
|
|
65
|
-
given: ["Client exists"],
|
|
66
|
-
when: ["User creates quote"],
|
|
67
|
-
then: ["Quote is created"]
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
examples: [
|
|
71
|
-
{
|
|
72
|
-
key: "create-proposal",
|
|
73
|
-
input: {
|
|
74
|
-
clientId: "client-123",
|
|
75
|
-
items: [{ description: "Project A", price: 5000 }]
|
|
76
|
-
},
|
|
77
|
-
output: { id: "quote-123", status: "draft", total: 5000 }
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var AcceptQuoteContract = defineCommand({
|
|
83
|
-
meta: {
|
|
84
|
-
key: "service.quote.accept",
|
|
85
|
-
version: "1.0.0",
|
|
86
|
-
stability: "stable",
|
|
87
|
-
owners: [...OWNERS],
|
|
88
|
-
tags: ["service-business-os", "quote", "accept"],
|
|
89
|
-
description: "Accept a quote.",
|
|
90
|
-
goal: "Confirm quote.",
|
|
91
|
-
context: "Quote acceptance."
|
|
92
|
-
},
|
|
93
|
-
io: {
|
|
94
|
-
input: AcceptQuoteInputModel,
|
|
95
|
-
output: QuoteModel
|
|
96
|
-
},
|
|
97
|
-
policy: { auth: "user" },
|
|
98
|
-
acceptance: {
|
|
99
|
-
scenarios: [
|
|
100
|
-
{
|
|
101
|
-
key: "accept-quote-happy-path",
|
|
102
|
-
given: ["Quote is open"],
|
|
103
|
-
when: ["Client accepts quote"],
|
|
104
|
-
then: ["Quote status becomes ACCEPTED"]
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
examples: [
|
|
108
|
-
{
|
|
109
|
-
key: "client-accepts",
|
|
110
|
-
input: { quoteId: "quote-123", signature: "John Doe" },
|
|
111
|
-
output: { id: "quote-123", status: "accepted" }
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
export {
|
|
117
|
-
QuoteModel,
|
|
118
|
-
CreateQuoteInputModel,
|
|
119
|
-
CreateQuoteContract,
|
|
120
|
-
AcceptQuoteInputModel,
|
|
121
|
-
AcceptQuoteContract
|
|
122
|
-
};
|
|
1
|
+
import{defineSchemaModel as x,ScalarTypeEnum as Q}from"@contractspec/lib.schema";var t=x({name:"Quote",description:"Quote/proposal",fields:{id:{type:Q.String_unsecure(),isOptional:!1},clientId:{type:Q.String_unsecure(),isOptional:!1},title:{type:Q.String_unsecure(),isOptional:!1},description:{type:Q.String_unsecure(),isOptional:!0},amount:{type:Q.Float_unsecure(),isOptional:!1},currency:{type:Q.String_unsecure(),isOptional:!1},status:{type:Q.String_unsecure(),isOptional:!1},validUntil:{type:Q.DateTime(),isOptional:!0},createdAt:{type:Q.DateTime(),isOptional:!1}}}),A=x({name:"CreateQuoteInput",description:"Input for creating a quote",fields:{clientId:{type:Q.String_unsecure(),isOptional:!1},title:{type:Q.String_unsecure(),isOptional:!1},description:{type:Q.String_unsecure(),isOptional:!0},amount:{type:Q.Float_unsecure(),isOptional:!1},currency:{type:Q.String_unsecure(),isOptional:!0},validUntil:{type:Q.DateTime(),isOptional:!0},orgId:{type:Q.String_unsecure(),isOptional:!1},ownerId:{type:Q.String_unsecure(),isOptional:!1}}}),C=x({name:"AcceptQuoteInput",description:"Input for accepting a quote",fields:{quoteId:{type:Q.String_unsecure(),isOptional:!1},acceptedBy:{type:Q.String_unsecure(),isOptional:!1},notes:{type:Q.String_unsecure(),isOptional:!0}}});import{defineCommand as g}from"@contractspec/lib.contracts-spec";var j=["@examples.service-business-os"],k=g({meta:{key:"service.quote.create",version:"1.0.0",stability:"stable",owners:[...j],tags:["service-business-os","quote","create"],description:"Create a quote/proposal.",goal:"Quote clients.",context:"Quote creation."},io:{input:A,output:t},policy:{auth:"user"},acceptance:{scenarios:[{key:"create-quote-happy-path",given:["Client exists"],when:["User creates quote"],then:["Quote is created"]}],examples:[{key:"create-proposal",input:{clientId:"client-123",items:[{description:"Project A",price:5000}]},output:{id:"quote-123",status:"draft",total:5000}}]}}),o=g({meta:{key:"service.quote.accept",version:"1.0.0",stability:"stable",owners:[...j],tags:["service-business-os","quote","accept"],description:"Accept a quote.",goal:"Confirm quote.",context:"Quote acceptance."},io:{input:C,output:t},policy:{auth:"user"},acceptance:{scenarios:[{key:"accept-quote-happy-path",given:["Quote is open"],when:["Client accepts quote"],then:["Quote status becomes ACCEPTED"]}],examples:[{key:"client-accepts",input:{quoteId:"quote-123",signature:"John Doe"},output:{id:"quote-123",status:"accepted"}}]}});export{t as QuoteModel,A as CreateQuoteInputModel,k as CreateQuoteContract,C as AcceptQuoteInputModel,o as AcceptQuoteContract};
|
|
@@ -1,119 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
3
|
-
var QuoteModel = defineSchemaModel({
|
|
4
|
-
name: "Quote",
|
|
5
|
-
description: "Quote/proposal",
|
|
6
|
-
fields: {
|
|
7
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
8
|
-
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
11
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
12
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
-
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
14
|
-
validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
15
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var CreateQuoteInputModel = defineSchemaModel({
|
|
19
|
-
name: "CreateQuoteInput",
|
|
20
|
-
description: "Input for creating a quote",
|
|
21
|
-
fields: {
|
|
22
|
-
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
26
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
27
|
-
validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
28
|
-
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
29
|
-
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var AcceptQuoteInputModel = defineSchemaModel({
|
|
33
|
-
name: "AcceptQuoteInput",
|
|
34
|
-
description: "Input for accepting a quote",
|
|
35
|
-
fields: {
|
|
36
|
-
quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
acceptedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
38
|
-
notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
// src/quote/quote.operations.ts
|
|
43
|
-
import { defineCommand } from "@contractspec/lib.contracts-spec";
|
|
44
|
-
var OWNERS = ["@examples.service-business-os"];
|
|
45
|
-
var CreateQuoteContract = defineCommand({
|
|
46
|
-
meta: {
|
|
47
|
-
key: "service.quote.create",
|
|
48
|
-
version: "1.0.0",
|
|
49
|
-
stability: "stable",
|
|
50
|
-
owners: [...OWNERS],
|
|
51
|
-
tags: ["service-business-os", "quote", "create"],
|
|
52
|
-
description: "Create a quote/proposal.",
|
|
53
|
-
goal: "Quote clients.",
|
|
54
|
-
context: "Quote creation."
|
|
55
|
-
},
|
|
56
|
-
io: {
|
|
57
|
-
input: CreateQuoteInputModel,
|
|
58
|
-
output: QuoteModel
|
|
59
|
-
},
|
|
60
|
-
policy: { auth: "user" },
|
|
61
|
-
acceptance: {
|
|
62
|
-
scenarios: [
|
|
63
|
-
{
|
|
64
|
-
key: "create-quote-happy-path",
|
|
65
|
-
given: ["Client exists"],
|
|
66
|
-
when: ["User creates quote"],
|
|
67
|
-
then: ["Quote is created"]
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
examples: [
|
|
71
|
-
{
|
|
72
|
-
key: "create-proposal",
|
|
73
|
-
input: {
|
|
74
|
-
clientId: "client-123",
|
|
75
|
-
items: [{ description: "Project A", price: 5000 }]
|
|
76
|
-
},
|
|
77
|
-
output: { id: "quote-123", status: "draft", total: 5000 }
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var AcceptQuoteContract = defineCommand({
|
|
83
|
-
meta: {
|
|
84
|
-
key: "service.quote.accept",
|
|
85
|
-
version: "1.0.0",
|
|
86
|
-
stability: "stable",
|
|
87
|
-
owners: [...OWNERS],
|
|
88
|
-
tags: ["service-business-os", "quote", "accept"],
|
|
89
|
-
description: "Accept a quote.",
|
|
90
|
-
goal: "Confirm quote.",
|
|
91
|
-
context: "Quote acceptance."
|
|
92
|
-
},
|
|
93
|
-
io: {
|
|
94
|
-
input: AcceptQuoteInputModel,
|
|
95
|
-
output: QuoteModel
|
|
96
|
-
},
|
|
97
|
-
policy: { auth: "user" },
|
|
98
|
-
acceptance: {
|
|
99
|
-
scenarios: [
|
|
100
|
-
{
|
|
101
|
-
key: "accept-quote-happy-path",
|
|
102
|
-
given: ["Quote is open"],
|
|
103
|
-
when: ["Client accepts quote"],
|
|
104
|
-
then: ["Quote status becomes ACCEPTED"]
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
examples: [
|
|
108
|
-
{
|
|
109
|
-
key: "client-accepts",
|
|
110
|
-
input: { quoteId: "quote-123", signature: "John Doe" },
|
|
111
|
-
output: { id: "quote-123", status: "accepted" }
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
export {
|
|
117
|
-
CreateQuoteContract,
|
|
118
|
-
AcceptQuoteContract
|
|
119
|
-
};
|
|
1
|
+
import{defineSchemaModel as k,ScalarTypeEnum as j}from"@contractspec/lib.schema";var v=k({name:"Quote",description:"Quote/proposal",fields:{id:{type:j.String_unsecure(),isOptional:!1},clientId:{type:j.String_unsecure(),isOptional:!1},title:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},amount:{type:j.Float_unsecure(),isOptional:!1},currency:{type:j.String_unsecure(),isOptional:!1},status:{type:j.String_unsecure(),isOptional:!1},validUntil:{type:j.DateTime(),isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1}}}),w=k({name:"CreateQuoteInput",description:"Input for creating a quote",fields:{clientId:{type:j.String_unsecure(),isOptional:!1},title:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},amount:{type:j.Float_unsecure(),isOptional:!1},currency:{type:j.String_unsecure(),isOptional:!0},validUntil:{type:j.DateTime(),isOptional:!0},orgId:{type:j.String_unsecure(),isOptional:!1},ownerId:{type:j.String_unsecure(),isOptional:!1}}}),x=k({name:"AcceptQuoteInput",description:"Input for accepting a quote",fields:{quoteId:{type:j.String_unsecure(),isOptional:!1},acceptedBy:{type:j.String_unsecure(),isOptional:!1},notes:{type:j.String_unsecure(),isOptional:!0}}});import{defineCommand as z}from"@contractspec/lib.contracts-spec";var B=["@examples.service-business-os"],J=z({meta:{key:"service.quote.create",version:"1.0.0",stability:"stable",owners:[...B],tags:["service-business-os","quote","create"],description:"Create a quote/proposal.",goal:"Quote clients.",context:"Quote creation."},io:{input:w,output:v},policy:{auth:"user"},acceptance:{scenarios:[{key:"create-quote-happy-path",given:["Client exists"],when:["User creates quote"],then:["Quote is created"]}],examples:[{key:"create-proposal",input:{clientId:"client-123",items:[{description:"Project A",price:5000}]},output:{id:"quote-123",status:"draft",total:5000}}]}}),K=z({meta:{key:"service.quote.accept",version:"1.0.0",stability:"stable",owners:[...B],tags:["service-business-os","quote","accept"],description:"Accept a quote.",goal:"Confirm quote.",context:"Quote acceptance."},io:{input:x,output:v},policy:{auth:"user"},acceptance:{scenarios:[{key:"accept-quote-happy-path",given:["Quote is open"],when:["Client accepts quote"],then:["Quote status becomes ACCEPTED"]}],examples:[{key:"client-accepts",input:{quoteId:"quote-123",signature:"John Doe"},output:{id:"quote-123",status:"accepted"}}]}});export{J as CreateQuoteContract,K as AcceptQuoteContract};
|
|
@@ -1,45 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
3
|
-
var QuoteModel = defineSchemaModel({
|
|
4
|
-
name: "Quote",
|
|
5
|
-
description: "Quote/proposal",
|
|
6
|
-
fields: {
|
|
7
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
8
|
-
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
11
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
12
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
-
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
14
|
-
validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
15
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var CreateQuoteInputModel = defineSchemaModel({
|
|
19
|
-
name: "CreateQuoteInput",
|
|
20
|
-
description: "Input for creating a quote",
|
|
21
|
-
fields: {
|
|
22
|
-
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
-
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
26
|
-
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
27
|
-
validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
28
|
-
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
29
|
-
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var AcceptQuoteInputModel = defineSchemaModel({
|
|
33
|
-
name: "AcceptQuoteInput",
|
|
34
|
-
description: "Input for accepting a quote",
|
|
35
|
-
fields: {
|
|
36
|
-
quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
acceptedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
38
|
-
notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
export {
|
|
42
|
-
QuoteModel,
|
|
43
|
-
CreateQuoteInputModel,
|
|
44
|
-
AcceptQuoteInputModel
|
|
45
|
-
};
|
|
1
|
+
import{defineSchemaModel as k,ScalarTypeEnum as j}from"@contractspec/lib.schema";var w=k({name:"Quote",description:"Quote/proposal",fields:{id:{type:j.String_unsecure(),isOptional:!1},clientId:{type:j.String_unsecure(),isOptional:!1},title:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},amount:{type:j.Float_unsecure(),isOptional:!1},currency:{type:j.String_unsecure(),isOptional:!1},status:{type:j.String_unsecure(),isOptional:!1},validUntil:{type:j.DateTime(),isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1}}}),x=k({name:"CreateQuoteInput",description:"Input for creating a quote",fields:{clientId:{type:j.String_unsecure(),isOptional:!1},title:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},amount:{type:j.Float_unsecure(),isOptional:!1},currency:{type:j.String_unsecure(),isOptional:!0},validUntil:{type:j.DateTime(),isOptional:!0},orgId:{type:j.String_unsecure(),isOptional:!1},ownerId:{type:j.String_unsecure(),isOptional:!1}}}),z=k({name:"AcceptQuoteInput",description:"Input for accepting a quote",fields:{quoteId:{type:j.String_unsecure(),isOptional:!1},acceptedBy:{type:j.String_unsecure(),isOptional:!1},notes:{type:j.String_unsecure(),isOptional:!0}}});export{w as QuoteModel,x as CreateQuoteInputModel,z as AcceptQuoteInputModel};
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
defineCapability,
|
|
4
|
-
StabilityEnum
|
|
5
|
-
} from "@contractspec/lib.contracts-spec";
|
|
6
|
-
var QuotesCapability = defineCapability({
|
|
7
|
-
meta: {
|
|
8
|
-
key: "quotes",
|
|
9
|
-
version: "1.0.0",
|
|
10
|
-
kind: "api",
|
|
11
|
-
stability: StabilityEnum.Experimental,
|
|
12
|
-
description: "Quote generation and management for service businesses",
|
|
13
|
-
owners: ["platform.core"],
|
|
14
|
-
tags: ["quotes", "service", "business"]
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
var InvoicesCapability = defineCapability({
|
|
18
|
-
meta: {
|
|
19
|
-
key: "invoices",
|
|
20
|
-
version: "1.0.0",
|
|
21
|
-
kind: "api",
|
|
22
|
-
stability: StabilityEnum.Experimental,
|
|
23
|
-
description: "Invoice creation and payment tracking",
|
|
24
|
-
owners: ["platform.finance"],
|
|
25
|
-
tags: ["invoices", "billing"]
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
export {
|
|
29
|
-
QuotesCapability,
|
|
30
|
-
InvoicesCapability
|
|
31
|
-
};
|
|
1
|
+
import{defineCapability as g,StabilityEnum as h}from"@contractspec/lib.contracts-spec";var k=g({meta:{key:"quotes",version:"1.0.0",kind:"api",stability:h.Experimental,description:"Quote generation and management for service businesses",owners:["platform.core"],tags:["quotes","service","business"]}}),q=g({meta:{key:"invoices",version:"1.0.0",kind:"api",stability:h.Experimental,description:"Invoice creation and payment tracking",owners:["platform.finance"],tags:["invoices","billing"]}});export{k as QuotesCapability,q as InvoicesCapability};
|
|
@@ -1,85 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineFeature } from "@contractspec/lib.contracts-spec";
|
|
3
|
-
var ServiceBusinessFeature = defineFeature({
|
|
4
|
-
meta: {
|
|
5
|
-
key: "service-business-os",
|
|
6
|
-
title: "Service Business OS",
|
|
7
|
-
description: "Quotes → jobs → invoices → payments for field services and agencies.",
|
|
8
|
-
domain: "services",
|
|
9
|
-
owners: ["@service-os"],
|
|
10
|
-
tags: ["services", "quotes", "jobs", "invoices", "payments"],
|
|
11
|
-
stability: "experimental",
|
|
12
|
-
version: "1.0.0"
|
|
13
|
-
},
|
|
14
|
-
operations: [
|
|
15
|
-
{ key: "service.client.create", version: "1.0.0" },
|
|
16
|
-
{ key: "service.quote.create", version: "1.0.0" },
|
|
17
|
-
{ key: "service.quote.accept", version: "1.0.0" },
|
|
18
|
-
{ key: "service.job.schedule", version: "1.0.0" },
|
|
19
|
-
{ key: "service.job.complete", version: "1.0.0" },
|
|
20
|
-
{ key: "service.invoice.issue", version: "1.0.0" },
|
|
21
|
-
{ key: "service.payment.record", version: "1.0.0" },
|
|
22
|
-
{ key: "service.job.list", version: "1.0.0" }
|
|
23
|
-
],
|
|
24
|
-
events: [
|
|
25
|
-
{ key: "service.quote.sent", version: "1.0.0" },
|
|
26
|
-
{ key: "service.quote.accepted", version: "1.0.0" },
|
|
27
|
-
{ key: "service.job.scheduled", version: "1.0.0" },
|
|
28
|
-
{ key: "service.job.completed", version: "1.0.0" },
|
|
29
|
-
{ key: "service.invoice.issued", version: "1.0.0" },
|
|
30
|
-
{ key: "service.payment.received", version: "1.0.0" }
|
|
31
|
-
],
|
|
32
|
-
presentations: [
|
|
33
|
-
{ key: "service-business-os.dashboard", version: "1.0.0" },
|
|
34
|
-
{ key: "service-business-os.client.list", version: "1.0.0" },
|
|
35
|
-
{ key: "service-business-os.quote.list", version: "1.0.0" },
|
|
36
|
-
{ key: "service-business-os.quote.detail", version: "1.0.0" },
|
|
37
|
-
{ key: "service-business-os.job.board", version: "1.0.0" },
|
|
38
|
-
{ key: "service-business-os.invoice.list", version: "1.0.0" },
|
|
39
|
-
{ key: "service-business-os.payment.list", version: "1.0.0" }
|
|
40
|
-
],
|
|
41
|
-
presentationsTargets: [
|
|
42
|
-
{
|
|
43
|
-
key: "service-business-os.dashboard",
|
|
44
|
-
version: "1.0.0",
|
|
45
|
-
targets: ["react", "markdown"]
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
key: "service-business-os.quote.list",
|
|
49
|
-
version: "1.0.0",
|
|
50
|
-
targets: ["react", "markdown"]
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
key: "service-business-os.invoice.list",
|
|
54
|
-
version: "1.0.0",
|
|
55
|
-
targets: ["react", "markdown"]
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
capabilities: {
|
|
59
|
-
requires: [
|
|
60
|
-
{ key: "identity", version: "1.0.0" },
|
|
61
|
-
{ key: "audit-trail", version: "1.0.0" },
|
|
62
|
-
{ key: "notifications", version: "1.0.0" },
|
|
63
|
-
{ key: "files", version: "1.0.0" }
|
|
64
|
-
],
|
|
65
|
-
provides: [
|
|
66
|
-
{ key: "quotes", version: "1.0.0" },
|
|
67
|
-
{ key: "jobs", version: "1.0.0" },
|
|
68
|
-
{ key: "invoices", version: "1.0.0" }
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
telemetry: [{ key: "service-business-os.telemetry", version: "1.0.0" }],
|
|
72
|
-
jobs: [
|
|
73
|
-
{ key: "service-business-os.job.schedule-dispatch", version: "1.0.0" },
|
|
74
|
-
{ key: "service-business-os.job.invoice-reminder", version: "1.0.0" }
|
|
75
|
-
],
|
|
76
|
-
docs: [
|
|
77
|
-
"docs.examples.service-business-os",
|
|
78
|
-
"docs.examples.service-business-os.goal",
|
|
79
|
-
"docs.examples.service-business-os.usage",
|
|
80
|
-
"docs.examples.service-business-os.constraints"
|
|
81
|
-
]
|
|
82
|
-
});
|
|
83
|
-
export {
|
|
84
|
-
ServiceBusinessFeature
|
|
85
|
-
};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"service-business-os",title:"Service Business OS",description:"Quotes → jobs → invoices → payments for field services and agencies.",domain:"services",owners:["@service-os"],tags:["services","quotes","jobs","invoices","payments"],stability:"experimental",version:"1.0.0"},operations:[{key:"service.client.create",version:"1.0.0"},{key:"service.quote.create",version:"1.0.0"},{key:"service.quote.accept",version:"1.0.0"},{key:"service.job.schedule",version:"1.0.0"},{key:"service.job.complete",version:"1.0.0"},{key:"service.invoice.issue",version:"1.0.0"},{key:"service.payment.record",version:"1.0.0"},{key:"service.job.list",version:"1.0.0"}],events:[{key:"service.quote.sent",version:"1.0.0"},{key:"service.quote.accepted",version:"1.0.0"},{key:"service.job.scheduled",version:"1.0.0"},{key:"service.job.completed",version:"1.0.0"},{key:"service.invoice.issued",version:"1.0.0"},{key:"service.payment.received",version:"1.0.0"}],presentations:[{key:"service-business-os.dashboard",version:"1.0.0"},{key:"service-business-os.client.list",version:"1.0.0"},{key:"service-business-os.quote.list",version:"1.0.0"},{key:"service-business-os.quote.detail",version:"1.0.0"},{key:"service-business-os.job.board",version:"1.0.0"},{key:"service-business-os.invoice.list",version:"1.0.0"},{key:"service-business-os.payment.list",version:"1.0.0"}],presentationsTargets:[{key:"service-business-os.dashboard",version:"1.0.0",targets:["react","markdown"]},{key:"service-business-os.quote.list",version:"1.0.0",targets:["react","markdown"]},{key:"service-business-os.invoice.list",version:"1.0.0",targets:["react","markdown"]}],capabilities:{requires:[{key:"identity",version:"1.0.0"},{key:"audit-trail",version:"1.0.0"},{key:"notifications",version:"1.0.0"},{key:"files",version:"1.0.0"}],provides:[{key:"quotes",version:"1.0.0"},{key:"jobs",version:"1.0.0"},{key:"invoices",version:"1.0.0"}]},telemetry:[{key:"service-business-os.telemetry",version:"1.0.0"}],jobs:[{key:"service-business-os.job.schedule-dispatch",version:"1.0.0"},{key:"service-business-os.job.invoice-reminder",version:"1.0.0"}],docs:["docs.examples.service-business-os","docs.examples.service-business-os.goal","docs.examples.service-business-os.usage","docs.examples.service-business-os.constraints"]});export{j as ServiceBusinessFeature};
|