@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
package/items.d.ts ADDED
@@ -0,0 +1,501 @@
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 ErrorResponseBody = {
6
+ errors?: ServiceError[];
7
+ };
8
+ type ItemsListItemCollectionsResponseBody = {
9
+ data: CollectionResultResponseBody[];
10
+ links: CollectionsLinksResponseBody;
11
+ };
12
+ type ItemsListItemsResponseBody = {
13
+ data: ItemResultResponseBody[];
14
+ links: ItemsLinksResponseBody;
15
+ };
16
+ type ItemsSettingsPatch = {
17
+ /** The operation to be performed. Only "replace" is supported. */
18
+ op: "replace";
19
+ /** Field of Settings to be patched (updated). */
20
+ path: "/usageMetricsEnabled";
21
+ /** The value to be used within the operations.
22
+ // */
23
+ value: boolean;
24
+ }[];
25
+ type ItemsSettingsResponseBody = {
26
+ /** Decides if the usage metrics will be shown in the hub UI. */
27
+ usageMetricsEnabled: boolean;
28
+ };
29
+ type ItemsUpdateItemRequestBody = {
30
+ description?: string;
31
+ name?: string;
32
+ resourceAttributes?: unknown;
33
+ resourceCustomAttributes?: unknown;
34
+ /** 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. */
35
+ resourceId?: string;
36
+ /** 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. */
37
+ resourceLink?: string;
38
+ /** Optional field defining the item's subtype, if any. */
39
+ resourceSubType?: string;
40
+ /** The case-sensitive string defining the item's type. */
41
+ resourceType: ItemResourceTypeEnum;
42
+ /** The RFC3339 datetime when the resource that the item references was last updated. */
43
+ resourceUpdatedAt?: string;
44
+ /** The space's unique identifier. */
45
+ spaceId?: string;
46
+ /** The item thumbnail's unique identifier. This is optional for internal resources. */
47
+ thumbnailId?: string;
48
+ };
49
+ type Link = {
50
+ href?: string;
51
+ };
52
+ type ServiceError = {
53
+ /** Code is a unique identifier for this error class. */
54
+ code?: string;
55
+ /** Detail is a human-readable explanation specific to this occurrence of the problem. */
56
+ detail?: string;
57
+ meta?: Meta;
58
+ /** Title is the name of this class of errors. */
59
+ title?: string;
60
+ };
61
+ type CollectionLinksResponseBody = {
62
+ items?: Link;
63
+ self?: Link;
64
+ };
65
+ type CollectionMetaResponseBody = {
66
+ /** Multiple items. */
67
+ items?: ItemsResultResponseBody;
68
+ };
69
+ type CollectionResultResponseBody = {
70
+ /** The RFC3339 datetime when the collection was created. */
71
+ createdAt: string;
72
+ /** The ID of the user who created the collection. This property is only populated if the JWT contains a userId. */
73
+ creatorId?: string;
74
+ description?: string;
75
+ /** States if a collection has reached its items limit or not */
76
+ full?: boolean;
77
+ /** The collection's unique identifier. */
78
+ id: string;
79
+ /** The number of items that have been added to the collection that the user has access to. */
80
+ itemCount: number;
81
+ links: CollectionLinksResponseBody;
82
+ /** Collection metadata and computed fields. */
83
+ meta?: CollectionMetaResponseBody;
84
+ name: string;
85
+ /** The ID of the tenant that owns the collection. This property is populated by using JWT. */
86
+ tenantId: string;
87
+ type: "private" | "public" | "favorite" | "publicgoverned";
88
+ /** The RFC3339 datetime when the collection was last updated. */
89
+ updatedAt: string;
90
+ /** The ID of the user who last updated the collection. This property is only populated if the JWT contains a userId. */
91
+ updaterId?: string;
92
+ };
93
+ type CollectionsLinksResponseBody = {
94
+ item?: Link;
95
+ next?: Link;
96
+ prev?: Link;
97
+ self?: Link;
98
+ };
99
+ type ItemLinksResponseBody = {
100
+ collections?: Link;
101
+ open?: Link;
102
+ self?: Link;
103
+ thumbnail?: Link;
104
+ };
105
+ type ItemMetaResponseBody = {
106
+ /** The actions that the user can perform on the item. */
107
+ actions: string[];
108
+ /** An array of collections that the item is part of. */
109
+ collections: ItemTagResponseBody[];
110
+ /** The flag that indicates if item is in the user's favorites collection. */
111
+ isFavorited: boolean;
112
+ /** An array of tags that the item is part of. */
113
+ tags: ItemTagResponseBody[];
114
+ };
115
+ type ItemResourceTypeEnum = "app" | "collection" | "qlikview" | "insight" | "qvapp" | "genericlink" | "sharingservicetask" | "note" | "dataasset" | "dataset" | "automation" | "automl-experiment" | "automl-deployment";
116
+ type ItemResultResponseBody = {
117
+ /** The actions that the user can perform on the item. */
118
+ actions: string[];
119
+ /** The ID of the collections that the item has been added to. */
120
+ collectionIds: string[];
121
+ /** The RFC3339 datetime when the item was created. */
122
+ createdAt: string;
123
+ /** The ID of the user who created the item. This is only populated if the JWT contains a userId. */
124
+ creatorId?: string;
125
+ description?: string;
126
+ /** The item's unique identifier. */
127
+ id: string;
128
+ /** The flag that indicates if item is in the user's favorites collection. */
129
+ isFavorited: boolean;
130
+ itemViews?: ItemViewsResponseBody;
131
+ links: ItemLinksResponseBody;
132
+ /** Item metadata and computed fields. */
133
+ meta: ItemMetaResponseBody;
134
+ name: string;
135
+ /** The ID of the user who owns the item. */
136
+ ownerId?: string;
137
+ resourceAttributes: unknown;
138
+ /** The RFC3339 datetime when the resource that the item references was created. */
139
+ resourceCreatedAt: string;
140
+ resourceCustomAttributes: unknown;
141
+ /** 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. */
142
+ resourceId?: string;
143
+ /** 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. */
144
+ resourceLink?: string;
145
+ /** The RFC3339 datetime when the resource last reload ended. */
146
+ resourceReloadEndTime?: string;
147
+ /** If the resource last reload was successful or not. */
148
+ resourceReloadStatus?: string;
149
+ resourceSize?: ItemsResourceSizeResponseBody;
150
+ /** Optional field defining the item's subtype, if any. */
151
+ resourceSubType?: string;
152
+ /** The case-sensitive string defining the item's type. */
153
+ resourceType: ItemResourceTypeEnum;
154
+ /** The RFC3339 datetime when the resource that the item references was last updated. */
155
+ resourceUpdatedAt: string;
156
+ /** The space's unique identifier. */
157
+ spaceId?: string;
158
+ /** The ID of the tenant that owns the item. This is populated using the JWT. */
159
+ tenantId: string;
160
+ /** The item thumbnail's unique identifier. This is optional for internal resources. */
161
+ thumbnailId?: string;
162
+ /** The RFC3339 datetime when the item was last updated. */
163
+ updatedAt: string;
164
+ /** ID of the user who last updated the item. This is only populated if the JWT contains a userId. */
165
+ updaterId?: string;
166
+ };
167
+ type ItemTagResponseBody = {
168
+ /** The ID of the tag/collection. */
169
+ id: string;
170
+ /** The name of the tag/collection. */
171
+ name: string;
172
+ };
173
+ type ItemViewsResponseBody = {
174
+ /** Total number of views the resource got during the last 28 days. */
175
+ total?: number;
176
+ /** Trend in views over the last 4 weeks. */
177
+ trend?: number;
178
+ /** Number of unique users who viewed the resource during the last 28 days. */
179
+ unique?: number;
180
+ /** Number of apps this dataset is used in (datasets only). */
181
+ usedBy?: number;
182
+ week?: ItemViewsWeeksResponseBody[];
183
+ };
184
+ type ItemViewsWeeksResponseBody = {
185
+ /** The RFC3339 datetime representing the start of the referenced week. */
186
+ start?: string;
187
+ /** Total number of views the resource got during the referenced week. */
188
+ total?: number;
189
+ /** Number of unique users who viewed the resource during the referenced week. */
190
+ unique?: number;
191
+ };
192
+ type ItemsLinksResponseBody = {
193
+ collection?: Link;
194
+ next?: Link;
195
+ prev?: Link;
196
+ self?: Link;
197
+ };
198
+ type ItemsResourceSizeResponseBody = {
199
+ /** Size of the app on disk in bytes. */
200
+ appFile?: number;
201
+ /** Size of the app in memory in bytes. */
202
+ appMemory?: number;
203
+ };
204
+ type ItemsResultResponseBody = {
205
+ data: ItemResultResponseBody[];
206
+ links: ItemsLinksResponseBody;
207
+ };
208
+ type Meta = {
209
+ /** Further explanation of the error */
210
+ explain?: unknown;
211
+ /** Is the error a server-side fault? */
212
+ fault?: boolean;
213
+ /** Is the error temporary? */
214
+ temporary?: boolean;
215
+ /** Is the error a timeout? */
216
+ timeout?: boolean;
217
+ };
218
+ /**
219
+ * Finds and returns items that the user has access to.
220
+ *
221
+ * @param query an object with query parameters
222
+ * @throws GetItemsHttpError
223
+ */
224
+ declare const getItems: (query: {
225
+ /** The collection's unique identifier. */
226
+ collectionId?: string | undefined;
227
+ /** User's unique identifier. */
228
+ createdByUserId?: string | undefined;
229
+ /** The item's unique identifier. */
230
+ id?: string | undefined;
231
+ /** The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). */
232
+ limit?: number | undefined;
233
+ /** The case-insensitive string used to search for a resource by name. */
234
+ name?: string | undefined;
235
+ /** The cursor to the next page of resources. Provide either the next or prev cursor, but not both. */
236
+ next?: string | undefined;
237
+ /** 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).
238
+ // */
239
+ noActions?: boolean | undefined;
240
+ /** User's unique identifier. */
241
+ notCreatedByUserId?: string | undefined;
242
+ /** Owner identifier. */
243
+ notOwnerId?: string | undefined;
244
+ /** Owner identifier. */
245
+ ownerId?: string | undefined;
246
+ /** The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. */
247
+ prev?: string | undefined;
248
+ /** The case-insensitive string used to search for a resource by name or description. */
249
+ query?: string | undefined;
250
+ /** 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. */
251
+ resourceId?: string | undefined;
252
+ /** The case-sensitive strings used to search for an item by resourceIds. The maximum number of resourceIds it supports is 100. If resourceIds is provided, then resourceType must be provided. For example '?resourceIds=appId1,appId2' */
253
+ resourceIds?: string | undefined;
254
+ /** 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. */
255
+ resourceLink?: string | undefined;
256
+ /** the case-sensitive string used to filter items by resourceSubType(s). For example '?resourceSubType=chart-monitoring,qix-df,qvd'. Will return a 400 error if used in conjuction with the square bracket syntax for resourceSubType filtering in the 'resourceType' query parameter. */
257
+ resourceSubType?: string | undefined;
258
+ /** The case-sensitive string used to filter items by resourceType(s). For example '?resourceType=app,qvapp'. Additionally, a optional resourceSubType filter can be added to each resourceType. For example '?resourceType=app[qvd,chart-monitoring],qvapp'. An trailing comma can be used to include the empty resourceSubType, e.g. '?resourceType=app[qvd,chart-monitoring,]', or, to include only empty resourceSubTypes, '?resourceType=app[]' This syntax replaces the 'resourceSubType' query param, and using both in the same query will result in a 400 error. */
259
+ resourceType?: ItemResourceTypeEnum | undefined;
260
+ /** Whether or not to return items in a shared space. */
261
+ shared?: boolean | undefined;
262
+ /** 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. */
263
+ sort?: "+name" | "+createdAt" | "+updatedAt" | "-name" | "-createdAt" | "-updatedAt" | undefined;
264
+ /** The space's unique identifier (supports \'personal\' as spaceId). */
265
+ spaceId?: string | undefined;
266
+ }, options?: ApiCallOptions) => Promise<GetItemsHttpResponse>;
267
+ type GetItemsHttpResponse = {
268
+ data: ItemsListItemsResponseBody;
269
+ headers: Headers;
270
+ status: number;
271
+ prev?: (options?: ApiCallOptions) => Promise<GetItemsHttpResponse>;
272
+ next?: (options?: ApiCallOptions) => Promise<GetItemsHttpResponse>;
273
+ };
274
+ type GetItemsHttpError = {
275
+ data: ErrorResponseBody;
276
+ headers: Headers;
277
+ status: number;
278
+ };
279
+ /**
280
+ * Finds and returns the settings for the current tenant.
281
+ *
282
+ * @throws GetItemSettingsHttpError
283
+ */
284
+ declare const getItemSettings: (options?: ApiCallOptions) => Promise<GetItemSettingsHttpResponse>;
285
+ type GetItemSettingsHttpResponse = {
286
+ data: ItemsSettingsResponseBody;
287
+ headers: Headers;
288
+ status: number;
289
+ };
290
+ type GetItemSettingsHttpError = {
291
+ data: ErrorResponseBody;
292
+ headers: Headers;
293
+ status: number;
294
+ };
295
+ /**
296
+ * Updates the settings provided in the patch body.
297
+ * @param body an object with the body content
298
+ * @throws PatchItemSettingsHttpError
299
+ */
300
+ declare const patchItemSettings: (body: ItemsSettingsPatch, options?: ApiCallOptions) => Promise<PatchItemSettingsHttpResponse>;
301
+ type PatchItemSettingsHttpResponse = {
302
+ data: ItemsSettingsResponseBody;
303
+ headers: Headers;
304
+ status: number;
305
+ };
306
+ type PatchItemSettingsHttpError = {
307
+ data: ErrorResponseBody;
308
+ headers: Headers;
309
+ status: number;
310
+ };
311
+ /**
312
+ * Deletes an item and removes the item from all collections.
313
+ *
314
+ * @param itemId The item's unique identifier.
315
+ * @throws DeleteItemHttpError
316
+ */
317
+ declare const deleteItem: (itemId: string, options?: ApiCallOptions) => Promise<DeleteItemHttpResponse>;
318
+ type DeleteItemHttpResponse = {
319
+ data: void;
320
+ headers: Headers;
321
+ status: number;
322
+ };
323
+ type DeleteItemHttpError = {
324
+ data: ErrorResponseBody;
325
+ headers: Headers;
326
+ status: number;
327
+ };
328
+ /**
329
+ * Finds and returns an item.
330
+ *
331
+ * @param itemId The item's unique identifier
332
+ * @throws GetItemHttpError
333
+ */
334
+ declare const getItem: (itemId: string, options?: ApiCallOptions) => Promise<GetItemHttpResponse>;
335
+ type GetItemHttpResponse = {
336
+ data: ItemResultResponseBody;
337
+ headers: Headers;
338
+ status: number;
339
+ };
340
+ type GetItemHttpError = {
341
+ data: ErrorResponseBody;
342
+ headers: Headers;
343
+ status: number;
344
+ };
345
+ /**
346
+ * Updates an item. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
347
+ *
348
+ * @param itemId The item's unique identifier.
349
+ * @param body an object with the body content
350
+ * @throws UpdateItemHttpError
351
+ */
352
+ declare const updateItem: (itemId: string, body: ItemsUpdateItemRequestBody, options?: ApiCallOptions) => Promise<UpdateItemHttpResponse>;
353
+ type UpdateItemHttpResponse = {
354
+ data: ItemResultResponseBody;
355
+ headers: Headers;
356
+ status: number;
357
+ };
358
+ type UpdateItemHttpError = {
359
+ data: ErrorResponseBody;
360
+ headers: Headers;
361
+ status: number;
362
+ };
363
+ /**
364
+ * Finds and returns the collections of an item. This endpoint does not return the user's favorites collection.
365
+ *
366
+ * @param itemId The item's unique identifier.
367
+ * @param query an object with query parameters
368
+ * @throws GetItemCollectionsHttpError
369
+ */
370
+ declare const getItemCollections: (itemId: string, query: {
371
+ /** The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). */
372
+ limit?: number | undefined;
373
+ /** The case-sensitive string used to search for a collection by name. */
374
+ name?: string | undefined;
375
+ /** The cursor to the next page of resources. Provide either the next or prev cursor, but not both. */
376
+ next?: string | undefined;
377
+ /** The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. */
378
+ prev?: string | undefined;
379
+ /** The case-insensitive string used to search for a resource by name or description. */
380
+ query?: string | undefined;
381
+ /** 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. */
382
+ sort?: "+name" | "+createdAt" | "+updatedAt" | "-name" | "-createdAt" | "-updatedAt" | undefined;
383
+ /** The case-sensitive string used to search for a collection by type. */
384
+ type?: CollectionTypes | undefined;
385
+ }, options?: ApiCallOptions) => Promise<GetItemCollectionsHttpResponse>;
386
+ type GetItemCollectionsHttpResponse = {
387
+ data: ItemsListItemCollectionsResponseBody;
388
+ headers: Headers;
389
+ status: number;
390
+ prev?: (options?: ApiCallOptions) => Promise<GetItemCollectionsHttpResponse>;
391
+ next?: (options?: ApiCallOptions) => Promise<GetItemCollectionsHttpResponse>;
392
+ };
393
+ type GetItemCollectionsHttpError = {
394
+ data: ErrorResponseBody;
395
+ headers: Headers;
396
+ status: number;
397
+ };
398
+ /**
399
+ * Finds and returns the published items for a given item.
400
+ *
401
+ * @param itemId The item's unique identifier
402
+ * @param query an object with query parameters
403
+ * @throws GetPublishedItemsHttpError
404
+ */
405
+ declare const getPublishedItems: (itemId: string, query: {
406
+ /** The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). */
407
+ limit?: number;
408
+ /** The cursor to the next page of resources. Provide either the next or prev cursor, but not both. */
409
+ next?: string;
410
+ /** The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. */
411
+ prev?: string;
412
+ /** The case-sensitive string used to search for an item by resourceType. */
413
+ resourceType?: ItemResourceTypeEnum;
414
+ /** 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. */
415
+ sort?: "+createdAt" | "-createdAt" | "+name" | "-name" | "+updatedAt" | "-updatedAt";
416
+ }, options?: ApiCallOptions) => Promise<GetPublishedItemsHttpResponse>;
417
+ type GetPublishedItemsHttpResponse = {
418
+ data: ItemsListItemCollectionsResponseBody;
419
+ headers: Headers;
420
+ status: number;
421
+ prev?: (options?: ApiCallOptions) => Promise<GetPublishedItemsHttpResponse>;
422
+ next?: (options?: ApiCallOptions) => Promise<GetPublishedItemsHttpResponse>;
423
+ };
424
+ type GetPublishedItemsHttpError = {
425
+ data: ErrorResponseBody;
426
+ headers: Headers;
427
+ status: number;
428
+ };
429
+ /**
430
+ * Clears the cache for items api requests.
431
+ */
432
+ declare function clearCache(): void;
433
+ interface ItemsAPI {
434
+ /**
435
+ * Finds and returns items that the user has access to.
436
+ *
437
+ * @param query an object with query parameters
438
+ * @throws GetItemsHttpError
439
+ */
440
+ getItems: typeof getItems;
441
+ /**
442
+ * Finds and returns the settings for the current tenant.
443
+ *
444
+ * @throws GetItemSettingsHttpError
445
+ */
446
+ getItemSettings: typeof getItemSettings;
447
+ /**
448
+ * Updates the settings provided in the patch body.
449
+ * @param body an object with the body content
450
+ * @throws PatchItemSettingsHttpError
451
+ */
452
+ patchItemSettings: typeof patchItemSettings;
453
+ /**
454
+ * Deletes an item and removes the item from all collections.
455
+ *
456
+ * @param itemId The item's unique identifier.
457
+ * @throws DeleteItemHttpError
458
+ */
459
+ deleteItem: typeof deleteItem;
460
+ /**
461
+ * Finds and returns an item.
462
+ *
463
+ * @param itemId The item's unique identifier
464
+ * @throws GetItemHttpError
465
+ */
466
+ getItem: typeof getItem;
467
+ /**
468
+ * Updates an item. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
469
+ *
470
+ * @param itemId The item's unique identifier.
471
+ * @param body an object with the body content
472
+ * @throws UpdateItemHttpError
473
+ */
474
+ updateItem: typeof updateItem;
475
+ /**
476
+ * Finds and returns the collections of an item. This endpoint does not return the user's favorites collection.
477
+ *
478
+ * @param itemId The item's unique identifier.
479
+ * @param query an object with query parameters
480
+ * @throws GetItemCollectionsHttpError
481
+ */
482
+ getItemCollections: typeof getItemCollections;
483
+ /**
484
+ * Finds and returns the published items for a given item.
485
+ *
486
+ * @param itemId The item's unique identifier
487
+ * @param query an object with query parameters
488
+ * @throws GetPublishedItemsHttpError
489
+ */
490
+ getPublishedItems: typeof getPublishedItems;
491
+ /**
492
+ * Clears the cache for items api requests.
493
+ */
494
+ clearCache: typeof clearCache;
495
+ }
496
+ /**
497
+ * Functions for the items api
498
+ */
499
+ declare const itemsExport: ItemsAPI;
500
+
501
+ export { type CollectionLinksResponseBody, type CollectionMetaResponseBody, type CollectionResultResponseBody, type CollectionTypes, type CollectionsLinksResponseBody, type DeleteItemHttpError, type DeleteItemHttpResponse, type ErrorResponseBody, type GetItemCollectionsHttpError, type GetItemCollectionsHttpResponse, type GetItemHttpError, type GetItemHttpResponse, type GetItemSettingsHttpError, type GetItemSettingsHttpResponse, type GetItemsHttpError, type GetItemsHttpResponse, type GetPublishedItemsHttpError, type GetPublishedItemsHttpResponse, type ItemLinksResponseBody, type ItemMetaResponseBody, type ItemResourceTypeEnum, type ItemResultResponseBody, type ItemTagResponseBody, type ItemViewsResponseBody, type ItemViewsWeeksResponseBody, type ItemsAPI, type ItemsLinksResponseBody, type ItemsListItemCollectionsResponseBody, type ItemsListItemsResponseBody, type ItemsResourceSizeResponseBody, type ItemsResultResponseBody, type ItemsSettingsPatch, type ItemsSettingsResponseBody, type ItemsUpdateItemRequestBody, type Link, type Meta, type PatchItemSettingsHttpError, type PatchItemSettingsHttpResponse, type ServiceError, type UpdateItemHttpError, type UpdateItemHttpResponse, clearCache, itemsExport as default, deleteItem, getItem, getItemCollections, getItemSettings, getItems, getPublishedItems, patchItemSettings, updateItem };
package/items.js ADDED
@@ -0,0 +1,84 @@
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/items.ts
8
+ var getItems = async (query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
9
+ method: "get",
10
+ pathTemplate: "/api/v1/items",
11
+ query,
12
+ options
13
+ });
14
+ var getItemSettings = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
15
+ method: "get",
16
+ pathTemplate: "/api/v1/items/settings",
17
+ options
18
+ });
19
+ var patchItemSettings = async (body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
20
+ method: "patch",
21
+ pathTemplate: "/api/v1/items/settings",
22
+ body,
23
+ options
24
+ });
25
+ var deleteItem = async (itemId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
26
+ method: "delete",
27
+ pathTemplate: "/api/v1/items/{itemId}",
28
+ pathVariables: { itemId },
29
+ options
30
+ });
31
+ var getItem = async (itemId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
32
+ method: "get",
33
+ pathTemplate: "/api/v1/items/{itemId}",
34
+ pathVariables: { itemId },
35
+ options
36
+ });
37
+ var updateItem = async (itemId, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
38
+ method: "put",
39
+ pathTemplate: "/api/v1/items/{itemId}",
40
+ pathVariables: { itemId },
41
+ body,
42
+ options
43
+ });
44
+ var getItemCollections = async (itemId, query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
45
+ method: "get",
46
+ pathTemplate: "/api/v1/items/{itemId}/collections",
47
+ pathVariables: { itemId },
48
+ query,
49
+ options
50
+ });
51
+ var getPublishedItems = async (itemId, query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "items", {
52
+ method: "get",
53
+ pathTemplate: "/api/v1/items/{itemId}/publisheditems",
54
+ pathVariables: { itemId },
55
+ query,
56
+ options
57
+ });
58
+ function clearCache() {
59
+ return _chunkOULT3V2Ujs.clearApiCache.call(void 0, "items");
60
+ }
61
+ var itemsExport = {
62
+ getItems,
63
+ getItemSettings,
64
+ patchItemSettings,
65
+ deleteItem,
66
+ getItem,
67
+ updateItem,
68
+ getItemCollections,
69
+ getPublishedItems,
70
+ clearCache
71
+ };
72
+ var items_default = itemsExport;
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+ exports.clearCache = clearCache; exports.default = items_default; exports.deleteItem = deleteItem; exports.getItem = getItem; exports.getItemCollections = getItemCollections; exports.getItemSettings = getItemSettings; exports.getItems = getItems; exports.getPublishedItems = getPublishedItems; exports.patchItemSettings = patchItemSettings; exports.updateItem = updateItem;
package/items.mjs ADDED
@@ -0,0 +1,84 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunk-3YE7EI7I.mjs";
5
+ import "./chunk-WM7FQU2U.mjs";
6
+
7
+ // src/public/rest/items.ts
8
+ var getItems = async (query, options) => invokeFetch("items", {
9
+ method: "get",
10
+ pathTemplate: "/api/v1/items",
11
+ query,
12
+ options
13
+ });
14
+ var getItemSettings = async (options) => invokeFetch("items", {
15
+ method: "get",
16
+ pathTemplate: "/api/v1/items/settings",
17
+ options
18
+ });
19
+ var patchItemSettings = async (body, options) => invokeFetch("items", {
20
+ method: "patch",
21
+ pathTemplate: "/api/v1/items/settings",
22
+ body,
23
+ options
24
+ });
25
+ var deleteItem = async (itemId, options) => invokeFetch("items", {
26
+ method: "delete",
27
+ pathTemplate: "/api/v1/items/{itemId}",
28
+ pathVariables: { itemId },
29
+ options
30
+ });
31
+ var getItem = async (itemId, options) => invokeFetch("items", {
32
+ method: "get",
33
+ pathTemplate: "/api/v1/items/{itemId}",
34
+ pathVariables: { itemId },
35
+ options
36
+ });
37
+ var updateItem = async (itemId, body, options) => invokeFetch("items", {
38
+ method: "put",
39
+ pathTemplate: "/api/v1/items/{itemId}",
40
+ pathVariables: { itemId },
41
+ body,
42
+ options
43
+ });
44
+ var getItemCollections = async (itemId, query, options) => invokeFetch("items", {
45
+ method: "get",
46
+ pathTemplate: "/api/v1/items/{itemId}/collections",
47
+ pathVariables: { itemId },
48
+ query,
49
+ options
50
+ });
51
+ var getPublishedItems = async (itemId, query, options) => invokeFetch("items", {
52
+ method: "get",
53
+ pathTemplate: "/api/v1/items/{itemId}/publisheditems",
54
+ pathVariables: { itemId },
55
+ query,
56
+ options
57
+ });
58
+ function clearCache() {
59
+ return clearApiCache("items");
60
+ }
61
+ var itemsExport = {
62
+ getItems,
63
+ getItemSettings,
64
+ patchItemSettings,
65
+ deleteItem,
66
+ getItem,
67
+ updateItem,
68
+ getItemCollections,
69
+ getPublishedItems,
70
+ clearCache
71
+ };
72
+ var items_default = itemsExport;
73
+ export {
74
+ clearCache,
75
+ items_default as default,
76
+ deleteItem,
77
+ getItem,
78
+ getItemCollections,
79
+ getItemSettings,
80
+ getItems,
81
+ getPublishedItems,
82
+ patchItemSettings,
83
+ updateItem
84
+ };