@d19n/youfibre-odin-sdk 1.0.124 → 1.0.125-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
3
3
  import { OdinRecord } from '@d19n/odin-types/dist/types/odin.types';
4
4
  interface EscalateCaseActionProperties {
5
5
  TeamId: string;
6
+ OwnerId?: string;
6
7
  }
7
8
  export declare class EscalateCaseActionDto extends OdinRecordUpdateDto {
8
9
  readonly actionName: string;
@@ -3,6 +3,7 @@ import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/
3
3
  import { OdinRecord } from '@d19n/odin-types/dist/types/odin.types';
4
4
  interface EscalateCaseActionProperties {
5
5
  TeamId: string;
6
+ OwnerId?: string;
6
7
  }
7
8
  export declare class EscalateCaseActionDto extends OdinRecordUpdateDto {
8
9
  readonly actionName: string;
@@ -19,19 +20,9 @@ export declare class CreateNoteForCaseAssignmentDto extends OdinRecordCreateDto
19
20
  }
20
21
  export interface CreateNoteForCaseAssignmentMessage extends OdinRecordCreatedEvent<CreateNoteForCaseAssignmentDto, CreateNoteForCaseAssignmentProperties> {
21
22
  }
22
- interface RemoveAssignmentFromCaseProperties {
23
- OwnerId?: string;
24
- }
25
- export declare class RemoveAssignmentFromCaseDto extends OdinRecordUpdateDto {
26
- readonly actionName: string;
27
- constructor(record: OdinRecord<any>, properties: RemoveAssignmentFromCaseProperties);
28
- }
29
- export interface RemoveAssignmentFromCaseMessage extends OdinRecordUpdatedEvent<RemoveAssignmentFromCaseDto, RemoveAssignmentFromCaseProperties> {
30
- }
31
23
  declare type StepClassMap = {
32
24
  EscalateCaseActionDto: EscalateCaseActionDto;
33
25
  CreateNoteForCaseAssignmentDto: CreateNoteForCaseAssignmentDto;
34
- RemoveAssignmentFromCaseDto: RemoveAssignmentFromCaseDto;
35
26
  };
36
27
  export interface EscalateCaseTransitionMessage extends OdinRecordUpdatedEvent<EscalateCaseTransitionDto, {}> {
37
28
  }
@@ -39,7 +30,7 @@ export declare class EscalateCaseTransitionDto extends OdinRecordUpdateDto {
39
30
  readonly actionName: string;
40
31
  readonly stageKey: string;
41
32
  constructor(record: OdinRecord<any>);
42
- static readonly stepClasses: readonly ["EscalateCaseActionDto", "CreateNoteForCaseAssignmentDto", "RemoveAssignmentFromCaseDto"];
33
+ static readonly stepClasses: readonly ["EscalateCaseActionDto", "CreateNoteForCaseAssignmentDto"];
43
34
  steps: StepClassMap[(typeof EscalateCaseTransitionDto.stepClasses)[number]][];
44
35
  }
45
36
  export declare const ROUTING_KEY_ESCALATE_CASE_TRANSITION = "EscalateCaseTransitionEvent";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ROUTING_KEY_ESCALATE_CASE_TRANSITION = exports.EscalateCaseTransitionDto = exports.RemoveAssignmentFromCaseDto = exports.CreateNoteForCaseAssignmentDto = exports.EscalateCaseActionDto = void 0;
3
+ exports.ROUTING_KEY_ESCALATE_CASE_TRANSITION = exports.EscalateCaseTransitionDto = exports.CreateNoteForCaseAssignmentDto = exports.EscalateCaseActionDto = void 0;
4
4
  const odin_dtos_1 = require("@d19n/odin-types/dist/dtos/odin.dtos");
5
5
  class EscalateCaseActionDto extends odin_dtos_1.OdinRecordUpdateDto {
6
6
  constructor(record, properties) {
@@ -20,13 +20,6 @@ class CreateNoteForCaseAssignmentDto extends odin_dtos_1.OdinRecordCreateDto {
20
20
  }
21
21
  }
22
22
  exports.CreateNoteForCaseAssignmentDto = CreateNoteForCaseAssignmentDto;
23
- class RemoveAssignmentFromCaseDto extends odin_dtos_1.OdinRecordUpdateDto {
24
- constructor(record, properties) {
25
- super(record, properties);
26
- this.actionName = 'RemoveAssignmentFromCase';
27
- }
28
- }
29
- exports.RemoveAssignmentFromCaseDto = RemoveAssignmentFromCaseDto;
30
23
  class EscalateCaseTransitionDto extends odin_dtos_1.OdinRecordUpdateDto {
31
24
  constructor(record) {
32
25
  super(record, null);
@@ -35,5 +28,5 @@ class EscalateCaseTransitionDto extends odin_dtos_1.OdinRecordUpdateDto {
35
28
  }
36
29
  }
37
30
  exports.EscalateCaseTransitionDto = EscalateCaseTransitionDto;
38
- EscalateCaseTransitionDto.stepClasses = ['EscalateCaseActionDto', 'CreateNoteForCaseAssignmentDto', 'RemoveAssignmentFromCaseDto'];
31
+ EscalateCaseTransitionDto.stepClasses = ['EscalateCaseActionDto', 'CreateNoteForCaseAssignmentDto'];
39
32
  exports.ROUTING_KEY_ESCALATE_CASE_TRANSITION = 'EscalateCaseTransitionEvent';
@@ -9,6 +9,7 @@ export declare class CustomerDeviceConfigurationApi extends ApiProvider {
9
9
  private readonly moduleName;
10
10
  private readonly entityName;
11
11
  private sourceRecord;
12
+ readonly pushnotification: ApiRecordLinkManager;
12
13
  readonly user: ApiRecordLinkManager;
13
14
  constructor(authParams?: OauthParams, authToken?: string);
14
15
  setRecord(sourceRecord: any): void;
@@ -18,6 +18,7 @@ class CustomerDeviceConfigurationApi extends api_provider_1.ApiProvider {
18
18
  this.authToken = authToken;
19
19
  this.moduleName = 'NotificationModule';
20
20
  this.entityName = 'CustomerDeviceConfiguration';
21
+ this.pushnotification = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'NotificationModule:CustomerDeviceConfiguration', 'NotificationModule:PushNotification', 'CustomerDeviceConfiguration__PushNotification');
21
22
  this.user = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'NotificationModule:CustomerDeviceConfiguration', 'IdentityModule:User', 'User__CustomerDeviceConfiguration');
22
23
  }
23
24
  setRecord(sourceRecord) {
@@ -9,6 +9,7 @@ export declare class PushNotificationApi extends ApiProvider {
9
9
  private readonly moduleName;
10
10
  private readonly entityName;
11
11
  private sourceRecord;
12
+ readonly customerdeviceconfiguration: ApiRecordLinkManager;
12
13
  readonly user: ApiRecordLinkManager;
13
14
  constructor(authParams?: OauthParams, authToken?: string);
14
15
  setRecord(sourceRecord: any): void;
@@ -18,6 +18,7 @@ class PushNotificationApi extends api_provider_1.ApiProvider {
18
18
  this.authToken = authToken;
19
19
  this.moduleName = 'NotificationModule';
20
20
  this.entityName = 'PushNotification';
21
+ this.customerdeviceconfiguration = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'NotificationModule:PushNotification', 'NotificationModule:CustomerDeviceConfiguration', 'CustomerDeviceConfiguration__PushNotification');
21
22
  this.user = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'NotificationModule:PushNotification', 'IdentityModule:User', 'User__PushNotification');
22
23
  }
23
24
  setRecord(sourceRecord) {
@@ -9,6 +9,7 @@ export declare class CustomerDeviceConfigurationDb extends DbProvider {
9
9
  private readonly moduleName;
10
10
  private readonly entityName;
11
11
  private sourceRecord;
12
+ readonly pushnotification: DbRecordLinkManager;
12
13
  readonly user: DbRecordLinkManager;
13
14
  constructor(principal: any, dbService: any);
14
15
  setRecord(sourceRecord: any): void;
@@ -19,6 +19,7 @@ class CustomerDeviceConfigurationDb extends db_provider_1.DbProvider {
19
19
  this.entityName = 'CustomerDeviceConfiguration';
20
20
  this.principal = principal;
21
21
  this.dbService = dbService;
22
+ this.pushnotification = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'NotificationModule:CustomerDeviceConfiguration', 'NotificationModule:PushNotification', 'CustomerDeviceConfiguration__PushNotification');
22
23
  this.user = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'NotificationModule:CustomerDeviceConfiguration', 'IdentityModule:User', 'User__CustomerDeviceConfiguration');
23
24
  }
24
25
  setRecord(sourceRecord) {
@@ -9,6 +9,7 @@ export declare class PushNotificationDb extends DbProvider {
9
9
  private readonly moduleName;
10
10
  private readonly entityName;
11
11
  private sourceRecord;
12
+ readonly customerdeviceconfiguration: DbRecordLinkManager;
12
13
  readonly user: DbRecordLinkManager;
13
14
  constructor(principal: any, dbService: any);
14
15
  setRecord(sourceRecord: any): void;
@@ -19,6 +19,7 @@ class PushNotificationDb extends db_provider_1.DbProvider {
19
19
  this.entityName = 'PushNotification';
20
20
  this.principal = principal;
21
21
  this.dbService = dbService;
22
+ this.customerdeviceconfiguration = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'NotificationModule:PushNotification', 'NotificationModule:CustomerDeviceConfiguration', 'CustomerDeviceConfiguration__PushNotification');
22
23
  this.user = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'NotificationModule:PushNotification', 'IdentityModule:User', 'User__PushNotification');
23
24
  }
24
25
  setRecord(sourceRecord) {
@@ -1,4 +1,5 @@
1
1
  import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/types/odin.types';
2
+ import { PushNotificationProperties } from './PushNotification';
2
3
  import { UserProperties } from './User';
3
4
  export declare enum CustomerDeviceConfigurationEntityTypes {
4
5
  DEFAULT = "DEFAULT"
@@ -22,8 +23,11 @@ export declare class CustomerDeviceConfiguration extends OdinRecord<CustomerDevi
22
23
  type: CustomerDeviceConfigurationEntityTypes;
23
24
  schemaId: '3bb94d97-e20a-4380-953c-0bf368229c06';
24
25
  properties: CustomerDeviceConfigurationProperties;
26
+ PushNotification: OdinLink<LinkedOdinRecord<PushNotificationProperties>>;
25
27
  User: OdinLink<LinkedOdinRecord<UserProperties>>;
26
28
  }
27
29
  export declare const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_CREATED = "NotificationModule.CustomerDeviceConfiguration.SubDbRecordCreated";
28
30
  export declare const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = "NotificationModule.CustomerDeviceConfiguration.SubDbRecordUpdated";
29
31
  export declare const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = "NotificationModule.CustomerDeviceConfiguration.SubDbRecordDeleted";
32
+ export declare const ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_CREATED = "NotificationModule.CustomerDeviceConfiguration.PushNotification.SubDbRecordAssociationCreated";
33
+ export declare const ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_DELETED = "NotificationModule.CustomerDeviceConfiguration.PushNotification.SubDbRecordAssociationDeleted";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_CREATED = exports.CustomerDeviceConfiguration = exports.CustomerDeviceConfigurationPropertyKeys = exports.CustomerDeviceConfigurationEntityTypes = void 0;
3
+ exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_DELETED = exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_CREATED = exports.CustomerDeviceConfiguration = exports.CustomerDeviceConfigurationPropertyKeys = exports.CustomerDeviceConfigurationEntityTypes = void 0;
4
4
  const odin_types_1 = require("@d19n/odin-types/dist/types/odin.types");
5
5
  var CustomerDeviceConfigurationEntityTypes;
6
6
  (function (CustomerDeviceConfigurationEntityTypes) {
@@ -21,3 +21,5 @@ exports.CustomerDeviceConfiguration = CustomerDeviceConfiguration;
21
21
  exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_CREATED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordCreated';
22
22
  exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordUpdated';
23
23
  exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordDeleted';
24
+ exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_CREATED = 'NotificationModule.CustomerDeviceConfiguration.PushNotification.SubDbRecordAssociationCreated';
25
+ exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_DELETED = 'NotificationModule.CustomerDeviceConfiguration.PushNotification.SubDbRecordAssociationDeleted';
@@ -1,15 +1,18 @@
1
1
  import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/types/odin.types';
2
+ import { CustomerDeviceConfigurationProperties } from './CustomerDeviceConfiguration';
2
3
  import { UserProperties } from './User';
3
4
  export declare enum PushNotificationEntityTypes {
4
5
  DEFAULT = "DEFAULT"
5
6
  }
6
7
  export declare enum PushNotificationPropertyKeys {
8
+ Seen = "Seen",
7
9
  DeviceToken = "DeviceToken",
8
10
  Message = "Message",
9
11
  Title = "Title",
10
12
  UserId = "UserId"
11
13
  }
12
14
  export interface PushNotificationProperties {
15
+ Seen?: boolean;
13
16
  DeviceToken?: string;
14
17
  Message?: string;
15
18
  Title?: string;
@@ -20,6 +23,7 @@ export declare class PushNotification extends OdinRecord<PushNotificationPropert
20
23
  type: PushNotificationEntityTypes;
21
24
  schemaId: '1ab6c541-3554-43c0-92ff-6533eb11f3de';
22
25
  properties: PushNotificationProperties;
26
+ CustomerDeviceConfiguration: OdinLink<LinkedOdinRecord<CustomerDeviceConfigurationProperties>>;
23
27
  User: OdinLink<LinkedOdinRecord<UserProperties>>;
24
28
  }
25
29
  export declare const ROUTING_KEY_PUSH_NOTIFICATION_CREATED = "NotificationModule.PushNotification.SubDbRecordCreated";
@@ -8,6 +8,7 @@ var PushNotificationEntityTypes;
8
8
  })(PushNotificationEntityTypes = exports.PushNotificationEntityTypes || (exports.PushNotificationEntityTypes = {}));
9
9
  var PushNotificationPropertyKeys;
10
10
  (function (PushNotificationPropertyKeys) {
11
+ PushNotificationPropertyKeys["Seen"] = "Seen";
11
12
  PushNotificationPropertyKeys["DeviceToken"] = "DeviceToken";
12
13
  PushNotificationPropertyKeys["Message"] = "Message";
13
14
  PushNotificationPropertyKeys["Title"] = "Title";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "1.0.124",
3
+ "version": "1.0.125-beta.1",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",
@@ -5,6 +5,7 @@ import {OdinRecord} from '@d19n/odin-types/dist/types/odin.types';
5
5
  // An Action is a single transaction that changes the properties of one or more objects.
6
6
  interface EscalateCaseActionProperties {
7
7
  TeamId: string,
8
+ OwnerId?: string,
8
9
  }
9
10
  export class EscalateCaseActionDto extends OdinRecordUpdateDto {
10
11
  public readonly actionName: string = 'EscalateCaseAction';
@@ -4,10 +4,11 @@ import {OdinRecord} from '@d19n/odin-types/dist/types/odin.types';
4
4
  // ODIN ACTION
5
5
  // An Action is a single transaction that changes the properties of one or more objects.
6
6
  //================================================
7
- // Dtos for step: Step 1
7
+ // Dtos for step: Escalate Case
8
8
  //================================================
9
9
  interface EscalateCaseActionProperties {
10
10
  TeamId: string,
11
+ OwnerId?: string,
11
12
  }
12
13
  export class EscalateCaseActionDto extends OdinRecordUpdateDto {
13
14
  public readonly actionName: string = 'EscalateCaseAction';
@@ -39,28 +40,11 @@ export class CreateNoteForCaseAssignmentDto extends OdinRecordCreateDto {
39
40
 
40
41
  export interface CreateNoteForCaseAssignmentMessage extends OdinRecordCreatedEvent<CreateNoteForCaseAssignmentDto, CreateNoteForCaseAssignmentProperties> {}
41
42
 
42
- //================================================
43
- // Dtos for step: Remove Assignment From Case
44
- //================================================
45
- interface RemoveAssignmentFromCaseProperties {
46
- OwnerId?: string,
47
- }
48
- export class RemoveAssignmentFromCaseDto extends OdinRecordUpdateDto {
49
- public readonly actionName: string = 'RemoveAssignmentFromCase';
50
- constructor(record: OdinRecord<any>, properties: RemoveAssignmentFromCaseProperties) {
51
- super(record, properties)
52
- }
53
- }
54
-
55
-
56
- export interface RemoveAssignmentFromCaseMessage extends OdinRecordUpdatedEvent<RemoveAssignmentFromCaseDto, RemoveAssignmentFromCaseProperties> {}
57
-
58
43
  //================================================
59
44
 
60
45
  type StepClassMap = {
61
46
  EscalateCaseActionDto: EscalateCaseActionDto
62
47
  CreateNoteForCaseAssignmentDto: CreateNoteForCaseAssignmentDto
63
- RemoveAssignmentFromCaseDto: RemoveAssignmentFromCaseDto
64
48
  }
65
49
 
66
50
 
@@ -75,7 +59,7 @@ export class EscalateCaseTransitionDto extends OdinRecordUpdateDto {
75
59
  super(record, null)
76
60
  }
77
61
 
78
- public static readonly stepClasses = ['EscalateCaseActionDto','CreateNoteForCaseAssignmentDto','RemoveAssignmentFromCaseDto'] as const;
62
+ public static readonly stepClasses = ['EscalateCaseActionDto','CreateNoteForCaseAssignmentDto'] as const;
79
63
 
80
64
  steps: StepClassMap[(typeof EscalateCaseTransitionDto.stepClasses)[number]][];
81
65
 
@@ -13,10 +13,17 @@
13
13
 
14
14
  private sourceRecord: any;
15
15
 
16
+ public readonly pushnotification: ApiRecordLinkManager;
16
17
  public readonly user: ApiRecordLinkManager;
17
18
  constructor(authParams?: OauthParams, protected readonly authToken?: string) {
18
19
  super(authParams, authToken);
19
20
 
21
+ this.pushnotification = new ApiRecordLinkManager(
22
+ authParams,
23
+ 'NotificationModule:CustomerDeviceConfiguration',
24
+ 'NotificationModule:PushNotification',
25
+ 'CustomerDeviceConfiguration__PushNotification'
26
+ );
20
27
  this.user = new ApiRecordLinkManager(
21
28
  authParams,
22
29
  'NotificationModule:CustomerDeviceConfiguration',
@@ -13,10 +13,17 @@
13
13
 
14
14
  private sourceRecord: any;
15
15
 
16
+ public readonly customerdeviceconfiguration: ApiRecordLinkManager;
16
17
  public readonly user: ApiRecordLinkManager;
17
18
  constructor(authParams?: OauthParams, protected readonly authToken?: string) {
18
19
  super(authParams, authToken);
19
20
 
21
+ this.customerdeviceconfiguration = new ApiRecordLinkManager(
22
+ authParams,
23
+ 'NotificationModule:PushNotification',
24
+ 'NotificationModule:CustomerDeviceConfiguration',
25
+ 'CustomerDeviceConfiguration__PushNotification'
26
+ );
20
27
  this.user = new ApiRecordLinkManager(
21
28
  authParams,
22
29
  'NotificationModule:PushNotification',
@@ -15,6 +15,7 @@
15
15
 
16
16
  private sourceRecord: any;
17
17
 
18
+ public readonly pushnotification: DbRecordLinkManager;
18
19
  public readonly user: 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.pushnotification = new DbRecordLinkManager(
27
+ this.principal,
28
+ this.dbService,
29
+ 'NotificationModule:CustomerDeviceConfiguration',
30
+ 'NotificationModule:PushNotification',
31
+ 'CustomerDeviceConfiguration__PushNotification'
32
+ );
25
33
  this.user = new DbRecordLinkManager(
26
34
  this.principal,
27
35
  this.dbService,
@@ -15,6 +15,7 @@
15
15
 
16
16
  private sourceRecord: any;
17
17
 
18
+ public readonly customerdeviceconfiguration: DbRecordLinkManager;
18
19
  public readonly user: 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.customerdeviceconfiguration = new DbRecordLinkManager(
27
+ this.principal,
28
+ this.dbService,
29
+ 'NotificationModule:PushNotification',
30
+ 'NotificationModule:CustomerDeviceConfiguration',
31
+ 'CustomerDeviceConfiguration__PushNotification'
32
+ );
25
33
  this.user = 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 { PushNotificationProperties } from './PushNotification';
6
7
  import { UserProperties } from './User';
7
8
 
8
9
 
@@ -40,6 +41,7 @@ export class CustomerDeviceConfiguration extends OdinRecord<CustomerDeviceConfig
40
41
  type: CustomerDeviceConfigurationEntityTypes;
41
42
  schemaId: '3bb94d97-e20a-4380-953c-0bf368229c06';
42
43
  properties: CustomerDeviceConfigurationProperties;
44
+ PushNotification: OdinLink<LinkedOdinRecord<PushNotificationProperties>>;
43
45
  User: OdinLink<LinkedOdinRecord<UserProperties>>;
44
46
  }
45
47
 
@@ -50,5 +52,7 @@ export class CustomerDeviceConfiguration extends OdinRecord<CustomerDeviceConfig
50
52
  export const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordUpdated';
51
53
  export const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordDeleted';
52
54
 
55
+ export const ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_CREATED = 'NotificationModule.CustomerDeviceConfiguration.PushNotification.SubDbRecordAssociationCreated'
56
+ export const ROUTING_KEY_LINK_CUSTOMER_DEVICE_CONFIGURATION_PUSH_NOTIFICATION_DELETED = 'NotificationModule.CustomerDeviceConfiguration.PushNotification.SubDbRecordAssociationDeleted'
53
57
 
54
58
 
@@ -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 { CustomerDeviceConfigurationProperties } from './CustomerDeviceConfiguration';
6
7
  import { UserProperties } from './User';
7
8
 
8
9
 
@@ -13,6 +14,7 @@ export enum PushNotificationEntityTypes {
13
14
 
14
15
 
15
16
  export enum PushNotificationPropertyKeys {
17
+ Seen = 'Seen',
16
18
  DeviceToken = 'DeviceToken',
17
19
  Message = 'Message',
18
20
  Title = 'Title',
@@ -21,6 +23,8 @@ export enum PushNotificationPropertyKeys {
21
23
 
22
24
 
23
25
  export interface PushNotificationProperties {
26
+ //Customer saw the notification
27
+ Seen?: boolean
24
28
  //Personal device token
25
29
  DeviceToken?: string
26
30
  //Body of the message
@@ -37,6 +41,7 @@ export class PushNotification extends OdinRecord<PushNotificationProperties> {
37
41
  type: PushNotificationEntityTypes;
38
42
  schemaId: '1ab6c541-3554-43c0-92ff-6533eb11f3de';
39
43
  properties: PushNotificationProperties;
44
+ CustomerDeviceConfiguration: OdinLink<LinkedOdinRecord<CustomerDeviceConfigurationProperties>>;
40
45
  User: OdinLink<LinkedOdinRecord<UserProperties>>;
41
46
  }
42
47