@d19n/youfibre-odin-sdk 2.0.35 → 2.0.36
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.
- package/README.md +3 -1
- package/dist/actions-v2/SalesTerritoryCreateDto.d.ts +100 -0
- package/dist/actions-v2/SalesTerritoryCreateDto.js +59 -0
- package/dist/actions-v2/SalesTerritoryUpdateDto.d.ts +105 -0
- package/dist/actions-v2/SalesTerritoryUpdateDto.js +61 -0
- package/dist/api-sdk-v2/AccountCreditApi.d.ts +0 -2
- package/dist/api-sdk-v2/AccountCreditApi.js +0 -6
- package/dist/api-sdk-v2/CreditNoteApi.d.ts +0 -2
- package/dist/api-sdk-v2/CreditNoteApi.js +0 -6
- package/dist/db-sdk-v2/AccountCreditDb.d.ts +0 -2
- package/dist/db-sdk-v2/AccountCreditDb.js +0 -6
- package/dist/db-sdk-v2/CreditNoteDb.d.ts +0 -2
- package/dist/db-sdk-v2/CreditNoteDb.js +0 -6
- package/dist/entities-v2/AccountCredit.d.ts +0 -7
- package/dist/entities-v2/AccountCredit.js +1 -5
- package/dist/entities-v2/CreditNote.d.ts +0 -3
- package/dist/entities-v2/CustomerDeviceOnt.d.ts +2 -2
- package/dist/entities-v2/CustomerDeviceOnt.js +2 -2
- package/dist/records-v2/AccountCreditRecord.d.ts +0 -20
- package/dist/records-v2/AccountCreditRecord.js +0 -33
- package/dist/records-v2/CreditNoteRecord.d.ts +0 -20
- package/dist/records-v2/CreditNoteRecord.js +0 -33
- package/dist/records-v2/SalesTerritoryRecord.d.ts +57 -0
- package/dist/records-v2/SalesTerritoryRecord.js +73 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ This SDK includes **164** entities across **12** modules.
|
|
|
352
352
|
|
|
353
353
|
## Actions
|
|
354
354
|
|
|
355
|
-
This SDK includes **
|
|
355
|
+
This SDK includes **597** actions.
|
|
356
356
|
|
|
357
357
|
### Action Types
|
|
358
358
|
|
|
@@ -1654,6 +1654,8 @@ This SDK includes **595** actions.
|
|
|
1654
1654
|
|--------|------|-------|
|
|
1655
1655
|
| `CreateSalesTerritory` | CREATE | k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.CreateSalesTerritory |
|
|
1656
1656
|
| `EditSalesTerritory` | UPDATE | k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.EditSalesTerritory |
|
|
1657
|
+
| `SalesTerritoryCreate` | CREATE | k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate |
|
|
1658
|
+
| `SalesTerritoryUpdate` | UPDATE | k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate |
|
|
1657
1659
|
|
|
1658
1660
|
#### Team
|
|
1659
1661
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SalesTerritoryCreate Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Sales Territory create action
|
|
5
|
+
*
|
|
6
|
+
* @module CrmModule
|
|
7
|
+
* @entity SalesTerritory
|
|
8
|
+
* @entityType FIELD_SALES
|
|
9
|
+
* @actionKey SalesTerritoryCreate
|
|
10
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
+
/**
|
|
16
|
+
* RabbitMQ message payload for SalesTerritoryCreate created events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate
|
|
19
|
+
*/
|
|
20
|
+
export interface SalesTerritoryCreateMessage extends OdinRecordCreatedEvent<SalesTerritoryCreateDto, SalesTerritoryCreateProperties> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for SalesTerritoryCreate action
|
|
24
|
+
*
|
|
25
|
+
* @property Required fields: 0
|
|
26
|
+
* @property Optional fields: 5
|
|
27
|
+
*/
|
|
28
|
+
export interface SalesTerritoryCreateProperties {
|
|
29
|
+
/**
|
|
30
|
+
* Name
|
|
31
|
+
*
|
|
32
|
+
* name
|
|
33
|
+
* @type {TEXT}
|
|
34
|
+
*/
|
|
35
|
+
Name?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Region
|
|
38
|
+
*
|
|
39
|
+
* Data field for SalesTerritory records. Used by Sales team.
|
|
40
|
+
* @type {TEXT}
|
|
41
|
+
*/
|
|
42
|
+
Region?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Territory
|
|
45
|
+
*
|
|
46
|
+
* Data field for SalesTerritory records. Used by Sales team.
|
|
47
|
+
* @type {TEXT}
|
|
48
|
+
*/
|
|
49
|
+
Territory?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Head of sales
|
|
52
|
+
*
|
|
53
|
+
* Head of sales (Sales - SalesTerritory)
|
|
54
|
+
* @type {LOOKUP}
|
|
55
|
+
*/
|
|
56
|
+
HeadOfSales?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* Regional sales manager
|
|
59
|
+
*
|
|
60
|
+
* Regional sales manager (Sales - SalesTerritory)
|
|
61
|
+
* @type {LOOKUP}
|
|
62
|
+
*/
|
|
63
|
+
RegionSalesManager?: string | null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* SalesTerritoryCreate
|
|
67
|
+
*
|
|
68
|
+
* Sales Territory create action
|
|
69
|
+
*
|
|
70
|
+
* @actionType CREATE - Creates a new SalesTerritory record
|
|
71
|
+
* @module CrmModule
|
|
72
|
+
* @entity SalesTerritory
|
|
73
|
+
* @entityType FIELD_SALES (Field sales)
|
|
74
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate
|
|
75
|
+
* @permission schema.action.salesterritorycreate.trigger
|
|
76
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
77
|
+
*/
|
|
78
|
+
export declare class SalesTerritoryCreateDto extends OdinRecordCreateDto<SalesTerritoryCreateProperties> {
|
|
79
|
+
/** Used by SDK generators to identify action type */
|
|
80
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
81
|
+
static readonly ACTION_KEY = "SalesTerritoryCreate";
|
|
82
|
+
static readonly MODULE_NAME = "CrmModule";
|
|
83
|
+
static readonly ENTITIES: string[];
|
|
84
|
+
static readonly ENTITY_TYPE = "FIELD_SALES";
|
|
85
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate";
|
|
86
|
+
static readonly PERMISSION = "schema.action.salesterritorycreate.trigger";
|
|
87
|
+
/** Step metadata - entity this action targets */
|
|
88
|
+
static readonly STEP_ENTITY = "CrmModule:SalesTerritory";
|
|
89
|
+
static readonly STEP_SCHEMA_ID = "213d769a-9897-4aa3-bcf8-a35b2a93011b";
|
|
90
|
+
static readonly STEP_SCHEMA_ACTION_ID = "1dc32ec3-db4c-4a49-b849-e8d80111f372";
|
|
91
|
+
static readonly STEP_SCHEMA_TYPE_ID = "945522a5-a808-4058-95fd-89bf5d28a07b";
|
|
92
|
+
static readonly STEP_TYPE = "FIELD_SALES";
|
|
93
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
94
|
+
readonly actionName: string;
|
|
95
|
+
readonly schemaActionId: string;
|
|
96
|
+
readonly entity: string;
|
|
97
|
+
constructor(properties: SalesTerritoryCreateProperties, options?: {
|
|
98
|
+
journeyId?: string;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SalesTerritoryCreate Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Sales Territory create action
|
|
6
|
+
*
|
|
7
|
+
* @module CrmModule
|
|
8
|
+
* @entity SalesTerritory
|
|
9
|
+
* @entityType FIELD_SALES
|
|
10
|
+
* @actionKey SalesTerritoryCreate
|
|
11
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SalesTerritoryCreateDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* SalesTerritoryCreate
|
|
20
|
+
*
|
|
21
|
+
* Sales Territory create action
|
|
22
|
+
*
|
|
23
|
+
* @actionType CREATE - Creates a new SalesTerritory record
|
|
24
|
+
* @module CrmModule
|
|
25
|
+
* @entity SalesTerritory
|
|
26
|
+
* @entityType FIELD_SALES (Field sales)
|
|
27
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate
|
|
28
|
+
* @permission schema.action.salesterritorycreate.trigger
|
|
29
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
30
|
+
*/
|
|
31
|
+
class SalesTerritoryCreateDto extends core_1.OdinRecordCreateDto {
|
|
32
|
+
constructor(properties, options) {
|
|
33
|
+
super({
|
|
34
|
+
entity: 'CrmModule:SalesTerritory',
|
|
35
|
+
type: 'FIELD_SALES',
|
|
36
|
+
properties,
|
|
37
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'SalesTerritoryCreate';
|
|
40
|
+
this.schemaActionId = '1dc32ec3-db4c-4a49-b849-e8d80111f372';
|
|
41
|
+
this.entity = 'CrmModule:SalesTerritory';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.SalesTerritoryCreateDto = SalesTerritoryCreateDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
SalesTerritoryCreateDto.ACTION_TYPE = 'CREATE';
|
|
47
|
+
SalesTerritoryCreateDto.ACTION_KEY = 'SalesTerritoryCreate';
|
|
48
|
+
SalesTerritoryCreateDto.MODULE_NAME = 'CrmModule';
|
|
49
|
+
SalesTerritoryCreateDto.ENTITIES = ['SalesTerritory'];
|
|
50
|
+
SalesTerritoryCreateDto.ENTITY_TYPE = 'FIELD_SALES';
|
|
51
|
+
SalesTerritoryCreateDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.SalesTerritory.Create.SalesTerritoryCreate';
|
|
52
|
+
SalesTerritoryCreateDto.PERMISSION = 'schema.action.salesterritorycreate.trigger';
|
|
53
|
+
/** Step metadata - entity this action targets */
|
|
54
|
+
SalesTerritoryCreateDto.STEP_ENTITY = 'CrmModule:SalesTerritory';
|
|
55
|
+
SalesTerritoryCreateDto.STEP_SCHEMA_ID = '213d769a-9897-4aa3-bcf8-a35b2a93011b';
|
|
56
|
+
SalesTerritoryCreateDto.STEP_SCHEMA_ACTION_ID = '1dc32ec3-db4c-4a49-b849-e8d80111f372';
|
|
57
|
+
SalesTerritoryCreateDto.STEP_SCHEMA_TYPE_ID = '945522a5-a808-4058-95fd-89bf5d28a07b';
|
|
58
|
+
SalesTerritoryCreateDto.STEP_TYPE = 'FIELD_SALES';
|
|
59
|
+
SalesTerritoryCreateDto.AUTO_LINK_PARENT = true;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SalesTerritoryUpdate Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Update Sales Territory
|
|
5
|
+
*
|
|
6
|
+
* @module CrmModule
|
|
7
|
+
* @entity SalesTerritory
|
|
8
|
+
* @entityType FIELD_SALES
|
|
9
|
+
* @actionKey SalesTerritoryUpdate
|
|
10
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
+
/**
|
|
16
|
+
* RabbitMQ message payload for SalesTerritoryUpdate updated events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate
|
|
19
|
+
*/
|
|
20
|
+
export interface SalesTerritoryUpdateMessage extends OdinRecordUpdatedEvent<SalesTerritoryUpdateDto, SalesTerritoryUpdateProperties> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for SalesTerritoryUpdate action
|
|
24
|
+
*
|
|
25
|
+
* @property Required fields: 0
|
|
26
|
+
* @property Optional fields: 5
|
|
27
|
+
*/
|
|
28
|
+
export interface SalesTerritoryUpdateProperties {
|
|
29
|
+
/**
|
|
30
|
+
* Name
|
|
31
|
+
*
|
|
32
|
+
* name
|
|
33
|
+
* @type {TEXT}
|
|
34
|
+
*/
|
|
35
|
+
Name?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Territory
|
|
38
|
+
*
|
|
39
|
+
* Data field for SalesTerritory records. Used by Sales team.
|
|
40
|
+
* @type {TEXT}
|
|
41
|
+
*/
|
|
42
|
+
Territory?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Region
|
|
45
|
+
*
|
|
46
|
+
* Data field for SalesTerritory records. Used by Sales team.
|
|
47
|
+
* @type {TEXT}
|
|
48
|
+
*/
|
|
49
|
+
Region?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Head of sales
|
|
52
|
+
*
|
|
53
|
+
* Head of sales (Sales - SalesTerritory)
|
|
54
|
+
* @type {LOOKUP}
|
|
55
|
+
*/
|
|
56
|
+
HeadOfSales?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* Regional sales manager
|
|
59
|
+
*
|
|
60
|
+
* Regional sales manager (Sales - SalesTerritory)
|
|
61
|
+
* @type {LOOKUP}
|
|
62
|
+
*/
|
|
63
|
+
RegionSalesManager?: string | null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* SalesTerritoryUpdate
|
|
67
|
+
*
|
|
68
|
+
* Update Sales Territory
|
|
69
|
+
*
|
|
70
|
+
* @actionType UPDATE - Updates an existing SalesTerritory record
|
|
71
|
+
* @module CrmModule
|
|
72
|
+
* @entity SalesTerritory
|
|
73
|
+
* @entityType FIELD_SALES (Field sales)
|
|
74
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate
|
|
75
|
+
* @permission schema.action.salesterritoryupdate.trigger
|
|
76
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
77
|
+
*/
|
|
78
|
+
export declare class SalesTerritoryUpdateDto extends OdinRecordUpdateDto<SalesTerritoryUpdateProperties> {
|
|
79
|
+
/** Used by SDK generators to identify action type */
|
|
80
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
81
|
+
static readonly ACTION_KEY = "SalesTerritoryUpdate";
|
|
82
|
+
static readonly MODULE_NAME = "CrmModule";
|
|
83
|
+
static readonly ENTITIES: string[];
|
|
84
|
+
static readonly ENTITY_TYPE = "FIELD_SALES";
|
|
85
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate";
|
|
86
|
+
static readonly PERMISSION = "schema.action.salesterritoryupdate.trigger";
|
|
87
|
+
/** Step metadata - entity this action targets */
|
|
88
|
+
static readonly STEP_ENTITY = "CrmModule:SalesTerritory";
|
|
89
|
+
static readonly STEP_SCHEMA_ID = "213d769a-9897-4aa3-bcf8-a35b2a93011b";
|
|
90
|
+
static readonly STEP_SCHEMA_ACTION_ID = "245e3829-bf2b-4f84-87e7-7c8da93646c1";
|
|
91
|
+
static readonly STEP_SCHEMA_TYPE_ID = "945522a5-a808-4058-95fd-89bf5d28a07b";
|
|
92
|
+
static readonly STEP_TYPE = "FIELD_SALES";
|
|
93
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
94
|
+
readonly actionName: string;
|
|
95
|
+
readonly schemaActionId: string;
|
|
96
|
+
readonly entity: string;
|
|
97
|
+
constructor(record: OdinRecord<any> | {
|
|
98
|
+
id: string;
|
|
99
|
+
entity: string;
|
|
100
|
+
type?: string;
|
|
101
|
+
}, properties: SalesTerritoryUpdateProperties, options?: {
|
|
102
|
+
journeyId?: string;
|
|
103
|
+
stageKey?: string;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SalesTerritoryUpdate Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Update Sales Territory
|
|
6
|
+
*
|
|
7
|
+
* @module CrmModule
|
|
8
|
+
* @entity SalesTerritory
|
|
9
|
+
* @entityType FIELD_SALES
|
|
10
|
+
* @actionKey SalesTerritoryUpdate
|
|
11
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SalesTerritoryUpdateDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* SalesTerritoryUpdate
|
|
20
|
+
*
|
|
21
|
+
* Update Sales Territory
|
|
22
|
+
*
|
|
23
|
+
* @actionType UPDATE - Updates an existing SalesTerritory record
|
|
24
|
+
* @module CrmModule
|
|
25
|
+
* @entity SalesTerritory
|
|
26
|
+
* @entityType FIELD_SALES (Field sales)
|
|
27
|
+
* @event k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate
|
|
28
|
+
* @permission schema.action.salesterritoryupdate.trigger
|
|
29
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
30
|
+
*/
|
|
31
|
+
class SalesTerritoryUpdateDto extends core_1.OdinRecordUpdateDto {
|
|
32
|
+
constructor(record, properties, options) {
|
|
33
|
+
super({
|
|
34
|
+
id: record.id,
|
|
35
|
+
entity: record.entity,
|
|
36
|
+
type: record.type,
|
|
37
|
+
properties,
|
|
38
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
39
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
40
|
+
});
|
|
41
|
+
this.actionName = 'SalesTerritoryUpdate';
|
|
42
|
+
this.schemaActionId = '245e3829-bf2b-4f84-87e7-7c8da93646c1';
|
|
43
|
+
this.entity = 'CrmModule:SalesTerritory';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.SalesTerritoryUpdateDto = SalesTerritoryUpdateDto;
|
|
47
|
+
/** Used by SDK generators to identify action type */
|
|
48
|
+
SalesTerritoryUpdateDto.ACTION_TYPE = 'UPDATE';
|
|
49
|
+
SalesTerritoryUpdateDto.ACTION_KEY = 'SalesTerritoryUpdate';
|
|
50
|
+
SalesTerritoryUpdateDto.MODULE_NAME = 'CrmModule';
|
|
51
|
+
SalesTerritoryUpdateDto.ENTITIES = ['SalesTerritory'];
|
|
52
|
+
SalesTerritoryUpdateDto.ENTITY_TYPE = 'FIELD_SALES';
|
|
53
|
+
SalesTerritoryUpdateDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.SalesTerritory.Update.SalesTerritoryUpdate';
|
|
54
|
+
SalesTerritoryUpdateDto.PERMISSION = 'schema.action.salesterritoryupdate.trigger';
|
|
55
|
+
/** Step metadata - entity this action targets */
|
|
56
|
+
SalesTerritoryUpdateDto.STEP_ENTITY = 'CrmModule:SalesTerritory';
|
|
57
|
+
SalesTerritoryUpdateDto.STEP_SCHEMA_ID = '213d769a-9897-4aa3-bcf8-a35b2a93011b';
|
|
58
|
+
SalesTerritoryUpdateDto.STEP_SCHEMA_ACTION_ID = '245e3829-bf2b-4f84-87e7-7c8da93646c1';
|
|
59
|
+
SalesTerritoryUpdateDto.STEP_SCHEMA_TYPE_ID = '945522a5-a808-4058-95fd-89bf5d28a07b';
|
|
60
|
+
SalesTerritoryUpdateDto.STEP_TYPE = 'FIELD_SALES';
|
|
61
|
+
SalesTerritoryUpdateDto.AUTO_LINK_PARENT = false;
|
|
@@ -17,11 +17,9 @@ export declare class AccountCreditApi extends ApiProvider {
|
|
|
17
17
|
private readonly moduleName;
|
|
18
18
|
private readonly entityName;
|
|
19
19
|
private sourceRecord;
|
|
20
|
-
private _creditnote?;
|
|
21
20
|
private _contact?;
|
|
22
21
|
private _invoice?;
|
|
23
22
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
24
|
-
get creditnote(): ApiRecordLinkManager;
|
|
25
23
|
get contact(): ApiRecordLinkManager;
|
|
26
24
|
get invoice(): ApiRecordLinkManager;
|
|
27
25
|
setRecord(sourceRecord: any): void;
|
|
@@ -33,12 +33,6 @@ class AccountCreditApi extends api_provider_1.ApiProvider {
|
|
|
33
33
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
34
34
|
// ============================================
|
|
35
35
|
// Usage remains identical: api.address.list(recordId)
|
|
36
|
-
get creditnote() {
|
|
37
|
-
if (!this._creditnote) {
|
|
38
|
-
this._creditnote = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:AccountCredit', 'BillingModule:CreditNote', 'AccountCredit__CreditNote');
|
|
39
|
-
}
|
|
40
|
-
return this._creditnote;
|
|
41
|
-
}
|
|
42
36
|
get contact() {
|
|
43
37
|
if (!this._contact) {
|
|
44
38
|
this._contact = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:AccountCredit', 'CrmModule:Contact', 'Contact__AccountCredit');
|
|
@@ -17,13 +17,11 @@ export declare class CreditNoteApi extends ApiProvider {
|
|
|
17
17
|
private readonly moduleName;
|
|
18
18
|
private readonly entityName;
|
|
19
19
|
private sourceRecord;
|
|
20
|
-
private _accountcredit?;
|
|
21
20
|
private _transaction?;
|
|
22
21
|
private _note?;
|
|
23
22
|
private _invoice?;
|
|
24
23
|
private _file?;
|
|
25
24
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
26
|
-
get accountcredit(): ApiRecordLinkManager;
|
|
27
25
|
get transaction(): ApiRecordLinkManager;
|
|
28
26
|
get note(): ApiRecordLinkManager;
|
|
29
27
|
get invoice(): ApiRecordLinkManager;
|
|
@@ -33,12 +33,6 @@ class CreditNoteApi extends api_provider_1.ApiProvider {
|
|
|
33
33
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
34
34
|
// ============================================
|
|
35
35
|
// Usage remains identical: api.address.list(recordId)
|
|
36
|
-
get accountcredit() {
|
|
37
|
-
if (!this._accountcredit) {
|
|
38
|
-
this._accountcredit = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:CreditNote', 'BillingModule:AccountCredit', 'AccountCredit__CreditNote');
|
|
39
|
-
}
|
|
40
|
-
return this._accountcredit;
|
|
41
|
-
}
|
|
42
36
|
get transaction() {
|
|
43
37
|
if (!this._transaction) {
|
|
44
38
|
this._transaction = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:CreditNote', 'BillingModule:Transaction', 'CreditNote__Transaction');
|
|
@@ -21,11 +21,9 @@ export declare class AccountCreditDb extends DbProvider {
|
|
|
21
21
|
private readonly moduleName;
|
|
22
22
|
private readonly entityName;
|
|
23
23
|
private sourceRecord;
|
|
24
|
-
private _creditnote?;
|
|
25
24
|
private _contact?;
|
|
26
25
|
private _invoice?;
|
|
27
26
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
28
|
-
get creditnote(): DbRecordLinkManager;
|
|
29
27
|
get contact(): DbRecordLinkManager;
|
|
30
28
|
get invoice(): DbRecordLinkManager;
|
|
31
29
|
setRecord(sourceRecord: any): void;
|
|
@@ -38,12 +38,6 @@ class AccountCreditDb extends db_provider_1.DbProvider {
|
|
|
38
38
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
39
39
|
// ============================================
|
|
40
40
|
// Usage remains identical: db.address.list(recordId)
|
|
41
|
-
get creditnote() {
|
|
42
|
-
if (!this._creditnote) {
|
|
43
|
-
this._creditnote = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:AccountCredit', 'BillingModule:CreditNote', 'AccountCredit__CreditNote');
|
|
44
|
-
}
|
|
45
|
-
return this._creditnote;
|
|
46
|
-
}
|
|
47
41
|
get contact() {
|
|
48
42
|
if (!this._contact) {
|
|
49
43
|
this._contact = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:AccountCredit', 'CrmModule:Contact', 'Contact__AccountCredit');
|
|
@@ -21,13 +21,11 @@ export declare class CreditNoteDb extends DbProvider {
|
|
|
21
21
|
private readonly moduleName;
|
|
22
22
|
private readonly entityName;
|
|
23
23
|
private sourceRecord;
|
|
24
|
-
private _accountcredit?;
|
|
25
24
|
private _transaction?;
|
|
26
25
|
private _note?;
|
|
27
26
|
private _invoice?;
|
|
28
27
|
private _file?;
|
|
29
28
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
30
|
-
get accountcredit(): DbRecordLinkManager;
|
|
31
29
|
get transaction(): DbRecordLinkManager;
|
|
32
30
|
get note(): DbRecordLinkManager;
|
|
33
31
|
get invoice(): DbRecordLinkManager;
|
|
@@ -38,12 +38,6 @@ class CreditNoteDb extends db_provider_1.DbProvider {
|
|
|
38
38
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
39
39
|
// ============================================
|
|
40
40
|
// Usage remains identical: db.address.list(recordId)
|
|
41
|
-
get accountcredit() {
|
|
42
|
-
if (!this._accountcredit) {
|
|
43
|
-
this._accountcredit = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:CreditNote', 'BillingModule:AccountCredit', 'AccountCredit__CreditNote');
|
|
44
|
-
}
|
|
45
|
-
return this._accountcredit;
|
|
46
|
-
}
|
|
47
41
|
get transaction() {
|
|
48
42
|
if (!this._transaction) {
|
|
49
43
|
this._transaction = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:CreditNote', 'BillingModule:Transaction', 'CreditNote__Transaction');
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* Generated from Odin schema definition
|
|
12
12
|
*/
|
|
13
13
|
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
-
import { CreditNoteProperties } from './CreditNote';
|
|
15
14
|
import { ContactProperties } from './Contact';
|
|
16
15
|
import { InvoiceProperties } from './Invoice';
|
|
17
16
|
/**
|
|
@@ -190,8 +189,6 @@ export declare class AccountCredit extends OdinRecord<AccountCreditProperties> {
|
|
|
190
189
|
type: AccountCreditEntityTypes;
|
|
191
190
|
schemaId: '5871ead3-e07b-44b8-a480-0c1152211a2b';
|
|
192
191
|
properties: AccountCreditProperties;
|
|
193
|
-
/** Linked CreditNote records (AccountCredit__CreditNote) */
|
|
194
|
-
CreditNote: OdinLink<LinkedOdinRecord<CreditNoteProperties>>;
|
|
195
192
|
/** Linked Contact records (Contact__AccountCredit) */
|
|
196
193
|
Contact: OdinLink<LinkedOdinRecord<ContactProperties>>;
|
|
197
194
|
/** Linked Invoice records (AccountCredit__Invoice) */
|
|
@@ -213,10 +210,6 @@ export declare const ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = "BillingModule
|
|
|
213
210
|
export declare const ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = "BillingModule.AccountCredit.DEFAULT.SubDbRecordUpdated";
|
|
214
211
|
/** This is the default record type deleted */
|
|
215
212
|
export declare const ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = "BillingModule.AccountCredit.DEFAULT.SubDbRecordDeleted";
|
|
216
|
-
/** Event: AccountCredit__CreditNote link created */
|
|
217
|
-
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_CREATED = "BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationCreated";
|
|
218
|
-
/** Event: AccountCredit__CreditNote link deleted */
|
|
219
|
-
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_DELETED = "BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationDeleted";
|
|
220
213
|
/** Event: AccountCredit__Invoice link created */
|
|
221
214
|
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = "BillingModule.AccountCredit.Invoice.SubDbRecordAssociationCreated";
|
|
222
215
|
/** Event: AccountCredit__Invoice link deleted */
|
|
@@ -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.
|
|
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
|
|
@@ -173,10 +173,6 @@ exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = 'BillingModule.AccountCredi
|
|
|
173
173
|
exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = 'BillingModule.AccountCredit.DEFAULT.SubDbRecordUpdated';
|
|
174
174
|
/** This is the default record type deleted */
|
|
175
175
|
exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = 'BillingModule.AccountCredit.DEFAULT.SubDbRecordDeleted';
|
|
176
|
-
/** Event: AccountCredit__CreditNote link created */
|
|
177
|
-
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_CREATED = 'BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationCreated';
|
|
178
|
-
/** Event: AccountCredit__CreditNote link deleted */
|
|
179
|
-
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_DELETED = 'BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationDeleted';
|
|
180
176
|
/** Event: AccountCredit__Invoice link created */
|
|
181
177
|
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = 'BillingModule.AccountCredit.Invoice.SubDbRecordAssociationCreated';
|
|
182
178
|
/** Event: AccountCredit__Invoice link deleted */
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* Generated from Odin schema definition
|
|
12
12
|
*/
|
|
13
13
|
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
-
import { AccountCreditProperties } from './AccountCredit';
|
|
15
14
|
import { TransactionProperties } from './Transaction';
|
|
16
15
|
import { NoteProperties } from './Note';
|
|
17
16
|
import { InvoiceProperties } from './Invoice';
|
|
@@ -143,8 +142,6 @@ export declare class CreditNote extends OdinRecord<CreditNoteProperties> {
|
|
|
143
142
|
type: CreditNoteEntityTypes;
|
|
144
143
|
schemaId: 'ee80aeca-5653-494a-80bf-1994b6df1cd0';
|
|
145
144
|
properties: CreditNoteProperties;
|
|
146
|
-
/** Linked AccountCredit records (AccountCredit__CreditNote) */
|
|
147
|
-
AccountCredit: OdinLink<LinkedOdinRecord<AccountCreditProperties>>;
|
|
148
145
|
/** Linked Transaction records (CreditNote__Transaction) */
|
|
149
146
|
Transaction: OdinLink<LinkedOdinRecord<TransactionProperties>>;
|
|
150
147
|
/** Linked Note records (CreditNote__Note) */
|
|
@@ -38,10 +38,10 @@ export declare enum CustomerDeviceOntEntityTypes {
|
|
|
38
38
|
* - `621_X` - 621X
|
|
39
39
|
* - `622_V` - 622v
|
|
40
40
|
* - `631_Q` - 631q
|
|
41
|
-
* - `
|
|
41
|
+
* - `NOKIA` - Nokia
|
|
42
42
|
*/
|
|
43
43
|
export declare enum CustomerDeviceOntModel {
|
|
44
|
-
|
|
44
|
+
NOKIA = "NOKIA"
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Valid values for CustomerDeviceOnt.OltName
|
|
@@ -32,11 +32,11 @@ var CustomerDeviceOntEntityTypes;
|
|
|
32
32
|
* - `621_X` - 621X
|
|
33
33
|
* - `622_V` - 622v
|
|
34
34
|
* - `631_Q` - 631q
|
|
35
|
-
* - `
|
|
35
|
+
* - `NOKIA` - Nokia
|
|
36
36
|
*/
|
|
37
37
|
var CustomerDeviceOntModel;
|
|
38
38
|
(function (CustomerDeviceOntModel) {
|
|
39
|
-
CustomerDeviceOntModel["
|
|
39
|
+
CustomerDeviceOntModel["NOKIA"] = "NOKIA";
|
|
40
40
|
})(CustomerDeviceOntModel = exports.CustomerDeviceOntModel || (exports.CustomerDeviceOntModel = {}));
|
|
41
41
|
/**
|
|
42
42
|
* Valid values for CustomerDeviceOnt.OltName
|
|
@@ -25,7 +25,6 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
25
25
|
import { AccountCreditProperties } from '../entities-v2/AccountCredit';
|
|
26
26
|
import { CreateAccountCreditProperties } from '../actions-v2/CreateAccountCreditDto';
|
|
27
27
|
import { UpdateAccountCreditBalanceProperties } from '../actions-v2/UpdateAccountCreditBalanceDto';
|
|
28
|
-
import { CreditNoteRecord } from './CreditNoteRecord';
|
|
29
28
|
import { ContactRecord } from './ContactRecord';
|
|
30
29
|
import { InvoiceRecord } from './InvoiceRecord';
|
|
31
30
|
/** Valid entity types for AccountCredit */
|
|
@@ -93,7 +92,6 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
93
92
|
private _provider;
|
|
94
93
|
private _pendingLinks;
|
|
95
94
|
private _preGeneratedId;
|
|
96
|
-
private _creditNotes?;
|
|
97
95
|
private _contacts?;
|
|
98
96
|
private _invoices?;
|
|
99
97
|
/**
|
|
@@ -137,24 +135,6 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
137
135
|
* @remarks This is the default record type
|
|
138
136
|
*/
|
|
139
137
|
isDefault(): this is AccountCreditRecord<AccountCreditProperties>;
|
|
140
|
-
/** Valid labels for CreditNote associations */
|
|
141
|
-
static readonly creditNotesLabels: readonly ["AccountCredit__CreditNote"];
|
|
142
|
-
/**
|
|
143
|
-
* Access linked CreditNote records
|
|
144
|
-
* @remarks Available labels: AccountCredit__CreditNote
|
|
145
|
-
* @throws Error if called on a new (unsaved) record
|
|
146
|
-
*
|
|
147
|
-
* @example
|
|
148
|
-
* ```typescript
|
|
149
|
-
* // Get all linked CreditNote records
|
|
150
|
-
* const items = await record.creditNotes.list();
|
|
151
|
-
* const first = await record.creditNotes.first();
|
|
152
|
-
*
|
|
153
|
-
* // Filter by label
|
|
154
|
-
* const specific = await record.creditNotes.first({ label: 'AccountCredit__CreditNote' });
|
|
155
|
-
* ```
|
|
156
|
-
*/
|
|
157
|
-
get creditNotes(): RecordLinkManager<CreditNoteRecord, typeof AccountCreditRecord['creditNotesLabels'][number]>;
|
|
158
138
|
/** Valid labels for Contact associations */
|
|
159
139
|
static readonly contactsLabels: readonly ["Contact__AccountCredit"];
|
|
160
140
|
/**
|
|
@@ -32,7 +32,6 @@ exports.isAccountCreditRecord = exports.AccountCreditRecord = void 0;
|
|
|
32
32
|
const uuid_1 = require("uuid");
|
|
33
33
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
34
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
35
|
-
const CreditNoteRecord_1 = require("./CreditNoteRecord");
|
|
36
35
|
const ContactRecord_1 = require("./ContactRecord");
|
|
37
36
|
const InvoiceRecord_1 = require("./InvoiceRecord");
|
|
38
37
|
/**
|
|
@@ -164,36 +163,6 @@ class AccountCreditRecord {
|
|
|
164
163
|
* @remarks This is the default record type
|
|
165
164
|
*/
|
|
166
165
|
isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
|
|
167
|
-
/**
|
|
168
|
-
* Access linked CreditNote records
|
|
169
|
-
* @remarks Available labels: AccountCredit__CreditNote
|
|
170
|
-
* @throws Error if called on a new (unsaved) record
|
|
171
|
-
*
|
|
172
|
-
* @example
|
|
173
|
-
* ```typescript
|
|
174
|
-
* // Get all linked CreditNote records
|
|
175
|
-
* const items = await record.creditNotes.list();
|
|
176
|
-
* const first = await record.creditNotes.first();
|
|
177
|
-
*
|
|
178
|
-
* // Filter by label
|
|
179
|
-
* const specific = await record.creditNotes.first({ label: 'AccountCredit__CreditNote' });
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
get creditNotes() {
|
|
183
|
-
var _a;
|
|
184
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
185
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
186
|
-
if (!this._creditNotes) {
|
|
187
|
-
this._creditNotes = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
188
|
-
sourceEntity: 'BillingModule:AccountCredit',
|
|
189
|
-
targetEntity: 'BillingModule:CreditNote',
|
|
190
|
-
targetModuleName: 'BillingModule',
|
|
191
|
-
targetEntityName: 'CreditNote',
|
|
192
|
-
labels: ['AccountCredit__CreditNote'],
|
|
193
|
-
}, CreditNoteRecord_1.CreditNoteRecord);
|
|
194
|
-
}
|
|
195
|
-
return this._creditNotes;
|
|
196
|
-
}
|
|
197
166
|
/**
|
|
198
167
|
* Access linked Contact records
|
|
199
168
|
* @remarks Available labels: Contact__AccountCredit
|
|
@@ -365,8 +334,6 @@ exports.AccountCreditRecord = AccountCreditRecord;
|
|
|
365
334
|
// ============================================
|
|
366
335
|
// TYPED LINK ACCESSORS
|
|
367
336
|
// ============================================
|
|
368
|
-
/** Valid labels for CreditNote associations */
|
|
369
|
-
AccountCreditRecord.creditNotesLabels = ['AccountCredit__CreditNote'];
|
|
370
337
|
/** Valid labels for Contact associations */
|
|
371
338
|
AccountCreditRecord.contactsLabels = ['Contact__AccountCredit'];
|
|
372
339
|
/** Valid labels for Invoice associations */
|
|
@@ -23,7 +23,6 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
23
23
|
import { CreditNoteProperties } from '../entities-v2/CreditNote';
|
|
24
24
|
import { CreditNoteCreateProperties } from '../actions-v2/CreditNoteCreateDto';
|
|
25
25
|
import { CreditNoteUpdateProperties } from '../actions-v2/CreditNoteUpdateDto';
|
|
26
|
-
import { AccountCreditRecord } from './AccountCreditRecord';
|
|
27
26
|
import { TransactionRecord } from './TransactionRecord';
|
|
28
27
|
import { NoteRecord } from './NoteRecord';
|
|
29
28
|
import { InvoiceRecord } from './InvoiceRecord';
|
|
@@ -91,7 +90,6 @@ export declare class CreditNoteRecord<TProps = CreditNoteProperties> {
|
|
|
91
90
|
private _provider;
|
|
92
91
|
private _pendingLinks;
|
|
93
92
|
private _preGeneratedId;
|
|
94
|
-
private _accountCredits?;
|
|
95
93
|
private _transactions?;
|
|
96
94
|
private _notes?;
|
|
97
95
|
private _invoices?;
|
|
@@ -121,24 +119,6 @@ export declare class CreditNoteRecord<TProps = CreditNoteProperties> {
|
|
|
121
119
|
get groups(): string[];
|
|
122
120
|
/** Access the underlying OdinRecord (null for new records) */
|
|
123
121
|
get record(): OdinRecord<TProps> | null;
|
|
124
|
-
/** Valid labels for AccountCredit associations */
|
|
125
|
-
static readonly accountCreditsLabels: readonly ["AccountCredit__CreditNote"];
|
|
126
|
-
/**
|
|
127
|
-
* Access linked AccountCredit records
|
|
128
|
-
* @remarks Available labels: AccountCredit__CreditNote
|
|
129
|
-
* @throws Error if called on a new (unsaved) record
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```typescript
|
|
133
|
-
* // Get all linked AccountCredit records
|
|
134
|
-
* const items = await record.accountCredits.list();
|
|
135
|
-
* const first = await record.accountCredits.first();
|
|
136
|
-
*
|
|
137
|
-
* // Filter by label
|
|
138
|
-
* const specific = await record.accountCredits.first({ label: 'AccountCredit__CreditNote' });
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
get accountCredits(): RecordLinkManager<AccountCreditRecord, typeof CreditNoteRecord['accountCreditsLabels'][number]>;
|
|
142
122
|
/** Valid labels for Transaction associations */
|
|
143
123
|
static readonly transactionsLabels: readonly ["CreditNote__Transaction"];
|
|
144
124
|
/**
|
|
@@ -30,7 +30,6 @@ exports.isCreditNoteRecord = exports.CreditNoteRecord = void 0;
|
|
|
30
30
|
const uuid_1 = require("uuid");
|
|
31
31
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
32
32
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
33
|
-
const AccountCreditRecord_1 = require("./AccountCreditRecord");
|
|
34
33
|
const TransactionRecord_1 = require("./TransactionRecord");
|
|
35
34
|
const NoteRecord_1 = require("./NoteRecord");
|
|
36
35
|
const InvoiceRecord_1 = require("./InvoiceRecord");
|
|
@@ -145,36 +144,6 @@ class CreditNoteRecord {
|
|
|
145
144
|
get groups() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.groups) || []; }
|
|
146
145
|
/** Access the underlying OdinRecord (null for new records) */
|
|
147
146
|
get record() { return this._record; }
|
|
148
|
-
/**
|
|
149
|
-
* Access linked AccountCredit records
|
|
150
|
-
* @remarks Available labels: AccountCredit__CreditNote
|
|
151
|
-
* @throws Error if called on a new (unsaved) record
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
* ```typescript
|
|
155
|
-
* // Get all linked AccountCredit records
|
|
156
|
-
* const items = await record.accountCredits.list();
|
|
157
|
-
* const first = await record.accountCredits.first();
|
|
158
|
-
*
|
|
159
|
-
* // Filter by label
|
|
160
|
-
* const specific = await record.accountCredits.first({ label: 'AccountCredit__CreditNote' });
|
|
161
|
-
* ```
|
|
162
|
-
*/
|
|
163
|
-
get accountCredits() {
|
|
164
|
-
var _a;
|
|
165
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
166
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
167
|
-
if (!this._accountCredits) {
|
|
168
|
-
this._accountCredits = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
169
|
-
sourceEntity: 'BillingModule:CreditNote',
|
|
170
|
-
targetEntity: 'BillingModule:AccountCredit',
|
|
171
|
-
targetModuleName: 'BillingModule',
|
|
172
|
-
targetEntityName: 'AccountCredit',
|
|
173
|
-
labels: ['AccountCredit__CreditNote'],
|
|
174
|
-
}, AccountCreditRecord_1.AccountCreditRecord);
|
|
175
|
-
}
|
|
176
|
-
return this._accountCredits;
|
|
177
|
-
}
|
|
178
147
|
/**
|
|
179
148
|
* Access linked Transaction records
|
|
180
149
|
* @remarks Available labels: CreditNote__Transaction
|
|
@@ -406,8 +375,6 @@ exports.CreditNoteRecord = CreditNoteRecord;
|
|
|
406
375
|
// ============================================
|
|
407
376
|
// TYPED LINK ACCESSORS
|
|
408
377
|
// ============================================
|
|
409
|
-
/** Valid labels for AccountCredit associations */
|
|
410
|
-
CreditNoteRecord.accountCreditsLabels = ['AccountCredit__CreditNote'];
|
|
411
378
|
/** Valid labels for Transaction associations */
|
|
412
379
|
CreditNoteRecord.transactionsLabels = ['CreditNote__Transaction'];
|
|
413
380
|
/** Valid labels for Note associations */
|
|
@@ -25,6 +25,8 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
25
25
|
import { SalesTerritoryProperties, FieldSalesSalesTerritoryProperties, TelesalesSalesTerritoryProperties } from '../entities-v2/SalesTerritory';
|
|
26
26
|
import { CreateSalesTerritoryProperties } from '../actions-v2/CreateSalesTerritoryDto';
|
|
27
27
|
import { EditSalesTerritoryProperties } from '../actions-v2/EditSalesTerritoryDto';
|
|
28
|
+
import { SalesTerritoryCreateProperties } from '../actions-v2/SalesTerritoryCreateDto';
|
|
29
|
+
import { SalesTerritoryUpdateProperties } from '../actions-v2/SalesTerritoryUpdateDto';
|
|
28
30
|
import { UserRecord } from './UserRecord';
|
|
29
31
|
import { CrmDatasetRecord } from './CrmDatasetRecord';
|
|
30
32
|
import { ExchangeRecord } from './ExchangeRecord';
|
|
@@ -256,6 +258,34 @@ export declare class SalesTerritoryRecord<TProps = SalesTerritoryProperties> {
|
|
|
256
258
|
journeyId?: string;
|
|
257
259
|
stageKey?: string;
|
|
258
260
|
}): ActionBuilder;
|
|
261
|
+
/**
|
|
262
|
+
* SalesTerritoryCreate
|
|
263
|
+
*
|
|
264
|
+
* Creates a new SalesTerritory record with the specified properties.
|
|
265
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
266
|
+
*
|
|
267
|
+
* @remarks Record type: FIELD_SALES
|
|
268
|
+
*
|
|
269
|
+
* @param properties - The properties for the new record
|
|
270
|
+
* @param options - Optional settings
|
|
271
|
+
* @param options.journeyId - Associate with a journey
|
|
272
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
273
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* ```typescript
|
|
277
|
+
* // Create with properties
|
|
278
|
+
* const record = odinClient.salesTerritorys.new();
|
|
279
|
+
* await record.salesTerritoryCreate({ ... }).execute();
|
|
280
|
+
*
|
|
281
|
+
* // Dry run (for debugging)
|
|
282
|
+
* const payload = record.salesTerritoryCreate({ ... }).dryRun();
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
salesTerritoryCreate(properties?: SalesTerritoryCreateProperties, options?: {
|
|
286
|
+
journeyId?: string;
|
|
287
|
+
stageKey?: string;
|
|
288
|
+
}): ActionBuilder;
|
|
259
289
|
/**
|
|
260
290
|
* EditSalesTerritory
|
|
261
291
|
*
|
|
@@ -283,6 +313,33 @@ export declare class SalesTerritoryRecord<TProps = SalesTerritoryProperties> {
|
|
|
283
313
|
journeyId?: string;
|
|
284
314
|
stageKey?: string;
|
|
285
315
|
}): ActionBuilder;
|
|
316
|
+
/**
|
|
317
|
+
* SalesTerritoryUpdate
|
|
318
|
+
*
|
|
319
|
+
* Updates this SalesTerritory record.
|
|
320
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
321
|
+
*
|
|
322
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
323
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
324
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
325
|
+
* @throws Error if called on a new (unsaved) record
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* const record = await odinClient.salesTerritorys.get(id);
|
|
330
|
+
* await record.salesTerritoryUpdate({ ... }).execute();
|
|
331
|
+
*
|
|
332
|
+
* // Dry run (for debugging)
|
|
333
|
+
* const payload = record.salesTerritoryUpdate({ ... }).dryRun();
|
|
334
|
+
* ```
|
|
335
|
+
*/
|
|
336
|
+
salesTerritoryUpdate(propertiesOrOptions?: SalesTerritoryUpdateProperties | {
|
|
337
|
+
journeyId?: string;
|
|
338
|
+
stageKey?: string;
|
|
339
|
+
}, options?: {
|
|
340
|
+
journeyId?: string;
|
|
341
|
+
stageKey?: string;
|
|
342
|
+
}): ActionBuilder;
|
|
286
343
|
}
|
|
287
344
|
/** Type guard to check if an object is a SalesTerritoryRecord */
|
|
288
345
|
export declare function isSalesTerritoryRecord(obj: any): obj is SalesTerritoryRecord;
|
|
@@ -344,6 +344,42 @@ class SalesTerritoryRecord {
|
|
|
344
344
|
};
|
|
345
345
|
return new ActionBuilder(this._provider, 'CrmModule', 'SalesTerritory', payload, () => { this._pendingLinks = []; });
|
|
346
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* SalesTerritoryCreate
|
|
349
|
+
*
|
|
350
|
+
* Creates a new SalesTerritory record with the specified properties.
|
|
351
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
352
|
+
*
|
|
353
|
+
* @remarks Record type: FIELD_SALES
|
|
354
|
+
*
|
|
355
|
+
* @param properties - The properties for the new record
|
|
356
|
+
* @param options - Optional settings
|
|
357
|
+
* @param options.journeyId - Associate with a journey
|
|
358
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
359
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```typescript
|
|
363
|
+
* // Create with properties
|
|
364
|
+
* const record = odinClient.salesTerritorys.new();
|
|
365
|
+
* await record.salesTerritoryCreate({ ... }).execute();
|
|
366
|
+
*
|
|
367
|
+
* // Dry run (for debugging)
|
|
368
|
+
* const payload = record.salesTerritoryCreate({ ... }).dryRun();
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
salesTerritoryCreate(properties, options) {
|
|
372
|
+
const payload = {
|
|
373
|
+
entity: 'CrmModule:SalesTerritory',
|
|
374
|
+
type: 'FIELD_SALES',
|
|
375
|
+
actionName: 'SalesTerritoryCreate',
|
|
376
|
+
properties: properties || {},
|
|
377
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
378
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
379
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
380
|
+
};
|
|
381
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'SalesTerritory', payload, () => { this._pendingLinks = []; });
|
|
382
|
+
}
|
|
347
383
|
// ============================================
|
|
348
384
|
// UPDATE ACTIONS (require existing record)
|
|
349
385
|
// ============================================
|
|
@@ -384,6 +420,43 @@ class SalesTerritoryRecord {
|
|
|
384
420
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'EditSalesTerritory', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
385
421
|
return new ActionBuilder(this._provider, 'CrmModule', 'SalesTerritory', payload, () => { this._pendingLinks = []; });
|
|
386
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* SalesTerritoryUpdate
|
|
425
|
+
*
|
|
426
|
+
* Updates this SalesTerritory record.
|
|
427
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
428
|
+
*
|
|
429
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
430
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
431
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
432
|
+
* @throws Error if called on a new (unsaved) record
|
|
433
|
+
*
|
|
434
|
+
* @example
|
|
435
|
+
* ```typescript
|
|
436
|
+
* const record = await odinClient.salesTerritorys.get(id);
|
|
437
|
+
* await record.salesTerritoryUpdate({ ... }).execute();
|
|
438
|
+
*
|
|
439
|
+
* // Dry run (for debugging)
|
|
440
|
+
* const payload = record.salesTerritoryUpdate({ ... }).dryRun();
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
salesTerritoryUpdate(propertiesOrOptions, options) {
|
|
444
|
+
var _a;
|
|
445
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
446
|
+
throw new Error('salesTerritoryUpdate requires an existing record. Use accessor.get() first.');
|
|
447
|
+
let properties = {};
|
|
448
|
+
let opts = options;
|
|
449
|
+
if (propertiesOrOptions) {
|
|
450
|
+
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
451
|
+
opts = propertiesOrOptions;
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
properties = propertiesOrOptions;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'SalesTerritoryUpdate', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
458
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'SalesTerritory', payload, () => { this._pendingLinks = []; });
|
|
459
|
+
}
|
|
387
460
|
}
|
|
388
461
|
exports.SalesTerritoryRecord = SalesTerritoryRecord;
|
|
389
462
|
// ============================================
|