@qlik/api 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/api-keys.d.ts +32 -28
  2. package/api-keys.js +2 -2
  3. package/apps.d.ts +4 -4
  4. package/apps.js +2 -2
  5. package/audits.d.ts +2 -2
  6. package/audits.js +2 -2
  7. package/{auth-types-BU5EGt_9.d.ts → auth-types-PkN9CAF_.d.ts} +3 -0
  8. package/auth.d.ts +2 -2
  9. package/auth.js +2 -2
  10. package/automations.d.ts +2 -2
  11. package/automations.js +2 -2
  12. package/brands.d.ts +2 -2
  13. package/brands.js +2 -2
  14. package/chunks/{PESPSFQN.js → 2B3EPESP.js} +1 -1
  15. package/chunks/{MFNOHOWH.js → 2NXPFUPZ.js} +2 -2
  16. package/chunks/{O3XVX7VQ.js → 4FZ45I6G.js} +1 -1
  17. package/chunks/{GXMVBX45.js → GKEPTI44.js} +1 -1
  18. package/chunks/{TBHMVTOT.js → GLS4DAZ4.js} +1 -1
  19. package/chunks/{6O3XBOLZ.js → H7WWFWBM.js} +1 -1
  20. package/chunks/{YHKRUQRS.js → QLFOH4GP.js} +120 -11
  21. package/chunks/{ECWQX4IH.js → URFSYYRS.js} +1 -1
  22. package/chunks/{3XRP5N4L.js → YEHZGXQV.js} +141 -73
  23. package/chunks/{7IMOYFWE.js → ZLPAS7FC.js} +3 -3
  24. package/collections.d.ts +18 -17
  25. package/collections.js +2 -2
  26. package/csp-origins.d.ts +2 -2
  27. package/csp-origins.js +2 -2
  28. package/data-assets.d.ts +2 -2
  29. package/data-assets.js +2 -2
  30. package/data-connections.d.ts +2 -2
  31. package/data-connections.js +2 -2
  32. package/data-credentials.d.ts +2 -2
  33. package/data-credentials.js +2 -2
  34. package/data-files.d.ts +274 -76
  35. package/data-files.js +2 -2
  36. package/extensions.d.ts +18 -18
  37. package/extensions.js +2 -2
  38. package/{global.types-z1p6A9D-.d.ts → global.types--37uwGji.d.ts} +4 -1
  39. package/glossaries.d.ts +2 -2
  40. package/glossaries.js +2 -2
  41. package/groups.d.ts +2 -2
  42. package/groups.js +2 -2
  43. package/identity-providers.d.ts +2 -2
  44. package/identity-providers.js +2 -2
  45. package/index.d.ts +2 -2
  46. package/index.js +4 -4
  47. package/items.d.ts +11 -11
  48. package/items.js +2 -2
  49. package/licenses.d.ts +2 -2
  50. package/licenses.js +2 -2
  51. package/package.json +2 -2
  52. package/qix.d.ts +7 -4
  53. package/qix.js +2 -2
  54. package/quotas.d.ts +2 -2
  55. package/quotas.js +2 -2
  56. package/reload-tasks.d.ts +12 -12
  57. package/reload-tasks.js +2 -2
  58. package/reloads.d.ts +4 -4
  59. package/reloads.js +2 -2
  60. package/reports.d.ts +5 -3
  61. package/reports.js +2 -2
  62. package/roles.d.ts +2 -2
  63. package/roles.js +2 -2
  64. package/spaces.d.ts +2 -2
  65. package/spaces.js +2 -2
  66. package/temp-contents.d.ts +2 -2
  67. package/temp-contents.js +2 -2
  68. package/tenants.d.ts +2 -2
  69. package/tenants.js +2 -2
  70. package/themes.d.ts +18 -18
  71. package/themes.js +2 -2
  72. package/transports.d.ts +2 -2
  73. package/transports.js +2 -2
  74. package/users.d.ts +2 -2
  75. package/users.js +2 -2
  76. package/web-integrations.d.ts +2 -2
  77. package/web-integrations.js +2 -2
  78. package/web-notifications.d.ts +2 -2
  79. package/web-notifications.js +2 -2
  80. package/webhooks.d.ts +2 -2
  81. package/webhooks.js +2 -2
@@ -188,23 +188,33 @@ var InvalidAuthTypeError = class extends Error {
188
188
  this.name = "InvalidAuthTypeError";
189
189
  }
190
190
  };
191
+ function errorToString({ title, detail, code, status }) {
192
+ if (detail) {
193
+ return `${title} - ${detail} (Status: ${status}, Code: ${code})`;
194
+ }
195
+ return `${title} (Status: ${status}, Code: ${code})`;
196
+ }
191
197
  var AuthorizationError = class extends Error {
198
+ errors;
192
199
  constructor(errors) {
200
+ if (typeof errors !== "object") {
201
+ super("Unknown error");
202
+ return;
203
+ }
193
204
  const errorArray = Array.isArray(errors) ? errors : [errors];
194
- super(
195
- errorArray.map(
196
- (error) => `
197
- Code: ${error.code}
198
- Status: ${error.status}
199
- ${error.title}:
200
- ${error.detail}
201
- `
202
- ).join(",\n")
203
- );
205
+ super(errorArray.map(errorToString).join(", "));
206
+ this.errors = errorArray;
204
207
  }
205
208
  };
206
209
 
207
210
  // src/auth/auth-functions.ts
211
+ var lastErrorMessage = "";
212
+ function logToConsole({ message }) {
213
+ if (message !== lastErrorMessage) {
214
+ lastErrorMessage = message;
215
+ console.error(message);
216
+ }
217
+ }
208
218
  function isHostCrossOrigin(hostConfig) {
209
219
  if (!globalThis.location?.origin) {
210
220
  return true;
@@ -265,31 +275,57 @@ function toValidWebsocketLocationUrl(hostConfig) {
265
275
  }
266
276
  async function getWebSocketAuthParams(props) {
267
277
  const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
268
- return (await getAuthModule(hostConfigToUse)).getWebSocketAuthParams({
269
- ...props,
270
- hostConfig: hostConfigToUse
271
- });
278
+ try {
279
+ const authModule = await getAuthModule(hostConfigToUse);
280
+ return await authModule.getWebSocketAuthParams({
281
+ ...props,
282
+ hostConfig: hostConfigToUse
283
+ });
284
+ } catch (err) {
285
+ (hostConfigToUse.onAuthFailed || logToConsole)(normalizeAuthModuleError(err));
286
+ throw err;
287
+ }
272
288
  }
273
289
  async function getWebResourceAuthParams(props) {
274
290
  const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
275
- return (await getAuthModule(hostConfigToUse)).getWebResourceAuthParams?.({
276
- ...props,
277
- hostConfig: hostConfigToUse
278
- }) || { queryParams: {} };
291
+ try {
292
+ const authModule = await getAuthModule(hostConfigToUse);
293
+ return await authModule.getWebResourceAuthParams?.({
294
+ ...props,
295
+ hostConfig: hostConfigToUse
296
+ }) || { queryParams: {} };
297
+ } catch (err) {
298
+ (hostConfigToUse.onAuthFailed || logToConsole)(normalizeAuthModuleError(err));
299
+ throw err;
300
+ }
279
301
  }
280
302
  async function handleAuthenticationError(props) {
281
303
  const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
282
- return (await getAuthModule(hostConfigToUse)).handleAuthenticationError({
304
+ const authModule = await getAuthModule(hostConfigToUse);
305
+ const result2 = await authModule.handleAuthenticationError({
283
306
  ...props,
284
307
  hostConfig: hostConfigToUse
285
308
  });
309
+ const willRetry = props.canRetry && result2.retry;
310
+ const willHangUntilANewPageIsLoaded = result2.preventDefault;
311
+ if (!willRetry && !willHangUntilANewPageIsLoaded) {
312
+ const { status, errorBody } = props;
313
+ (hostConfigToUse.onAuthFailed || logToConsole)(normalizeInbandAuthError({ status, errorBody }));
314
+ }
315
+ return result2;
286
316
  }
287
317
  async function getRestCallAuthParams(props) {
288
318
  const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
289
- return (await getAuthModule(hostConfigToUse)).getRestCallAuthParams({
290
- ...props,
291
- hostConfig: hostConfigToUse
292
- });
319
+ try {
320
+ const authModule = await getAuthModule(hostConfigToUse);
321
+ return await authModule.getRestCallAuthParams({
322
+ ...props,
323
+ hostConfig: hostConfigToUse
324
+ });
325
+ } catch (err) {
326
+ (hostConfigToUse.onAuthFailed || logToConsole)(normalizeAuthModuleError(err));
327
+ throw err;
328
+ }
293
329
  }
294
330
  async function getAccessToken(props) {
295
331
  const res = await getRestCallAuthParams({ method: "GET", ...props });
@@ -321,6 +357,17 @@ var logout = () => {
321
357
  globalThis.location.href = "/logout";
322
358
  };
323
359
  var leadingHttp = /^http/;
360
+ function normalizeInbandAuthError({ errorBody, status }) {
361
+ const authError = errorBody;
362
+ if (typeof authError?.errors === "object") {
363
+ const err = new AuthorizationError(authError?.errors);
364
+ return { message: err.message };
365
+ }
366
+ return { message: `HTTP ${status}` };
367
+ }
368
+ function normalizeAuthModuleError(err) {
369
+ return { message: err.message || "Unknown error" };
370
+ }
324
371
 
325
372
  // src/random/random.ts
326
373
  import { customAlphabet, nanoid } from "nanoid";
@@ -359,6 +406,7 @@ function internalValidateHostConfig(hostConfig, options) {
359
406
  "authRedirectUserConfirmation",
360
407
  "embedRuntimeUrl",
361
408
  "host",
409
+ "onAuthFailed",
362
410
  ...options.requiredProps,
363
411
  ...options.optionalProps
364
412
  ];
@@ -652,7 +700,7 @@ async function getOauthTokensWithRefreshToken(baseUrl, refreshToken, clientSecre
652
700
  };
653
701
  }
654
702
  async function getAnonymousOauthAccessToken(baseUrl, accessCode, clientId, trackingCode) {
655
- const result2 = await fetch(`${baseUrl}/oauth/token`, {
703
+ const result2 = await fetch(`${baseUrl}/oauth/token/anonymous-embed`, {
656
704
  method: "POST",
657
705
  mode: "cors",
658
706
  headers: { "content-type": "application/json" },
@@ -792,7 +840,61 @@ async function refreshAccessToken(hostConfig) {
792
840
  }
793
841
  }
794
842
 
843
+ // src/auth/internal/default-auth-modules/oauth/temporary-token.ts
844
+ async function exchangeAccessTokenForTemporaryToken(hostConfig, accessToken, purpose) {
845
+ const response = await fetch(`${toValidLocationUrl(hostConfig)}/oauth/token`, {
846
+ method: "POST",
847
+ credentials: "include",
848
+ mode: "cors",
849
+ headers: { "content-type": "application/json" },
850
+ redirect: "follow",
851
+ body: JSON.stringify({
852
+ subject_token: accessToken,
853
+ subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
854
+ grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
855
+ purpose,
856
+ redirect_uri: globalThis.location?.href,
857
+ client_id: hostConfig.clientId
858
+ })
859
+ });
860
+ if (response.status !== 200) {
861
+ throw await toError(response);
862
+ }
863
+ const data = await response.json();
864
+ return data.access_token;
865
+ }
866
+ async function toError(response) {
867
+ const body = await response.text();
868
+ try {
869
+ const data = JSON.parse(body);
870
+ return new AuthorizationError(data.errors);
871
+ } catch (err) {
872
+ return new AuthorizationError([
873
+ {
874
+ code: "unknown",
875
+ status: response.status,
876
+ detail: body,
877
+ title: "Unknown authentication error"
878
+ }
879
+ ]);
880
+ }
881
+ }
882
+
795
883
  // src/auth/internal/default-auth-modules/anonymous.ts
884
+ async function handlePotentialAuthenticationErrorAndRetry(hostConfig, fn) {
885
+ try {
886
+ return await fn();
887
+ } catch (err) {
888
+ const { retry } = await handleAuthenticationError2({
889
+ hostConfig,
890
+ canRetry: true
891
+ });
892
+ if (retry) {
893
+ return fn();
894
+ }
895
+ throw err;
896
+ }
897
+ }
796
898
  async function getOrCreateTrackingCode(hostConfig) {
797
899
  let trackingCode;
798
900
  if (isBrowser()) {
@@ -809,7 +911,7 @@ async function getOrCreateTrackingCode(hostConfig) {
809
911
  }
810
912
  function createTrackingCode() {
811
913
  const timeStamp = Math.floor(Date.now() / 1e3).toString(16);
812
- const randomString = generateRandomHexString(20);
914
+ const randomString = generateRandomHexString(40 - timeStamp.length);
813
915
  return `${timeStamp}${randomString}`;
814
916
  }
815
917
  async function getAnonymousAccessToken(hostConfig) {
@@ -849,20 +951,26 @@ async function getRestCallAuthParams2({
849
951
  async function getWebSocketAuthParams2({
850
952
  hostConfig
851
953
  }) {
852
- const accessToken = await getAnonymousAccessToken(hostConfig);
954
+ const websocketAccessToken = await handlePotentialAuthenticationErrorAndRetry(hostConfig, async () => {
955
+ const accessToken = await getAnonymousAccessToken(hostConfig);
956
+ return exchangeAccessTokenForTemporaryToken(hostConfig, accessToken, "websocket");
957
+ });
853
958
  return {
854
959
  queryParams: {
855
- accessToken
960
+ accessToken: websocketAccessToken
856
961
  }
857
962
  };
858
963
  }
859
964
  async function getWebResourceAuthParams2({
860
965
  hostConfig
861
966
  }) {
862
- const accessToken = await getAnonymousAccessToken(hostConfig);
967
+ const websocketResourceAccessToken = await handlePotentialAuthenticationErrorAndRetry(hostConfig, async () => {
968
+ const accessToken = await getAnonymousAccessToken(hostConfig);
969
+ return exchangeAccessTokenForTemporaryToken(hostConfig, accessToken, "websocket");
970
+ });
863
971
  return {
864
972
  queryParams: {
865
- accessToken
973
+ accessToken: websocketResourceAccessToken
866
974
  }
867
975
  };
868
976
  }
@@ -1009,7 +1117,7 @@ var cookie_default = {
1009
1117
  handleAuthenticationError: handleAuthenticationError4,
1010
1118
  validateHostConfig: (hostConfig) => internalValidateHostConfig(hostConfig, {
1011
1119
  requiredProps: [],
1012
- optionalProps: ["webIntegrationId", "crossSiteCookies"]
1120
+ optionalProps: ["webIntegrationId", "crossSiteCookies", "anonymousMode"]
1013
1121
  })
1014
1122
  };
1015
1123
 
@@ -1059,51 +1167,11 @@ function handleOAuthCallback() {
1059
1167
  }
1060
1168
  }
1061
1169
 
1062
- // src/auth/internal/default-auth-modules/oauth/temporary-token.ts
1063
- async function exchangeAccessTokenForTemporaryToken(hostConfig, accessToken, purpose) {
1064
- const response = await fetch(`${toValidLocationUrl(hostConfig)}/oauth/token`, {
1065
- method: "POST",
1066
- credentials: "include",
1067
- mode: "cors",
1068
- headers: { "content-type": "application/json" },
1069
- redirect: "follow",
1070
- body: JSON.stringify({
1071
- subject_token: accessToken,
1072
- subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
1073
- grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
1074
- purpose,
1075
- redirect_uri: globalThis.location?.href,
1076
- client_id: hostConfig.clientId
1077
- })
1078
- });
1079
- if (response.status !== 200) {
1080
- throw await toError(response);
1081
- }
1082
- const data = await response.json();
1083
- return data.access_token;
1084
- }
1085
- async function toError(response) {
1086
- const body = await response.text();
1087
- try {
1088
- const data = JSON.parse(body);
1089
- return new AuthorizationError(data.errors);
1090
- } catch (err) {
1091
- return new AuthorizationError([
1092
- {
1093
- code: "unknown",
1094
- status: response.status,
1095
- detail: body,
1096
- title: "Unknown authentication error"
1097
- }
1098
- ]);
1099
- }
1100
- }
1101
-
1102
1170
  // src/auth/internal/default-auth-modules/oauth.ts
1103
1171
  if (isBrowser()) {
1104
1172
  handleOAuthCallback();
1105
1173
  }
1106
- async function handlePotentialAuthenticationErrorAndRetry(hostConfig, fn) {
1174
+ async function handlePotentialAuthenticationErrorAndRetry2(hostConfig, fn) {
1107
1175
  try {
1108
1176
  return await fn();
1109
1177
  } catch (err) {
@@ -1131,7 +1199,7 @@ async function getRestCallAuthParams6({
1131
1199
  async function getWebSocketAuthParams6({
1132
1200
  hostConfig
1133
1201
  }) {
1134
- const websocketAccessToken = await handlePotentialAuthenticationErrorAndRetry(hostConfig, async () => {
1202
+ const websocketAccessToken = await handlePotentialAuthenticationErrorAndRetry2(hostConfig, async () => {
1135
1203
  const accessToken = await getOAuthAccessToken(hostConfig);
1136
1204
  return exchangeAccessTokenForTemporaryToken(hostConfig, accessToken, "websocket");
1137
1205
  });
@@ -1144,7 +1212,7 @@ async function getWebSocketAuthParams6({
1144
1212
  async function getWebResourceAuthParams3({
1145
1213
  hostConfig
1146
1214
  }) {
1147
- const webResourceAccessToken = await handlePotentialAuthenticationErrorAndRetry(hostConfig, async () => {
1215
+ const webResourceAccessToken = await handlePotentialAuthenticationErrorAndRetry2(hostConfig, async () => {
1148
1216
  const accessToken = await getOAuthAccessToken(hostConfig);
1149
1217
  return exchangeAccessTokenForTemporaryToken(hostConfig, accessToken, "webresource");
1150
1218
  });
@@ -1,21 +1,21 @@
1
1
  // src/public/public-runtime-modules.ts
2
2
  function getAuthRuntimeModule(hostConfig) {
3
3
  const isNode = !!globalThis.process?.argv;
4
- return isNode ? import("./PESPSFQN.js") : import("./TBHMVTOT.js").then(
4
+ return isNode ? import("./2B3EPESP.js") : import("./GLS4DAZ4.js").then(
5
5
  (mod) => mod.importRuntimeModule("auth@v1", hostConfig)
6
6
  );
7
7
  }
8
8
  async function getQixRuntimeModule(hostConfig) {
9
9
  await getAuthRuntimeModule(hostConfig);
10
10
  const isNode = !!globalThis.process?.argv;
11
- return isNode ? import("./YHKRUQRS.js") : import("./TBHMVTOT.js").then(
11
+ return isNode ? import("./QLFOH4GP.js") : import("./GLS4DAZ4.js").then(
12
12
  (mod) => mod.importRuntimeModule("qix@v1", hostConfig)
13
13
  );
14
14
  }
15
15
  async function getInvokeFetchRuntimeModule(hostConfig) {
16
16
  await getAuthRuntimeModule(hostConfig);
17
17
  const isNode = !!globalThis.process?.argv;
18
- return isNode ? import("./ECWQX4IH.js") : import("./TBHMVTOT.js").then(
18
+ return isNode ? import("./URFSYYRS.js") : import("./GLS4DAZ4.js").then(
19
19
  (mod) => mod.importRuntimeModule("invoke-fetch@v1", hostConfig)
20
20
  );
21
21
  }
package/collections.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiCallOptions } from './global.types-z1p6A9D-.js';
2
- import './auth-types-BU5EGt_9.js';
1
+ import { A as ApiCallOptions } from './global.types--37uwGji.js';
2
+ import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type CollectionByIdPatch = {
5
5
  /** The operation to be performed. */
@@ -19,6 +19,7 @@ type CollectionsAddCollectionItemRequestBody = {
19
19
  };
20
20
  type CollectionsCreateCollectionRequestBody = {
21
21
  description?: string;
22
+ /** For `public` collections (tags), if name already exists in the tenant as a `public` collection, this call will fail with a `409` response. */
22
23
  name: string;
23
24
  type: CollectionTypes;
24
25
  };
@@ -233,7 +234,7 @@ type Meta = {
233
234
  timeout?: boolean;
234
235
  };
235
236
  /**
236
- * Finds and returns the collections that the user can access. This endpoint does not return the user's favorites collection.
237
+ * Retrieves the collections that the user has access to. This endpoint does not return the user's favorites collection, which can be retrieved with `/v1/collections/favorites`.
237
238
  *
238
239
  * @param query an object with query parameters
239
240
  * @throws GetCollectionsHttpError
@@ -261,7 +262,7 @@ declare const getCollections: (query: {
261
262
  * must be prefixed by + or - to indicate ascending or descending sort order
262
263
  * respectively. */
263
264
  sort?: "+createdAt" | "-createdAt" | "+name" | "-name" | "+updatedAt" | "-updatedAt";
264
- /** The case-sensitive string used to filter for a collection by type. */
265
+ /** The case-sensitive string used to filter for a collection by type. Retrieve private collections with `private`, public collections with `publicgoverned`, and tags with `public`. */
265
266
  type?: CollectionTypes;
266
267
  /** A commaseparated case-sensitive string used to filter by multiple types. */
267
268
  types?: CollectionTypes[];
@@ -279,7 +280,7 @@ type GetCollectionsHttpError = {
279
280
  status: number;
280
281
  };
281
282
  /**
282
- * Creates and returns a new collection. Collections can have the same name.
283
+ * Creates and returns a new collection. Collections of type `public` (shown as tags in the user interface) must have unique names. Other collection types can reuse names.
283
284
  *
284
285
  * @param body an object with the body content
285
286
  * @throws CreateCollectionHttpError
@@ -296,7 +297,7 @@ type CreateCollectionHttpError = {
296
297
  status: number;
297
298
  };
298
299
  /**
299
- * Finds and returns the user's favorites collection.
300
+ * Lists the user's favorites collection.
300
301
  *
301
302
  * @throws GetFavoritesCollectionHttpError
302
303
  */
@@ -346,7 +347,7 @@ type GetCollectionHttpError = {
346
347
  status: number;
347
348
  };
348
349
  /**
349
- * Updates the collection fields provided in the patch body.
350
+ * Updates the name, description, or type fields provided in the patch body. Can be used to publish a `private` collection as a `publicgoverned` collection by patching `/type` with `publicgoverned` once the collection contains at least 1 item. Can also be used to return a `publicgoverned` collection to `private`. Cannot be used to change between `public` (tag) and `private / publicgoverned` (collection).
350
351
  *
351
352
  * @param collectionId The collection's unique identifier.
352
353
  * @param body an object with the body content
@@ -364,7 +365,7 @@ type PatchCollectionHttpError = {
364
365
  status: number;
365
366
  };
366
367
  /**
367
- * Updates a collection and returns the new collection. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
368
+ * Updates a collection's name and description and returns the updated collection. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
368
369
  *
369
370
  * @param collectionId The collection's unique identifier.
370
371
  * @param body an object with the body content
@@ -382,7 +383,7 @@ type UpdateCollectionHttpError = {
382
383
  status: number;
383
384
  };
384
385
  /**
385
- * Finds and returns items from a collection that the user has access to.
386
+ * Retrieves items from a collection that the user has access to.
386
387
  *
387
388
  * @param collectionId The collection's unique identifier. (This query also supports 'favorites' as the collectionID).
388
389
 
@@ -463,7 +464,7 @@ type DeleteCollectionItemHttpError = {
463
464
  status: number;
464
465
  };
465
466
  /**
466
- * Finds and returns an item. See GET /items/{id}
467
+ * Finds and returns an item in a specific collection. See GET `/items/{id}`.
467
468
  *
468
469
  * @param collectionId The collection's unique identifier.
469
470
  * @param itemId The item's unique identifier.
@@ -486,21 +487,21 @@ type GetCollectionItemHttpError = {
486
487
  declare function clearCache(): void;
487
488
  interface CollectionsAPI {
488
489
  /**
489
- * Finds and returns the collections that the user can access. This endpoint does not return the user's favorites collection.
490
+ * Retrieves the collections that the user has access to. This endpoint does not return the user's favorites collection, which can be retrieved with `/v1/collections/favorites`.
490
491
  *
491
492
  * @param query an object with query parameters
492
493
  * @throws GetCollectionsHttpError
493
494
  */
494
495
  getCollections: typeof getCollections;
495
496
  /**
496
- * Creates and returns a new collection. Collections can have the same name.
497
+ * Creates and returns a new collection. Collections of type `public` (shown as tags in the user interface) must have unique names. Other collection types can reuse names.
497
498
  *
498
499
  * @param body an object with the body content
499
500
  * @throws CreateCollectionHttpError
500
501
  */
501
502
  createCollection: typeof createCollection;
502
503
  /**
503
- * Finds and returns the user's favorites collection.
504
+ * Lists the user's favorites collection.
504
505
  *
505
506
  * @throws GetFavoritesCollectionHttpError
506
507
  */
@@ -520,7 +521,7 @@ interface CollectionsAPI {
520
521
  */
521
522
  getCollection: typeof getCollection;
522
523
  /**
523
- * Updates the collection fields provided in the patch body.
524
+ * Updates the name, description, or type fields provided in the patch body. Can be used to publish a `private` collection as a `publicgoverned` collection by patching `/type` with `publicgoverned` once the collection contains at least 1 item. Can also be used to return a `publicgoverned` collection to `private`. Cannot be used to change between `public` (tag) and `private / publicgoverned` (collection).
524
525
  *
525
526
  * @param collectionId The collection's unique identifier.
526
527
  * @param body an object with the body content
@@ -528,7 +529,7 @@ interface CollectionsAPI {
528
529
  */
529
530
  patchCollection: typeof patchCollection;
530
531
  /**
531
- * Updates a collection and returns the new collection. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
532
+ * Updates a collection's name and description and returns the updated collection. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
532
533
  *
533
534
  * @param collectionId The collection's unique identifier.
534
535
  * @param body an object with the body content
@@ -536,7 +537,7 @@ interface CollectionsAPI {
536
537
  */
537
538
  updateCollection: typeof updateCollection;
538
539
  /**
539
- * Finds and returns items from a collection that the user has access to.
540
+ * Retrieves items from a collection that the user has access to.
540
541
  *
541
542
  * @param collectionId The collection's unique identifier. (This query also supports 'favorites' as the collectionID).
542
543
 
@@ -561,7 +562,7 @@ interface CollectionsAPI {
561
562
  */
562
563
  deleteCollectionItem: typeof deleteCollectionItem;
563
564
  /**
564
- * Finds and returns an item. See GET /items/{id}
565
+ * Finds and returns an item in a specific collection. See GET `/items/{id}`.
565
566
  *
566
567
  * @param collectionId The collection's unique identifier.
567
568
  * @param itemId The item's unique identifier.
package/collections.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/MFNOHOWH.js";
5
- import "./chunks/7IMOYFWE.js";
4
+ } from "./chunks/2NXPFUPZ.js";
5
+ import "./chunks/ZLPAS7FC.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/collections.ts
package/csp-origins.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiCallOptions } from './global.types-z1p6A9D-.js';
2
- import './auth-types-BU5EGt_9.js';
1
+ import { A as ApiCallOptions } from './global.types--37uwGji.js';
2
+ import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type CSPEntry = {
5
5
  /** The CSP entry's unique identifier. */
package/csp-origins.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/MFNOHOWH.js";
5
- import "./chunks/7IMOYFWE.js";
4
+ } from "./chunks/2NXPFUPZ.js";
5
+ import "./chunks/ZLPAS7FC.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/csp-origins.ts
package/data-assets.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiCallOptions } from './global.types-z1p6A9D-.js';
2
- import './auth-types-BU5EGt_9.js';
1
+ import { A as ApiCallOptions } from './global.types--37uwGji.js';
2
+ import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type BatchIdDto = {
5
5
  ids?: string[];
package/data-assets.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/MFNOHOWH.js";
5
- import "./chunks/7IMOYFWE.js";
4
+ } from "./chunks/2NXPFUPZ.js";
5
+ import "./chunks/ZLPAS7FC.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/data-assets.ts
@@ -1,5 +1,5 @@
1
- import { A as ApiCallOptions } from './global.types-z1p6A9D-.js';
2
- import './auth-types-BU5EGt_9.js';
1
+ import { A as ApiCallOptions } from './global.types--37uwGji.js';
2
+ import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type ActionDeleteRequest = {
5
5
  connections: {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/MFNOHOWH.js";
5
- import "./chunks/7IMOYFWE.js";
4
+ } from "./chunks/2NXPFUPZ.js";
5
+ import "./chunks/ZLPAS7FC.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/data-connections.ts
@@ -1,5 +1,5 @@
1
- import { A as ApiCallOptions } from './global.types-z1p6A9D-.js';
2
- import './auth-types-BU5EGt_9.js';
1
+ import { A as ApiCallOptions } from './global.types--37uwGji.js';
2
+ import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type Credential = {
5
5
  /** ID datasource that the credential is created for */
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/MFNOHOWH.js";
5
- import "./chunks/7IMOYFWE.js";
4
+ } from "./chunks/2NXPFUPZ.js";
5
+ import "./chunks/ZLPAS7FC.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/data-credentials.ts