@d19n/youfibre-odin-sdk 2.0.367 → 2.0.369
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 +6 -2
- package/dist/actions-v2/CancelNotStartedReplacementAmcoWorkOrderDto.d.ts +68 -0
- package/dist/actions-v2/CancelNotStartedReplacementAmcoWorkOrderDto.js +60 -0
- package/dist/actions-v2/CancelOrderForEtfPaidDto.d.ts +2 -2
- package/dist/actions-v2/CancelOrderForEtfPaidDto.js +2 -2
- package/dist/actions-v2/UpdateContactAppPreferencesDto.d.ts +8 -1
- package/dist/api-sdk-v2/ReleaseNoteApi.d.ts +45 -0
- package/dist/api-sdk-v2/ReleaseNoteApi.js +151 -0
- package/dist/db-sdk-v2/CrmDatasetDb.d.ts +2 -2
- package/dist/db-sdk-v2/CrmDatasetDb.js +4 -4
- package/dist/db-sdk-v2/ReleaseNoteDb.d.ts +117 -0
- package/dist/db-sdk-v2/ReleaseNoteDb.js +200 -0
- package/dist/entities-v2/Address.d.ts +10 -1
- package/dist/entities-v2/Address.js +2 -0
- package/dist/entities-v2/Contact.d.ts +24 -1
- package/dist/entities-v2/Contact.js +18 -2
- package/dist/entities-v2/ReleaseNote.d.ts +146 -0
- package/dist/entities-v2/ReleaseNote.js +84 -0
- package/dist/entities-v2/YfWifiSurvey.d.ts +31 -1
- package/dist/entities-v2/YfWifiSurvey.js +19 -1
- package/dist/records-v2/WorkOrderRecord.d.ts +25 -0
- package/dist/records-v2/WorkOrderRecord.js +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ await workOrder.completeWorkOrder({ ... });
|
|
|
124
124
|
|
|
125
125
|
## Entities
|
|
126
126
|
|
|
127
|
-
This SDK includes **
|
|
127
|
+
This SDK includes **204** entities across **13** modules.
|
|
128
128
|
|
|
129
129
|
### CrmModule
|
|
130
130
|
|
|
@@ -198,6 +198,7 @@ This SDK includes **203** entities across **13** modules.
|
|
|
198
198
|
| **PgLog** | PgLog Entity Definition | DEFAULT |
|
|
199
199
|
| **PgWebhook** | PgWebhook Entity Definition | DEFAULT |
|
|
200
200
|
| **PgWebhookAttempt** | PgWebhookAttempt Entity Definition | DEFAULT |
|
|
201
|
+
| **ReleaseNote** | ReleaseNote Entity Definition | DEFAULT |
|
|
201
202
|
|
|
202
203
|
### SupportModule
|
|
203
204
|
|
|
@@ -396,7 +397,7 @@ This SDK includes **203** entities across **13** modules.
|
|
|
396
397
|
|
|
397
398
|
## Actions
|
|
398
399
|
|
|
399
|
-
This SDK includes **
|
|
400
|
+
This SDK includes **932** actions.
|
|
400
401
|
|
|
401
402
|
### Action Types
|
|
402
403
|
|
|
@@ -496,6 +497,7 @@ This SDK includes **931** actions.
|
|
|
496
497
|
| `CancelInstallWorkOrderFlowSupplier` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelInstallWorkOrderFlowSupplier |
|
|
497
498
|
| `CancelNotStartedCollectionAmcoWorkOrder` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedCollectionAmcoWorkOrder |
|
|
498
499
|
| `CancelNotStartedDispatchAmcoWorkOrder` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedDispatchAmcoWorkOrder |
|
|
500
|
+
| `CancelNotStartedReplacementAmcoWorkOrder` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder |
|
|
499
501
|
| `CancelServiceWorkOrderFlowSupplier` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelServiceWorkOrderFlowSupplier |
|
|
500
502
|
| `ChangeWorkOrderStatus` | UPDATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.ChangeWorkOrderStatus |
|
|
501
503
|
| `CompleteCollectionInspectionDetails` | UPDATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.CompleteCollectionInspectionDetails |
|
|
@@ -662,6 +664,8 @@ This SDK includes **931** actions.
|
|
|
662
664
|
|
|
663
665
|
**CancelNotStartedDispatchAmcoWorkOrder Target Stages:** `DispatchAmcoStageCancelled`
|
|
664
666
|
|
|
667
|
+
**CancelNotStartedReplacementAmcoWorkOrder Target Stages:** `ReplacementAmcoStageCancelled`
|
|
668
|
+
|
|
665
669
|
**CancelServiceWorkOrderFlowSupplier Target Stages:** `WorkOrderStageCancelled`
|
|
666
670
|
|
|
667
671
|
**CompleteInstallWorkOrderFlow Target Stages:** `WorkOrderStageDone`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CancelNotStartedReplacementAmcoWorkOrder Action DTO
|
|
3
|
+
*
|
|
4
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
5
|
+
*
|
|
6
|
+
* @module FieldServiceModule
|
|
7
|
+
* @entity WorkOrder
|
|
8
|
+
* @entityType REPLACEMENT_AMCO
|
|
9
|
+
* @actionKey CancelNotStartedReplacementAmcoWorkOrder
|
|
10
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
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 CancelNotStartedReplacementAmcoWorkOrder step flow events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
19
|
+
*/
|
|
20
|
+
export interface CancelNotStartedReplacementAmcoWorkOrderMessage extends OdinRecordUpdatedEvent<CancelNotStartedReplacementAmcoWorkOrderDto, {}> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for CancelNotStartedReplacementAmcoWorkOrder action
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export interface CancelNotStartedReplacementAmcoWorkOrderProperties {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
30
|
+
*
|
|
31
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
32
|
+
* @module FieldServiceModule
|
|
33
|
+
* @entity WorkOrder
|
|
34
|
+
* @entityType REPLACEMENT_AMCO (Amco Replacement)
|
|
35
|
+
* @targetStages ReplacementAmcoStageCancelled
|
|
36
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
37
|
+
* @permission schema.action.cancelnotstartedreplacementamcoworkorder.trigger
|
|
38
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
39
|
+
*/
|
|
40
|
+
export declare class CancelNotStartedReplacementAmcoWorkOrderDto extends OdinRecordUpdateDto<Record<string, any>> {
|
|
41
|
+
/** Used by SDK generators to identify action type */
|
|
42
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
43
|
+
static readonly ACTION_KEY = "CancelNotStartedReplacementAmcoWorkOrder";
|
|
44
|
+
static readonly MODULE_NAME = "FieldServiceModule";
|
|
45
|
+
static readonly ENTITIES: string[];
|
|
46
|
+
static readonly ENTITY_TYPE = "REPLACEMENT_AMCO";
|
|
47
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder";
|
|
48
|
+
static readonly SCHEMA_ACTION_ID = "7c43ee2e-f6a2-4108-bf95-53a448d32ff3";
|
|
49
|
+
static readonly PERMISSION = "schema.action.cancelnotstartedreplacementamcoworkorder.trigger";
|
|
50
|
+
static readonly TARGET_STAGES: readonly ["ReplacementAmcoStageCancelled"];
|
|
51
|
+
static readonly IS_STAGE_TRANSITION = true;
|
|
52
|
+
static readonly IS_MULTI_STEP_FLOW = false;
|
|
53
|
+
static readonly HAS_STEP_LINKS = false;
|
|
54
|
+
readonly actionName: string;
|
|
55
|
+
readonly schemaActionId: string;
|
|
56
|
+
readonly entity: string;
|
|
57
|
+
readonly stageKey: string;
|
|
58
|
+
constructor(record: OdinRecord<any> | {
|
|
59
|
+
id: string;
|
|
60
|
+
entity: string;
|
|
61
|
+
type?: string;
|
|
62
|
+
}, options?: {
|
|
63
|
+
journeyId?: string;
|
|
64
|
+
});
|
|
65
|
+
/** Step classes that can be used with this action */
|
|
66
|
+
static readonly stepClasses: readonly [];
|
|
67
|
+
steps: [];
|
|
68
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CancelNotStartedReplacementAmcoWorkOrder Action DTO
|
|
4
|
+
*
|
|
5
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
6
|
+
*
|
|
7
|
+
* @module FieldServiceModule
|
|
8
|
+
* @entity WorkOrder
|
|
9
|
+
* @entityType REPLACEMENT_AMCO
|
|
10
|
+
* @actionKey CancelNotStartedReplacementAmcoWorkOrder
|
|
11
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CancelNotStartedReplacementAmcoWorkOrderDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
20
|
+
*
|
|
21
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
22
|
+
* @module FieldServiceModule
|
|
23
|
+
* @entity WorkOrder
|
|
24
|
+
* @entityType REPLACEMENT_AMCO (Amco Replacement)
|
|
25
|
+
* @targetStages ReplacementAmcoStageCancelled
|
|
26
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
27
|
+
* @permission schema.action.cancelnotstartedreplacementamcoworkorder.trigger
|
|
28
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
29
|
+
*/
|
|
30
|
+
class CancelNotStartedReplacementAmcoWorkOrderDto extends core_1.OdinRecordUpdateDto {
|
|
31
|
+
constructor(record, options) {
|
|
32
|
+
super({
|
|
33
|
+
id: record.id,
|
|
34
|
+
entity: record.entity,
|
|
35
|
+
type: record.type,
|
|
36
|
+
properties: {},
|
|
37
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'CancelNotStartedReplacementAmcoWorkOrder';
|
|
40
|
+
this.schemaActionId = '7c43ee2e-f6a2-4108-bf95-53a448d32ff3';
|
|
41
|
+
this.entity = 'FieldServiceModule:WorkOrder';
|
|
42
|
+
this.stageKey = 'ReplacementAmcoStageCancelled';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.CancelNotStartedReplacementAmcoWorkOrderDto = CancelNotStartedReplacementAmcoWorkOrderDto;
|
|
46
|
+
/** Used by SDK generators to identify action type */
|
|
47
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ACTION_TYPE = 'UPDATE';
|
|
48
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ACTION_KEY = 'CancelNotStartedReplacementAmcoWorkOrder';
|
|
49
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.MODULE_NAME = 'FieldServiceModule';
|
|
50
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ENTITIES = ['WorkOrder'];
|
|
51
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ENTITY_TYPE = 'REPLACEMENT_AMCO';
|
|
52
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.EVENT_NAME = 'k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder';
|
|
53
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.SCHEMA_ACTION_ID = '7c43ee2e-f6a2-4108-bf95-53a448d32ff3';
|
|
54
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.PERMISSION = 'schema.action.cancelnotstartedreplacementamcoworkorder.trigger';
|
|
55
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.TARGET_STAGES = ['ReplacementAmcoStageCancelled'];
|
|
56
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.IS_STAGE_TRANSITION = true;
|
|
57
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.IS_MULTI_STEP_FLOW = false;
|
|
58
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.HAS_STEP_LINKS = false;
|
|
59
|
+
/** Step classes that can be used with this action */
|
|
60
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.stepClasses = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CancelOrderForETFPaid Action DTO
|
|
3
3
|
*
|
|
4
|
-
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Triggered by billing when the ETF invoice reaches PAID.
|
|
4
|
+
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Runs from Deactivated or Pending Cancellation; never from Active, where the customer is still being served. Triggered by billing when the ETF invoice reaches PAID.
|
|
5
5
|
*
|
|
6
6
|
* @module OrderModule
|
|
7
7
|
* @entity Order
|
|
@@ -27,7 +27,7 @@ export interface CancelOrderForEtfPaidProperties {
|
|
|
27
27
|
/**
|
|
28
28
|
* Cancel Order For ETF Paid
|
|
29
29
|
*
|
|
30
|
-
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Triggered by billing when the ETF invoice reaches PAID.
|
|
30
|
+
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Runs from Deactivated or Pending Cancellation; never from Active, where the customer is still being served. Triggered by billing when the ETF invoice reaches PAID.
|
|
31
31
|
*
|
|
32
32
|
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
33
33
|
* @module OrderModule
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CancelOrderForETFPaid Action DTO
|
|
4
4
|
*
|
|
5
|
-
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Triggered by billing when the ETF invoice reaches PAID.
|
|
5
|
+
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Runs from Deactivated or Pending Cancellation; never from Active, where the customer is still being served. Triggered by billing when the ETF invoice reaches PAID.
|
|
6
6
|
*
|
|
7
7
|
* @module OrderModule
|
|
8
8
|
* @entity Order
|
|
@@ -17,7 +17,7 @@ const core_1 = require("@d19n/odin-types/dist/core");
|
|
|
17
17
|
/**
|
|
18
18
|
* Cancel Order For ETF Paid
|
|
19
19
|
*
|
|
20
|
-
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Triggered by billing when the ETF invoice reaches PAID.
|
|
20
|
+
* The customer paid their early-termination fee, so they have bought out the contract and left. Moves the order to Cancelled with no cease to the supplier, matching the bad-debt churn. Runs from Deactivated or Pending Cancellation; never from Active, where the customer is still being served. Triggered by billing when the ETF invoice reaches PAID.
|
|
21
21
|
*
|
|
22
22
|
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
23
23
|
* @module OrderModule
|
|
@@ -22,7 +22,7 @@ export interface UpdateContactAppPreferencesMessage extends OdinRecordUpdatedEve
|
|
|
22
22
|
* Properties for UpdateContactAppPreferences action
|
|
23
23
|
*
|
|
24
24
|
* @property Required fields: 0
|
|
25
|
-
* @property Optional fields:
|
|
25
|
+
* @property Optional fields: 5
|
|
26
26
|
*/
|
|
27
27
|
export interface UpdateContactAppPreferencesProperties {
|
|
28
28
|
/**
|
|
@@ -53,6 +53,13 @@ export interface UpdateContactAppPreferencesProperties {
|
|
|
53
53
|
* @type {DATE_TIME}
|
|
54
54
|
*/
|
|
55
55
|
AppBiometricLoginStatusDate?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* App Device Platform
|
|
58
|
+
*
|
|
59
|
+
* The platform of the phone the customer most recently used the app on. Empty until the app reports it (PORTAPP-3483).
|
|
60
|
+
* @type {ENUM}
|
|
61
|
+
*/
|
|
62
|
+
AppDevicePlatform?: string | null;
|
|
56
63
|
}
|
|
57
64
|
/**
|
|
58
65
|
* UpdateContactAppPreferences
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
|
|
4
|
+
import { ReleaseNoteProperties } from '../entities-v2/ReleaseNote';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use OdinApiClient.
|
|
7
|
+
*
|
|
8
|
+
* Migration:
|
|
9
|
+
* - Old: new ReleaseNoteApi(authParams).get(id)
|
|
10
|
+
* - New: new odin.releasenote.get(id)
|
|
11
|
+
*
|
|
12
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ReleaseNoteApi extends ApiProvider {
|
|
15
|
+
protected readonly authToken?: string;
|
|
16
|
+
private readonly moduleName;
|
|
17
|
+
private readonly entityName;
|
|
18
|
+
private sourceRecord;
|
|
19
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
20
|
+
setRecord(sourceRecord: any): void;
|
|
21
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
22
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>>>;
|
|
23
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>>>;
|
|
24
|
+
reIndex(body: {
|
|
25
|
+
id: string;
|
|
26
|
+
schemaId: string;
|
|
27
|
+
}[]): Promise<any>;
|
|
28
|
+
get(releaseNoteId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>>;
|
|
29
|
+
getMany(releaseNoteIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>[]>;
|
|
30
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
31
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
32
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
33
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
34
|
+
delete(releaseNoteId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
35
|
+
deleteMany(releaseNoteIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
36
|
+
restore(releaseNoteIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
37
|
+
applyAction(dto: any): Promise<any[]>;
|
|
38
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
39
|
+
getVersions(): Promise<{
|
|
40
|
+
[key: string]: Record<string, any>;
|
|
41
|
+
}>;
|
|
42
|
+
getRevisionTimeline(): Promise<{
|
|
43
|
+
[key: string]: Record<string, any>[];
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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.ReleaseNoteApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use OdinApiClient.
|
|
16
|
+
*
|
|
17
|
+
* Migration:
|
|
18
|
+
* - Old: new ReleaseNoteApi(authParams).get(id)
|
|
19
|
+
* - New: new odin.releasenote.get(id)
|
|
20
|
+
*
|
|
21
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
22
|
+
*/
|
|
23
|
+
class ReleaseNoteApi extends api_provider_1.ApiProvider {
|
|
24
|
+
// ============================================
|
|
25
|
+
// PRIVATE BACKING FIELDS (Lazy Loading)
|
|
26
|
+
// ============================================
|
|
27
|
+
constructor(authParams, authToken) {
|
|
28
|
+
super(authParams, authToken);
|
|
29
|
+
this.authToken = authToken;
|
|
30
|
+
this.moduleName = 'AuditModule';
|
|
31
|
+
this.entityName = 'ReleaseNote';
|
|
32
|
+
// Link managers are lazy-loaded on first access
|
|
33
|
+
}
|
|
34
|
+
// ============================================
|
|
35
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
36
|
+
// ============================================
|
|
37
|
+
// Usage remains identical: api.address.list(recordId)
|
|
38
|
+
// ============================================
|
|
39
|
+
// STANDARD METHODS (Unchanged API)
|
|
40
|
+
// ============================================
|
|
41
|
+
setRecord(sourceRecord) {
|
|
42
|
+
this.sourceRecord = sourceRecord;
|
|
43
|
+
}
|
|
44
|
+
schema() {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
50
|
+
search(params) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want paginating through the results to be handled
|
|
56
|
+
searchAndPaginate(params) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function to re-index records in elastic search
|
|
62
|
+
reIndex(body) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
return yield this._reIndexRecords(body);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Use this function when you want to return a single record
|
|
68
|
+
get(releaseNoteId) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, releaseNoteId);
|
|
71
|
+
if (res)
|
|
72
|
+
this.setRecord(res);
|
|
73
|
+
return res;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// Use this function when you want to return many records by primaryKeys
|
|
77
|
+
getMany(releaseNoteIds) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, releaseNoteIds);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
// Use this function when you want to upsert one record
|
|
83
|
+
upsert(upsertDto) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
86
|
+
return res[0];
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Use this function when you want to upsert many records
|
|
90
|
+
upsertMany(upsertDtos) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
// Use this function when you want to update one record
|
|
96
|
+
update(updateDto) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
99
|
+
return res[0];
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// Use this function when you want to update many records
|
|
103
|
+
updateMany(updateDtos) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
// Use this function when you want to delete one record
|
|
109
|
+
delete(releaseNoteId) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this._delete(this.moduleName, this.entityName, [releaseNoteId]);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Use this function when you want to delete many records
|
|
115
|
+
deleteMany(releaseNoteIds) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield this._delete(this.moduleName, this.entityName, releaseNoteIds);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Use this function when you want to restore one or many records
|
|
121
|
+
restore(releaseNoteIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this._restore(this.moduleName, this.entityName, releaseNoteIds);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// Use this function when you want to apply a single action
|
|
127
|
+
applyAction(dto) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
// Use this function when you want to bulk apply actions
|
|
133
|
+
bulkApplyActions(dtos) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// Use this function when you want to return the versions for a single record
|
|
139
|
+
getVersions() {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// Use this function when you want to return the change history for a single record
|
|
145
|
+
getRevisionTimeline() {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.ReleaseNoteApi = ReleaseNoteApi;
|
|
@@ -24,7 +24,7 @@ export declare class CrmDatasetDb extends DbProvider {
|
|
|
24
24
|
private _note?;
|
|
25
25
|
private _lead?;
|
|
26
26
|
private _team?;
|
|
27
|
-
private
|
|
27
|
+
private _exchange?;
|
|
28
28
|
private _address?;
|
|
29
29
|
private _salesterritory?;
|
|
30
30
|
private _user?;
|
|
@@ -32,7 +32,7 @@ export declare class CrmDatasetDb extends DbProvider {
|
|
|
32
32
|
get note(): DbRecordLinkManager;
|
|
33
33
|
get lead(): DbRecordLinkManager;
|
|
34
34
|
get team(): DbRecordLinkManager;
|
|
35
|
-
get
|
|
35
|
+
get exchange(): DbRecordLinkManager;
|
|
36
36
|
get address(): DbRecordLinkManager;
|
|
37
37
|
get salesterritory(): DbRecordLinkManager;
|
|
38
38
|
get user(): DbRecordLinkManager;
|
|
@@ -56,11 +56,11 @@ class CrmDatasetDb extends db_provider_1.DbProvider {
|
|
|
56
56
|
}
|
|
57
57
|
return this._team;
|
|
58
58
|
}
|
|
59
|
-
get
|
|
60
|
-
if (!this.
|
|
61
|
-
this.
|
|
59
|
+
get exchange() {
|
|
60
|
+
if (!this._exchange) {
|
|
61
|
+
this._exchange = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'CrmModule:CrmDataset', 'ProjectModule:Exchange', 'Exchange__CrmDataset');
|
|
62
62
|
}
|
|
63
|
-
return this.
|
|
63
|
+
return this._exchange;
|
|
64
64
|
}
|
|
65
65
|
get address() {
|
|
66
66
|
if (!this._address) {
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
|
|
2
|
+
import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
|
|
3
|
+
import { ReleaseNoteProperties } from '../entities-v2/ReleaseNote';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use OdinDbClient.
|
|
6
|
+
*
|
|
7
|
+
* Migration:
|
|
8
|
+
* - Old: new ReleaseNoteApi(authParams).get(id)
|
|
9
|
+
* - New: new odin.releasenote.get(id)
|
|
10
|
+
*
|
|
11
|
+
* The new OdinDbClient returns typed record wrappers with action methods.
|
|
12
|
+
*
|
|
13
|
+
* Supports separate query options and provider options:
|
|
14
|
+
* - Constructor level: new ReleaseNoteDb(principal, dbService, { omitPermissionsCheck: true })
|
|
15
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
16
|
+
*/
|
|
17
|
+
export declare class ReleaseNoteDb extends DbProvider {
|
|
18
|
+
protected readonly principal: any;
|
|
19
|
+
protected readonly dbService: any;
|
|
20
|
+
private readonly moduleName;
|
|
21
|
+
private readonly entityName;
|
|
22
|
+
private sourceRecord;
|
|
23
|
+
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
24
|
+
setRecord(sourceRecord: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Search records with manual pagination control
|
|
27
|
+
* @param params - Search parameters
|
|
28
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
29
|
+
*/
|
|
30
|
+
searchRecords(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>>>;
|
|
31
|
+
/**
|
|
32
|
+
* Search all records with automatic pagination
|
|
33
|
+
* @param params - Search parameters
|
|
34
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
35
|
+
*/
|
|
36
|
+
searchAllRecordsAndPaginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a single record by primary key
|
|
39
|
+
* @param releaseNoteId - Record ID
|
|
40
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
41
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Simple get
|
|
45
|
+
* const record = await db.getByPrimaryKey(id);
|
|
46
|
+
*
|
|
47
|
+
* // With related entities
|
|
48
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
|
|
49
|
+
*
|
|
50
|
+
* // With permissions bypass
|
|
51
|
+
* const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
|
|
52
|
+
*
|
|
53
|
+
* // Both options
|
|
54
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
|
|
55
|
+
*/
|
|
56
|
+
getByPrimaryKey(releaseNoteId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>>;
|
|
57
|
+
/**
|
|
58
|
+
* Get multiple records by primary keys
|
|
59
|
+
* @param releaseNoteIds - Array of record IDs
|
|
60
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
61
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
62
|
+
*/
|
|
63
|
+
getManyByPrimaryKey(releaseNoteIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<ReleaseNoteProperties>[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Upsert a single record
|
|
66
|
+
* @param upsertDto - Record to upsert
|
|
67
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
68
|
+
*/
|
|
69
|
+
upsert(upsertDto: OdinRecordCreateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
|
|
70
|
+
/**
|
|
71
|
+
* Upsert multiple records
|
|
72
|
+
* @param upsertDtos - Records to upsert
|
|
73
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
74
|
+
*/
|
|
75
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Update a single record
|
|
78
|
+
* @param updateDto - Record to update
|
|
79
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
80
|
+
*/
|
|
81
|
+
update(updateDto: OdinRecordUpdateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
|
|
82
|
+
/**
|
|
83
|
+
* Update multiple records
|
|
84
|
+
* @param updateDtos - Records to update
|
|
85
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
86
|
+
*/
|
|
87
|
+
updateMany(updateDtos: OdinRecordUpdateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Delete one or many records
|
|
90
|
+
* @param releaseNoteIds - Record IDs to delete
|
|
91
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
92
|
+
*/
|
|
93
|
+
delete(releaseNoteIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Restore one or many deleted records
|
|
96
|
+
* @param releaseNoteIds - Record IDs to restore
|
|
97
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
98
|
+
*/
|
|
99
|
+
restore(releaseNoteIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordRestored[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Apply an action to a record
|
|
102
|
+
* @param actionName - The action key
|
|
103
|
+
* @param dto - The action DTO
|
|
104
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
105
|
+
*/
|
|
106
|
+
applyAction(actionName: string, dto: any, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
|
|
107
|
+
/**
|
|
108
|
+
* Get version history for the current source record
|
|
109
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
110
|
+
*/
|
|
111
|
+
getVersions(providerOptions?: DbProviderOptions): Promise<any>;
|
|
112
|
+
/**
|
|
113
|
+
* Get revision timeline for the current source record
|
|
114
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
115
|
+
*/
|
|
116
|
+
getRevisionTimeline(providerOptions?: DbProviderOptions): Promise<any>;
|
|
117
|
+
}
|