@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.
@@ -203,7 +203,8 @@ export declare enum EOrderSource {
203
203
  WOLT = "WOLT",
204
204
  UBER = "UBER",
205
205
  BOLT = "BOLT",
206
- TAZZ = "TAZZ"
206
+ TAZZ = "TAZZ",
207
+ POS = "POS"
207
208
  }
208
209
  export declare enum EChannelName {
209
210
  DINE_IN = "DINE_IN",
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) {
@@ -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
- * @minLength 0
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
- /** @format date-time */
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
- /** @format int64 */
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
- /** @format date-time */
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 {
@@ -203,7 +203,8 @@ export declare enum EOrderSource {
203
203
  WOLT = "WOLT",
204
204
  UBER = "UBER",
205
205
  BOLT = "BOLT",
206
- TAZZ = "TAZZ"
206
+ TAZZ = "TAZZ",
207
+ POS = "POS"
207
208
  }
208
209
  export declare enum EChannelName {
209
210
  DINE_IN = "DINE_IN",
package/dist/esm/index.js CHANGED
@@ -70,6 +70,7 @@ export var EOrderSource;
70
70
  EOrderSource["UBER"] = "UBER";
71
71
  EOrderSource["BOLT"] = "BOLT";
72
72
  EOrderSource["TAZZ"] = "TAZZ";
73
+ EOrderSource["POS"] = "POS";
73
74
  })(EOrderSource || (EOrderSource = {}));
74
75
  export var EChannelName;
75
76
  (function (EChannelName) {
@@ -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
- * @minLength 0
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
- /** @format date-time */
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
- /** @format int64 */
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
- /** @format date-time */
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.18.1",
3
+ "version": "1.18.3",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",