@contractspec/example.service-business-os 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +37 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +46 -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.feature.d.ts +7 -0
- package/dist/service.feature.d.ts.map +1 -0
- package/dist/service.feature.js +164 -0
- package/dist/service.feature.js.map +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentations.js","names":["ServiceDashboardPresentation: PresentationSpec","ClientListPresentation: PresentationSpec","QuoteListPresentation: PresentationSpec","QuoteDetailPresentation: PresentationSpec","JobBoardPresentation: PresentationSpec","InvoiceListPresentation: PresentationSpec","PaymentListPresentation: PresentationSpec"],"sources":["../src/presentations.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const ServiceDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.dashboard',\n version: 1,\n title: 'Service Dashboard',\n description: 'Service business dashboard with overview metrics',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'dashboard'],\n stability: StabilityEnum.Experimental,\n goal: 'Overview of service business metrics',\n context: 'Service home page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ServiceDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.dashboard.enabled'],\n },\n};\n\nexport const ClientListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.client.list',\n version: 1,\n title: 'Client List',\n description: 'List of service clients',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'clients', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Browse and manage service clients',\n context: 'Client management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ClientList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.clients.enabled'],\n },\n};\n\nexport const QuoteListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.quote.list',\n version: 1,\n title: 'Quote List',\n description: 'List of quotes with status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quotes', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track and manage quotes',\n context: 'Quote management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n};\n\nexport const QuoteDetailPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.quote.detail',\n version: 1,\n title: 'Quote Details',\n description: 'Quote detail with line items',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quote', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'View and edit quote details',\n context: 'Quote inspection',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteDetail',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n};\n\nexport const JobBoardPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.job.board',\n version: 1,\n title: 'Job Board',\n description: 'Job board with kanban view',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'jobs', 'board', 'kanban'],\n stability: StabilityEnum.Experimental,\n goal: 'Visual job management',\n context: 'Field service scheduling',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'JobBoard',\n },\n targets: ['react'],\n policy: {\n flags: ['service.jobs.enabled'],\n },\n};\n\nexport const InvoiceListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.invoice.list',\n version: 1,\n title: 'Invoice List',\n description: 'List of invoices with payment status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'invoices', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track invoices and payments',\n context: 'Billing management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'InvoiceList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.invoices.enabled'],\n },\n};\n\nexport const PaymentListPresentation: PresentationSpec = {\n meta: {\n key: 'service-business-os.payment.list',\n version: 1,\n title: 'Payment List',\n description: 'List of payments received',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'payments', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track received payments',\n context: 'Payment reconciliation',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PaymentList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.payments.enabled'],\n },\n};\n"],"mappings":";;;AAGA,MAAaA,+BAAiD;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM,CAAC,YAAY,YAAY;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,4BAA4B,EACrC;CACF;AAED,MAAaC,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAW;GAAO;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,0BAA0B,EACnC;CACF;AAED,MAAaC,wBAA0C;CACrD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAU;GAAO;EACpC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,yBAAyB,EAClC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAS;GAAS;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,yBAAyB,EAClC;CACF;AAED,MAAaC,uBAAyC;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAQ;GAAS;GAAS;EAC7C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AcceptQuoteInputModel, CreateQuoteInputModel, QuoteModel } from "./quote.schema.js";
|
|
2
|
+
import { AcceptQuoteContract, CreateQuoteContract } from "./quote.operations.js";
|
|
3
|
+
export { AcceptQuoteContract, AcceptQuoteInputModel, CreateQuoteContract, CreateQuoteInputModel, QuoteModel };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AcceptQuoteInputModel, CreateQuoteInputModel, QuoteModel } from "./quote.schema.js";
|
|
2
|
+
import { AcceptQuoteContract, CreateQuoteContract } from "./quote.operations.js";
|
|
3
|
+
|
|
4
|
+
export { AcceptQuoteContract, AcceptQuoteInputModel, CreateQuoteContract, CreateQuoteInputModel, QuoteModel };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema431 from "@contractspec/lib.schema";
|
|
2
|
+
import * as _contractspec_lib_contracts17 from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/quote/quote.operations.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Create a new quote.
|
|
7
|
+
*/
|
|
8
|
+
declare const CreateQuoteContract: _contractspec_lib_contracts17.OperationSpec<_contractspec_lib_schema431.SchemaModel<{
|
|
9
|
+
clientId: {
|
|
10
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
title: {
|
|
14
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
description: {
|
|
18
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
19
|
+
isOptional: true;
|
|
20
|
+
};
|
|
21
|
+
amount: {
|
|
22
|
+
type: _contractspec_lib_schema431.FieldType<number, number>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
currency: {
|
|
26
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
27
|
+
isOptional: true;
|
|
28
|
+
};
|
|
29
|
+
validUntil: {
|
|
30
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
31
|
+
isOptional: true;
|
|
32
|
+
};
|
|
33
|
+
orgId: {
|
|
34
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
35
|
+
isOptional: false;
|
|
36
|
+
};
|
|
37
|
+
ownerId: {
|
|
38
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
39
|
+
isOptional: false;
|
|
40
|
+
};
|
|
41
|
+
}>, _contractspec_lib_schema431.SchemaModel<{
|
|
42
|
+
id: {
|
|
43
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
clientId: {
|
|
47
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
title: {
|
|
51
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
54
|
+
description: {
|
|
55
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
56
|
+
isOptional: true;
|
|
57
|
+
};
|
|
58
|
+
amount: {
|
|
59
|
+
type: _contractspec_lib_schema431.FieldType<number, number>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
currency: {
|
|
63
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
64
|
+
isOptional: false;
|
|
65
|
+
};
|
|
66
|
+
status: {
|
|
67
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
68
|
+
isOptional: false;
|
|
69
|
+
};
|
|
70
|
+
validUntil: {
|
|
71
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
72
|
+
isOptional: true;
|
|
73
|
+
};
|
|
74
|
+
createdAt: {
|
|
75
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
76
|
+
isOptional: false;
|
|
77
|
+
};
|
|
78
|
+
}>, undefined>;
|
|
79
|
+
/**
|
|
80
|
+
* Accept a quote.
|
|
81
|
+
*/
|
|
82
|
+
declare const AcceptQuoteContract: _contractspec_lib_contracts17.OperationSpec<_contractspec_lib_schema431.SchemaModel<{
|
|
83
|
+
quoteId: {
|
|
84
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
85
|
+
isOptional: false;
|
|
86
|
+
};
|
|
87
|
+
acceptedBy: {
|
|
88
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
89
|
+
isOptional: false;
|
|
90
|
+
};
|
|
91
|
+
notes: {
|
|
92
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
93
|
+
isOptional: true;
|
|
94
|
+
};
|
|
95
|
+
}>, _contractspec_lib_schema431.SchemaModel<{
|
|
96
|
+
id: {
|
|
97
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
98
|
+
isOptional: false;
|
|
99
|
+
};
|
|
100
|
+
clientId: {
|
|
101
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
102
|
+
isOptional: false;
|
|
103
|
+
};
|
|
104
|
+
title: {
|
|
105
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
106
|
+
isOptional: false;
|
|
107
|
+
};
|
|
108
|
+
description: {
|
|
109
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
110
|
+
isOptional: true;
|
|
111
|
+
};
|
|
112
|
+
amount: {
|
|
113
|
+
type: _contractspec_lib_schema431.FieldType<number, number>;
|
|
114
|
+
isOptional: false;
|
|
115
|
+
};
|
|
116
|
+
currency: {
|
|
117
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
118
|
+
isOptional: false;
|
|
119
|
+
};
|
|
120
|
+
status: {
|
|
121
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
122
|
+
isOptional: false;
|
|
123
|
+
};
|
|
124
|
+
validUntil: {
|
|
125
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
126
|
+
isOptional: true;
|
|
127
|
+
};
|
|
128
|
+
createdAt: {
|
|
129
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
130
|
+
isOptional: false;
|
|
131
|
+
};
|
|
132
|
+
}>, undefined>;
|
|
133
|
+
//#endregion
|
|
134
|
+
export { AcceptQuoteContract, CreateQuoteContract };
|
|
135
|
+
//# sourceMappingURL=quote.operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote.operations.d.ts","names":[],"sources":["../../src/quote/quote.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAYa,mDAAmB,0CAAA;EAAnB,QAAA,EAAA;IAoCX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;EApC8B,CAAA;;;;;;;;;;;;;EAAA,KAAA,EAAA;IAyCnB,IAAA,uCAiCX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;+CAjC8B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;UAzCA,2BAAA,CAAA;;;;;;;;+CAyCA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAnB,mDAAmB,0CAAA;;UAiC9B,2BAAA,CAAA;;;;;;;;;;;;;UAjC8B,2BAAA,CAAA"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { AcceptQuoteInputModel, CreateQuoteInputModel, QuoteModel } from "./quote.schema.js";
|
|
2
|
+
import { defineCommand } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/quote/quote.operations.ts
|
|
5
|
+
const OWNERS = ["@examples.service-business-os"];
|
|
6
|
+
/**
|
|
7
|
+
* Create a new quote.
|
|
8
|
+
*/
|
|
9
|
+
const CreateQuoteContract = defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
key: "service.quote.create",
|
|
12
|
+
version: 1,
|
|
13
|
+
stability: "stable",
|
|
14
|
+
owners: [...OWNERS],
|
|
15
|
+
tags: [
|
|
16
|
+
"service-business-os",
|
|
17
|
+
"quote",
|
|
18
|
+
"create"
|
|
19
|
+
],
|
|
20
|
+
description: "Create a quote/proposal.",
|
|
21
|
+
goal: "Quote clients.",
|
|
22
|
+
context: "Quote creation."
|
|
23
|
+
},
|
|
24
|
+
io: {
|
|
25
|
+
input: CreateQuoteInputModel,
|
|
26
|
+
output: QuoteModel
|
|
27
|
+
},
|
|
28
|
+
policy: { auth: "user" },
|
|
29
|
+
acceptance: {
|
|
30
|
+
scenarios: [{
|
|
31
|
+
key: "create-quote-happy-path",
|
|
32
|
+
given: ["Client exists"],
|
|
33
|
+
when: ["User creates quote"],
|
|
34
|
+
then: ["Quote is created"]
|
|
35
|
+
}],
|
|
36
|
+
examples: [{
|
|
37
|
+
key: "create-proposal",
|
|
38
|
+
input: {
|
|
39
|
+
clientId: "client-123",
|
|
40
|
+
items: [{
|
|
41
|
+
description: "Project A",
|
|
42
|
+
price: 5e3
|
|
43
|
+
}]
|
|
44
|
+
},
|
|
45
|
+
output: {
|
|
46
|
+
id: "quote-123",
|
|
47
|
+
status: "draft",
|
|
48
|
+
total: 5e3
|
|
49
|
+
}
|
|
50
|
+
}]
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Accept a quote.
|
|
55
|
+
*/
|
|
56
|
+
const AcceptQuoteContract = defineCommand({
|
|
57
|
+
meta: {
|
|
58
|
+
key: "service.quote.accept",
|
|
59
|
+
version: 1,
|
|
60
|
+
stability: "stable",
|
|
61
|
+
owners: [...OWNERS],
|
|
62
|
+
tags: [
|
|
63
|
+
"service-business-os",
|
|
64
|
+
"quote",
|
|
65
|
+
"accept"
|
|
66
|
+
],
|
|
67
|
+
description: "Accept a quote.",
|
|
68
|
+
goal: "Confirm quote.",
|
|
69
|
+
context: "Quote acceptance."
|
|
70
|
+
},
|
|
71
|
+
io: {
|
|
72
|
+
input: AcceptQuoteInputModel,
|
|
73
|
+
output: QuoteModel
|
|
74
|
+
},
|
|
75
|
+
policy: { auth: "user" },
|
|
76
|
+
acceptance: {
|
|
77
|
+
scenarios: [{
|
|
78
|
+
key: "accept-quote-happy-path",
|
|
79
|
+
given: ["Quote is open"],
|
|
80
|
+
when: ["Client accepts quote"],
|
|
81
|
+
then: ["Quote status becomes ACCEPTED"]
|
|
82
|
+
}],
|
|
83
|
+
examples: [{
|
|
84
|
+
key: "client-accepts",
|
|
85
|
+
input: {
|
|
86
|
+
quoteId: "quote-123",
|
|
87
|
+
signature: "John Doe"
|
|
88
|
+
},
|
|
89
|
+
output: {
|
|
90
|
+
id: "quote-123",
|
|
91
|
+
status: "accepted"
|
|
92
|
+
}
|
|
93
|
+
}]
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
export { AcceptQuoteContract, CreateQuoteContract };
|
|
99
|
+
//# sourceMappingURL=quote.operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote.operations.js","names":[],"sources":["../../src/quote/quote.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts';\nimport {\n AcceptQuoteInputModel,\n CreateQuoteInputModel,\n QuoteModel,\n} from './quote.schema';\n\nconst OWNERS = ['@examples.service-business-os'] as const;\n\n/**\n * Create a new quote.\n */\nexport const CreateQuoteContract = defineCommand({\n meta: {\n key: 'service.quote.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'quote', 'create'],\n description: 'Create a quote/proposal.',\n goal: 'Quote clients.',\n context: 'Quote creation.',\n },\n io: {\n input: CreateQuoteInputModel,\n output: QuoteModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'create-quote-happy-path',\n given: ['Client exists'],\n when: ['User creates quote'],\n then: ['Quote is created'],\n },\n ],\n examples: [\n {\n key: 'create-proposal',\n input: {\n clientId: 'client-123',\n items: [{ description: 'Project A', price: 5000 }],\n },\n output: { id: 'quote-123', status: 'draft', total: 5000 },\n },\n ],\n },\n});\n\n/**\n * Accept a quote.\n */\nexport const AcceptQuoteContract = defineCommand({\n meta: {\n key: 'service.quote.accept',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['service-business-os', 'quote', 'accept'],\n description: 'Accept a quote.',\n goal: 'Confirm quote.',\n context: 'Quote acceptance.',\n },\n io: {\n input: AcceptQuoteInputModel,\n output: QuoteModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'accept-quote-happy-path',\n given: ['Quote is open'],\n when: ['Client accepts quote'],\n then: ['Quote status becomes ACCEPTED'],\n },\n ],\n examples: [\n {\n key: 'client-accepts',\n input: { quoteId: 'quote-123', signature: 'John Doe' },\n output: { id: 'quote-123', status: 'accepted' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAOA,MAAM,SAAS,CAAC,gCAAgC;;;;AAKhD,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAS;GAAS;EAChD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,gBAAgB;GACxB,MAAM,CAAC,qBAAqB;GAC5B,MAAM,CAAC,mBAAmB;GAC3B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,UAAU;IACV,OAAO,CAAC;KAAE,aAAa;KAAa,OAAO;KAAM,CAAC;IACnD;GACD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAS,OAAO;IAAM;GAC1D,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAuB;GAAS;GAAS;EAChD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,gBAAgB;GACxB,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,gCAAgC;GACxC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,SAAS;IAAa,WAAW;IAAY;GACtD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAY;GAChD,CACF;EACF;CACF,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/quote/quote.schema.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Quote/proposal.
|
|
6
|
+
*/
|
|
7
|
+
declare const QuoteModel: _contractspec_lib_schema0.SchemaModel<{
|
|
8
|
+
id: {
|
|
9
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
10
|
+
isOptional: false;
|
|
11
|
+
};
|
|
12
|
+
clientId: {
|
|
13
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
14
|
+
isOptional: false;
|
|
15
|
+
};
|
|
16
|
+
title: {
|
|
17
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
18
|
+
isOptional: false;
|
|
19
|
+
};
|
|
20
|
+
description: {
|
|
21
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
22
|
+
isOptional: true;
|
|
23
|
+
};
|
|
24
|
+
amount: {
|
|
25
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
26
|
+
isOptional: false;
|
|
27
|
+
};
|
|
28
|
+
currency: {
|
|
29
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
30
|
+
isOptional: false;
|
|
31
|
+
};
|
|
32
|
+
status: {
|
|
33
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
34
|
+
isOptional: false;
|
|
35
|
+
};
|
|
36
|
+
validUntil: {
|
|
37
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
38
|
+
isOptional: true;
|
|
39
|
+
};
|
|
40
|
+
createdAt: {
|
|
41
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
42
|
+
isOptional: false;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Input for creating a quote.
|
|
47
|
+
*/
|
|
48
|
+
declare const CreateQuoteInputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
49
|
+
clientId: {
|
|
50
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
51
|
+
isOptional: false;
|
|
52
|
+
};
|
|
53
|
+
title: {
|
|
54
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
55
|
+
isOptional: false;
|
|
56
|
+
};
|
|
57
|
+
description: {
|
|
58
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
59
|
+
isOptional: true;
|
|
60
|
+
};
|
|
61
|
+
amount: {
|
|
62
|
+
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
63
|
+
isOptional: false;
|
|
64
|
+
};
|
|
65
|
+
currency: {
|
|
66
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
67
|
+
isOptional: true;
|
|
68
|
+
};
|
|
69
|
+
validUntil: {
|
|
70
|
+
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
71
|
+
isOptional: true;
|
|
72
|
+
};
|
|
73
|
+
orgId: {
|
|
74
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
75
|
+
isOptional: false;
|
|
76
|
+
};
|
|
77
|
+
ownerId: {
|
|
78
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
79
|
+
isOptional: false;
|
|
80
|
+
};
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Input for accepting a quote.
|
|
84
|
+
*/
|
|
85
|
+
declare const AcceptQuoteInputModel: _contractspec_lib_schema0.SchemaModel<{
|
|
86
|
+
quoteId: {
|
|
87
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
88
|
+
isOptional: false;
|
|
89
|
+
};
|
|
90
|
+
acceptedBy: {
|
|
91
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
92
|
+
isOptional: false;
|
|
93
|
+
};
|
|
94
|
+
notes: {
|
|
95
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
96
|
+
isOptional: true;
|
|
97
|
+
};
|
|
98
|
+
}>;
|
|
99
|
+
//#endregion
|
|
100
|
+
export { AcceptQuoteInputModel, CreateQuoteInputModel, QuoteModel };
|
|
101
|
+
//# sourceMappingURL=quote.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote.schema.d.ts","names":[],"sources":["../../src/quote/quote.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,UAcX,4BAdqB,WAcrB,CAAA;EAAA,EAAA,EAAA;UAAA,yBAAA,CAAA;;;;;;;;;;;EAdqB,WAAA,EAAA;IAmBV,IAAA,qCAaX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;EAbgC,MAAA,EAAA;IAkBrB,IAAA,qCAQX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;6CARgC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;cAlBrB,iDAAqB;;UAahC,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,iDAAqB;;UAQhC,yBAAA,CAAA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/quote/quote.schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* Quote/proposal.
|
|
6
|
+
*/
|
|
7
|
+
const QuoteModel = defineSchemaModel({
|
|
8
|
+
name: "Quote",
|
|
9
|
+
description: "Quote/proposal",
|
|
10
|
+
fields: {
|
|
11
|
+
id: {
|
|
12
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
13
|
+
isOptional: false
|
|
14
|
+
},
|
|
15
|
+
clientId: {
|
|
16
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
17
|
+
isOptional: false
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
21
|
+
isOptional: false
|
|
22
|
+
},
|
|
23
|
+
description: {
|
|
24
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
25
|
+
isOptional: true
|
|
26
|
+
},
|
|
27
|
+
amount: {
|
|
28
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
29
|
+
isOptional: false
|
|
30
|
+
},
|
|
31
|
+
currency: {
|
|
32
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
+
isOptional: false
|
|
34
|
+
},
|
|
35
|
+
status: {
|
|
36
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
37
|
+
isOptional: false
|
|
38
|
+
},
|
|
39
|
+
validUntil: {
|
|
40
|
+
type: ScalarTypeEnum.DateTime(),
|
|
41
|
+
isOptional: true
|
|
42
|
+
},
|
|
43
|
+
createdAt: {
|
|
44
|
+
type: ScalarTypeEnum.DateTime(),
|
|
45
|
+
isOptional: false
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Input for creating a quote.
|
|
51
|
+
*/
|
|
52
|
+
const CreateQuoteInputModel = defineSchemaModel({
|
|
53
|
+
name: "CreateQuoteInput",
|
|
54
|
+
description: "Input for creating a quote",
|
|
55
|
+
fields: {
|
|
56
|
+
clientId: {
|
|
57
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
58
|
+
isOptional: false
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
62
|
+
isOptional: false
|
|
63
|
+
},
|
|
64
|
+
description: {
|
|
65
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
66
|
+
isOptional: true
|
|
67
|
+
},
|
|
68
|
+
amount: {
|
|
69
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
70
|
+
isOptional: false
|
|
71
|
+
},
|
|
72
|
+
currency: {
|
|
73
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
74
|
+
isOptional: true
|
|
75
|
+
},
|
|
76
|
+
validUntil: {
|
|
77
|
+
type: ScalarTypeEnum.DateTime(),
|
|
78
|
+
isOptional: true
|
|
79
|
+
},
|
|
80
|
+
orgId: {
|
|
81
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
82
|
+
isOptional: false
|
|
83
|
+
},
|
|
84
|
+
ownerId: {
|
|
85
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
+
isOptional: false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Input for accepting a quote.
|
|
92
|
+
*/
|
|
93
|
+
const AcceptQuoteInputModel = defineSchemaModel({
|
|
94
|
+
name: "AcceptQuoteInput",
|
|
95
|
+
description: "Input for accepting a quote",
|
|
96
|
+
fields: {
|
|
97
|
+
quoteId: {
|
|
98
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
99
|
+
isOptional: false
|
|
100
|
+
},
|
|
101
|
+
acceptedBy: {
|
|
102
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
103
|
+
isOptional: false
|
|
104
|
+
},
|
|
105
|
+
notes: {
|
|
106
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
107
|
+
isOptional: true
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { AcceptQuoteInputModel, CreateQuoteInputModel, QuoteModel };
|
|
114
|
+
//# sourceMappingURL=quote.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote.schema.js","names":[],"sources":["../../src/quote/quote.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\n\n/**\n * Quote/proposal.\n */\nexport const QuoteModel = defineSchemaModel({\n name: 'Quote',\n description: 'Quote/proposal',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a quote.\n */\nexport const CreateQuoteInputModel = defineSchemaModel({\n name: 'CreateQuoteInput',\n description: 'Input for creating a quote',\n fields: {\n clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n validUntil: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\n/**\n * Input for accepting a quote.\n */\nexport const AcceptQuoteInputModel = defineSchemaModel({\n name: 'AcceptQuoteInput',\n description: 'Input for accepting a quote',\n fields: {\n quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n acceptedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;AAKA,MAAa,aAAa,kBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,QAAQ;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACpE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EACjE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,wBAAwB,kBAAkB;CACrD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,QAAQ;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACpE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACtE,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EACjE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE;CACF,CAAC;;;;AAKF,MAAa,wBAAwB,kBAAkB;CACrD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.feature.d.ts","names":[],"sources":["../src/service.feature.ts"],"sourcesContent":[],"mappings":";;;cAEa,wBAAwB"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
//#region src/service.feature.ts
|
|
2
|
+
const ServiceBusinessFeature = {
|
|
3
|
+
meta: {
|
|
4
|
+
key: "service-business-os",
|
|
5
|
+
title: "Service Business OS",
|
|
6
|
+
description: "Quotes → jobs → invoices → payments for field services and agencies.",
|
|
7
|
+
domain: "services",
|
|
8
|
+
owners: ["@service-os"],
|
|
9
|
+
tags: [
|
|
10
|
+
"services",
|
|
11
|
+
"quotes",
|
|
12
|
+
"jobs",
|
|
13
|
+
"invoices",
|
|
14
|
+
"payments"
|
|
15
|
+
],
|
|
16
|
+
stability: "experimental",
|
|
17
|
+
version: 1
|
|
18
|
+
},
|
|
19
|
+
operations: [
|
|
20
|
+
{
|
|
21
|
+
key: "service.client.create",
|
|
22
|
+
version: 1
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: "service.quote.create",
|
|
26
|
+
version: 1
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "service.quote.accept",
|
|
30
|
+
version: 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: "service.job.schedule",
|
|
34
|
+
version: 1
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
key: "service.job.complete",
|
|
38
|
+
version: 1
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "service.invoice.issue",
|
|
42
|
+
version: 1
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: "service.payment.record",
|
|
46
|
+
version: 1
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "service.job.list",
|
|
50
|
+
version: 1
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
events: [
|
|
54
|
+
{
|
|
55
|
+
key: "service.quote.sent",
|
|
56
|
+
version: 1
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: "service.quote.accepted",
|
|
60
|
+
version: 1
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
key: "service.job.scheduled",
|
|
64
|
+
version: 1
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: "service.job.completed",
|
|
68
|
+
version: 1
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "service.invoice.issued",
|
|
72
|
+
version: 1
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: "service.payment.received",
|
|
76
|
+
version: 1
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
presentations: [
|
|
80
|
+
{
|
|
81
|
+
key: "service-business-os.dashboard",
|
|
82
|
+
version: 1
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: "service-business-os.client.list",
|
|
86
|
+
version: 1
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: "service-business-os.quote.list",
|
|
90
|
+
version: 1
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: "service-business-os.quote.detail",
|
|
94
|
+
version: 1
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
key: "service-business-os.job.board",
|
|
98
|
+
version: 1
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "service-business-os.invoice.list",
|
|
102
|
+
version: 1
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: "service-business-os.payment.list",
|
|
106
|
+
version: 1
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
presentationsTargets: [
|
|
110
|
+
{
|
|
111
|
+
key: "service-business-os.dashboard",
|
|
112
|
+
version: 1,
|
|
113
|
+
targets: ["react", "markdown"]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: "service-business-os.quote.list",
|
|
117
|
+
version: 1,
|
|
118
|
+
targets: ["react", "markdown"]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: "service-business-os.invoice.list",
|
|
122
|
+
version: 1,
|
|
123
|
+
targets: ["react", "markdown"]
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
capabilities: {
|
|
127
|
+
requires: [
|
|
128
|
+
{
|
|
129
|
+
key: "identity",
|
|
130
|
+
version: 1
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
key: "audit-trail",
|
|
134
|
+
version: 1
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
key: "notifications",
|
|
138
|
+
version: 1
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
key: "files",
|
|
142
|
+
version: 1
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
provides: [
|
|
146
|
+
{
|
|
147
|
+
key: "quotes",
|
|
148
|
+
version: 1
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
key: "jobs",
|
|
152
|
+
version: 1
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
key: "invoices",
|
|
156
|
+
version: 1
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
//#endregion
|
|
163
|
+
export { ServiceBusinessFeature };
|
|
164
|
+
//# sourceMappingURL=service.feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.feature.js","names":["ServiceBusinessFeature: FeatureModuleSpec"],"sources":["../src/service.feature.ts"],"sourcesContent":["import type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\nexport const ServiceBusinessFeature: FeatureModuleSpec = {\n meta: {\n key: 'service-business-os',\n title: 'Service Business OS',\n description:\n 'Quotes → jobs → invoices → payments for field services and agencies.',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quotes', 'jobs', 'invoices', 'payments'],\n stability: 'experimental',\n version: 1,\n },\n operations: [\n { key: 'service.client.create', version: 1 },\n { key: 'service.quote.create', version: 1 },\n { key: 'service.quote.accept', version: 1 },\n { key: 'service.job.schedule', version: 1 },\n { key: 'service.job.complete', version: 1 },\n { key: 'service.invoice.issue', version: 1 },\n { key: 'service.payment.record', version: 1 },\n { key: 'service.job.list', version: 1 },\n ],\n events: [\n { key: 'service.quote.sent', version: 1 },\n { key: 'service.quote.accepted', version: 1 },\n { key: 'service.job.scheduled', version: 1 },\n { key: 'service.job.completed', version: 1 },\n { key: 'service.invoice.issued', version: 1 },\n { key: 'service.payment.received', version: 1 },\n ],\n presentations: [\n { key: 'service-business-os.dashboard', version: 1 },\n { key: 'service-business-os.client.list', version: 1 },\n { key: 'service-business-os.quote.list', version: 1 },\n { key: 'service-business-os.quote.detail', version: 1 },\n { key: 'service-business-os.job.board', version: 1 },\n { key: 'service-business-os.invoice.list', version: 1 },\n { key: 'service-business-os.payment.list', version: 1 },\n ],\n presentationsTargets: [\n {\n key: 'service-business-os.dashboard',\n version: 1,\n targets: ['react', 'markdown'],\n },\n {\n key: 'service-business-os.quote.list',\n version: 1,\n targets: ['react', 'markdown'],\n },\n {\n key: 'service-business-os.invoice.list',\n version: 1,\n targets: ['react', 'markdown'],\n },\n ],\n capabilities: {\n requires: [\n { key: 'identity', version: 1 },\n { key: 'audit-trail', version: 1 },\n { key: 'notifications', version: 1 },\n { key: 'files', version: 1 },\n ],\n provides: [\n { key: 'quotes', version: 1 },\n { key: 'jobs', version: 1 },\n { key: 'invoices', version: 1 },\n ],\n },\n};\n"],"mappings":";AAEA,MAAaA,yBAA4C;CACvD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAU;GAAQ;GAAY;GAAW;EAC5D,WAAW;EACX,SAAS;EACV;CACD,YAAY;EACV;GAAE,KAAK;GAAyB,SAAS;GAAG;EAC5C;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAAyB,SAAS;GAAG;EAC5C;GAAE,KAAK;GAA0B,SAAS;GAAG;EAC7C;GAAE,KAAK;GAAoB,SAAS;GAAG;EACxC;CACD,QAAQ;EACN;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAA0B,SAAS;GAAG;EAC7C;GAAE,KAAK;GAAyB,SAAS;GAAG;EAC5C;GAAE,KAAK;GAAyB,SAAS;GAAG;EAC5C;GAAE,KAAK;GAA0B,SAAS;GAAG;EAC7C;GAAE,KAAK;GAA4B,SAAS;GAAG;EAChD;CACD,eAAe;EACb;GAAE,KAAK;GAAiC,SAAS;GAAG;EACpD;GAAE,KAAK;GAAmC,SAAS;GAAG;EACtD;GAAE,KAAK;GAAkC,SAAS;GAAG;EACrD;GAAE,KAAK;GAAoC,SAAS;GAAG;EACvD;GAAE,KAAK;GAAiC,SAAS;GAAG;EACpD;GAAE,KAAK;GAAoC,SAAS;GAAG;EACvD;GAAE,KAAK;GAAoC,SAAS;GAAG;EACxD;CACD,sBAAsB;EACpB;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACF;CACD,cAAc;EACZ,UAAU;GACR;IAAE,KAAK;IAAY,SAAS;IAAG;GAC/B;IAAE,KAAK;IAAe,SAAS;IAAG;GAClC;IAAE,KAAK;IAAiB,SAAS;IAAG;GACpC;IAAE,KAAK;IAAS,SAAS;IAAG;GAC7B;EACD,UAAU;GACR;IAAE,KAAK;IAAU,SAAS;IAAG;GAC7B;IAAE,KAAK;IAAQ,SAAS;IAAG;GAC3B;IAAE,KAAK;IAAY,SAAS;IAAG;GAChC;EACF;CACF"}
|