@contractspec/example.service-business-os 1.46.2 → 1.48.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/dist/client/client.operations.d.ts +2 -2
- package/dist/entities/index.js.map +1 -1
- package/dist/example.d.ts +2 -2
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +4 -2
- package/dist/example.js.map +1 -1
- package/dist/invoice/invoice.operations.d.ts +2 -2
- package/dist/job/job.operations.d.ts +4 -4
- package/dist/payment/payment.operations.d.ts +16 -16
- package/dist/payment/payment.schema.d.ts +15 -15
- package/dist/presentations.d.ts +8 -8
- package/dist/presentations.d.ts.map +1 -1
- package/dist/presentations.js +15 -15
- package/dist/presentations.js.map +1 -1
- package/dist/quote/quote.operations.d.ts +35 -35
- 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 +2 -2
- package/dist/service.feature.d.ts.map +1 -1
- package/dist/service.feature.js +4 -2
- package/dist/service.feature.js.map +1 -1
- package/package.json +6 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _contractspec_lib_schema110 from "@contractspec/lib.schema";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _contractspec_lib_contracts22 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/client/client.operations.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Create a new client.
|
|
7
7
|
*/
|
|
8
|
-
declare const CreateClientContract:
|
|
8
|
+
declare const CreateClientContract: _contractspec_lib_contracts22.OperationSpec<_contractspec_lib_schema110.SchemaModel<{
|
|
9
9
|
name: {
|
|
10
10
|
type: _contractspec_lib_schema110.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["serviceBusinessSchemaContribution: ModuleSchemaContribution"],"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,4BAA4B,CAAC;EACzD,MAAM,MAAM,OAAO,EAAE,aAAa,uBAAuB,CAAC;EAC1D,cAAc,MAAM,OAAO;GACzB,aAAa;GACb,YA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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,4BAA4B,CAAC;EACzD,MAAM,MAAM,OAAO,EAAE,aAAa,uBAAuB,CAAC;EAC1D,cAAc,MAAM,OAAO;GACzB,aAAa;GACb,YAAY;GACb,CAAC;EACF,OAAO,MAAM,OAAO;GAA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contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/example.d.ts
|
|
4
|
-
declare const example: ExampleSpec;
|
|
4
|
+
declare const example: _contractspec_lib_contracts18.ExampleSpec;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { example as default };
|
|
7
7
|
//# sourceMappingURL=example.d.ts.map
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,
|
|
1
|
+
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAiCJ,6BAAA,CAjCW"}
|
package/dist/example.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/example.ts
|
|
2
|
-
const example = {
|
|
4
|
+
const example = defineExample({
|
|
3
5
|
meta: {
|
|
4
6
|
key: "service-business-os",
|
|
5
7
|
version: "1.0.0",
|
|
@@ -43,7 +45,7 @@ const example = {
|
|
|
43
45
|
},
|
|
44
46
|
mcp: { enabled: true }
|
|
45
47
|
}
|
|
46
|
-
};
|
|
48
|
+
});
|
|
47
49
|
var example_default = example;
|
|
48
50
|
|
|
49
51
|
//#endregion
|
package/dist/example.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[
|
|
1
|
+
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'service-business-os',\n version: '1.0.0',\n title: 'Service Business OS',\n description:\n 'Service business operating system: jobs, clients, scheduling, invoicing, and ops dashboards.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['service-business', 'jobs', 'scheduling', 'invoicing'],\n },\n docs: {\n rootDocId: 'docs.examples.service-business-os',\n },\n entrypoints: {\n packageName: '@contractspec/example.service-business-os',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAoB;GAAQ;GAAc;GAAY;EAC9D;CACD,MAAM,EACJ,WAAW,qCACZ;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _contractspec_lib_schema294 from "@contractspec/lib.schema";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _contractspec_lib_contracts23 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/invoice/invoice.operations.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Issue an invoice.
|
|
7
7
|
*/
|
|
8
|
-
declare const IssueInvoiceContract:
|
|
8
|
+
declare const IssueInvoiceContract: _contractspec_lib_contracts23.OperationSpec<_contractspec_lib_schema294.SchemaModel<{
|
|
9
9
|
jobId: {
|
|
10
10
|
type: _contractspec_lib_schema294.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _contractspec_lib_schema324 from "@contractspec/lib.schema";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _contractspec_lib_contracts24 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/job/job.operations.d.ts
|
|
5
5
|
declare const ListJobsInputModel: _contractspec_lib_schema324.SchemaModel<{
|
|
@@ -64,7 +64,7 @@ declare const ListJobsOutputModel: _contractspec_lib_schema324.SchemaModel<{
|
|
|
64
64
|
isOptional: false;
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
|
-
declare const ListJobsOperation:
|
|
67
|
+
declare const ListJobsOperation: _contractspec_lib_contracts24.OperationSpec<_contractspec_lib_schema324.SchemaModel<{
|
|
68
68
|
status: {
|
|
69
69
|
type: _contractspec_lib_schema324.FieldType<string, string>;
|
|
70
70
|
isOptional: true;
|
|
@@ -128,7 +128,7 @@ declare const ListJobsOperation: _contractspec_lib_contracts13.OperationSpec<_co
|
|
|
128
128
|
/**
|
|
129
129
|
* Schedule a job.
|
|
130
130
|
*/
|
|
131
|
-
declare const ScheduleJobContract:
|
|
131
|
+
declare const ScheduleJobContract: _contractspec_lib_contracts24.OperationSpec<_contractspec_lib_schema324.SchemaModel<{
|
|
132
132
|
quoteId: {
|
|
133
133
|
type: _contractspec_lib_schema324.FieldType<string, string>;
|
|
134
134
|
isOptional: false;
|
|
@@ -186,7 +186,7 @@ declare const ScheduleJobContract: _contractspec_lib_contracts13.OperationSpec<_
|
|
|
186
186
|
/**
|
|
187
187
|
* Complete a job.
|
|
188
188
|
*/
|
|
189
|
-
declare const CompleteJobContract:
|
|
189
|
+
declare const CompleteJobContract: _contractspec_lib_contracts24.OperationSpec<_contractspec_lib_schema324.SchemaModel<{
|
|
190
190
|
jobId: {
|
|
191
191
|
type: _contractspec_lib_schema324.FieldType<string, string>;
|
|
192
192
|
isOptional: false;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema403 from "@contractspec/lib.schema";
|
|
2
|
+
import * as _contractspec_lib_contracts27 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/payment/payment.operations.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Record a payment.
|
|
7
7
|
*/
|
|
8
|
-
declare const RecordPaymentContract:
|
|
8
|
+
declare const RecordPaymentContract: _contractspec_lib_contracts27.OperationSpec<_contractspec_lib_schema403.SchemaModel<{
|
|
9
9
|
invoiceId: {
|
|
10
|
-
type:
|
|
10
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
amount: {
|
|
14
|
-
type:
|
|
14
|
+
type: _contractspec_lib_schema403.FieldType<number, number>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
method: {
|
|
18
|
-
type:
|
|
18
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
19
19
|
isOptional: false;
|
|
20
20
|
};
|
|
21
21
|
reference: {
|
|
22
|
-
type:
|
|
22
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
23
23
|
isOptional: true;
|
|
24
24
|
};
|
|
25
25
|
receivedAt: {
|
|
26
|
-
type:
|
|
26
|
+
type: _contractspec_lib_schema403.FieldType<Date, string>;
|
|
27
27
|
isOptional: true;
|
|
28
28
|
};
|
|
29
|
-
}>,
|
|
29
|
+
}>, _contractspec_lib_schema403.SchemaModel<{
|
|
30
30
|
id: {
|
|
31
|
-
type:
|
|
31
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
32
32
|
isOptional: false;
|
|
33
33
|
};
|
|
34
34
|
invoiceId: {
|
|
35
|
-
type:
|
|
35
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
36
36
|
isOptional: false;
|
|
37
37
|
};
|
|
38
38
|
amount: {
|
|
39
|
-
type:
|
|
39
|
+
type: _contractspec_lib_schema403.FieldType<number, number>;
|
|
40
40
|
isOptional: false;
|
|
41
41
|
};
|
|
42
42
|
currency: {
|
|
43
|
-
type:
|
|
43
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
44
44
|
isOptional: false;
|
|
45
45
|
};
|
|
46
46
|
method: {
|
|
47
|
-
type:
|
|
47
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
48
48
|
isOptional: false;
|
|
49
49
|
};
|
|
50
50
|
reference: {
|
|
51
|
-
type:
|
|
51
|
+
type: _contractspec_lib_schema403.FieldType<string, string>;
|
|
52
52
|
isOptional: true;
|
|
53
53
|
};
|
|
54
54
|
receivedAt: {
|
|
55
|
-
type:
|
|
55
|
+
type: _contractspec_lib_schema403.FieldType<Date, string>;
|
|
56
56
|
isOptional: false;
|
|
57
57
|
};
|
|
58
58
|
}>, undefined>;
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema417 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/payment/payment.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Payment applied to invoice.
|
|
6
6
|
*/
|
|
7
|
-
declare const PaymentModel:
|
|
7
|
+
declare const PaymentModel: _contractspec_lib_schema417.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
invoiceId: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
amount: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema417.FieldType<number, number>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
currency: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
method: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
reference: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
30
30
|
isOptional: true;
|
|
31
31
|
};
|
|
32
32
|
receivedAt: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema417.FieldType<Date, string>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
}>;
|
|
37
37
|
/**
|
|
38
38
|
* Input for recording a payment.
|
|
39
39
|
*/
|
|
40
|
-
declare const RecordPaymentInputModel:
|
|
40
|
+
declare const RecordPaymentInputModel: _contractspec_lib_schema417.SchemaModel<{
|
|
41
41
|
invoiceId: {
|
|
42
|
-
type:
|
|
42
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
43
43
|
isOptional: false;
|
|
44
44
|
};
|
|
45
45
|
amount: {
|
|
46
|
-
type:
|
|
46
|
+
type: _contractspec_lib_schema417.FieldType<number, number>;
|
|
47
47
|
isOptional: false;
|
|
48
48
|
};
|
|
49
49
|
method: {
|
|
50
|
-
type:
|
|
50
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
51
51
|
isOptional: false;
|
|
52
52
|
};
|
|
53
53
|
reference: {
|
|
54
|
-
type:
|
|
54
|
+
type: _contractspec_lib_schema417.FieldType<string, string>;
|
|
55
55
|
isOptional: true;
|
|
56
56
|
};
|
|
57
57
|
receivedAt: {
|
|
58
|
-
type:
|
|
58
|
+
type: _contractspec_lib_schema417.FieldType<Date, string>;
|
|
59
59
|
isOptional: true;
|
|
60
60
|
};
|
|
61
61
|
}>;
|
package/dist/presentations.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts11 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/presentations.d.ts
|
|
4
|
-
declare const ServiceDashboardPresentation: PresentationSpec;
|
|
5
|
-
declare const ClientListPresentation: PresentationSpec;
|
|
6
|
-
declare const QuoteListPresentation: PresentationSpec;
|
|
7
|
-
declare const QuoteDetailPresentation: PresentationSpec;
|
|
8
|
-
declare const JobBoardPresentation: PresentationSpec;
|
|
9
|
-
declare const InvoiceListPresentation: PresentationSpec;
|
|
10
|
-
declare const PaymentListPresentation: PresentationSpec;
|
|
4
|
+
declare const ServiceDashboardPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
5
|
+
declare const ClientListPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
6
|
+
declare const QuoteListPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
7
|
+
declare const QuoteDetailPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
8
|
+
declare const JobBoardPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
9
|
+
declare const InvoiceListPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
10
|
+
declare const PaymentListPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ClientListPresentation, InvoiceListPresentation, JobBoardPresentation, PaymentListPresentation, QuoteDetailPresentation, QuoteListPresentation, ServiceDashboardPresentation };
|
|
13
13
|
//# sourceMappingURL=presentations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentations.d.ts","names":[],"sources":["../src/presentations.ts"],"sourcesContent":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"presentations.d.ts","names":[],"sources":["../src/presentations.ts"],"sourcesContent":[],"mappings":";;;cAEa,8BAsBX,6BAAA,CAtBuC;cAwB5B,wBAsBX,6BAAA,CAtBiC;cAwBtB,uBAsBX,6BAAA,CAtBgC;AAhDrB,cAwEA,uBAlDX,EAwEA,6BAAA,CAtBkC,gBAlDlC;AAEW,cAwEA,oBAlDX,EAwEA,6BAAA,CAtB+B,gBAlD/B;AAEW,cAwEA,uBAlDX,EAwEA,6BAAA,CAtBkC,gBAlDlC;AAEW,cAwEA,uBAlDX,EAwEA,6BAAA,CAtBkC,gBAlDlC"}
|
package/dist/presentations.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
1
|
+
import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/presentations.ts
|
|
4
|
-
const ServiceDashboardPresentation = {
|
|
4
|
+
const ServiceDashboardPresentation = definePresentation({
|
|
5
5
|
meta: {
|
|
6
6
|
key: "service-business-os.dashboard",
|
|
7
7
|
version: "1.0.0",
|
|
@@ -21,8 +21,8 @@ const ServiceDashboardPresentation = {
|
|
|
21
21
|
},
|
|
22
22
|
targets: ["react", "markdown"],
|
|
23
23
|
policy: { flags: ["service.dashboard.enabled"] }
|
|
24
|
-
};
|
|
25
|
-
const ClientListPresentation = {
|
|
24
|
+
});
|
|
25
|
+
const ClientListPresentation = definePresentation({
|
|
26
26
|
meta: {
|
|
27
27
|
key: "service-business-os.client.list",
|
|
28
28
|
version: "1.0.0",
|
|
@@ -46,8 +46,8 @@ const ClientListPresentation = {
|
|
|
46
46
|
},
|
|
47
47
|
targets: ["react", "markdown"],
|
|
48
48
|
policy: { flags: ["service.clients.enabled"] }
|
|
49
|
-
};
|
|
50
|
-
const QuoteListPresentation = {
|
|
49
|
+
});
|
|
50
|
+
const QuoteListPresentation = definePresentation({
|
|
51
51
|
meta: {
|
|
52
52
|
key: "service-business-os.quote.list",
|
|
53
53
|
version: "1.0.0",
|
|
@@ -71,8 +71,8 @@ const QuoteListPresentation = {
|
|
|
71
71
|
},
|
|
72
72
|
targets: ["react", "markdown"],
|
|
73
73
|
policy: { flags: ["service.quotes.enabled"] }
|
|
74
|
-
};
|
|
75
|
-
const QuoteDetailPresentation = {
|
|
74
|
+
});
|
|
75
|
+
const QuoteDetailPresentation = definePresentation({
|
|
76
76
|
meta: {
|
|
77
77
|
key: "service-business-os.quote.detail",
|
|
78
78
|
version: "1.0.0",
|
|
@@ -96,8 +96,8 @@ const QuoteDetailPresentation = {
|
|
|
96
96
|
},
|
|
97
97
|
targets: ["react", "markdown"],
|
|
98
98
|
policy: { flags: ["service.quotes.enabled"] }
|
|
99
|
-
};
|
|
100
|
-
const JobBoardPresentation = {
|
|
99
|
+
});
|
|
100
|
+
const JobBoardPresentation = definePresentation({
|
|
101
101
|
meta: {
|
|
102
102
|
key: "service-business-os.job.board",
|
|
103
103
|
version: "1.0.0",
|
|
@@ -122,8 +122,8 @@ const JobBoardPresentation = {
|
|
|
122
122
|
},
|
|
123
123
|
targets: ["react"],
|
|
124
124
|
policy: { flags: ["service.jobs.enabled"] }
|
|
125
|
-
};
|
|
126
|
-
const InvoiceListPresentation = {
|
|
125
|
+
});
|
|
126
|
+
const InvoiceListPresentation = definePresentation({
|
|
127
127
|
meta: {
|
|
128
128
|
key: "service-business-os.invoice.list",
|
|
129
129
|
version: "1.0.0",
|
|
@@ -147,8 +147,8 @@ const InvoiceListPresentation = {
|
|
|
147
147
|
},
|
|
148
148
|
targets: ["react", "markdown"],
|
|
149
149
|
policy: { flags: ["service.invoices.enabled"] }
|
|
150
|
-
};
|
|
151
|
-
const PaymentListPresentation = {
|
|
150
|
+
});
|
|
151
|
+
const PaymentListPresentation = definePresentation({
|
|
152
152
|
meta: {
|
|
153
153
|
key: "service-business-os.payment.list",
|
|
154
154
|
version: "1.0.0",
|
|
@@ -172,7 +172,7 @@ const PaymentListPresentation = {
|
|
|
172
172
|
},
|
|
173
173
|
targets: ["react", "markdown"],
|
|
174
174
|
policy: { flags: ["service.payments.enabled"] }
|
|
175
|
-
};
|
|
175
|
+
});
|
|
176
176
|
|
|
177
177
|
//#endregion
|
|
178
178
|
export { ClientListPresentation, InvoiceListPresentation, JobBoardPresentation, PaymentListPresentation, QuoteDetailPresentation, QuoteListPresentation, ServiceDashboardPresentation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentations.js","names":[
|
|
1
|
+
{"version":3,"file":"presentations.js","names":[],"sources":["../src/presentations.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const ServiceDashboardPresentation = definePresentation({\n meta: {\n key: 'service-business-os.dashboard',\n version: '1.0.0',\n title: 'Service Dashboard',\n description: 'Service business dashboard with overview metrics',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'dashboard'],\n stability: StabilityEnum.Experimental,\n goal: 'Overview of service business metrics',\n context: 'Service home page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ServiceDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.dashboard.enabled'],\n },\n});\n\nexport const ClientListPresentation = definePresentation({\n meta: {\n key: 'service-business-os.client.list',\n version: '1.0.0',\n title: 'Client List',\n description: 'List of service clients',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'clients', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Browse and manage service clients',\n context: 'Client management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ClientList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.clients.enabled'],\n },\n});\n\nexport const QuoteListPresentation = definePresentation({\n meta: {\n key: 'service-business-os.quote.list',\n version: '1.0.0',\n title: 'Quote List',\n description: 'List of quotes with status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quotes', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track and manage quotes',\n context: 'Quote management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n});\n\nexport const QuoteDetailPresentation = definePresentation({\n meta: {\n key: 'service-business-os.quote.detail',\n version: '1.0.0',\n title: 'Quote Details',\n description: 'Quote detail with line items',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'quote', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'View and edit quote details',\n context: 'Quote inspection',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'QuoteDetail',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.quotes.enabled'],\n },\n});\n\nexport const JobBoardPresentation = definePresentation({\n meta: {\n key: 'service-business-os.job.board',\n version: '1.0.0',\n title: 'Job Board',\n description: 'Job board with kanban view',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'jobs', 'board', 'kanban'],\n stability: StabilityEnum.Experimental,\n goal: 'Visual job management',\n context: 'Field service scheduling',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'JobBoard',\n },\n targets: ['react'],\n policy: {\n flags: ['service.jobs.enabled'],\n },\n});\n\nexport const InvoiceListPresentation = definePresentation({\n meta: {\n key: 'service-business-os.invoice.list',\n version: '1.0.0',\n title: 'Invoice List',\n description: 'List of invoices with payment status',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'invoices', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track invoices and payments',\n context: 'Billing management',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'InvoiceList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.invoices.enabled'],\n },\n});\n\nexport const PaymentListPresentation = definePresentation({\n meta: {\n key: 'service-business-os.payment.list',\n version: '1.0.0',\n title: 'Payment List',\n description: 'List of payments received',\n domain: 'services',\n owners: ['@service-os'],\n tags: ['services', 'payments', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Track received payments',\n context: 'Payment reconciliation',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'PaymentList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['service.payments.enabled'],\n },\n});\n"],"mappings":";;;AAEA,MAAa,+BAA+B,mBAAmB;CAC7D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QA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AAyB,EAClC;CACF,CAAC;AAEF,MAAa,uBAAuB,mBAAmB;CACrD,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,CAAC;AAEF,MAAa,0BAA0B,mBAAmB;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF,CAAC;AAEF,MAAa,0BAA0B,mBAAmB;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM;GAAC;GAAY;GAAY;GAAO;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF,CAAC"}
|
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema431 from "@contractspec/lib.schema";
|
|
2
|
+
import * as _contractspec_lib_contracts28 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/quote/quote.operations.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Create a new quote.
|
|
7
7
|
*/
|
|
8
|
-
declare const CreateQuoteContract:
|
|
8
|
+
declare const CreateQuoteContract: _contractspec_lib_contracts28.OperationSpec<_contractspec_lib_schema431.SchemaModel<{
|
|
9
9
|
clientId: {
|
|
10
|
-
type:
|
|
10
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
title: {
|
|
14
|
-
type:
|
|
14
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
description: {
|
|
18
|
-
type:
|
|
18
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
19
19
|
isOptional: true;
|
|
20
20
|
};
|
|
21
21
|
amount: {
|
|
22
|
-
type:
|
|
22
|
+
type: _contractspec_lib_schema431.FieldType<number, number>;
|
|
23
23
|
isOptional: false;
|
|
24
24
|
};
|
|
25
25
|
currency: {
|
|
26
|
-
type:
|
|
26
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
27
27
|
isOptional: true;
|
|
28
28
|
};
|
|
29
29
|
validUntil: {
|
|
30
|
-
type:
|
|
30
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
31
31
|
isOptional: true;
|
|
32
32
|
};
|
|
33
33
|
orgId: {
|
|
34
|
-
type:
|
|
34
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
35
35
|
isOptional: false;
|
|
36
36
|
};
|
|
37
37
|
ownerId: {
|
|
38
|
-
type:
|
|
38
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
39
39
|
isOptional: false;
|
|
40
40
|
};
|
|
41
|
-
}>,
|
|
41
|
+
}>, _contractspec_lib_schema431.SchemaModel<{
|
|
42
42
|
id: {
|
|
43
|
-
type:
|
|
43
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
44
44
|
isOptional: false;
|
|
45
45
|
};
|
|
46
46
|
clientId: {
|
|
47
|
-
type:
|
|
47
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
48
48
|
isOptional: false;
|
|
49
49
|
};
|
|
50
50
|
title: {
|
|
51
|
-
type:
|
|
51
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
52
52
|
isOptional: false;
|
|
53
53
|
};
|
|
54
54
|
description: {
|
|
55
|
-
type:
|
|
55
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
56
56
|
isOptional: true;
|
|
57
57
|
};
|
|
58
58
|
amount: {
|
|
59
|
-
type:
|
|
59
|
+
type: _contractspec_lib_schema431.FieldType<number, number>;
|
|
60
60
|
isOptional: false;
|
|
61
61
|
};
|
|
62
62
|
currency: {
|
|
63
|
-
type:
|
|
63
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
64
64
|
isOptional: false;
|
|
65
65
|
};
|
|
66
66
|
status: {
|
|
67
|
-
type:
|
|
67
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
68
68
|
isOptional: false;
|
|
69
69
|
};
|
|
70
70
|
validUntil: {
|
|
71
|
-
type:
|
|
71
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
72
72
|
isOptional: true;
|
|
73
73
|
};
|
|
74
74
|
createdAt: {
|
|
75
|
-
type:
|
|
75
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
76
76
|
isOptional: false;
|
|
77
77
|
};
|
|
78
78
|
}>, undefined>;
|
|
79
79
|
/**
|
|
80
80
|
* Accept a quote.
|
|
81
81
|
*/
|
|
82
|
-
declare const AcceptQuoteContract:
|
|
82
|
+
declare const AcceptQuoteContract: _contractspec_lib_contracts28.OperationSpec<_contractspec_lib_schema431.SchemaModel<{
|
|
83
83
|
quoteId: {
|
|
84
|
-
type:
|
|
84
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
85
85
|
isOptional: false;
|
|
86
86
|
};
|
|
87
87
|
acceptedBy: {
|
|
88
|
-
type:
|
|
88
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
89
89
|
isOptional: false;
|
|
90
90
|
};
|
|
91
91
|
notes: {
|
|
92
|
-
type:
|
|
92
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
93
93
|
isOptional: true;
|
|
94
94
|
};
|
|
95
|
-
}>,
|
|
95
|
+
}>, _contractspec_lib_schema431.SchemaModel<{
|
|
96
96
|
id: {
|
|
97
|
-
type:
|
|
97
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
98
98
|
isOptional: false;
|
|
99
99
|
};
|
|
100
100
|
clientId: {
|
|
101
|
-
type:
|
|
101
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
102
102
|
isOptional: false;
|
|
103
103
|
};
|
|
104
104
|
title: {
|
|
105
|
-
type:
|
|
105
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
106
106
|
isOptional: false;
|
|
107
107
|
};
|
|
108
108
|
description: {
|
|
109
|
-
type:
|
|
109
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
110
110
|
isOptional: true;
|
|
111
111
|
};
|
|
112
112
|
amount: {
|
|
113
|
-
type:
|
|
113
|
+
type: _contractspec_lib_schema431.FieldType<number, number>;
|
|
114
114
|
isOptional: false;
|
|
115
115
|
};
|
|
116
116
|
currency: {
|
|
117
|
-
type:
|
|
117
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
118
118
|
isOptional: false;
|
|
119
119
|
};
|
|
120
120
|
status: {
|
|
121
|
-
type:
|
|
121
|
+
type: _contractspec_lib_schema431.FieldType<string, string>;
|
|
122
122
|
isOptional: false;
|
|
123
123
|
};
|
|
124
124
|
validUntil: {
|
|
125
|
-
type:
|
|
125
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
126
126
|
isOptional: true;
|
|
127
127
|
};
|
|
128
128
|
createdAt: {
|
|
129
|
-
type:
|
|
129
|
+
type: _contractspec_lib_schema431.FieldType<Date, string>;
|
|
130
130
|
isOptional: false;
|
|
131
131
|
};
|
|
132
132
|
}>, undefined>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts19 from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/service-business-os.capability.d.ts
|
|
4
|
+
declare const QuotesCapability: _contractspec_lib_contracts19.CapabilitySpec;
|
|
5
|
+
declare const InvoicesCapability: _contractspec_lib_contracts19.CapabilitySpec;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { InvoicesCapability, QuotesCapability };
|
|
8
|
+
//# sourceMappingURL=service-business-os.capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-business-os.capability.d.ts","names":[],"sources":["../src/service-business-os.capability.ts"],"sourcesContent":[],"mappings":";;;cAEa,kBAUX,6BAAA,CAV2B;cAYhB,oBAUX,6BAAA,CAV6B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StabilityEnum, defineCapability } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/service-business-os.capability.ts
|
|
4
|
+
const QuotesCapability = defineCapability({ meta: {
|
|
5
|
+
key: "quotes",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
kind: "api",
|
|
8
|
+
stability: StabilityEnum.Experimental,
|
|
9
|
+
description: "Quote generation and management for service businesses",
|
|
10
|
+
owners: ["platform.core"],
|
|
11
|
+
tags: [
|
|
12
|
+
"quotes",
|
|
13
|
+
"service",
|
|
14
|
+
"business"
|
|
15
|
+
]
|
|
16
|
+
} });
|
|
17
|
+
const InvoicesCapability = defineCapability({ meta: {
|
|
18
|
+
key: "invoices",
|
|
19
|
+
version: "1.0.0",
|
|
20
|
+
kind: "api",
|
|
21
|
+
stability: StabilityEnum.Experimental,
|
|
22
|
+
description: "Invoice creation and payment tracking",
|
|
23
|
+
owners: ["platform.finance"],
|
|
24
|
+
tags: ["invoices", "billing"]
|
|
25
|
+
} });
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { InvoicesCapability, QuotesCapability };
|
|
29
|
+
//# sourceMappingURL=service-business-os.capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-business-os.capability.js","names":[],"sources":["../src/service-business-os.capability.ts"],"sourcesContent":["import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const QuotesCapability = defineCapability({\n meta: {\n key: 'quotes',\n version: '1.0.0',\n kind: 'api',\n stability: StabilityEnum.Experimental,\n description: 'Quote generation and management for service businesses',\n owners: ['platform.core'],\n tags: ['quotes', 'service', 'business'],\n },\n});\n\nexport const InvoicesCapability = defineCapability({\n meta: {\n key: 'invoices',\n version: '1.0.0',\n kind: 'api',\n stability: StabilityEnum.Experimental,\n description: 'Invoice creation and payment tracking',\n owners: ['platform.finance'],\n tags: ['invoices', 'billing'],\n },\n});\n"],"mappings":";;;AAEA,MAAa,mBAAmB,iBAAiB,EAC/C,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM;EAAC;EAAU;EAAW;EAAW;CACxC,EACF,CAAC;AAEF,MAAa,qBAAqB,iBAAiB,EACjD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,mBAAmB;CAC5B,MAAM,CAAC,YAAY,UAAU;CAC9B,EACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts21 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/service.feature.d.ts
|
|
4
|
-
declare const ServiceBusinessFeature: FeatureModuleSpec;
|
|
4
|
+
declare const ServiceBusinessFeature: _contractspec_lib_contracts21.FeatureModuleSpec;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { ServiceBusinessFeature };
|
|
7
7
|
//# sourceMappingURL=service.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.feature.d.ts","names":[],"sources":["../src/service.feature.ts"],"sourcesContent":[],"mappings":";;;cAEa,
|
|
1
|
+
{"version":3,"file":"service.feature.d.ts","names":[],"sources":["../src/service.feature.ts"],"sourcesContent":[],"mappings":";;;cAEa,wBAqEX,6BAAA,CArEiC"}
|
package/dist/service.feature.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { defineFeature } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/service.feature.ts
|
|
2
|
-
const ServiceBusinessFeature = {
|
|
4
|
+
const ServiceBusinessFeature = defineFeature({
|
|
3
5
|
meta: {
|
|
4
6
|
key: "service-business-os",
|
|
5
7
|
title: "Service Business OS",
|
|
@@ -157,7 +159,7 @@ const ServiceBusinessFeature = {
|
|
|
157
159
|
}
|
|
158
160
|
]
|
|
159
161
|
}
|
|
160
|
-
};
|
|
162
|
+
});
|
|
161
163
|
|
|
162
164
|
//#endregion
|
|
163
165
|
export { ServiceBusinessFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.feature.js","names":[
|
|
1
|
+
{"version":3,"file":"service.feature.js","names":[],"sources":["../src/service.feature.ts"],"sourcesContent":["import { defineFeature } from '@contractspec/lib.contracts';\n\nexport const ServiceBusinessFeature = defineFeature({\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.0.0',\n },\n operations: [\n { key: 'service.client.create', version: '1.0.0' },\n { key: 'service.quote.create', version: '1.0.0' },\n { key: 'service.quote.accept', version: '1.0.0' },\n { key: 'service.job.schedule', version: '1.0.0' },\n { key: 'service.job.complete', version: '1.0.0' },\n { key: 'service.invoice.issue', version: '1.0.0' },\n { key: 'service.payment.record', version: '1.0.0' },\n { key: 'service.job.list', version: '1.0.0' },\n ],\n events: [\n { key: 'service.quote.sent', version: '1.0.0' },\n { key: 'service.quote.accepted', version: '1.0.0' },\n { key: 'service.job.scheduled', version: '1.0.0' },\n { key: 'service.job.completed', version: '1.0.0' },\n { key: 'service.invoice.issued', version: '1.0.0' },\n { key: 'service.payment.received', version: '1.0.0' },\n ],\n presentations: [\n { key: 'service-business-os.dashboard', version: '1.0.0' },\n { key: 'service-business-os.client.list', version: '1.0.0' },\n { key: 'service-business-os.quote.list', version: '1.0.0' },\n { key: 'service-business-os.quote.detail', version: '1.0.0' },\n { key: 'service-business-os.job.board', version: '1.0.0' },\n { key: 'service-business-os.invoice.list', version: '1.0.0' },\n { key: 'service-business-os.payment.list', version: '1.0.0' },\n ],\n presentationsTargets: [\n {\n key: 'service-business-os.dashboard',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'service-business-os.quote.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'service-business-os.invoice.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n { key: 'files', version: '1.0.0' },\n ],\n provides: [\n { key: 'quotes', version: '1.0.0' },\n { key: 'jobs', version: '1.0.0' },\n { key: 'invoices', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":";;;AAEA,MAAa,yBAAyB,cAAc;CAClD,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;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C;IAAE,KAAK;IAAQ,SAAS;IAAS;GACjC;IAAE,KAAK;IAAY,SAAS;IAAS;GACtC;EACF;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.service-business-os",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"description": "Service Business OS example (clients, quotes, jobs, invoices) for ContractSpec",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
5
|
"types": "./dist/index.d.ts",
|
|
7
6
|
"type": "module",
|
|
8
7
|
"scripts": {
|
|
@@ -18,12 +17,12 @@
|
|
|
18
17
|
"lint:check": "eslint src"
|
|
19
18
|
},
|
|
20
19
|
"dependencies": {
|
|
21
|
-
"@contractspec/lib.schema": "1.
|
|
22
|
-
"@contractspec/lib.contracts": "1.
|
|
20
|
+
"@contractspec/lib.schema": "1.48.0",
|
|
21
|
+
"@contractspec/lib.contracts": "1.48.0"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
|
-
"@contractspec/tool.typescript": "1.
|
|
26
|
-
"@contractspec/tool.tsdown": "1.
|
|
24
|
+
"@contractspec/tool.typescript": "1.48.0",
|
|
25
|
+
"@contractspec/tool.tsdown": "1.48.0",
|
|
27
26
|
"typescript": "^5.9.3"
|
|
28
27
|
},
|
|
29
28
|
"exports": {
|
|
@@ -51,10 +50,10 @@
|
|
|
51
50
|
"./quote": "./dist/quote/index.js",
|
|
52
51
|
"./quote/quote.operations": "./dist/quote/quote.operations.js",
|
|
53
52
|
"./quote/quote.schema": "./dist/quote/quote.schema.js",
|
|
53
|
+
"./service-business-os.capability": "./dist/service-business-os.capability.js",
|
|
54
54
|
"./service.feature": "./dist/service.feature.js",
|
|
55
55
|
"./*": "./*"
|
|
56
56
|
},
|
|
57
|
-
"module": "./dist/index.js",
|
|
58
57
|
"files": [
|
|
59
58
|
"dist",
|
|
60
59
|
"README.md"
|