@kohost/api-client 7.12.0 → 7.14.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 (57) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/lib/index.d.ts +1 -1
  3. package/dist/lib/index.js +4 -2
  4. package/dist/lib/index.js.map +1 -1
  5. package/dist/lib/money.d.ts +21 -0
  6. package/dist/lib/money.js +29 -1
  7. package/dist/lib/money.js.map +1 -1
  8. package/dist/models/cost.d.ts +17 -0
  9. package/dist/models/cost.js +38 -0
  10. package/dist/models/cost.js.map +1 -0
  11. package/dist/models/emailMessage.js +2 -0
  12. package/dist/models/emailMessage.js.map +1 -1
  13. package/dist/models/index.d.ts +1 -0
  14. package/dist/models/index.js +3 -1
  15. package/dist/models/index.js.map +1 -1
  16. package/dist/schemas/bill.d.ts +14 -6
  17. package/dist/schemas/bill.js +14 -11
  18. package/dist/schemas/bill.js.map +1 -1
  19. package/dist/schemas/cost.d.ts +227 -0
  20. package/dist/schemas/cost.js +45 -0
  21. package/dist/schemas/cost.js.map +1 -0
  22. package/dist/schemas/costEntry.d.ts +222 -0
  23. package/dist/schemas/costEntry.js +162 -0
  24. package/dist/schemas/costEntry.js.map +1 -0
  25. package/dist/schemas/definitions.d.ts +1 -1
  26. package/dist/schemas/definitions.js +1 -0
  27. package/dist/schemas/definitions.js.map +1 -1
  28. package/dist/schemas/emailMessage.d.ts +12 -0
  29. package/dist/schemas/emailMessage.js +8 -0
  30. package/dist/schemas/emailMessage.js.map +1 -1
  31. package/dist/schemas/index.d.ts +7 -6
  32. package/dist/schemas/index.js +2 -1
  33. package/dist/schemas/ticket.d.ts +25 -26
  34. package/dist/schemas/ticket.js +60 -245
  35. package/dist/schemas/ticket.js.map +1 -1
  36. package/dist/useCases/createCost.d.ts +27 -0
  37. package/dist/useCases/createCost.js +47 -0
  38. package/dist/useCases/createCost.js.map +1 -0
  39. package/dist/useCases/editCost.d.ts +36 -0
  40. package/dist/useCases/editCost.js +47 -0
  41. package/dist/useCases/editCost.js.map +1 -0
  42. package/dist/useCases/index.d.ts +5 -0
  43. package/dist/useCases/index.js +11 -1
  44. package/dist/useCases/index.js.map +1 -1
  45. package/dist/useCases/reinstateCost.d.ts +36 -0
  46. package/dist/useCases/reinstateCost.js +47 -0
  47. package/dist/useCases/reinstateCost.js.map +1 -0
  48. package/dist/useCases/setCostInvoice.d.ts +36 -0
  49. package/dist/useCases/setCostInvoice.js +47 -0
  50. package/dist/useCases/setCostInvoice.js.map +1 -0
  51. package/dist/useCases/writeOffCost.d.ts +36 -0
  52. package/dist/useCases/writeOffCost.js +47 -0
  53. package/dist/useCases/writeOffCost.js.map +1 -0
  54. package/dist/validate.d.ts +23 -0
  55. package/dist/validate.js +4 -1
  56. package/dist/validate.js.map +1 -1
  57. package/package.json +1 -1
@@ -0,0 +1,222 @@
1
+ /**
2
+ * The append-only billing review history, over whichever actions the host
3
+ * admits. A ticket cost can be voided (withdrawn from the customer); a
4
+ * standalone cost has no ticket to withdraw it from, so its history stops at
5
+ * write-offs and divergence acknowledgements.
6
+ */
7
+ export declare const costBillingReview: <const Actions extends readonly string[]>(actions: Actions) => {
8
+ readonly type: "array";
9
+ readonly default: readonly [];
10
+ readonly description: string;
11
+ readonly items: {
12
+ readonly type: "object";
13
+ readonly additionalProperties: false;
14
+ readonly required: readonly ["id", "action", "performedAt"];
15
+ readonly properties: {
16
+ readonly id: {
17
+ readonly type: "string";
18
+ readonly description: "The ID of the billing review entry.";
19
+ };
20
+ readonly action: {
21
+ readonly type: "string";
22
+ readonly enum: Actions;
23
+ };
24
+ readonly performedBy: {
25
+ readonly type: readonly ["string", "null"];
26
+ readonly default: null;
27
+ readonly description: string;
28
+ };
29
+ readonly performedAt: {
30
+ readonly $ref: "definitions.json#/definitions/date";
31
+ readonly description: "When the entry was appended.";
32
+ };
33
+ readonly note: {
34
+ readonly type: readonly ["string", "null"];
35
+ readonly default: null;
36
+ readonly description: "Free-text rationale for the action.";
37
+ };
38
+ readonly billedAmount: {
39
+ readonly type: "integer";
40
+ readonly minimum: 0;
41
+ readonly description: string;
42
+ };
43
+ readonly priceAmount: {
44
+ readonly type: "integer";
45
+ readonly minimum: 0;
46
+ readonly description: string;
47
+ };
48
+ };
49
+ };
50
+ };
51
+ export declare const costEntryRequired: readonly ["id", "description", "currency", "price", "estimate", "markup"];
52
+ export declare const costEntryProperties: {
53
+ readonly id: {
54
+ readonly type: "string";
55
+ readonly description: "The ID of the cost entry.";
56
+ };
57
+ readonly description: {
58
+ readonly type: "string";
59
+ readonly description: "What the cost covers.";
60
+ };
61
+ readonly currency: {
62
+ readonly type: "string";
63
+ readonly default: "USD";
64
+ readonly description: "ISO 4217 currency code of the entry's amounts.";
65
+ };
66
+ readonly price: {
67
+ readonly type: "object";
68
+ readonly additionalProperties: false;
69
+ readonly required: readonly ["amount", "recordedBy", "recordedAt"];
70
+ readonly description: string;
71
+ readonly properties: {
72
+ readonly amount: {
73
+ readonly type: "integer";
74
+ readonly minimum: 0;
75
+ readonly description: "The amount in integer cents.";
76
+ };
77
+ readonly recordedBy: {
78
+ readonly type: "string";
79
+ readonly description: "The ID of the user who recorded the amount.";
80
+ };
81
+ readonly recordedAt: {
82
+ readonly $ref: "definitions.json#/definitions/date";
83
+ readonly description: "When the amount was recorded.";
84
+ };
85
+ };
86
+ };
87
+ readonly estimate: {
88
+ readonly type: "object";
89
+ readonly additionalProperties: false;
90
+ readonly required: readonly ["amount", "recordedBy", "recordedAt"];
91
+ readonly description: string;
92
+ readonly properties: {
93
+ readonly amount: {
94
+ readonly type: "integer";
95
+ readonly minimum: 0;
96
+ readonly description: "The amount in integer cents.";
97
+ };
98
+ readonly recordedBy: {
99
+ readonly type: "string";
100
+ readonly description: "The ID of the user who recorded the amount.";
101
+ };
102
+ readonly recordedAt: {
103
+ readonly $ref: "definitions.json#/definitions/date";
104
+ readonly description: "When the amount was recorded.";
105
+ };
106
+ };
107
+ };
108
+ readonly actual: {
109
+ readonly type: "object";
110
+ readonly additionalProperties: false;
111
+ readonly required: readonly ["amount", "recordedBy", "recordedAt"];
112
+ readonly description: string;
113
+ readonly properties: {
114
+ readonly amount: {
115
+ readonly type: "integer";
116
+ readonly minimum: 0;
117
+ readonly description: "The amount in integer cents.";
118
+ };
119
+ readonly recordedBy: {
120
+ readonly type: "string";
121
+ readonly description: "The ID of the user who recorded the amount.";
122
+ };
123
+ readonly recordedAt: {
124
+ readonly $ref: "definitions.json#/definitions/date";
125
+ readonly description: "When the amount was recorded.";
126
+ };
127
+ };
128
+ };
129
+ readonly markup: {
130
+ readonly type: "object";
131
+ readonly additionalProperties: false;
132
+ readonly required: readonly ["percent"];
133
+ readonly properties: {
134
+ readonly percent: {
135
+ readonly type: "number";
136
+ readonly description: string;
137
+ };
138
+ readonly custom: {
139
+ readonly type: "boolean";
140
+ readonly default: false;
141
+ readonly description: string;
142
+ };
143
+ };
144
+ };
145
+ readonly vendorId: {
146
+ readonly type: readonly ["string", "null"];
147
+ readonly default: null;
148
+ readonly description: string;
149
+ };
150
+ readonly categoryId: {
151
+ readonly type: readonly ["string", "null"];
152
+ readonly default: null;
153
+ readonly description: string;
154
+ };
155
+ readonly vendorInvoices: {
156
+ readonly type: "array";
157
+ readonly items: {
158
+ readonly $ref: "mediaFile.json";
159
+ };
160
+ readonly default: readonly [];
161
+ readonly description: string;
162
+ };
163
+ readonly vendorInvoiceNumber: {
164
+ readonly type: readonly ["string", "null"];
165
+ readonly default: null;
166
+ readonly description: string;
167
+ };
168
+ readonly billId: {
169
+ readonly type: readonly ["string", "null"];
170
+ readonly default: null;
171
+ readonly description: string;
172
+ };
173
+ readonly writtenOff: {
174
+ readonly type: "boolean";
175
+ readonly default: false;
176
+ readonly description: string;
177
+ };
178
+ readonly billingReview: {
179
+ readonly type: "array";
180
+ readonly default: readonly [];
181
+ readonly description: string;
182
+ readonly items: {
183
+ readonly type: "object";
184
+ readonly additionalProperties: false;
185
+ readonly required: readonly ["id", "action", "performedAt"];
186
+ readonly properties: {
187
+ readonly id: {
188
+ readonly type: "string";
189
+ readonly description: "The ID of the billing review entry.";
190
+ };
191
+ readonly action: {
192
+ readonly type: "string";
193
+ readonly enum: readonly ["writtenOff", "reinstated", "divergenceAcknowledged"];
194
+ };
195
+ readonly performedBy: {
196
+ readonly type: readonly ["string", "null"];
197
+ readonly default: null;
198
+ readonly description: string;
199
+ };
200
+ readonly performedAt: {
201
+ readonly $ref: "definitions.json#/definitions/date";
202
+ readonly description: "When the entry was appended.";
203
+ };
204
+ readonly note: {
205
+ readonly type: readonly ["string", "null"];
206
+ readonly default: null;
207
+ readonly description: "Free-text rationale for the action.";
208
+ };
209
+ readonly billedAmount: {
210
+ readonly type: "integer";
211
+ readonly minimum: 0;
212
+ readonly description: string;
213
+ };
214
+ readonly priceAmount: {
215
+ readonly type: "integer";
216
+ readonly minimum: 0;
217
+ readonly description: string;
218
+ };
219
+ };
220
+ };
221
+ };
222
+ };
@@ -0,0 +1,162 @@
1
+ //#region .generated/schemas/costEntry.ts
2
+ const money = (description) => ({
3
+ type: "object",
4
+ additionalProperties: false,
5
+ required: [
6
+ "amount",
7
+ "recordedBy",
8
+ "recordedAt"
9
+ ],
10
+ description,
11
+ properties: {
12
+ amount: {
13
+ type: "integer",
14
+ minimum: 0,
15
+ description: "The amount in integer cents."
16
+ },
17
+ recordedBy: {
18
+ type: "string",
19
+ description: "The ID of the user who recorded the amount."
20
+ },
21
+ recordedAt: {
22
+ $ref: "definitions.json#/definitions/date",
23
+ description: "When the amount was recorded."
24
+ }
25
+ }
26
+ });
27
+ /**
28
+ * The append-only billing review history, over whichever actions the host
29
+ * admits. A ticket cost can be voided (withdrawn from the customer); a
30
+ * standalone cost has no ticket to withdraw it from, so its history stops at
31
+ * write-offs and divergence acknowledgements.
32
+ */
33
+ const costBillingReview = (actions) => ({
34
+ type: "array",
35
+ default: [],
36
+ description: "Append-only billing review history for the entry (approval-history pattern): reversible write-offs, and billed-vs-price divergence acknowledgements. Internal, redacted org-side.",
37
+ items: {
38
+ type: "object",
39
+ additionalProperties: false,
40
+ required: [
41
+ "id",
42
+ "action",
43
+ "performedAt"
44
+ ],
45
+ properties: {
46
+ id: {
47
+ type: "string",
48
+ description: "The ID of the billing review entry."
49
+ },
50
+ action: {
51
+ type: "string",
52
+ enum: actions
53
+ },
54
+ performedBy: {
55
+ type: ["string", "null"],
56
+ default: null,
57
+ description: "The ID of the user whose write appended this entry. Null when the write was not user-attributable."
58
+ },
59
+ performedAt: {
60
+ $ref: "definitions.json#/definitions/date",
61
+ description: "When the entry was appended."
62
+ },
63
+ note: {
64
+ type: ["string", "null"],
65
+ default: null,
66
+ description: "Free-text rationale for the action."
67
+ },
68
+ billedAmount: {
69
+ type: "integer",
70
+ minimum: 0,
71
+ description: "divergenceAcknowledged only: the amount a bill line already charged for this entry, in integer cents, frozen at ack time."
72
+ },
73
+ priceAmount: {
74
+ type: "integer",
75
+ minimum: 0,
76
+ description: "divergenceAcknowledged only: the entry's stored customer price in integer cents at ack time. A divergence is a billed line that no longer matches the price behind it — a price corrected after the cost was claimed — so the ack silences this one pair and any later price move re-flags it. A vendor actual arriving after billing is not a divergence: it moves margin, not what the customer owes."
77
+ }
78
+ }
79
+ }
80
+ });
81
+ const costEntryRequired = [
82
+ "id",
83
+ "description",
84
+ "currency",
85
+ "price",
86
+ "estimate",
87
+ "markup"
88
+ ];
89
+ const costEntryProperties = {
90
+ id: {
91
+ type: "string",
92
+ description: "The ID of the cost entry."
93
+ },
94
+ description: {
95
+ type: "string",
96
+ description: "What the cost covers."
97
+ },
98
+ currency: {
99
+ type: "string",
100
+ default: "USD",
101
+ description: "ISO 4217 currency code of the entry's amounts."
102
+ },
103
+ price: money("The authoritative customer price — what the org is charged, what the approval gate totals, and what a bill line bills. Seeded at recording from the estimate and the markup, and from then on independent of all three: editing `estimate`, `actual`, or `markup` never moves it. Only an explicit price write does."),
104
+ estimate: money("The vendor cost estimate phase of the entry."),
105
+ actual: money("The settled vendor cost, recorded once the vendor's figure is known."),
106
+ markup: {
107
+ type: "object",
108
+ additionalProperties: false,
109
+ required: ["percent"],
110
+ properties: {
111
+ percent: {
112
+ type: "number",
113
+ description: "Markup percent the price was derived at, uncapped in either direction. Context for how the price was arrived at, not the source of truth for any amount: `price` is stored, so re-keying this percent prices nothing. A biller may charge under the vendor cost as a deliberate comp, and this records that as the negative percent it is rather than as a floor of zero the price never came from."
114
+ },
115
+ custom: {
116
+ type: "boolean",
117
+ default: false,
118
+ description: "Whether the percent was overridden by hand rather than keyed from the configured markup tiers. Custom percents are never re-keyed on estimate edits."
119
+ }
120
+ }
121
+ },
122
+ vendorId: {
123
+ type: ["string", "null"],
124
+ default: null,
125
+ description: "The Vendor the charge is owed to. A plain reference — no rollups — resolved inside the entry's own organization. Internal, redacted org-side with the rest of the cost split."
126
+ },
127
+ categoryId: {
128
+ type: ["string", "null"],
129
+ default: null,
130
+ description: "The billing category classifying this cost. `AddBillLine` snapshots it onto the claiming line, which owns its own category from then on. Internal, redacted org-side with the rest of the cost split."
131
+ },
132
+ vendorInvoices: {
133
+ type: "array",
134
+ items: { $ref: "mediaFile.json" },
135
+ default: [],
136
+ description: "The vendor's paperwork backing the entry's amounts — an invoice plus whatever came with it. Internal: the file-store cannot enforce roster-only reads, so the boundary is this field living on the full shape only, and the redacted projection never carries it."
137
+ },
138
+ vendorInvoiceNumber: {
139
+ type: ["string", "null"],
140
+ default: null,
141
+ description: "The vendor's own invoice number. Internal, redacted org-side like the rest of the cost split."
142
+ },
143
+ billId: {
144
+ type: ["string", "null"],
145
+ default: null,
146
+ description: "Backlink to the bill whose draft claimed this cost as a line. Written when a draft bill adds the line, cleared on line removal, draft delete, or bill void; a claimed cost leaves the uninvoiced pool, making double-invoicing structurally impossible. Server-maintained at the repository, never set by clients."
147
+ },
148
+ writtenOff: {
149
+ type: "boolean",
150
+ default: false,
151
+ description: "Server-maintained denormalization of billingReview (approvalState pattern): true after a writtenOff entry until a reinstated entry follows. A written-off cost leaves the uninvoiced pool. Never set by clients."
152
+ },
153
+ billingReview: costBillingReview([
154
+ "writtenOff",
155
+ "reinstated",
156
+ "divergenceAcknowledged"
157
+ ])
158
+ };
159
+ //#endregion
160
+ export { costBillingReview, costEntryProperties, costEntryRequired };
161
+
162
+ //# sourceMappingURL=costEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"costEntry.js","names":[],"sources":["../../.generated/schemas/costEntry.ts"],"sourcesContent":["// The cost-entry core: the money shape and reconciliation lifecycle every\n// OneBill cost carries, whether a Ticket embeds it or it stands alone in the\n// costs collection. Both hosts spread these consts into their own `properties`\n// and `required` rather than `$ref`-ing this file: draft-07 resolves `allOf`\n// against `additionalProperties: false` per subschema, so a composed entry\n// would reject every field the other half declared, and `FromSchema` derives\n// nothing useful from a reference it cannot inline.\n//\n// Nothing here is exported with a name ending in \"Schema\" and the model\n// generator skips this file by name (`scripts/generate-source-models.js`):\n// these are fragments, not an entity.\n\nconst money = (description: string) =>\n ({\n type: \"object\",\n additionalProperties: false,\n required: [\"amount\", \"recordedBy\", \"recordedAt\"],\n description,\n properties: {\n amount: {\n type: \"integer\",\n minimum: 0,\n description: \"The amount in integer cents.\",\n },\n recordedBy: {\n type: \"string\",\n description: \"The ID of the user who recorded the amount.\",\n },\n recordedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the amount was recorded.\",\n },\n },\n }) as const;\n\n/**\n * The append-only billing review history, over whichever actions the host\n * admits. A ticket cost can be voided (withdrawn from the customer); a\n * standalone cost has no ticket to withdraw it from, so its history stops at\n * write-offs and divergence acknowledgements.\n */\nexport const costBillingReview = <const Actions extends readonly string[]>(\n actions: Actions,\n) =>\n ({\n type: \"array\",\n default: [],\n description:\n \"Append-only billing review history for the entry (approval-history \" +\n \"pattern): reversible write-offs, and billed-vs-price divergence \" +\n \"acknowledgements. Internal, redacted org-side.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"action\", \"performedAt\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the billing review entry.\",\n },\n action: {\n type: \"string\",\n enum: actions,\n },\n performedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write appended this entry. Null when \" +\n \"the write was not user-attributable.\",\n },\n performedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the entry was appended.\",\n },\n note: {\n type: [\"string\", \"null\"],\n default: null,\n description: \"Free-text rationale for the action.\",\n },\n billedAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"divergenceAcknowledged only: the amount a bill line already \" +\n \"charged for this entry, in integer cents, frozen at ack time.\",\n },\n priceAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"divergenceAcknowledged only: the entry's stored customer price \" +\n \"in integer cents at ack time. A divergence is a billed line \" +\n \"that no longer matches the price behind it — a price corrected \" +\n \"after the cost was claimed — so the ack silences this one pair \" +\n \"and any later price move re-flags it. A vendor actual arriving \" +\n \"after billing is not a divergence: it moves margin, not what \" +\n \"the customer owes.\",\n },\n },\n },\n }) as const;\n\nexport const costEntryRequired = [\n \"id\",\n \"description\",\n \"currency\",\n \"price\",\n \"estimate\",\n \"markup\",\n] as const;\n\nexport const costEntryProperties = {\n id: {\n type: \"string\",\n description: \"The ID of the cost entry.\",\n },\n description: {\n type: \"string\",\n description: \"What the cost covers.\",\n },\n currency: {\n type: \"string\",\n default: \"USD\",\n description: \"ISO 4217 currency code of the entry's amounts.\",\n },\n price: money(\n \"The authoritative customer price — what the org is charged, what the \" +\n \"approval gate totals, and what a bill line bills. Seeded at recording \" +\n \"from the estimate and the markup, and from then on independent of all \" +\n \"three: editing `estimate`, `actual`, or `markup` never moves it. Only \" +\n \"an explicit price write does.\",\n ),\n estimate: money(\"The vendor cost estimate phase of the entry.\"),\n actual: money(\n \"The settled vendor cost, recorded once the vendor's figure is known.\",\n ),\n markup: {\n type: \"object\",\n additionalProperties: false,\n required: [\"percent\"],\n properties: {\n percent: {\n type: \"number\",\n description:\n \"Markup percent the price was derived at, uncapped in either \" +\n \"direction. Context for how the price was arrived at, not the \" +\n \"source of truth for any amount: `price` is stored, so re-keying \" +\n \"this percent prices nothing. A biller may charge under the vendor \" +\n \"cost as a deliberate comp, and this records that as the negative \" +\n \"percent it is rather than as a floor of zero the price never came \" +\n \"from.\",\n },\n custom: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether the percent was overridden by hand rather than keyed from \" +\n \"the configured markup tiers. Custom percents are never re-keyed on \" +\n \"estimate edits.\",\n },\n },\n },\n vendorId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The Vendor the charge is owed to. A plain reference — no rollups — \" +\n \"resolved inside the entry's own organization. Internal, redacted \" +\n \"org-side with the rest of the cost split.\",\n },\n categoryId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The billing category classifying this cost. `AddBillLine` snapshots \" +\n \"it onto the claiming line, which owns its own category from then on. \" +\n \"Internal, redacted org-side with the rest of the cost split.\",\n },\n vendorInvoices: {\n type: \"array\",\n items: { $ref: \"mediaFile.json\" },\n default: [],\n description:\n \"The vendor's paperwork backing the entry's amounts — an invoice plus \" +\n \"whatever came with it. Internal: the file-store cannot enforce \" +\n \"roster-only reads, so the boundary is this field living on the full \" +\n \"shape only, and the redacted projection never carries it.\",\n },\n vendorInvoiceNumber: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The vendor's own invoice number. Internal, redacted org-side like the \" +\n \"rest of the cost split.\",\n },\n billId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"Backlink to the bill whose draft claimed this cost as a line. Written \" +\n \"when a draft bill adds the line, cleared on line removal, draft \" +\n \"delete, or bill void; a claimed cost leaves the uninvoiced pool, \" +\n \"making double-invoicing structurally impossible. Server-maintained at \" +\n \"the repository, never set by clients.\",\n },\n writtenOff: {\n type: \"boolean\",\n default: false,\n description:\n \"Server-maintained denormalization of billingReview (approvalState \" +\n \"pattern): true after a writtenOff entry until a reinstated entry \" +\n \"follows. A written-off cost leaves the uninvoiced pool. Never set by \" +\n \"clients.\",\n },\n billingReview: costBillingReview([\n \"writtenOff\",\n \"reinstated\",\n \"divergenceAcknowledged\",\n ]),\n} as const;\n"],"mappings":";AAYA,MAAM,SAAS,iBACZ;CACC,MAAM;CACN,sBAAsB;CACtB,UAAU;EAAC;EAAU;EAAc;CAAY;CAC/C;CACA,YAAY;EACV,QAAQ;GACN,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;CACF;AACF;;;;;;;AAQF,MAAa,qBACX,aAEC;CACC,MAAM;CACN,SAAS,CAAC;CACV,aACE;CAGF,OAAO;EACL,MAAM;EACN,sBAAsB;EACtB,UAAU;GAAC;GAAM;GAAU;EAAa;EACxC,YAAY;GACV,IAAI;IACF,MAAM;IACN,aAAa;GACf;GACA,QAAQ;IACN,MAAM;IACN,MAAM;GACR;GACA,aAAa;IACX,MAAM,CAAC,UAAU,MAAM;IACvB,SAAS;IACT,aACE;GAEJ;GACA,aAAa;IACX,MAAM;IACN,aAAa;GACf;GACA,MAAM;IACJ,MAAM,CAAC,UAAU,MAAM;IACvB,SAAS;IACT,aAAa;GACf;GACA,cAAc;IACZ,MAAM;IACN,SAAS;IACT,aACE;GAEJ;GACA,aAAa;IACX,MAAM;IACN,SAAS;IACT,aACE;GAOJ;EACF;CACF;AACF;AAEF,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,sBAAsB;CACjC,IAAI;EACF,MAAM;EACN,aAAa;CACf;CACA,aAAa;EACX,MAAM;EACN,aAAa;CACf;CACA,UAAU;EACR,MAAM;EACN,SAAS;EACT,aAAa;CACf;CACA,OAAO,MACL,sTAKF;CACA,UAAU,MAAM,8CAA8C;CAC9D,QAAQ,MACN,sEACF;CACA,QAAQ;EACN,MAAM;EACN,sBAAsB;EACtB,UAAU,CAAC,SAAS;EACpB,YAAY;GACV,SAAS;IACP,MAAM;IACN,aACE;GAOJ;GACA,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aACE;GAGJ;EACF;CACF;CACA,UAAU;EACR,MAAM,CAAC,UAAU,MAAM;EACvB,SAAS;EACT,aACE;CAGJ;CACA,YAAY;EACV,MAAM,CAAC,UAAU,MAAM;EACvB,SAAS;EACT,aACE;CAGJ;CACA,gBAAgB;EACd,MAAM;EACN,OAAO,EAAE,MAAM,iBAAiB;EAChC,SAAS,CAAC;EACV,aACE;CAIJ;CACA,qBAAqB;EACnB,MAAM,CAAC,UAAU,MAAM;EACvB,SAAS;EACT,aACE;CAEJ;CACA,QAAQ;EACN,MAAM,CAAC,UAAU,MAAM;EACvB,SAAS;EACT,aACE;CAKJ;CACA,YAAY;EACV,MAAM;EACN,SAAS;EACT,aACE;CAIJ;CACA,eAAe,kBAAkB;EAC/B;EACA;EACA;CACF,CAAC;AACH"}
@@ -93,7 +93,7 @@ declare const defs: {
93
93
  readonly driver: {
94
94
  readonly type: "string";
95
95
  readonly description: "Driver used to communicate with the object.";
96
- readonly enum: readonly ["adlink", "apex-american-audio", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "cool-automation", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "earbridge", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "hanwha", "honeywell-vista", "honeywell-resideo", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lapi", "lg", "lg-webos", "linortek", "lirc", "mews", "mht", "mobile-mule", "mock", "modbus", "napco", "newline", "obix", "one-roster", "onvif", "orchid-fusion", "paxton", "pdk", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "reolink", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "singlewire", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "zkteco", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
96
+ readonly enum: readonly ["adlink", "apex-american-audio", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "cool-automation", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "earbridge", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "hanwha", "honeywell-vista", "honeywell-resideo", "honeywell-total-connect", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lapi", "lg", "lg-webos", "linortek", "lirc", "mews", "mht", "mobile-mule", "mock", "modbus", "napco", "newline", "obix", "one-roster", "onvif", "orchid-fusion", "paxton", "pdk", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "reolink", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "singlewire", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "zkteco", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
97
97
  };
98
98
  readonly type: {
99
99
  readonly type: "string";
@@ -150,6 +150,7 @@ const defs = {
150
150
  "hanwha",
151
151
  "honeywell-vista",
152
152
  "honeywell-resideo",
153
+ "honeywell-total-connect",
153
154
  "igor",
154
155
  "inncom",
155
156
  "isapi",
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n \"approvalRequested\",\n \"approvalDecided\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\n/**\n * The platform roles an Audience may be selected by. The legacy `Guest` role a\n * permission entry may still carry is deliberately absent: nothing targets it.\n */\nexport const PLATFORM_ROLE_NAMES = [\n \"SuperAdmin\",\n \"Administrator\",\n \"Manager\",\n \"Agent\",\n \"User\",\n] as const;\n\nexport type PlatformRoleName = (typeof PLATFORM_ROLE_NAMES)[number];\n\n/**\n * The people outside the platform a broadcast may name, sourced from the SIS\n * roster. `students` is every system user the SIS marks as a Student;\n * `parents` is everybody else on the roster — every emergency-contact\n * relationship the source system carries, whatever it calls it.\n */\nexport const EXTERNAL_AUDIENCE_GROUPS = [\"students\", \"parents\"] as const;\n\nexport type ExternalAudienceGroup = (typeof EXTERNAL_AUDIENCE_GROUPS)[number];\n\nconst deliveryCountsNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n recipients: { type: \"integer\", minimum: 0 },\n sent: { type: \"integer\", minimum: 0 },\n failed: { type: \"integer\", minimum: 0 },\n },\n} as const;\n\nconst defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"apex-american-audio\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"hanwha\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBattery\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n deliveryCounts: deliveryCountsNode,\n audience: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Who a people-facing broadcast was directed at, as the sender expressed it, plus the snapshot it resolved to. One shape for Announcements, SOS broadcasts and Automation notifications.\",\n properties: {\n to: {\n type: \"object\",\n additionalProperties: false,\n description:\n 'The User selector, one kind at a time. Absent or empty selects nobody; everyone is only ever the explicit `id: [\"*\"]` wildcard.',\n properties: {\n id: {\n type: \"array\",\n description:\n \"Named User ids, or the single wildcard `*` meaning everyone in scope.\",\n items: { type: \"string\" },\n },\n roles: {\n type: \"array\",\n items: { type: \"string\", enum: PLATFORM_ROLE_NAMES },\n },\n departmentIds: {\n type: \"array\",\n items: { type: \"string\" },\n },\n },\n },\n external: {\n type: \"array\",\n uniqueItems: true,\n description:\n \"Which groups of the external SIS roster were included. Human-triggered sends only; an Automation can never set it.\",\n items: { type: \"string\", enum: EXTERNAL_AUDIENCE_GROUPS },\n },\n emergencyContacts: {\n type: \"boolean\",\n description:\n 'Deprecated: superseded by `external`. A stored `true` reads as `external: [\"parents\"]`.',\n },\n users: {\n type: \"array\",\n description:\n \"Snapshot of the User ids the selector resolved to at send time.\",\n items: { type: \"string\" },\n },\n delivery: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Send-time delivery counts per audience. Absent for an audience that was not sent to.\",\n properties: {\n internal: deliveryCountsNode,\n external: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n emergencyContacts: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n description: \"Deprecated: superseded by `external`.\",\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;;;;;AAQ5D,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;AACF;;;;;;;AAUA,MAAa,2BAA2B,CAAC,YAAY,SAAS;AAI9D,MAAM,qBAAqB;CACzB,MAAM;CACN,sBAAsB;CACtB,UAAU;EAAC;EAAc;EAAQ;CAAQ;CACzC,YAAY;EACV,YAAY;GAAE,MAAM;GAAW,SAAS;EAAE;EAC1C,MAAM;GAAE,MAAM;GAAW,SAAS;EAAE;EACpC,QAAQ;GAAE,MAAM;GAAW,SAAS;EAAE;CACxC;AACF;AAEA,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;EACA,gBAAgB;EAChB,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,aACE;GACF,YAAY;IACV,IAAI;KACF,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,IAAI;OACF,MAAM;OACN,aACE;OACF,OAAO,EAAE,MAAM,SAAS;MAC1B;MACA,OAAO;OACL,MAAM;OACN,OAAO;QAAE,MAAM;QAAU,MAAM;OAAoB;MACrD;MACA,eAAe;OACb,MAAM;OACN,OAAO,EAAE,MAAM,SAAS;MAC1B;KACF;IACF;IACA,UAAU;KACR,MAAM;KACN,aAAa;KACb,aACE;KACF,OAAO;MAAE,MAAM;MAAU,MAAM;KAAyB;IAC1D;IACA,mBAAmB;KACjB,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aACE;KACF,OAAO,EAAE,MAAM,SAAS;IAC1B;IACA,UAAU;KACR,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,UAAU;MACV,UAAU;OACR,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;MACA,mBAAmB;OACjB,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,aAAa;OACb,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;KACF;IACF;GACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n \"approvalRequested\",\n \"approvalDecided\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\n/**\n * The platform roles an Audience may be selected by. The legacy `Guest` role a\n * permission entry may still carry is deliberately absent: nothing targets it.\n */\nexport const PLATFORM_ROLE_NAMES = [\n \"SuperAdmin\",\n \"Administrator\",\n \"Manager\",\n \"Agent\",\n \"User\",\n] as const;\n\nexport type PlatformRoleName = (typeof PLATFORM_ROLE_NAMES)[number];\n\n/**\n * The people outside the platform a broadcast may name, sourced from the SIS\n * roster. `students` is every system user the SIS marks as a Student;\n * `parents` is everybody else on the roster — every emergency-contact\n * relationship the source system carries, whatever it calls it.\n */\nexport const EXTERNAL_AUDIENCE_GROUPS = [\"students\", \"parents\"] as const;\n\nexport type ExternalAudienceGroup = (typeof EXTERNAL_AUDIENCE_GROUPS)[number];\n\nconst deliveryCountsNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n recipients: { type: \"integer\", minimum: 0 },\n sent: { type: \"integer\", minimum: 0 },\n failed: { type: \"integer\", minimum: 0 },\n },\n} as const;\n\nconst defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"apex-american-audio\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"hanwha\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"honeywell-total-connect\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBattery\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n deliveryCounts: deliveryCountsNode,\n audience: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Who a people-facing broadcast was directed at, as the sender expressed it, plus the snapshot it resolved to. One shape for Announcements, SOS broadcasts and Automation notifications.\",\n properties: {\n to: {\n type: \"object\",\n additionalProperties: false,\n description:\n 'The User selector, one kind at a time. Absent or empty selects nobody; everyone is only ever the explicit `id: [\"*\"]` wildcard.',\n properties: {\n id: {\n type: \"array\",\n description:\n \"Named User ids, or the single wildcard `*` meaning everyone in scope.\",\n items: { type: \"string\" },\n },\n roles: {\n type: \"array\",\n items: { type: \"string\", enum: PLATFORM_ROLE_NAMES },\n },\n departmentIds: {\n type: \"array\",\n items: { type: \"string\" },\n },\n },\n },\n external: {\n type: \"array\",\n uniqueItems: true,\n description:\n \"Which groups of the external SIS roster were included. Human-triggered sends only; an Automation can never set it.\",\n items: { type: \"string\", enum: EXTERNAL_AUDIENCE_GROUPS },\n },\n emergencyContacts: {\n type: \"boolean\",\n description:\n 'Deprecated: superseded by `external`. A stored `true` reads as `external: [\"parents\"]`.',\n },\n users: {\n type: \"array\",\n description:\n \"Snapshot of the User ids the selector resolved to at send time.\",\n items: { type: \"string\" },\n },\n delivery: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Send-time delivery counts per audience. Absent for an audience that was not sent to.\",\n properties: {\n internal: deliveryCountsNode,\n external: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n emergencyContacts: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n description: \"Deprecated: superseded by `external`.\",\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;;;;;AAQ5D,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;AACF;;;;;;;AAUA,MAAa,2BAA2B,CAAC,YAAY,SAAS;AAI9D,MAAM,qBAAqB;CACzB,MAAM;CACN,sBAAsB;CACtB,UAAU;EAAC;EAAc;EAAQ;CAAQ;CACzC,YAAY;EACV,YAAY;GAAE,MAAM;GAAW,SAAS;EAAE;EAC1C,MAAM;GAAE,MAAM;GAAW,SAAS;EAAE;EACpC,QAAQ;GAAE,MAAM;GAAW,SAAS;EAAE;CACxC;AACF;AAEA,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;EACA,gBAAgB;EAChB,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,aACE;GACF,YAAY;IACV,IAAI;KACF,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,IAAI;OACF,MAAM;OACN,aACE;OACF,OAAO,EAAE,MAAM,SAAS;MAC1B;MACA,OAAO;OACL,MAAM;OACN,OAAO;QAAE,MAAM;QAAU,MAAM;OAAoB;MACrD;MACA,eAAe;OACb,MAAM;OACN,OAAO,EAAE,MAAM,SAAS;MAC1B;KACF;IACF;IACA,UAAU;KACR,MAAM;KACN,aAAa;KACb,aACE;KACF,OAAO;MAAE,MAAM;MAAU,MAAM;KAAyB;IAC1D;IACA,mBAAmB;KACjB,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aACE;KACF,OAAO,EAAE,MAAM,SAAS;IAC1B;IACA,UAAU;KACR,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,UAAU;MACV,UAAU;OACR,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;MACA,mBAAmB;OACjB,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,aAAa;OACb,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;KACF;IACF;GACF;EACF;CACF;AACF"}
@@ -60,6 +60,18 @@ export declare const emailMessageSchema: {
60
60
  readonly replyTo: {
61
61
  readonly type: readonly ["string", "array"];
62
62
  };
63
+ readonly cc: {
64
+ readonly type: readonly ["string", "array"];
65
+ readonly items: {
66
+ readonly type: "string";
67
+ };
68
+ };
69
+ readonly bcc: {
70
+ readonly type: readonly ["string", "array"];
71
+ readonly items: {
72
+ readonly type: "string";
73
+ };
74
+ };
63
75
  readonly appData: {
64
76
  readonly type: "object";
65
77
  readonly additionalProperties: true;
@@ -63,6 +63,14 @@ const emailMessageSchema = {
63
63
  description: "Additional headers for the email message, key/value pairs"
64
64
  },
65
65
  replyTo: { type: ["string", "array"] },
66
+ cc: {
67
+ type: ["string", "array"],
68
+ items: { type: "string" }
69
+ },
70
+ bcc: {
71
+ type: ["string", "array"],
72
+ items: { type: "string" }
73
+ },
66
74
  appData: {
67
75
  type: "object",
68
76
  additionalProperties: true,
@@ -1 +1 @@
1
- {"version":3,"file":"emailMessage.js","names":[],"sources":["../../.generated/schemas/emailMessage.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const emailMessageSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"emailMessage.json\",\n title: \"Email Message\",\n type: \"object\",\n required: [\"id\", \"type\", \"to\", \"from\", \"status\", \"subject\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n default: \"emailMessage\",\n enum: [\"emailMessage\"],\n },\n to: {\n type: \"string\",\n },\n from: {\n type: \"string\",\n description: \"Must be in the format of 'Sender <email@example.com>\",\n },\n subject: {\n type: \"string\",\n },\n status: {\n type: \"string\",\n enum: [\n \"queued\",\n \"sending\",\n \"sent\",\n \"deferred\",\n \"delivered\",\n \"undelivered\",\n \"bounced\",\n \"blocked\",\n \"receiving\",\n \"received\",\n \"opened\",\n \"clicked\",\n \"unsubscribed\",\n \"spamReport\",\n ],\n },\n statusMessage: {\n type: \"string\",\n },\n errorCode: {\n type: \"string\",\n description: \"Raw vendor delivery-failure code, e.g. Twilio 21610.\",\n },\n html: {\n type: \"string\",\n },\n text: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n headers: {\n type: \"object\",\n additionalProperties: { type: \"string\" },\n description: \"Additional headers for the email message, key/value pairs\",\n },\n replyTo: {\n type: [\"string\", \"array\"],\n },\n appData: {\n type: \"object\",\n additionalProperties: true,\n description:\n \"Additional data for the email message, used for custom data\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n },\n} as const;\n\nexport type EmailMessageSchema = FromSchema<\n typeof emailMessageSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,qBAAqB;CAChC,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAM;EAAQ;EAAU;CAAS;CAC1D,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc;EACvB;EACA,IAAI,EACF,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,aAAa;EACf;EACA,SAAS,EACP,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,eAAe,EACb,MAAM,SACR;EACA,WAAW;GACT,MAAM;GACN,aAAa;EACf;EACA,MAAM,EACJ,MAAM,SACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ,EACN,MAAM,SACR;EACA,SAAS;GACP,MAAM;GACN,sBAAsB,EAAE,MAAM,SAAS;GACvC,aAAa;EACf;EACA,SAAS,EACP,MAAM,CAAC,UAAU,OAAO,EAC1B;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,aACE;EACJ;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,yCACR;CACF;AACF"}
1
+ {"version":3,"file":"emailMessage.js","names":[],"sources":["../../.generated/schemas/emailMessage.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const emailMessageSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"emailMessage.json\",\n title: \"Email Message\",\n type: \"object\",\n required: [\"id\", \"type\", \"to\", \"from\", \"status\", \"subject\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n default: \"emailMessage\",\n enum: [\"emailMessage\"],\n },\n to: {\n type: \"string\",\n },\n from: {\n type: \"string\",\n description: \"Must be in the format of 'Sender <email@example.com>\",\n },\n subject: {\n type: \"string\",\n },\n status: {\n type: \"string\",\n enum: [\n \"queued\",\n \"sending\",\n \"sent\",\n \"deferred\",\n \"delivered\",\n \"undelivered\",\n \"bounced\",\n \"blocked\",\n \"receiving\",\n \"received\",\n \"opened\",\n \"clicked\",\n \"unsubscribed\",\n \"spamReport\",\n ],\n },\n statusMessage: {\n type: \"string\",\n },\n errorCode: {\n type: \"string\",\n description: \"Raw vendor delivery-failure code, e.g. Twilio 21610.\",\n },\n html: {\n type: \"string\",\n },\n text: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n headers: {\n type: \"object\",\n additionalProperties: { type: \"string\" },\n description: \"Additional headers for the email message, key/value pairs\",\n },\n replyTo: {\n type: [\"string\", \"array\"],\n },\n cc: {\n type: [\"string\", \"array\"],\n items: { type: \"string\" },\n },\n bcc: {\n type: [\"string\", \"array\"],\n items: { type: \"string\" },\n },\n appData: {\n type: \"object\",\n additionalProperties: true,\n description:\n \"Additional data for the email message, used for custom data\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n },\n} as const;\n\nexport type EmailMessageSchema = FromSchema<\n typeof emailMessageSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,qBAAqB;CAChC,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAM;EAAQ;EAAU;CAAS;CAC1D,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc;EACvB;EACA,IAAI,EACF,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,aAAa;EACf;EACA,SAAS,EACP,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,eAAe,EACb,MAAM,SACR;EACA,WAAW;GACT,MAAM;GACN,aAAa;EACf;EACA,MAAM,EACJ,MAAM,SACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ,EACN,MAAM,SACR;EACA,SAAS;GACP,MAAM;GACN,sBAAsB,EAAE,MAAM,SAAS;GACvC,aAAa;EACf;EACA,SAAS,EACP,MAAM,CAAC,UAAU,OAAO,EAC1B;EACA,IAAI;GACF,MAAM,CAAC,UAAU,OAAO;GACxB,OAAO,EAAE,MAAM,SAAS;EAC1B;EACA,KAAK;GACH,MAAM,CAAC,UAAU,OAAO;GACxB,OAAO,EAAE,MAAM,SAAS;EAC1B;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,aACE;EACJ;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,yCACR;CACF;AACF"}
@@ -2,25 +2,26 @@ export { alarmSchema, type AlarmSchema } from "./alarm.js";
2
2
  export { announcementSchema, type AnnouncementSchema } from "./announcement.js";
3
3
  export { automationSchema, type AutomationSchema } from "./automation.js";
4
4
  export { billSchema, type BillSchema, type BillLine } from "./bill.js";
5
- export { billingCategorySchema, type BillingCategorySchema } from "./billingCategory.js";
5
+ export { billingCategorySchema, type BillingCategorySchema, } from "./billingCategory.js";
6
6
  export { cameraSchema, type CameraSchema } from "./camera.js";
7
7
  export { categorySchema, type CategorySchema } from "./category.js";
8
+ export { costSchema, type CostSchema, type CostBillingReviewEntry, } from "./cost.js";
8
9
  export { courtesySchema, type CourtesySchema } from "./courtesy.js";
9
10
  export { credentialSchema, type CredentialSchema } from "./credential.js";
10
11
  export { departmentSchema, type DepartmentSchema } from "./department.js";
11
12
  export { dimmerSchema, type DimmerSchema } from "./dimmer.js";
12
- export { discoveredDeviceSchema, type DiscoveredDeviceSchema } from "./discoveredDevice.js";
13
+ export { discoveredDeviceSchema, type DiscoveredDeviceSchema, } from "./discoveredDevice.js";
13
14
  export { emailMessageSchema, type EmailMessageSchema } from "./emailMessage.js";
14
15
  export { energyReportSchema, type EnergyReportSchema } from "./energyReport.js";
15
- export { energyReportShardSchema, type EnergyReportShardSchema } from "./energyReportShard.js";
16
+ export { energyReportShardSchema, type EnergyReportShardSchema, } from "./energyReportShard.js";
16
17
  export { gatewaySchema, type GatewaySchema } from "./gateway.js";
17
18
  export { groupSchema, type GroupSchema } from "./group.js";
18
- export { identificationSchema, type IdentificationSchema } from "./identification.js";
19
+ export { identificationSchema, type IdentificationSchema, } from "./identification.js";
19
20
  export { integrationSchema, type IntegrationSchema } from "./integration.js";
20
21
  export { issueSchema, type IssueSchema } from "./issue.js";
21
22
  export { lockSchema, type LockSchema } from "./lock.js";
22
23
  export { logSchema, type LogSchema } from "./log.js";
23
- export { mediaFileSchema, type MediaFileSchema, methods as mediaFileMethods } from "./mediaFile.js";
24
+ export { mediaFileSchema, type MediaFileSchema, methods as mediaFileMethods, } from "./mediaFile.js";
24
25
  export { mediaSourceSchema, type MediaSourceSchema } from "./mediaSource.js";
25
26
  export { motionSensorSchema, type MotionSensorSchema } from "./motionSensor.js";
26
27
  export { notificationSchema, type NotificationSchema } from "./notification.js";
@@ -46,4 +47,4 @@ export { ticketSchema, type TicketSchema } from "./ticket.js";
46
47
  export { timeSheetSchema, type TimeSheetSchema } from "./timeSheet.js";
47
48
  export { userSchema, type UserSchema, getters as userGetters } from "./user.js";
48
49
  export { vendorSchema, type VendorSchema } from "./vendor.js";
49
- export { windowCoveringSchema, type WindowCoveringSchema } from "./windowCovering.js";
50
+ export { windowCoveringSchema, type WindowCoveringSchema, } from "./windowCovering.js";
@@ -5,6 +5,7 @@ import { billSchema } from "./bill.js";
5
5
  import { billingCategorySchema } from "./billingCategory.js";
6
6
  import { cameraSchema } from "./camera.js";
7
7
  import { categorySchema } from "./category.js";
8
+ import { costSchema } from "./cost.js";
8
9
  import { courtesySchema } from "./courtesy.js";
9
10
  import { credentialSchema } from "./credential.js";
10
11
  import { departmentSchema } from "./department.js";
@@ -47,4 +48,4 @@ import { timeSheetSchema } from "./timeSheet.js";
47
48
  import { getters, userSchema } from "./user.js";
48
49
  import { vendorSchema } from "./vendor.js";
49
50
  import { windowCoveringSchema } from "./windowCovering.js";
50
- export { alarmSchema, announcementSchema, automationSchema, billSchema, billingCategorySchema, cameraSchema, categorySchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, resourceSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, sosEventSchema, sosTypeSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };
51
+ export { alarmSchema, announcementSchema, automationSchema, billSchema, billingCategorySchema, cameraSchema, categorySchema, costSchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, resourceSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, sosEventSchema, sosTypeSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };