@contractspec/example.service-business-os 1.57.0 → 1.58.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/browser/client/client.operations.js +72 -0
- package/dist/browser/client/client.schema.js +31 -0
- package/dist/browser/client/index.js +74 -0
- package/dist/browser/docs/index.js +96 -0
- package/dist/browser/docs/service-business-os.docblock.js +96 -0
- package/dist/browser/entities/index.js +246 -0
- package/dist/browser/events.js +135 -0
- package/dist/browser/example.js +39 -0
- package/dist/browser/handlers/index.js +5 -0
- package/dist/browser/index.js +752 -0
- package/dist/browser/invoice/index.js +77 -0
- package/dist/browser/invoice/invoice.operations.js +75 -0
- package/dist/browser/invoice/invoice.schema.js +34 -0
- package/dist/browser/job/index.js +175 -0
- package/dist/browser/job/job.operations.js +172 -0
- package/dist/browser/job/job.schema.js +41 -0
- package/dist/browser/operations/index.js +506 -0
- package/dist/browser/payment/index.js +69 -0
- package/dist/browser/payment/payment.operations.js +67 -0
- package/dist/browser/payment/payment.schema.js +30 -0
- package/dist/browser/presentations/index.js +13 -0
- package/dist/browser/presentations.js +172 -0
- package/dist/browser/quote/index.js +122 -0
- package/dist/browser/quote/quote.operations.js +119 -0
- package/dist/browser/quote/quote.schema.js +45 -0
- package/dist/browser/service-business-os.capability.js +28 -0
- package/dist/browser/service.feature.js +74 -0
- package/dist/client/client.operations.d.ts +54 -60
- package/dist/client/client.operations.d.ts.map +1 -1
- package/dist/client/client.operations.js +71 -51
- package/dist/client/client.schema.d.ts +54 -59
- package/dist/client/client.schema.d.ts.map +1 -1
- package/dist/client/client.schema.js +30 -75
- package/dist/client/index.d.ts +6 -3
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +74 -3
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +97 -1
- package/dist/docs/service-business-os.docblock.d.ts +2 -1
- package/dist/docs/service-business-os.docblock.d.ts.map +1 -0
- package/dist/docs/service-business-os.docblock.js +52 -64
- package/dist/entities/index.d.ts +156 -161
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +236 -278
- package/dist/events.d.ts +253 -259
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +123 -217
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +38 -50
- package/dist/handlers/index.d.ts +11 -16
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +5 -5
- package/dist/index.d.ts +13 -18
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +752 -18
- package/dist/invoice/index.d.ts +6 -3
- package/dist/invoice/index.d.ts.map +1 -0
- package/dist/invoice/index.js +77 -3
- package/dist/invoice/invoice.operations.d.ts +54 -60
- package/dist/invoice/invoice.operations.d.ts.map +1 -1
- package/dist/invoice/invoice.operations.js +74 -55
- package/dist/invoice/invoice.schema.d.ts +54 -59
- package/dist/invoice/invoice.schema.d.ts.map +1 -1
- package/dist/invoice/invoice.schema.js +33 -75
- package/dist/job/index.d.ts +6 -3
- package/dist/job/index.d.ts.map +1 -0
- package/dist/job/index.js +175 -3
- package/dist/job/job.operations.d.ts +220 -226
- package/dist/job/job.operations.d.ts.map +1 -1
- package/dist/job/job.operations.js +167 -169
- package/dist/job/job.schema.d.ts +67 -72
- package/dist/job/job.schema.d.ts.map +1 -1
- package/dist/job/job.schema.js +39 -95
- package/dist/node/client/client.operations.js +72 -0
- package/dist/node/client/client.schema.js +31 -0
- package/dist/node/client/index.js +74 -0
- package/dist/node/docs/index.js +96 -0
- package/dist/node/docs/service-business-os.docblock.js +96 -0
- package/dist/node/entities/index.js +246 -0
- package/dist/node/events.js +135 -0
- package/dist/node/example.js +39 -0
- package/dist/node/handlers/index.js +5 -0
- package/dist/node/index.js +752 -0
- package/dist/node/invoice/index.js +77 -0
- package/dist/node/invoice/invoice.operations.js +75 -0
- package/dist/node/invoice/invoice.schema.js +34 -0
- package/dist/node/job/index.js +175 -0
- package/dist/node/job/job.operations.js +172 -0
- package/dist/node/job/job.schema.js +41 -0
- package/dist/node/operations/index.js +506 -0
- package/dist/node/payment/index.js +69 -0
- package/dist/node/payment/payment.operations.js +67 -0
- package/dist/node/payment/payment.schema.js +30 -0
- package/dist/node/presentations/index.js +13 -0
- package/dist/node/presentations.js +172 -0
- package/dist/node/quote/index.js +122 -0
- package/dist/node/quote/quote.operations.js +119 -0
- package/dist/node/quote/quote.schema.js +45 -0
- package/dist/node/service-business-os.capability.js +28 -0
- package/dist/node/service.feature.js +74 -0
- package/dist/operations/index.d.ts +6 -16
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +506 -16
- package/dist/payment/index.d.ts +6 -3
- package/dist/payment/index.d.ts.map +1 -0
- package/dist/payment/index.js +69 -3
- package/dist/payment/payment.operations.d.ts +50 -56
- package/dist/payment/payment.operations.d.ts.map +1 -1
- package/dist/payment/payment.operations.js +66 -51
- package/dist/payment/payment.schema.d.ts +50 -55
- package/dist/payment/payment.schema.d.ts.map +1 -1
- package/dist/payment/payment.schema.js +29 -71
- package/dist/presentations/index.d.ts +1 -4
- package/dist/presentations/index.d.ts.map +1 -1
- package/dist/presentations/index.js +13 -17
- package/dist/presentations.d.ts +7 -12
- package/dist/presentations.d.ts.map +1 -1
- package/dist/presentations.js +166 -172
- package/dist/quote/index.d.ts +6 -3
- package/dist/quote/index.d.ts.map +1 -0
- package/dist/quote/index.js +122 -3
- package/dist/quote/quote.operations.d.ts +120 -126
- package/dist/quote/quote.operations.d.ts.map +1 -1
- package/dist/quote/quote.operations.js +117 -96
- package/dist/quote/quote.schema.d.ts +83 -88
- package/dist/quote/quote.schema.d.ts.map +1 -1
- package/dist/quote/quote.schema.js +43 -111
- package/dist/service-business-os.capability.d.ts +2 -7
- package/dist/service-business-os.capability.d.ts.map +1 -1
- package/dist/service-business-os.capability.js +29 -29
- package/dist/service.feature.d.ts +1 -6
- package/dist/service.feature.d.ts.map +1 -1
- package/dist/service.feature.js +73 -164
- package/package.json +301 -64
- package/dist/client/client.operations.js.map +0 -1
- package/dist/client/client.schema.js.map +0 -1
- package/dist/docs/service-business-os.docblock.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/index.js.map +0 -1
- package/dist/invoice/invoice.operations.js.map +0 -1
- package/dist/invoice/invoice.schema.js.map +0 -1
- package/dist/job/job.operations.js.map +0 -1
- package/dist/job/job.schema.js.map +0 -1
- package/dist/payment/payment.operations.js.map +0 -1
- package/dist/payment/payment.schema.js.map +0 -1
- package/dist/presentations/index.js.map +0 -1
- package/dist/presentations.js.map +0 -1
- package/dist/quote/quote.operations.js.map +0 -1
- package/dist/quote/quote.schema.js.map +0 -1
- package/dist/service-business-os.capability.js.map +0 -1
- package/dist/service.feature.js.map +0 -1
|
@@ -1,175 +1,173 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
// @bun
|
|
2
|
+
// src/job/job.schema.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var JobModel = defineSchemaModel({
|
|
5
|
+
name: "Job",
|
|
6
|
+
description: "Scheduled job",
|
|
7
|
+
fields: {
|
|
8
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
+
scheduledAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
14
|
+
completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
15
|
+
assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var ScheduleJobInputModel = defineSchemaModel({
|
|
19
|
+
name: "ScheduleJobInput",
|
|
20
|
+
description: "Input for scheduling a job",
|
|
21
|
+
fields: {
|
|
22
|
+
quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
scheduledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
24
|
+
assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
+
location: { type: ScalarTypeEnum.JSON(), isOptional: true },
|
|
26
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
var CompleteJobInputModel = defineSchemaModel({
|
|
30
|
+
name: "CompleteJobInput",
|
|
31
|
+
description: "Input for completing a job",
|
|
32
|
+
fields: {
|
|
33
|
+
jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
34
|
+
completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
35
|
+
notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
36
|
+
}
|
|
37
|
+
});
|
|
4
38
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
limit: {
|
|
20
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
21
|
-
isOptional: true
|
|
22
|
-
},
|
|
23
|
-
offset: {
|
|
24
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
25
|
-
isOptional: true
|
|
26
|
-
}
|
|
27
|
-
}
|
|
39
|
+
// src/job/job.operations.ts
|
|
40
|
+
import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
|
|
41
|
+
import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
|
|
42
|
+
var OWNERS = ["@examples.service-business-os"];
|
|
43
|
+
var ListJobsInputModel = defineSchemaModel2({
|
|
44
|
+
name: "ListJobsInput",
|
|
45
|
+
description: "Input for listing jobs",
|
|
46
|
+
fields: {
|
|
47
|
+
status: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
48
|
+
clientId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
49
|
+
limit: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true },
|
|
50
|
+
offset: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true }
|
|
51
|
+
}
|
|
28
52
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
isList: true
|
|
37
|
-
},
|
|
38
|
-
total: {
|
|
39
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
40
|
-
isOptional: false
|
|
41
|
-
}
|
|
42
|
-
}
|
|
53
|
+
var ListJobsOutputModel = defineSchemaModel2({
|
|
54
|
+
name: "ListJobsOutput",
|
|
55
|
+
description: "Output for listing jobs",
|
|
56
|
+
fields: {
|
|
57
|
+
jobs: { type: JobModel, isOptional: false, isList: true },
|
|
58
|
+
total: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false }
|
|
59
|
+
}
|
|
43
60
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
output: {
|
|
79
|
-
jobs: [],
|
|
80
|
-
total: 5
|
|
81
|
-
}
|
|
82
|
-
}]
|
|
83
|
-
}
|
|
61
|
+
var ListJobsOperation = defineQuery({
|
|
62
|
+
meta: {
|
|
63
|
+
key: "service.job.list",
|
|
64
|
+
version: "1.0.0",
|
|
65
|
+
stability: "stable",
|
|
66
|
+
owners: [...OWNERS],
|
|
67
|
+
tags: ["service-business-os", "job", "list", "query"],
|
|
68
|
+
description: "List all jobs with filtering",
|
|
69
|
+
goal: "Retrieve list of jobs",
|
|
70
|
+
context: "Job management"
|
|
71
|
+
},
|
|
72
|
+
io: {
|
|
73
|
+
input: ListJobsInputModel,
|
|
74
|
+
output: ListJobsOutputModel
|
|
75
|
+
},
|
|
76
|
+
policy: { auth: "user" },
|
|
77
|
+
acceptance: {
|
|
78
|
+
scenarios: [
|
|
79
|
+
{
|
|
80
|
+
key: "list-jobs-happy-path",
|
|
81
|
+
given: ["Jobs exist"],
|
|
82
|
+
when: ["User lists jobs"],
|
|
83
|
+
then: ["List of jobs is returned"]
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
examples: [
|
|
87
|
+
{
|
|
88
|
+
key: "list-active",
|
|
89
|
+
input: { status: "scheduled", limit: 10 },
|
|
90
|
+
output: { jobs: [], total: 5 }
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
84
94
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
output: {
|
|
123
|
-
id: "job-456",
|
|
124
|
-
status: "scheduled"
|
|
125
|
-
}
|
|
126
|
-
}]
|
|
127
|
-
}
|
|
95
|
+
var ScheduleJobContract = defineCommand({
|
|
96
|
+
meta: {
|
|
97
|
+
key: "service.job.schedule",
|
|
98
|
+
version: "1.0.0",
|
|
99
|
+
stability: "stable",
|
|
100
|
+
owners: [...OWNERS],
|
|
101
|
+
tags: ["service-business-os", "job", "schedule"],
|
|
102
|
+
description: "Schedule a job.",
|
|
103
|
+
goal: "Schedule work.",
|
|
104
|
+
context: "Job scheduling."
|
|
105
|
+
},
|
|
106
|
+
io: {
|
|
107
|
+
input: ScheduleJobInputModel,
|
|
108
|
+
output: JobModel
|
|
109
|
+
},
|
|
110
|
+
policy: { auth: "user" },
|
|
111
|
+
acceptance: {
|
|
112
|
+
scenarios: [
|
|
113
|
+
{
|
|
114
|
+
key: "schedule-job-happy-path",
|
|
115
|
+
given: ["Client exists"],
|
|
116
|
+
when: ["User schedules job"],
|
|
117
|
+
then: ["Job is created with status SCHEDULED"]
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
examples: [
|
|
121
|
+
{
|
|
122
|
+
key: "schedule-repair",
|
|
123
|
+
input: {
|
|
124
|
+
clientId: "client-123",
|
|
125
|
+
date: "2025-01-20T10:00:00Z",
|
|
126
|
+
type: "repair"
|
|
127
|
+
},
|
|
128
|
+
output: { id: "job-456", status: "scheduled" }
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
128
132
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
jobId: "job-456",
|
|
163
|
-
notes: "Done successfully"
|
|
164
|
-
},
|
|
165
|
-
output: {
|
|
166
|
-
id: "job-456",
|
|
167
|
-
status: "completed"
|
|
168
|
-
}
|
|
169
|
-
}]
|
|
170
|
-
}
|
|
133
|
+
var CompleteJobContract = defineCommand({
|
|
134
|
+
meta: {
|
|
135
|
+
key: "service.job.complete",
|
|
136
|
+
version: "1.0.0",
|
|
137
|
+
stability: "stable",
|
|
138
|
+
owners: [...OWNERS],
|
|
139
|
+
tags: ["service-business-os", "job", "complete"],
|
|
140
|
+
description: "Mark a job as complete.",
|
|
141
|
+
goal: "Record job completion.",
|
|
142
|
+
context: "Job management."
|
|
143
|
+
},
|
|
144
|
+
io: {
|
|
145
|
+
input: CompleteJobInputModel,
|
|
146
|
+
output: JobModel
|
|
147
|
+
},
|
|
148
|
+
policy: { auth: "user" },
|
|
149
|
+
acceptance: {
|
|
150
|
+
scenarios: [
|
|
151
|
+
{
|
|
152
|
+
key: "complete-job-happy-path",
|
|
153
|
+
given: ["Job is scheduled"],
|
|
154
|
+
when: ["User completes job"],
|
|
155
|
+
then: ["Job status becomes COMPLETED"]
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
examples: [
|
|
159
|
+
{
|
|
160
|
+
key: "mark-complete",
|
|
161
|
+
input: { jobId: "job-456", notes: "Done successfully" },
|
|
162
|
+
output: { id: "job-456", status: "completed" }
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
171
166
|
});
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
167
|
+
export {
|
|
168
|
+
ScheduleJobContract,
|
|
169
|
+
ListJobsOutputModel,
|
|
170
|
+
ListJobsOperation,
|
|
171
|
+
ListJobsInputModel,
|
|
172
|
+
CompleteJobContract
|
|
173
|
+
};
|
package/dist/job/job.schema.d.ts
CHANGED
|
@@ -1,85 +1,80 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/job/job.schema.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Scheduled job.
|
|
6
3
|
*/
|
|
7
|
-
declare const JobModel:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
4
|
+
export declare const JobModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
5
|
+
id: {
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
quoteId: {
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
clientId: {
|
|
14
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
title: {
|
|
18
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
status: {
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
scheduledAt: {
|
|
26
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
27
|
+
isOptional: true;
|
|
28
|
+
};
|
|
29
|
+
completedAt: {
|
|
30
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
31
|
+
isOptional: true;
|
|
32
|
+
};
|
|
33
|
+
assignedTo: {
|
|
34
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
35
|
+
isOptional: true;
|
|
36
|
+
};
|
|
40
37
|
}>;
|
|
41
38
|
/**
|
|
42
39
|
* Input for scheduling a job.
|
|
43
40
|
*/
|
|
44
|
-
declare const ScheduleJobInputModel:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
41
|
+
export declare const ScheduleJobInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
42
|
+
quoteId: {
|
|
43
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
scheduledAt: {
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
assignedTo: {
|
|
51
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
location: {
|
|
55
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
56
|
+
isOptional: true;
|
|
57
|
+
};
|
|
58
|
+
title: {
|
|
59
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
60
|
+
isOptional: true;
|
|
61
|
+
};
|
|
65
62
|
}>;
|
|
66
63
|
/**
|
|
67
64
|
* Input for completing a job.
|
|
68
65
|
*/
|
|
69
|
-
declare const CompleteJobInputModel:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
export declare const CompleteJobInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
67
|
+
jobId: {
|
|
68
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
69
|
+
isOptional: false;
|
|
70
|
+
};
|
|
71
|
+
completedAt: {
|
|
72
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
73
|
+
isOptional: true;
|
|
74
|
+
};
|
|
75
|
+
notes: {
|
|
76
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
77
|
+
isOptional: true;
|
|
78
|
+
};
|
|
82
79
|
}>;
|
|
83
|
-
//#endregion
|
|
84
|
-
export { CompleteJobInputModel, JobModel, ScheduleJobInputModel };
|
|
85
80
|
//# sourceMappingURL=job.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job.schema.d.ts","
|
|
1
|
+
{"version":3,"file":"job.schema.d.ts","sourceRoot":"","sources":["../../src/job/job.schema.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAanB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;EAQhC,CAAC"}
|
package/dist/job/job.schema.js
CHANGED
|
@@ -1,98 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isOptional: false
|
|
18
|
-
},
|
|
19
|
-
clientId: {
|
|
20
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
21
|
-
isOptional: false
|
|
22
|
-
},
|
|
23
|
-
title: {
|
|
24
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
25
|
-
isOptional: false
|
|
26
|
-
},
|
|
27
|
-
status: {
|
|
28
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
-
isOptional: false
|
|
30
|
-
},
|
|
31
|
-
scheduledAt: {
|
|
32
|
-
type: ScalarTypeEnum.DateTime(),
|
|
33
|
-
isOptional: true
|
|
34
|
-
},
|
|
35
|
-
completedAt: {
|
|
36
|
-
type: ScalarTypeEnum.DateTime(),
|
|
37
|
-
isOptional: true
|
|
38
|
-
},
|
|
39
|
-
assignedTo: {
|
|
40
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
41
|
-
isOptional: true
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
// @bun
|
|
2
|
+
// src/job/job.schema.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var JobModel = defineSchemaModel({
|
|
5
|
+
name: "Job",
|
|
6
|
+
description: "Scheduled job",
|
|
7
|
+
fields: {
|
|
8
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
clientId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
+
scheduledAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
14
|
+
completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
15
|
+
assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
16
|
+
}
|
|
44
17
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
scheduledAt: {
|
|
57
|
-
type: ScalarTypeEnum.DateTime(),
|
|
58
|
-
isOptional: false
|
|
59
|
-
},
|
|
60
|
-
assignedTo: {
|
|
61
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
62
|
-
isOptional: true
|
|
63
|
-
},
|
|
64
|
-
location: {
|
|
65
|
-
type: ScalarTypeEnum.JSON(),
|
|
66
|
-
isOptional: true
|
|
67
|
-
},
|
|
68
|
-
title: {
|
|
69
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
70
|
-
isOptional: true
|
|
71
|
-
}
|
|
72
|
-
}
|
|
18
|
+
var ScheduleJobInputModel = defineSchemaModel({
|
|
19
|
+
name: "ScheduleJobInput",
|
|
20
|
+
description: "Input for scheduling a job",
|
|
21
|
+
fields: {
|
|
22
|
+
quoteId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
scheduledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
24
|
+
assignedTo: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
+
location: { type: ScalarTypeEnum.JSON(), isOptional: true },
|
|
26
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
27
|
+
}
|
|
73
28
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
83
|
-
isOptional: false
|
|
84
|
-
},
|
|
85
|
-
completedAt: {
|
|
86
|
-
type: ScalarTypeEnum.DateTime(),
|
|
87
|
-
isOptional: true
|
|
88
|
-
},
|
|
89
|
-
notes: {
|
|
90
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
-
isOptional: true
|
|
92
|
-
}
|
|
93
|
-
}
|
|
29
|
+
var CompleteJobInputModel = defineSchemaModel({
|
|
30
|
+
name: "CompleteJobInput",
|
|
31
|
+
description: "Input for completing a job",
|
|
32
|
+
fields: {
|
|
33
|
+
jobId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
34
|
+
completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
35
|
+
notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
36
|
+
}
|
|
94
37
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
38
|
+
export {
|
|
39
|
+
ScheduleJobInputModel,
|
|
40
|
+
JobModel,
|
|
41
|
+
CompleteJobInputModel
|
|
42
|
+
};
|