@wix/riseevent 1.0.13 → 1.0.14
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/build/cjs/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +2 -1
- package/build/cjs/index.js +7 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +2 -1
- package/build/es/index.js +2 -1
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/context/package.json +7 -0
- package/meta/package.json +7 -0
- package/package.json +26 -8
- package/type-bundles/context.bundle.d.ts +1225 -0
- package/type-bundles/index.bundle.d.ts +1225 -0
- package/type-bundles/meta.bundle.d.ts +441 -0
- package/build/cjs/src/rise-v1-event.http.d.ts +0 -18
- package/build/cjs/src/rise-v1-event.http.js +0 -190
- package/build/cjs/src/rise-v1-event.http.js.map +0 -1
- package/build/cjs/src/rise-v1-event.public.d.ts +0 -12
- package/build/cjs/src/rise-v1-event.public.js +0 -40
- package/build/cjs/src/rise-v1-event.public.js.map +0 -1
- package/build/cjs/src/rise-v1-event.types.d.ts +0 -446
- package/build/cjs/src/rise-v1-event.types.js +0 -22
- package/build/cjs/src/rise-v1-event.types.js.map +0 -1
- package/build/cjs/src/rise-v1-event.universal.d.ts +0 -548
- package/build/cjs/src/rise-v1-event.universal.js +0 -346
- package/build/cjs/src/rise-v1-event.universal.js.map +0 -1
- package/build/es/src/rise-v1-event.http.d.ts +0 -18
- package/build/es/src/rise-v1-event.http.js +0 -182
- package/build/es/src/rise-v1-event.http.js.map +0 -1
- package/build/es/src/rise-v1-event.public.d.ts +0 -12
- package/build/es/src/rise-v1-event.public.js +0 -29
- package/build/es/src/rise-v1-event.public.js.map +0 -1
- package/build/es/src/rise-v1-event.types.d.ts +0 -446
- package/build/es/src/rise-v1-event.types.js +0 -19
- package/build/es/src/rise-v1-event.types.js.map +0 -1
- package/build/es/src/rise-v1-event.universal.d.ts +0 -548
- package/build/es/src/rise-v1-event.universal.js +0 -319
- package/build/es/src/rise-v1-event.universal.js.map +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SortOrder = exports.EventStatus = exports.EventType = exports.queryEventBalances = exports.disableEvent = exports.updateEvent = exports.getEvent = exports.createEvent = exports.__metadata = void 0;
|
|
4
|
-
const rise_v1_event_universal_1 = require("./rise-v1-event.universal");
|
|
5
|
-
exports.__metadata = { PACKAGE_NAME: '@wix/riseevent' };
|
|
6
|
-
function createEvent(httpClient) {
|
|
7
|
-
return (event) => (0, rise_v1_event_universal_1.createEvent)(event,
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
{ httpClient });
|
|
10
|
-
}
|
|
11
|
-
exports.createEvent = createEvent;
|
|
12
|
-
function getEvent(httpClient) {
|
|
13
|
-
return (eventId) => (0, rise_v1_event_universal_1.getEvent)(eventId,
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
{ httpClient });
|
|
16
|
-
}
|
|
17
|
-
exports.getEvent = getEvent;
|
|
18
|
-
function updateEvent(httpClient) {
|
|
19
|
-
return (_id, event) => (0, rise_v1_event_universal_1.updateEvent)(_id, event,
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
{ httpClient });
|
|
22
|
-
}
|
|
23
|
-
exports.updateEvent = updateEvent;
|
|
24
|
-
function disableEvent(httpClient) {
|
|
25
|
-
return (eventId, revision) => (0, rise_v1_event_universal_1.disableEvent)(eventId, revision,
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
{ httpClient });
|
|
28
|
-
}
|
|
29
|
-
exports.disableEvent = disableEvent;
|
|
30
|
-
function queryEventBalances(httpClient) {
|
|
31
|
-
return (query) => (0, rise_v1_event_universal_1.queryEventBalances)(query,
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
{ httpClient });
|
|
34
|
-
}
|
|
35
|
-
exports.queryEventBalances = queryEventBalances;
|
|
36
|
-
var rise_v1_event_universal_2 = require("./rise-v1-event.universal");
|
|
37
|
-
Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return rise_v1_event_universal_2.EventType; } });
|
|
38
|
-
Object.defineProperty(exports, "EventStatus", { enumerable: true, get: function () { return rise_v1_event_universal_2.EventStatus; } });
|
|
39
|
-
Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return rise_v1_event_universal_2.SortOrder; } });
|
|
40
|
-
//# sourceMappingURL=rise-v1-event.public.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rise-v1-event.public.js","sourceRoot":"","sources":["../../../src/rise-v1-event.public.ts"],"names":[],"mappings":";;;AACA,uEASmC;AAEtB,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAE7D,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,KAAY,EAAE,EAAE,CACtB,IAAA,qCAAoB,EAClB,KAAK;IACL,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kCAOC;AAED,SAAgB,QAAQ,CAAC,UAAsB;IAC7C,OAAO,CAAC,OAAe,EAAE,EAAE,CACzB,IAAA,kCAAiB,EACf,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,4BAOC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAkB,EAAE,KAAkB,EAAE,EAAE,CAChD,IAAA,qCAAoB,EAClB,GAAG,EACH,KAAK;IACL,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,kCAQC;AAED,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,OAAe,EAAE,QAAgB,EAAE,EAAE,CAC3C,IAAA,sCAAqB,EACnB,OAAO,EACP,QAAQ;IACR,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,oCAQC;AAED,SAAgB,kBAAkB,CAAC,UAAsB;IACvD,OAAO,CAAC,KAAc,EAAE,EAAE,CACxB,IAAA,4CAA2B,EACzB,KAAK;IACL,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,gDAOC;AAED,qEAA8E;AAArE,oHAAA,SAAS,OAAA;AAAE,sHAAA,WAAW,OAAA;AAAE,oHAAA,SAAS,OAAA"}
|
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
/** Event is the main entity of EventService */
|
|
2
|
-
export interface Event {
|
|
3
|
-
/**
|
|
4
|
-
* Event ID
|
|
5
|
-
* @readonly
|
|
6
|
-
*/
|
|
7
|
-
id?: string | null;
|
|
8
|
-
/** Represents the current state of an item. Each time the item is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision */
|
|
9
|
-
revision?: string | null;
|
|
10
|
-
/**
|
|
11
|
-
* Represents the time this Event was created
|
|
12
|
-
* @readonly
|
|
13
|
-
*/
|
|
14
|
-
createdDate?: Date;
|
|
15
|
-
/**
|
|
16
|
-
* Represents the time this Event was last updated
|
|
17
|
-
* @readonly
|
|
18
|
-
*/
|
|
19
|
-
updatedDate?: Date;
|
|
20
|
-
/** Wallet ID */
|
|
21
|
-
walletId?: string;
|
|
22
|
-
/** Represents the time when the event's amount will be added to the account */
|
|
23
|
-
startDate?: Date;
|
|
24
|
-
/** Represents the time when the unused balance will be deducted from the account */
|
|
25
|
-
expiresAt?: Date;
|
|
26
|
-
/** Represents the time when the event was manually disabled */
|
|
27
|
-
disabledAt?: Date;
|
|
28
|
-
/** The amount to be added to the customer */
|
|
29
|
-
amount?: string;
|
|
30
|
-
/** Free text comment regarding the Event context */
|
|
31
|
-
note?: string | null;
|
|
32
|
-
/** Indicates the kind of the specific event */
|
|
33
|
-
type?: EventType;
|
|
34
|
-
/**
|
|
35
|
-
* The transactionId that added the event's amount;
|
|
36
|
-
* @readonly
|
|
37
|
-
*/
|
|
38
|
-
eventAddedTransactionId?: string | null;
|
|
39
|
-
/**
|
|
40
|
-
* The transactionId that removed the remaining event's balance;
|
|
41
|
-
* @readonly
|
|
42
|
-
*/
|
|
43
|
-
eventRemovedTransactionId?: string | null;
|
|
44
|
-
status?: EventStatus;
|
|
45
|
-
}
|
|
46
|
-
export declare enum EventType {
|
|
47
|
-
UNKNOWN = "UNKNOWN",
|
|
48
|
-
REWARD = "REWARD",
|
|
49
|
-
REFUND = "REFUND"
|
|
50
|
-
}
|
|
51
|
-
export declare enum EventStatus {
|
|
52
|
-
PENDING = "PENDING",
|
|
53
|
-
ACTIVE = "ACTIVE",
|
|
54
|
-
DISABLED = "DISABLED",
|
|
55
|
-
EXPIRED = "EXPIRED"
|
|
56
|
-
}
|
|
57
|
-
export interface CreateEventRequest {
|
|
58
|
-
/** Event to be created */
|
|
59
|
-
event: Event;
|
|
60
|
-
}
|
|
61
|
-
export interface CreateEventResponse {
|
|
62
|
-
/** The created Event */
|
|
63
|
-
event?: Event;
|
|
64
|
-
}
|
|
65
|
-
export interface EventCreationExpirationDateInThePastDetails {
|
|
66
|
-
/** The date when the event expires. */
|
|
67
|
-
expiresAt?: Date;
|
|
68
|
-
/** The date when the event was tried to be created. */
|
|
69
|
-
currentDate?: Date;
|
|
70
|
-
}
|
|
71
|
-
export interface EventCreationStartLaterThanExpirationDetails {
|
|
72
|
-
/** The start date of the event. */
|
|
73
|
-
startDate?: Date;
|
|
74
|
-
/** The date when the event expires. */
|
|
75
|
-
expiresAt?: Date;
|
|
76
|
-
}
|
|
77
|
-
export interface EventCreationDisabledAtDateSetDetails {
|
|
78
|
-
/** Represents the time when the event was disabled. */
|
|
79
|
-
disabledAt?: Date;
|
|
80
|
-
}
|
|
81
|
-
export interface GetEventRequest {
|
|
82
|
-
/** ID of the Event to retrieve */
|
|
83
|
-
eventId: string;
|
|
84
|
-
}
|
|
85
|
-
export interface GetEventResponse {
|
|
86
|
-
/** The retrieved Event */
|
|
87
|
-
event?: Event;
|
|
88
|
-
}
|
|
89
|
-
export interface UpdateEventRequest {
|
|
90
|
-
/** Event to be updated, may be partial */
|
|
91
|
-
event: Event;
|
|
92
|
-
}
|
|
93
|
-
export interface UpdateEventResponse {
|
|
94
|
-
/** The updated Event */
|
|
95
|
-
event?: Event;
|
|
96
|
-
}
|
|
97
|
-
export interface InvalidEventDetails {
|
|
98
|
-
/** Event ID. */
|
|
99
|
-
eventId?: string;
|
|
100
|
-
}
|
|
101
|
-
export interface EventUpdateStartDateInThePastDetails {
|
|
102
|
-
/** Event ID. */
|
|
103
|
-
eventId?: string;
|
|
104
|
-
/** The date when the event expires. */
|
|
105
|
-
newStartDate?: Date;
|
|
106
|
-
/** The date when the event was tried to be updated. */
|
|
107
|
-
currentDate?: Date;
|
|
108
|
-
}
|
|
109
|
-
export interface EventUpdateExpirationDateInThePastDetails {
|
|
110
|
-
/** Event ID. */
|
|
111
|
-
eventId?: string;
|
|
112
|
-
/** The date when the event expires. */
|
|
113
|
-
newExpiresAt?: Date;
|
|
114
|
-
/** The date when the event was tried to be updated. */
|
|
115
|
-
currentDate?: Date;
|
|
116
|
-
}
|
|
117
|
-
export interface EventUpdateStartLaterThanExpirationDetails {
|
|
118
|
-
/** Event ID. */
|
|
119
|
-
eventId?: string;
|
|
120
|
-
/** The start date of the event. */
|
|
121
|
-
startDate?: Date;
|
|
122
|
-
/** The date when the event expires. */
|
|
123
|
-
expiresAt?: Date;
|
|
124
|
-
}
|
|
125
|
-
export interface DisableEventRequest {
|
|
126
|
-
/** ID of the Event to delete */
|
|
127
|
-
eventId: string;
|
|
128
|
-
/** The revision of the Event */
|
|
129
|
-
revision: string;
|
|
130
|
-
}
|
|
131
|
-
export interface DisableEventResponse {
|
|
132
|
-
/** The expired Event */
|
|
133
|
-
event?: Event;
|
|
134
|
-
}
|
|
135
|
-
export interface EventDisabled {
|
|
136
|
-
event?: Event;
|
|
137
|
-
}
|
|
138
|
-
export interface DeleteEventRequest {
|
|
139
|
-
/** ID of the Event to delete */
|
|
140
|
-
eventId?: string;
|
|
141
|
-
/** The revision of the Event */
|
|
142
|
-
revision?: string;
|
|
143
|
-
}
|
|
144
|
-
export interface DeleteEventResponse {
|
|
145
|
-
}
|
|
146
|
-
export interface QueryEventRequest {
|
|
147
|
-
/** WQL expression */
|
|
148
|
-
query?: QueryV2;
|
|
149
|
-
}
|
|
150
|
-
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
151
|
-
/** Paging options to limit and skip the number of items. */
|
|
152
|
-
paging?: Paging;
|
|
153
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
154
|
-
cursorPaging?: CursorPaging;
|
|
155
|
-
/**
|
|
156
|
-
* Filter object in the following format:
|
|
157
|
-
* `"filter" : {
|
|
158
|
-
* "fieldName1": "value1",
|
|
159
|
-
* "fieldName2":{"$operator":"value2"}
|
|
160
|
-
* }`
|
|
161
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
162
|
-
*/
|
|
163
|
-
filter?: Record<string, any> | null;
|
|
164
|
-
/**
|
|
165
|
-
* Sort object in the following format:
|
|
166
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
167
|
-
*/
|
|
168
|
-
sort?: Sorting[];
|
|
169
|
-
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
170
|
-
fields?: string[];
|
|
171
|
-
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
172
|
-
fieldsets?: string[];
|
|
173
|
-
}
|
|
174
|
-
/** @oneof */
|
|
175
|
-
export interface QueryV2PagingMethodOneOf {
|
|
176
|
-
/** Paging options to limit and skip the number of items. */
|
|
177
|
-
paging?: Paging;
|
|
178
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
179
|
-
cursorPaging?: CursorPaging;
|
|
180
|
-
}
|
|
181
|
-
export interface Sorting {
|
|
182
|
-
/** Name of the field to sort by. */
|
|
183
|
-
fieldName?: string;
|
|
184
|
-
/** Sort order. */
|
|
185
|
-
order?: SortOrder;
|
|
186
|
-
}
|
|
187
|
-
export declare enum SortOrder {
|
|
188
|
-
ASC = "ASC",
|
|
189
|
-
DESC = "DESC"
|
|
190
|
-
}
|
|
191
|
-
export interface Paging {
|
|
192
|
-
/** Number of items to load. */
|
|
193
|
-
limit?: number | null;
|
|
194
|
-
/** Number of items to skip in the current sort order. */
|
|
195
|
-
offset?: number | null;
|
|
196
|
-
}
|
|
197
|
-
export interface CursorPaging {
|
|
198
|
-
/** Number of items to load. */
|
|
199
|
-
limit?: number | null;
|
|
200
|
-
/**
|
|
201
|
-
* Pointer to the next or previous page in the list of results.
|
|
202
|
-
*
|
|
203
|
-
* You can get the relevant cursor token
|
|
204
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
205
|
-
* Not relevant for the first request.
|
|
206
|
-
*/
|
|
207
|
-
cursor?: string | null;
|
|
208
|
-
}
|
|
209
|
-
export interface QueryEventResponse {
|
|
210
|
-
/** The retrieved Events */
|
|
211
|
-
events?: Event[];
|
|
212
|
-
pagingMetadata?: PagingMetadataV2;
|
|
213
|
-
}
|
|
214
|
-
export interface PagingMetadataV2 {
|
|
215
|
-
/** Number of items returned in the response. */
|
|
216
|
-
count?: number | null;
|
|
217
|
-
/** Offset that was requested. */
|
|
218
|
-
offset?: number | null;
|
|
219
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
220
|
-
total?: number | null;
|
|
221
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
222
|
-
tooManyToCount?: boolean | null;
|
|
223
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
224
|
-
cursors?: Cursors;
|
|
225
|
-
}
|
|
226
|
-
export interface Cursors {
|
|
227
|
-
/** Cursor pointing to next page in the list of results. */
|
|
228
|
-
next?: string | null;
|
|
229
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
230
|
-
prev?: string | null;
|
|
231
|
-
}
|
|
232
|
-
export interface QueryEventBalancesRequest {
|
|
233
|
-
/** WQL expression */
|
|
234
|
-
query: QueryV2;
|
|
235
|
-
}
|
|
236
|
-
export interface QueryEventBalancesResponse {
|
|
237
|
-
/** The retrieved Events with their balance */
|
|
238
|
-
events?: EventWithBalance[];
|
|
239
|
-
pagingMetadata?: PagingMetadataV2;
|
|
240
|
-
}
|
|
241
|
-
export interface EventWithBalance {
|
|
242
|
-
/** Event */
|
|
243
|
-
event?: Event;
|
|
244
|
-
/** Event balance */
|
|
245
|
-
balance?: string | null;
|
|
246
|
-
}
|
|
247
|
-
export interface Task extends TaskTriggerOneOf {
|
|
248
|
-
/** A trigger which will fire once at a specified timestamp */
|
|
249
|
-
oneTime?: Date;
|
|
250
|
-
/**
|
|
251
|
-
* A recurrent trigger defined by a specified cron expression.
|
|
252
|
-
*
|
|
253
|
-
* Cron expression is a string of five space-separated sub-expressions
|
|
254
|
-
*
|
|
255
|
-
* * * * * *
|
|
256
|
-
* | | | | |
|
|
257
|
-
* minute of hour | | | day of week
|
|
258
|
-
* hour of day | month of year
|
|
259
|
-
* day of month
|
|
260
|
-
*
|
|
261
|
-
* Field Accepted values
|
|
262
|
-
* ----- ---------------
|
|
263
|
-
* minute of hour 0..59 / * ,
|
|
264
|
-
* hour of day 0..23 / * ,
|
|
265
|
-
* day of month 1..31 / * , W L
|
|
266
|
-
* month of year 1..12 / * ,
|
|
267
|
-
* day of week 0..7 MON..SUN / * W L #
|
|
268
|
-
*
|
|
269
|
-
* Coma separates multiple values:
|
|
270
|
-
* 0,20,40 * * * * => on 0th, 20th and 40th minute
|
|
271
|
-
* Slash selects every Nth value:
|
|
272
|
-
* * /20 * * * * => equivalent to 0,20,40
|
|
273
|
-
* 5/20 * * * * => on 5th, 25th and 45th minute
|
|
274
|
-
* W selects working days
|
|
275
|
-
* 0 2 * * W => 2am on Mon..Fri
|
|
276
|
-
* L selects the last day of ...
|
|
277
|
-
* 0 0 L * * => last day of each month
|
|
278
|
-
* 0 0 LW * * => last working day of each month
|
|
279
|
-
* 0 0 * * FRIL => midnight of the last Friday of the month
|
|
280
|
-
* Hash selects Nth day of week
|
|
281
|
-
* 0 0 * * Mon#1 => midnight of the first Monday of the month
|
|
282
|
-
*
|
|
283
|
-
* Following aliases are supported: @hourly, @daily, @weekly, @monthly
|
|
284
|
-
*
|
|
285
|
-
* The first execution time will be evaluated based on the client invocation time (approximately the moment the
|
|
286
|
-
* client call returns).
|
|
287
|
-
* All executions will be evaluated in UTC.
|
|
288
|
-
*
|
|
289
|
-
* Example:
|
|
290
|
-
* 00:19:59 - client schedules a task with cron = 0/20 * * * * (every 20-th minute of the hour)
|
|
291
|
-
* 00:20:02 - task reaches Time Capsule database
|
|
292
|
-
* 00:21:00 - task is executed by Time Capsule, the client is triggered with a ~1 minute delay
|
|
293
|
-
* 00:40:00 - task is executed by Time Capsule according to the schedule with no delay
|
|
294
|
-
*/
|
|
295
|
-
cron?: string;
|
|
296
|
-
/** Task id */
|
|
297
|
-
id?: TaskId;
|
|
298
|
-
/** Task payload */
|
|
299
|
-
payload?: Record<string, any> | null;
|
|
300
|
-
/**
|
|
301
|
-
* A Greyhound topic to which the task will be produced when triggered
|
|
302
|
-
* @readonly
|
|
303
|
-
*/
|
|
304
|
-
topic?: string;
|
|
305
|
-
/**
|
|
306
|
-
* The time when this task is scheduled to trigger. For reoccurring tasks, this will be hold the next time this task will run and will be updated after every run
|
|
307
|
-
* @readonly
|
|
308
|
-
*/
|
|
309
|
-
scheduledFor?: Date;
|
|
310
|
-
}
|
|
311
|
-
/** @oneof */
|
|
312
|
-
export interface TaskTriggerOneOf {
|
|
313
|
-
/** A trigger which will fire once at a specified timestamp */
|
|
314
|
-
oneTime?: Date;
|
|
315
|
-
/**
|
|
316
|
-
* A recurrent trigger defined by a specified cron expression.
|
|
317
|
-
*
|
|
318
|
-
* Cron expression is a string of five space-separated sub-expressions
|
|
319
|
-
*
|
|
320
|
-
* * * * * *
|
|
321
|
-
* | | | | |
|
|
322
|
-
* minute of hour | | | day of week
|
|
323
|
-
* hour of day | month of year
|
|
324
|
-
* day of month
|
|
325
|
-
*
|
|
326
|
-
* Field Accepted values
|
|
327
|
-
* ----- ---------------
|
|
328
|
-
* minute of hour 0..59 / * ,
|
|
329
|
-
* hour of day 0..23 / * ,
|
|
330
|
-
* day of month 1..31 / * , W L
|
|
331
|
-
* month of year 1..12 / * ,
|
|
332
|
-
* day of week 0..7 MON..SUN / * W L #
|
|
333
|
-
*
|
|
334
|
-
* Coma separates multiple values:
|
|
335
|
-
* 0,20,40 * * * * => on 0th, 20th and 40th minute
|
|
336
|
-
* Slash selects every Nth value:
|
|
337
|
-
* * /20 * * * * => equivalent to 0,20,40
|
|
338
|
-
* 5/20 * * * * => on 5th, 25th and 45th minute
|
|
339
|
-
* W selects working days
|
|
340
|
-
* 0 2 * * W => 2am on Mon..Fri
|
|
341
|
-
* L selects the last day of ...
|
|
342
|
-
* 0 0 L * * => last day of each month
|
|
343
|
-
* 0 0 LW * * => last working day of each month
|
|
344
|
-
* 0 0 * * FRIL => midnight of the last Friday of the month
|
|
345
|
-
* Hash selects Nth day of week
|
|
346
|
-
* 0 0 * * Mon#1 => midnight of the first Monday of the month
|
|
347
|
-
*
|
|
348
|
-
* Following aliases are supported: @hourly, @daily, @weekly, @monthly
|
|
349
|
-
*
|
|
350
|
-
* The first execution time will be evaluated based on the client invocation time (approximately the moment the
|
|
351
|
-
* client call returns).
|
|
352
|
-
* All executions will be evaluated in UTC.
|
|
353
|
-
*
|
|
354
|
-
* Example:
|
|
355
|
-
* 00:19:59 - client schedules a task with cron = 0/20 * * * * (every 20-th minute of the hour)
|
|
356
|
-
* 00:20:02 - task reaches Time Capsule database
|
|
357
|
-
* 00:21:00 - task is executed by Time Capsule, the client is triggered with a ~1 minute delay
|
|
358
|
-
* 00:40:00 - task is executed by Time Capsule according to the schedule with no delay
|
|
359
|
-
*/
|
|
360
|
-
cron?: string;
|
|
361
|
-
}
|
|
362
|
-
export interface TaskId {
|
|
363
|
-
/** A unique identifier of an application or a source that define the task. In most cases this would be the appDefId */
|
|
364
|
-
namespace?: string;
|
|
365
|
-
/**
|
|
366
|
-
* A free-form string distinguishing different families of tasks within a namespace.
|
|
367
|
-
* For example: "send-promo-email", "ClearTrashBin", "premium expiration reminder"
|
|
368
|
-
*/
|
|
369
|
-
taskType?: string;
|
|
370
|
-
/**
|
|
371
|
-
* A free-form string that together with `namespace` and `task_type` uniquely identifies a task.
|
|
372
|
-
* When there is an entity involved, setting this to be equal to the ID of an entity related to the task is a good option.
|
|
373
|
-
*/
|
|
374
|
-
key?: string;
|
|
375
|
-
}
|
|
376
|
-
export interface Empty {
|
|
377
|
-
}
|
|
378
|
-
export interface EventExpired {
|
|
379
|
-
event?: Event;
|
|
380
|
-
}
|
|
381
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
382
|
-
createdEvent?: EntityCreatedEvent;
|
|
383
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
384
|
-
deletedEvent?: EntityDeletedEvent;
|
|
385
|
-
actionEvent?: ActionEvent;
|
|
386
|
-
/** random GUID so clients can tell if event was already handled */
|
|
387
|
-
id?: string;
|
|
388
|
-
/**
|
|
389
|
-
* Assumes actions are also always typed to an entity_type
|
|
390
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
391
|
-
*/
|
|
392
|
-
entityFqdn?: string;
|
|
393
|
-
/**
|
|
394
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
395
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
396
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
397
|
-
*/
|
|
398
|
-
slug?: string;
|
|
399
|
-
/**
|
|
400
|
-
* Assuming that all messages including Actions have id
|
|
401
|
-
* Example: The id of the specific order, the id of a specific campaign
|
|
402
|
-
*/
|
|
403
|
-
entityId?: string;
|
|
404
|
-
/** The time of the event. Useful if there was a delay in dispatching */
|
|
405
|
-
eventTime?: Date;
|
|
406
|
-
/**
|
|
407
|
-
* A field that should be set if this event was triggered by an anonymize request.
|
|
408
|
-
* For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.
|
|
409
|
-
* NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers.
|
|
410
|
-
*/
|
|
411
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
412
|
-
/** If present, indicates the action that triggered the event. */
|
|
413
|
-
originatedFrom?: string | null;
|
|
414
|
-
/**
|
|
415
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
416
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
417
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
418
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
419
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
420
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
421
|
-
*/
|
|
422
|
-
entityEventSequence?: string | null;
|
|
423
|
-
}
|
|
424
|
-
/** @oneof */
|
|
425
|
-
export interface DomainEventBodyOneOf {
|
|
426
|
-
createdEvent?: EntityCreatedEvent;
|
|
427
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
428
|
-
deletedEvent?: EntityDeletedEvent;
|
|
429
|
-
actionEvent?: ActionEvent;
|
|
430
|
-
}
|
|
431
|
-
export interface EntityCreatedEvent {
|
|
432
|
-
entityAsJson?: string;
|
|
433
|
-
}
|
|
434
|
-
export interface EntityUpdatedEvent {
|
|
435
|
-
/**
|
|
436
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
437
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
438
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
439
|
-
*/
|
|
440
|
-
currentEntityAsJson?: string;
|
|
441
|
-
}
|
|
442
|
-
export interface EntityDeletedEvent {
|
|
443
|
-
}
|
|
444
|
-
export interface ActionEvent {
|
|
445
|
-
bodyAsJson?: string;
|
|
446
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SortOrder = exports.EventStatus = exports.EventType = void 0;
|
|
4
|
-
var EventType;
|
|
5
|
-
(function (EventType) {
|
|
6
|
-
EventType["UNKNOWN"] = "UNKNOWN";
|
|
7
|
-
EventType["REWARD"] = "REWARD";
|
|
8
|
-
EventType["REFUND"] = "REFUND";
|
|
9
|
-
})(EventType = exports.EventType || (exports.EventType = {}));
|
|
10
|
-
var EventStatus;
|
|
11
|
-
(function (EventStatus) {
|
|
12
|
-
EventStatus["PENDING"] = "PENDING";
|
|
13
|
-
EventStatus["ACTIVE"] = "ACTIVE";
|
|
14
|
-
EventStatus["DISABLED"] = "DISABLED";
|
|
15
|
-
EventStatus["EXPIRED"] = "EXPIRED";
|
|
16
|
-
})(EventStatus = exports.EventStatus || (exports.EventStatus = {}));
|
|
17
|
-
var SortOrder;
|
|
18
|
-
(function (SortOrder) {
|
|
19
|
-
SortOrder["ASC"] = "ASC";
|
|
20
|
-
SortOrder["DESC"] = "DESC";
|
|
21
|
-
})(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
|
|
22
|
-
//# sourceMappingURL=rise-v1-event.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rise-v1-event.types.js","sourceRoot":"","sources":["../../../src/rise-v1-event.types.ts"],"names":[],"mappings":";;;AA8CA,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACnB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAED,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAyJD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
|