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