@d19n/youfibre-odin-sdk 2.0.377 → 2.0.379

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 (35) hide show
  1. package/README.md +2 -1
  2. package/dist/api-sdk-v2/AccountApi.d.ts +2 -0
  3. package/dist/api-sdk-v2/AccountApi.js +6 -0
  4. package/dist/api-sdk-v2/ContractApi.d.ts +52 -0
  5. package/dist/api-sdk-v2/ContractApi.js +167 -0
  6. package/dist/api-sdk-v2/OrderApi.d.ts +2 -0
  7. package/dist/api-sdk-v2/OrderApi.js +6 -0
  8. package/dist/api-sdk-v2/RecontractApi.d.ts +2 -0
  9. package/dist/api-sdk-v2/RecontractApi.js +6 -0
  10. package/dist/db-sdk-v2/AccountDb.d.ts +2 -0
  11. package/dist/db-sdk-v2/AccountDb.js +6 -0
  12. package/dist/db-sdk-v2/ContractDb.d.ts +124 -0
  13. package/dist/db-sdk-v2/ContractDb.js +216 -0
  14. package/dist/db-sdk-v2/OrderDb.d.ts +2 -0
  15. package/dist/db-sdk-v2/OrderDb.js +6 -0
  16. package/dist/db-sdk-v2/RecontractDb.d.ts +2 -0
  17. package/dist/db-sdk-v2/RecontractDb.js +6 -0
  18. package/dist/entities-v2/Account.d.ts +3 -0
  19. package/dist/entities-v2/Case.d.ts +9 -3
  20. package/dist/entities-v2/Case.js +9 -3
  21. package/dist/entities-v2/ChangeReason.d.ts +2 -1
  22. package/dist/entities-v2/ChangeReason.js +2 -1
  23. package/dist/entities-v2/Contract.d.ts +299 -0
  24. package/dist/entities-v2/Contract.js +198 -0
  25. package/dist/entities-v2/DocumentProcessing.d.ts +3 -1
  26. package/dist/entities-v2/DocumentProcessing.js +2 -0
  27. package/dist/entities-v2/Lead.d.ts +2 -0
  28. package/dist/entities-v2/Lead.js +2 -0
  29. package/dist/entities-v2/Order.d.ts +12 -1
  30. package/dist/entities-v2/Order.js +2 -0
  31. package/dist/entities-v2/Recontract.d.ts +16 -1
  32. package/dist/entities-v2/Recontract.js +7 -1
  33. package/dist/entities-v2/WorkOrder.d.ts +3 -2
  34. package/dist/entities-v2/WorkOrder.js +3 -2
  35. package/package.json +1 -1
@@ -0,0 +1,299 @@
1
+ /**
2
+ * Contract Entity Definition
3
+ *
4
+ * The contract an order runs on: its number, its terms, and whether it is Active, Superseded (by a recontract) or Ended. Source of truth for the terms; the Order carries a read-only copy. Carried over to the new order on a home move.
5
+ *
6
+ * @module OrderModule
7
+ * @entity Contract
8
+ * @schemaId 7f5e71ff-040d-4e4e-8e1c-577e623c2319
9
+ *
10
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
11
+ * Generated from Odin schema definition
12
+ */
13
+ import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
14
+ import { OrderProperties } from './Order';
15
+ import { AccountProperties } from './Account';
16
+ import { RecontractProperties } from './Recontract';
17
+ /**
18
+ * Available types for Contract records
19
+ */
20
+ export declare enum ContractEntityTypes {
21
+ /** This is the default record type */
22
+ DEFAULT = "DEFAULT"
23
+ }
24
+ /**
25
+ * Valid values for Contract.Status
26
+ *
27
+ * Active: the contract the order runs on now. Superseded: replaced by a recontract. Ended: the service ended.
28
+ *
29
+ * @remarks Available options:
30
+ * - `ACTIVE` - Active
31
+ * - `ENDED` - Ended
32
+ * - `SUPERSEDED` - Superseded
33
+ */
34
+ export declare enum ContractStatus {
35
+ ACTIVE = "ACTIVE",
36
+ ENDED = "ENDED",
37
+ SUPERSEDED = "SUPERSEDED"
38
+ }
39
+ /**
40
+ * Valid values for Contract.ContractType
41
+ *
42
+ * The minimum term. Same options as Order.ContractType.
43
+ *
44
+ * @remarks Available options:
45
+ * - `MONTHLY` - Monthly rolling
46
+ * - `NONE` - No contract
47
+ * - `ANNUAL_12` - Term 12 months
48
+ * - `ANNUAL_18` - Term 18 months
49
+ * - `ANNUAL_19` - Term 19 months
50
+ * - `ANNUAL_20` - Term 20 months
51
+ * - `ANNUAL_21` - Term 21 months
52
+ * - `ANNUAL_22` - Term 22 months
53
+ * - `ANNUAL_23` - Term 23 months
54
+ * - `ANNUAL_24` - Term 24 months
55
+ * - `ANNUAL_25` - Term 25 months
56
+ * - `ANNUAL_26` - Term 26 months
57
+ * - `ANNUAL_27` - Term 27 months
58
+ * - `ANNUAL_28` - Term 28 months
59
+ * - `ANNUAL_29` - Term 29 months
60
+ * - ... and 14 more
61
+ */
62
+ export declare enum ContractContractType {
63
+ MONTHLY_ROLLING = "MONTHLY",
64
+ NO_CONTRACT = "NONE",
65
+ TERM_12_MONTHS = "ANNUAL_12",
66
+ TERM_18_MONTHS = "ANNUAL_18",
67
+ TERM_19_MONTHS = "ANNUAL_19",
68
+ TERM_20_MONTHS = "ANNUAL_20",
69
+ TERM_21_MONTHS = "ANNUAL_21",
70
+ TERM_22_MONTHS = "ANNUAL_22",
71
+ TERM_23_MONTHS = "ANNUAL_23",
72
+ TERM_24_MONTHS = "ANNUAL_24",
73
+ TERM_25_MONTHS = "ANNUAL_25",
74
+ TERM_26_MONTHS = "ANNUAL_26",
75
+ TERM_27_MONTHS = "ANNUAL_27",
76
+ TERM_28_MONTHS = "ANNUAL_28",
77
+ TERM_29_MONTHS = "ANNUAL_29",
78
+ TERM_30_MONTHS = "ANNUAL_30",
79
+ TERM_31_MONTHS = "ANNUAL_31",
80
+ TERM_32_MONTHS = "ANNUAL_32",
81
+ TERM_33_MONTHS = "ANNUAL_33",
82
+ TERM_34_MONTHS = "ANNUAL_34",
83
+ TERM_35_MONTHS = "ANNUAL_35",
84
+ TERM_36_MONTHS = "ANNUAL_36",
85
+ TERM_37_MONTHS = "ANNUAL_37",
86
+ TERM_38_MONTHS = "ANNUAL_38",
87
+ TERM_39_MONTHS = "ANNUAL_39",
88
+ TERM_40_MONTHS = "ANNUAL_40",
89
+ TERM_41_MONTHS = "ANNUAL_41",
90
+ TERM_42_MONTHS = "ANNUAL_42",
91
+ TERM_60_MONTHS = "ANNUAL_60"
92
+ }
93
+ /**
94
+ * Valid values for Contract.BillingTerms
95
+ *
96
+ * Payment terms. Same options as Order.BillingTerms.
97
+ *
98
+ * @remarks Available options:
99
+ * - `NET_0` - NET 0
100
+ * - `NET_10` - NET 10
101
+ * - `NET_120` - NET 120
102
+ * - `NET_15` - NET 15
103
+ * - `NET_3` - NET 3
104
+ * - `NET_30` - NET 30
105
+ * - `NET_60` - NET 60
106
+ * - `NET_90` - NET 90
107
+ */
108
+ export declare enum ContractBillingTerms {
109
+ NET_0 = "NET_0",
110
+ NET_10 = "NET_10",
111
+ NET_120 = "NET_120",
112
+ NET_15 = "NET_15",
113
+ NET_3 = "NET_3",
114
+ NET_30 = "NET_30",
115
+ NET_60 = "NET_60",
116
+ NET_90 = "NET_90"
117
+ }
118
+ /**
119
+ * Property keys for Contract
120
+ * Use these constants instead of string literals for type safety
121
+ */
122
+ export declare enum ContractPropertyKeys {
123
+ /** The order's record number for its first contract; each recontract adds -R<n> (OR1849203-R1). Kept across a home move. Unique. */
124
+ ContractNumber = "ContractNumber",
125
+ /** Active: the contract the order runs on now. Superseded: replaced by a recontract. Ended: the service ended. */
126
+ Status = "Status",
127
+ /** The minimum term. Same options as Order.ContractType. */
128
+ ContractType = "ContractType",
129
+ /** The date the contract starts. */
130
+ ContractStartDate = "ContractStartDate",
131
+ /** The date the minimum term ends. */
132
+ ContractEndDate = "ContractEndDate",
133
+ /** How many times the contract has been renewed (recontracted). */
134
+ ContractRenewalCount = "ContractRenewalCount",
135
+ /** The billing anchor. On a home-moved order the order keeps its own (CORE-1492), so this can differ from the order it now runs on. */
136
+ BillingStartDate = "BillingStartDate",
137
+ /** The day of the month the customer is billed. */
138
+ BillingDay = "BillingDay",
139
+ /** The billing day the customer asked for at checkout. */
140
+ DesiredBillingDay = "DesiredBillingDay",
141
+ /** Payment terms. Same options as Order.BillingTerms. */
142
+ BillingTerms = "BillingTerms",
143
+ /** When the recontract that started this contract was applied. */
144
+ RecontractDate = "RecontractDate",
145
+ /** When the terms were last amended. */
146
+ AmendmentDate = "AmendmentDate",
147
+ /** The contract this one superseded, when it was started by a recontract. */
148
+ PreviousContractId = "PreviousContractId",
149
+ /** The order the contract runs on now. The only order its terms are copied to. */
150
+ NextOrderId = "NextOrderId",
151
+ /** The order the contract came from, when it was carried over a home move. Never written to: the terms go to NextOrderId only. */
152
+ PreviousOrderId = "PreviousOrderId"
153
+ }
154
+ /**
155
+ * Properties for Contract records
156
+ *
157
+ * @see OrderModule:Contract
158
+ */
159
+ export interface ContractProperties {
160
+ /** The order's record number for its first contract; each recontract adds -R<n> (OR1849203-R1). Kept across a home move. Unique.
161
+ *
162
+ * @type {TEXT}
163
+ * @default
164
+ */
165
+ ContractNumber: string;
166
+ /** Active: the contract the order runs on now. Superseded: replaced by a recontract. Ended: the service ended.
167
+ *
168
+ * @type {ENUM}
169
+ * @default
170
+ * @enum {ContractStatus}
171
+ */
172
+ Status: ContractStatus;
173
+ /** The minimum term. Same options as Order.ContractType.
174
+ *
175
+ * @type {ENUM}
176
+ * @default
177
+ * @enum {ContractContractType}
178
+ */
179
+ ContractType: ContractContractType;
180
+ /** The date the contract starts.
181
+ *
182
+ * @type {DATE}
183
+ * @default
184
+ */
185
+ ContractStartDate: string;
186
+ /** The date the minimum term ends.
187
+ *
188
+ * @type {DATE}
189
+ * @default
190
+ */
191
+ ContractEndDate: string;
192
+ /** How many times the contract has been renewed (recontracted).
193
+ *
194
+ * @type {NUMBER}
195
+ * @default
196
+ */
197
+ ContractRenewalCount: number;
198
+ /** The billing anchor. On a home-moved order the order keeps its own (CORE-1492), so this can differ from the order it now runs on.
199
+ *
200
+ * @type {DATE}
201
+ * @default
202
+ */
203
+ BillingStartDate: string;
204
+ /** The day of the month the customer is billed.
205
+ *
206
+ * @type {NUMBER}
207
+ * @default
208
+ */
209
+ BillingDay: number;
210
+ /** The billing day the customer asked for at checkout.
211
+ *
212
+ * @type {NUMBER}
213
+ * @default
214
+ */
215
+ DesiredBillingDay: number;
216
+ /** Payment terms. Same options as Order.BillingTerms.
217
+ *
218
+ * @type {ENUM}
219
+ * @default
220
+ * @enum {ContractBillingTerms}
221
+ */
222
+ BillingTerms: ContractBillingTerms;
223
+ /** When the recontract that started this contract was applied.
224
+ *
225
+ * @type {DATE}
226
+ * @default
227
+ */
228
+ RecontractDate: string;
229
+ /** When the terms were last amended.
230
+ *
231
+ * @type {DATE}
232
+ * @default
233
+ */
234
+ AmendmentDate: string;
235
+ /** The contract this one superseded, when it was started by a recontract.
236
+ *
237
+ * @type {UUID}
238
+ * @default
239
+ */
240
+ PreviousContractId: string;
241
+ /** The order the contract runs on now. The only order its terms are copied to.
242
+ *
243
+ * @type {LOOKUP}
244
+ * @default
245
+ */
246
+ NextOrderId: string;
247
+ /** The order the contract came from, when it was carried over a home move. Never written to: the terms go to NextOrderId only.
248
+ *
249
+ * @type {LOOKUP}
250
+ * @default
251
+ */
252
+ PreviousOrderId: string;
253
+ }
254
+ /**
255
+ * Contract entity from OrderModule
256
+ *
257
+ * The contract an order runs on: its number, its terms, and whether it is Active, Superseded (by a recontract) or Ended. Source of truth for the terms; the Order carries a read-only copy. Carried over to the new order on a home move.
258
+ *
259
+ * @module OrderModule
260
+ * @entity Contract
261
+ * @schemaId 7f5e71ff-040d-4e4e-8e1c-577e623c2319
262
+ * @capabilities searchable, updateable, undeletable, triggerable
263
+ */
264
+ export declare class Contract extends OdinRecord<ContractProperties> {
265
+ entity: 'OrderModule:Contract';
266
+ type: ContractEntityTypes;
267
+ schemaId: '7f5e71ff-040d-4e4e-8e1c-577e623c2319';
268
+ properties: ContractProperties;
269
+ /** Linked Order records (Contract__Order) */
270
+ Order: OdinLink<LinkedOdinRecord<OrderProperties>>;
271
+ /** Linked Account records (Contract__Account) */
272
+ Account: OdinLink<LinkedOdinRecord<AccountProperties>>;
273
+ /** Linked Recontract records (Recontract__Contract) */
274
+ Recontract: OdinLink<LinkedOdinRecord<RecontractProperties>>;
275
+ }
276
+ /**
277
+ * RabbitMQ routing keys for Contract events
278
+ */
279
+ export declare const ROUTING_KEY_CONTRACT_CREATED = "OrderModule.Contract.SubDbRecordCreated";
280
+ export declare const ROUTING_KEY_CONTRACT_UPDATED = "OrderModule.Contract.SubDbRecordUpdated";
281
+ export declare const ROUTING_KEY_CONTRACT_DELETED = "OrderModule.Contract.SubDbRecordDeleted";
282
+ /**
283
+ * Type-specific routing keys for Contract events
284
+ * Subscribe to these for events on specific entity types only
285
+ */
286
+ /** This is the default record type created */
287
+ export declare const ROUTING_KEY_CONTRACT_DEFAULT_CREATED = "OrderModule.Contract.DEFAULT.SubDbRecordCreated";
288
+ /** This is the default record type updated */
289
+ export declare const ROUTING_KEY_CONTRACT_DEFAULT_UPDATED = "OrderModule.Contract.DEFAULT.SubDbRecordUpdated";
290
+ /** This is the default record type deleted */
291
+ export declare const ROUTING_KEY_CONTRACT_DEFAULT_DELETED = "OrderModule.Contract.DEFAULT.SubDbRecordDeleted";
292
+ /** Event: Contract__Order link created */
293
+ export declare const ROUTING_KEY_LINK_CONTRACT_ORDER_CREATED = "OrderModule.Contract.Order.SubDbRecordAssociationCreated";
294
+ /** Event: Contract__Order link deleted */
295
+ export declare const ROUTING_KEY_LINK_CONTRACT_ORDER_DELETED = "OrderModule.Contract.Order.SubDbRecordAssociationDeleted";
296
+ /** Event: Contract__Account link created */
297
+ export declare const ROUTING_KEY_LINK_CONTRACT_ACCOUNT_CREATED = "OrderModule.Contract.Account.SubDbRecordAssociationCreated";
298
+ /** Event: Contract__Account link deleted */
299
+ export declare const ROUTING_KEY_LINK_CONTRACT_ACCOUNT_DELETED = "OrderModule.Contract.Account.SubDbRecordAssociationDeleted";
@@ -0,0 +1,198 @@
1
+ "use strict";
2
+ /**
3
+ * Contract Entity Definition
4
+ *
5
+ * The contract an order runs on: its number, its terms, and whether it is Active, Superseded (by a recontract) or Ended. Source of truth for the terms; the Order carries a read-only copy. Carried over to the new order on a home move.
6
+ *
7
+ * @module OrderModule
8
+ * @entity Contract
9
+ * @schemaId 7f5e71ff-040d-4e4e-8e1c-577e623c2319
10
+ *
11
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
+ * Generated from Odin schema definition
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ROUTING_KEY_LINK_CONTRACT_ACCOUNT_DELETED = exports.ROUTING_KEY_LINK_CONTRACT_ACCOUNT_CREATED = exports.ROUTING_KEY_LINK_CONTRACT_ORDER_DELETED = exports.ROUTING_KEY_LINK_CONTRACT_ORDER_CREATED = exports.ROUTING_KEY_CONTRACT_DEFAULT_DELETED = exports.ROUTING_KEY_CONTRACT_DEFAULT_UPDATED = exports.ROUTING_KEY_CONTRACT_DEFAULT_CREATED = exports.ROUTING_KEY_CONTRACT_DELETED = exports.ROUTING_KEY_CONTRACT_UPDATED = exports.ROUTING_KEY_CONTRACT_CREATED = exports.Contract = exports.ContractPropertyKeys = exports.ContractBillingTerms = exports.ContractContractType = exports.ContractStatus = exports.ContractEntityTypes = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * Available types for Contract records
19
+ */
20
+ var ContractEntityTypes;
21
+ (function (ContractEntityTypes) {
22
+ /** This is the default record type */
23
+ ContractEntityTypes["DEFAULT"] = "DEFAULT";
24
+ })(ContractEntityTypes = exports.ContractEntityTypes || (exports.ContractEntityTypes = {}));
25
+ /**
26
+ * Valid values for Contract.Status
27
+ *
28
+ * Active: the contract the order runs on now. Superseded: replaced by a recontract. Ended: the service ended.
29
+ *
30
+ * @remarks Available options:
31
+ * - `ACTIVE` - Active
32
+ * - `ENDED` - Ended
33
+ * - `SUPERSEDED` - Superseded
34
+ */
35
+ var ContractStatus;
36
+ (function (ContractStatus) {
37
+ ContractStatus["ACTIVE"] = "ACTIVE";
38
+ ContractStatus["ENDED"] = "ENDED";
39
+ ContractStatus["SUPERSEDED"] = "SUPERSEDED";
40
+ })(ContractStatus = exports.ContractStatus || (exports.ContractStatus = {}));
41
+ /**
42
+ * Valid values for Contract.ContractType
43
+ *
44
+ * The minimum term. Same options as Order.ContractType.
45
+ *
46
+ * @remarks Available options:
47
+ * - `MONTHLY` - Monthly rolling
48
+ * - `NONE` - No contract
49
+ * - `ANNUAL_12` - Term 12 months
50
+ * - `ANNUAL_18` - Term 18 months
51
+ * - `ANNUAL_19` - Term 19 months
52
+ * - `ANNUAL_20` - Term 20 months
53
+ * - `ANNUAL_21` - Term 21 months
54
+ * - `ANNUAL_22` - Term 22 months
55
+ * - `ANNUAL_23` - Term 23 months
56
+ * - `ANNUAL_24` - Term 24 months
57
+ * - `ANNUAL_25` - Term 25 months
58
+ * - `ANNUAL_26` - Term 26 months
59
+ * - `ANNUAL_27` - Term 27 months
60
+ * - `ANNUAL_28` - Term 28 months
61
+ * - `ANNUAL_29` - Term 29 months
62
+ * - ... and 14 more
63
+ */
64
+ var ContractContractType;
65
+ (function (ContractContractType) {
66
+ ContractContractType["MONTHLY_ROLLING"] = "MONTHLY";
67
+ ContractContractType["NO_CONTRACT"] = "NONE";
68
+ ContractContractType["TERM_12_MONTHS"] = "ANNUAL_12";
69
+ ContractContractType["TERM_18_MONTHS"] = "ANNUAL_18";
70
+ ContractContractType["TERM_19_MONTHS"] = "ANNUAL_19";
71
+ ContractContractType["TERM_20_MONTHS"] = "ANNUAL_20";
72
+ ContractContractType["TERM_21_MONTHS"] = "ANNUAL_21";
73
+ ContractContractType["TERM_22_MONTHS"] = "ANNUAL_22";
74
+ ContractContractType["TERM_23_MONTHS"] = "ANNUAL_23";
75
+ ContractContractType["TERM_24_MONTHS"] = "ANNUAL_24";
76
+ ContractContractType["TERM_25_MONTHS"] = "ANNUAL_25";
77
+ ContractContractType["TERM_26_MONTHS"] = "ANNUAL_26";
78
+ ContractContractType["TERM_27_MONTHS"] = "ANNUAL_27";
79
+ ContractContractType["TERM_28_MONTHS"] = "ANNUAL_28";
80
+ ContractContractType["TERM_29_MONTHS"] = "ANNUAL_29";
81
+ ContractContractType["TERM_30_MONTHS"] = "ANNUAL_30";
82
+ ContractContractType["TERM_31_MONTHS"] = "ANNUAL_31";
83
+ ContractContractType["TERM_32_MONTHS"] = "ANNUAL_32";
84
+ ContractContractType["TERM_33_MONTHS"] = "ANNUAL_33";
85
+ ContractContractType["TERM_34_MONTHS"] = "ANNUAL_34";
86
+ ContractContractType["TERM_35_MONTHS"] = "ANNUAL_35";
87
+ ContractContractType["TERM_36_MONTHS"] = "ANNUAL_36";
88
+ ContractContractType["TERM_37_MONTHS"] = "ANNUAL_37";
89
+ ContractContractType["TERM_38_MONTHS"] = "ANNUAL_38";
90
+ ContractContractType["TERM_39_MONTHS"] = "ANNUAL_39";
91
+ ContractContractType["TERM_40_MONTHS"] = "ANNUAL_40";
92
+ ContractContractType["TERM_41_MONTHS"] = "ANNUAL_41";
93
+ ContractContractType["TERM_42_MONTHS"] = "ANNUAL_42";
94
+ ContractContractType["TERM_60_MONTHS"] = "ANNUAL_60";
95
+ })(ContractContractType = exports.ContractContractType || (exports.ContractContractType = {}));
96
+ /**
97
+ * Valid values for Contract.BillingTerms
98
+ *
99
+ * Payment terms. Same options as Order.BillingTerms.
100
+ *
101
+ * @remarks Available options:
102
+ * - `NET_0` - NET 0
103
+ * - `NET_10` - NET 10
104
+ * - `NET_120` - NET 120
105
+ * - `NET_15` - NET 15
106
+ * - `NET_3` - NET 3
107
+ * - `NET_30` - NET 30
108
+ * - `NET_60` - NET 60
109
+ * - `NET_90` - NET 90
110
+ */
111
+ var ContractBillingTerms;
112
+ (function (ContractBillingTerms) {
113
+ ContractBillingTerms["NET_0"] = "NET_0";
114
+ ContractBillingTerms["NET_10"] = "NET_10";
115
+ ContractBillingTerms["NET_120"] = "NET_120";
116
+ ContractBillingTerms["NET_15"] = "NET_15";
117
+ ContractBillingTerms["NET_3"] = "NET_3";
118
+ ContractBillingTerms["NET_30"] = "NET_30";
119
+ ContractBillingTerms["NET_60"] = "NET_60";
120
+ ContractBillingTerms["NET_90"] = "NET_90";
121
+ })(ContractBillingTerms = exports.ContractBillingTerms || (exports.ContractBillingTerms = {}));
122
+ /**
123
+ * Property keys for Contract
124
+ * Use these constants instead of string literals for type safety
125
+ */
126
+ var ContractPropertyKeys;
127
+ (function (ContractPropertyKeys) {
128
+ /** The order's record number for its first contract; each recontract adds -R<n> (OR1849203-R1). Kept across a home move. Unique. */
129
+ ContractPropertyKeys["ContractNumber"] = "ContractNumber";
130
+ /** Active: the contract the order runs on now. Superseded: replaced by a recontract. Ended: the service ended. */
131
+ ContractPropertyKeys["Status"] = "Status";
132
+ /** The minimum term. Same options as Order.ContractType. */
133
+ ContractPropertyKeys["ContractType"] = "ContractType";
134
+ /** The date the contract starts. */
135
+ ContractPropertyKeys["ContractStartDate"] = "ContractStartDate";
136
+ /** The date the minimum term ends. */
137
+ ContractPropertyKeys["ContractEndDate"] = "ContractEndDate";
138
+ /** How many times the contract has been renewed (recontracted). */
139
+ ContractPropertyKeys["ContractRenewalCount"] = "ContractRenewalCount";
140
+ /** The billing anchor. On a home-moved order the order keeps its own (CORE-1492), so this can differ from the order it now runs on. */
141
+ ContractPropertyKeys["BillingStartDate"] = "BillingStartDate";
142
+ /** The day of the month the customer is billed. */
143
+ ContractPropertyKeys["BillingDay"] = "BillingDay";
144
+ /** The billing day the customer asked for at checkout. */
145
+ ContractPropertyKeys["DesiredBillingDay"] = "DesiredBillingDay";
146
+ /** Payment terms. Same options as Order.BillingTerms. */
147
+ ContractPropertyKeys["BillingTerms"] = "BillingTerms";
148
+ /** When the recontract that started this contract was applied. */
149
+ ContractPropertyKeys["RecontractDate"] = "RecontractDate";
150
+ /** When the terms were last amended. */
151
+ ContractPropertyKeys["AmendmentDate"] = "AmendmentDate";
152
+ /** The contract this one superseded, when it was started by a recontract. */
153
+ ContractPropertyKeys["PreviousContractId"] = "PreviousContractId";
154
+ /** The order the contract runs on now. The only order its terms are copied to. */
155
+ ContractPropertyKeys["NextOrderId"] = "NextOrderId";
156
+ /** The order the contract came from, when it was carried over a home move. Never written to: the terms go to NextOrderId only. */
157
+ ContractPropertyKeys["PreviousOrderId"] = "PreviousOrderId";
158
+ })(ContractPropertyKeys = exports.ContractPropertyKeys || (exports.ContractPropertyKeys = {}));
159
+ /**
160
+ * Contract entity from OrderModule
161
+ *
162
+ * The contract an order runs on: its number, its terms, and whether it is Active, Superseded (by a recontract) or Ended. Source of truth for the terms; the Order carries a read-only copy. Carried over to the new order on a home move.
163
+ *
164
+ * @module OrderModule
165
+ * @entity Contract
166
+ * @schemaId 7f5e71ff-040d-4e4e-8e1c-577e623c2319
167
+ * @capabilities searchable, updateable, undeletable, triggerable
168
+ */
169
+ class Contract extends core_1.OdinRecord {
170
+ }
171
+ exports.Contract = Contract;
172
+ // ============================================
173
+ // RABBITMQ EVENT ROUTING KEYS
174
+ // ============================================
175
+ /**
176
+ * RabbitMQ routing keys for Contract events
177
+ */
178
+ exports.ROUTING_KEY_CONTRACT_CREATED = 'OrderModule.Contract.SubDbRecordCreated';
179
+ exports.ROUTING_KEY_CONTRACT_UPDATED = 'OrderModule.Contract.SubDbRecordUpdated';
180
+ exports.ROUTING_KEY_CONTRACT_DELETED = 'OrderModule.Contract.SubDbRecordDeleted';
181
+ /**
182
+ * Type-specific routing keys for Contract events
183
+ * Subscribe to these for events on specific entity types only
184
+ */
185
+ /** This is the default record type created */
186
+ exports.ROUTING_KEY_CONTRACT_DEFAULT_CREATED = 'OrderModule.Contract.DEFAULT.SubDbRecordCreated';
187
+ /** This is the default record type updated */
188
+ exports.ROUTING_KEY_CONTRACT_DEFAULT_UPDATED = 'OrderModule.Contract.DEFAULT.SubDbRecordUpdated';
189
+ /** This is the default record type deleted */
190
+ exports.ROUTING_KEY_CONTRACT_DEFAULT_DELETED = 'OrderModule.Contract.DEFAULT.SubDbRecordDeleted';
191
+ /** Event: Contract__Order link created */
192
+ exports.ROUTING_KEY_LINK_CONTRACT_ORDER_CREATED = 'OrderModule.Contract.Order.SubDbRecordAssociationCreated';
193
+ /** Event: Contract__Order link deleted */
194
+ exports.ROUTING_KEY_LINK_CONTRACT_ORDER_DELETED = 'OrderModule.Contract.Order.SubDbRecordAssociationDeleted';
195
+ /** Event: Contract__Account link created */
196
+ exports.ROUTING_KEY_LINK_CONTRACT_ACCOUNT_CREATED = 'OrderModule.Contract.Account.SubDbRecordAssociationCreated';
197
+ /** Event: Contract__Account link deleted */
198
+ exports.ROUTING_KEY_LINK_CONTRACT_ACCOUNT_DELETED = 'OrderModule.Contract.Account.SubDbRecordAssociationDeleted';
@@ -35,6 +35,7 @@ export declare enum DocumentProcessingEntityTypes {
35
35
  * - `EXTRACT` - Extract text
36
36
  * - `OUTCOME_FORM_REVIEW` - Outcome form review
37
37
  * - `TEMPLATE_REPORT` - Template report
38
+ * - `VIEW` - View
38
39
  */
39
40
  export declare enum DocumentProcessingUseCase {
40
41
  CBO_FINAL_BILL_CHECK = "CBO_FINAL_BILL_CHECK",
@@ -45,7 +46,8 @@ export declare enum DocumentProcessingUseCase {
45
46
  EXTRACT_FIELDS = "EXTRACT_FIELDS",
46
47
  EXTRACT_TEXT = "EXTRACT",
47
48
  OUTCOME_FORM_REVIEW = "OUTCOME_FORM_REVIEW",
48
- TEMPLATE_REPORT = "TEMPLATE_REPORT"
49
+ TEMPLATE_REPORT = "TEMPLATE_REPORT",
50
+ VIEW = "VIEW"
49
51
  }
50
52
  /**
51
53
  * Valid values for DocumentProcessing.Provider
@@ -37,6 +37,7 @@ var DocumentProcessingEntityTypes;
37
37
  * - `EXTRACT` - Extract text
38
38
  * - `OUTCOME_FORM_REVIEW` - Outcome form review
39
39
  * - `TEMPLATE_REPORT` - Template report
40
+ * - `VIEW` - View
40
41
  */
41
42
  var DocumentProcessingUseCase;
42
43
  (function (DocumentProcessingUseCase) {
@@ -49,6 +50,7 @@ var DocumentProcessingUseCase;
49
50
  DocumentProcessingUseCase["EXTRACT_TEXT"] = "EXTRACT";
50
51
  DocumentProcessingUseCase["OUTCOME_FORM_REVIEW"] = "OUTCOME_FORM_REVIEW";
51
52
  DocumentProcessingUseCase["TEMPLATE_REPORT"] = "TEMPLATE_REPORT";
53
+ DocumentProcessingUseCase["VIEW"] = "VIEW";
52
54
  })(DocumentProcessingUseCase = exports.DocumentProcessingUseCase || (exports.DocumentProcessingUseCase = {}));
53
55
  /**
54
56
  * Valid values for DocumentProcessing.Provider
@@ -74,6 +74,7 @@ export declare enum DefaultLeadStageKeys {
74
74
  *
75
75
  * @remarks Available options:
76
76
  * - `COMMUNITY_TEAM` - Community team
77
+ * - `DESKTOP_APP` - Desktop App
77
78
  * - `FACEBOOK` - Facebook
78
79
  * - `FIELDSALES` - Field sales
79
80
  * - `GBVS`
@@ -90,6 +91,7 @@ export declare enum DefaultLeadStageKeys {
90
91
  */
91
92
  export declare enum LeadSource {
92
93
  COMMUNITY_TEAM = "COMMUNITY_TEAM",
94
+ DESKTOP_APP = "DESKTOP_APP",
93
95
  FACEBOOK = "FACEBOOK",
94
96
  FIELD_SALES = "FIELDSALES",
95
97
  GBVS = "GBVS",
@@ -64,6 +64,7 @@ var DefaultLeadStageKeys;
64
64
  *
65
65
  * @remarks Available options:
66
66
  * - `COMMUNITY_TEAM` - Community team
67
+ * - `DESKTOP_APP` - Desktop App
67
68
  * - `FACEBOOK` - Facebook
68
69
  * - `FIELDSALES` - Field sales
69
70
  * - `GBVS`
@@ -81,6 +82,7 @@ var DefaultLeadStageKeys;
81
82
  var LeadSource;
82
83
  (function (LeadSource) {
83
84
  LeadSource["COMMUNITY_TEAM"] = "COMMUNITY_TEAM";
85
+ LeadSource["DESKTOP_APP"] = "DESKTOP_APP";
84
86
  LeadSource["FACEBOOK"] = "FACEBOOK";
85
87
  LeadSource["FIELD_SALES"] = "FIELDSALES";
86
88
  LeadSource["GBVS"] = "GBVS";
@@ -53,6 +53,7 @@ import { WorkOrderProperties } from './WorkOrder';
53
53
  import { EmailProperties } from './Email';
54
54
  import { CommitmentProperties } from './Commitment';
55
55
  import { HomeMoveProperties } from './HomeMove';
56
+ import { ContractProperties } from './Contract';
56
57
  /**
57
58
  * Available types for Order records
58
59
  */
@@ -616,7 +617,9 @@ export declare enum OrderPropertyKeys {
616
617
  /** The next commitment to fall due. What a "what is about to breach" query sorts on, without walking every commitment. Written only by the lifecycle. */
617
618
  EarliestDueAt = "EarliestDueAt",
618
619
  /** True while the customer has declined the router/mesh dispatch this recontract would otherwise raise. Written by dispatchRouterForSpeedChange on every call — true when a decline is honoured, false otherwise — so reversal is simply calling the endpoint again with no decline flag (ORD-493). */
619
- RouterUpgradeDeclined = "RouterUpgradeDeclined"
620
+ RouterUpgradeDeclined = "RouterUpgradeDeclined",
621
+ /** The activation date asked for when the order was placed. Written once at checkout and never changed; RequestedActivationDate moves when the date does. */
622
+ FirstRequestedActivationDate = "FirstRequestedActivationDate"
620
623
  }
621
624
  /**
622
625
  * Properties for Order records
@@ -1305,6 +1308,12 @@ export interface OrderProperties {
1305
1308
  * @default
1306
1309
  */
1307
1310
  RouterUpgradeDeclined: boolean;
1311
+ /** The activation date asked for when the order was placed. Written once at checkout and never changed; RequestedActivationDate moves when the date does.
1312
+ *
1313
+ * @type {DATE}
1314
+ * @default
1315
+ */
1316
+ FirstRequestedActivationDate: string;
1308
1317
  }
1309
1318
  /**
1310
1319
  * Order entity from OrderModule
@@ -1409,6 +1418,8 @@ export declare class Order extends OdinRecord<OrderProperties> {
1409
1418
  Commitment: OdinLink<LinkedOdinRecord<CommitmentProperties>>;
1410
1419
  /** Linked HomeMove records (HomeMove__OldOrder) */
1411
1420
  HomeMove: OdinLink<LinkedOdinRecord<HomeMoveProperties>>;
1421
+ /** Linked Contract records (Contract__Order) */
1422
+ Contract: OdinLink<LinkedOdinRecord<ContractProperties>>;
1412
1423
  }
1413
1424
  /**
1414
1425
  * RabbitMQ routing keys for Order events
@@ -600,6 +600,8 @@ var OrderPropertyKeys;
600
600
  OrderPropertyKeys["EarliestDueAt"] = "EarliestDueAt";
601
601
  /** True while the customer has declined the router/mesh dispatch this recontract would otherwise raise. Written by dispatchRouterForSpeedChange on every call — true when a decline is honoured, false otherwise — so reversal is simply calling the endpoint again with no decline flag (ORD-493). */
602
602
  OrderPropertyKeys["RouterUpgradeDeclined"] = "RouterUpgradeDeclined";
603
+ /** The activation date asked for when the order was placed. Written once at checkout and never changed; RequestedActivationDate moves when the date does. */
604
+ OrderPropertyKeys["FirstRequestedActivationDate"] = "FirstRequestedActivationDate";
603
605
  })(OrderPropertyKeys = exports.OrderPropertyKeys || (exports.OrderPropertyKeys = {}));
604
606
  /**
605
607
  * Order entity from OrderModule
@@ -13,6 +13,7 @@
13
13
  import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
14
14
  import { OrderProperties } from './Order';
15
15
  import { ModifyServiceRequestProperties } from './ModifyServiceRequest';
16
+ import { ContractProperties } from './Contract';
16
17
  /**
17
18
  * Available types for Recontract records
18
19
  */
@@ -131,7 +132,9 @@ export declare enum RecontractPropertyKeys {
131
132
  /** Whether the server determined, at this recontract, that the customer could be offered the choice to skip the router/mesh upgrade (no ONT swap, not a mesh quantity increase). Caller-supplied, forwarded verbatim onto the Recontract record — recontracting itself derives no hardware requirement from this (ORD-493). */
132
133
  RouterUpgradeDeclineEligible = "RouterUpgradeDeclineEligible",
133
134
  /** What the customer chose at this recontract, when offered the choice above. Caller-supplied, forwarded verbatim — a permanent snapshot, unlike the live Order.RouterUpgradeDeclined, which an agent can flip back on reversal (ORD-493). */
134
- RouterUpgradeDeclined = "RouterUpgradeDeclined"
135
+ RouterUpgradeDeclined = "RouterUpgradeDeclined",
136
+ /** The contract this recontract started (its -R<n> number). */
137
+ ContractId = "ContractId"
135
138
  }
136
139
  /**
137
140
  * Properties for Recontract records
@@ -261,6 +264,12 @@ export interface RecontractProperties {
261
264
  * @default
262
265
  */
263
266
  RouterUpgradeDeclined: boolean;
267
+ /** The contract this recontract started (its -R<n> number).
268
+ *
269
+ * @type {LOOKUP}
270
+ * @default
271
+ */
272
+ ContractId: string;
264
273
  }
265
274
  /**
266
275
  * Recontract entity from OrderModule
@@ -282,6 +291,8 @@ export declare class Recontract extends OdinRecord<RecontractProperties> {
282
291
  Order: OdinLink<LinkedOdinRecord<OrderProperties>>;
283
292
  /** Linked ModifyServiceRequest records (Recontract__ModifyServiceRequest) */
284
293
  ModifyServiceRequest: OdinLink<LinkedOdinRecord<ModifyServiceRequestProperties>>;
294
+ /** Linked Contract records (Recontract__Contract) */
295
+ Contract: OdinLink<LinkedOdinRecord<ContractProperties>>;
285
296
  }
286
297
  /**
287
298
  * RabbitMQ routing keys for Recontract events
@@ -307,3 +318,7 @@ export declare const ROUTING_KEY_LINK_RECONTRACT_ORDER_DELETED = "OrderModule.Re
307
318
  export declare const ROUTING_KEY_LINK_RECONTRACT_MODIFY_SERVICE_REQUEST_CREATED = "OrderModule.Recontract.ModifyServiceRequest.SubDbRecordAssociationCreated";
308
319
  /** Event: Recontract__ModifyServiceRequest link deleted */
309
320
  export declare const ROUTING_KEY_LINK_RECONTRACT_MODIFY_SERVICE_REQUEST_DELETED = "OrderModule.Recontract.ModifyServiceRequest.SubDbRecordAssociationDeleted";
321
+ /** Event: Recontract__Contract link created */
322
+ export declare const ROUTING_KEY_LINK_RECONTRACT_CONTRACT_CREATED = "OrderModule.Recontract.Contract.SubDbRecordAssociationCreated";
323
+ /** Event: Recontract__Contract link deleted */
324
+ export declare const ROUTING_KEY_LINK_RECONTRACT_CONTRACT_DELETED = "OrderModule.Recontract.Contract.SubDbRecordAssociationDeleted";