@qlik/api 0.0.1

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 (160) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +8 -0
  3. package/api-keys.d.mts +313 -0
  4. package/api-keys.d.ts +313 -0
  5. package/api-keys.js +76 -0
  6. package/api-keys.mjs +76 -0
  7. package/apps.d.mts +1921 -0
  8. package/apps.d.ts +1921 -0
  9. package/apps.js +331 -0
  10. package/apps.mjs +331 -0
  11. package/audits.d.mts +262 -0
  12. package/audits.d.ts +262 -0
  13. package/audits.js +63 -0
  14. package/audits.mjs +63 -0
  15. package/auth-CSVTXOZX.js +36 -0
  16. package/auth-TE272Q34.mjs +36 -0
  17. package/auth-types-nnUcWhuU.d.mts +98 -0
  18. package/auth-types-nnUcWhuU.d.ts +98 -0
  19. package/auth.d.mts +26 -0
  20. package/auth.d.ts +26 -0
  21. package/auth.js +13 -0
  22. package/auth.mjs +13 -0
  23. package/automations.d.mts +638 -0
  24. package/automations.d.ts +638 -0
  25. package/automations.js +166 -0
  26. package/automations.mjs +166 -0
  27. package/brands.d.mts +614 -0
  28. package/brands.d.ts +614 -0
  29. package/brands.js +118 -0
  30. package/brands.mjs +118 -0
  31. package/chunk-3YE7EI7I.mjs +17 -0
  32. package/chunk-4ES65KO3.js +57 -0
  33. package/chunk-4FLMND6T.js +25 -0
  34. package/chunk-4OMEH5SW.mjs +1337 -0
  35. package/chunk-CKPJE4IA.mjs +57 -0
  36. package/chunk-GUQBHY3H.mjs +25 -0
  37. package/chunk-OULT3V2U.js +17 -0
  38. package/chunk-WM7FQU2U.mjs +21 -0
  39. package/chunk-XASXL2NC.js +1337 -0
  40. package/chunk-ZT4C7KCQ.js +21 -0
  41. package/collections.d.mts +535 -0
  42. package/collections.d.ts +535 -0
  43. package/collections.js +100 -0
  44. package/collections.mjs +100 -0
  45. package/csp-origins.d.mts +258 -0
  46. package/csp-origins.d.ts +258 -0
  47. package/csp-origins.js +66 -0
  48. package/csp-origins.mjs +66 -0
  49. package/data-assets.d.mts +195 -0
  50. package/data-assets.d.ts +195 -0
  51. package/data-assets.js +61 -0
  52. package/data-assets.mjs +61 -0
  53. package/data-connections.d.mts +527 -0
  54. package/data-connections.d.ts +527 -0
  55. package/data-connections.js +96 -0
  56. package/data-connections.mjs +96 -0
  57. package/data-credentials.d.mts +188 -0
  58. package/data-credentials.d.ts +188 -0
  59. package/data-credentials.js +56 -0
  60. package/data-credentials.mjs +56 -0
  61. package/data-files.d.mts +471 -0
  62. package/data-files.d.ts +471 -0
  63. package/data-files.js +116 -0
  64. package/data-files.mjs +116 -0
  65. package/docs/examples.md +4 -0
  66. package/enigma-session-4L373ALV.mjs +10196 -0
  67. package/enigma-session-TEB53FAF.js +10196 -0
  68. package/esm-4X3DKK5D.js +63 -0
  69. package/esm-SOWVJKOQ.mjs +63 -0
  70. package/extensions.d.mts +257 -0
  71. package/extensions.d.ts +257 -0
  72. package/extensions.js +74 -0
  73. package/extensions.mjs +74 -0
  74. package/global.types-Eto4uYwy.d.mts +102 -0
  75. package/global.types-hIvp-WdX.d.ts +102 -0
  76. package/glossaries.d.mts +1041 -0
  77. package/glossaries.d.ts +1041 -0
  78. package/glossaries.js +225 -0
  79. package/glossaries.mjs +225 -0
  80. package/groups.d.mts +379 -0
  81. package/groups.d.ts +379 -0
  82. package/groups.js +83 -0
  83. package/groups.mjs +83 -0
  84. package/identity-providers.d.mts +492 -0
  85. package/identity-providers.d.ts +492 -0
  86. package/identity-providers.js +80 -0
  87. package/identity-providers.mjs +80 -0
  88. package/index.d.mts +142 -0
  89. package/index.d.ts +142 -0
  90. package/index.js +678 -0
  91. package/index.mjs +678 -0
  92. package/invoke-fetch-MSSJAZ7K.mjs +14 -0
  93. package/invoke-fetch-PEI54KZO.js +14 -0
  94. package/items.d.mts +501 -0
  95. package/items.d.ts +501 -0
  96. package/items.js +84 -0
  97. package/items.mjs +84 -0
  98. package/licenses.d.mts +436 -0
  99. package/licenses.d.ts +436 -0
  100. package/licenses.js +87 -0
  101. package/licenses.mjs +87 -0
  102. package/package.json +264 -0
  103. package/qix-EU7PXRZ6.mjs +573 -0
  104. package/qix-RLTISYTB.js +573 -0
  105. package/qix.d.mts +11543 -0
  106. package/qix.d.ts +11543 -0
  107. package/qix.js +9 -0
  108. package/qix.mjs +9 -0
  109. package/quotas.d.mts +105 -0
  110. package/quotas.d.ts +105 -0
  111. package/quotas.js +31 -0
  112. package/quotas.mjs +31 -0
  113. package/reload-tasks.d.mts +222 -0
  114. package/reload-tasks.d.ts +222 -0
  115. package/reload-tasks.js +59 -0
  116. package/reload-tasks.mjs +59 -0
  117. package/reloads.d.mts +189 -0
  118. package/reloads.d.ts +189 -0
  119. package/reloads.js +44 -0
  120. package/reloads.mjs +44 -0
  121. package/roles.d.mts +150 -0
  122. package/roles.d.ts +150 -0
  123. package/roles.js +30 -0
  124. package/roles.mjs +30 -0
  125. package/spaces.d.mts +524 -0
  126. package/spaces.d.ts +524 -0
  127. package/spaces.js +118 -0
  128. package/spaces.mjs +118 -0
  129. package/temp-contents.d.mts +222 -0
  130. package/temp-contents.d.ts +222 -0
  131. package/temp-contents.js +60 -0
  132. package/temp-contents.mjs +60 -0
  133. package/tenants.d.mts +276 -0
  134. package/tenants.d.ts +276 -0
  135. package/tenants.js +68 -0
  136. package/tenants.mjs +68 -0
  137. package/themes.d.mts +235 -0
  138. package/themes.d.ts +235 -0
  139. package/themes.js +74 -0
  140. package/themes.mjs +74 -0
  141. package/transports.d.mts +298 -0
  142. package/transports.d.ts +298 -0
  143. package/transports.js +62 -0
  144. package/transports.mjs +62 -0
  145. package/users.d.mts +544 -0
  146. package/users.d.ts +544 -0
  147. package/users.js +99 -0
  148. package/users.mjs +99 -0
  149. package/web-integrations.d.mts +246 -0
  150. package/web-integrations.d.ts +246 -0
  151. package/web-integrations.js +59 -0
  152. package/web-integrations.mjs +59 -0
  153. package/web-notifications.d.mts +220 -0
  154. package/web-notifications.d.ts +220 -0
  155. package/web-notifications.js +66 -0
  156. package/web-notifications.mjs +66 -0
  157. package/webhooks.d.mts +422 -0
  158. package/webhooks.d.ts +422 -0
  159. package/webhooks.js +100 -0
  160. package/webhooks.mjs +100 -0
@@ -0,0 +1,535 @@
1
+ import { A as ApiCallOptions } from './global.types-hIvp-WdX.js';
2
+ import './auth-types-nnUcWhuU.js';
3
+
4
+ type CollectionTypes = "private" | "public" | "publicgoverned";
5
+ type CollectionsAddCollectionItemRequestBody = {
6
+ /** The item's unique identifier. */
7
+ id: string;
8
+ };
9
+ type CollectionsCreateCollectionRequestBody = {
10
+ description?: string;
11
+ name: string;
12
+ type: CollectionTypes;
13
+ };
14
+ type CollectionsListCollectionItemsResponseBody = {
15
+ data: ItemResultResponseBody[];
16
+ };
17
+ type CollectionsListCollectionsResponseBody = {
18
+ data: CollectionResultResponseBody[];
19
+ links: CollectionsLinksResponseBody;
20
+ };
21
+ type CollectionsUpdateCollectionRequestBody = {
22
+ description?: string;
23
+ name?: string;
24
+ };
25
+ type ErrorResponseBody = {
26
+ errors?: ServiceError[];
27
+ };
28
+ type Link = {
29
+ href?: string;
30
+ };
31
+ type ServiceError = {
32
+ /** Code is a unique identifier for this error class. */
33
+ code?: string;
34
+ /** Detail is a human-readable explanation specific to this occurrence of the problem. */
35
+ detail?: string;
36
+ meta?: Meta;
37
+ /** Title is the name of this class of errors. */
38
+ title?: string;
39
+ };
40
+ type CollectionLinksResponseBody = {
41
+ items?: Link;
42
+ self?: Link;
43
+ };
44
+ type CollectionMetaResponseBody = {
45
+ /** Multiple items. */
46
+ items?: ItemsResultResponseBody;
47
+ };
48
+ type CollectionResultResponseBody = {
49
+ /** The RFC3339 datetime when the collection was created. */
50
+ createdAt: string;
51
+ /** The ID of the user who created the collection. This property is only populated if the JWT contains a userId. */
52
+ creatorId?: string;
53
+ description?: string;
54
+ /** States if a collection has reached its items limit or not */
55
+ full?: boolean;
56
+ /** The collection's unique identifier. */
57
+ id: string;
58
+ /** The number of items that have been added to the collection that the user has access to. */
59
+ itemCount: number;
60
+ links: CollectionLinksResponseBody;
61
+ /** Collection metadata and computed fields. */
62
+ meta?: CollectionMetaResponseBody;
63
+ name: string;
64
+ /** The ID of the tenant that owns the collection. This property is populated by using JWT. */
65
+ tenantId: string;
66
+ type: "private" | "public" | "favorite" | "publicgoverned";
67
+ /** The RFC3339 datetime when the collection was last updated. */
68
+ updatedAt: string;
69
+ /** The ID of the user who last updated the collection. This property is only populated if the JWT contains a userId. */
70
+ updaterId?: string;
71
+ };
72
+ type CollectionsLinksResponseBody = {
73
+ item?: Link;
74
+ next?: Link;
75
+ prev?: Link;
76
+ self?: Link;
77
+ };
78
+ type ItemLinksResponseBody = {
79
+ collections?: Link;
80
+ open?: Link;
81
+ self?: Link;
82
+ thumbnail?: Link;
83
+ };
84
+ type ItemMetaResponseBody = {
85
+ /** The actions that the user can perform on the item. */
86
+ actions: string[];
87
+ /** An array of collections that the item is part of. */
88
+ collections: ItemTagResponseBody[];
89
+ /** The flag that indicates if item is in the user's favorites collection. */
90
+ isFavorited: boolean;
91
+ /** An array of tags that the item is part of. */
92
+ tags: ItemTagResponseBody[];
93
+ };
94
+ type ItemResourceTypeEnum = "app" | "collection" | "qlikview" | "insight" | "qvapp" | "genericlink" | "sharingservicetask" | "note" | "dataasset" | "dataset" | "automation" | "automl-experiment" | "automl-deployment";
95
+ type ItemResultResponseBody = {
96
+ /** The actions that the user can perform on the item. */
97
+ actions: string[];
98
+ /** The ID of the collections that the item has been added to. */
99
+ collectionIds: string[];
100
+ /** The RFC3339 datetime when the item was created. */
101
+ createdAt: string;
102
+ /** The ID of the user who created the item. This is only populated if the JWT contains a userId. */
103
+ creatorId?: string;
104
+ description?: string;
105
+ /** The item's unique identifier. */
106
+ id: string;
107
+ /** The flag that indicates if item is in the user's favorites collection. */
108
+ isFavorited: boolean;
109
+ itemViews?: ItemViewsResponseBody;
110
+ links: ItemLinksResponseBody;
111
+ /** Item metadata and computed fields. */
112
+ meta: ItemMetaResponseBody;
113
+ name: string;
114
+ /** The ID of the user who owns the item. */
115
+ ownerId?: string;
116
+ resourceAttributes: unknown;
117
+ /** The RFC3339 datetime when the resource that the item references was created. */
118
+ resourceCreatedAt: string;
119
+ resourceCustomAttributes: unknown;
120
+ /** The case-sensitive string used to search for an item by resourceId. If resourceId is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. */
121
+ resourceId?: string;
122
+ /** The case-sensitive string used to search for an item by resourceLink. If resourceLink is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. */
123
+ resourceLink?: string;
124
+ /** The RFC3339 datetime when the resource last reload ended. */
125
+ resourceReloadEndTime?: string;
126
+ /** If the resource last reload was successful or not. */
127
+ resourceReloadStatus?: string;
128
+ resourceSize?: ItemsResourceSizeResponseBody;
129
+ /** Optional field defining the item's subtype, if any. */
130
+ resourceSubType?: string;
131
+ /** The case-sensitive string defining the item's type. */
132
+ resourceType: ItemResourceTypeEnum;
133
+ /** The RFC3339 datetime when the resource that the item references was last updated. */
134
+ resourceUpdatedAt: string;
135
+ /** The space's unique identifier. */
136
+ spaceId?: string;
137
+ /** The ID of the tenant that owns the item. This is populated using the JWT. */
138
+ tenantId: string;
139
+ /** The item thumbnail's unique identifier. This is optional for internal resources. */
140
+ thumbnailId?: string;
141
+ /** The RFC3339 datetime when the item was last updated. */
142
+ updatedAt: string;
143
+ /** ID of the user who last updated the item. This is only populated if the JWT contains a userId. */
144
+ updaterId?: string;
145
+ };
146
+ type ItemTagResponseBody = {
147
+ /** The ID of the tag/collection. */
148
+ id: string;
149
+ /** The name of the tag/collection. */
150
+ name: string;
151
+ };
152
+ type ItemViewsResponseBody = {
153
+ /** Total number of views the resource got during the last 28 days. */
154
+ total?: number;
155
+ /** Trend in views over the last 4 weeks. */
156
+ trend?: number;
157
+ /** Number of unique users who viewed the resource during the last 28 days. */
158
+ unique?: number;
159
+ /** Number of apps this dataset is used in (datasets only). */
160
+ usedBy?: number;
161
+ week?: ItemViewsWeeksResponseBody[];
162
+ };
163
+ type ItemViewsWeeksResponseBody = {
164
+ /** The RFC3339 datetime representing the start of the referenced week. */
165
+ start?: string;
166
+ /** Total number of views the resource got during the referenced week. */
167
+ total?: number;
168
+ /** Number of unique users who viewed the resource during the referenced week. */
169
+ unique?: number;
170
+ };
171
+ type ItemsLinksResponseBody = {
172
+ collection?: Link;
173
+ next?: Link;
174
+ prev?: Link;
175
+ self?: Link;
176
+ };
177
+ type ItemsResourceSizeResponseBody = {
178
+ /** Size of the app on disk in bytes. */
179
+ appFile?: number;
180
+ /** Size of the app in memory in bytes. */
181
+ appMemory?: number;
182
+ };
183
+ type ItemsResultResponseBody = {
184
+ data: ItemResultResponseBody[];
185
+ links: ItemsLinksResponseBody;
186
+ };
187
+ type Meta = {
188
+ /** Further explanation of the error */
189
+ explain?: unknown;
190
+ /** Is the error a server-side fault? */
191
+ fault?: boolean;
192
+ /** Is the error temporary? */
193
+ temporary?: boolean;
194
+ /** Is the error a timeout? */
195
+ timeout?: boolean;
196
+ };
197
+ /**
198
+ * Finds and returns the collections that the user can access. This endpoint does not return the user's favorites collection.
199
+ *
200
+ * @param query an object with query parameters
201
+ * @throws GetCollectionsHttpError
202
+ */
203
+ declare const getCollections: (query: {
204
+ /** The case-sensitive string used to search for a resource by creatorId. */
205
+ creatorId?: string | undefined;
206
+ /** The collection's unique identifier. */
207
+ id?: string | undefined;
208
+ /** Includes the list of items belonging to the collections. Supported parameters are 'limit', 'sort' and 'resourceType'. Supported formats are json formatted string or deep object style using square brackets. */
209
+ includeItems?: string | undefined;
210
+ /** The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). */
211
+ limit?: number | undefined;
212
+ /** The case-sensitive string used to search for a collection by name. */
213
+ name?: string | undefined;
214
+ /** The cursor to the next page of resources. Provide either the
215
+ // next or prev cursor, but not both.
216
+ // */
217
+ next?: string | undefined;
218
+ /** The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. */
219
+ prev?: string | undefined;
220
+ /** The case-insensitive string used to search for a resource by name or description. */
221
+ query?: string | undefined;
222
+ /** The property of a resource to sort on (default sort is +createdAt).
223
+ // The supported properties are createdAt, updatedAt, and name. A property
224
+ // must be prefixed by + or - to indicate ascending or descending sort order
225
+ // respectively.
226
+ // */
227
+ sort?: "+name" | "+createdAt" | "+updatedAt" | "-name" | "-createdAt" | "-updatedAt" | undefined;
228
+ /** The case-sensitive string used to filter for a collection by type. */
229
+ type?: CollectionTypes | undefined;
230
+ /** A commaseparated case-sensitive string used to filter by multiple types. */
231
+ types?: CollectionTypes[] | undefined;
232
+ }, options?: ApiCallOptions) => Promise<GetCollectionsHttpResponse>;
233
+ type GetCollectionsHttpResponse = {
234
+ data: CollectionsListCollectionsResponseBody;
235
+ headers: Headers;
236
+ status: number;
237
+ prev?: (options?: ApiCallOptions) => Promise<GetCollectionsHttpResponse>;
238
+ next?: (options?: ApiCallOptions) => Promise<GetCollectionsHttpResponse>;
239
+ };
240
+ type GetCollectionsHttpError = {
241
+ data: ErrorResponseBody;
242
+ headers: Headers;
243
+ status: number;
244
+ };
245
+ /**
246
+ * Creates and returns a new collection. Collections can have the same name.
247
+ *
248
+ * @param body an object with the body content
249
+ * @throws CreateCollectionHttpError
250
+ */
251
+ declare const createCollection: (body: CollectionsCreateCollectionRequestBody, options?: ApiCallOptions) => Promise<CreateCollectionHttpResponse>;
252
+ type CreateCollectionHttpResponse = {
253
+ data: CollectionResultResponseBody;
254
+ headers: Headers;
255
+ status: number;
256
+ };
257
+ type CreateCollectionHttpError = {
258
+ data: ErrorResponseBody;
259
+ headers: Headers;
260
+ status: number;
261
+ };
262
+ /**
263
+ * Finds and returns the user's favorites collection.
264
+ *
265
+ * @throws GetFavoritesCollectionHttpError
266
+ */
267
+ declare const getFavoritesCollection: (options?: ApiCallOptions) => Promise<GetFavoritesCollectionHttpResponse>;
268
+ type GetFavoritesCollectionHttpResponse = {
269
+ data: void;
270
+ headers: Headers;
271
+ status: number;
272
+ };
273
+ type GetFavoritesCollection302HttpError = {
274
+ data: unknown;
275
+ headers: Headers;
276
+ status: 302;
277
+ };
278
+ type GetFavoritesCollection401HttpError = {
279
+ data: ErrorResponseBody;
280
+ headers: Headers;
281
+ status: 401;
282
+ };
283
+ type GetFavoritesCollection404HttpError = {
284
+ data: ErrorResponseBody;
285
+ headers: Headers;
286
+ status: 404;
287
+ };
288
+ type GetFavoritesCollection500HttpError = {
289
+ data: ErrorResponseBody;
290
+ headers: Headers;
291
+ status: 500;
292
+ };
293
+ type GetFavoritesCollectionHttpError = GetFavoritesCollection302HttpError | GetFavoritesCollection401HttpError | GetFavoritesCollection404HttpError | GetFavoritesCollection500HttpError;
294
+ /**
295
+ * Deletes a collection and removes all items from the collection.
296
+ *
297
+ * @param collectionId The collection's unique identifier.
298
+ * @throws DeleteCollectionHttpError
299
+ */
300
+ declare const deleteCollection: (collectionId: string, options?: ApiCallOptions) => Promise<DeleteCollectionHttpResponse>;
301
+ type DeleteCollectionHttpResponse = {
302
+ data: void;
303
+ headers: Headers;
304
+ status: number;
305
+ };
306
+ type DeleteCollectionHttpError = {
307
+ data: ErrorResponseBody;
308
+ headers: Headers;
309
+ status: number;
310
+ };
311
+ /**
312
+ * Finds and returns a collection.
313
+ *
314
+ * @param collectionId The collection's unique identifier.
315
+ * @throws GetCollectionHttpError
316
+ */
317
+ declare const getCollection: (collectionId: string, options?: ApiCallOptions) => Promise<GetCollectionHttpResponse>;
318
+ type GetCollectionHttpResponse = {
319
+ data: CollectionResultResponseBody;
320
+ headers: Headers;
321
+ status: number;
322
+ };
323
+ type GetCollectionHttpError = {
324
+ data: ErrorResponseBody;
325
+ headers: Headers;
326
+ status: number;
327
+ };
328
+ /**
329
+ * Updates a collection and returns the new collection. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
330
+ *
331
+ * @param collectionId The collection's unique identifier.
332
+ * @param body an object with the body content
333
+ * @throws UpdateCollectionHttpError
334
+ */
335
+ declare const updateCollection: (collectionId: string, body: CollectionsUpdateCollectionRequestBody, options?: ApiCallOptions) => Promise<UpdateCollectionHttpResponse>;
336
+ type UpdateCollectionHttpResponse = {
337
+ data: CollectionResultResponseBody;
338
+ headers: Headers;
339
+ status: number;
340
+ };
341
+ type UpdateCollectionHttpError = {
342
+ data: ErrorResponseBody;
343
+ headers: Headers;
344
+ status: number;
345
+ };
346
+ /**
347
+ * Finds and returns items from a collection that the user has access to.
348
+ *
349
+ * @param collectionId The collection's unique identifier. (This query also supports 'favorites' as the collectionID).
350
+
351
+ * @param query an object with query parameters
352
+ * @throws GetCollectionItemsHttpError
353
+ */
354
+ declare const getCollectionItems: (collectionId: string, query: {
355
+ /** The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). */
356
+ limit?: number | undefined;
357
+ /** The case-insensitive string used to search for a resource by name. */
358
+ name?: string | undefined;
359
+ /** The cursor to the next page of resources. Provide either the next or prev cursor, but not both. */
360
+ next?: string | undefined;
361
+ /** If set to true, the user's available actions for each item will not be evaluated meaning the actions-array will be omitted from the response (reduces response time).
362
+ // */
363
+ noActions?: boolean | undefined;
364
+ /** The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. */
365
+ prev?: string | undefined;
366
+ /** The case-insensitive string used to search for a resource by name or description. */
367
+ query?: string | undefined;
368
+ /** The case-sensitive string used to search for an item by resourceId. If resourceId is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. */
369
+ resourceId?: string | undefined;
370
+ /** The case-sensitive string used to search for an item by resourceLink. If resourceLink is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both. */
371
+ resourceLink?: string | undefined;
372
+ /** The case-sensitive string used to search for an item by resourceType. */
373
+ resourceType?: ItemResourceTypeEnum | undefined;
374
+ /** Whether or not to return items in a shared space. */
375
+ shared?: boolean | undefined;
376
+ /** The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively. */
377
+ sort?: "+name" | "+createdAt" | "+updatedAt" | "-name" | "-createdAt" | "-updatedAt" | undefined;
378
+ /** The space's unique identifier (supports \'personal\' as spaceId). */
379
+ spaceId?: string | undefined;
380
+ }, options?: ApiCallOptions) => Promise<GetCollectionItemsHttpResponse>;
381
+ type GetCollectionItemsHttpResponse = {
382
+ data: CollectionsListCollectionItemsResponseBody;
383
+ headers: Headers;
384
+ status: number;
385
+ };
386
+ type GetCollectionItemsHttpError = {
387
+ data: ErrorResponseBody;
388
+ headers: Headers;
389
+ status: number;
390
+ };
391
+ /**
392
+ * Adds an item to a collection and returns the item.
393
+ *
394
+ * @param collectionId The collection's unique identifier.
395
+ * @param body an object with the body content
396
+ * @throws AddCollectionItemHttpError
397
+ */
398
+ declare const addCollectionItem: (collectionId: string, body: CollectionsAddCollectionItemRequestBody, options?: ApiCallOptions) => Promise<AddCollectionItemHttpResponse>;
399
+ type AddCollectionItemHttpResponse = {
400
+ data: ItemResultResponseBody;
401
+ headers: Headers;
402
+ status: number;
403
+ };
404
+ type AddCollectionItemHttpError = {
405
+ data: ErrorResponseBody;
406
+ headers: Headers;
407
+ status: number;
408
+ };
409
+ /**
410
+ * Removes an item from a collection.
411
+ *
412
+ * @param collectionId The collection's unique identifier.
413
+ * @param itemId The item's unique identifier.
414
+ * @throws DeleteCollectionItemHttpError
415
+ */
416
+ declare const deleteCollectionItem: (collectionId: string, itemId: string, options?: ApiCallOptions) => Promise<DeleteCollectionItemHttpResponse>;
417
+ type DeleteCollectionItemHttpResponse = {
418
+ data: void;
419
+ headers: Headers;
420
+ status: number;
421
+ };
422
+ type DeleteCollectionItemHttpError = {
423
+ data: ErrorResponseBody;
424
+ headers: Headers;
425
+ status: number;
426
+ };
427
+ /**
428
+ * Finds and returns an item. See GET /items/{id}
429
+ *
430
+ * @param collectionId The collection's unique identifier.
431
+ * @param itemId The item's unique identifier.
432
+ * @throws GetCollectionItemHttpError
433
+ */
434
+ declare const getCollectionItem: (collectionId: string, itemId: string, options?: ApiCallOptions) => Promise<GetCollectionItemHttpResponse>;
435
+ type GetCollectionItemHttpResponse = {
436
+ data: ItemResultResponseBody;
437
+ headers: Headers;
438
+ status: number;
439
+ };
440
+ type GetCollectionItemHttpError = {
441
+ data: ErrorResponseBody;
442
+ headers: Headers;
443
+ status: number;
444
+ };
445
+ /**
446
+ * Clears the cache for collections api requests.
447
+ */
448
+ declare function clearCache(): void;
449
+ interface CollectionsAPI {
450
+ /**
451
+ * Finds and returns the collections that the user can access. This endpoint does not return the user's favorites collection.
452
+ *
453
+ * @param query an object with query parameters
454
+ * @throws GetCollectionsHttpError
455
+ */
456
+ getCollections: typeof getCollections;
457
+ /**
458
+ * Creates and returns a new collection. Collections can have the same name.
459
+ *
460
+ * @param body an object with the body content
461
+ * @throws CreateCollectionHttpError
462
+ */
463
+ createCollection: typeof createCollection;
464
+ /**
465
+ * Finds and returns the user's favorites collection.
466
+ *
467
+ * @throws GetFavoritesCollectionHttpError
468
+ */
469
+ getFavoritesCollection: typeof getFavoritesCollection;
470
+ /**
471
+ * Deletes a collection and removes all items from the collection.
472
+ *
473
+ * @param collectionId The collection's unique identifier.
474
+ * @throws DeleteCollectionHttpError
475
+ */
476
+ deleteCollection: typeof deleteCollection;
477
+ /**
478
+ * Finds and returns a collection.
479
+ *
480
+ * @param collectionId The collection's unique identifier.
481
+ * @throws GetCollectionHttpError
482
+ */
483
+ getCollection: typeof getCollection;
484
+ /**
485
+ * Updates a collection and returns the new collection. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
486
+ *
487
+ * @param collectionId The collection's unique identifier.
488
+ * @param body an object with the body content
489
+ * @throws UpdateCollectionHttpError
490
+ */
491
+ updateCollection: typeof updateCollection;
492
+ /**
493
+ * Finds and returns items from a collection that the user has access to.
494
+ *
495
+ * @param collectionId The collection's unique identifier. (This query also supports 'favorites' as the collectionID).
496
+
497
+ * @param query an object with query parameters
498
+ * @throws GetCollectionItemsHttpError
499
+ */
500
+ getCollectionItems: typeof getCollectionItems;
501
+ /**
502
+ * Adds an item to a collection and returns the item.
503
+ *
504
+ * @param collectionId The collection's unique identifier.
505
+ * @param body an object with the body content
506
+ * @throws AddCollectionItemHttpError
507
+ */
508
+ addCollectionItem: typeof addCollectionItem;
509
+ /**
510
+ * Removes an item from a collection.
511
+ *
512
+ * @param collectionId The collection's unique identifier.
513
+ * @param itemId The item's unique identifier.
514
+ * @throws DeleteCollectionItemHttpError
515
+ */
516
+ deleteCollectionItem: typeof deleteCollectionItem;
517
+ /**
518
+ * Finds and returns an item. See GET /items/{id}
519
+ *
520
+ * @param collectionId The collection's unique identifier.
521
+ * @param itemId The item's unique identifier.
522
+ * @throws GetCollectionItemHttpError
523
+ */
524
+ getCollectionItem: typeof getCollectionItem;
525
+ /**
526
+ * Clears the cache for collections api requests.
527
+ */
528
+ clearCache: typeof clearCache;
529
+ }
530
+ /**
531
+ * Functions for the collections api
532
+ */
533
+ declare const collectionsExport: CollectionsAPI;
534
+
535
+ export { type AddCollectionItemHttpError, type AddCollectionItemHttpResponse, type CollectionLinksResponseBody, type CollectionMetaResponseBody, type CollectionResultResponseBody, type CollectionTypes, type CollectionsAPI, type CollectionsAddCollectionItemRequestBody, type CollectionsCreateCollectionRequestBody, type CollectionsLinksResponseBody, type CollectionsListCollectionItemsResponseBody, type CollectionsListCollectionsResponseBody, type CollectionsUpdateCollectionRequestBody, type CreateCollectionHttpError, type CreateCollectionHttpResponse, type DeleteCollectionHttpError, type DeleteCollectionHttpResponse, type DeleteCollectionItemHttpError, type DeleteCollectionItemHttpResponse, type ErrorResponseBody, type GetCollectionHttpError, type GetCollectionHttpResponse, type GetCollectionItemHttpError, type GetCollectionItemHttpResponse, type GetCollectionItemsHttpError, type GetCollectionItemsHttpResponse, type GetCollectionsHttpError, type GetCollectionsHttpResponse, type GetFavoritesCollection302HttpError, type GetFavoritesCollection401HttpError, type GetFavoritesCollection404HttpError, type GetFavoritesCollection500HttpError, type GetFavoritesCollectionHttpError, type GetFavoritesCollectionHttpResponse, type ItemLinksResponseBody, type ItemMetaResponseBody, type ItemResourceTypeEnum, type ItemResultResponseBody, type ItemTagResponseBody, type ItemViewsResponseBody, type ItemViewsWeeksResponseBody, type ItemsLinksResponseBody, type ItemsResourceSizeResponseBody, type ItemsResultResponseBody, type Link, type Meta, type ServiceError, type UpdateCollectionHttpError, type UpdateCollectionHttpResponse, addCollectionItem, clearCache, createCollection, collectionsExport as default, deleteCollection, deleteCollectionItem, getCollection, getCollectionItem, getCollectionItems, getCollections, getFavoritesCollection, updateCollection };
package/collections.js ADDED
@@ -0,0 +1,100 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkOULT3V2Ujs = require('./chunk-OULT3V2U.js');
5
+ require('./chunk-ZT4C7KCQ.js');
6
+
7
+ // src/public/rest/collections.ts
8
+ var getCollections = async (query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
9
+ method: "get",
10
+ pathTemplate: "/api/v1/collections",
11
+ query,
12
+ options
13
+ });
14
+ var createCollection = async (body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
15
+ method: "post",
16
+ pathTemplate: "/api/v1/collections",
17
+ body,
18
+ options
19
+ });
20
+ var getFavoritesCollection = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
21
+ method: "get",
22
+ pathTemplate: "/api/v1/collections/favorites",
23
+ options
24
+ });
25
+ var deleteCollection = async (collectionId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
26
+ method: "delete",
27
+ pathTemplate: "/api/v1/collections/{collectionId}",
28
+ pathVariables: { collectionId },
29
+ options
30
+ });
31
+ var getCollection = async (collectionId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
32
+ method: "get",
33
+ pathTemplate: "/api/v1/collections/{collectionId}",
34
+ pathVariables: { collectionId },
35
+ options
36
+ });
37
+ var updateCollection = async (collectionId, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
38
+ method: "put",
39
+ pathTemplate: "/api/v1/collections/{collectionId}",
40
+ pathVariables: { collectionId },
41
+ body,
42
+ options
43
+ });
44
+ var getCollectionItems = async (collectionId, query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
45
+ method: "get",
46
+ pathTemplate: "/api/v1/collections/{collectionId}/items",
47
+ pathVariables: { collectionId },
48
+ query,
49
+ options
50
+ });
51
+ var addCollectionItem = async (collectionId, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
52
+ method: "post",
53
+ pathTemplate: "/api/v1/collections/{collectionId}/items",
54
+ pathVariables: { collectionId },
55
+ body,
56
+ options
57
+ });
58
+ var deleteCollectionItem = async (collectionId, itemId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
59
+ method: "delete",
60
+ pathTemplate: "/api/v1/collections/{collectionId}/items/{itemId}",
61
+ pathVariables: { collectionId, itemId },
62
+ options
63
+ });
64
+ var getCollectionItem = async (collectionId, itemId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "collections", {
65
+ method: "get",
66
+ pathTemplate: "/api/v1/collections/{collectionId}/items/{itemId}",
67
+ pathVariables: { collectionId, itemId },
68
+ options
69
+ });
70
+ function clearCache() {
71
+ return _chunkOULT3V2Ujs.clearApiCache.call(void 0, "collections");
72
+ }
73
+ var collectionsExport = {
74
+ getCollections,
75
+ createCollection,
76
+ getFavoritesCollection,
77
+ deleteCollection,
78
+ getCollection,
79
+ updateCollection,
80
+ getCollectionItems,
81
+ addCollectionItem,
82
+ deleteCollectionItem,
83
+ getCollectionItem,
84
+ clearCache
85
+ };
86
+ var collections_default = collectionsExport;
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ exports.addCollectionItem = addCollectionItem; exports.clearCache = clearCache; exports.createCollection = createCollection; exports.default = collections_default; exports.deleteCollection = deleteCollection; exports.deleteCollectionItem = deleteCollectionItem; exports.getCollection = getCollection; exports.getCollectionItem = getCollectionItem; exports.getCollectionItems = getCollectionItems; exports.getCollections = getCollections; exports.getFavoritesCollection = getFavoritesCollection; exports.updateCollection = updateCollection;