@d19n/youfibre-odin-sdk 1.0.140 → 1.0.141-beta.0
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.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OdinRecordCreatedEvent } from '@d19n/odin-types/dist/interfaces/rabbitmq.interfaces';
|
|
2
|
+
import { OdinRecordCreateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
3
|
+
interface CreateCashbackRewardProperties {
|
|
4
|
+
Currency?: number;
|
|
5
|
+
Amount?: number;
|
|
6
|
+
ContactId?: string;
|
|
7
|
+
CampaignId?: string;
|
|
8
|
+
AffiliateCodeId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class CreateCashbackRewardDto extends OdinRecordCreateDto {
|
|
11
|
+
readonly actionName: string;
|
|
12
|
+
constructor(properties: CreateCashbackRewardProperties);
|
|
13
|
+
}
|
|
14
|
+
export interface CreateCashbackRewardMessage extends OdinRecordCreatedEvent<CreateCashbackRewardDto, CreateCashbackRewardProperties> {
|
|
15
|
+
}
|
|
16
|
+
export declare const ROUTING_KEY_CASHBACK_REWARD_CREATED = "CashbackRewardCreated";
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROUTING_KEY_CASHBACK_REWARD_CREATED = exports.CreateCashbackRewardDto = void 0;
|
|
4
|
+
const odin_dtos_1 = require("@d19n/odin-types/dist/dtos/odin.dtos");
|
|
5
|
+
class CreateCashbackRewardDto extends odin_dtos_1.OdinRecordCreateDto {
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
super({
|
|
8
|
+
entity: 'CrmModule:Reward',
|
|
9
|
+
type: 'CASHBACK',
|
|
10
|
+
properties
|
|
11
|
+
});
|
|
12
|
+
this.actionName = 'CreateCashbackReward';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.CreateCashbackRewardDto = CreateCashbackRewardDto;
|
|
16
|
+
exports.ROUTING_KEY_CASHBACK_REWARD_CREATED = 'CashbackRewardCreated';
|
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OdinRecordUpdatedEvent, OdinRecordCreatedEvent, OdinRecordDeletedEvent, OdinRecordLinkCreatedEvent } from '@d19n/odin-types/dist/interfaces/rabbitmq.interfaces';
|
|
2
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
3
|
+
import {OdinRecord} from '@d19n/odin-types/dist/types/odin.types';
|
|
4
|
+
// ODIN ACTION
|
|
5
|
+
// An Action is a single transaction that changes the properties of one or more objects.
|
|
6
|
+
interface CreateCashbackRewardProperties {
|
|
7
|
+
Currency?: number,
|
|
8
|
+
Amount?: number,
|
|
9
|
+
ContactId?: string,
|
|
10
|
+
CampaignId?: string,
|
|
11
|
+
AffiliateCodeId?: string,
|
|
12
|
+
}
|
|
13
|
+
export class CreateCashbackRewardDto extends OdinRecordCreateDto {
|
|
14
|
+
public readonly actionName: string = 'CreateCashbackReward';
|
|
15
|
+
constructor(properties: CreateCashbackRewardProperties) {
|
|
16
|
+
super({
|
|
17
|
+
entity: 'CrmModule:Reward',
|
|
18
|
+
type: 'CASHBACK',
|
|
19
|
+
properties
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export interface CreateCashbackRewardMessage extends OdinRecordCreatedEvent<CreateCashbackRewardDto, CreateCashbackRewardProperties> {}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export const ROUTING_KEY_CASHBACK_REWARD_CREATED = 'CashbackRewardCreated';
|
|
29
|
+
|