@wix/bex-utils 2.39.0 → 2.40.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.
Files changed (97) hide show
  1. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/builders.impl.d.ts +47 -0
  2. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/builders.impl.js +524 -0
  3. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/builders.impl.js.map +1 -0
  4. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/crud/http.impl.d.ts +1 -0
  5. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/crud/http.impl.js +5 -0
  6. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/crud/http.impl.js.map +1 -0
  7. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/crud/rpc.impl.d.ts +11 -0
  8. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/crud/rpc.impl.js +41 -0
  9. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/crud/rpc.impl.js.map +1 -0
  10. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/http.impl.d.ts +16 -0
  11. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/http.impl.js +249 -0
  12. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/http.impl.js.map +1 -0
  13. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/meta.impl.d.ts +30 -0
  14. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/meta.impl.js +157 -0
  15. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/meta.impl.js.map +1 -0
  16. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/proto/client/proto-generated.d.ts +7218 -0
  17. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/proto/client/proto-generated.js +2 -0
  18. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/proto/proto-generated.d.ts +3608 -0
  19. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/proto/proto-generated.js +59567 -0
  20. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/proto/server/proto-generated.d.ts +7211 -0
  21. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/proto/server/proto-generated.js +2 -0
  22. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/rpc.impl.d.ts +25 -0
  23. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/rpc.impl.js +123 -0
  24. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/rpc.impl.js.map +1 -0
  25. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/types.impl.d.ts +469 -0
  26. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/types.impl.js +52 -0
  27. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/cjs/types.impl.js.map +1 -0
  28. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/builders.impl.d.ts +47 -0
  29. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/builders.impl.js +463 -0
  30. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/builders.impl.js.map +1 -0
  31. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/crud/http.impl.d.ts +1 -0
  32. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/crud/http.impl.js +2 -0
  33. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/crud/http.impl.js.map +1 -0
  34. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/crud/rpc.impl.d.ts +11 -0
  35. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/crud/rpc.impl.js +34 -0
  36. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/crud/rpc.impl.js.map +1 -0
  37. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/http.impl.d.ts +16 -0
  38. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/http.impl.js +239 -0
  39. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/http.impl.js.map +1 -0
  40. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/meta.impl.d.ts +30 -0
  41. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/meta.impl.js +128 -0
  42. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/meta.impl.js.map +1 -0
  43. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/rpc.impl.d.ts +25 -0
  44. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/rpc.impl.js +94 -0
  45. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/rpc.impl.js.map +1 -0
  46. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/types.impl.d.ts +469 -0
  47. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/types.impl.js +49 -0
  48. package/@wix/ambassador-infra-asyncjobs-v1-async-job/build/es/types.impl.js.map +1 -0
  49. package/@wix/ambassador-infra-asyncjobs-v1-async-job/builders/package.json +7 -0
  50. package/@wix/ambassador-infra-asyncjobs-v1-async-job/crud/http/package.json +7 -0
  51. package/@wix/ambassador-infra-asyncjobs-v1-async-job/crud/rpc/package.json +6 -0
  52. package/@wix/ambassador-infra-asyncjobs-v1-async-job/http/package.json +7 -0
  53. package/@wix/ambassador-infra-asyncjobs-v1-async-job/meta/package.json +7 -0
  54. package/@wix/ambassador-infra-asyncjobs-v1-async-job/package.json +53 -0
  55. package/@wix/ambassador-infra-asyncjobs-v1-async-job/rpc/package.json +6 -0
  56. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/action_payload.proto +33 -0
  57. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/annotations.proto +395 -0
  58. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/api_errors.proto +117 -0
  59. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/callback.proto +157 -0
  60. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/context.proto +19 -0
  61. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/entity.proto +122 -0
  62. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/errors.proto +121 -0
  63. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/idempotency.proto +25 -0
  64. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/permissions.proto +40 -0
  65. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/sla.proto +24 -0
  66. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/subscription.proto +32 -0
  67. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/api/validations.proto +142 -0
  68. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/address.proto +148 -0
  69. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/bulk.proto +53 -0
  70. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/identification.proto +40 -0
  71. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/image.proto +8 -0
  72. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/media.proto +253 -0
  73. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/money.proto +32 -0
  74. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/pageurl.proto +32 -0
  75. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/paging.proto +121 -0
  76. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/query.proto +795 -0
  77. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/sorting.proto +36 -0
  78. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/spi.proto +85 -0
  79. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/tags.proto +55 -0
  80. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/common/wixlink.proto +203 -0
  81. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/graphql/definitions.proto +13 -0
  82. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/http/field_mask.proto +46 -0
  83. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/infra/asyncjobs/v1/AsyncJob.proto +156 -0
  84. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/infra/asyncjobs/v1/AsyncJobItem.proto +33 -0
  85. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/infra/asyncjobs/v1/AsyncJobService.proto +339 -0
  86. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/infra/asyncjobs/v1/upstream/wix/common/paging.proto +36 -0
  87. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/sdk/definitions.proto +191 -0
  88. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/spi/definitions.proto +186 -0
  89. package/@wix/ambassador-infra-asyncjobs-v1-async-job/src/main/proto/wix/spi/http_error_status.proto +24 -0
  90. package/@wix/ambassador-infra-asyncjobs-v1-async-job/types/package.json +7 -0
  91. package/@wix/bex-bundled-mini-essentials/dist/tsconfig.tsbuildinfo +1 -1
  92. package/dist/cjs/FocusableWrapper/scrollAndFocus.js +3 -1
  93. package/dist/cjs/FocusableWrapper/scrollAndFocus.js.map +1 -1
  94. package/dist/esm/FocusableWrapper/scrollAndFocus.js +4 -1
  95. package/dist/esm/FocusableWrapper/scrollAndFocus.js.map +1 -1
  96. package/dist/types/FocusableWrapper/scrollAndFocus.d.ts.map +1 -1
  97. package/package.json +3 -2
@@ -0,0 +1,469 @@
1
+ export interface AsyncJob {
2
+ /**
3
+ * Job ID.
4
+ * @readonly
5
+ */
6
+ id?: string;
7
+ /** Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc. */
8
+ metadata?: Record<string, any> | null;
9
+ /** Current job execution status. */
10
+ status?: Status;
11
+ /**
12
+ * Current counters.
13
+ * @deprecated Current counters.
14
+ * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.counts
15
+ * @targetRemovalDate 2024-12-12
16
+ */
17
+ counters?: Counters;
18
+ /**
19
+ * Date and time the job was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
20
+ * @readonly
21
+ */
22
+ createdDate?: Date | null;
23
+ /**
24
+ * Date and time the job was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
25
+ * @readonly
26
+ */
27
+ updatedDate?: Date | null;
28
+ /**
29
+ * Job owner.
30
+ * @readonly
31
+ * @deprecated Job owner.
32
+ * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.created_by
33
+ * @targetRemovalDate 2024-12-12
34
+ */
35
+ owner?: Owner;
36
+ /**
37
+ * Job creator.
38
+ * @readonly
39
+ */
40
+ createdBy?: CreatedBy;
41
+ /** Current execution counts. */
42
+ counts?: Counts;
43
+ }
44
+ export declare enum Type {
45
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
46
+ /** Job was created by a site visitor that was **not** logged in. */
47
+ ANONYMOUS_VISITOR_ID = "ANONYMOUS_VISITOR_ID",
48
+ /** Job was created by a **logged in** site visitor. */
49
+ MEMBER_ID = "MEMBER_ID",
50
+ /** Job was created by a Wix user. */
51
+ WIX_USER_ID = "WIX_USER_ID",
52
+ /** Job was created by an external app or app by Wix. */
53
+ APP_ID = "APP_ID"
54
+ }
55
+ export interface AnonymousVisitorIdOptions {
56
+ /** Visitor ID - When the job is owned by a site visitor that was **not** logged in. */
57
+ anonymousVisitorId?: string;
58
+ }
59
+ export interface MemberIdOptions {
60
+ /** Member ID - When the job is owned by a by a **logged in** site visitor. */
61
+ memberId?: string;
62
+ }
63
+ export interface WixUserIdOptions {
64
+ /** User ID - When the job is owned by a site owner or contributor. */
65
+ wixUserId?: string;
66
+ }
67
+ export interface AppIdOptions {
68
+ /** App ID - When the job is owned by an external app. or app by Wix. */
69
+ appId?: string;
70
+ }
71
+ export declare enum Status {
72
+ UNKNOWN = "UNKNOWN",
73
+ /** Job is created, but hasn't started yet. */
74
+ INITIALIZED = "INITIALIZED",
75
+ /** Job has started and is in progress. */
76
+ PROCESSING = "PROCESSING",
77
+ /** Job is finished. */
78
+ FINISHED = "FINISHED",
79
+ /** Job has failed. */
80
+ FAILED = "FAILED"
81
+ }
82
+ export interface Counters {
83
+ /** Optional count of the dataset size, as specified during job creation. Can be used for progress bars, etc. */
84
+ itemsToProcess?: number | null;
85
+ /** Amount of items that were successfully processed. */
86
+ itemsSucceeded?: number;
87
+ /** Amount of items whose processing failed. */
88
+ itemsFailed?: number;
89
+ /** Mapping between an error code and the number of failures associated with it. */
90
+ errorCountByCode?: Record<string, number>;
91
+ }
92
+ export interface Owner extends OwnerIdOneOf {
93
+ /** Visitor ID - when the job is owned by a site visitor that was **not** logged in. */
94
+ anonymousVisitorId?: string;
95
+ /** Member ID - When the job is owned by a by a **logged in** site visitor. */
96
+ memberId?: string;
97
+ /** User ID - When the job is owned by a Wix user. */
98
+ wixUserId?: string;
99
+ /** App ID - When the job is owned by an external app or app by Wix. */
100
+ appId?: string;
101
+ /** Service ID. */
102
+ serviceId?: string;
103
+ }
104
+ /** @oneof */
105
+ export interface OwnerIdOneOf {
106
+ /** Visitor ID - when the job is owned by a site visitor that was **not** logged in. */
107
+ anonymousVisitorId?: string;
108
+ /** Member ID - When the job is owned by a by a **logged in** site visitor. */
109
+ memberId?: string;
110
+ /** User ID - When the job is owned by a Wix user. */
111
+ wixUserId?: string;
112
+ /** App ID - When the job is owned by an external app or app by Wix. */
113
+ appId?: string;
114
+ /** Service ID. */
115
+ serviceId?: string;
116
+ }
117
+ export interface CreatedBy extends CreatedByOptionsOneOf {
118
+ /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */
119
+ anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;
120
+ /** Member ID - When the job is created by a by a **logged in** site visitor. */
121
+ memberIdOptions?: MemberIdOptions;
122
+ /** User ID - When the job is created by a Wix user. */
123
+ wixUserIdOptions?: WixUserIdOptions;
124
+ /** App ID - When the job is created by an external app or app by Wix. */
125
+ appIdOptions?: AppIdOptions;
126
+ /** The type of the creator. */
127
+ type?: Type;
128
+ }
129
+ /** @oneof */
130
+ export interface CreatedByOptionsOneOf {
131
+ /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */
132
+ anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;
133
+ /** Member ID - When the job is created by a by a **logged in** site visitor. */
134
+ memberIdOptions?: MemberIdOptions;
135
+ /** User ID - When the job is created by a Wix user. */
136
+ wixUserIdOptions?: WixUserIdOptions;
137
+ /** App ID - When the job is created by an external app or app by Wix. */
138
+ appIdOptions?: AppIdOptions;
139
+ }
140
+ export interface Counts {
141
+ /** Optional count of the dataset size, specified during job creation. Can be used for progress bars, etc. */
142
+ total?: number | null;
143
+ /** Amount of items that were successfully processed. */
144
+ successCount?: number;
145
+ /** Amount of items whose processing failed. */
146
+ failCount?: number;
147
+ /** Mapping between an error code and the number of failures associated with it. */
148
+ errorByCodeCount?: Record<string, number>;
149
+ }
150
+ /** Events */
151
+ export interface AsyncJobFinishedEvent {
152
+ /** Job ID. */
153
+ jobId?: string;
154
+ }
155
+ export interface AsyncJobFailedEvent {
156
+ /** Job ID. */
157
+ jobId?: string;
158
+ }
159
+ export interface AsyncJobItemFailedEvent {
160
+ /** Job ID. */
161
+ jobId?: string;
162
+ /** Job items. */
163
+ jobItem?: AsyncJobItem;
164
+ }
165
+ export interface AsyncJobItem {
166
+ /**
167
+ * Job item ID.
168
+ * @readonly
169
+ */
170
+ id?: string;
171
+ /** Job item data, as passed by the originating service. */
172
+ data?: Record<string, any> | null;
173
+ /** ID of the entity being processed, as passed by the originating service. */
174
+ entityId?: string | null;
175
+ /**
176
+ * Whether the job item was processed successfully.
177
+ * @readonly
178
+ */
179
+ success?: boolean;
180
+ /** Error that prevented the item from being processed, if relevant. */
181
+ error?: ApplicationError;
182
+ }
183
+ export interface ApplicationError {
184
+ /** Error code. */
185
+ code?: string;
186
+ /** Description of the error. */
187
+ description?: string;
188
+ /** Data related to the error. */
189
+ data?: Record<string, any> | null;
190
+ }
191
+ export interface CreateAsyncJobRequest {
192
+ /** Job to create. */
193
+ job: AsyncJob;
194
+ }
195
+ export interface CreateAsyncJobResponse {
196
+ /** Created job. */
197
+ job?: AsyncJob;
198
+ }
199
+ export interface GetAsyncJobRequest {
200
+ /** Job ID. */
201
+ jobId: string;
202
+ }
203
+ export interface GetAsyncJobResponse {
204
+ /** Returned job. */
205
+ job?: AsyncJob;
206
+ }
207
+ export interface UpdateAsyncJobRequest {
208
+ /** Job to update. */
209
+ job?: AsyncJob;
210
+ /**
211
+ * Field mask.
212
+ * @internal
213
+ */
214
+ mask?: string[];
215
+ }
216
+ export interface UpdateAsyncJobResponse {
217
+ /** Updated job. */
218
+ job?: AsyncJob;
219
+ }
220
+ export interface DeleteAsyncJobRequest {
221
+ /** Job ID. */
222
+ jobId: string;
223
+ }
224
+ export interface DeleteAsyncJobResponse {
225
+ }
226
+ export interface CompleteAsyncJobRequest {
227
+ /** Job ID. */
228
+ jobId: string;
229
+ /** Job status. */
230
+ status?: CompleteStatus;
231
+ }
232
+ export declare enum CompleteStatus {
233
+ /** Job is finished. */
234
+ FINISHED = "FINISHED",
235
+ /** Job has failed. */
236
+ FAILED = "FAILED"
237
+ }
238
+ export interface CompleteAsyncJobResponse {
239
+ }
240
+ export interface ReportAsyncJobProgressRequest {
241
+ /** Job ID. */
242
+ jobId: string;
243
+ /** Job items being reported. */
244
+ items?: AsyncJobItem[];
245
+ }
246
+ export interface ReportAsyncJobProgressResponse {
247
+ }
248
+ export interface AsyncJobItemAddedEvent {
249
+ /** Job ID. */
250
+ jobId?: string;
251
+ /** Job items. */
252
+ jobItem?: AsyncJobItem;
253
+ }
254
+ export interface ListAsyncJobItemsRequest {
255
+ /** Job ID. */
256
+ jobId: string;
257
+ /** Pagination options. */
258
+ paging?: CursorPaging;
259
+ /**
260
+ * Whether to return only failed items.
261
+ * when false, only successful items will be returned.
262
+ * when not set, all both failed and successful will be returned.
263
+ * @internal
264
+ * @deprecated
265
+ * @replacedBy wix.infra.asyncjobs.v1.ListAsyncJobItemsRequest.status_filter
266
+ * @targetRemovalDate 2024-12-12
267
+ */
268
+ hasError?: boolean | null;
269
+ /** async job item status filter. */
270
+ statusFilter?: StatusFilter;
271
+ }
272
+ export interface CursorPaging {
273
+ /** Maximum number of items to return in the results. */
274
+ limit?: number | null;
275
+ /**
276
+ * Pointer to the next or previous page in the list of results.
277
+ *
278
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
279
+ * Not relevant for the first request.
280
+ */
281
+ cursor?: string | null;
282
+ }
283
+ export declare enum StatusFilter {
284
+ /** Return all items. */
285
+ ALL = "ALL",
286
+ /** Return only failed items. */
287
+ FAILED_ONLY = "FAILED_ONLY",
288
+ /** Return only successful items. */
289
+ SUCCESSFUL_ONLY = "SUCCESSFUL_ONLY"
290
+ }
291
+ export interface ListAsyncJobItemsResponse {
292
+ /** Job items. */
293
+ results?: AsyncJobItem[];
294
+ /** Paging metadata. */
295
+ pagingMetadata?: PagingMetadataV2;
296
+ }
297
+ export interface PagingMetadataV2 {
298
+ /** Number of items returned in the response. */
299
+ count?: number | null;
300
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
301
+ cursors?: Cursors;
302
+ /**
303
+ * Indicates if there are more results after the current page.
304
+ * If `true`, another page of results can be retrieved.
305
+ * If `false`, this is the last page.
306
+ * @internal
307
+ */
308
+ hasNext?: boolean | null;
309
+ }
310
+ export interface Cursors {
311
+ /** Cursor pointing to next page in the list of results. */
312
+ next?: string | null;
313
+ /** Cursor pointing to previous page in the list of results. */
314
+ prev?: string | null;
315
+ }
316
+ export interface DomainEvent extends DomainEventBodyOneOf {
317
+ createdEvent?: EntityCreatedEvent;
318
+ updatedEvent?: EntityUpdatedEvent;
319
+ deletedEvent?: EntityDeletedEvent;
320
+ actionEvent?: ActionEvent;
321
+ /**
322
+ * Unique event ID.
323
+ * Allows clients to ignore duplicate webhooks.
324
+ */
325
+ id?: string;
326
+ /**
327
+ * Assumes actions are also always typed to an entity_type
328
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
329
+ */
330
+ entityFqdn?: string;
331
+ /**
332
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
333
+ * This is although the created/updated/deleted notion is duplication of the oneof types
334
+ * Example: created/updated/deleted/started/completed/email_opened
335
+ */
336
+ slug?: string;
337
+ /** ID of the entity associated with the event. */
338
+ entityId?: string;
339
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
340
+ eventTime?: Date | null;
341
+ /**
342
+ * Whether the event was triggered as a result of a privacy regulation application
343
+ * (for example, GDPR).
344
+ */
345
+ triggeredByAnonymizeRequest?: boolean | null;
346
+ /** If present, indicates the action that triggered the event. */
347
+ originatedFrom?: string | null;
348
+ /**
349
+ * A sequence number defining the order of updates to the underlying entity.
350
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
351
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
352
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
353
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
354
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
355
+ */
356
+ entityEventSequence?: string | null;
357
+ }
358
+ /** @oneof */
359
+ export interface DomainEventBodyOneOf {
360
+ createdEvent?: EntityCreatedEvent;
361
+ updatedEvent?: EntityUpdatedEvent;
362
+ deletedEvent?: EntityDeletedEvent;
363
+ actionEvent?: ActionEvent;
364
+ }
365
+ export interface EntityCreatedEvent {
366
+ entityAsJson?: string;
367
+ /**
368
+ * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
369
+ * @internal
370
+ */
371
+ triggeredByUndelete?: boolean | null;
372
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
373
+ restoreInfo?: RestoreInfo;
374
+ /**
375
+ * WIP
376
+ * @internal
377
+ */
378
+ additionalMetadataAsJson?: string | null;
379
+ }
380
+ export interface RestoreInfo {
381
+ deletedDate?: Date | null;
382
+ }
383
+ export interface EntityUpdatedEvent {
384
+ /**
385
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
386
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
387
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
388
+ */
389
+ currentEntityAsJson?: string;
390
+ /**
391
+ * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
392
+ * wont populate it / have any reference to it in the API.
393
+ * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
394
+ * the developer should send only the new (current) entity.
395
+ * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
396
+ * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
397
+ * @internal
398
+ * @deprecated
399
+ */
400
+ previousEntityAsJson?: string | null;
401
+ /**
402
+ * WIP - This property will hold both names and values of the updated fields of the entity.
403
+ * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363)
404
+ * @internal
405
+ */
406
+ modifiedFields?: Record<string, any>;
407
+ /**
408
+ * WIP
409
+ * @internal
410
+ */
411
+ additionalMetadataAsJson?: string | null;
412
+ }
413
+ export interface EntityDeletedEvent {
414
+ /**
415
+ * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
416
+ * @internal
417
+ */
418
+ movedToTrash?: boolean | null;
419
+ /** Entity that was deleted */
420
+ deletedEntityAsJson?: string | null;
421
+ /**
422
+ * WIP
423
+ * @internal
424
+ */
425
+ additionalMetadataAsJson?: string | null;
426
+ }
427
+ export interface ActionEvent {
428
+ bodyAsJson?: string;
429
+ }
430
+ export interface MessageEnvelope {
431
+ /** App instance ID. */
432
+ instanceId?: string | null;
433
+ /** Event type. */
434
+ eventType?: string;
435
+ /** The identification type and identity data. */
436
+ identity?: IdentificationData;
437
+ /** Stringify payload. */
438
+ data?: string;
439
+ }
440
+ export interface IdentificationData extends IdentificationDataIdOneOf {
441
+ /** ID of a site visitor that has not logged in to the site. */
442
+ anonymousVisitorId?: string;
443
+ /** ID of a site visitor that has logged in to the site. */
444
+ memberId?: string;
445
+ /** ID of a Wix user (site owner, contributor, etc.). */
446
+ wixUserId?: string;
447
+ /** ID of an app. */
448
+ appId?: string;
449
+ /** @readonly */
450
+ identityType?: WebhookIdentityType;
451
+ }
452
+ /** @oneof */
453
+ export interface IdentificationDataIdOneOf {
454
+ /** ID of a site visitor that has not logged in to the site. */
455
+ anonymousVisitorId?: string;
456
+ /** ID of a site visitor that has logged in to the site. */
457
+ memberId?: string;
458
+ /** ID of a Wix user (site owner, contributor, etc.). */
459
+ wixUserId?: string;
460
+ /** ID of an app. */
461
+ appId?: string;
462
+ }
463
+ export declare enum WebhookIdentityType {
464
+ UNKNOWN = "UNKNOWN",
465
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
466
+ MEMBER = "MEMBER",
467
+ WIX_USER = "WIX_USER",
468
+ APP = "APP"
469
+ }
@@ -0,0 +1,49 @@
1
+ export var Type;
2
+ (function (Type) {
3
+ Type["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
4
+ /** Job was created by a site visitor that was **not** logged in. */
5
+ Type["ANONYMOUS_VISITOR_ID"] = "ANONYMOUS_VISITOR_ID";
6
+ /** Job was created by a **logged in** site visitor. */
7
+ Type["MEMBER_ID"] = "MEMBER_ID";
8
+ /** Job was created by a Wix user. */
9
+ Type["WIX_USER_ID"] = "WIX_USER_ID";
10
+ /** Job was created by an external app or app by Wix. */
11
+ Type["APP_ID"] = "APP_ID";
12
+ })(Type || (Type = {}));
13
+ export var Status;
14
+ (function (Status) {
15
+ Status["UNKNOWN"] = "UNKNOWN";
16
+ /** Job is created, but hasn't started yet. */
17
+ Status["INITIALIZED"] = "INITIALIZED";
18
+ /** Job has started and is in progress. */
19
+ Status["PROCESSING"] = "PROCESSING";
20
+ /** Job is finished. */
21
+ Status["FINISHED"] = "FINISHED";
22
+ /** Job has failed. */
23
+ Status["FAILED"] = "FAILED";
24
+ })(Status || (Status = {}));
25
+ export var CompleteStatus;
26
+ (function (CompleteStatus) {
27
+ /** Job is finished. */
28
+ CompleteStatus["FINISHED"] = "FINISHED";
29
+ /** Job has failed. */
30
+ CompleteStatus["FAILED"] = "FAILED";
31
+ })(CompleteStatus || (CompleteStatus = {}));
32
+ export var StatusFilter;
33
+ (function (StatusFilter) {
34
+ /** Return all items. */
35
+ StatusFilter["ALL"] = "ALL";
36
+ /** Return only failed items. */
37
+ StatusFilter["FAILED_ONLY"] = "FAILED_ONLY";
38
+ /** Return only successful items. */
39
+ StatusFilter["SUCCESSFUL_ONLY"] = "SUCCESSFUL_ONLY";
40
+ })(StatusFilter || (StatusFilter = {}));
41
+ export var WebhookIdentityType;
42
+ (function (WebhookIdentityType) {
43
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
44
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
45
+ WebhookIdentityType["MEMBER"] = "MEMBER";
46
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
47
+ WebhookIdentityType["APP"] = "APP";
48
+ })(WebhookIdentityType || (WebhookIdentityType = {}));
49
+ //# sourceMappingURL=types.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.impl.js","sourceRoot":"","sources":["../../types.impl.ts"],"names":[],"mappings":"AA4CA,MAAM,CAAN,IAAY,IAUX;AAVD,WAAY,IAAI;IACd,qCAA6B,CAAA;IAC7B,oEAAoE;IACpE,qDAA6C,CAAA;IAC7C,uDAAuD;IACvD,+BAAuB,CAAA;IACvB,sCAAsC;IACtC,mCAA2B,CAAA;IAC3B,wDAAwD;IACxD,yBAAiB,CAAA;AACnB,CAAC,EAVW,IAAI,KAAJ,IAAI,QAUf;AAsBD,MAAM,CAAN,IAAY,MAUX;AAVD,WAAY,MAAM;IAChB,6BAAmB,CAAA;IACnB,8CAA8C;IAC9C,qCAA2B,CAAA;IAC3B,0CAA0C;IAC1C,mCAAyB,CAAA;IACzB,uBAAuB;IACvB,+BAAqB,CAAA;IACrB,sBAAsB;IACtB,2BAAiB,CAAA;AACnB,CAAC,EAVW,MAAM,KAAN,MAAM,QAUjB;AA2KD,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,uBAAuB;IACvB,uCAAqB,CAAA;IACrB,sBAAsB;IACtB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAmDD,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,wBAAwB;IACxB,2BAAW,CAAA;IACX,gCAAgC;IAChC,2CAA2B,CAAA;IAC3B,oCAAoC;IACpC,mDAAmC,CAAA;AACrC,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AA2LD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
@@ -0,0 +1,7 @@
1
+ {
2
+ "private": true,
3
+ "main": "../build/cjs/builders.impl",
4
+ "types": "../build/cjs/builders.impl.d.ts",
5
+ "sideEffects": false,
6
+ "module": "../build/es/builders.impl"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "private": true,
3
+ "main": "../../build/cjs/crud/http.impl",
4
+ "types": "../../build/cjs/crud/http.impl.d.ts",
5
+ "sideEffects": false,
6
+ "module": "../../build/es/crud/http.impl"
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "private": true,
3
+ "main": "../../build/cjs/crud/rpc.impl",
4
+ "types": "../../build/cjs/crud/rpc.impl.d.ts",
5
+ "sideEffects": false
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "private": true,
3
+ "main": "../build/cjs/http.impl",
4
+ "types": "../build/cjs/http.impl.d.ts",
5
+ "sideEffects": false,
6
+ "module": "../build/es/http.impl"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "private": true,
3
+ "main": "../build/cjs/meta.impl",
4
+ "types": "../build/cjs/meta.impl.d.ts",
5
+ "sideEffects": false,
6
+ "module": "../build/es/meta.impl"
7
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@wix/ambassador-infra-asyncjobs-v1-async-job",
3
+ "version": "1.0.87",
4
+ "publishConfig": {
5
+ "registry": "https://npm-cache.dev.wixpress.com/",
6
+ "access": "restricted"
7
+ },
8
+ "files": [
9
+ "build",
10
+ "http",
11
+ "rpc",
12
+ "builders",
13
+ "types",
14
+ "validators",
15
+ "meta",
16
+ "crud/!(*.ts)",
17
+ "src/main/proto"
18
+ ],
19
+ "sideEffects": false,
20
+ "scripts": {
21
+ "build": "yarn proto && yarn tsc && cp -r proto build/cjs",
22
+ "proto": "wix-proto-codegen --module . --dir proto --stringEnums --tsClasses --stringLongs",
23
+ "tsc": "tsc -b tsconfig.json tsconfig.esm.json",
24
+ "test": ":"
25
+ },
26
+ "dependencies": {
27
+ "@wix/http-client": "^1.0.0",
28
+ "@wix/metro-common-builders": "^1.0.0",
29
+ "@wix/metro-runtime": "^1.0.0",
30
+ "joi": "^17.0.0",
31
+ "callsite": "^1.0.0",
32
+ "@wix/auto-crud": "^1.0.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/callsite": "^1.0.0"
36
+ },
37
+ "wix": {
38
+ "artifact": {
39
+ "artifactId": "infra-asyncjobs-v1-async-job",
40
+ "groupId": "com.wixpress.metro-packages"
41
+ },
42
+ "ambassador": {
43
+ "fqdn": "wix.infra.asyncjobs.v1.async_job",
44
+ "protoArtifactId": "com.wixpress.asyncinfra:async-job-service"
45
+ }
46
+ },
47
+ "falconPackageHash": "a1c18466a9b08aac55a622e0b44c7bc7f2b82dc2931d4338581a5ee2",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "https://github.com/wix-private/metro-packages.git",
51
+ "directory": "packages/ambassador/infra-asyncjobs-v1-async-job"
52
+ }
53
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "private": true,
3
+ "main": "../build/cjs/rpc.impl",
4
+ "types": "../build/cjs/rpc.impl.d.ts",
5
+ "sideEffects": false
6
+ }
@@ -0,0 +1,33 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.api;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ option java_multiple_files = true;
8
+ option java_outer_classname = "ActionPayloadProto";
9
+ option java_package = "com.wix.api";
10
+
11
+ /*
12
+ action_payload option is used to configure custom slugs for the payload type of a DomainEvent Action:
13
+ service BlooperService {
14
+ option (wix.api.service_entity).message = "com.wixpress.examples.Blooper"; //the "main" entity
15
+ rpc MissedBlooper (MissedBlooperRequest) returns (MissedBlooperResponse) {
16
+ option (wix.api.callback) = {
17
+ event_type: Action
18
+ payload: "com.wixpress.examples.BlooperWasMissed"
19
+ };
20
+ };
21
+ }
22
+ message BlooperWasMissed {
23
+ option (wix.api.action_payload).custom_slug = "super_custom_slug"; // only define if the default slug value (snake case of the message name) is out of the question
24
+ int32 how_funny_it_could_have_been = 1;
25
+ }
26
+ */
27
+ extend google.protobuf.MessageOptions {
28
+ optional ActionPayload action_payload = 50600;
29
+ }
30
+
31
+ message ActionPayload {
32
+ optional string custom_slug = 1;
33
+ }