@d19n/youfibre-odin-sdk 2.0.1 → 2.0.2-beta.1

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 (31) hide show
  1. package/README.md +2 -1
  2. package/dist/actions-v2/AssignCaseDto.d.ts +5 -13
  3. package/dist/actions-v2/AssignCaseWithNoteFlowDto.d.ts +5 -13
  4. package/dist/actions-v2/CreateAuddisPgSubmissionAllocationDto.d.ts +8 -1
  5. package/dist/actions-v2/CreateBacsPgSubmissionAllocationDto.d.ts +11 -4
  6. package/dist/actions-v2/CreateCaseFromContactDto.d.ts +5 -13
  7. package/dist/actions-v2/CreateCashbackRewardForOrderReferralDto.d.ts +208 -0
  8. package/dist/actions-v2/CreateCashbackRewardForOrderReferralDto.js +179 -0
  9. package/dist/actions-v2/UpdateTeamDto.d.ts +15 -1
  10. package/dist/api-sdk-v2/ReferralApi.d.ts +2 -0
  11. package/dist/api-sdk-v2/ReferralApi.js +6 -0
  12. package/dist/api-sdk-v2/RewardApi.d.ts +2 -0
  13. package/dist/api-sdk-v2/RewardApi.js +6 -0
  14. package/dist/db-sdk-v2/ReferralDb.d.ts +2 -0
  15. package/dist/db-sdk-v2/ReferralDb.js +6 -0
  16. package/dist/db-sdk-v2/RewardDb.d.ts +2 -0
  17. package/dist/db-sdk-v2/RewardDb.js +6 -0
  18. package/dist/entities-v2/AccountCredit.d.ts +90 -7
  19. package/dist/entities-v2/AccountCredit.js +86 -3
  20. package/dist/entities-v2/Referral.d.ts +7 -0
  21. package/dist/entities-v2/Referral.js +5 -1
  22. package/dist/entities-v2/Reward.d.ts +3 -12
  23. package/dist/entities-v2/Reward.js +0 -2
  24. package/dist/entities-v2/Team.d.ts +21 -0
  25. package/dist/entities-v2/Team.js +17 -1
  26. package/dist/records-v2/ContactRecord.js +2 -0
  27. package/dist/records-v2/ReferralRecord.d.ts +20 -0
  28. package/dist/records-v2/ReferralRecord.js +33 -0
  29. package/dist/records-v2/RewardRecord.d.ts +49 -0
  30. package/dist/records-v2/RewardRecord.js +60 -0
  31. package/package.json +1 -1
package/README.md CHANGED
@@ -351,7 +351,7 @@ This SDK includes **163** entities across **12** modules.
351
351
 
352
352
  ## Actions
353
353
 
354
- This SDK includes **553** actions.
354
+ This SDK includes **554** actions.
355
355
 
356
356
  ### Action Types
357
357
 
@@ -1104,6 +1104,7 @@ This SDK includes **553** actions.
1104
1104
  | Action | Type | Event |
1105
1105
  |--------|------|-------|
1106
1106
  | `CreateCashbackReward` | CREATE | k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackReward |
1107
+ | `CreateCashbackRewardForOrderReferral` | CREATE | k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral |
1107
1108
  | `MoveCashbackRewardToAwarded` | STAGE_TRANSITION | k1.t-hEOJjsDb.CrmModule.Reward.Transition.MoveCashbackRewardToAwarded |
1108
1109
  | `MoveCashbackRewardToFailed` | STAGE_TRANSITION | k1.t-hEOJjsDb.CrmModule.Reward.Transition.MoveCashbackRewardToFailed |
1109
1110
 
@@ -23,17 +23,9 @@ export interface AssignCaseMessage extends OdinRecordUpdatedEvent<AssignCaseDto,
23
23
  * Properties for AssignCase action
24
24
  *
25
25
  * @property Required fields: 0
26
- * @property Optional fields: 3
26
+ * @property Optional fields: 2
27
27
  */
28
28
  export interface AssignCaseProperties {
29
- /**
30
- * Team
31
- *
32
- * Reference identifier for Case relationships. Used for data integrity.
33
- * @type {LOOKUP}
34
- * @visibleWhen Channel = ["CALL","CUSTOMER_PORTAL","CUSTOMER_APP","EMAIL","FACEBOOK_MESSENGER","IN_APP_CHAT","INSTAGRAM_DM","SMS","TLOS_APP","TLOS_PORTAL","TRUSTPILOT_SERVICE_REVIEW","WEB_CHAT","WEB_FORM_BUSINESS","WHATSAPP"]
35
- */
36
- TeamId?: string | null;
37
29
  /**
38
30
  * Owner
39
31
  *
@@ -42,12 +34,12 @@ export interface AssignCaseProperties {
42
34
  */
43
35
  OwnerId?: string | null;
44
36
  /**
45
- * Channel
37
+ * Team
46
38
  *
47
- * the channel from the source (Customer Service - Case)
48
- * @type {ENUM}
39
+ * Reference identifier for Case relationships. Used for data integrity.
40
+ * @type {LOOKUP}
49
41
  */
50
- Channel?: string | null;
42
+ TeamId?: string | null;
51
43
  }
52
44
  /**
53
45
  * Assign Owner
@@ -16,17 +16,9 @@ import { OdinRecord, OdinRecordCreateDto, OdinRecordUpdateDto, OdinRecordUpdated
16
16
  * Properties for AssignCase action
17
17
  *
18
18
  * @property Required fields: 0
19
- * @property Optional fields: 3
19
+ * @property Optional fields: 2
20
20
  */
21
21
  export interface AssignCaseProperties {
22
- /**
23
- * Team
24
- *
25
- * Reference identifier for Case relationships. Used for data integrity.
26
- * @type {LOOKUP}
27
- * @visibleWhen Channel = ["CALL","CUSTOMER_PORTAL","CUSTOMER_APP","EMAIL","FACEBOOK_MESSENGER","IN_APP_CHAT","INSTAGRAM_DM","SMS","TLOS_APP","TLOS_PORTAL","TRUSTPILOT_SERVICE_REVIEW","WEB_CHAT","WEB_FORM_BUSINESS","WHATSAPP"]
28
- */
29
- TeamId?: string | null;
30
22
  /**
31
23
  * Owner
32
24
  *
@@ -35,12 +27,12 @@ export interface AssignCaseProperties {
35
27
  */
36
28
  OwnerId?: string | null;
37
29
  /**
38
- * Channel
30
+ * Team
39
31
  *
40
- * the channel from the source (Customer Service - Case)
41
- * @type {ENUM}
32
+ * Reference identifier for Case relationships. Used for data integrity.
33
+ * @type {LOOKUP}
42
34
  */
43
- Channel?: string | null;
35
+ TeamId?: string | null;
44
36
  }
45
37
  /**
46
38
  * Assign Owner
@@ -23,7 +23,7 @@ export interface CreateAuddisPgSubmissionAllocationMessage extends OdinRecordCre
23
23
  * Properties for CreateAuddisPgSubmissionAllocation action
24
24
  *
25
25
  * @property Required fields: 2
26
- * @property Optional fields: 0
26
+ * @property Optional fields: 1
27
27
  */
28
28
  export interface CreateAuddisPgSubmissionAllocationProperties {
29
29
  /**
@@ -42,6 +42,13 @@ export interface CreateAuddisPgSubmissionAllocationProperties {
42
42
  * @required
43
43
  */
44
44
  PaymentMethod: string;
45
+ /**
46
+ * SubmissionFileLineNumber
47
+ *
48
+ * Submission File Line Number
49
+ * @type {NUMBER}
50
+ */
51
+ SubmissionFileLineNumber?: number | null;
45
52
  }
46
53
  /**
47
54
  * CreateAuddisPgSubmissionAllocation
@@ -23,7 +23,7 @@ export interface CreateBacsPgSubmissionAllocationMessage extends OdinRecordCreat
23
23
  * Properties for CreateBacsPgSubmissionAllocation action
24
24
  *
25
25
  * @property Required fields: 2
26
- * @property Optional fields: 0
26
+ * @property Optional fields: 1
27
27
  */
28
28
  export interface CreateBacsPgSubmissionAllocationProperties {
29
29
  /**
@@ -35,13 +35,20 @@ export interface CreateBacsPgSubmissionAllocationProperties {
35
35
  */
36
36
  SubmissionFile: string;
37
37
  /**
38
- * Transaction
38
+ * PaymentMethod
39
39
  *
40
- * Transaction
40
+ * PaymentMethod
41
41
  * @type {LOOKUP}
42
42
  * @required
43
43
  */
44
- Transaction: string;
44
+ PaymentMethod: string;
45
+ /**
46
+ * SubmissionFileLineNumber
47
+ *
48
+ * Submission File Line Number
49
+ * @type {NUMBER}
50
+ */
51
+ SubmissionFileLineNumber?: number | null;
45
52
  }
46
53
  /**
47
54
  * CreateBacsPgSubmissionAllocation
@@ -90,17 +90,9 @@ export declare class CreateCaseDto extends OdinRecordCreateDto<CreateCasePropert
90
90
  * Properties for AssignCase action
91
91
  *
92
92
  * @property Required fields: 0
93
- * @property Optional fields: 3
93
+ * @property Optional fields: 2
94
94
  */
95
95
  export interface AssignCaseProperties {
96
- /**
97
- * Team
98
- *
99
- * Reference identifier for Case relationships. Used for data integrity.
100
- * @type {LOOKUP}
101
- * @visibleWhen Channel = ["CALL","CUSTOMER_PORTAL","CUSTOMER_APP","EMAIL","FACEBOOK_MESSENGER","IN_APP_CHAT","INSTAGRAM_DM","SMS","TLOS_APP","TLOS_PORTAL","TRUSTPILOT_SERVICE_REVIEW","WEB_CHAT","WEB_FORM_BUSINESS","WHATSAPP"]
102
- */
103
- TeamId?: string | null;
104
96
  /**
105
97
  * Owner
106
98
  *
@@ -109,12 +101,12 @@ export interface AssignCaseProperties {
109
101
  */
110
102
  OwnerId?: string | null;
111
103
  /**
112
- * Channel
104
+ * Team
113
105
  *
114
- * the channel from the source (Customer Service - Case)
115
- * @type {ENUM}
106
+ * Reference identifier for Case relationships. Used for data integrity.
107
+ * @type {LOOKUP}
116
108
  */
117
- Channel?: string | null;
109
+ TeamId?: string | null;
118
110
  }
119
111
  /**
120
112
  * Assign Owner
@@ -0,0 +1,208 @@
1
+ /**
2
+ * CreateCashbackRewardForOrderReferral Action DTO
3
+ *
4
+ * Creates a cashback reward linked to an order referral
5
+ *
6
+ * @module CrmModule
7
+ * @entity Reward
8
+ * @entityType CASHBACK
9
+ * @actionKey CreateCashbackRewardForOrderReferral
10
+ * @event k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ import { OdinRecord, OdinRecordCreateDto, OdinRecordCreatedEvent, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
15
+ /**
16
+ * RabbitMQ message payload for CreateCashbackRewardForOrderReferral created events
17
+ *
18
+ * @event k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral
19
+ */
20
+ export interface CreateCashbackRewardForOrderReferralMessage extends OdinRecordCreatedEvent<CreateCashbackRewardForOrderReferralDto, CreateCashbackRewardForOrderReferralProperties> {
21
+ }
22
+ /**
23
+ * Properties for CreateCashbackRewardForOrderReferral action
24
+ *
25
+ * @property Required fields: 5
26
+ * @property Optional fields: 0
27
+ */
28
+ export interface CreateCashbackRewardForOrderReferralProperties {
29
+ /**
30
+ * Contact Id
31
+ *
32
+ * Contact receiving the reward
33
+ * @type {LOOKUP}
34
+ * @required
35
+ */
36
+ ContactId: string;
37
+ /**
38
+ * Campaign Id
39
+ *
40
+ * Campaign this reward belongs to
41
+ * @type {LOOKUP}
42
+ * @required
43
+ */
44
+ CampaignId: string;
45
+ /**
46
+ * Amount
47
+ *
48
+ * Reward amount value
49
+ * @type {NUMBER}
50
+ * @required
51
+ */
52
+ Amount: number;
53
+ /**
54
+ * Currency
55
+ *
56
+ * Currency of the rewarded amount
57
+ * @type {TEXT}
58
+ * @required
59
+ */
60
+ Currency: string;
61
+ /**
62
+ * Affiliate Code Id
63
+ *
64
+ * Affiliate code that generated this reward
65
+ * @type {LOOKUP}
66
+ * @required
67
+ */
68
+ AffiliateCodeId: string;
69
+ }
70
+ /**
71
+ * Builder for CreateCashbackRewardForOrderReferral action
72
+ *
73
+ * Provides fluent API for adding associations before executing the action.
74
+ * Use .link*() methods to add associations, then call .execute() to run.
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * await record.createCashbackRewardForOrderReferral({ ...properties })
79
+ * .linkAssociation_1771346771888({ id: '...', entity: '...' })
80
+ * .execute();
81
+ * ```
82
+ */
83
+ export declare class CreateCashbackRewardForOrderReferralBuilder {
84
+ private _associations;
85
+ private _properties;
86
+ private _pendingLinks;
87
+ private _options?;
88
+ private _provider?;
89
+ private _moduleName?;
90
+ private _entityName?;
91
+ private _clearPendingLinks?;
92
+ private _externalId?;
93
+ private _externalAppId?;
94
+ private _groups?;
95
+ constructor(properties: CreateCashbackRewardForOrderReferralProperties, pendingLinks: OdinRecordLinkDto[], options?: {
96
+ journeyId?: string;
97
+ stageKey?: string;
98
+ });
99
+ /**
100
+ * Link OrderReferralCashbackReward
101
+ * @schemaAssociationId 16b487c1-7b5a-4232-a13a-c9678283ebc7
102
+ * @required
103
+ * @param target - The record to link
104
+ * @returns this (for method chaining)
105
+ */
106
+ linkAssociation_1771346771888(target: OdinRecord<any> | {
107
+ id: string;
108
+ entity: string;
109
+ }): this;
110
+ /**
111
+ * Set an external system identifier for this record.
112
+ * Links the record to a corresponding entry in an external application.
113
+ * @param externalId - The ID in the external system
114
+ * @param externalAppId - The external application identifier
115
+ * @returns this (for chaining)
116
+ */
117
+ withExternalId(externalId: string, externalAppId: string): this;
118
+ /**
119
+ * Set security/access groups for this record.
120
+ * @param groups - Array of group names
121
+ * @returns this (for chaining)
122
+ */
123
+ withGroups(groups: string[]): this;
124
+ /**
125
+ * Get the action payload without executing
126
+ * @returns The action data that would be sent
127
+ */
128
+ getData(): {
129
+ entity: string;
130
+ type: string | undefined;
131
+ actionName: string;
132
+ properties: CreateCashbackRewardForOrderReferralProperties;
133
+ associations?: OdinRecordLinkDto[];
134
+ journeyId?: string;
135
+ stageKey?: string;
136
+ externalId?: string;
137
+ externalAppId?: string;
138
+ groups?: string[];
139
+ };
140
+ /**
141
+ * Inject execution context (called by record wrapper)
142
+ * @internal
143
+ */
144
+ withProvider(provider: {
145
+ _applyAction(moduleName: string, entityName: string, payload: any): Promise<any>;
146
+ }, moduleName: string, entityName: string, clearPendingLinks: () => void): this;
147
+ /**
148
+ * Execute the action
149
+ * @returns The result from the API
150
+ * @throws Error if withProvider() has not been called
151
+ */
152
+ execute(): Promise<any>;
153
+ /**
154
+ * Returns the request payload without executing (for debugging)
155
+ * @returns The request payload that would be sent to the API
156
+ */
157
+ dryRun(): Record<string, any>;
158
+ /**
159
+ * Prevents accidental `await builder` without .execute()
160
+ * @throws Error always - use .execute() or .dryRun() instead
161
+ */
162
+ then(): never;
163
+ }
164
+ /**
165
+ * CreateCashbackRewardForOrderReferral
166
+ *
167
+ * Creates a cashback reward linked to an order referral
168
+ *
169
+ * @actionType CREATE - Creates a new Reward record
170
+ * @module CrmModule
171
+ * @entity Reward
172
+ * @entityType CASHBACK (CASHBACK)
173
+ * @event k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral
174
+ * @permission schema.action.createcashbackrewardfororderreferral.trigger
175
+ * @benchmark This action is tracked for performance benchmarks
176
+ */
177
+ export declare class CreateCashbackRewardForOrderReferralDto extends OdinRecordCreateDto<CreateCashbackRewardForOrderReferralProperties> {
178
+ /** Used by SDK generators to identify action type */
179
+ static readonly ACTION_TYPE = "CREATE";
180
+ static readonly ACTION_KEY = "CreateCashbackRewardForOrderReferral";
181
+ static readonly MODULE_NAME = "CrmModule";
182
+ static readonly ENTITIES: string[];
183
+ static readonly ENTITY_TYPE = "CASHBACK";
184
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral";
185
+ static readonly PERMISSION = "schema.action.createcashbackrewardfororderreferral.trigger";
186
+ /** Step metadata - entity this action targets */
187
+ static readonly STEP_ENTITY = "CrmModule:Reward";
188
+ static readonly STEP_SCHEMA_ID = "5047247a-31ca-4a1c-aa06-c27fefbb543d";
189
+ static readonly STEP_SCHEMA_ACTION_ID = "52302b68-1b1d-40ef-a64c-fefbd96420b2";
190
+ static readonly STEP_SCHEMA_TYPE_ID = "54d3e893-dd2c-45af-aeec-9df5c753e887";
191
+ static readonly STEP_TYPE = "CASHBACK";
192
+ static readonly AUTO_LINK_PARENT = true;
193
+ static readonly HAS_ASSOCIATIONS = true;
194
+ static readonly HAS_REQUIRED_ASSOCIATIONS = true;
195
+ static readonly BUILDER_CLASS = "CreateCashbackRewardForOrderReferralBuilder";
196
+ static readonly ASSOCIATION_FIELDS: readonly [{
197
+ readonly name: "Association_1771346771888";
198
+ readonly methodName: "linkAssociation_1771346771888";
199
+ readonly required: true;
200
+ readonly schemaAssociationId: "16b487c1-7b5a-4232-a13a-c9678283ebc7";
201
+ }];
202
+ readonly actionName: string;
203
+ readonly schemaActionId: string;
204
+ readonly entity: string;
205
+ constructor(properties: CreateCashbackRewardForOrderReferralProperties, options?: {
206
+ journeyId?: string;
207
+ });
208
+ }
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ /**
3
+ * CreateCashbackRewardForOrderReferral Action DTO
4
+ *
5
+ * Creates a cashback reward linked to an order referral
6
+ *
7
+ * @module CrmModule
8
+ * @entity Reward
9
+ * @entityType CASHBACK
10
+ * @actionKey CreateCashbackRewardForOrderReferral
11
+ * @event k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral
12
+ *
13
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.CreateCashbackRewardForOrderReferralDto = exports.CreateCashbackRewardForOrderReferralBuilder = void 0;
26
+ const core_1 = require("@d19n/odin-types/dist/core");
27
+ /**
28
+ * Builder for CreateCashbackRewardForOrderReferral action
29
+ *
30
+ * Provides fluent API for adding associations before executing the action.
31
+ * Use .link*() methods to add associations, then call .execute() to run.
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * await record.createCashbackRewardForOrderReferral({ ...properties })
36
+ * .linkAssociation_1771346771888({ id: '...', entity: '...' })
37
+ * .execute();
38
+ * ```
39
+ */
40
+ class CreateCashbackRewardForOrderReferralBuilder {
41
+ constructor(properties, pendingLinks, options) {
42
+ this._associations = [];
43
+ this._properties = properties;
44
+ this._pendingLinks = pendingLinks;
45
+ this._options = options;
46
+ }
47
+ /**
48
+ * Link OrderReferralCashbackReward
49
+ * @schemaAssociationId 16b487c1-7b5a-4232-a13a-c9678283ebc7
50
+ * @required
51
+ * @param target - The record to link
52
+ * @returns this (for method chaining)
53
+ */
54
+ linkAssociation_1771346771888(target) {
55
+ this._associations.push(new core_1.OdinRecordLinkDto({
56
+ id: target.id,
57
+ entity: 'entity' in target ? target.entity : target.entity,
58
+ }));
59
+ return this;
60
+ }
61
+ /**
62
+ * Set an external system identifier for this record.
63
+ * Links the record to a corresponding entry in an external application.
64
+ * @param externalId - The ID in the external system
65
+ * @param externalAppId - The external application identifier
66
+ * @returns this (for chaining)
67
+ */
68
+ withExternalId(externalId, externalAppId) {
69
+ this._externalId = externalId;
70
+ this._externalAppId = externalAppId;
71
+ return this;
72
+ }
73
+ /**
74
+ * Set security/access groups for this record.
75
+ * @param groups - Array of group names
76
+ * @returns this (for chaining)
77
+ */
78
+ withGroups(groups) {
79
+ this._groups = groups;
80
+ return this;
81
+ }
82
+ /**
83
+ * Get the action payload without executing
84
+ * @returns The action data that would be sent
85
+ */
86
+ getData() {
87
+ var _a, _b;
88
+ const allAssociations = [...this._associations, ...this._pendingLinks];
89
+ return Object.assign(Object.assign({ entity: 'CrmModule:Reward', type: 'CASHBACK', actionName: 'CreateCashbackRewardForOrderReferral', properties: this._properties, associations: allAssociations.length > 0 ? allAssociations : undefined, journeyId: (_a = this._options) === null || _a === void 0 ? void 0 : _a.journeyId, stageKey: (_b = this._options) === null || _b === void 0 ? void 0 : _b.stageKey }, (this._externalId && { externalId: this._externalId, externalAppId: this._externalAppId })), (this._groups && { groups: this._groups }));
90
+ }
91
+ /**
92
+ * Inject execution context (called by record wrapper)
93
+ * @internal
94
+ */
95
+ withProvider(provider, moduleName, entityName, clearPendingLinks) {
96
+ this._provider = provider;
97
+ this._moduleName = moduleName;
98
+ this._entityName = entityName;
99
+ this._clearPendingLinks = clearPendingLinks;
100
+ return this;
101
+ }
102
+ /**
103
+ * Execute the action
104
+ * @returns The result from the API
105
+ * @throws Error if withProvider() has not been called
106
+ */
107
+ execute() {
108
+ var _a;
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ if (!this._provider || !this._moduleName || !this._entityName) {
111
+ throw new Error('Builder not connected to provider. Use the record wrapper API to get an executable builder.');
112
+ }
113
+ const result = yield this._provider._applyAction(this._moduleName, this._entityName, this.getData());
114
+ (_a = this._clearPendingLinks) === null || _a === void 0 ? void 0 : _a.call(this);
115
+ return result;
116
+ });
117
+ }
118
+ /**
119
+ * Returns the request payload without executing (for debugging)
120
+ * @returns The request payload that would be sent to the API
121
+ */
122
+ dryRun() {
123
+ return this.getData();
124
+ }
125
+ /**
126
+ * Prevents accidental `await builder` without .execute()
127
+ * @throws Error always - use .execute() or .dryRun() instead
128
+ */
129
+ then() {
130
+ throw new Error('Builder cannot be awaited directly. Call .execute() to run the action or .dryRun() to get the payload.');
131
+ }
132
+ }
133
+ exports.CreateCashbackRewardForOrderReferralBuilder = CreateCashbackRewardForOrderReferralBuilder;
134
+ /**
135
+ * CreateCashbackRewardForOrderReferral
136
+ *
137
+ * Creates a cashback reward linked to an order referral
138
+ *
139
+ * @actionType CREATE - Creates a new Reward record
140
+ * @module CrmModule
141
+ * @entity Reward
142
+ * @entityType CASHBACK (CASHBACK)
143
+ * @event k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral
144
+ * @permission schema.action.createcashbackrewardfororderreferral.trigger
145
+ * @benchmark This action is tracked for performance benchmarks
146
+ */
147
+ class CreateCashbackRewardForOrderReferralDto extends core_1.OdinRecordCreateDto {
148
+ constructor(properties, options) {
149
+ super({
150
+ entity: 'CrmModule:Reward',
151
+ type: 'CASHBACK',
152
+ properties,
153
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
154
+ });
155
+ this.actionName = 'CreateCashbackRewardForOrderReferral';
156
+ this.schemaActionId = '52302b68-1b1d-40ef-a64c-fefbd96420b2';
157
+ this.entity = 'CrmModule:Reward';
158
+ }
159
+ }
160
+ exports.CreateCashbackRewardForOrderReferralDto = CreateCashbackRewardForOrderReferralDto;
161
+ /** Used by SDK generators to identify action type */
162
+ CreateCashbackRewardForOrderReferralDto.ACTION_TYPE = 'CREATE';
163
+ CreateCashbackRewardForOrderReferralDto.ACTION_KEY = 'CreateCashbackRewardForOrderReferral';
164
+ CreateCashbackRewardForOrderReferralDto.MODULE_NAME = 'CrmModule';
165
+ CreateCashbackRewardForOrderReferralDto.ENTITIES = ['Reward'];
166
+ CreateCashbackRewardForOrderReferralDto.ENTITY_TYPE = 'CASHBACK';
167
+ CreateCashbackRewardForOrderReferralDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.Reward.Create.CreateCashbackRewardForOrderReferral';
168
+ CreateCashbackRewardForOrderReferralDto.PERMISSION = 'schema.action.createcashbackrewardfororderreferral.trigger';
169
+ /** Step metadata - entity this action targets */
170
+ CreateCashbackRewardForOrderReferralDto.STEP_ENTITY = 'CrmModule:Reward';
171
+ CreateCashbackRewardForOrderReferralDto.STEP_SCHEMA_ID = '5047247a-31ca-4a1c-aa06-c27fefbb543d';
172
+ CreateCashbackRewardForOrderReferralDto.STEP_SCHEMA_ACTION_ID = '52302b68-1b1d-40ef-a64c-fefbd96420b2';
173
+ CreateCashbackRewardForOrderReferralDto.STEP_SCHEMA_TYPE_ID = '54d3e893-dd2c-45af-aeec-9df5c753e887';
174
+ CreateCashbackRewardForOrderReferralDto.STEP_TYPE = 'CASHBACK';
175
+ CreateCashbackRewardForOrderReferralDto.AUTO_LINK_PARENT = true;
176
+ CreateCashbackRewardForOrderReferralDto.HAS_ASSOCIATIONS = true;
177
+ CreateCashbackRewardForOrderReferralDto.HAS_REQUIRED_ASSOCIATIONS = true;
178
+ CreateCashbackRewardForOrderReferralDto.BUILDER_CLASS = 'CreateCashbackRewardForOrderReferralBuilder';
179
+ CreateCashbackRewardForOrderReferralDto.ASSOCIATION_FIELDS = [{ "name": "Association_1771346771888", "methodName": "linkAssociation_1771346771888", "required": true, "schemaAssociationId": "16b487c1-7b5a-4232-a13a-c9678283ebc7" }];
@@ -22,7 +22,7 @@ export interface UpdateTeamMessage extends OdinRecordUpdatedEvent<UpdateTeamDto,
22
22
  * Properties for UpdateTeam action
23
23
  *
24
24
  * @property Required fields: 0
25
- * @property Optional fields: 8
25
+ * @property Optional fields: 10
26
26
  */
27
27
  export interface UpdateTeamProperties {
28
28
  /**
@@ -81,6 +81,20 @@ export interface UpdateTeamProperties {
81
81
  * @type {ENUM}
82
82
  */
83
83
  SocialAccess?: string | null;
84
+ /**
85
+ * Works Cases
86
+ *
87
+ * Available team for allocating cases
88
+ * @type {ENUM}
89
+ */
90
+ WorksCases?: string | null;
91
+ /**
92
+ * Can escalate to
93
+ *
94
+ * Can escalate to
95
+ * @type {ENUM}
96
+ */
97
+ CanEscalateTo?: string | null;
84
98
  }
85
99
  /**
86
100
  * UpdateTeam
@@ -22,12 +22,14 @@ export declare class ReferralApi extends ApiProvider {
22
22
  private _affiliatecode?;
23
23
  private _campaign?;
24
24
  private _order?;
25
+ private _reward?;
25
26
  constructor(authParams?: OauthParams, authToken?: string);
26
27
  get referrerreferrals(): ApiRecordLinkManager;
27
28
  get refereereferrals(): ApiRecordLinkManager;
28
29
  get affiliatecode(): ApiRecordLinkManager;
29
30
  get campaign(): ApiRecordLinkManager;
30
31
  get order(): ApiRecordLinkManager;
32
+ get reward(): ApiRecordLinkManager;
31
33
  setRecord(sourceRecord: any): void;
32
34
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
33
35
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<ReferralProperties>>>;
@@ -63,6 +63,12 @@ class ReferralApi extends api_provider_1.ApiProvider {
63
63
  }
64
64
  return this._order;
65
65
  }
66
+ get reward() {
67
+ if (!this._reward) {
68
+ this._reward = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'CrmModule:Referral', 'CrmModule:Reward', 'OrderReferralCashbackReward');
69
+ }
70
+ return this._reward;
71
+ }
66
72
  // ============================================
67
73
  // STANDARD METHODS (Unchanged API)
68
74
  // ============================================
@@ -21,11 +21,13 @@ export declare class RewardApi extends ApiProvider {
21
21
  private _contact?;
22
22
  private _affiliatecode?;
23
23
  private _paymentmethodrefund?;
24
+ private _referral?;
24
25
  constructor(authParams?: OauthParams, authToken?: string);
25
26
  get campaign(): ApiRecordLinkManager;
26
27
  get contact(): ApiRecordLinkManager;
27
28
  get affiliatecode(): ApiRecordLinkManager;
28
29
  get paymentmethodrefund(): ApiRecordLinkManager;
30
+ get referral(): ApiRecordLinkManager;
29
31
  setRecord(sourceRecord: any): void;
30
32
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
31
33
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<RewardProperties>>>;
@@ -57,6 +57,12 @@ class RewardApi extends api_provider_1.ApiProvider {
57
57
  }
58
58
  return this._paymentmethodrefund;
59
59
  }
60
+ get referral() {
61
+ if (!this._referral) {
62
+ this._referral = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'CrmModule:Reward', 'CrmModule:Referral', 'OrderReferralCashbackReward');
63
+ }
64
+ return this._referral;
65
+ }
60
66
  // ============================================
61
67
  // STANDARD METHODS (Unchanged API)
62
68
  // ============================================
@@ -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