@mj-biz-apps/contracts-entities 0.1.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 (46) hide show
  1. package/LICENSE +183 -0
  2. package/dist/ContractEntity.d.ts +181 -0
  3. package/dist/ContractEntity.d.ts.map +1 -0
  4. package/dist/ContractEntity.js +261 -0
  5. package/dist/ContractEntity.js.map +1 -0
  6. package/dist/ContractTemplateEntity.d.ts +50 -0
  7. package/dist/ContractTemplateEntity.d.ts.map +1 -0
  8. package/dist/ContractTemplateEntity.js +85 -0
  9. package/dist/ContractTemplateEntity.js.map +1 -0
  10. package/dist/ContractTemplateModificationEntity.d.ts +46 -0
  11. package/dist/ContractTemplateModificationEntity.d.ts.map +1 -0
  12. package/dist/ContractTemplateModificationEntity.js +72 -0
  13. package/dist/ContractTemplateModificationEntity.js.map +1 -0
  14. package/dist/ContractTemplateProvisionEntity.d.ts +45 -0
  15. package/dist/ContractTemplateProvisionEntity.d.ts.map +1 -0
  16. package/dist/ContractTemplateProvisionEntity.js +73 -0
  17. package/dist/ContractTemplateProvisionEntity.js.map +1 -0
  18. package/dist/ContractTypeEntity.d.ts +55 -0
  19. package/dist/ContractTypeEntity.d.ts.map +1 -0
  20. package/dist/ContractTypeEntity.js +82 -0
  21. package/dist/ContractTypeEntity.js.map +1 -0
  22. package/dist/contract-state.d.ts +49 -0
  23. package/dist/contract-state.d.ts.map +1 -0
  24. package/dist/contract-state.js +48 -0
  25. package/dist/contract-state.js.map +1 -0
  26. package/dist/generated/entity_subclasses.d.ts +1235 -0
  27. package/dist/generated/entity_subclasses.d.ts.map +1 -0
  28. package/dist/generated/entity_subclasses.js +1817 -0
  29. package/dist/generated/entity_subclasses.js.map +1 -0
  30. package/dist/generated/remote_operations.d.ts +1145 -0
  31. package/dist/generated/remote_operations.d.ts.map +1 -0
  32. package/dist/generated/remote_operations.js +426 -0
  33. package/dist/generated/remote_operations.js.map +1 -0
  34. package/dist/index.d.ts +30 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +49 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/required-field-prose.d.ts +48 -0
  39. package/dist/required-field-prose.d.ts.map +1 -0
  40. package/dist/required-field-prose.js +55 -0
  41. package/dist/required-field-prose.js.map +1 -0
  42. package/dist/value-list-validation.d.ts +69 -0
  43. package/dist/value-list-validation.d.ts.map +1 -0
  44. package/dist/value-list-validation.js +88 -0
  45. package/dist/value-list-validation.js.map +1 -0
  46. package/package.json +33 -0
@@ -0,0 +1,1235 @@
1
+ import { BaseEntity, ValidationResult } from "@memberjunction/core";
2
+ import { z } from "zod";
3
+ export declare const loadModule: () => void;
4
+ /**
5
+ * zod schema definition for the entity MJ_BizApps_Contracts: Contract Template Modifications
6
+ */
7
+ export declare const mjBizAppsContractsContractTemplateModificationSchema: z.ZodObject<{
8
+ ID: z.ZodString;
9
+ ContractID: z.ZodString;
10
+ ContractTemplateProvisionID: z.ZodString;
11
+ ModificationText: z.ZodString;
12
+ Notes: z.ZodNullable<z.ZodString>;
13
+ __mj_CreatedAt: z.ZodDate;
14
+ __mj_UpdatedAt: z.ZodDate;
15
+ Contract: z.ZodNullable<z.ZodString>;
16
+ ContractTemplateProvision: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ ID?: string;
19
+ ContractID?: string;
20
+ ContractTemplateProvisionID?: string;
21
+ ModificationText?: string;
22
+ Notes?: string;
23
+ __mj_CreatedAt?: Date;
24
+ __mj_UpdatedAt?: Date;
25
+ Contract?: string;
26
+ ContractTemplateProvision?: string;
27
+ }, {
28
+ ID?: string;
29
+ ContractID?: string;
30
+ ContractTemplateProvisionID?: string;
31
+ ModificationText?: string;
32
+ Notes?: string;
33
+ __mj_CreatedAt?: Date;
34
+ __mj_UpdatedAt?: Date;
35
+ Contract?: string;
36
+ ContractTemplateProvision?: string;
37
+ }>;
38
+ export type mjBizAppsContractsContractTemplateModificationEntityType = z.infer<typeof mjBizAppsContractsContractTemplateModificationSchema>;
39
+ /**
40
+ * zod schema definition for the entity MJ_BizApps_Contracts: Contract Template Provisions
41
+ */
42
+ export declare const mjBizAppsContractsContractTemplateProvisionSchema: z.ZodObject<{
43
+ ID: z.ZodString;
44
+ ContractTemplateID: z.ZodString;
45
+ ProvisionNumber: z.ZodString;
46
+ Title: z.ZodString;
47
+ ProvisionText: z.ZodString;
48
+ Description: z.ZodNullable<z.ZodString>;
49
+ ProvisionSortKey: z.ZodNullable<z.ZodString>;
50
+ __mj_CreatedAt: z.ZodDate;
51
+ __mj_UpdatedAt: z.ZodDate;
52
+ ContractTemplate: z.ZodString;
53
+ }, "strip", z.ZodTypeAny, {
54
+ ID?: string;
55
+ __mj_CreatedAt?: Date;
56
+ __mj_UpdatedAt?: Date;
57
+ ContractTemplateID?: string;
58
+ ProvisionNumber?: string;
59
+ Title?: string;
60
+ ProvisionText?: string;
61
+ Description?: string;
62
+ ProvisionSortKey?: string;
63
+ ContractTemplate?: string;
64
+ }, {
65
+ ID?: string;
66
+ __mj_CreatedAt?: Date;
67
+ __mj_UpdatedAt?: Date;
68
+ ContractTemplateID?: string;
69
+ ProvisionNumber?: string;
70
+ Title?: string;
71
+ ProvisionText?: string;
72
+ Description?: string;
73
+ ProvisionSortKey?: string;
74
+ ContractTemplate?: string;
75
+ }>;
76
+ export type mjBizAppsContractsContractTemplateProvisionEntityType = z.infer<typeof mjBizAppsContractsContractTemplateProvisionSchema>;
77
+ /**
78
+ * zod schema definition for the entity MJ_BizApps_Contracts: Contract Template Types
79
+ */
80
+ export declare const mjBizAppsContractsContractTemplateTypeSchema: z.ZodObject<{
81
+ ID: z.ZodString;
82
+ Name: z.ZodString;
83
+ Description: z.ZodNullable<z.ZodString>;
84
+ Status: z.ZodUnion<[z.ZodLiteral<"Active">, z.ZodLiteral<"Inactive">]>;
85
+ __mj_CreatedAt: z.ZodDate;
86
+ __mj_UpdatedAt: z.ZodDate;
87
+ }, "strip", z.ZodTypeAny, {
88
+ ID?: string;
89
+ __mj_CreatedAt?: Date;
90
+ __mj_UpdatedAt?: Date;
91
+ Description?: string;
92
+ Name?: string;
93
+ Status?: "Active" | "Inactive";
94
+ }, {
95
+ ID?: string;
96
+ __mj_CreatedAt?: Date;
97
+ __mj_UpdatedAt?: Date;
98
+ Description?: string;
99
+ Name?: string;
100
+ Status?: "Active" | "Inactive";
101
+ }>;
102
+ export type mjBizAppsContractsContractTemplateTypeEntityType = z.infer<typeof mjBizAppsContractsContractTemplateTypeSchema>;
103
+ /**
104
+ * zod schema definition for the entity MJ_BizApps_Contracts: Contract Templates
105
+ */
106
+ export declare const mjBizAppsContractsContractTemplateSchema: z.ZodObject<{
107
+ ID: z.ZodString;
108
+ Name: z.ZodString;
109
+ ContractTemplateTypeID: z.ZodString;
110
+ VersionLabel: z.ZodNullable<z.ZodString>;
111
+ IntroducedDate: z.ZodNullable<z.ZodDate>;
112
+ SourceURL: z.ZodNullable<z.ZodString>;
113
+ Description: z.ZodNullable<z.ZodString>;
114
+ Status: z.ZodUnion<[z.ZodLiteral<"Draft">, z.ZodLiteral<"Published">]>;
115
+ __mj_CreatedAt: z.ZodDate;
116
+ __mj_UpdatedAt: z.ZodDate;
117
+ ContractTemplateType: z.ZodString;
118
+ IsUsable: z.ZodNullable<z.ZodBoolean>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ ID?: string;
121
+ __mj_CreatedAt?: Date;
122
+ __mj_UpdatedAt?: Date;
123
+ Description?: string;
124
+ Name?: string;
125
+ Status?: "Draft" | "Published";
126
+ ContractTemplateTypeID?: string;
127
+ VersionLabel?: string;
128
+ IntroducedDate?: Date;
129
+ SourceURL?: string;
130
+ ContractTemplateType?: string;
131
+ IsUsable?: boolean;
132
+ }, {
133
+ ID?: string;
134
+ __mj_CreatedAt?: Date;
135
+ __mj_UpdatedAt?: Date;
136
+ Description?: string;
137
+ Name?: string;
138
+ Status?: "Draft" | "Published";
139
+ ContractTemplateTypeID?: string;
140
+ VersionLabel?: string;
141
+ IntroducedDate?: Date;
142
+ SourceURL?: string;
143
+ ContractTemplateType?: string;
144
+ IsUsable?: boolean;
145
+ }>;
146
+ export type mjBizAppsContractsContractTemplateEntityType = z.infer<typeof mjBizAppsContractsContractTemplateSchema>;
147
+ /**
148
+ * zod schema definition for the entity MJ_BizApps_Contracts: Contract Types
149
+ */
150
+ export declare const mjBizAppsContractsContractTypeSchema: z.ZodObject<{
151
+ ID: z.ZodString;
152
+ Name: z.ZodString;
153
+ Description: z.ZodNullable<z.ZodString>;
154
+ RequiresExecutedDocument: z.ZodBoolean;
155
+ Status: z.ZodUnion<[z.ZodLiteral<"Active">, z.ZodLiteral<"Inactive">]>;
156
+ MustBeRoot: z.ZodBoolean;
157
+ MustBeChild: z.ZodBoolean;
158
+ TemplateRequired: z.ZodBoolean;
159
+ __mj_CreatedAt: z.ZodDate;
160
+ __mj_UpdatedAt: z.ZodDate;
161
+ }, "strip", z.ZodTypeAny, {
162
+ ID?: string;
163
+ __mj_CreatedAt?: Date;
164
+ __mj_UpdatedAt?: Date;
165
+ Description?: string;
166
+ Name?: string;
167
+ Status?: "Active" | "Inactive";
168
+ RequiresExecutedDocument?: boolean;
169
+ MustBeRoot?: boolean;
170
+ MustBeChild?: boolean;
171
+ TemplateRequired?: boolean;
172
+ }, {
173
+ ID?: string;
174
+ __mj_CreatedAt?: Date;
175
+ __mj_UpdatedAt?: Date;
176
+ Description?: string;
177
+ Name?: string;
178
+ Status?: "Active" | "Inactive";
179
+ RequiresExecutedDocument?: boolean;
180
+ MustBeRoot?: boolean;
181
+ MustBeChild?: boolean;
182
+ TemplateRequired?: boolean;
183
+ }>;
184
+ export type mjBizAppsContractsContractTypeEntityType = z.infer<typeof mjBizAppsContractsContractTypeSchema>;
185
+ /**
186
+ * zod schema definition for the entity MJ_BizApps_Contracts: Contracts
187
+ */
188
+ export declare const mjBizAppsContractsContractSchema: z.ZodObject<{
189
+ ID: z.ZodString;
190
+ ContractNumber: z.ZodNullable<z.ZodString>;
191
+ ContractTypeID: z.ZodString;
192
+ CompanyID: z.ZodString;
193
+ CustomerOrganizationID: z.ZodString;
194
+ PrimaryContactPersonID: z.ZodNullable<z.ZodString>;
195
+ ContractTemplateID: z.ZodNullable<z.ZodString>;
196
+ CreatingEntityID: z.ZodNullable<z.ZodString>;
197
+ CreatingRecordID: z.ZodNullable<z.ZodString>;
198
+ ParentContractID: z.ZodNullable<z.ZodString>;
199
+ SupersededByContractID: z.ZodNullable<z.ZodString>;
200
+ SigningProviderURL: z.ZodNullable<z.ZodString>;
201
+ EffectiveDate: z.ZodNullable<z.ZodDate>;
202
+ ExecutedDate: z.ZodNullable<z.ZodDate>;
203
+ EndDate: z.ZodNullable<z.ZodDate>;
204
+ TerminatedDate: z.ZodNullable<z.ZodDate>;
205
+ AutoRenew: z.ZodBoolean;
206
+ RenewalNoticeDays: z.ZodNullable<z.ZodNumber>;
207
+ CancellationWindowDays: z.ZodNullable<z.ZodNumber>;
208
+ AnnualIncreasePercent: z.ZodNullable<z.ZodNumber>;
209
+ HasModifications: z.ZodBoolean;
210
+ Description: z.ZodNullable<z.ZodString>;
211
+ Notes: z.ZodNullable<z.ZodString>;
212
+ __mj_CreatedAt: z.ZodDate;
213
+ __mj_UpdatedAt: z.ZodDate;
214
+ ContractType: z.ZodString;
215
+ Company: z.ZodString;
216
+ CustomerOrganization: z.ZodString;
217
+ PrimaryContactPerson: z.ZodNullable<z.ZodString>;
218
+ ContractTemplate: z.ZodNullable<z.ZodString>;
219
+ CreatingEntity: z.ZodNullable<z.ZodString>;
220
+ ParentContract: z.ZodNullable<z.ZodString>;
221
+ SupersededByContract: z.ZodNullable<z.ZodString>;
222
+ State: z.ZodString;
223
+ IsAwaitingDocument: z.ZodNullable<z.ZodBoolean>;
224
+ DaysToEnd: z.ZodNullable<z.ZodNumber>;
225
+ RenewalNoticeDeadline: z.ZodNullable<z.ZodDate>;
226
+ IsInCancellationWindow: z.ZodNullable<z.ZodBoolean>;
227
+ }, "strip", z.ZodTypeAny, {
228
+ ID?: string;
229
+ Notes?: string;
230
+ __mj_CreatedAt?: Date;
231
+ __mj_UpdatedAt?: Date;
232
+ ContractTemplateID?: string;
233
+ Description?: string;
234
+ ContractTemplate?: string;
235
+ ContractNumber?: string;
236
+ ContractTypeID?: string;
237
+ CompanyID?: string;
238
+ CustomerOrganizationID?: string;
239
+ PrimaryContactPersonID?: string;
240
+ CreatingEntityID?: string;
241
+ CreatingRecordID?: string;
242
+ ParentContractID?: string;
243
+ SupersededByContractID?: string;
244
+ SigningProviderURL?: string;
245
+ EffectiveDate?: Date;
246
+ ExecutedDate?: Date;
247
+ EndDate?: Date;
248
+ TerminatedDate?: Date;
249
+ AutoRenew?: boolean;
250
+ RenewalNoticeDays?: number;
251
+ CancellationWindowDays?: number;
252
+ AnnualIncreasePercent?: number;
253
+ HasModifications?: boolean;
254
+ ContractType?: string;
255
+ Company?: string;
256
+ CustomerOrganization?: string;
257
+ PrimaryContactPerson?: string;
258
+ CreatingEntity?: string;
259
+ ParentContract?: string;
260
+ SupersededByContract?: string;
261
+ State?: string;
262
+ IsAwaitingDocument?: boolean;
263
+ DaysToEnd?: number;
264
+ RenewalNoticeDeadline?: Date;
265
+ IsInCancellationWindow?: boolean;
266
+ }, {
267
+ ID?: string;
268
+ Notes?: string;
269
+ __mj_CreatedAt?: Date;
270
+ __mj_UpdatedAt?: Date;
271
+ ContractTemplateID?: string;
272
+ Description?: string;
273
+ ContractTemplate?: string;
274
+ ContractNumber?: string;
275
+ ContractTypeID?: string;
276
+ CompanyID?: string;
277
+ CustomerOrganizationID?: string;
278
+ PrimaryContactPersonID?: string;
279
+ CreatingEntityID?: string;
280
+ CreatingRecordID?: string;
281
+ ParentContractID?: string;
282
+ SupersededByContractID?: string;
283
+ SigningProviderURL?: string;
284
+ EffectiveDate?: Date;
285
+ ExecutedDate?: Date;
286
+ EndDate?: Date;
287
+ TerminatedDate?: Date;
288
+ AutoRenew?: boolean;
289
+ RenewalNoticeDays?: number;
290
+ CancellationWindowDays?: number;
291
+ AnnualIncreasePercent?: number;
292
+ HasModifications?: boolean;
293
+ ContractType?: string;
294
+ Company?: string;
295
+ CustomerOrganization?: string;
296
+ PrimaryContactPerson?: string;
297
+ CreatingEntity?: string;
298
+ ParentContract?: string;
299
+ SupersededByContract?: string;
300
+ State?: string;
301
+ IsAwaitingDocument?: boolean;
302
+ DaysToEnd?: number;
303
+ RenewalNoticeDeadline?: Date;
304
+ IsInCancellationWindow?: boolean;
305
+ }>;
306
+ export type mjBizAppsContractsContractEntityType = z.infer<typeof mjBizAppsContractsContractSchema>;
307
+ /**
308
+ * MJ_BizApps_Contracts: Contract Template Modifications - strongly typed entity sub-class
309
+ * * Schema: __mj_BizAppsContracts
310
+ * * Base Table: ContractTemplateModification
311
+ * * Base View: vwContractTemplateModifications
312
+ * * @description What THIS contract changed about the standard agreement. Deliberately lean: it names a provision and carries what the contract says instead. Carries no ContractTemplateID — the provision belongs to exactly one template in every future, so the template derives through the provision, and a stored copy of a derivation can only agree or lie.
313
+ * * Primary Key: ID
314
+ * @extends {BaseEntity}
315
+ * @class
316
+ * @public
317
+ */
318
+ export declare class mjBizAppsContractsContractTemplateModificationEntity extends BaseEntity<mjBizAppsContractsContractTemplateModificationEntityType> {
319
+ /**
320
+ * Loads the MJ_BizApps_Contracts: Contract Template Modifications record from the database
321
+ * @param ID: string - primary key value to load the MJ_BizApps_Contracts: Contract Template Modifications record.
322
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
323
+ * @returns {Promise<boolean>} - true if successful, false otherwise
324
+ * @public
325
+ * @async
326
+ * @memberof mjBizAppsContractsContractTemplateModificationEntity
327
+ * @method
328
+ * @override
329
+ */
330
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
331
+ /**
332
+ * Validate() method override for MJ_BizApps_Contracts: Contract Template Modifications entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
333
+ * * ModificationText: The modification text must contain actual text and cannot be empty or consist only of spaces.
334
+ * @public
335
+ * @method
336
+ * @override
337
+ */
338
+ Validate(): ValidationResult;
339
+ /**
340
+ * The modification text must contain actual text and cannot be empty or consist only of spaces.
341
+ * @param result - the ValidationResult object to add any errors or warnings to
342
+ * @public
343
+ * @method
344
+ */
345
+ ValidateModificationTextNotEmpty(result: ValidationResult): void;
346
+ /**
347
+ * * Field Name: ID
348
+ * * Display Name: ID
349
+ * * SQL Data Type: uniqueidentifier
350
+ * * Default Value: newsequentialid()
351
+ */
352
+ get ID(): string;
353
+ set ID(value: string);
354
+ /**
355
+ * * Field Name: ContractID
356
+ * * Display Name: Contract
357
+ * * SQL Data Type: uniqueidentifier
358
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contracts (vwContracts.ID)
359
+ */
360
+ get ContractID(): string;
361
+ set ContractID(value: string);
362
+ /**
363
+ * * Field Name: ContractTemplateProvisionID
364
+ * * Display Name: Contract Template Provision
365
+ * * SQL Data Type: uniqueidentifier
366
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contract Template Provisions (vwContractTemplateProvisions.ID)
367
+ * * Description: The provision being modified — the structured identifier, and the only one. A server rule enforces what this replaces: the provision must belong to a template this contract incorporates.
368
+ */
369
+ get ContractTemplateProvisionID(): string;
370
+ set ContractTemplateProvisionID(value: string);
371
+ /**
372
+ * * Field Name: ModificationText
373
+ * * Display Name: Modification Text
374
+ * * SQL Data Type: nvarchar(MAX)
375
+ * * Description: What this contract says INSTEAD of the standard clause. Read as a pair with ContractTemplateProvision.ProvisionText.
376
+ */
377
+ get ModificationText(): string;
378
+ set ModificationText(value: string);
379
+ /**
380
+ * * Field Name: Notes
381
+ * * Display Name: Notes
382
+ * * SQL Data Type: nvarchar(MAX)
383
+ * * Description: Optional working note, e.g. who negotiated it.
384
+ */
385
+ get Notes(): string | null;
386
+ set Notes(value: string | null);
387
+ /**
388
+ * * Field Name: __mj_CreatedAt
389
+ * * Display Name: Created At
390
+ * * SQL Data Type: datetimeoffset
391
+ * * Default Value: getutcdate()
392
+ */
393
+ get __mj_CreatedAt(): Date;
394
+ /**
395
+ * * Field Name: __mj_UpdatedAt
396
+ * * Display Name: Updated At
397
+ * * SQL Data Type: datetimeoffset
398
+ * * Default Value: getutcdate()
399
+ */
400
+ get __mj_UpdatedAt(): Date;
401
+ /**
402
+ * * Field Name: Contract
403
+ * * Display Name: Contract
404
+ * * SQL Data Type: nvarchar(50)
405
+ */
406
+ get Contract(): string | null;
407
+ /**
408
+ * * Field Name: ContractTemplateProvision
409
+ * * Display Name: Contract Template Provision
410
+ * * SQL Data Type: nvarchar(20)
411
+ */
412
+ get ContractTemplateProvision(): string;
413
+ }
414
+ /**
415
+ * MJ_BizApps_Contracts: Contract Template Provisions - strongly typed entity sub-class
416
+ * * Schema: __mj_BizAppsContracts
417
+ * * Base Table: ContractTemplateProvision
418
+ * * Base View: vwContractTemplateProvisions
419
+ * * @description The numbered clause list of a template version, and the home of all standard contract text. Hangs off ContractTemplate rather than standing alone because provision numbering belongs to a VERSION — the moment a new version renumbers, a single global list is wrong.
420
+ * * Primary Key: ID
421
+ * @extends {BaseEntity}
422
+ * @class
423
+ * @public
424
+ */
425
+ export declare class mjBizAppsContractsContractTemplateProvisionEntity extends BaseEntity<mjBizAppsContractsContractTemplateProvisionEntityType> {
426
+ /**
427
+ * Loads the MJ_BizApps_Contracts: Contract Template Provisions record from the database
428
+ * @param ID: string - primary key value to load the MJ_BizApps_Contracts: Contract Template Provisions record.
429
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
430
+ * @returns {Promise<boolean>} - true if successful, false otherwise
431
+ * @public
432
+ * @async
433
+ * @memberof mjBizAppsContractsContractTemplateProvisionEntity
434
+ * @method
435
+ * @override
436
+ */
437
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
438
+ /**
439
+ * Validate() method override for MJ_BizApps_Contracts: Contract Template Provisions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
440
+ * * ProvisionText: The provision text cannot be empty or consist only of spaces. It must contain actual text content.
441
+ * @public
442
+ * @method
443
+ * @override
444
+ */
445
+ Validate(): ValidationResult;
446
+ /**
447
+ * The provision text cannot be empty or consist only of spaces. It must contain actual text content.
448
+ * @param result - the ValidationResult object to add any errors or warnings to
449
+ * @public
450
+ * @method
451
+ */
452
+ ValidateProvisionTextNotEmpty(result: ValidationResult): void;
453
+ /**
454
+ * * Field Name: ID
455
+ * * Display Name: ID
456
+ * * SQL Data Type: uniqueidentifier
457
+ * * Default Value: newsequentialid()
458
+ */
459
+ get ID(): string;
460
+ set ID(value: string);
461
+ /**
462
+ * * Field Name: ContractTemplateID
463
+ * * Display Name: Contract Template
464
+ * * SQL Data Type: uniqueidentifier
465
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contract Templates (vwContractTemplates.ID)
466
+ */
467
+ get ContractTemplateID(): string;
468
+ set ContractTemplateID(value: string);
469
+ /**
470
+ * * Field Name: ProvisionNumber
471
+ * * Display Name: Provision Number
472
+ * * SQL Data Type: nvarchar(20)
473
+ * * Description: The clause number as the document writes it, e.g. "3.5(b)". Unique within its template.
474
+ */
475
+ get ProvisionNumber(): string;
476
+ set ProvisionNumber(value: string);
477
+ /**
478
+ * * Field Name: Title
479
+ * * Display Name: Title
480
+ * * SQL Data Type: nvarchar(200)
481
+ * * Description: The clause heading, e.g. "Limitation of Liability". This plus the number is what a person picks from.
482
+ */
483
+ get Title(): string;
484
+ set Title(value: string);
485
+ /**
486
+ * * Field Name: ProvisionText
487
+ * * Display Name: Provision Text
488
+ * * SQL Data Type: nvarchar(MAX)
489
+ * * Description: The STANDARD wording of this clause. Read as a pair with ContractTemplateModification.ModificationText, which holds what a given contract says instead — a dispute needs the comparison, not either half.
490
+ */
491
+ get ProvisionText(): string;
492
+ set ProvisionText(value: string);
493
+ /**
494
+ * * Field Name: Description
495
+ * * Display Name: Description
496
+ * * SQL Data Type: nvarchar(MAX)
497
+ */
498
+ get Description(): string | null;
499
+ set Description(value: string | null);
500
+ /**
501
+ * * Field Name: ProvisionSortKey
502
+ * * Display Name: Sort Key
503
+ * * SQL Data Type: nvarchar(200)
504
+ * * Description: Collation key derived from ProvisionNumber: every run of digits zero-padded to six places, everything else upper-cased. Makes a plain SQL ORDER BY produce natural order ('1.9' before '1.10'), which ordering by ProvisionNumber cannot. READ-ONLY -- a persisted computed column; nobody should be able to set a sort key. Replaced the hand-maintained Sequence column, which had already collided in the seeded data.
505
+ */
506
+ get ProvisionSortKey(): string | null;
507
+ /**
508
+ * * Field Name: __mj_CreatedAt
509
+ * * Display Name: Created At
510
+ * * SQL Data Type: datetimeoffset
511
+ * * Default Value: getutcdate()
512
+ */
513
+ get __mj_CreatedAt(): Date;
514
+ /**
515
+ * * Field Name: __mj_UpdatedAt
516
+ * * Display Name: Updated At
517
+ * * SQL Data Type: datetimeoffset
518
+ * * Default Value: getutcdate()
519
+ */
520
+ get __mj_UpdatedAt(): Date;
521
+ /**
522
+ * * Field Name: ContractTemplate
523
+ * * Display Name: Contract Template Name
524
+ * * SQL Data Type: nvarchar(200)
525
+ */
526
+ get ContractTemplate(): string;
527
+ }
528
+ /**
529
+ * MJ_BizApps_Contracts: Contract Template Types - strongly typed entity sub-class
530
+ * * Schema: __mj_BizAppsContracts
531
+ * * Base Table: ContractTemplateType
532
+ * * Base View: vwContractTemplateTypes
533
+ * * @description The kind of standard agreement (Master Agreement, Statement of Work). A lookup TABLE rather than a CHECK because the list is additive at runtime and a business user should be able to add one without a migration. Carries no behaviour.
534
+ * * Primary Key: ID
535
+ * @extends {BaseEntity}
536
+ * @class
537
+ * @public
538
+ */
539
+ export declare class mjBizAppsContractsContractTemplateTypeEntity extends BaseEntity<mjBizAppsContractsContractTemplateTypeEntityType> {
540
+ /**
541
+ * Loads the MJ_BizApps_Contracts: Contract Template Types record from the database
542
+ * @param ID: string - primary key value to load the MJ_BizApps_Contracts: Contract Template Types record.
543
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
544
+ * @returns {Promise<boolean>} - true if successful, false otherwise
545
+ * @public
546
+ * @async
547
+ * @memberof mjBizAppsContractsContractTemplateTypeEntity
548
+ * @method
549
+ * @override
550
+ */
551
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
552
+ /**
553
+ * * Field Name: ID
554
+ * * Display Name: ID
555
+ * * SQL Data Type: uniqueidentifier
556
+ * * Default Value: newsequentialid()
557
+ */
558
+ get ID(): string;
559
+ set ID(value: string);
560
+ /**
561
+ * * Field Name: Name
562
+ * * Display Name: Name
563
+ * * SQL Data Type: nvarchar(100)
564
+ */
565
+ get Name(): string;
566
+ set Name(value: string);
567
+ /**
568
+ * * Field Name: Description
569
+ * * Display Name: Description
570
+ * * SQL Data Type: nvarchar(MAX)
571
+ */
572
+ get Description(): string | null;
573
+ set Description(value: string | null);
574
+ /**
575
+ * * Field Name: Status
576
+ * * Display Name: Status
577
+ * * SQL Data Type: nvarchar(10)
578
+ * * Default Value: Active
579
+ * * Value List Type: List
580
+ * * Possible Values
581
+ * * Active
582
+ * * Inactive
583
+ * * Description: Active | Inactive. Retiring a type hides it from pickers without touching the templates that used it.
584
+ */
585
+ get Status(): 'Active' | 'Inactive';
586
+ set Status(value: 'Active' | 'Inactive');
587
+ /**
588
+ * * Field Name: __mj_CreatedAt
589
+ * * Display Name: Created At
590
+ * * SQL Data Type: datetimeoffset
591
+ * * Default Value: getutcdate()
592
+ */
593
+ get __mj_CreatedAt(): Date;
594
+ /**
595
+ * * Field Name: __mj_UpdatedAt
596
+ * * Display Name: Updated At
597
+ * * SQL Data Type: datetimeoffset
598
+ * * Default Value: getutcdate()
599
+ */
600
+ get __mj_UpdatedAt(): Date;
601
+ }
602
+ /**
603
+ * MJ_BizApps_Contracts: Contract Templates - strongly typed entity sub-class
604
+ * * Schema: __mj_BizAppsContracts
605
+ * * Base Table: ContractTemplate
606
+ * * Base View: vwContractTemplates
607
+ * * @description One VERSION of a standard agreement — in practice the Master Agreement. Versions matter because each is published at its own dated URL that never goes away, so a customer stays bound to the text they signed. Carries no prose of its own: every clauses standard wording lives on its ContractTemplateProvision row.
608
+ * * Primary Key: ID
609
+ * @extends {BaseEntity}
610
+ * @class
611
+ * @public
612
+ */
613
+ export declare class mjBizAppsContractsContractTemplateEntity extends BaseEntity<mjBizAppsContractsContractTemplateEntityType> {
614
+ /**
615
+ * Related records: MJ_BizApps_Contracts: Contract Template Provisions
616
+ *
617
+ * Loads, validates and persists as one unit with this MJ_BizApps_Contracts: Contract Templates record — see
618
+ * guides/TRANSACTIONS_AND_BATCHING_GUIDE.md. Declared by the RelatedRecordCollection metadata on
619
+ * the 'MJ_BizApps_Contracts: Contract Templates → MJ_BizApps_Contracts: Contract Template Provisions' relationship; edit that row, not this file.
620
+ *
621
+ */
622
+ readonly Provisions: import("@memberjunction/core").RelatedRecordCollection<mjBizAppsContractsContractTemplateProvisionEntity>;
623
+ /**
624
+ * Loads the MJ_BizApps_Contracts: Contract Templates record from the database
625
+ * @param ID: string - primary key value to load the MJ_BizApps_Contracts: Contract Templates record.
626
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
627
+ * @returns {Promise<boolean>} - true if successful, false otherwise
628
+ * @public
629
+ * @async
630
+ * @memberof mjBizAppsContractsContractTemplateEntity
631
+ * @method
632
+ * @override
633
+ */
634
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
635
+ /**
636
+ * * Field Name: ID
637
+ * * Display Name: ID
638
+ * * SQL Data Type: uniqueidentifier
639
+ * * Default Value: newsequentialid()
640
+ */
641
+ get ID(): string;
642
+ set ID(value: string);
643
+ /**
644
+ * * Field Name: Name
645
+ * * Display Name: Name
646
+ * * SQL Data Type: nvarchar(200)
647
+ */
648
+ get Name(): string;
649
+ set Name(value: string);
650
+ /**
651
+ * * Field Name: ContractTemplateTypeID
652
+ * * Display Name: Contract Template Type ID
653
+ * * SQL Data Type: uniqueidentifier
654
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contract Template Types (vwContractTemplateTypes.ID)
655
+ */
656
+ get ContractTemplateTypeID(): string;
657
+ set ContractTemplateTypeID(value: string);
658
+ /**
659
+ * * Field Name: VersionLabel
660
+ * * Display Name: Version Label
661
+ * * SQL Data Type: nvarchar(50)
662
+ * * Description: The version the document names itself, e.g. "v6". Free text, because it is the documents own label rather than something we derive.
663
+ */
664
+ get VersionLabel(): string | null;
665
+ set VersionLabel(value: string | null);
666
+ /**
667
+ * * Field Name: IntroducedDate
668
+ * * Display Name: Introduced Date
669
+ * * SQL Data Type: date
670
+ * * Description: When this version started being offered. NOT an effective date: a template becomes effective for a customer when THAT customer signs it, never on a calendar date. Naming it EffectiveDate would invite exactly the wrong query.
671
+ */
672
+ get IntroducedDate(): Date | null;
673
+ set IntroducedDate(value: Date | null);
674
+ /**
675
+ * * Field Name: SourceURL
676
+ * * Display Name: Source URL
677
+ * * SQL Data Type: nvarchar(1000)
678
+ * * Description: The dated public URL a customer can open to read the standard terms. NULLABLE: reachability is enforceable by nothing (a well-formed dead link passes any format check), and the real rule is "a URL OR an attached file" — the file half attaching through __mj.FileEntityRecordLink, which cannot reference a record that does not exist yet, so on CREATE it is unsatisfiable in principle. A template with neither is INCOMPLETE rather than invalid; the derived IsUsable column on vwContractTemplates is what says so.
679
+ */
680
+ get SourceURL(): string | null;
681
+ set SourceURL(value: string | null);
682
+ /**
683
+ * * Field Name: Description
684
+ * * Display Name: Description
685
+ * * SQL Data Type: nvarchar(MAX)
686
+ */
687
+ get Description(): string | null;
688
+ set Description(value: string | null);
689
+ /**
690
+ * * Field Name: Status
691
+ * * Display Name: Status
692
+ * * SQL Data Type: nvarchar(20)
693
+ * * Default Value: Draft
694
+ * * Value List Type: List
695
+ * * Possible Values
696
+ * * Draft
697
+ * * Published
698
+ * * Description: Publication lifecycle. 'Draft' -- freely editable, provisions may be added, changed and removed, and a contract may not NEWLY reference it. 'Published' -- the provisions are frozen against INSERT, UPDATE and DELETE by trg_ContractTemplateProvision_Immutability, and contracts may reference it. Publishing is ONE-WAY (enforced in ContractTemplateEntity): to change published terms, publish a new version -- that is what VersionLabel exists for. Existing references are never invalidated by this column; only new ones are policed, the same way ContractType.Status works.
699
+ */
700
+ get Status(): 'Draft' | 'Published';
701
+ set Status(value: 'Draft' | 'Published');
702
+ /**
703
+ * * Field Name: __mj_CreatedAt
704
+ * * Display Name: Created At
705
+ * * SQL Data Type: datetimeoffset
706
+ * * Default Value: getutcdate()
707
+ */
708
+ get __mj_CreatedAt(): Date;
709
+ /**
710
+ * * Field Name: __mj_UpdatedAt
711
+ * * Display Name: Updated At
712
+ * * SQL Data Type: datetimeoffset
713
+ * * Default Value: getutcdate()
714
+ */
715
+ get __mj_UpdatedAt(): Date;
716
+ /**
717
+ * * Field Name: ContractTemplateType
718
+ * * Display Name: Contract Template Type
719
+ * * SQL Data Type: nvarchar(100)
720
+ */
721
+ get ContractTemplateType(): string;
722
+ /**
723
+ * * Field Name: IsUsable
724
+ * * Display Name: Is Usable
725
+ * * SQL Data Type: bit
726
+ */
727
+ get IsUsable(): boolean | null;
728
+ }
729
+ /**
730
+ * MJ_BizApps_Contracts: Contract Types - strongly typed entity sub-class
731
+ * * Schema: __mj_BizAppsContracts
732
+ * * Base Table: ContractType
733
+ * * Base View: vwContractTypes
734
+ * * @description The kind of paper: Order Form, Statement of Work, Payment Link, Change Order. A lookup TABLE for the same reason as ContractTemplateType.
735
+ * * Primary Key: ID
736
+ * @extends {BaseEntity}
737
+ * @class
738
+ * @public
739
+ */
740
+ export declare class mjBizAppsContractsContractTypeEntity extends BaseEntity<mjBizAppsContractsContractTypeEntityType> {
741
+ /**
742
+ * Loads the MJ_BizApps_Contracts: Contract Types record from the database
743
+ * @param ID: string - primary key value to load the MJ_BizApps_Contracts: Contract Types record.
744
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
745
+ * @returns {Promise<boolean>} - true if successful, false otherwise
746
+ * @public
747
+ * @async
748
+ * @memberof mjBizAppsContractsContractTypeEntity
749
+ * @method
750
+ * @override
751
+ */
752
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
753
+ /**
754
+ * Validate() method override for MJ_BizApps_Contracts: Contract Types entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
755
+ * * Table-Level: An entity cannot be designated as both a root and a child at the same time.
756
+ * @public
757
+ * @method
758
+ * @override
759
+ */
760
+ Validate(): ValidationResult;
761
+ /**
762
+ * An entity cannot be designated as both a root and a child at the same time.
763
+ * @param result - the ValidationResult object to add any errors or warnings to
764
+ * @public
765
+ * @method
766
+ */
767
+ ValidateRootAndChildExclusivity(result: ValidationResult): void;
768
+ /**
769
+ * * Field Name: ID
770
+ * * Display Name: ID
771
+ * * SQL Data Type: uniqueidentifier
772
+ * * Default Value: newsequentialid()
773
+ */
774
+ get ID(): string;
775
+ set ID(value: string);
776
+ /**
777
+ * * Field Name: Name
778
+ * * Display Name: Name
779
+ * * SQL Data Type: nvarchar(100)
780
+ */
781
+ get Name(): string;
782
+ set Name(value: string);
783
+ /**
784
+ * * Field Name: Description
785
+ * * Display Name: Description
786
+ * * SQL Data Type: nvarchar(MAX)
787
+ */
788
+ get Description(): string | null;
789
+ set Description(value: string | null);
790
+ /**
791
+ * * Field Name: RequiresExecutedDocument
792
+ * * Display Name: Requires Executed Document
793
+ * * SQL Data Type: bit
794
+ * * Default Value: 1
795
+ * * Description: Whether paper is ever expected for this kind of contract. No for a Payment Link, which has an implied agreement and no signature. This is what stops such a contract asking forever for a document that will never arrive: "awaiting the document" is DERIVED as requires-it AND no-linked-file, never stored and never a status value.
796
+ */
797
+ get RequiresExecutedDocument(): boolean;
798
+ set RequiresExecutedDocument(value: boolean);
799
+ /**
800
+ * * Field Name: Status
801
+ * * Display Name: Status
802
+ * * SQL Data Type: nvarchar(10)
803
+ * * Default Value: Active
804
+ * * Value List Type: List
805
+ * * Possible Values
806
+ * * Active
807
+ * * Inactive
808
+ * * Description: Active | Inactive.
809
+ */
810
+ get Status(): 'Active' | 'Inactive';
811
+ set Status(value: 'Active' | 'Inactive');
812
+ /**
813
+ * * Field Name: MustBeRoot
814
+ * * Display Name: Must Be Root
815
+ * * SQL Data Type: bit
816
+ * * Default Value: 0
817
+ * * Description: This type of contract may NOT name a ParentContractID -- it is a root agreement. Enforced in ContractEntityServer.ValidateAsync. Mutually exclusive with MustBeChild (CK_ContractType_RootOrChild); both false means no restriction on where in the tree this type may sit, which is the honest default.
818
+ */
819
+ get MustBeRoot(): boolean;
820
+ set MustBeRoot(value: boolean);
821
+ /**
822
+ * * Field Name: MustBeChild
823
+ * * Display Name: Must Be Child
824
+ * * SQL Data Type: bit
825
+ * * Default Value: 0
826
+ * * Description: This type of contract MUST name a ParentContractID -- a Change Order that amends nothing is not a change order, and would never appear in the original agreement's lineage. Enforced in ContractEntityServer.ValidateAsync. Mutually exclusive with MustBeRoot.
827
+ */
828
+ get MustBeChild(): boolean;
829
+ set MustBeChild(value: boolean);
830
+ /**
831
+ * * Field Name: TemplateRequired
832
+ * * Display Name: Template Required
833
+ * * SQL Data Type: bit
834
+ * * Default Value: 0
835
+ * * Description: This type of contract must carry its own ContractTemplateID -- the standard terms it incorporates. On the TYPE rather than inferred from the placement flags, because 'where in the tree' and 'does it need its own paper' are different questions and a future type could want any combination.
836
+ */
837
+ get TemplateRequired(): boolean;
838
+ set TemplateRequired(value: boolean);
839
+ /**
840
+ * * Field Name: __mj_CreatedAt
841
+ * * Display Name: Created At
842
+ * * SQL Data Type: datetimeoffset
843
+ * * Default Value: getutcdate()
844
+ */
845
+ get __mj_CreatedAt(): Date;
846
+ /**
847
+ * * Field Name: __mj_UpdatedAt
848
+ * * Display Name: Updated At
849
+ * * SQL Data Type: datetimeoffset
850
+ * * Default Value: getutcdate()
851
+ */
852
+ get __mj_UpdatedAt(): Date;
853
+ }
854
+ /**
855
+ * MJ_BizApps_Contracts: Contracts - strongly typed entity sub-class
856
+ * * Schema: __mj_BizAppsContracts
857
+ * * Base Table: Contract
858
+ * * Base View: vwContracts
859
+ * * @description The signed agreement — one row per piece of signed (or implied) paper, and the centre of the app. Carries NO hard reference to a Deal: sales creates contracts, so sales depends on this app and a reference upward would invert the dependency graph. The link is the typed polymorphic pair CreatingEntityID + CreatingRecordID.
860
+ * * Primary Key: ID
861
+ * @extends {BaseEntity}
862
+ * @class
863
+ * @public
864
+ */
865
+ export declare class mjBizAppsContractsContractEntity extends BaseEntity<mjBizAppsContractsContractEntityType> {
866
+ /**
867
+ * Related records: MJ_BizApps_Contracts: Contract Template Modifications
868
+ *
869
+ * Loads, validates and persists as one unit with this MJ_BizApps_Contracts: Contracts record — see
870
+ * guides/TRANSACTIONS_AND_BATCHING_GUIDE.md. Declared by the RelatedRecordCollection metadata on
871
+ * the 'MJ_BizApps_Contracts: Contracts → MJ_BizApps_Contracts: Contract Template Modifications' relationship; edit that row, not this file.
872
+ *
873
+ */
874
+ readonly Modifications: import("@memberjunction/core").RelatedRecordCollection<mjBizAppsContractsContractTemplateModificationEntity>;
875
+ /**
876
+ * Loads the MJ_BizApps_Contracts: Contracts record from the database
877
+ * @param ID: string - primary key value to load the MJ_BizApps_Contracts: Contracts record.
878
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
879
+ * @returns {Promise<boolean>} - true if successful, false otherwise
880
+ * @public
881
+ * @async
882
+ * @memberof mjBizAppsContractsContractEntity
883
+ * @method
884
+ * @override
885
+ */
886
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
887
+ /**
888
+ * Validate() method override for MJ_BizApps_Contracts: Contracts entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
889
+ * * AnnualIncreasePercent: The annual increase percentage must be greater than or equal to zero, ensuring that contract rates do not decrease automatically.
890
+ * * CancellationWindowDays: The cancellation window days must be zero or a positive number, ensuring that we do not record a negative number of days for the contract cancellation period.
891
+ * * RenewalNoticeDays: Renewal notice days must be 0 or greater, if specified.
892
+ * * Table-Level: Both Creating Entity ID and Creating Record ID must be provided together, or both must be left empty, to ensure consistent tracking of the source entity and record.
893
+ * * Table-Level: The contract end date must be on or after the effective date to ensure logical date ordering.
894
+ * * Table-Level: A contract cannot be its own parent contract to prevent circular references in the contract hierarchy.
895
+ * * Table-Level: A contract cannot be superseded by itself. The superseding contract must be a different contract record.
896
+ * @public
897
+ * @method
898
+ * @override
899
+ */
900
+ Validate(): ValidationResult;
901
+ /**
902
+ * The annual increase percentage must be greater than or equal to zero, ensuring that contract rates do not decrease automatically.
903
+ * @param result - the ValidationResult object to add any errors or warnings to
904
+ * @public
905
+ * @method
906
+ */
907
+ ValidateAnnualIncreasePercentNonNegative(result: ValidationResult): void;
908
+ /**
909
+ * The cancellation window days must be zero or a positive number, ensuring that we do not record a negative number of days for the contract cancellation period.
910
+ * @param result - the ValidationResult object to add any errors or warnings to
911
+ * @public
912
+ * @method
913
+ */
914
+ ValidateCancellationWindowDaysGreaterThanOrEqualToZero(result: ValidationResult): void;
915
+ /**
916
+ * Renewal notice days must be 0 or greater, if specified.
917
+ * @param result - the ValidationResult object to add any errors or warnings to
918
+ * @public
919
+ * @method
920
+ */
921
+ ValidateRenewalNoticeDaysGreaterThanOrEqualToZero(result: ValidationResult): void;
922
+ /**
923
+ * Both Creating Entity ID and Creating Record ID must be provided together, or both must be left empty, to ensure consistent tracking of the source entity and record.
924
+ * @param result - the ValidationResult object to add any errors or warnings to
925
+ * @public
926
+ * @method
927
+ */
928
+ ValidateCreatingEntityAndRecordCoexistence(result: ValidationResult): void;
929
+ /**
930
+ * The contract end date must be on or after the effective date to ensure logical date ordering.
931
+ * @param result - the ValidationResult object to add any errors or warnings to
932
+ * @public
933
+ * @method
934
+ */
935
+ ValidateEndDateAfterOrEqualToEffectiveDate(result: ValidationResult): void;
936
+ /**
937
+ * A contract cannot be its own parent contract to prevent circular references in the contract hierarchy.
938
+ * @param result - the ValidationResult object to add any errors or warnings to
939
+ * @public
940
+ * @method
941
+ */
942
+ ValidateParentContractIDNotEqualToID(result: ValidationResult): void;
943
+ /**
944
+ * A contract cannot be superseded by itself. The superseding contract must be a different contract record.
945
+ * @param result - the ValidationResult object to add any errors or warnings to
946
+ * @public
947
+ * @method
948
+ */
949
+ ValidateSupersededByContractIDNotEqualToID(result: ValidationResult): void;
950
+ /**
951
+ * * Field Name: ID
952
+ * * Display Name: ID
953
+ * * SQL Data Type: uniqueidentifier
954
+ * * Default Value: newsequentialid()
955
+ */
956
+ get ID(): string;
957
+ set ID(value: string);
958
+ /**
959
+ * * Field Name: ContractNumber
960
+ * * Display Name: Contract Number
961
+ * * SQL Data Type: nvarchar(50)
962
+ * * Description: CTR-000001, minted by spAssignNextContractNumber from the seq_ContractNumber database SEQUENCE. Unique. NULLABLE at the schema level because MJ cannot express 'NOT NULL, assigned by the server on insert' -- ContractEntityServer.Save() is what guarantees every contract has one. Gaps are normal and are not to be 'fixed': a save that fails after taking a number leaves one behind, and UQ_Contract_ContractNumber is what guarantees no two contracts share a number.
963
+ */
964
+ get ContractNumber(): string | null;
965
+ set ContractNumber(value: string | null);
966
+ /**
967
+ * * Field Name: ContractTypeID
968
+ * * Display Name: Contract Type
969
+ * * SQL Data Type: uniqueidentifier
970
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contract Types (vwContractTypes.ID)
971
+ */
972
+ get ContractTypeID(): string;
973
+ set ContractTypeID(value: string);
974
+ /**
975
+ * * Field Name: CompanyID
976
+ * * Display Name: Company
977
+ * * SQL Data Type: uniqueidentifier
978
+ * * Related Entity/Foreign Key: MJ: Companies (vwCompanies.ID)
979
+ * * Description: The SELLING company (__mj.Company) — which of OUR entities holds this agreement. Not the customer. Stored rather than derived because it is not reliably recoverable from the deal.
980
+ */
981
+ get CompanyID(): string;
982
+ set CompanyID(value: string);
983
+ /**
984
+ * * Field Name: CustomerOrganizationID
985
+ * * Display Name: Customer Organization
986
+ * * SQL Data Type: uniqueidentifier
987
+ * * Related Entity/Foreign Key: MJ_BizApps_Common: Organizations (vwOrganizations.ID)
988
+ * * Description: The customer. NOT NULL: contracts are B2B here by definition, and the individual case lives entirely in orders. v1 allowed an organization-or-person XOR; that is gone.
989
+ */
990
+ get CustomerOrganizationID(): string;
991
+ set CustomerOrganizationID(value: string);
992
+ /**
993
+ * * Field Name: PrimaryContactPersonID
994
+ * * Display Name: Primary Contact Person
995
+ * * SQL Data Type: uniqueidentifier
996
+ * * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)
997
+ * * Description: Their named contact, optional.
998
+ */
999
+ get PrimaryContactPersonID(): string | null;
1000
+ set PrimaryContactPersonID(value: string | null);
1001
+ /**
1002
+ * * Field Name: ContractTemplateID
1003
+ * * Display Name: Contract Template
1004
+ * * SQL Data Type: uniqueidentifier
1005
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contract Templates (vwContractTemplates.ID)
1006
+ * * Description: The agreement version this contract incorporates. Nullable because a contract created automatically at Closed Won has none until finance reads the PDF.
1007
+ */
1008
+ get ContractTemplateID(): string | null;
1009
+ set ContractTemplateID(value: string | null);
1010
+ /**
1011
+ * * Field Name: CreatingEntityID
1012
+ * * Display Name: Creating Entity
1013
+ * * SQL Data Type: uniqueidentifier
1014
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
1015
+ * * Description: Polymorphic reference part 1: the MJ Entity of the record that CREATED this contract, in practice Deals. A real foreign key to __mj.Entity — this is the half that is enforced, and the half that lets MJ resolve the pair generically. Same pattern accounting uses for JournalEntry provenance.
1016
+ */
1017
+ get CreatingEntityID(): string | null;
1018
+ set CreatingEntityID(value: string | null);
1019
+ /**
1020
+ * * Field Name: CreatingRecordID
1021
+ * * Display Name: Creating Record
1022
+ * * SQL Data Type: nvarchar(450)
1023
+ * * Description: Polymorphic reference part 2: the creating records id. Soft by nature — it points at a record owned by an app this repo has no knowledge of. Set together with CreatingEntityID or not at all.
1024
+ */
1025
+ get CreatingRecordID(): string | null;
1026
+ set CreatingRecordID(value: string | null);
1027
+ /**
1028
+ * * Field Name: ParentContractID
1029
+ * * Display Name: Parent Contract
1030
+ * * SQL Data Type: uniqueidentifier
1031
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contracts (vwContracts.ID)
1032
+ * * Description: The contract this one amends. How a change order attaches: a change order is signed paper with its own PDF, dates and modifications, so it reuses this entity rather than getting one of its own. The original stays in force.
1033
+ */
1034
+ get ParentContractID(): string | null;
1035
+ set ParentContractID(value: string | null);
1036
+ /**
1037
+ * * Field Name: SupersededByContractID
1038
+ * * Display Name: Superseded By Contract
1039
+ * * SQL Data Type: uniqueidentifier
1040
+ * * Related Entity/Foreign Key: MJ_BizApps_Contracts: Contracts (vwContracts.ID)
1041
+ * * Description: The contract that REPLACED this one, where an agreement was re-papered rather than amended. Also the sole source of the derived Superseded state, which is why the old CHECK tying it to a Status column disappeared with that column.
1042
+ */
1043
+ get SupersededByContractID(): string | null;
1044
+ set SupersededByContractID(value: string | null);
1045
+ /**
1046
+ * * Field Name: SigningProviderURL
1047
+ * * Display Name: Signing Provider URL
1048
+ * * SQL Data Type: nvarchar(1000)
1049
+ * * Description: Direct link to the document in the signing provider (PandaDoc). The fallback that works before any integration exists, and when a storage sync has broken.
1050
+ */
1051
+ get SigningProviderURL(): string | null;
1052
+ set SigningProviderURL(value: string | null);
1053
+ /**
1054
+ * * Field Name: EffectiveDate
1055
+ * * Display Name: Effective Date
1056
+ * * SQL Data Type: date
1057
+ * * Description: When the agreement takes effect.
1058
+ */
1059
+ get EffectiveDate(): Date | null;
1060
+ set EffectiveDate(value: Date | null);
1061
+ /**
1062
+ * * Field Name: ExecutedDate
1063
+ * * Display Name: Executed Date
1064
+ * * SQL Data Type: date
1065
+ * * Description: When it was signed. May legitimately PRECEDE EffectiveDate — sign in December for a January start is the ordinary case. There is deliberately no constraint ordering the two; v1 had one and it rejected exactly the data a correct contract produces.
1066
+ */
1067
+ get ExecutedDate(): Date | null;
1068
+ set ExecutedDate(value: Date | null);
1069
+ /**
1070
+ * * Field Name: EndDate
1071
+ * * Display Name: End Date
1072
+ * * SQL Data Type: date
1073
+ * * Description: When the current term ends. This is what drives the renewal watchlist and every expiry projection.
1074
+ */
1075
+ get EndDate(): Date | null;
1076
+ set EndDate(value: Date | null);
1077
+ /**
1078
+ * * Field Name: TerminatedDate
1079
+ * * Display Name: Terminated Date
1080
+ * * SQL Data Type: date
1081
+ * * Description: When the agreement ended early. Stored rather than derived: it is only recoverable from a successors effective date, and a contract can end with no successor at all when a customer simply leaves.
1082
+ */
1083
+ get TerminatedDate(): Date | null;
1084
+ set TerminatedDate(value: Date | null);
1085
+ /**
1086
+ * * Field Name: AutoRenew
1087
+ * * Display Name: Auto Renew
1088
+ * * SQL Data Type: bit
1089
+ * * Default Value: 0
1090
+ * * Description: Whether the agreement auto-renews, AS THE PAPER STATES IT. True or false, no third state. Distinct from the subscriptions operational setting in orders, which someone can change later; when the two disagree that is a finding, not a bug.
1091
+ */
1092
+ get AutoRenew(): boolean;
1093
+ set AutoRenew(value: boolean);
1094
+ /**
1095
+ * * Field Name: RenewalNoticeDays
1096
+ * * Display Name: Renewal Notice Days
1097
+ * * SQL Data Type: int
1098
+ * * Description: Days of written notice we owe before a renewal price change, as stated in the agreement. NOT the same field as CancellationWindowDays even though many agreements set them equal — conflating them silently is how a notice obligation gets missed.
1099
+ */
1100
+ get RenewalNoticeDays(): number | null;
1101
+ set RenewalNoticeDays(value: number | null);
1102
+ /**
1103
+ * * Field Name: CancellationWindowDays
1104
+ * * Display Name: Cancellation Window Days
1105
+ * * SQL Data Type: int
1106
+ * * Description: Days of notice the customer owes to cancel without renewing.
1107
+ */
1108
+ get CancellationWindowDays(): number | null;
1109
+ set CancellationWindowDays(value: number | null);
1110
+ /**
1111
+ * * Field Name: AnnualIncreasePercent
1112
+ * * Display Name: Annual Increase Percent
1113
+ * * SQL Data Type: decimal(7, 4)
1114
+ * * Description: The negotiated year-over-year uplift. Exists here because it exists nowhere else: the orders schema has no escalation concept of any kind, which is why a two-year agreement stepping up 10% in year two is recorded in no other system.
1115
+ */
1116
+ get AnnualIncreasePercent(): number | null;
1117
+ set AnnualIncreasePercent(value: number | null);
1118
+ /**
1119
+ * * Field Name: HasModifications
1120
+ * * Display Name: Has Modifications
1121
+ * * SQL Data Type: bit
1122
+ * * Default Value: 0
1123
+ * * Description: Whether the standard agreement was changed for this customer. ASSERTED by a person, not derived — its job is to say "go read the PDF" BEFORE anyone has recorded the modifications, and a derived flag would read false for every contract nobody has processed yet. One direction IS enforced server-side: if modification rows exist this must be true. It is never cleared automatically.
1124
+ */
1125
+ get HasModifications(): boolean;
1126
+ set HasModifications(value: boolean);
1127
+ /**
1128
+ * * Field Name: Description
1129
+ * * Display Name: Description
1130
+ * * SQL Data Type: nvarchar(MAX)
1131
+ */
1132
+ get Description(): string | null;
1133
+ set Description(value: string | null);
1134
+ /**
1135
+ * * Field Name: Notes
1136
+ * * Display Name: Notes
1137
+ * * SQL Data Type: nvarchar(MAX)
1138
+ * * Description: Free-text working notes for whoever is processing the contract.
1139
+ */
1140
+ get Notes(): string | null;
1141
+ set Notes(value: string | null);
1142
+ /**
1143
+ * * Field Name: __mj_CreatedAt
1144
+ * * Display Name: Created At
1145
+ * * SQL Data Type: datetimeoffset
1146
+ * * Default Value: getutcdate()
1147
+ */
1148
+ get __mj_CreatedAt(): Date;
1149
+ /**
1150
+ * * Field Name: __mj_UpdatedAt
1151
+ * * Display Name: Updated At
1152
+ * * SQL Data Type: datetimeoffset
1153
+ * * Default Value: getutcdate()
1154
+ */
1155
+ get __mj_UpdatedAt(): Date;
1156
+ /**
1157
+ * * Field Name: ContractType
1158
+ * * Display Name: Contract Type Name
1159
+ * * SQL Data Type: nvarchar(100)
1160
+ */
1161
+ get ContractType(): string;
1162
+ /**
1163
+ * * Field Name: Company
1164
+ * * Display Name: Company Name
1165
+ * * SQL Data Type: nvarchar(50)
1166
+ */
1167
+ get Company(): string;
1168
+ /**
1169
+ * * Field Name: CustomerOrganization
1170
+ * * Display Name: Customer Name
1171
+ * * SQL Data Type: nvarchar(255)
1172
+ */
1173
+ get CustomerOrganization(): string;
1174
+ /**
1175
+ * * Field Name: PrimaryContactPerson
1176
+ * * Display Name: Primary Contact Name
1177
+ * * SQL Data Type: nvarchar(100)
1178
+ */
1179
+ get PrimaryContactPerson(): string | null;
1180
+ /**
1181
+ * * Field Name: ContractTemplate
1182
+ * * Display Name: Contract Template Name
1183
+ * * SQL Data Type: nvarchar(200)
1184
+ */
1185
+ get ContractTemplate(): string | null;
1186
+ /**
1187
+ * * Field Name: CreatingEntity
1188
+ * * Display Name: Creating Entity Name
1189
+ * * SQL Data Type: nvarchar(255)
1190
+ */
1191
+ get CreatingEntity(): string | null;
1192
+ /**
1193
+ * * Field Name: ParentContract
1194
+ * * Display Name: Parent Contract Name
1195
+ * * SQL Data Type: nvarchar(50)
1196
+ */
1197
+ get ParentContract(): string | null;
1198
+ /**
1199
+ * * Field Name: SupersededByContract
1200
+ * * Display Name: Superseded By Contract Name
1201
+ * * SQL Data Type: nvarchar(50)
1202
+ */
1203
+ get SupersededByContract(): string | null;
1204
+ /**
1205
+ * * Field Name: State
1206
+ * * Display Name: State
1207
+ * * SQL Data Type: varchar(10)
1208
+ */
1209
+ get State(): string;
1210
+ /**
1211
+ * * Field Name: IsAwaitingDocument
1212
+ * * Display Name: Is Awaiting Document
1213
+ * * SQL Data Type: bit
1214
+ */
1215
+ get IsAwaitingDocument(): boolean | null;
1216
+ /**
1217
+ * * Field Name: DaysToEnd
1218
+ * * Display Name: Days To End
1219
+ * * SQL Data Type: int
1220
+ */
1221
+ get DaysToEnd(): number | null;
1222
+ /**
1223
+ * * Field Name: RenewalNoticeDeadline
1224
+ * * Display Name: Renewal Notice Deadline
1225
+ * * SQL Data Type: date
1226
+ */
1227
+ get RenewalNoticeDeadline(): Date | null;
1228
+ /**
1229
+ * * Field Name: IsInCancellationWindow
1230
+ * * Display Name: Is In Cancellation Window
1231
+ * * SQL Data Type: bit
1232
+ */
1233
+ get IsInCancellationWindow(): boolean | null;
1234
+ }
1235
+ //# sourceMappingURL=entity_subclasses.d.ts.map