@orderingstack/ordering-types 1.18.1 → 1.18.3
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/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/loyalty.d.ts +77 -5
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/loyalty.d.ts +77 -5
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -87,6 +87,7 @@ var EOrderSource;
|
|
|
87
87
|
EOrderSource["UBER"] = "UBER";
|
|
88
88
|
EOrderSource["BOLT"] = "BOLT";
|
|
89
89
|
EOrderSource["TAZZ"] = "TAZZ";
|
|
90
|
+
EOrderSource["POS"] = "POS";
|
|
90
91
|
})(EOrderSource = exports.EOrderSource || (exports.EOrderSource = {}));
|
|
91
92
|
var EChannelName;
|
|
92
93
|
(function (EChannelName) {
|
package/dist/cjs/loyalty.d.ts
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
import { IOrder } from "./index";
|
|
2
|
+
/** States define flow of campaign */
|
|
3
|
+
interface CampaignStateDefinition {
|
|
4
|
+
/**
|
|
5
|
+
* @minLength 1
|
|
6
|
+
* @maxLength 32
|
|
7
|
+
* @pattern [a-zA-Z0-9_-]+
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* @minLength 1
|
|
12
|
+
* @maxLength 32
|
|
13
|
+
* @pattern [a-zA-Z0-9_-]+
|
|
14
|
+
*/
|
|
15
|
+
transitionTo?: string;
|
|
16
|
+
/** @format int64 */
|
|
17
|
+
stats?: number;
|
|
18
|
+
type: string;
|
|
19
|
+
}
|
|
20
|
+
/** Define push notification templates */
|
|
21
|
+
export interface CampaignNotification {
|
|
22
|
+
/**
|
|
23
|
+
* @minLength 0
|
|
24
|
+
* @maxLength 256
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
/**
|
|
28
|
+
* @minLength 0
|
|
29
|
+
* @maxLength 256
|
|
30
|
+
*/
|
|
31
|
+
message: string;
|
|
32
|
+
/**
|
|
33
|
+
* @minLength 0
|
|
34
|
+
* @maxLength 256
|
|
35
|
+
*/
|
|
36
|
+
image?: string;
|
|
37
|
+
payload?: Record<string, string>;
|
|
38
|
+
type: string;
|
|
39
|
+
}
|
|
2
40
|
export interface Campaign {
|
|
3
41
|
/**
|
|
4
42
|
* @minLength 0
|
|
@@ -6,24 +44,58 @@ export interface Campaign {
|
|
|
6
44
|
* @pattern [a-zA-Z0-9_-]+
|
|
7
45
|
*/
|
|
8
46
|
id: string;
|
|
9
|
-
initialized?: boolean;
|
|
10
47
|
/**
|
|
11
|
-
*
|
|
48
|
+
* Name of a campaign
|
|
49
|
+
* @minLength 3
|
|
12
50
|
* @maxLength 128
|
|
13
51
|
*/
|
|
14
52
|
name: string;
|
|
53
|
+
/** @format date-time */
|
|
54
|
+
activeFrom?: string;
|
|
55
|
+
/** @format date-time */
|
|
56
|
+
activeTo?: string;
|
|
15
57
|
/**
|
|
58
|
+
* Constraints are rules that specify which accounts fall info the campaign.
|
|
16
59
|
* @maxItems 16
|
|
17
60
|
* @minItems 1
|
|
18
61
|
*/
|
|
19
62
|
constraints: Constraint[];
|
|
20
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* States define flow of campaign
|
|
65
|
+
* @maxItems 10
|
|
66
|
+
* @minItems 1
|
|
67
|
+
*/
|
|
68
|
+
states: CampaignStateDefinition[];
|
|
69
|
+
/** Flag that determine if campaign can be dynamically joined upon account change or only initially assigned accounts take part in campaign. */
|
|
70
|
+
dynamic?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Define push notification templates
|
|
73
|
+
* @maxItems 3
|
|
74
|
+
* @minItems 0
|
|
75
|
+
*/
|
|
76
|
+
notifications?: CampaignNotification[];
|
|
77
|
+
/**
|
|
78
|
+
* When campaign was initialized
|
|
79
|
+
* @format date-time
|
|
80
|
+
*/
|
|
21
81
|
initializedAt?: string;
|
|
82
|
+
/** Who initialized the campaign */
|
|
22
83
|
initializedBy?: string;
|
|
23
|
-
/**
|
|
84
|
+
/** Whether campaign is initialized and running. There is a limit of simultaneously running campaigns. */
|
|
85
|
+
initialized?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Number of accounts that fall info the campaign. Before initialization this is a predicted value, after initialization it is current value updated upon dynamic joins etc.
|
|
88
|
+
* @format int64
|
|
89
|
+
*/
|
|
24
90
|
cnt?: number;
|
|
25
|
-
/**
|
|
91
|
+
/** How many accounts finished each campaign state */
|
|
92
|
+
stateStats?: Record<string, number>;
|
|
93
|
+
/**
|
|
94
|
+
* Preview generated at
|
|
95
|
+
* @format date-time
|
|
96
|
+
*/
|
|
26
97
|
previewedAt?: string;
|
|
98
|
+
/** Sample account ids for preview */
|
|
27
99
|
samples?: string[];
|
|
28
100
|
}
|
|
29
101
|
interface Constraint {
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/loyalty.d.ts
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
import { IOrder } from "./index";
|
|
2
|
+
/** States define flow of campaign */
|
|
3
|
+
interface CampaignStateDefinition {
|
|
4
|
+
/**
|
|
5
|
+
* @minLength 1
|
|
6
|
+
* @maxLength 32
|
|
7
|
+
* @pattern [a-zA-Z0-9_-]+
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* @minLength 1
|
|
12
|
+
* @maxLength 32
|
|
13
|
+
* @pattern [a-zA-Z0-9_-]+
|
|
14
|
+
*/
|
|
15
|
+
transitionTo?: string;
|
|
16
|
+
/** @format int64 */
|
|
17
|
+
stats?: number;
|
|
18
|
+
type: string;
|
|
19
|
+
}
|
|
20
|
+
/** Define push notification templates */
|
|
21
|
+
export interface CampaignNotification {
|
|
22
|
+
/**
|
|
23
|
+
* @minLength 0
|
|
24
|
+
* @maxLength 256
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
/**
|
|
28
|
+
* @minLength 0
|
|
29
|
+
* @maxLength 256
|
|
30
|
+
*/
|
|
31
|
+
message: string;
|
|
32
|
+
/**
|
|
33
|
+
* @minLength 0
|
|
34
|
+
* @maxLength 256
|
|
35
|
+
*/
|
|
36
|
+
image?: string;
|
|
37
|
+
payload?: Record<string, string>;
|
|
38
|
+
type: string;
|
|
39
|
+
}
|
|
2
40
|
export interface Campaign {
|
|
3
41
|
/**
|
|
4
42
|
* @minLength 0
|
|
@@ -6,24 +44,58 @@ export interface Campaign {
|
|
|
6
44
|
* @pattern [a-zA-Z0-9_-]+
|
|
7
45
|
*/
|
|
8
46
|
id: string;
|
|
9
|
-
initialized?: boolean;
|
|
10
47
|
/**
|
|
11
|
-
*
|
|
48
|
+
* Name of a campaign
|
|
49
|
+
* @minLength 3
|
|
12
50
|
* @maxLength 128
|
|
13
51
|
*/
|
|
14
52
|
name: string;
|
|
53
|
+
/** @format date-time */
|
|
54
|
+
activeFrom?: string;
|
|
55
|
+
/** @format date-time */
|
|
56
|
+
activeTo?: string;
|
|
15
57
|
/**
|
|
58
|
+
* Constraints are rules that specify which accounts fall info the campaign.
|
|
16
59
|
* @maxItems 16
|
|
17
60
|
* @minItems 1
|
|
18
61
|
*/
|
|
19
62
|
constraints: Constraint[];
|
|
20
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* States define flow of campaign
|
|
65
|
+
* @maxItems 10
|
|
66
|
+
* @minItems 1
|
|
67
|
+
*/
|
|
68
|
+
states: CampaignStateDefinition[];
|
|
69
|
+
/** Flag that determine if campaign can be dynamically joined upon account change or only initially assigned accounts take part in campaign. */
|
|
70
|
+
dynamic?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Define push notification templates
|
|
73
|
+
* @maxItems 3
|
|
74
|
+
* @minItems 0
|
|
75
|
+
*/
|
|
76
|
+
notifications?: CampaignNotification[];
|
|
77
|
+
/**
|
|
78
|
+
* When campaign was initialized
|
|
79
|
+
* @format date-time
|
|
80
|
+
*/
|
|
21
81
|
initializedAt?: string;
|
|
82
|
+
/** Who initialized the campaign */
|
|
22
83
|
initializedBy?: string;
|
|
23
|
-
/**
|
|
84
|
+
/** Whether campaign is initialized and running. There is a limit of simultaneously running campaigns. */
|
|
85
|
+
initialized?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Number of accounts that fall info the campaign. Before initialization this is a predicted value, after initialization it is current value updated upon dynamic joins etc.
|
|
88
|
+
* @format int64
|
|
89
|
+
*/
|
|
24
90
|
cnt?: number;
|
|
25
|
-
/**
|
|
91
|
+
/** How many accounts finished each campaign state */
|
|
92
|
+
stateStats?: Record<string, number>;
|
|
93
|
+
/**
|
|
94
|
+
* Preview generated at
|
|
95
|
+
* @format date-time
|
|
96
|
+
*/
|
|
26
97
|
previewedAt?: string;
|
|
98
|
+
/** Sample account ids for preview */
|
|
27
99
|
samples?: string[];
|
|
28
100
|
}
|
|
29
101
|
interface Constraint {
|