@d19n/youfibre-odin-sdk 2.0.76 → 2.0.78

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 (141) hide show
  1. package/README.md +10 -1
  2. package/dist/EntityRegistry.d.ts +2 -0
  3. package/dist/EntityRegistry.js +2 -0
  4. package/dist/OdinApiClient.d.ts +4 -0
  5. package/dist/OdinApiClient.js +8 -0
  6. package/dist/OdinDbClient.d.ts +4 -0
  7. package/dist/OdinDbClient.js +8 -0
  8. package/dist/accessors-v2/RegionAccessor.d.ts +111 -0
  9. package/dist/accessors-v2/RegionAccessor.js +190 -0
  10. package/dist/accessors-v2/index.d.ts +1 -0
  11. package/dist/accessors-v2/index.js +4 -2
  12. package/dist/actions-v2/CaseCreateNoteDto.d.ts +7 -0
  13. package/dist/actions-v2/CreateActivityLogEntryDto.d.ts +8 -0
  14. package/dist/actions-v2/CreateAppointmentDto.d.ts +8 -0
  15. package/dist/actions-v2/CreateBillingRequestTransactionDto.d.ts +9 -0
  16. package/dist/actions-v2/CreateBundleProductActionDto.d.ts +8 -0
  17. package/dist/actions-v2/CreateInstallDto.d.ts +9 -10
  18. package/dist/actions-v2/CreateInternetProductActionDto.d.ts +8 -0
  19. package/dist/actions-v2/CreateLaborProductActionDto.d.ts +8 -0
  20. package/dist/actions-v2/CreateLandlineProductActionDto.d.ts +8 -0
  21. package/dist/actions-v2/CreateLeadDto.d.ts +8 -0
  22. package/dist/actions-v2/CreateLeadFromAddressDto.d.ts +8 -0
  23. package/dist/actions-v2/CreateMeshProductActionDto.d.ts +8 -0
  24. package/dist/actions-v2/CreateMessageDto.d.ts +8 -0
  25. package/dist/actions-v2/CreateMobileProductActionDto.d.ts +8 -0
  26. package/dist/actions-v2/CreateOtpTransactionDto.d.ts +9 -0
  27. package/dist/actions-v2/CreatePgContactDto.d.ts +1 -1
  28. package/dist/actions-v2/CreateRegionDto.d.ts +65 -0
  29. package/dist/actions-v2/CreateRegionDto.js +52 -0
  30. package/dist/actions-v2/CreateTelevisionProductActionDto.d.ts +8 -0
  31. package/dist/actions-v2/CreateTransactionalEmailDto.d.ts +14 -0
  32. package/dist/actions-v2/NewAppointmentDto.d.ts +8 -0
  33. package/dist/actions-v2/SendDirectDebitCreatedEmailDto.d.ts +114 -0
  34. package/dist/actions-v2/SendDirectDebitCreatedEmailDto.js +59 -0
  35. package/dist/actions-v2/SendDirectDebitSetupConfirmationEmailDto.d.ts +114 -0
  36. package/dist/actions-v2/SendDirectDebitSetupConfirmationEmailDto.js +59 -0
  37. package/dist/actions-v2/SendRefundTransactionEmailDto.d.ts +109 -0
  38. package/dist/actions-v2/SendRefundTransactionEmailDto.js +54 -0
  39. package/dist/actions-v2/SendTlosNinjaCaseEmailDto.d.ts +7 -0
  40. package/dist/actions-v2/TransactionCreateDto.d.ts +8 -0
  41. package/dist/actions-v2/UpdateBundleProductActionDto.d.ts +8 -0
  42. package/dist/actions-v2/UpdateEmailDto.d.ts +14 -0
  43. package/dist/actions-v2/UpdateInternetProductActionDto.d.ts +8 -0
  44. package/dist/actions-v2/UpdateLaborProductActionDto.d.ts +8 -0
  45. package/dist/actions-v2/UpdateLandlineProductActionDto.d.ts +8 -0
  46. package/dist/actions-v2/UpdateLeadDto.d.ts +8 -0
  47. package/dist/actions-v2/UpdateMeshProductActionDto.d.ts +8 -0
  48. package/dist/actions-v2/UpdateMobileProductActionDto.d.ts +8 -0
  49. package/dist/actions-v2/UpdatePgContactDto.d.ts +1 -1
  50. package/dist/actions-v2/UpdateServiceDto.d.ts +8 -0
  51. package/dist/actions-v2/UpdateSupportEmailDto.d.ts +7 -0
  52. package/dist/actions-v2/UpdateTelevisionProductActionDto.d.ts +8 -0
  53. package/dist/api-sdk-v2/TeamApi.d.ts +2 -2
  54. package/dist/api-sdk-v2/TeamApi.js +6 -6
  55. package/dist/api-sdk-v2/UserApi.d.ts +4 -4
  56. package/dist/api-sdk-v2/UserApi.js +12 -12
  57. package/dist/db-accessors-v2/RegionDbAccessor.d.ts +149 -0
  58. package/dist/db-accessors-v2/RegionDbAccessor.js +227 -0
  59. package/dist/db-accessors-v2/index.d.ts +1 -0
  60. package/dist/db-accessors-v2/index.js +4 -2
  61. package/dist/db-sdk-v2/TeamDb.d.ts +2 -2
  62. package/dist/db-sdk-v2/TeamDb.js +6 -6
  63. package/dist/db-sdk-v2/UserDb.d.ts +4 -4
  64. package/dist/db-sdk-v2/UserDb.js +12 -12
  65. package/dist/entities-v2/Account.d.ts +60 -1
  66. package/dist/entities-v2/Account.js +20 -2
  67. package/dist/entities-v2/ActivityLog.d.ts +26 -1
  68. package/dist/entities-v2/ActivityLog.js +21 -1
  69. package/dist/entities-v2/Address.d.ts +23 -1
  70. package/dist/entities-v2/Address.js +17 -1
  71. package/dist/entities-v2/Appointment.d.ts +22 -1
  72. package/dist/entities-v2/Appointment.js +17 -1
  73. package/dist/entities-v2/Call.d.ts +15 -1
  74. package/dist/entities-v2/Call.js +4 -0
  75. package/dist/entities-v2/ConsumptionSchedule.d.ts +23 -1
  76. package/dist/entities-v2/ConsumptionSchedule.js +17 -1
  77. package/dist/entities-v2/Email.d.ts +45 -1
  78. package/dist/entities-v2/Email.js +4 -0
  79. package/dist/entities-v2/InvoiceItem.d.ts +26 -1
  80. package/dist/entities-v2/InvoiceItem.js +19 -1
  81. package/dist/entities-v2/KnowledgeArticle.d.ts +3 -1
  82. package/dist/entities-v2/KnowledgeArticle.js +2 -0
  83. package/dist/entities-v2/Lead.d.ts +31 -1
  84. package/dist/entities-v2/Lead.js +21 -1
  85. package/dist/entities-v2/Message.d.ts +23 -1
  86. package/dist/entities-v2/Message.js +2 -0
  87. package/dist/entities-v2/Milestone.d.ts +15 -1
  88. package/dist/entities-v2/Milestone.js +11 -1
  89. package/dist/entities-v2/Note.d.ts +8 -1
  90. package/dist/entities-v2/Note.js +2 -0
  91. package/dist/entities-v2/PaymentMethod.d.ts +43 -1
  92. package/dist/entities-v2/PaymentMethod.js +31 -1
  93. package/dist/entities-v2/PgContact.d.ts +8 -8
  94. package/dist/entities-v2/PgContact.js +2 -2
  95. package/dist/entities-v2/Product.d.ts +118 -1
  96. package/dist/entities-v2/Product.js +24 -2
  97. package/dist/entities-v2/ProductComponent.d.ts +27 -1
  98. package/dist/entities-v2/ProductComponent.js +21 -1
  99. package/dist/entities-v2/Program.d.ts +15 -1
  100. package/dist/entities-v2/Program.js +11 -1
  101. package/dist/entities-v2/Project.d.ts +15 -1
  102. package/dist/entities-v2/Project.js +11 -1
  103. package/dist/entities-v2/Restriction.d.ts +23 -1
  104. package/dist/entities-v2/Restriction.js +17 -1
  105. package/dist/entities-v2/Service.d.ts +22 -1
  106. package/dist/entities-v2/Service.js +17 -1
  107. package/dist/entities-v2/ServiceAppointment.d.ts +8 -1
  108. package/dist/entities-v2/ServiceAppointment.js +2 -0
  109. package/dist/entities-v2/ServiceVisitAudit.d.ts +13 -13
  110. package/dist/entities-v2/ServiceVisitAudit.js +2 -2
  111. package/dist/entities-v2/SmsMessage.d.ts +18 -1
  112. package/dist/entities-v2/SmsMessage.js +2 -0
  113. package/dist/entities-v2/Subtask.d.ts +15 -1
  114. package/dist/entities-v2/Subtask.js +11 -1
  115. package/dist/entities-v2/Task.d.ts +15 -1
  116. package/dist/entities-v2/Task.js +11 -1
  117. package/dist/entities-v2/Team.d.ts +3 -3
  118. package/dist/entities-v2/Transaction.d.ts +27 -1
  119. package/dist/entities-v2/Transaction.js +21 -1
  120. package/dist/entities-v2/User.d.ts +6 -6
  121. package/dist/entities-v2/Vendor.d.ts +22 -1
  122. package/dist/entities-v2/Vendor.js +17 -1
  123. package/dist/entities-v2/WorkOrder.d.ts +99 -1
  124. package/dist/entities-v2/WorkOrder.js +2 -0
  125. package/dist/entities-v2/YfStockCount.d.ts +9 -1
  126. package/dist/entities-v2/YfStockCount.js +8 -0
  127. package/dist/records-v2/EmailRecord.d.ts +87 -0
  128. package/dist/records-v2/EmailRecord.js +108 -0
  129. package/dist/records-v2/ExchangeRecord.d.ts +20 -0
  130. package/dist/records-v2/ExchangeRecord.js +33 -0
  131. package/dist/records-v2/RegionRecord.d.ts +205 -0
  132. package/dist/records-v2/RegionRecord.js +292 -0
  133. package/dist/records-v2/ServiceAppointmentConfigRecord.d.ts +20 -0
  134. package/dist/records-v2/ServiceAppointmentConfigRecord.js +33 -0
  135. package/dist/records-v2/TeamRecord.d.ts +20 -20
  136. package/dist/records-v2/TeamRecord.js +33 -33
  137. package/dist/records-v2/UserRecord.d.ts +40 -40
  138. package/dist/records-v2/UserRecord.js +66 -66
  139. package/dist/records-v2/index.d.ts +1 -0
  140. package/dist/records-v2/index.js +5 -2
  141. package/package.json +2 -2
@@ -0,0 +1,109 @@
1
+ /**
2
+ * SendRefundTransactionEmail Action DTO
3
+ *
4
+ * Trigger email to refund transaction
5
+ *
6
+ * @module NotificationModule
7
+ * @entity Email
8
+ * @actionKey SendRefundTransactionEmail
9
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Create.SendRefundTransactionEmail
10
+ *
11
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
+ */
13
+ import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
14
+ /**
15
+ * RabbitMQ message payload for SendRefundTransactionEmail created events
16
+ *
17
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Create.SendRefundTransactionEmail
18
+ */
19
+ export interface SendRefundTransactionEmailMessage extends OdinRecordCreatedEvent<SendRefundTransactionEmailDto, SendRefundTransactionEmailProperties> {
20
+ }
21
+ /**
22
+ * Properties for SendRefundTransactionEmail action
23
+ *
24
+ * @property Required fields: 0
25
+ * @property Optional fields: 7
26
+ */
27
+ export interface SendRefundTransactionEmailProperties {
28
+ /**
29
+ * Date
30
+ *
31
+ * Date field for Email records. Used by Communications team.
32
+ * @type {DATE_TIME}
33
+ */
34
+ Date?: string | null;
35
+ /**
36
+ * EmailingService
37
+ *
38
+ * The provider we use to send email (eg. Sendgrid)
39
+ * @type {ENUM}
40
+ */
41
+ EmailingService?: string | null;
42
+ /**
43
+ * ContactId
44
+ *
45
+ * The related Contact to send the email
46
+ * @type {LOOKUP}
47
+ */
48
+ ContactId?: string | null;
49
+ /**
50
+ * TemplateLabel
51
+ *
52
+ * The template label from email templates engine
53
+ * @type {TEXT}
54
+ */
55
+ TemplateLabel?: string | null;
56
+ /**
57
+ * MessageId
58
+ *
59
+ * SMTP Message Id (Communications - Email)
60
+ * @type {TEXT}
61
+ */
62
+ MessageId?: string | null;
63
+ /**
64
+ * EmailSenderId
65
+ *
66
+ * The Email Sender related entity
67
+ * @type {LOOKUP}
68
+ */
69
+ EmailSenderId?: string | null;
70
+ /**
71
+ * DynamicData
72
+ *
73
+ * Data will pass to emailing service (variables)
74
+ * @type {JSON}
75
+ */
76
+ DynamicData?: string | null;
77
+ }
78
+ /**
79
+ * SendRefundTransactionEmail
80
+ *
81
+ * Trigger email to refund transaction
82
+ *
83
+ * @actionType CREATE - Creates a new Email record
84
+ * @module NotificationModule
85
+ * @entity Email
86
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Create.SendRefundTransactionEmail
87
+ * @permission schema.action.sendrefundtransactionemail.trigger
88
+ * @benchmark This action is tracked for performance benchmarks
89
+ */
90
+ export declare class SendRefundTransactionEmailDto extends OdinRecordCreateDto<SendRefundTransactionEmailProperties> {
91
+ /** Used by SDK generators to identify action type */
92
+ static readonly ACTION_TYPE = "CREATE";
93
+ static readonly ACTION_KEY = "SendRefundTransactionEmail";
94
+ static readonly MODULE_NAME = "NotificationModule";
95
+ static readonly ENTITIES: string[];
96
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.Email.Create.SendRefundTransactionEmail";
97
+ static readonly PERMISSION = "schema.action.sendrefundtransactionemail.trigger";
98
+ /** Step metadata - entity this action targets */
99
+ static readonly STEP_ENTITY = "NotificationModule:Email";
100
+ static readonly STEP_SCHEMA_ID = "cb37958c-d72f-44aa-975a-a8fae42b1b72";
101
+ static readonly STEP_SCHEMA_ACTION_ID = "722fe49a-ffb9-4190-ada7-0f5ddcdddf47";
102
+ static readonly AUTO_LINK_PARENT = true;
103
+ readonly actionName: string;
104
+ readonly schemaActionId: string;
105
+ readonly entity: string;
106
+ constructor(properties: SendRefundTransactionEmailProperties, options?: {
107
+ journeyId?: string;
108
+ });
109
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /**
3
+ * SendRefundTransactionEmail Action DTO
4
+ *
5
+ * Trigger email to refund transaction
6
+ *
7
+ * @module NotificationModule
8
+ * @entity Email
9
+ * @actionKey SendRefundTransactionEmail
10
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Create.SendRefundTransactionEmail
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.SendRefundTransactionEmailDto = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * SendRefundTransactionEmail
19
+ *
20
+ * Trigger email to refund transaction
21
+ *
22
+ * @actionType CREATE - Creates a new Email record
23
+ * @module NotificationModule
24
+ * @entity Email
25
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Create.SendRefundTransactionEmail
26
+ * @permission schema.action.sendrefundtransactionemail.trigger
27
+ * @benchmark This action is tracked for performance benchmarks
28
+ */
29
+ class SendRefundTransactionEmailDto extends core_1.OdinRecordCreateDto {
30
+ constructor(properties, options) {
31
+ super({
32
+ entity: 'NotificationModule:Email',
33
+ type: undefined,
34
+ properties,
35
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
36
+ });
37
+ this.actionName = 'SendRefundTransactionEmail';
38
+ this.schemaActionId = '722fe49a-ffb9-4190-ada7-0f5ddcdddf47';
39
+ this.entity = 'NotificationModule:Email';
40
+ }
41
+ }
42
+ exports.SendRefundTransactionEmailDto = SendRefundTransactionEmailDto;
43
+ /** Used by SDK generators to identify action type */
44
+ SendRefundTransactionEmailDto.ACTION_TYPE = 'CREATE';
45
+ SendRefundTransactionEmailDto.ACTION_KEY = 'SendRefundTransactionEmail';
46
+ SendRefundTransactionEmailDto.MODULE_NAME = 'NotificationModule';
47
+ SendRefundTransactionEmailDto.ENTITIES = ['Email'];
48
+ SendRefundTransactionEmailDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.Email.Create.SendRefundTransactionEmail';
49
+ SendRefundTransactionEmailDto.PERMISSION = 'schema.action.sendrefundtransactionemail.trigger';
50
+ /** Step metadata - entity this action targets */
51
+ SendRefundTransactionEmailDto.STEP_ENTITY = 'NotificationModule:Email';
52
+ SendRefundTransactionEmailDto.STEP_SCHEMA_ID = 'cb37958c-d72f-44aa-975a-a8fae42b1b72';
53
+ SendRefundTransactionEmailDto.STEP_SCHEMA_ACTION_ID = '722fe49a-ffb9-4190-ada7-0f5ddcdddf47';
54
+ SendRefundTransactionEmailDto.AUTO_LINK_PARENT = true;
@@ -71,6 +71,13 @@ export interface SendTlosNinjaCaseEmailProperties {
71
71
  * @type {JSON}
72
72
  */
73
73
  DynamicData?: string | null;
74
+ /**
75
+ * Case
76
+ *
77
+ * Data field for Email records. Used by Communications team.
78
+ * @type {LOOKUP}
79
+ */
80
+ Case?: string | null;
74
81
  /**
75
82
  * MessageId
76
83
  *
@@ -57,6 +57,14 @@ export interface TransactionCreateProperties {
57
57
  * @required
58
58
  */
59
59
  Status: string;
60
+ /**
61
+ * Type
62
+ *
63
+ * type of transaction (Finance - Transaction)
64
+ * @type {ENUM}
65
+ * @required
66
+ */
67
+ Type: string;
60
68
  /**
61
69
  * PaymentMethod
62
70
  *
@@ -26,6 +26,14 @@ export interface UpdateBundleProductActionMessage extends OdinRecordUpdatedEvent
26
26
  * @property Optional fields: 25
27
27
  */
28
28
  export interface UpdateBundleProductActionProperties {
29
+ /**
30
+ * Type
31
+ *
32
+ * type of product (Product Management - Product)
33
+ * @type {ENUM}
34
+ * @required
35
+ */
36
+ Type: string;
29
37
  /**
30
38
  * CustomerType
31
39
  *
@@ -32,6 +32,13 @@ export interface UpdateEmailProperties {
32
32
  * @type {ENUM}
33
33
  */
34
34
  Status?: string | null;
35
+ /**
36
+ * Case
37
+ *
38
+ * Data field for Email records. Used by Communications team.
39
+ * @type {LOOKUP}
40
+ */
41
+ Case?: string | null;
35
42
  /**
36
43
  * SenderType
37
44
  *
@@ -67,6 +74,13 @@ export interface UpdateEmailProperties {
67
74
  * @type {FILE_MULTIPLE}
68
75
  */
69
76
  Files?: string | null;
77
+ /**
78
+ * From
79
+ *
80
+ * Data field for Email records. Used by Communications team.
81
+ * @type {TEXT}
82
+ */
83
+ From?: string | null;
70
84
  /**
71
85
  * MessageId
72
86
  *
@@ -26,6 +26,14 @@ export interface UpdateInternetProductActionMessage extends OdinRecordUpdatedEve
26
26
  * @property Optional fields: 27
27
27
  */
28
28
  export interface UpdateInternetProductActionProperties {
29
+ /**
30
+ * Type
31
+ *
32
+ * type of product (Product Management - Product)
33
+ * @type {ENUM}
34
+ * @required
35
+ */
36
+ Type: string;
29
37
  /**
30
38
  * CustomerType
31
39
  *
@@ -34,6 +34,14 @@ export interface UpdateLaborProductActionProperties {
34
34
  * @required
35
35
  */
36
36
  Category: string;
37
+ /**
38
+ * Type
39
+ *
40
+ * type of product (Product Management - Product)
41
+ * @type {ENUM}
42
+ * @required
43
+ */
44
+ Type: string;
37
45
  /**
38
46
  * CustomerType
39
47
  *
@@ -26,6 +26,14 @@ export interface UpdateLandlineProductActionMessage extends OdinRecordUpdatedEve
26
26
  * @property Optional fields: 26
27
27
  */
28
28
  export interface UpdateLandlineProductActionProperties {
29
+ /**
30
+ * Type
31
+ *
32
+ * type of product (Product Management - Product)
33
+ * @type {ENUM}
34
+ * @required
35
+ */
36
+ Type: string;
29
37
  /**
30
38
  * CustomerType
31
39
  *
@@ -33,6 +33,14 @@ export interface UpdateLeadProperties {
33
33
  * @required
34
34
  */
35
35
  Source: string;
36
+ /**
37
+ * type
38
+ *
39
+ * Type of lead (Sales - Lead)
40
+ * @type {ENUM}
41
+ * @required
42
+ */
43
+ Type: string;
36
44
  /**
37
45
  * name
38
46
  *
@@ -26,6 +26,14 @@ export interface UpdateMeshProductActionMessage extends OdinRecordUpdatedEvent<U
26
26
  * @property Optional fields: 26
27
27
  */
28
28
  export interface UpdateMeshProductActionProperties {
29
+ /**
30
+ * Type
31
+ *
32
+ * type of product (Product Management - Product)
33
+ * @type {ENUM}
34
+ * @required
35
+ */
36
+ Type: string;
29
37
  /**
30
38
  * CustomerType
31
39
  *
@@ -26,6 +26,14 @@ export interface UpdateMobileProductActionMessage extends OdinRecordUpdatedEvent
26
26
  * @property Optional fields: 25
27
27
  */
28
28
  export interface UpdateMobileProductActionProperties {
29
+ /**
30
+ * Type
31
+ *
32
+ * type of product (Product Management - Product)
33
+ * @type {ENUM}
34
+ * @required
35
+ */
36
+ Type: string;
29
37
  /**
30
38
  * CustomerType
31
39
  *
@@ -37,7 +37,7 @@ export interface UpdatePgContactProperties {
37
37
  * Name
38
38
  *
39
39
  * Name
40
- * @type {NAME}
40
+ * @type {TEXT}
41
41
  */
42
42
  Name?: string | null;
43
43
  /**
@@ -33,6 +33,14 @@ export interface UpdateServiceProperties {
33
33
  * @required
34
34
  */
35
35
  CustomerType: string;
36
+ /**
37
+ * Type
38
+ *
39
+ * type of service (Network Operations - Service)
40
+ * @type {ENUM}
41
+ * @required
42
+ */
43
+ Type: string;
36
44
  /**
37
45
  * Name
38
46
  *
@@ -90,6 +90,13 @@ export interface UpdateSupportEmailProperties {
90
90
  * @type {TEXT}
91
91
  */
92
92
  To?: string | null;
93
+ /**
94
+ * From
95
+ *
96
+ * Data field for Email records. Used by Communications team.
97
+ * @type {TEXT}
98
+ */
99
+ From?: string | null;
93
100
  /**
94
101
  * Envelope
95
102
  *
@@ -26,6 +26,14 @@ export interface UpdateTelevisionProductActionMessage extends OdinRecordUpdatedE
26
26
  * @property Optional fields: 27
27
27
  */
28
28
  export interface UpdateTelevisionProductActionProperties {
29
+ /**
30
+ * Type
31
+ *
32
+ * type of product (Product Management - Product)
33
+ * @type {ENUM}
34
+ * @required
35
+ */
36
+ Type: string;
29
37
  /**
30
38
  * CustomerType
31
39
  *
@@ -18,14 +18,14 @@ export declare class TeamApi extends ApiProvider {
18
18
  private readonly entityName;
19
19
  private sourceRecord;
20
20
  private _case?;
21
- private _user?;
22
21
  private _workorder?;
23
22
  private _crmdataset?;
23
+ private _user?;
24
24
  constructor(authParams?: OauthParams, authToken?: string);
25
25
  get case(): ApiRecordLinkManager;
26
- get user(): ApiRecordLinkManager;
27
26
  get workorder(): ApiRecordLinkManager;
28
27
  get crmdataset(): ApiRecordLinkManager;
28
+ get user(): ApiRecordLinkManager;
29
29
  setRecord(sourceRecord: any): void;
30
30
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
31
31
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<TeamProperties>>>;
@@ -39,12 +39,6 @@ class TeamApi extends api_provider_1.ApiProvider {
39
39
  }
40
40
  return this._case;
41
41
  }
42
- get user() {
43
- if (!this._user) {
44
- this._user = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:Team', 'IdentityModule:User', 'Team_User');
45
- }
46
- return this._user;
47
- }
48
42
  get workorder() {
49
43
  if (!this._workorder) {
50
44
  this._workorder = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:Team', 'FieldServiceModule:WorkOrder', 'WorkOrder_Team');
@@ -57,6 +51,12 @@ class TeamApi extends api_provider_1.ApiProvider {
57
51
  }
58
52
  return this._crmdataset;
59
53
  }
54
+ get user() {
55
+ if (!this._user) {
56
+ this._user = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:Team', 'IdentityModule:User', 'Team_User');
57
+ }
58
+ return this._user;
59
+ }
60
60
  // ============================================
61
61
  // STANDARD METHODS (Unchanged API)
62
62
  // ============================================
@@ -19,7 +19,6 @@ export declare class UserApi extends ApiProvider {
19
19
  private sourceRecord;
20
20
  private _blockagea55?;
21
21
  private _timeslot?;
22
- private _team?;
23
22
  private _returns?;
24
23
  private _pushnotification?;
25
24
  private _email?;
@@ -42,13 +41,13 @@ export declare class UserApi extends ApiProvider {
42
41
  private _crmdataset?;
43
42
  private _customerdeviceconfiguration?;
44
43
  private _twiliouserupdate?;
45
- private _salesterritory?;
46
44
  private _calltransfer_toagent?;
47
45
  private _calltransfer_fromagent?;
46
+ private _team?;
47
+ private _salesterritory?;
48
48
  constructor(authParams?: OauthParams, authToken?: string);
49
49
  get blockagea55(): ApiRecordLinkManager;
50
50
  get timeslot(): ApiRecordLinkManager;
51
- get team(): ApiRecordLinkManager;
52
51
  get returns(): ApiRecordLinkManager;
53
52
  get pushnotification(): ApiRecordLinkManager;
54
53
  get email(): ApiRecordLinkManager;
@@ -71,9 +70,10 @@ export declare class UserApi extends ApiProvider {
71
70
  get crmdataset(): ApiRecordLinkManager;
72
71
  get customerdeviceconfiguration(): ApiRecordLinkManager;
73
72
  get twiliouserupdate(): ApiRecordLinkManager;
74
- get salesterritory(): ApiRecordLinkManager;
75
73
  get calltransfer_toagent(): ApiRecordLinkManager;
76
74
  get calltransfer_fromagent(): ApiRecordLinkManager;
75
+ get team(): ApiRecordLinkManager;
76
+ get salesterritory(): ApiRecordLinkManager;
77
77
  setRecord(sourceRecord: any): void;
78
78
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
79
79
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<UserProperties>>>;
@@ -45,12 +45,6 @@ class UserApi extends api_provider_1.ApiProvider {
45
45
  }
46
46
  return this._timeslot;
47
47
  }
48
- get team() {
49
- if (!this._team) {
50
- this._team = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'IdentityModule:Team', 'Team_User');
51
- }
52
- return this._team;
53
- }
54
48
  get returns() {
55
49
  if (!this._returns) {
56
50
  this._returns = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'FieldServiceModule:Returns', 'Returns__Inspected_By');
@@ -183,12 +177,6 @@ class UserApi extends api_provider_1.ApiProvider {
183
177
  }
184
178
  return this._twiliouserupdate;
185
179
  }
186
- get salesterritory() {
187
- if (!this._salesterritory) {
188
- this._salesterritory = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'CrmModule:SalesTerritory', 'SalesTerritory__User');
189
- }
190
- return this._salesterritory;
191
- }
192
180
  get calltransfer_toagent() {
193
181
  if (!this._calltransfer_toagent) {
194
182
  this._calltransfer_toagent = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'NotificationModule:CallTransfer', 'CallTransfer_ToAgent');
@@ -201,6 +189,18 @@ class UserApi extends api_provider_1.ApiProvider {
201
189
  }
202
190
  return this._calltransfer_fromagent;
203
191
  }
192
+ get team() {
193
+ if (!this._team) {
194
+ this._team = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'IdentityModule:Team', 'Team_User');
195
+ }
196
+ return this._team;
197
+ }
198
+ get salesterritory() {
199
+ if (!this._salesterritory) {
200
+ this._salesterritory = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'CrmModule:SalesTerritory', 'SalesTerritory__User');
201
+ }
202
+ return this._salesterritory;
203
+ }
204
204
  // ============================================
205
205
  // STANDARD METHODS (Unchanged API)
206
206
  // ============================================
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Region DB Accessor
3
+ *
4
+ * Provides typed access to Region records via direct database access.
5
+ * For use in backend services with principal + dbService.
6
+ * Returns wrapped records with typed action methods.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Simple get
11
+ * const record = await accessor.get(id);
12
+ *
13
+ * // With related entities
14
+ * const record = await accessor.get(id, { entities: ["Contact", "Address"] });
15
+ *
16
+ * // With permissions bypass (separate options)
17
+ * const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
18
+ *
19
+ * // Silent write (no RabbitMQ events)
20
+ * const result = await accessor.upsert([dto], { omitWriteEvents: true });
21
+ *
22
+ * // Constructor-level default (applies to all calls)
23
+ * const accessor = new RegionDbAccessor(principal, dbService, { omitPermissionsCheck: true });
24
+ * ```
25
+ *
26
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
27
+ */
28
+ import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
29
+ import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
30
+ import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
31
+ import { RegionProperties } from '../entities-v2/Region';
32
+ import { RegionRecord } from '../records-v2/RegionRecord';
33
+ /** Search response with wrapped records */
34
+ export interface RegionDbSearchResponse {
35
+ records: RegionRecord[];
36
+ totalRecords: number;
37
+ hasMore: boolean;
38
+ }
39
+ export declare class RegionDbAccessor {
40
+ private readonly _provider;
41
+ private readonly _moduleName;
42
+ private readonly _entityName;
43
+ private readonly _defaultOptions?;
44
+ /**
45
+ * Create a new RegionDbAccessor
46
+ * @param principal - The authenticated principal
47
+ * @param dbService - The database service instance
48
+ * @param defaultOptions - Default provider options applied to all operations
49
+ */
50
+ constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
51
+ get moduleName(): string;
52
+ get entityName(): string;
53
+ /**
54
+ * Create a new empty Region record instance for create operations.
55
+ * Pre-generates an ID that can be referenced before the record is saved.
56
+ *
57
+ * @param id - Optional ID to use (auto-generated UUID if not provided)
58
+ * @returns A new record wrapper with pre-generated ID
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * // Auto-generated ID
63
+ * const note = odinDb.notes.new();
64
+ * console.log(note.id); // UUID available immediately
65
+ *
66
+ * // Custom ID
67
+ * const order = odinDb.orders.new("custom-id-123");
68
+ *
69
+ * // Reference ID before save
70
+ * const account = odinDb.accounts.new();
71
+ * const contact = odinDb.contacts.new();
72
+ * await contact
73
+ * .link({ id: account.id, entity: "CrmModule:Account" })
74
+ * .createContact({ FirstName: "John" });
75
+ * ```
76
+ */
77
+ new(id?: string): RegionRecord;
78
+ /**
79
+ * Get a single Region record by ID
80
+ *
81
+ * @param id - The record ID
82
+ * @param queryOptions - Query options (WHAT to fetch: entities to include)
83
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * // Simple get
88
+ * const record = await accessor.get(id);
89
+ *
90
+ * // With related entities
91
+ * const record = await accessor.get(id, { entities: ["Contact", "Address"] });
92
+ *
93
+ * // With permissions bypass
94
+ * const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
95
+ *
96
+ * // Both options
97
+ * const record = await accessor.get(id, { entities: ["Invoice"] }, { omitPermissionsCheck: true });
98
+ * ```
99
+ */
100
+ get(id: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<RegionRecord>;
101
+ /**
102
+ * Get multiple Region records by IDs
103
+ *
104
+ * @param ids - Array of record IDs
105
+ * @param queryOptions - Query options (WHAT to fetch: entities to include)
106
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
107
+ */
108
+ getMany(ids: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<RegionRecord[]>;
109
+ /**
110
+ * Search Region records
111
+ *
112
+ * @param params - Search parameters
113
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
114
+ */
115
+ search(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<RegionDbSearchResponse>;
116
+ /**
117
+ * Search all Region records with automatic pagination
118
+ *
119
+ * @param params - Search parameters
120
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
121
+ */
122
+ searchAll(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<RegionRecord[]>;
123
+ /**
124
+ * Async generator for paginating through all matching records.
125
+ * Yields batches of wrapped records.
126
+ *
127
+ * @param params - Search parameters
128
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
129
+ */
130
+ paginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): AsyncGenerator<RegionRecord[]>;
131
+ /**
132
+ * Create a fluent query builder for Region records
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * const results = await accessor
137
+ * .query()
138
+ * .where('Status', 'in', ['Active', 'Pending'])
139
+ * .where('CreatedAt', 'gte', '2025-01-01')
140
+ * .select('id', 'title', 'properties.*')
141
+ * .sortBy('createdAt', 'desc')
142
+ * .limit(100)
143
+ * .execute();
144
+ * ```
145
+ */
146
+ query(): QueryBuilder<RegionProperties, RegionRecord>;
147
+ /** Access the underlying DbProvider */
148
+ get provider(): DbProvider;
149
+ }