@wix/auto_sdk_online-programs_programs 1.0.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.
- package/build/cjs/index.d.ts +129 -0
- package/build/cjs/index.js +1834 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +19 -0
- package/build/cjs/index.typings.js +1725 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1235 -0
- package/build/cjs/meta.js +1142 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/online-programs-v3-program-programs.universal-D4bCXD7K.d.ts +2867 -0
- package/build/es/index.d.mts +129 -0
- package/build/es/index.mjs +1773 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +19 -0
- package/build/es/index.typings.mjs +1664 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +1235 -0
- package/build/es/meta.mjs +1103 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/online-programs-v3-program-programs.universal-D4bCXD7K.d.mts +2867 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +129 -0
- package/build/internal/cjs/index.js +1834 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +19 -0
- package/build/internal/cjs/index.typings.js +1725 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1235 -0
- package/build/internal/cjs/meta.js +1142 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/online-programs-v3-program-programs.universal-DOkVx-lj.d.ts +2895 -0
- package/build/internal/es/index.d.mts +129 -0
- package/build/internal/es/index.mjs +1773 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +19 -0
- package/build/internal/es/index.typings.mjs +1664 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +1235 -0
- package/build/internal/es/meta.mjs +1103 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/online-programs-v3-program-programs.universal-DOkVx-lj.d.mts +2895 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,1235 @@
|
|
|
1
|
+
import { av as CreateProgramRequest$1, aw as CreateProgramResponse$1, aG as DuplicateProgramRequest$1, D as DuplicateProgramResponse$1, aH as GetProgramRequest$1, aI as GetProgramResponse$1, aJ as UpdateProgramRequest$1, aK as UpdateProgramResponse$1, aQ as DeleteProgramRequest$1, aR as DeleteProgramResponse$1, aS as QueryProgramsRequest$1, aY as QueryProgramsResponse$1, a$ as SearchProgramsRequest$1, S as SearchProgramsResponse$1, bD as PublishProgramRequest$1, d as PublishProgramResponse$1, bE as EndProgramRequest$1, E as EndProgramResponse$1, bF as ArchiveProgramRequest$1, A as ArchiveProgramResponse$1, bG as BulkUpdateProgramsRequest$1, f as BulkUpdateProgramsResponse$1, bI as CountProgramsRequest$1, g as CountProgramsResponse$1, bJ as ListSampleProgramsRequest$1, L as ListSampleProgramsResponse$1 } from './online-programs-v3-program-programs.universal-DOkVx-lj.js';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
interface Program {
|
|
5
|
+
/**
|
|
6
|
+
* Program ID.
|
|
7
|
+
* @format GUID
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
id?: string | null;
|
|
11
|
+
/** @readonly */
|
|
12
|
+
revision?: string | null;
|
|
13
|
+
/** @readonly */
|
|
14
|
+
createdDate?: Date | null;
|
|
15
|
+
/** @readonly */
|
|
16
|
+
updatedDate?: Date | null;
|
|
17
|
+
/**
|
|
18
|
+
* current program state / does participant need it?
|
|
19
|
+
* @readonly
|
|
20
|
+
* @deprecated
|
|
21
|
+
* @replacedBy status
|
|
22
|
+
* @targetRemovalDate 2025-10-15
|
|
23
|
+
*/
|
|
24
|
+
state?: V3StateWithLiterals;
|
|
25
|
+
/**
|
|
26
|
+
* current program state in v2 format
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
status?: StatusWithLiterals;
|
|
30
|
+
/**
|
|
31
|
+
* assigned categories
|
|
32
|
+
* @readonly
|
|
33
|
+
* @format GUID
|
|
34
|
+
* @maxSize 10
|
|
35
|
+
*/
|
|
36
|
+
categoryIds?: string[];
|
|
37
|
+
/** general program info. */
|
|
38
|
+
description?: Description;
|
|
39
|
+
/** timeline type -> Self-paced, time-restricted. */
|
|
40
|
+
timeline?: Timeline;
|
|
41
|
+
/** participant limitation, step-completion pace and etc. */
|
|
42
|
+
restrictions?: Restrictions;
|
|
43
|
+
/** single-payment price. */
|
|
44
|
+
price?: Money;
|
|
45
|
+
/** seo settings. */
|
|
46
|
+
seo?: Seo;
|
|
47
|
+
/**
|
|
48
|
+
* rewards to be assigned after reaching some of the program milestones.
|
|
49
|
+
* @maxSize 10
|
|
50
|
+
*/
|
|
51
|
+
rewards?: Reward[];
|
|
52
|
+
/**
|
|
53
|
+
* connected social group.
|
|
54
|
+
* @format GUID
|
|
55
|
+
*/
|
|
56
|
+
socialGroupId?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* join flow options.
|
|
59
|
+
* @deprecated
|
|
60
|
+
* @replacedBy restrictions.access_type
|
|
61
|
+
* @targetRemovalDate 2025-10-15
|
|
62
|
+
*/
|
|
63
|
+
accessType?: AccessTypeWithLiterals;
|
|
64
|
+
/** extensible field */
|
|
65
|
+
extendedFields?: ExtendedFields;
|
|
66
|
+
/** if true -> invoice is sent to the customer who purchased the program via single payment; else -> payment confirmation email is sent */
|
|
67
|
+
shouldSendInvoice?: boolean;
|
|
68
|
+
/** settings related to video steps in programs */
|
|
69
|
+
videoStepsSettings?: VideoStepsSettings;
|
|
70
|
+
/**
|
|
71
|
+
* number of content entities in program
|
|
72
|
+
* @readonly
|
|
73
|
+
*/
|
|
74
|
+
contentSummary?: ContentSummary;
|
|
75
|
+
/**
|
|
76
|
+
* user id of owner, who created this program
|
|
77
|
+
* @format GUID
|
|
78
|
+
* @readonly
|
|
79
|
+
*/
|
|
80
|
+
ownerUserId?: string | null;
|
|
81
|
+
}
|
|
82
|
+
declare enum V3State {
|
|
83
|
+
/** not published program, visible only on BM */
|
|
84
|
+
DRAFT = "DRAFT",
|
|
85
|
+
/** program visible regarding to restrictions */
|
|
86
|
+
PUBLISHED = "PUBLISHED",
|
|
87
|
+
/** program isn't available to join. */
|
|
88
|
+
ENDED = "ENDED",
|
|
89
|
+
/** closed program. Joins and sections/steps are not available for participants. */
|
|
90
|
+
ARCHIVED = "ARCHIVED"
|
|
91
|
+
}
|
|
92
|
+
/** @enumType */
|
|
93
|
+
type V3StateWithLiterals = V3State | 'DRAFT' | 'PUBLISHED' | 'ENDED' | 'ARCHIVED';
|
|
94
|
+
declare enum Status {
|
|
95
|
+
/** unknown state */
|
|
96
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
97
|
+
/** not published program, visible only on BM */
|
|
98
|
+
DRAFT = "DRAFT",
|
|
99
|
+
/** program visible regarding to restrictions */
|
|
100
|
+
PUBLISHED = "PUBLISHED",
|
|
101
|
+
/** program isn't available to join. */
|
|
102
|
+
ENDED = "ENDED",
|
|
103
|
+
/** closed program. Joins and sections/steps are not available for participants. */
|
|
104
|
+
ARCHIVED = "ARCHIVED"
|
|
105
|
+
}
|
|
106
|
+
/** @enumType */
|
|
107
|
+
type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'DRAFT' | 'PUBLISHED' | 'ENDED' | 'ARCHIVED';
|
|
108
|
+
interface Description extends DescriptionMediaOneOf {
|
|
109
|
+
/** WixMedia image */
|
|
110
|
+
image?: Image;
|
|
111
|
+
/** WixMedia video */
|
|
112
|
+
video?: VideoV2;
|
|
113
|
+
/** @maxLength 150 */
|
|
114
|
+
title?: string;
|
|
115
|
+
/** @maxLength 8000 */
|
|
116
|
+
details?: string | null;
|
|
117
|
+
}
|
|
118
|
+
/** @oneof */
|
|
119
|
+
interface DescriptionMediaOneOf {
|
|
120
|
+
/** WixMedia image */
|
|
121
|
+
image?: Image;
|
|
122
|
+
/** WixMedia video */
|
|
123
|
+
video?: VideoV2;
|
|
124
|
+
}
|
|
125
|
+
interface Image {
|
|
126
|
+
/** WixMedia image ID. */
|
|
127
|
+
id?: string;
|
|
128
|
+
/** Image URL. */
|
|
129
|
+
url?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Original image height.
|
|
132
|
+
* @readonly
|
|
133
|
+
*/
|
|
134
|
+
height?: number;
|
|
135
|
+
/**
|
|
136
|
+
* Original image width.
|
|
137
|
+
* @readonly
|
|
138
|
+
*/
|
|
139
|
+
width?: number;
|
|
140
|
+
/** Image alt text. */
|
|
141
|
+
altText?: string | null;
|
|
142
|
+
/**
|
|
143
|
+
* Image filename.
|
|
144
|
+
* @readonly
|
|
145
|
+
*/
|
|
146
|
+
filename?: string | null;
|
|
147
|
+
}
|
|
148
|
+
interface VideoV2 {
|
|
149
|
+
/** WixMedia ID. */
|
|
150
|
+
id?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Available resolutions for the video, starting with the optimal resolution.
|
|
153
|
+
* @readonly
|
|
154
|
+
* @maxSize 100
|
|
155
|
+
*/
|
|
156
|
+
resolutions?: VideoResolution[];
|
|
157
|
+
/**
|
|
158
|
+
* Video filename.
|
|
159
|
+
* @readonly
|
|
160
|
+
*/
|
|
161
|
+
filename?: string | null;
|
|
162
|
+
}
|
|
163
|
+
interface VideoResolution {
|
|
164
|
+
/** Video URL. */
|
|
165
|
+
url?: string;
|
|
166
|
+
/** Video height. */
|
|
167
|
+
height?: number;
|
|
168
|
+
/** Video width. */
|
|
169
|
+
width?: number;
|
|
170
|
+
/** Video format for example, mp4, hls. */
|
|
171
|
+
format?: string;
|
|
172
|
+
}
|
|
173
|
+
interface Timeline {
|
|
174
|
+
/** are sections/steps evaluated every day? Or can UoU participate in a self paced mode? */
|
|
175
|
+
selfPaced?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* everyone starts on this day
|
|
178
|
+
* @format LOCAL_DATE
|
|
179
|
+
*/
|
|
180
|
+
startDate?: string | null;
|
|
181
|
+
/** duration of program in days (if applicable). */
|
|
182
|
+
durationInDays?: number | null;
|
|
183
|
+
}
|
|
184
|
+
interface Restrictions {
|
|
185
|
+
/**
|
|
186
|
+
* limit of active participants in the program.
|
|
187
|
+
* @min 1
|
|
188
|
+
*/
|
|
189
|
+
maxParticipants?: number | null;
|
|
190
|
+
/** hide steps in the Pending state. */
|
|
191
|
+
hideFutureSteps?: boolean;
|
|
192
|
+
/** allow participants complete steps in the certain order. */
|
|
193
|
+
resolveStepsInOrder?: boolean;
|
|
194
|
+
/** allow program participants to share their progress in group */
|
|
195
|
+
shareProgress?: boolean;
|
|
196
|
+
/** access restrictions options regarding visibility. */
|
|
197
|
+
accessType?: RestrictionsAccessTypeWithLiterals;
|
|
198
|
+
}
|
|
199
|
+
declare enum RestrictionsAccessType {
|
|
200
|
+
/** unknown access type */
|
|
201
|
+
UNKNOWN_ACCESS_TYPE = "UNKNOWN_ACCESS_TYPE",
|
|
202
|
+
/** join without approvals */
|
|
203
|
+
PUBLIC = "PUBLIC",
|
|
204
|
+
/** send a join request to the owner and get an approval from him. */
|
|
205
|
+
PRIVATE = "PRIVATE",
|
|
206
|
+
/** join possible only after owner invite. */
|
|
207
|
+
SECRET = "SECRET"
|
|
208
|
+
}
|
|
209
|
+
/** @enumType */
|
|
210
|
+
type RestrictionsAccessTypeWithLiterals = RestrictionsAccessType | 'UNKNOWN_ACCESS_TYPE' | 'PUBLIC' | 'PRIVATE' | 'SECRET';
|
|
211
|
+
/**
|
|
212
|
+
* Money.
|
|
213
|
+
* Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
|
|
214
|
+
*/
|
|
215
|
+
interface Money {
|
|
216
|
+
/**
|
|
217
|
+
* Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99).
|
|
218
|
+
* @decimalValue options { gt:0.00, maxScale:3 }
|
|
219
|
+
*/
|
|
220
|
+
value?: string;
|
|
221
|
+
/**
|
|
222
|
+
* Currency code. Must be valid ISO 4217 currency code (e.g., USD).
|
|
223
|
+
* @format CURRENCY
|
|
224
|
+
* @readonly
|
|
225
|
+
*/
|
|
226
|
+
currency?: string;
|
|
227
|
+
}
|
|
228
|
+
interface Seo {
|
|
229
|
+
/**
|
|
230
|
+
* Temporary removed URL_SLUG validation for data migration
|
|
231
|
+
* string slug = 1 [(wix.api.format) = URL_SLUG]; //challenge slug expression
|
|
232
|
+
* @maxLength 300
|
|
233
|
+
*/
|
|
234
|
+
slug?: string;
|
|
235
|
+
/** schema used by Seo team */
|
|
236
|
+
seoData?: SeoSchema;
|
|
237
|
+
/**
|
|
238
|
+
* program url
|
|
239
|
+
* @readonly
|
|
240
|
+
*/
|
|
241
|
+
url?: PageUrl;
|
|
242
|
+
/**
|
|
243
|
+
* image url from description media
|
|
244
|
+
* @format WEB_URL
|
|
245
|
+
*/
|
|
246
|
+
imageUrl?: string | null;
|
|
247
|
+
/**
|
|
248
|
+
* alt text of image
|
|
249
|
+
* @maxLength 1000
|
|
250
|
+
*/
|
|
251
|
+
imageAlt?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Approximate SEO program duration in Iso-8601
|
|
254
|
+
* @maxLength 100
|
|
255
|
+
* @readonly
|
|
256
|
+
*/
|
|
257
|
+
courseWorkload?: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
|
|
261
|
+
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
262
|
+
* This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
|
|
263
|
+
*/
|
|
264
|
+
interface SeoSchema {
|
|
265
|
+
/** SEO tag information. */
|
|
266
|
+
tags?: Tag[];
|
|
267
|
+
/** SEO general settings. */
|
|
268
|
+
settings?: Settings;
|
|
269
|
+
}
|
|
270
|
+
interface Keyword {
|
|
271
|
+
/** Keyword value. */
|
|
272
|
+
term?: string;
|
|
273
|
+
/** Whether the keyword is the main focus keyword. */
|
|
274
|
+
isMain?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* The source that added the keyword terms to the SEO settings.
|
|
277
|
+
* @maxLength 1000
|
|
278
|
+
*/
|
|
279
|
+
origin?: string | null;
|
|
280
|
+
}
|
|
281
|
+
interface Tag {
|
|
282
|
+
/**
|
|
283
|
+
* SEO tag type.
|
|
284
|
+
*
|
|
285
|
+
*
|
|
286
|
+
* Supported values: `title`, `meta`, `script`, `link`.
|
|
287
|
+
*/
|
|
288
|
+
type?: string;
|
|
289
|
+
/**
|
|
290
|
+
* A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
|
|
291
|
+
* For example: `{"name": "description", "content": "the description itself"}`.
|
|
292
|
+
*/
|
|
293
|
+
props?: Record<string, any> | null;
|
|
294
|
+
/** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
|
|
295
|
+
meta?: Record<string, any> | null;
|
|
296
|
+
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
297
|
+
children?: string;
|
|
298
|
+
/** Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). */
|
|
299
|
+
custom?: boolean;
|
|
300
|
+
/** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
|
|
301
|
+
disabled?: boolean;
|
|
302
|
+
}
|
|
303
|
+
interface Settings {
|
|
304
|
+
/**
|
|
305
|
+
* Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.
|
|
306
|
+
*
|
|
307
|
+
*
|
|
308
|
+
* Default: `false` (automatical redirect is enabled).
|
|
309
|
+
*/
|
|
310
|
+
preventAutoRedirect?: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* User-selected keyword terms for a specific page.
|
|
313
|
+
* @maxSize 5
|
|
314
|
+
*/
|
|
315
|
+
keywords?: Keyword[];
|
|
316
|
+
}
|
|
317
|
+
interface PageUrl {
|
|
318
|
+
/** The base URL. For premium sites, this is the domain. For free sites, this is the site URL. For example, `mysite.wixsite.com/mysite`. */
|
|
319
|
+
base?: string;
|
|
320
|
+
/** The relative path for the page within the site. For example, `/product-page/a-product`. */
|
|
321
|
+
path?: string;
|
|
322
|
+
}
|
|
323
|
+
interface Reward {
|
|
324
|
+
/** on which action rewards must be assigned. */
|
|
325
|
+
trigger?: TriggerWithLiterals;
|
|
326
|
+
/**
|
|
327
|
+
* badges participant will get on program complete
|
|
328
|
+
* @format GUID
|
|
329
|
+
* @maxSize 50
|
|
330
|
+
*/
|
|
331
|
+
badgeIds?: string[];
|
|
332
|
+
/** certificate for program. Currently is program GUID */
|
|
333
|
+
certificate?: Certificate;
|
|
334
|
+
}
|
|
335
|
+
declare enum Trigger {
|
|
336
|
+
/** member joins the program */
|
|
337
|
+
JOINED_TO_PROGRAM = "JOINED_TO_PROGRAM",
|
|
338
|
+
/** at least one step completed */
|
|
339
|
+
STEP_COMPLETED = "STEP_COMPLETED",
|
|
340
|
+
/** all steps are completed. */
|
|
341
|
+
ALL_STEPS_COMPLETED = "ALL_STEPS_COMPLETED"
|
|
342
|
+
}
|
|
343
|
+
/** @enumType */
|
|
344
|
+
type TriggerWithLiterals = Trigger | 'JOINED_TO_PROGRAM' | 'STEP_COMPLETED' | 'ALL_STEPS_COMPLETED';
|
|
345
|
+
interface Certificate {
|
|
346
|
+
/**
|
|
347
|
+
* Certificate for program completion. Currently is program GUID
|
|
348
|
+
* @format GUID
|
|
349
|
+
*/
|
|
350
|
+
id?: string;
|
|
351
|
+
/** date it was connected to program */
|
|
352
|
+
connectedDate?: Date | null;
|
|
353
|
+
}
|
|
354
|
+
declare enum AccessType {
|
|
355
|
+
/** join without approvals */
|
|
356
|
+
PUBLIC = "PUBLIC",
|
|
357
|
+
/** send a join request to the owner and get an approval from him. */
|
|
358
|
+
PRIVATE = "PRIVATE",
|
|
359
|
+
/** join possible only after owner invite. */
|
|
360
|
+
SECRET = "SECRET"
|
|
361
|
+
}
|
|
362
|
+
/** @enumType */
|
|
363
|
+
type AccessTypeWithLiterals = AccessType | 'PUBLIC' | 'PRIVATE' | 'SECRET';
|
|
364
|
+
interface ExtendedFields {
|
|
365
|
+
/**
|
|
366
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
367
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
368
|
+
*
|
|
369
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
370
|
+
*
|
|
371
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
372
|
+
*/
|
|
373
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
374
|
+
}
|
|
375
|
+
interface VideoStepsSettings {
|
|
376
|
+
/** automatically switch to next video step after finishing current one */
|
|
377
|
+
autoNavigate?: boolean;
|
|
378
|
+
/** how many percents of video need to be watched to complete step */
|
|
379
|
+
requiredCompletionPercentage?: number;
|
|
380
|
+
}
|
|
381
|
+
interface ContentSummary {
|
|
382
|
+
/**
|
|
383
|
+
* number of steps in program
|
|
384
|
+
* @max 3000
|
|
385
|
+
*/
|
|
386
|
+
stepCount?: number;
|
|
387
|
+
/**
|
|
388
|
+
* number of sections in program
|
|
389
|
+
* @max 1000
|
|
390
|
+
*/
|
|
391
|
+
sectionCount?: number;
|
|
392
|
+
}
|
|
393
|
+
interface CreateProgramRequest {
|
|
394
|
+
/** Program to be created. */
|
|
395
|
+
program: Program;
|
|
396
|
+
}
|
|
397
|
+
interface CreateProgramResponse {
|
|
398
|
+
/** The created Program. */
|
|
399
|
+
program?: Program;
|
|
400
|
+
}
|
|
401
|
+
interface ItemMetadata {
|
|
402
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
403
|
+
id?: string | null;
|
|
404
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
405
|
+
originalIndex?: number;
|
|
406
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
407
|
+
success?: boolean;
|
|
408
|
+
/** Details about the error in case of failure. */
|
|
409
|
+
error?: ApplicationError;
|
|
410
|
+
}
|
|
411
|
+
interface ApplicationError {
|
|
412
|
+
/** Error code. */
|
|
413
|
+
code?: string;
|
|
414
|
+
/** Description of the error. */
|
|
415
|
+
description?: string;
|
|
416
|
+
/** Data related to the error. */
|
|
417
|
+
data?: Record<string, any> | null;
|
|
418
|
+
}
|
|
419
|
+
interface BulkActionMetadata {
|
|
420
|
+
/** Number of items that were successfully processed. */
|
|
421
|
+
totalSuccesses?: number;
|
|
422
|
+
/** Number of items that couldn't be processed. */
|
|
423
|
+
totalFailures?: number;
|
|
424
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
425
|
+
undetailedFailures?: number;
|
|
426
|
+
}
|
|
427
|
+
interface DuplicateProgramRequest {
|
|
428
|
+
/**
|
|
429
|
+
* Program to be duplicated from.
|
|
430
|
+
* @format GUID
|
|
431
|
+
*/
|
|
432
|
+
programId: string;
|
|
433
|
+
}
|
|
434
|
+
interface DuplicateProgramResponse {
|
|
435
|
+
/** The created Program. */
|
|
436
|
+
program?: Program;
|
|
437
|
+
}
|
|
438
|
+
interface GetProgramRequest {
|
|
439
|
+
/**
|
|
440
|
+
* ID of the Program to retrieve.
|
|
441
|
+
* @format GUID
|
|
442
|
+
*/
|
|
443
|
+
programId: string;
|
|
444
|
+
}
|
|
445
|
+
interface GetProgramResponse {
|
|
446
|
+
/** The requested Program. */
|
|
447
|
+
program?: Program;
|
|
448
|
+
}
|
|
449
|
+
interface UpdateProgramRequest {
|
|
450
|
+
/** Program to be updated, may be partial. */
|
|
451
|
+
program: Program;
|
|
452
|
+
}
|
|
453
|
+
interface UpdateProgramResponse {
|
|
454
|
+
/** Updated Program. */
|
|
455
|
+
program?: Program;
|
|
456
|
+
}
|
|
457
|
+
interface DeleteProgramRequest {
|
|
458
|
+
/**
|
|
459
|
+
* Id of the Program to delete.
|
|
460
|
+
* @format GUID
|
|
461
|
+
*/
|
|
462
|
+
programId: string;
|
|
463
|
+
}
|
|
464
|
+
interface DeleteProgramResponse {
|
|
465
|
+
}
|
|
466
|
+
interface QueryProgramsRequest {
|
|
467
|
+
/** Query to filter programs */
|
|
468
|
+
query?: QueryV2;
|
|
469
|
+
}
|
|
470
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
471
|
+
/** Paging options to limit and skip the number of items. */
|
|
472
|
+
paging?: Paging;
|
|
473
|
+
/** 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`. */
|
|
474
|
+
cursorPaging?: CursorPaging;
|
|
475
|
+
/**
|
|
476
|
+
* Filter object.
|
|
477
|
+
*
|
|
478
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
479
|
+
*/
|
|
480
|
+
filter?: Record<string, any> | null;
|
|
481
|
+
/**
|
|
482
|
+
* Sort object.
|
|
483
|
+
*
|
|
484
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
485
|
+
* @maxSize 100
|
|
486
|
+
*/
|
|
487
|
+
sort?: Sorting[];
|
|
488
|
+
/**
|
|
489
|
+
* 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.
|
|
490
|
+
* @maxSize 100
|
|
491
|
+
* @maxLength 1000
|
|
492
|
+
*/
|
|
493
|
+
fields?: string[];
|
|
494
|
+
/**
|
|
495
|
+
* 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.
|
|
496
|
+
* @maxSize 100
|
|
497
|
+
* @maxLength 1000
|
|
498
|
+
*/
|
|
499
|
+
fieldsets?: string[];
|
|
500
|
+
}
|
|
501
|
+
/** @oneof */
|
|
502
|
+
interface QueryV2PagingMethodOneOf {
|
|
503
|
+
/** Paging options to limit and skip the number of items. */
|
|
504
|
+
paging?: Paging;
|
|
505
|
+
/** 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`. */
|
|
506
|
+
cursorPaging?: CursorPaging;
|
|
507
|
+
}
|
|
508
|
+
interface Sorting {
|
|
509
|
+
/**
|
|
510
|
+
* Name of the field to sort by.
|
|
511
|
+
* @maxLength 512
|
|
512
|
+
*/
|
|
513
|
+
fieldName?: string;
|
|
514
|
+
/** Sort order. */
|
|
515
|
+
order?: SortOrderWithLiterals;
|
|
516
|
+
}
|
|
517
|
+
declare enum SortOrder {
|
|
518
|
+
ASC = "ASC",
|
|
519
|
+
DESC = "DESC"
|
|
520
|
+
}
|
|
521
|
+
/** @enumType */
|
|
522
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
523
|
+
interface Paging {
|
|
524
|
+
/** Number of items to load. */
|
|
525
|
+
limit?: number | null;
|
|
526
|
+
offset?: number | null;
|
|
527
|
+
}
|
|
528
|
+
interface CursorPaging {
|
|
529
|
+
/**
|
|
530
|
+
* Maximum number of items to return in the results.
|
|
531
|
+
* @max 100
|
|
532
|
+
*/
|
|
533
|
+
limit?: number | null;
|
|
534
|
+
/**
|
|
535
|
+
* Pointer to the next or previous page in the list of results.
|
|
536
|
+
*
|
|
537
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
538
|
+
* Not relevant for the first request.
|
|
539
|
+
* @maxLength 16000
|
|
540
|
+
*/
|
|
541
|
+
cursor?: string | null;
|
|
542
|
+
}
|
|
543
|
+
interface QueryProgramsResponse {
|
|
544
|
+
/** Found programs */
|
|
545
|
+
programs?: Program[];
|
|
546
|
+
/** paging */
|
|
547
|
+
pagingMetadata?: PagingMetadataV2;
|
|
548
|
+
}
|
|
549
|
+
interface PagingMetadataV2 {
|
|
550
|
+
/** Number of items returned in the response. */
|
|
551
|
+
count?: number | null;
|
|
552
|
+
/** Offset that was requested. */
|
|
553
|
+
offset?: number | null;
|
|
554
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
555
|
+
total?: number | null;
|
|
556
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
557
|
+
tooManyToCount?: boolean | null;
|
|
558
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
559
|
+
cursors?: Cursors;
|
|
560
|
+
}
|
|
561
|
+
interface Cursors {
|
|
562
|
+
/**
|
|
563
|
+
* Cursor string pointing to the next page in the list of results.
|
|
564
|
+
* @maxLength 16000
|
|
565
|
+
*/
|
|
566
|
+
next?: string | null;
|
|
567
|
+
/**
|
|
568
|
+
* Cursor pointing to the previous page in the list of results.
|
|
569
|
+
* @maxLength 16000
|
|
570
|
+
*/
|
|
571
|
+
prev?: string | null;
|
|
572
|
+
}
|
|
573
|
+
interface SearchProgramsRequest {
|
|
574
|
+
/** Query to search programs */
|
|
575
|
+
search?: CursorSearch;
|
|
576
|
+
}
|
|
577
|
+
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
578
|
+
/**
|
|
579
|
+
* Cursor paging options.
|
|
580
|
+
*
|
|
581
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
582
|
+
*/
|
|
583
|
+
cursorPaging?: CursorPaging;
|
|
584
|
+
/**
|
|
585
|
+
* Filter object.
|
|
586
|
+
*
|
|
587
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
588
|
+
*/
|
|
589
|
+
filter?: Record<string, any> | null;
|
|
590
|
+
/**
|
|
591
|
+
* List of sort objects.
|
|
592
|
+
*
|
|
593
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
594
|
+
* @maxSize 10
|
|
595
|
+
*/
|
|
596
|
+
sort?: Sorting[];
|
|
597
|
+
/**
|
|
598
|
+
* Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
599
|
+
* @maxSize 10
|
|
600
|
+
*/
|
|
601
|
+
aggregations?: Aggregation[];
|
|
602
|
+
/** Free text to match in searchable fields. */
|
|
603
|
+
search?: SearchDetails;
|
|
604
|
+
/**
|
|
605
|
+
* UTC offset or IANA time zone. Valid values are
|
|
606
|
+
* ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
607
|
+
* and IANA time zone IDs, such as Europe/Rome.
|
|
608
|
+
*
|
|
609
|
+
* Affects all filters and aggregations returned values.
|
|
610
|
+
* You may override this behavior in a specific filter by providing
|
|
611
|
+
* timestamps including time zone. For example, `"2023-12-20T10:52:34.795Z"`.
|
|
612
|
+
* @maxLength 50
|
|
613
|
+
*/
|
|
614
|
+
timeZone?: string | null;
|
|
615
|
+
}
|
|
616
|
+
/** @oneof */
|
|
617
|
+
interface CursorSearchPagingMethodOneOf {
|
|
618
|
+
/**
|
|
619
|
+
* Cursor paging options.
|
|
620
|
+
*
|
|
621
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
622
|
+
*/
|
|
623
|
+
cursorPaging?: CursorPaging;
|
|
624
|
+
}
|
|
625
|
+
interface Aggregation extends AggregationKindOneOf {
|
|
626
|
+
/** Value aggregation. */
|
|
627
|
+
value?: ValueAggregation;
|
|
628
|
+
/** Range aggregation. */
|
|
629
|
+
range?: RangeAggregation;
|
|
630
|
+
/** Scalar aggregation. */
|
|
631
|
+
scalar?: ScalarAggregation;
|
|
632
|
+
/** Date histogram aggregation. */
|
|
633
|
+
dateHistogram?: DateHistogramAggregation;
|
|
634
|
+
/** Nested aggregation. */
|
|
635
|
+
nested?: NestedAggregation;
|
|
636
|
+
/**
|
|
637
|
+
* User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
638
|
+
* @maxLength 100
|
|
639
|
+
*/
|
|
640
|
+
name?: string | null;
|
|
641
|
+
/** Type of aggregation, client must provide matching aggregation field below. */
|
|
642
|
+
type?: AggregationTypeWithLiterals;
|
|
643
|
+
/**
|
|
644
|
+
* Field to aggregate by, use dot notation to specify json path.
|
|
645
|
+
* @maxLength 200
|
|
646
|
+
*/
|
|
647
|
+
fieldPath?: string;
|
|
648
|
+
/**
|
|
649
|
+
* Deprecated. Use `nested` instead.
|
|
650
|
+
* @deprecated Deprecated. Use `nested` instead.
|
|
651
|
+
* @replacedBy kind.nested
|
|
652
|
+
* @targetRemovalDate 2024-03-30
|
|
653
|
+
*/
|
|
654
|
+
groupBy?: GroupByAggregation;
|
|
655
|
+
}
|
|
656
|
+
/** @oneof */
|
|
657
|
+
interface AggregationKindOneOf {
|
|
658
|
+
/** Value aggregation. */
|
|
659
|
+
value?: ValueAggregation;
|
|
660
|
+
/** Range aggregation. */
|
|
661
|
+
range?: RangeAggregation;
|
|
662
|
+
/** Scalar aggregation. */
|
|
663
|
+
scalar?: ScalarAggregation;
|
|
664
|
+
/** Date histogram aggregation. */
|
|
665
|
+
dateHistogram?: DateHistogramAggregation;
|
|
666
|
+
/** Nested aggregation. */
|
|
667
|
+
nested?: NestedAggregation;
|
|
668
|
+
}
|
|
669
|
+
interface RangeBucket {
|
|
670
|
+
/** Inclusive lower bound of the range. Required if `to` is not provided. */
|
|
671
|
+
from?: number | null;
|
|
672
|
+
/** Exclusive upper bound of the range. Required if `from` is not provided. */
|
|
673
|
+
to?: number | null;
|
|
674
|
+
}
|
|
675
|
+
declare enum SortType {
|
|
676
|
+
/** Sort by number of matches. */
|
|
677
|
+
COUNT = "COUNT",
|
|
678
|
+
/** Sort by value of the field alphabetically. */
|
|
679
|
+
VALUE = "VALUE"
|
|
680
|
+
}
|
|
681
|
+
/** @enumType */
|
|
682
|
+
type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
|
|
683
|
+
declare enum SortDirection {
|
|
684
|
+
/** Sort in descending order. */
|
|
685
|
+
DESC = "DESC",
|
|
686
|
+
/** Sort in ascending order. */
|
|
687
|
+
ASC = "ASC"
|
|
688
|
+
}
|
|
689
|
+
/** @enumType */
|
|
690
|
+
type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
|
|
691
|
+
declare enum MissingValues {
|
|
692
|
+
/** Exclude missing values from the aggregation results. */
|
|
693
|
+
EXCLUDE = "EXCLUDE",
|
|
694
|
+
/** Include missing values in the aggregation results. */
|
|
695
|
+
INCLUDE = "INCLUDE"
|
|
696
|
+
}
|
|
697
|
+
/** @enumType */
|
|
698
|
+
type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
|
|
699
|
+
interface IncludeMissingValuesOptions {
|
|
700
|
+
/**
|
|
701
|
+
* Specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
702
|
+
* @maxLength 20
|
|
703
|
+
*/
|
|
704
|
+
addToBucket?: string;
|
|
705
|
+
}
|
|
706
|
+
declare enum ScalarType {
|
|
707
|
+
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
708
|
+
/** Count of distinct values. */
|
|
709
|
+
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
710
|
+
/** Minimum value. */
|
|
711
|
+
MIN = "MIN",
|
|
712
|
+
/** Maximum value. */
|
|
713
|
+
MAX = "MAX"
|
|
714
|
+
}
|
|
715
|
+
/** @enumType */
|
|
716
|
+
type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
|
|
717
|
+
interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
718
|
+
/** Options for including missing values. */
|
|
719
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
720
|
+
/** Whether to sort by number of matches or value of the field. */
|
|
721
|
+
sortType?: SortTypeWithLiterals;
|
|
722
|
+
/** Whether to sort in ascending or descending order. */
|
|
723
|
+
sortDirection?: SortDirectionWithLiterals;
|
|
724
|
+
/** How many aggregations to return. Can be between 1 and 250. 10 is the default. */
|
|
725
|
+
limit?: number | null;
|
|
726
|
+
/** Whether to include or exclude missing values from the aggregation results. Default: `EXCLUDE`. */
|
|
727
|
+
missingValues?: MissingValuesWithLiterals;
|
|
728
|
+
}
|
|
729
|
+
/** @oneof */
|
|
730
|
+
interface ValueAggregationOptionsOneOf {
|
|
731
|
+
/** Options for including missing values. */
|
|
732
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
733
|
+
}
|
|
734
|
+
declare enum NestedAggregationType {
|
|
735
|
+
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
736
|
+
/** An aggregation where result buckets are dynamically built - one per unique value. */
|
|
737
|
+
VALUE = "VALUE",
|
|
738
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket. */
|
|
739
|
+
RANGE = "RANGE",
|
|
740
|
+
/** A single-value metric aggregation. For example, min, max, sum, avg. */
|
|
741
|
+
SCALAR = "SCALAR",
|
|
742
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.). */
|
|
743
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
744
|
+
}
|
|
745
|
+
/** @enumType */
|
|
746
|
+
type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
|
|
747
|
+
interface RangeAggregation {
|
|
748
|
+
/**
|
|
749
|
+
* List of range buckets, where during aggregation each entity will be placed in the first bucket its value falls into, based on the provided range bounds.
|
|
750
|
+
* @maxSize 50
|
|
751
|
+
*/
|
|
752
|
+
buckets?: RangeBucket[];
|
|
753
|
+
}
|
|
754
|
+
interface ScalarAggregation {
|
|
755
|
+
/** Define the operator for the scalar aggregation. */
|
|
756
|
+
type?: ScalarTypeWithLiterals;
|
|
757
|
+
}
|
|
758
|
+
interface DateHistogramAggregation {
|
|
759
|
+
/** Interval for date histogram aggregation. */
|
|
760
|
+
interval?: IntervalWithLiterals;
|
|
761
|
+
}
|
|
762
|
+
declare enum Interval {
|
|
763
|
+
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
764
|
+
/** Yearly interval */
|
|
765
|
+
YEAR = "YEAR",
|
|
766
|
+
/** Monthly interval */
|
|
767
|
+
MONTH = "MONTH",
|
|
768
|
+
/** Weekly interval */
|
|
769
|
+
WEEK = "WEEK",
|
|
770
|
+
/** Daily interval */
|
|
771
|
+
DAY = "DAY",
|
|
772
|
+
/** Hourly interval */
|
|
773
|
+
HOUR = "HOUR",
|
|
774
|
+
/** Minute interval */
|
|
775
|
+
MINUTE = "MINUTE",
|
|
776
|
+
/** Second interval */
|
|
777
|
+
SECOND = "SECOND"
|
|
778
|
+
}
|
|
779
|
+
/** @enumType */
|
|
780
|
+
type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
|
|
781
|
+
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
782
|
+
/** Value aggregation. */
|
|
783
|
+
value?: ValueAggregation;
|
|
784
|
+
/** Range aggregation. */
|
|
785
|
+
range?: RangeAggregation;
|
|
786
|
+
/** Scalar aggregation. */
|
|
787
|
+
scalar?: ScalarAggregation;
|
|
788
|
+
/** Date histogram aggregation. */
|
|
789
|
+
dateHistogram?: DateHistogramAggregation;
|
|
790
|
+
/**
|
|
791
|
+
* User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
792
|
+
* @maxLength 100
|
|
793
|
+
*/
|
|
794
|
+
name?: string | null;
|
|
795
|
+
/** Type of aggregation, client must provide matching aggregation field below. */
|
|
796
|
+
type?: NestedAggregationTypeWithLiterals;
|
|
797
|
+
/**
|
|
798
|
+
* Field to aggregate by, use dot notation to specify json path.
|
|
799
|
+
* @maxLength 200
|
|
800
|
+
*/
|
|
801
|
+
fieldPath?: string;
|
|
802
|
+
}
|
|
803
|
+
/** @oneof */
|
|
804
|
+
interface NestedAggregationItemKindOneOf {
|
|
805
|
+
/** Value aggregation. */
|
|
806
|
+
value?: ValueAggregation;
|
|
807
|
+
/** Range aggregation. */
|
|
808
|
+
range?: RangeAggregation;
|
|
809
|
+
/** Scalar aggregation. */
|
|
810
|
+
scalar?: ScalarAggregation;
|
|
811
|
+
/** Date histogram aggregation. */
|
|
812
|
+
dateHistogram?: DateHistogramAggregation;
|
|
813
|
+
}
|
|
814
|
+
declare enum AggregationType {
|
|
815
|
+
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
816
|
+
/** An aggregation where result buckets are dynamically built - one per unique value. */
|
|
817
|
+
VALUE = "VALUE",
|
|
818
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket. */
|
|
819
|
+
RANGE = "RANGE",
|
|
820
|
+
/** A single-value metric aggregation. For example, min, max, sum, avg. */
|
|
821
|
+
SCALAR = "SCALAR",
|
|
822
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
823
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
824
|
+
/** Multi-level aggregation, where each next aggregation is nested within previous one. */
|
|
825
|
+
NESTED = "NESTED"
|
|
826
|
+
}
|
|
827
|
+
/** @enumType */
|
|
828
|
+
type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
|
|
829
|
+
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one. */
|
|
830
|
+
interface NestedAggregation {
|
|
831
|
+
/**
|
|
832
|
+
* Flattened list of aggregations, where each next aggregation is nested within previous one.
|
|
833
|
+
* @minSize 2
|
|
834
|
+
* @maxSize 3
|
|
835
|
+
*/
|
|
836
|
+
nestedAggregations?: NestedAggregationItem[];
|
|
837
|
+
}
|
|
838
|
+
interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
839
|
+
/** Value aggregation configuration. */
|
|
840
|
+
value?: ValueAggregation;
|
|
841
|
+
/**
|
|
842
|
+
* User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
843
|
+
* @maxLength 100
|
|
844
|
+
*/
|
|
845
|
+
name?: string | null;
|
|
846
|
+
/**
|
|
847
|
+
* Field to aggregate by.
|
|
848
|
+
* @maxLength 200
|
|
849
|
+
*/
|
|
850
|
+
fieldPath?: string;
|
|
851
|
+
}
|
|
852
|
+
/** @oneof */
|
|
853
|
+
interface GroupByAggregationKindOneOf {
|
|
854
|
+
/** Value aggregation configuration. */
|
|
855
|
+
value?: ValueAggregation;
|
|
856
|
+
}
|
|
857
|
+
interface SearchDetails {
|
|
858
|
+
/** Defines how separate search terms in `expression` are combined. */
|
|
859
|
+
mode?: ModeWithLiterals;
|
|
860
|
+
/**
|
|
861
|
+
* Search term or expression.
|
|
862
|
+
* @maxLength 100
|
|
863
|
+
*/
|
|
864
|
+
expression?: string | null;
|
|
865
|
+
/**
|
|
866
|
+
* Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.
|
|
867
|
+
* @maxLength 200
|
|
868
|
+
* @maxSize 20
|
|
869
|
+
*/
|
|
870
|
+
fields?: string[];
|
|
871
|
+
/** Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). */
|
|
872
|
+
fuzzy?: boolean;
|
|
873
|
+
}
|
|
874
|
+
declare enum Mode {
|
|
875
|
+
/** Any of the search terms must be present. */
|
|
876
|
+
OR = "OR",
|
|
877
|
+
/** All search terms must be present. */
|
|
878
|
+
AND = "AND"
|
|
879
|
+
}
|
|
880
|
+
/** @enumType */
|
|
881
|
+
type ModeWithLiterals = Mode | 'OR' | 'AND';
|
|
882
|
+
interface SearchProgramsResponse {
|
|
883
|
+
/** Found programs */
|
|
884
|
+
programs?: Program[];
|
|
885
|
+
/** paging */
|
|
886
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
887
|
+
/** aggregation */
|
|
888
|
+
aggregationData?: AggregationData;
|
|
889
|
+
}
|
|
890
|
+
interface CursorPagingMetadata {
|
|
891
|
+
/** Number of items returned in current page. */
|
|
892
|
+
count?: number | null;
|
|
893
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
894
|
+
cursors?: Cursors;
|
|
895
|
+
/**
|
|
896
|
+
* Whether there are more pages to retrieve following the current page.
|
|
897
|
+
*
|
|
898
|
+
* + `true`: Another page of results can be retrieved.
|
|
899
|
+
* + `false`: This is the last page.
|
|
900
|
+
*/
|
|
901
|
+
hasNext?: boolean | null;
|
|
902
|
+
}
|
|
903
|
+
interface AggregationData {
|
|
904
|
+
/**
|
|
905
|
+
* key = aggregation name (as derived from search request).
|
|
906
|
+
* @maxSize 10000
|
|
907
|
+
*/
|
|
908
|
+
results?: AggregationResults[];
|
|
909
|
+
}
|
|
910
|
+
interface ValueAggregationResult {
|
|
911
|
+
/**
|
|
912
|
+
* Value of the field.
|
|
913
|
+
* @maxLength 100
|
|
914
|
+
*/
|
|
915
|
+
value?: string;
|
|
916
|
+
/** Count of entities with this value. */
|
|
917
|
+
count?: number;
|
|
918
|
+
}
|
|
919
|
+
interface RangeAggregationResult {
|
|
920
|
+
/** Inclusive lower bound of the range. */
|
|
921
|
+
from?: number | null;
|
|
922
|
+
/** Exclusive upper bound of the range. */
|
|
923
|
+
to?: number | null;
|
|
924
|
+
/** Count of entities in this range. */
|
|
925
|
+
count?: number;
|
|
926
|
+
}
|
|
927
|
+
interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
928
|
+
/** Value aggregation results. */
|
|
929
|
+
values?: ValueResults;
|
|
930
|
+
/** Range aggregation results. */
|
|
931
|
+
ranges?: RangeResults;
|
|
932
|
+
/** Scalar aggregation results. */
|
|
933
|
+
scalar?: AggregationResultsScalarResult;
|
|
934
|
+
/**
|
|
935
|
+
* User-defined name of aggregation, matches the one provided in request.
|
|
936
|
+
* @maxLength 100
|
|
937
|
+
*/
|
|
938
|
+
name?: string;
|
|
939
|
+
/** Type of aggregation that matches result. */
|
|
940
|
+
type?: AggregationTypeWithLiterals;
|
|
941
|
+
/**
|
|
942
|
+
* Field to aggregate by, matches the one provided in request.
|
|
943
|
+
* @maxLength 200
|
|
944
|
+
*/
|
|
945
|
+
fieldPath?: string;
|
|
946
|
+
}
|
|
947
|
+
/** @oneof */
|
|
948
|
+
interface NestedAggregationResultsResultOneOf {
|
|
949
|
+
/** Value aggregation results. */
|
|
950
|
+
values?: ValueResults;
|
|
951
|
+
/** Range aggregation results. */
|
|
952
|
+
ranges?: RangeResults;
|
|
953
|
+
/** Scalar aggregation results. */
|
|
954
|
+
scalar?: AggregationResultsScalarResult;
|
|
955
|
+
}
|
|
956
|
+
interface ValueResults {
|
|
957
|
+
/**
|
|
958
|
+
* List of value aggregations.
|
|
959
|
+
* @maxSize 250
|
|
960
|
+
*/
|
|
961
|
+
results?: ValueAggregationResult[];
|
|
962
|
+
}
|
|
963
|
+
interface RangeResults {
|
|
964
|
+
/**
|
|
965
|
+
* List of ranges returned in same order as requested.
|
|
966
|
+
* @maxSize 50
|
|
967
|
+
*/
|
|
968
|
+
results?: RangeAggregationResult[];
|
|
969
|
+
}
|
|
970
|
+
interface AggregationResultsScalarResult {
|
|
971
|
+
/** Type of scalar aggregation. */
|
|
972
|
+
type?: ScalarTypeWithLiterals;
|
|
973
|
+
/** Value of the scalar aggregation. */
|
|
974
|
+
value?: number;
|
|
975
|
+
}
|
|
976
|
+
interface NestedValueAggregationResult {
|
|
977
|
+
/**
|
|
978
|
+
* Value of the field.
|
|
979
|
+
* @maxLength 1000
|
|
980
|
+
*/
|
|
981
|
+
value?: string;
|
|
982
|
+
/** Nested aggregations. */
|
|
983
|
+
nestedResults?: NestedAggregationResults;
|
|
984
|
+
}
|
|
985
|
+
interface ValueResult {
|
|
986
|
+
/**
|
|
987
|
+
* Value of the field.
|
|
988
|
+
* @maxLength 1000
|
|
989
|
+
*/
|
|
990
|
+
value?: string;
|
|
991
|
+
/** Count of entities with this value. */
|
|
992
|
+
count?: number | null;
|
|
993
|
+
}
|
|
994
|
+
interface RangeResult {
|
|
995
|
+
/** Inclusive lower bound of the range. */
|
|
996
|
+
from?: number | null;
|
|
997
|
+
/** Exclusive upper bound of the range. */
|
|
998
|
+
to?: number | null;
|
|
999
|
+
/** Count of entities in this range. */
|
|
1000
|
+
count?: number | null;
|
|
1001
|
+
}
|
|
1002
|
+
interface ScalarResult {
|
|
1003
|
+
/** Value of the scalar aggregation. */
|
|
1004
|
+
value?: number;
|
|
1005
|
+
}
|
|
1006
|
+
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
1007
|
+
/** Value aggregation result. */
|
|
1008
|
+
value?: ValueResult;
|
|
1009
|
+
/** Range aggregation result. */
|
|
1010
|
+
range?: RangeResult;
|
|
1011
|
+
/** Scalar aggregation result. */
|
|
1012
|
+
scalar?: ScalarResult;
|
|
1013
|
+
/** Date histogram aggregation result. */
|
|
1014
|
+
dateHistogram?: ValueResult;
|
|
1015
|
+
}
|
|
1016
|
+
/** @oneof */
|
|
1017
|
+
interface NestedResultValueResultOneOf {
|
|
1018
|
+
/** Value aggregation result. */
|
|
1019
|
+
value?: ValueResult;
|
|
1020
|
+
/** Range aggregation result. */
|
|
1021
|
+
range?: RangeResult;
|
|
1022
|
+
/** Scalar aggregation result. */
|
|
1023
|
+
scalar?: ScalarResult;
|
|
1024
|
+
/** Date histogram aggregation result. */
|
|
1025
|
+
dateHistogram?: ValueResult;
|
|
1026
|
+
}
|
|
1027
|
+
interface Results {
|
|
1028
|
+
/** List of nested aggregations. */
|
|
1029
|
+
results?: Record<string, NestedResultValue>;
|
|
1030
|
+
}
|
|
1031
|
+
interface DateHistogramResult {
|
|
1032
|
+
/**
|
|
1033
|
+
* Date in ISO 8601 format.
|
|
1034
|
+
* @maxLength 100
|
|
1035
|
+
*/
|
|
1036
|
+
value?: string;
|
|
1037
|
+
/** Count of documents in the bucket. */
|
|
1038
|
+
count?: number;
|
|
1039
|
+
}
|
|
1040
|
+
interface GroupByValueResults {
|
|
1041
|
+
/**
|
|
1042
|
+
* List of value aggregations.
|
|
1043
|
+
* @maxSize 1000
|
|
1044
|
+
*/
|
|
1045
|
+
results?: NestedValueAggregationResult[];
|
|
1046
|
+
}
|
|
1047
|
+
interface DateHistogramResults {
|
|
1048
|
+
/**
|
|
1049
|
+
* List of date histogram aggregations.
|
|
1050
|
+
* @maxSize 200
|
|
1051
|
+
*/
|
|
1052
|
+
results?: DateHistogramResult[];
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* Results of `NESTED` aggregation type in a flattened form.
|
|
1056
|
+
* Aggregations in resulting array are keyed by requested aggregation `name`.
|
|
1057
|
+
*/
|
|
1058
|
+
interface NestedResults {
|
|
1059
|
+
/**
|
|
1060
|
+
* List of nested aggregations.
|
|
1061
|
+
* @maxSize 1000
|
|
1062
|
+
*/
|
|
1063
|
+
results?: Results[];
|
|
1064
|
+
}
|
|
1065
|
+
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
1066
|
+
/** Value aggregation results. */
|
|
1067
|
+
values?: ValueResults;
|
|
1068
|
+
/** Range aggregation results. */
|
|
1069
|
+
ranges?: RangeResults;
|
|
1070
|
+
/** Scalar aggregation results. */
|
|
1071
|
+
scalar?: AggregationResultsScalarResult;
|
|
1072
|
+
/** Group by value aggregation results. */
|
|
1073
|
+
groupedByValue?: GroupByValueResults;
|
|
1074
|
+
/** Date histogram aggregation results. */
|
|
1075
|
+
dateHistogram?: DateHistogramResults;
|
|
1076
|
+
/** Nested aggregation results. */
|
|
1077
|
+
nested?: NestedResults;
|
|
1078
|
+
/**
|
|
1079
|
+
* User-defined name of aggregation as derived from search request.
|
|
1080
|
+
* @maxLength 100
|
|
1081
|
+
*/
|
|
1082
|
+
name?: string;
|
|
1083
|
+
/** Type of aggregation that must match provided kind as derived from search request. */
|
|
1084
|
+
type?: AggregationTypeWithLiterals;
|
|
1085
|
+
/**
|
|
1086
|
+
* Field to aggregate by as derived from search request.
|
|
1087
|
+
* @maxLength 200
|
|
1088
|
+
*/
|
|
1089
|
+
fieldPath?: string;
|
|
1090
|
+
}
|
|
1091
|
+
/** @oneof */
|
|
1092
|
+
interface AggregationResultsResultOneOf {
|
|
1093
|
+
/** Value aggregation results. */
|
|
1094
|
+
values?: ValueResults;
|
|
1095
|
+
/** Range aggregation results. */
|
|
1096
|
+
ranges?: RangeResults;
|
|
1097
|
+
/** Scalar aggregation results. */
|
|
1098
|
+
scalar?: AggregationResultsScalarResult;
|
|
1099
|
+
/** Group by value aggregation results. */
|
|
1100
|
+
groupedByValue?: GroupByValueResults;
|
|
1101
|
+
/** Date histogram aggregation results. */
|
|
1102
|
+
dateHistogram?: DateHistogramResults;
|
|
1103
|
+
/** Nested aggregation results. */
|
|
1104
|
+
nested?: NestedResults;
|
|
1105
|
+
}
|
|
1106
|
+
interface PublishProgramRequest {
|
|
1107
|
+
/**
|
|
1108
|
+
* Program to publish
|
|
1109
|
+
* @format GUID
|
|
1110
|
+
*/
|
|
1111
|
+
programId: string;
|
|
1112
|
+
}
|
|
1113
|
+
interface PublishProgramResponse {
|
|
1114
|
+
/** Published program */
|
|
1115
|
+
program?: Program;
|
|
1116
|
+
}
|
|
1117
|
+
interface EndProgramRequest {
|
|
1118
|
+
/**
|
|
1119
|
+
* Program to finish
|
|
1120
|
+
* @format GUID
|
|
1121
|
+
*/
|
|
1122
|
+
programId: string;
|
|
1123
|
+
}
|
|
1124
|
+
interface EndProgramResponse {
|
|
1125
|
+
/** Finished program */
|
|
1126
|
+
program?: Program;
|
|
1127
|
+
}
|
|
1128
|
+
interface ArchiveProgramRequest {
|
|
1129
|
+
/**
|
|
1130
|
+
* Program to archive
|
|
1131
|
+
* @format GUID
|
|
1132
|
+
*/
|
|
1133
|
+
programId: string;
|
|
1134
|
+
}
|
|
1135
|
+
interface ArchiveProgramResponse {
|
|
1136
|
+
/** Archived program */
|
|
1137
|
+
program?: Program;
|
|
1138
|
+
}
|
|
1139
|
+
interface BulkUpdateProgramsRequest {
|
|
1140
|
+
/**
|
|
1141
|
+
* List of programs you want to update
|
|
1142
|
+
* @minSize 1
|
|
1143
|
+
* @maxSize 100
|
|
1144
|
+
*/
|
|
1145
|
+
programs: MaskedProgram[];
|
|
1146
|
+
/** set to `true` if you wish to receive back the created programs in the response */
|
|
1147
|
+
returnEntity?: boolean;
|
|
1148
|
+
}
|
|
1149
|
+
interface MaskedProgram {
|
|
1150
|
+
/** Program to be updated, may be partial */
|
|
1151
|
+
program?: Program;
|
|
1152
|
+
/** Explicit list of fields to update. */
|
|
1153
|
+
fieldMask?: string[];
|
|
1154
|
+
}
|
|
1155
|
+
interface BulkUpdateProgramsResponse {
|
|
1156
|
+
/**
|
|
1157
|
+
* @minSize 1
|
|
1158
|
+
* @maxSize 100
|
|
1159
|
+
*/
|
|
1160
|
+
results?: BulkUpdateProgramResult[];
|
|
1161
|
+
/** metadata */
|
|
1162
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1163
|
+
}
|
|
1164
|
+
interface BulkUpdateProgramResult {
|
|
1165
|
+
/** item metadata */
|
|
1166
|
+
itemMetadata?: ItemMetadata;
|
|
1167
|
+
/** Only exists if `returnEntity` was set to true in the request */
|
|
1168
|
+
item?: Program;
|
|
1169
|
+
}
|
|
1170
|
+
interface CountProgramsRequest {
|
|
1171
|
+
/** filter for which count is requested */
|
|
1172
|
+
filter?: Record<string, any> | null;
|
|
1173
|
+
}
|
|
1174
|
+
interface CountProgramsResponse {
|
|
1175
|
+
/** count of programs matching filter */
|
|
1176
|
+
count?: number;
|
|
1177
|
+
}
|
|
1178
|
+
interface ListSampleProgramsRequest {
|
|
1179
|
+
}
|
|
1180
|
+
interface ListSampleProgramsResponse {
|
|
1181
|
+
/**
|
|
1182
|
+
* sample programs
|
|
1183
|
+
* @maxSize 100
|
|
1184
|
+
*/
|
|
1185
|
+
programs?: LabeledProgram[];
|
|
1186
|
+
}
|
|
1187
|
+
interface LabeledProgram {
|
|
1188
|
+
/** sample program */
|
|
1189
|
+
program?: Program;
|
|
1190
|
+
/**
|
|
1191
|
+
* label, showing category for program
|
|
1192
|
+
* @maxLength 1000
|
|
1193
|
+
*/
|
|
1194
|
+
label?: string;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
1198
|
+
getUrl: (context: any) => string;
|
|
1199
|
+
httpMethod: K;
|
|
1200
|
+
path: string;
|
|
1201
|
+
pathParams: M;
|
|
1202
|
+
__requestType: T;
|
|
1203
|
+
__originalRequestType: S;
|
|
1204
|
+
__responseType: Q;
|
|
1205
|
+
__originalResponseType: R;
|
|
1206
|
+
};
|
|
1207
|
+
declare function createProgram(): __PublicMethodMetaInfo<'POST', {}, CreateProgramRequest$1, CreateProgramRequest, CreateProgramResponse$1, CreateProgramResponse>;
|
|
1208
|
+
declare function duplicateProgram(): __PublicMethodMetaInfo<'POST', {
|
|
1209
|
+
programId: string;
|
|
1210
|
+
}, DuplicateProgramRequest$1, DuplicateProgramRequest, DuplicateProgramResponse$1, DuplicateProgramResponse>;
|
|
1211
|
+
declare function getProgram(): __PublicMethodMetaInfo<'GET', {
|
|
1212
|
+
programId: string;
|
|
1213
|
+
}, GetProgramRequest$1, GetProgramRequest, GetProgramResponse$1, GetProgramResponse>;
|
|
1214
|
+
declare function updateProgram(): __PublicMethodMetaInfo<'PATCH', {
|
|
1215
|
+
programId: string;
|
|
1216
|
+
}, UpdateProgramRequest$1, UpdateProgramRequest, UpdateProgramResponse$1, UpdateProgramResponse>;
|
|
1217
|
+
declare function deleteProgram(): __PublicMethodMetaInfo<'DELETE', {
|
|
1218
|
+
programId: string;
|
|
1219
|
+
}, DeleteProgramRequest$1, DeleteProgramRequest, DeleteProgramResponse$1, DeleteProgramResponse>;
|
|
1220
|
+
declare function queryPrograms(): __PublicMethodMetaInfo<'POST', {}, QueryProgramsRequest$1, QueryProgramsRequest, QueryProgramsResponse$1, QueryProgramsResponse>;
|
|
1221
|
+
declare function searchPrograms(): __PublicMethodMetaInfo<'POST', {}, SearchProgramsRequest$1, SearchProgramsRequest, SearchProgramsResponse$1, SearchProgramsResponse>;
|
|
1222
|
+
declare function publishProgram(): __PublicMethodMetaInfo<'POST', {
|
|
1223
|
+
programId: string;
|
|
1224
|
+
}, PublishProgramRequest$1, PublishProgramRequest, PublishProgramResponse$1, PublishProgramResponse>;
|
|
1225
|
+
declare function endProgram(): __PublicMethodMetaInfo<'POST', {
|
|
1226
|
+
programId: string;
|
|
1227
|
+
}, EndProgramRequest$1, EndProgramRequest, EndProgramResponse$1, EndProgramResponse>;
|
|
1228
|
+
declare function archiveProgram(): __PublicMethodMetaInfo<'POST', {
|
|
1229
|
+
programId: string;
|
|
1230
|
+
}, ArchiveProgramRequest$1, ArchiveProgramRequest, ArchiveProgramResponse$1, ArchiveProgramResponse>;
|
|
1231
|
+
declare function bulkUpdatePrograms(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateProgramsRequest$1, BulkUpdateProgramsRequest, BulkUpdateProgramsResponse$1, BulkUpdateProgramsResponse>;
|
|
1232
|
+
declare function countPrograms(): __PublicMethodMetaInfo<'POST', {}, CountProgramsRequest$1, CountProgramsRequest, CountProgramsResponse$1, CountProgramsResponse>;
|
|
1233
|
+
declare function listSamplePrograms(): __PublicMethodMetaInfo<'GET', {}, ListSampleProgramsRequest$1, ListSampleProgramsRequest, ListSampleProgramsResponse$1, ListSampleProgramsResponse>;
|
|
1234
|
+
|
|
1235
|
+
export { type __PublicMethodMetaInfo, archiveProgram, bulkUpdatePrograms, countPrograms, createProgram, deleteProgram, duplicateProgram, endProgram, getProgram, listSamplePrograms, publishProgram, queryPrograms, searchPrograms, updateProgram };
|