@d19n/youfibre-odin-sdk 1.0.142 → 1.0.143

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.
@@ -2,12 +2,14 @@ import { OauthParams } from '@d19n/odin-sdk-generator/dist/api.interfaces';
2
2
  import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
3
3
  import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
4
4
  import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
5
+ import { ApiRecordLinkManager } from '@d19n/odin-sdk-generator/dist/api.record.link.manager';
5
6
  import { ExchangeProperties } from '../entities-v2/Exchange';
6
7
  export declare class ExchangeApi extends ApiProvider {
7
8
  protected readonly authToken?: string;
8
9
  private readonly moduleName;
9
10
  private readonly entityName;
10
11
  private sourceRecord;
12
+ readonly region: ApiRecordLinkManager;
11
13
  constructor(authParams?: OauthParams, authToken?: string);
12
14
  setRecord(sourceRecord: any): void;
13
15
  schema(): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinSchema>;
@@ -11,12 +11,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ExchangeApi = void 0;
13
13
  const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
14
+ const api_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/api.record.link.manager");
14
15
  class ExchangeApi extends api_provider_1.ApiProvider {
15
16
  constructor(authParams, authToken) {
16
17
  super(authParams, authToken);
17
18
  this.authToken = authToken;
18
19
  this.moduleName = 'FieldServiceModule';
19
20
  this.entityName = 'Exchange';
21
+ this.region = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'FieldServiceModule:Exchange', 'FieldServiceModule:Region', 'Region__Exchange');
20
22
  }
21
23
  setRecord(sourceRecord) {
22
24
  this.sourceRecord = sourceRecord;
@@ -9,6 +9,7 @@ export declare class RegionApi extends ApiProvider {
9
9
  private readonly moduleName;
10
10
  private readonly entityName;
11
11
  private sourceRecord;
12
+ readonly exchange: ApiRecordLinkManager;
12
13
  readonly serviceappointmentconfig: ApiRecordLinkManager;
13
14
  constructor(authParams?: OauthParams, authToken?: string);
14
15
  setRecord(sourceRecord: any): void;
@@ -18,6 +18,7 @@ class RegionApi extends api_provider_1.ApiProvider {
18
18
  this.authToken = authToken;
19
19
  this.moduleName = 'FieldServiceModule';
20
20
  this.entityName = 'Region';
21
+ this.exchange = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'FieldServiceModule:Region', 'FieldServiceModule:Exchange', 'Region__Exchange');
21
22
  this.serviceappointmentconfig = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'FieldServiceModule:Region', 'FieldServiceModule:ServiceAppointmentConfig', 'ServiceAppointmentConfig_Region');
22
23
  }
23
24
  setRecord(sourceRecord) {
@@ -1,6 +1,7 @@
1
1
  import { DbProvider } from '@d19n/odin-sdk-generator/dist/db.provider';
2
2
  import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
3
3
  import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
4
+ import { DbRecordLinkManager } from '@d19n/odin-sdk-generator/dist/db.record.link.manager';
4
5
  import { ExchangeProperties } from '../entities-v2/Exchange';
5
6
  export declare class ExchangeDb extends DbProvider {
6
7
  protected readonly principal: any;
@@ -8,6 +9,7 @@ export declare class ExchangeDb extends DbProvider {
8
9
  private readonly moduleName;
9
10
  private readonly entityName;
10
11
  private sourceRecord;
12
+ readonly region: DbRecordLinkManager;
11
13
  constructor(principal: any, dbService: any);
12
14
  setRecord(sourceRecord: any): void;
13
15
  searchRecords(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-types/dist/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<ExchangeProperties>>>;
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ExchangeDb = void 0;
13
13
  const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
14
+ const db_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/db.record.link.manager");
14
15
  class ExchangeDb extends db_provider_1.DbProvider {
15
16
  constructor(principal, dbService) {
16
17
  super(principal, dbService);
@@ -18,6 +19,7 @@ class ExchangeDb extends db_provider_1.DbProvider {
18
19
  this.entityName = 'Exchange';
19
20
  this.principal = principal;
20
21
  this.dbService = dbService;
22
+ this.region = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'FieldServiceModule:Exchange', 'FieldServiceModule:Region', 'Region__Exchange');
21
23
  }
22
24
  setRecord(sourceRecord) {
23
25
  this.sourceRecord = sourceRecord;
@@ -9,6 +9,7 @@ export declare class RegionDb extends DbProvider {
9
9
  private readonly moduleName;
10
10
  private readonly entityName;
11
11
  private sourceRecord;
12
+ readonly exchange: DbRecordLinkManager;
12
13
  readonly serviceappointmentconfig: DbRecordLinkManager;
13
14
  constructor(principal: any, dbService: any);
14
15
  setRecord(sourceRecord: any): void;
@@ -19,6 +19,7 @@ class RegionDb extends db_provider_1.DbProvider {
19
19
  this.entityName = 'Region';
20
20
  this.principal = principal;
21
21
  this.dbService = dbService;
22
+ this.exchange = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'FieldServiceModule:Region', 'FieldServiceModule:Exchange', 'Region__Exchange');
22
23
  this.serviceappointmentconfig = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'FieldServiceModule:Region', 'FieldServiceModule:ServiceAppointmentConfig', 'ServiceAppointmentConfig_Region');
23
24
  }
24
25
  setRecord(sourceRecord) {
@@ -1,4 +1,5 @@
1
- import { OdinRecord } from '@d19n/odin-types/dist/types/odin.types';
1
+ import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/types/odin.types';
2
+ import { RegionProperties } from './Region';
2
3
  export declare enum ExchangeEntityTypes {
3
4
  DEFAULT = "DEFAULT"
4
5
  }
@@ -19,6 +20,7 @@ export declare class Exchange extends OdinRecord<ExchangeProperties> {
19
20
  type: ExchangeEntityTypes;
20
21
  schemaId: 'dc379fc8-514d-4938-9d6f-a26b305dafd2';
21
22
  properties: ExchangeProperties;
23
+ Region: OdinLink<LinkedOdinRecord<RegionProperties>>;
22
24
  }
23
25
  export declare const ROUTING_KEY_EXCHANGE_CREATED = "FieldServiceModule.Exchange.SubDbRecordCreated";
24
26
  export declare const ROUTING_KEY_EXCHANGE_UPDATED = "FieldServiceModule.Exchange.SubDbRecordUpdated";
@@ -1,4 +1,5 @@
1
1
  import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/types/odin.types';
2
+ import { ExchangeProperties } from './Exchange';
2
3
  import { ServiceAppointmentConfigProperties } from './ServiceAppointmentConfig';
3
4
  export declare enum RegionEntityTypes {
4
5
  DEFAULT = "DEFAULT"
@@ -14,8 +15,11 @@ export declare class Region extends OdinRecord<RegionProperties> {
14
15
  type: RegionEntityTypes;
15
16
  schemaId: '6b5f803b-a80b-4d50-a1d6-de88fa3f68d0';
16
17
  properties: RegionProperties;
18
+ Exchange: OdinLink<LinkedOdinRecord<ExchangeProperties>>;
17
19
  ServiceAppointmentConfig: OdinLink<LinkedOdinRecord<ServiceAppointmentConfigProperties>>;
18
20
  }
19
21
  export declare const ROUTING_KEY_REGION_CREATED = "FieldServiceModule.Region.SubDbRecordCreated";
20
22
  export declare const ROUTING_KEY_REGION_UPDATED = "FieldServiceModule.Region.SubDbRecordUpdated";
21
23
  export declare const ROUTING_KEY_REGION_DELETED = "FieldServiceModule.Region.SubDbRecordDeleted";
24
+ export declare const ROUTING_KEY_LINK_REGION_EXCHANGE_CREATED = "FieldServiceModule.Region.Exchange.SubDbRecordAssociationCreated";
25
+ export declare const ROUTING_KEY_LINK_REGION_EXCHANGE_DELETED = "FieldServiceModule.Region.Exchange.SubDbRecordAssociationDeleted";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ROUTING_KEY_REGION_DELETED = exports.ROUTING_KEY_REGION_UPDATED = exports.ROUTING_KEY_REGION_CREATED = exports.Region = exports.RegionPropertyKeys = exports.RegionEntityTypes = void 0;
3
+ exports.ROUTING_KEY_LINK_REGION_EXCHANGE_DELETED = exports.ROUTING_KEY_LINK_REGION_EXCHANGE_CREATED = exports.ROUTING_KEY_REGION_DELETED = exports.ROUTING_KEY_REGION_UPDATED = exports.ROUTING_KEY_REGION_CREATED = exports.Region = exports.RegionPropertyKeys = exports.RegionEntityTypes = void 0;
4
4
  const odin_types_1 = require("@d19n/odin-types/dist/types/odin.types");
5
5
  var RegionEntityTypes;
6
6
  (function (RegionEntityTypes) {
@@ -17,3 +17,5 @@ exports.Region = Region;
17
17
  exports.ROUTING_KEY_REGION_CREATED = 'FieldServiceModule.Region.SubDbRecordCreated';
18
18
  exports.ROUTING_KEY_REGION_UPDATED = 'FieldServiceModule.Region.SubDbRecordUpdated';
19
19
  exports.ROUTING_KEY_REGION_DELETED = 'FieldServiceModule.Region.SubDbRecordDeleted';
20
+ exports.ROUTING_KEY_LINK_REGION_EXCHANGE_CREATED = 'FieldServiceModule.Region.Exchange.SubDbRecordAssociationCreated';
21
+ exports.ROUTING_KEY_LINK_REGION_EXCHANGE_DELETED = 'FieldServiceModule.Region.Exchange.SubDbRecordAssociationDeleted';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "1.0.142",
3
+ "version": "1.0.143",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",
@@ -13,9 +13,16 @@
13
13
 
14
14
  private sourceRecord: any;
15
15
 
16
+ public readonly region: ApiRecordLinkManager;
16
17
  constructor(authParams?: OauthParams, protected readonly authToken?: string) {
17
18
  super(authParams, authToken);
18
19
 
20
+ this.region = new ApiRecordLinkManager(
21
+ authParams,
22
+ 'FieldServiceModule:Exchange',
23
+ 'FieldServiceModule:Region',
24
+ 'Region__Exchange'
25
+ );
19
26
  }
20
27
 
21
28
 
@@ -13,10 +13,17 @@
13
13
 
14
14
  private sourceRecord: any;
15
15
 
16
+ public readonly exchange: ApiRecordLinkManager;
16
17
  public readonly serviceappointmentconfig: ApiRecordLinkManager;
17
18
  constructor(authParams?: OauthParams, protected readonly authToken?: string) {
18
19
  super(authParams, authToken);
19
20
 
21
+ this.exchange = new ApiRecordLinkManager(
22
+ authParams,
23
+ 'FieldServiceModule:Region',
24
+ 'FieldServiceModule:Exchange',
25
+ 'Region__Exchange'
26
+ );
20
27
  this.serviceappointmentconfig = new ApiRecordLinkManager(
21
28
  authParams,
22
29
  'FieldServiceModule:Region',
@@ -15,12 +15,20 @@
15
15
 
16
16
  private sourceRecord: any;
17
17
 
18
+ public readonly region: DbRecordLinkManager;
18
19
  constructor(principal: any, dbService: any) {
19
20
  super(principal, dbService);
20
21
 
21
22
  this.principal = principal;
22
23
  this.dbService = dbService;
23
24
 
25
+ this.region = new DbRecordLinkManager(
26
+ this.principal,
27
+ this.dbService,
28
+ 'FieldServiceModule:Exchange',
29
+ 'FieldServiceModule:Region',
30
+ 'Region__Exchange'
31
+ );
24
32
  }
25
33
 
26
34
 
@@ -15,6 +15,7 @@
15
15
 
16
16
  private sourceRecord: any;
17
17
 
18
+ public readonly exchange: DbRecordLinkManager;
18
19
  public readonly serviceappointmentconfig: DbRecordLinkManager;
19
20
  constructor(principal: any, dbService: any) {
20
21
  super(principal, dbService);
@@ -22,6 +23,13 @@
22
23
  this.principal = principal;
23
24
  this.dbService = dbService;
24
25
 
26
+ this.exchange = new DbRecordLinkManager(
27
+ this.principal,
28
+ this.dbService,
29
+ 'FieldServiceModule:Region',
30
+ 'FieldServiceModule:Exchange',
31
+ 'Region__Exchange'
32
+ );
25
33
  this.serviceappointmentconfig = new DbRecordLinkManager(
26
34
  this.principal,
27
35
  this.dbService,
@@ -3,6 +3,7 @@ import { OdinPipelineStage, OdinGroup, OdinRecord, OdinLink, LinkedOdinRecord }
3
3
  import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
4
4
 
5
5
 
6
+ import { RegionProperties } from './Region';
6
7
 
7
8
 
8
9
  export enum ExchangeEntityTypes {
@@ -36,6 +37,7 @@ export class Exchange extends OdinRecord<ExchangeProperties> {
36
37
  type: ExchangeEntityTypes;
37
38
  schemaId: 'dc379fc8-514d-4938-9d6f-a26b305dafd2';
38
39
  properties: ExchangeProperties;
40
+ Region: OdinLink<LinkedOdinRecord<RegionProperties>>;
39
41
  }
40
42
 
41
43
  // Rabbitmq event routing keys
@@ -3,6 +3,7 @@ import { OdinPipelineStage, OdinGroup, OdinRecord, OdinLink, LinkedOdinRecord }
3
3
  import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
4
4
 
5
5
 
6
+ import { ExchangeProperties } from './Exchange';
6
7
  import { ServiceAppointmentConfigProperties } from './ServiceAppointmentConfig';
7
8
 
8
9
 
@@ -28,6 +29,7 @@ export class Region extends OdinRecord<RegionProperties> {
28
29
  type: RegionEntityTypes;
29
30
  schemaId: '6b5f803b-a80b-4d50-a1d6-de88fa3f68d0';
30
31
  properties: RegionProperties;
32
+ Exchange: OdinLink<LinkedOdinRecord<ExchangeProperties>>;
31
33
  ServiceAppointmentConfig: OdinLink<LinkedOdinRecord<ServiceAppointmentConfigProperties>>;
32
34
  }
33
35
 
@@ -38,5 +40,7 @@ export class Region extends OdinRecord<RegionProperties> {
38
40
  export const ROUTING_KEY_REGION_UPDATED = 'FieldServiceModule.Region.SubDbRecordUpdated';
39
41
  export const ROUTING_KEY_REGION_DELETED = 'FieldServiceModule.Region.SubDbRecordDeleted';
40
42
 
43
+ export const ROUTING_KEY_LINK_REGION_EXCHANGE_CREATED = 'FieldServiceModule.Region.Exchange.SubDbRecordAssociationCreated'
44
+ export const ROUTING_KEY_LINK_REGION_EXCHANGE_DELETED = 'FieldServiceModule.Region.Exchange.SubDbRecordAssociationDeleted'
41
45
 
42
46