@d19n/youfibre-odin-sdk 2.0.1 → 2.0.2

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 (67) hide show
  1. package/README.md +14 -3
  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/BrskEntityMigrationErrorAccessor.d.ts +111 -0
  9. package/dist/accessors-v2/BrskEntityMigrationErrorAccessor.js +190 -0
  10. package/dist/accessors-v2/index.d.ts +1 -0
  11. package/dist/accessors-v2/index.js +5 -3
  12. package/dist/actions-v2/AssignCaseDto.d.ts +5 -13
  13. package/dist/actions-v2/AssignCaseWithNoteFlowDto.d.ts +5 -13
  14. package/dist/actions-v2/CreateAuddisPgSubmissionAllocationDto.d.ts +8 -1
  15. package/dist/actions-v2/CreateBacsPgSubmissionAllocationDto.d.ts +11 -4
  16. package/dist/actions-v2/CreateBrskMigrationErrorDto.d.ts +100 -0
  17. package/dist/actions-v2/CreateBrskMigrationErrorDto.js +52 -0
  18. package/dist/actions-v2/CreateCaseFromContactDto.d.ts +5 -13
  19. package/dist/actions-v2/CreateCashbackRewardForOrderReferralDto.d.ts +208 -0
  20. package/dist/actions-v2/CreateCashbackRewardForOrderReferralDto.js +179 -0
  21. package/dist/actions-v2/MoveCollectionWorkOrderToCompleteDto.d.ts +72 -20
  22. package/dist/actions-v2/MoveCollectionWorkOrderToCompleteDto.js +42 -21
  23. package/dist/actions-v2/UpdatePgFileAllocationDto.d.ts +91 -0
  24. package/dist/actions-v2/UpdatePgFileAllocationDto.js +61 -0
  25. package/dist/actions-v2/UpdateTeamDto.d.ts +15 -1
  26. package/dist/api-sdk-v2/BrskEntityMigrationErrorApi.d.ts +45 -0
  27. package/dist/api-sdk-v2/BrskEntityMigrationErrorApi.js +151 -0
  28. package/dist/api-sdk-v2/ReferralApi.d.ts +2 -0
  29. package/dist/api-sdk-v2/ReferralApi.js +6 -0
  30. package/dist/api-sdk-v2/RewardApi.d.ts +2 -0
  31. package/dist/api-sdk-v2/RewardApi.js +6 -0
  32. package/dist/db-accessors-v2/BrskEntityMigrationErrorDbAccessor.d.ts +146 -0
  33. package/dist/db-accessors-v2/BrskEntityMigrationErrorDbAccessor.js +224 -0
  34. package/dist/db-accessors-v2/index.d.ts +1 -0
  35. package/dist/db-accessors-v2/index.js +5 -3
  36. package/dist/db-sdk-v2/BrskEntityMigrationErrorDb.d.ts +117 -0
  37. package/dist/db-sdk-v2/BrskEntityMigrationErrorDb.js +200 -0
  38. package/dist/db-sdk-v2/ReferralDb.d.ts +2 -0
  39. package/dist/db-sdk-v2/ReferralDb.js +6 -0
  40. package/dist/db-sdk-v2/RewardDb.d.ts +2 -0
  41. package/dist/db-sdk-v2/RewardDb.js +6 -0
  42. package/dist/entities-v2/AccountCredit.d.ts +90 -7
  43. package/dist/entities-v2/AccountCredit.js +86 -3
  44. package/dist/entities-v2/BrskEntityMigrationError.d.ts +107 -0
  45. package/dist/entities-v2/BrskEntityMigrationError.js +75 -0
  46. package/dist/entities-v2/Config.d.ts +8 -8
  47. package/dist/entities-v2/Config.js +4 -4
  48. package/dist/entities-v2/Referral.d.ts +7 -0
  49. package/dist/entities-v2/Referral.js +5 -1
  50. package/dist/entities-v2/Reward.d.ts +3 -12
  51. package/dist/entities-v2/Reward.js +0 -2
  52. package/dist/entities-v2/Team.d.ts +21 -0
  53. package/dist/entities-v2/Team.js +17 -1
  54. package/dist/records-v2/BrskEntityMigrationErrorRecord.d.ts +184 -0
  55. package/dist/records-v2/BrskEntityMigrationErrorRecord.js +243 -0
  56. package/dist/records-v2/ContactRecord.js +2 -0
  57. package/dist/records-v2/PgFileAllocationRecord.d.ts +28 -0
  58. package/dist/records-v2/PgFileAllocationRecord.js +37 -0
  59. package/dist/records-v2/ReferralRecord.d.ts +20 -0
  60. package/dist/records-v2/ReferralRecord.js +33 -0
  61. package/dist/records-v2/RewardRecord.d.ts +49 -0
  62. package/dist/records-v2/RewardRecord.js +60 -0
  63. package/dist/records-v2/WorkOrderRecord.d.ts +25 -29
  64. package/dist/records-v2/WorkOrderRecord.js +29 -36
  65. package/dist/records-v2/index.d.ts +1 -0
  66. package/dist/records-v2/index.js +7 -4
  67. package/package.json +1 -1
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BrskEntityMigrationErrorDb = void 0;
13
+ const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
14
+ /**
15
+ * @deprecated Use OdinDbClient.
16
+ *
17
+ * Migration:
18
+ * - Old: new BrskEntityMigrationErrorApi(authParams).get(id)
19
+ * - New: new odin.brskentitymigrationerror.get(id)
20
+ *
21
+ * The new OdinDbClient returns typed record wrappers with action methods.
22
+ *
23
+ * Supports separate query options and provider options:
24
+ * - Constructor level: new BrskEntityMigrationErrorDb(principal, dbService, { omitPermissionsCheck: true })
25
+ * - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
26
+ */
27
+ class BrskEntityMigrationErrorDb extends db_provider_1.DbProvider {
28
+ // ============================================
29
+ // PRIVATE BACKING FIELDS (Lazy Loading)
30
+ // ============================================
31
+ constructor(principal, dbService, defaultOptions) {
32
+ super(principal, dbService, defaultOptions);
33
+ this.moduleName = 'AuditModule';
34
+ this.entityName = 'BrskEntityMigrationError';
35
+ this.principal = principal;
36
+ this.dbService = dbService;
37
+ // Link managers are lazy-loaded on first access
38
+ }
39
+ // ============================================
40
+ // LAZY-LOADED LINK MANAGERS (Public Getters)
41
+ // ============================================
42
+ // Usage remains identical: db.address.list(recordId)
43
+ // ============================================
44
+ // STANDARD METHODS
45
+ // ============================================
46
+ // Methods support separate query options and provider options for clean API
47
+ setRecord(sourceRecord) {
48
+ this.sourceRecord = sourceRecord;
49
+ }
50
+ /**
51
+ * Search records with manual pagination control
52
+ * @param params - Search parameters
53
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
54
+ */
55
+ searchRecords(params, providerOptions) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ return yield this._searchRecords(this.moduleName, this.entityName, params, providerOptions);
58
+ });
59
+ }
60
+ /**
61
+ * Search all records with automatic pagination
62
+ * @param params - Search parameters
63
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
64
+ */
65
+ searchAllRecordsAndPaginate(params, providerOptions) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params, 0, providerOptions);
68
+ });
69
+ }
70
+ /**
71
+ * Get a single record by primary key
72
+ * @param brskEntityMigrationErrorId - Record ID
73
+ * @param queryOptions - Query options (WHAT: entities to include)
74
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
75
+ *
76
+ * @example
77
+ * // Simple get
78
+ * const record = await db.getByPrimaryKey(id);
79
+ *
80
+ * // With related entities
81
+ * const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
82
+ *
83
+ * // With permissions bypass
84
+ * const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
85
+ *
86
+ * // Both options
87
+ * const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
88
+ */
89
+ getByPrimaryKey(brskEntityMigrationErrorId, queryOptions, providerOptions) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, brskEntityMigrationErrorId, queryOptions, providerOptions);
92
+ if (res)
93
+ this.setRecord(res);
94
+ return res;
95
+ });
96
+ }
97
+ /**
98
+ * Get multiple records by primary keys
99
+ * @param brskEntityMigrationErrorIds - Array of record IDs
100
+ * @param queryOptions - Query options (WHAT: entities to include)
101
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
102
+ */
103
+ getManyByPrimaryKey(brskEntityMigrationErrorIds, queryOptions, providerOptions) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, brskEntityMigrationErrorIds, queryOptions, providerOptions);
106
+ });
107
+ }
108
+ /**
109
+ * Upsert a single record
110
+ * @param upsertDto - Record to upsert
111
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
112
+ */
113
+ upsert(upsertDto, providerOptions) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto], providerOptions);
116
+ return res[0];
117
+ });
118
+ }
119
+ /**
120
+ * Upsert multiple records
121
+ * @param upsertDtos - Records to upsert
122
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
123
+ */
124
+ upsertMany(upsertDtos, providerOptions) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ return yield this._upsert(this.moduleName, this.entityName, upsertDtos, providerOptions);
127
+ });
128
+ }
129
+ /**
130
+ * Update a single record
131
+ * @param updateDto - Record to update
132
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
133
+ */
134
+ update(updateDto, providerOptions) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ const res = yield this._update(this.moduleName, this.entityName, [updateDto], providerOptions);
137
+ return res[0];
138
+ });
139
+ }
140
+ /**
141
+ * Update multiple records
142
+ * @param updateDtos - Records to update
143
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
144
+ */
145
+ updateMany(updateDtos, providerOptions) {
146
+ return __awaiter(this, void 0, void 0, function* () {
147
+ return yield this._update(this.moduleName, this.entityName, updateDtos, providerOptions);
148
+ });
149
+ }
150
+ /**
151
+ * Delete one or many records
152
+ * @param brskEntityMigrationErrorIds - Record IDs to delete
153
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
154
+ */
155
+ delete(brskEntityMigrationErrorIds, providerOptions) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ return yield this._delete(this.moduleName, this.entityName, brskEntityMigrationErrorIds, providerOptions);
158
+ });
159
+ }
160
+ /**
161
+ * Restore one or many deleted records
162
+ * @param brskEntityMigrationErrorIds - Record IDs to restore
163
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
164
+ */
165
+ restore(brskEntityMigrationErrorIds, providerOptions) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ return yield this._restore(this.moduleName, this.entityName, brskEntityMigrationErrorIds, providerOptions);
168
+ });
169
+ }
170
+ /**
171
+ * Apply an action to a record
172
+ * @param actionName - The action key
173
+ * @param dto - The action DTO
174
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
175
+ */
176
+ applyAction(actionName, dto, providerOptions) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ return yield this._applyAction(this.moduleName, this.entityName, dto, providerOptions);
179
+ });
180
+ }
181
+ /**
182
+ * Get version history for the current source record
183
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
184
+ */
185
+ getVersions(providerOptions) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
188
+ });
189
+ }
190
+ /**
191
+ * Get revision timeline for the current source record
192
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
193
+ */
194
+ getRevisionTimeline(providerOptions) {
195
+ return __awaiter(this, void 0, void 0, function* () {
196
+ return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
197
+ });
198
+ }
199
+ }
200
+ exports.BrskEntityMigrationErrorDb = BrskEntityMigrationErrorDb;
@@ -26,12 +26,14 @@ export declare class ReferralDb extends DbProvider {
26
26
  private _affiliatecode?;
27
27
  private _campaign?;
28
28
  private _order?;
29
+ private _reward?;
29
30
  constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
30
31
  get referrerreferrals(): DbRecordLinkManager;
31
32
  get refereereferrals(): DbRecordLinkManager;
32
33
  get affiliatecode(): DbRecordLinkManager;
33
34
  get campaign(): DbRecordLinkManager;
34
35
  get order(): DbRecordLinkManager;
36
+ get reward(): DbRecordLinkManager;
35
37
  setRecord(sourceRecord: any): void;
36
38
  /**
37
39
  * Search records with manual pagination control
@@ -68,6 +68,12 @@ class ReferralDb extends db_provider_1.DbProvider {
68
68
  }
69
69
  return this._order;
70
70
  }
71
+ get reward() {
72
+ if (!this._reward) {
73
+ this._reward = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'CrmModule:Referral', 'CrmModule:Reward', 'OrderReferralCashbackReward');
74
+ }
75
+ return this._reward;
76
+ }
71
77
  // ============================================
72
78
  // STANDARD METHODS
73
79
  // ============================================
@@ -25,11 +25,13 @@ export declare class RewardDb extends DbProvider {
25
25
  private _contact?;
26
26
  private _affiliatecode?;
27
27
  private _paymentmethodrefund?;
28
+ private _referral?;
28
29
  constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
29
30
  get campaign(): DbRecordLinkManager;
30
31
  get contact(): DbRecordLinkManager;
31
32
  get affiliatecode(): DbRecordLinkManager;
32
33
  get paymentmethodrefund(): DbRecordLinkManager;
34
+ get referral(): DbRecordLinkManager;
33
35
  setRecord(sourceRecord: any): void;
34
36
  /**
35
37
  * Search records with manual pagination control
@@ -62,6 +62,12 @@ class RewardDb extends db_provider_1.DbProvider {
62
62
  }
63
63
  return this._paymentmethodrefund;
64
64
  }
65
+ get referral() {
66
+ if (!this._referral) {
67
+ this._referral = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'CrmModule:Reward', 'CrmModule:Referral', 'OrderReferralCashbackReward');
68
+ }
69
+ return this._referral;
70
+ }
65
71
  // ============================================
66
72
  // STANDARD METHODS
67
73
  // ============================================
@@ -20,19 +20,100 @@ export declare enum AccountCreditEntityTypes {
20
20
  /** This is the default record type */
21
21
  DEFAULT = "DEFAULT"
22
22
  }
23
+ /**
24
+ * Pipeline stage names for DEFAULT AccountCredit
25
+ * Pipeline: Account Credit
26
+ * Account credit fulfillment pipeline
27
+ */
28
+ export declare enum DefaultAccountCreditStageNames {
29
+ /** Pending stage for newly created (unused) account credit (default) */
30
+ Pending = "Pending",
31
+ /** Account credit has been partially used by the customer and is still available */
32
+ InProgress = "In Progress",
33
+ /** The customer has successfully used the full account credit */
34
+ Complete = "Complete",
35
+ /** The account credit has been cancelled (fail) */
36
+ Cancelled = "Cancelled",
37
+ /** The account credit has been voided */
38
+ Void = "Void"
39
+ }
40
+ /**
41
+ * Pipeline stage keys for DEFAULT AccountCredit
42
+ * Use these keys when transitioning between stages
43
+ */
44
+ export declare enum DefaultAccountCreditStageKeys {
45
+ /** Pending stage for newly created (unused) account credit */
46
+ AccountCreditStagePending = "AccountCreditStagePending",
47
+ /** Account credit has been partially used by the customer and is still available */
48
+ AccountCreditStageInProgress = "AccountCreditStageInProgress",
49
+ /** The customer has successfully used the full account credit */
50
+ AccountCreditStageComplete = "AccountCreditStageComplete",
51
+ /** The account credit has been cancelled */
52
+ AccountCreditStageCancelled = "AccountCreditStageCancelled",
53
+ /** The account credit has been voided */
54
+ AccountCreditStageVoid = "AccountCreditStageVoid"
55
+ }
23
56
  /**
24
57
  * Valid values for AccountCredit.Source
25
58
  *
26
59
  * Source
60
+ *
61
+ * @remarks Available options:
62
+ * - `ACCOUNTS` - Accounts
63
+ * - `COMPLAINTS` - Complaints
64
+ * - `RETENTIONS` - Retentions
65
+ * - `SALES` - Sales
66
+ * - `SUPPORT` - Support
67
+ * - `SYSTEM` - System
27
68
  */
28
69
  export declare enum AccountCreditSource {
70
+ ACCOUNTS = "ACCOUNTS",
71
+ COMPLAINTS = "COMPLAINTS",
72
+ RETENTIONS = "RETENTIONS",
73
+ SALES = "SALES",
74
+ SUPPORT = "SUPPORT",
75
+ SYSTEM = "SYSTEM"
29
76
  }
30
77
  /**
31
78
  * Valid values for AccountCredit.Reason
32
79
  *
33
80
  * Reason
81
+ *
82
+ * @remarks Available options:
83
+ * - `FOURTEEN_DAY_TERMINATION_CREDIT` - 14-Day Termination Credit
84
+ * - `BAD_DEBT_CREDIT` - Bad Debt Credit
85
+ * - `BILLING_DAY_CHANGE_CREDIT` - Billing Day Change Credit
86
+ * - `COMPLAINTS_CREDIT` - Complaints Credit
87
+ * - `DOWNTIME_CREDIT` - Downtime Credit
88
+ * - `IN_CONTRACT_BUYOUT` - In Contract Buyout
89
+ * - `INCORRECTLY_BILLED` - Incorrectly Billed
90
+ * - `MANUAL_CREDIT` - Manual Credit
91
+ * - `MOVE_ORDER_CREDIT` - Move Order Credit
92
+ * - `RENEWALS_CREDIT` - Renewals Credit
93
+ * - `RETENTIONS_CREDIT` - Retentions Credit
94
+ * - `REWARD_CORRECTION_CREDIT` - Reward Correction Credit
95
+ * - `SALES_CREDIT` - Sales Credit
96
+ * - `SUPPORT_CREDIT` - Support Credit
97
+ * - `SUSPENSION_CREDIT` - Suspension Credit
98
+ * - ... and 2 more
34
99
  */
35
100
  export declare enum AccountCreditReason {
101
+ BAD_DEBT_CREDIT = "BAD_DEBT_CREDIT",
102
+ BILLING_DAY_CHANGE_CREDIT = "BILLING_DAY_CHANGE_CREDIT",
103
+ COMPLAINTS_CREDIT = "COMPLAINTS_CREDIT",
104
+ DOWNTIME_CREDIT = "DOWNTIME_CREDIT",
105
+ IN_CONTRACT_BUYOUT = "IN_CONTRACT_BUYOUT",
106
+ INCORRECTLY_BILLED = "INCORRECTLY_BILLED",
107
+ MANUAL_CREDIT = "MANUAL_CREDIT",
108
+ MOVE_ORDER_CREDIT = "MOVE_ORDER_CREDIT",
109
+ RENEWALS_CREDIT = "RENEWALS_CREDIT",
110
+ RETENTIONS_CREDIT = "RETENTIONS_CREDIT",
111
+ REWARD_CORRECTION_CREDIT = "REWARD_CORRECTION_CREDIT",
112
+ SALES_CREDIT = "SALES_CREDIT",
113
+ SUPPORT_CREDIT = "SUPPORT_CREDIT",
114
+ SUSPENSION_CREDIT = "SUSPENSION_CREDIT",
115
+ UNSPECIFIED = "UNSPECIFIED",
116
+ WINBACK_CAMPAIGN = "WINBACK_CAMPAIGN"
36
117
  }
37
118
  /**
38
119
  * Property keys for AccountCredit
@@ -41,10 +122,10 @@ export declare enum AccountCreditReason {
41
122
  export declare enum AccountCreditPropertyKeys {
42
123
  /** Source */
43
124
  Source = "Source",
44
- /** Reason */
45
- Reason = "Reason",
46
125
  /** Description */
47
126
  Description = "Description",
127
+ /** Reason */
128
+ Reason = "Reason",
48
129
  /** Contact */
49
130
  Contact = "Contact",
50
131
  /** Credit Balance */
@@ -61,18 +142,20 @@ export interface AccountCreditProperties {
61
142
  /** Source
62
143
  *
63
144
  * @type {ENUM}
145
+ * @enum {AccountCreditSource}
64
146
  */
65
147
  Source: AccountCreditSource;
66
- /** Reason
67
- *
68
- * @type {ENUM}
69
- */
70
- Reason: AccountCreditReason;
71
148
  /** Description
72
149
  *
73
150
  * @type {TEXT}
74
151
  */
75
152
  Description: string;
153
+ /** Reason
154
+ *
155
+ * @type {ENUM}
156
+ * @enum {AccountCreditReason}
157
+ */
158
+ Reason: AccountCreditReason;
76
159
  /** Contact
77
160
  *
78
161
  * @type {LOOKUP}
@@ -12,7 +12,7 @@
12
12
  * Generated from Odin schema definition
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_CREATED = exports.AccountCredit = exports.AccountCreditPropertyKeys = exports.AccountCreditReason = exports.AccountCreditSource = exports.AccountCreditEntityTypes = void 0;
15
+ exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_CREATED = exports.AccountCredit = exports.AccountCreditPropertyKeys = exports.AccountCreditReason = exports.AccountCreditSource = exports.DefaultAccountCreditStageKeys = exports.DefaultAccountCreditStageNames = exports.AccountCreditEntityTypes = void 0;
16
16
  const core_1 = require("@d19n/odin-types/dist/core");
17
17
  /**
18
18
  * Available types for AccountCredit records
@@ -22,21 +22,104 @@ var AccountCreditEntityTypes;
22
22
  /** This is the default record type */
23
23
  AccountCreditEntityTypes["DEFAULT"] = "DEFAULT";
24
24
  })(AccountCreditEntityTypes = exports.AccountCreditEntityTypes || (exports.AccountCreditEntityTypes = {}));
25
+ /**
26
+ * Pipeline stage names for DEFAULT AccountCredit
27
+ * Pipeline: Account Credit
28
+ * Account credit fulfillment pipeline
29
+ */
30
+ var DefaultAccountCreditStageNames;
31
+ (function (DefaultAccountCreditStageNames) {
32
+ /** Pending stage for newly created (unused) account credit (default) */
33
+ DefaultAccountCreditStageNames["Pending"] = "Pending";
34
+ /** Account credit has been partially used by the customer and is still available */
35
+ DefaultAccountCreditStageNames["InProgress"] = "In Progress";
36
+ /** The customer has successfully used the full account credit */
37
+ DefaultAccountCreditStageNames["Complete"] = "Complete";
38
+ /** The account credit has been cancelled (fail) */
39
+ DefaultAccountCreditStageNames["Cancelled"] = "Cancelled";
40
+ /** The account credit has been voided */
41
+ DefaultAccountCreditStageNames["Void"] = "Void";
42
+ })(DefaultAccountCreditStageNames = exports.DefaultAccountCreditStageNames || (exports.DefaultAccountCreditStageNames = {}));
43
+ /**
44
+ * Pipeline stage keys for DEFAULT AccountCredit
45
+ * Use these keys when transitioning between stages
46
+ */
47
+ var DefaultAccountCreditStageKeys;
48
+ (function (DefaultAccountCreditStageKeys) {
49
+ /** Pending stage for newly created (unused) account credit */
50
+ DefaultAccountCreditStageKeys["AccountCreditStagePending"] = "AccountCreditStagePending";
51
+ /** Account credit has been partially used by the customer and is still available */
52
+ DefaultAccountCreditStageKeys["AccountCreditStageInProgress"] = "AccountCreditStageInProgress";
53
+ /** The customer has successfully used the full account credit */
54
+ DefaultAccountCreditStageKeys["AccountCreditStageComplete"] = "AccountCreditStageComplete";
55
+ /** The account credit has been cancelled */
56
+ DefaultAccountCreditStageKeys["AccountCreditStageCancelled"] = "AccountCreditStageCancelled";
57
+ /** The account credit has been voided */
58
+ DefaultAccountCreditStageKeys["AccountCreditStageVoid"] = "AccountCreditStageVoid";
59
+ })(DefaultAccountCreditStageKeys = exports.DefaultAccountCreditStageKeys || (exports.DefaultAccountCreditStageKeys = {}));
25
60
  /**
26
61
  * Valid values for AccountCredit.Source
27
62
  *
28
63
  * Source
64
+ *
65
+ * @remarks Available options:
66
+ * - `ACCOUNTS` - Accounts
67
+ * - `COMPLAINTS` - Complaints
68
+ * - `RETENTIONS` - Retentions
69
+ * - `SALES` - Sales
70
+ * - `SUPPORT` - Support
71
+ * - `SYSTEM` - System
29
72
  */
30
73
  var AccountCreditSource;
31
74
  (function (AccountCreditSource) {
75
+ AccountCreditSource["ACCOUNTS"] = "ACCOUNTS";
76
+ AccountCreditSource["COMPLAINTS"] = "COMPLAINTS";
77
+ AccountCreditSource["RETENTIONS"] = "RETENTIONS";
78
+ AccountCreditSource["SALES"] = "SALES";
79
+ AccountCreditSource["SUPPORT"] = "SUPPORT";
80
+ AccountCreditSource["SYSTEM"] = "SYSTEM";
32
81
  })(AccountCreditSource = exports.AccountCreditSource || (exports.AccountCreditSource = {}));
33
82
  /**
34
83
  * Valid values for AccountCredit.Reason
35
84
  *
36
85
  * Reason
86
+ *
87
+ * @remarks Available options:
88
+ * - `FOURTEEN_DAY_TERMINATION_CREDIT` - 14-Day Termination Credit
89
+ * - `BAD_DEBT_CREDIT` - Bad Debt Credit
90
+ * - `BILLING_DAY_CHANGE_CREDIT` - Billing Day Change Credit
91
+ * - `COMPLAINTS_CREDIT` - Complaints Credit
92
+ * - `DOWNTIME_CREDIT` - Downtime Credit
93
+ * - `IN_CONTRACT_BUYOUT` - In Contract Buyout
94
+ * - `INCORRECTLY_BILLED` - Incorrectly Billed
95
+ * - `MANUAL_CREDIT` - Manual Credit
96
+ * - `MOVE_ORDER_CREDIT` - Move Order Credit
97
+ * - `RENEWALS_CREDIT` - Renewals Credit
98
+ * - `RETENTIONS_CREDIT` - Retentions Credit
99
+ * - `REWARD_CORRECTION_CREDIT` - Reward Correction Credit
100
+ * - `SALES_CREDIT` - Sales Credit
101
+ * - `SUPPORT_CREDIT` - Support Credit
102
+ * - `SUSPENSION_CREDIT` - Suspension Credit
103
+ * - ... and 2 more
37
104
  */
38
105
  var AccountCreditReason;
39
106
  (function (AccountCreditReason) {
107
+ AccountCreditReason["BAD_DEBT_CREDIT"] = "BAD_DEBT_CREDIT";
108
+ AccountCreditReason["BILLING_DAY_CHANGE_CREDIT"] = "BILLING_DAY_CHANGE_CREDIT";
109
+ AccountCreditReason["COMPLAINTS_CREDIT"] = "COMPLAINTS_CREDIT";
110
+ AccountCreditReason["DOWNTIME_CREDIT"] = "DOWNTIME_CREDIT";
111
+ AccountCreditReason["IN_CONTRACT_BUYOUT"] = "IN_CONTRACT_BUYOUT";
112
+ AccountCreditReason["INCORRECTLY_BILLED"] = "INCORRECTLY_BILLED";
113
+ AccountCreditReason["MANUAL_CREDIT"] = "MANUAL_CREDIT";
114
+ AccountCreditReason["MOVE_ORDER_CREDIT"] = "MOVE_ORDER_CREDIT";
115
+ AccountCreditReason["RENEWALS_CREDIT"] = "RENEWALS_CREDIT";
116
+ AccountCreditReason["RETENTIONS_CREDIT"] = "RETENTIONS_CREDIT";
117
+ AccountCreditReason["REWARD_CORRECTION_CREDIT"] = "REWARD_CORRECTION_CREDIT";
118
+ AccountCreditReason["SALES_CREDIT"] = "SALES_CREDIT";
119
+ AccountCreditReason["SUPPORT_CREDIT"] = "SUPPORT_CREDIT";
120
+ AccountCreditReason["SUSPENSION_CREDIT"] = "SUSPENSION_CREDIT";
121
+ AccountCreditReason["UNSPECIFIED"] = "UNSPECIFIED";
122
+ AccountCreditReason["WINBACK_CAMPAIGN"] = "WINBACK_CAMPAIGN";
40
123
  })(AccountCreditReason = exports.AccountCreditReason || (exports.AccountCreditReason = {}));
41
124
  /**
42
125
  * Property keys for AccountCredit
@@ -46,10 +129,10 @@ var AccountCreditPropertyKeys;
46
129
  (function (AccountCreditPropertyKeys) {
47
130
  /** Source */
48
131
  AccountCreditPropertyKeys["Source"] = "Source";
49
- /** Reason */
50
- AccountCreditPropertyKeys["Reason"] = "Reason";
51
132
  /** Description */
52
133
  AccountCreditPropertyKeys["Description"] = "Description";
134
+ /** Reason */
135
+ AccountCreditPropertyKeys["Reason"] = "Reason";
53
136
  /** Contact */
54
137
  AccountCreditPropertyKeys["Contact"] = "Contact";
55
138
  /** Credit Balance */
@@ -0,0 +1,107 @@
1
+ /**
2
+ * BrskEntityMigrationError Entity Definition
3
+ *
4
+ * Stores Brsk Migration Entity Errors
5
+ *
6
+ * @module AuditModule
7
+ * @entity BrskEntityMigrationError
8
+ * @schemaId 69628645-fa51-46c7-bca4-5b2439eab892
9
+ *
10
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
11
+ * Generated from Odin schema definition
12
+ */
13
+ import { OdinRecord } from '@d19n/odin-types/dist/core';
14
+ /**
15
+ * Available types for BrskEntityMigrationError records
16
+ */
17
+ export declare enum BrskEntityMigrationErrorEntityTypes {
18
+ /** This is the default record type */
19
+ DEFAULT = "DEFAULT"
20
+ }
21
+ /**
22
+ * Property keys for BrskEntityMigrationError
23
+ * Use these constants instead of string literals for type safety
24
+ */
25
+ export declare enum BrskEntityMigrationErrorPropertyKeys {
26
+ /** Brsk Reference */
27
+ BrskReference = "BrskReference",
28
+ /** Json object */
29
+ JsonObject = "JSONObject",
30
+ /** Sync Script Name */
31
+ SyncScript = "SyncScript",
32
+ /** Resolved */
33
+ Resolved = "Resolved",
34
+ /** Error Message */
35
+ ErrorMessage = "ErrorMessage",
36
+ /** Target Entity */
37
+ TargetEntity = "TargetEntity"
38
+ }
39
+ /**
40
+ * Properties for BrskEntityMigrationError records
41
+ *
42
+ * @see AuditModule:BrskEntityMigrationError
43
+ */
44
+ export interface BrskEntityMigrationErrorProperties {
45
+ /** Brsk Reference
46
+ *
47
+ * @type {TEXT}
48
+ */
49
+ BrskReference: string;
50
+ /** Json object
51
+ *
52
+ * @type {JSON}
53
+ */
54
+ JsonObject: string;
55
+ /** Sync Script Name
56
+ *
57
+ * @type {TEXT}
58
+ */
59
+ SyncScript: string;
60
+ /** Resolved
61
+ *
62
+ * @type {BOOLEAN}
63
+ */
64
+ Resolved: boolean;
65
+ /** Error Message
66
+ *
67
+ * @type {TEXT}
68
+ */
69
+ ErrorMessage: string;
70
+ /** Target Entity
71
+ *
72
+ * @type {TEXT}
73
+ */
74
+ TargetEntity: string;
75
+ }
76
+ /**
77
+ * BrskEntityMigrationError entity from AuditModule
78
+ *
79
+ * Stores Brsk Migration Entity Errors
80
+ *
81
+ * @module AuditModule
82
+ * @entity BrskEntityMigrationError
83
+ * @schemaId 69628645-fa51-46c7-bca4-5b2439eab892
84
+ * @capabilities searchable, updateable, undeletable, triggerable
85
+ */
86
+ export declare class BrskEntityMigrationError extends OdinRecord<BrskEntityMigrationErrorProperties> {
87
+ entity: 'AuditModule:BrskEntityMigrationError';
88
+ type: BrskEntityMigrationErrorEntityTypes;
89
+ schemaId: '69628645-fa51-46c7-bca4-5b2439eab892';
90
+ properties: BrskEntityMigrationErrorProperties;
91
+ }
92
+ /**
93
+ * RabbitMQ routing keys for BrskEntityMigrationError events
94
+ */
95
+ export declare const ROUTING_KEY_BRSK_ENTITY_MIGRATION_ERROR_CREATED = "AuditModule.BrskEntityMigrationError.SubDbRecordCreated";
96
+ export declare const ROUTING_KEY_BRSK_ENTITY_MIGRATION_ERROR_UPDATED = "AuditModule.BrskEntityMigrationError.SubDbRecordUpdated";
97
+ export declare const ROUTING_KEY_BRSK_ENTITY_MIGRATION_ERROR_DELETED = "AuditModule.BrskEntityMigrationError.SubDbRecordDeleted";
98
+ /**
99
+ * Type-specific routing keys for BrskEntityMigrationError events
100
+ * Subscribe to these for events on specific entity types only
101
+ */
102
+ /** This is the default record type created */
103
+ export declare const ROUTING_KEY_BRSK_ENTITY_MIGRATION_ERROR_DEFAULT_CREATED = "AuditModule.BrskEntityMigrationError.DEFAULT.SubDbRecordCreated";
104
+ /** This is the default record type updated */
105
+ export declare const ROUTING_KEY_BRSK_ENTITY_MIGRATION_ERROR_DEFAULT_UPDATED = "AuditModule.BrskEntityMigrationError.DEFAULT.SubDbRecordUpdated";
106
+ /** This is the default record type deleted */
107
+ export declare const ROUTING_KEY_BRSK_ENTITY_MIGRATION_ERROR_DEFAULT_DELETED = "AuditModule.BrskEntityMigrationError.DEFAULT.SubDbRecordDeleted";