@sinequa/atomic 2.2.0 → 2.3.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 (170) hide show
  1. package/README.md +28 -1
  2. package/dist/atomic.cjs +1 -1
  3. package/dist/atomic.js +2 -2
  4. package/dist/authentication/constants.d.ts +20 -0
  5. package/dist/authentication/constants.d.ts.map +1 -1
  6. package/dist/authentication/events/auth-events.d.ts +71 -0
  7. package/dist/authentication/events/auth-events.d.ts.map +1 -0
  8. package/dist/authentication/events/emit-authenticated-event.d.ts +9 -0
  9. package/dist/authentication/events/emit-authenticated-event.d.ts.map +1 -1
  10. package/dist/authentication/events/index.d.ts +1 -0
  11. package/dist/authentication/events/index.d.ts.map +1 -1
  12. package/dist/authentication/index.d.ts +3 -3
  13. package/dist/authentication/index.d.ts.map +1 -1
  14. package/dist/authentication/providers/oauth-authentication.d.ts +10 -1
  15. package/dist/authentication/providers/oauth-authentication.d.ts.map +1 -1
  16. package/dist/authentication/providers/redirect-to-identity-provider.d.ts +34 -0
  17. package/dist/authentication/providers/redirect-to-identity-provider.d.ts.map +1 -0
  18. package/dist/authentication/providers/saml-authentication.d.ts +10 -1
  19. package/dist/authentication/providers/saml-authentication.d.ts.map +1 -1
  20. package/dist/authentication/session/auth-mode-marker.d.ts +7 -0
  21. package/dist/authentication/session/auth-mode-marker.d.ts.map +1 -1
  22. package/dist/authentication/session/auth-state.d.ts +6 -1
  23. package/dist/authentication/session/auth-state.d.ts.map +1 -1
  24. package/dist/authentication/session/detect-auth-mode.d.ts +2 -1
  25. package/dist/authentication/session/detect-auth-mode.d.ts.map +1 -1
  26. package/dist/authentication/session/has-session.d.ts +26 -0
  27. package/dist/authentication/session/has-session.d.ts.map +1 -0
  28. package/dist/authentication/session/index.d.ts +2 -0
  29. package/dist/authentication/session/index.d.ts.map +1 -1
  30. package/dist/authentication/session/login.d.ts +12 -7
  31. package/dist/authentication/session/login.d.ts.map +1 -1
  32. package/dist/authentication/session/logout.d.ts +13 -2
  33. package/dist/authentication/session/logout.d.ts.map +1 -1
  34. package/dist/authentication/session/redirect-guard.d.ts +18 -0
  35. package/dist/authentication/session/redirect-guard.d.ts.map +1 -0
  36. package/dist/authentication/session/try-auto-authentication.d.ts +5 -2
  37. package/dist/authentication/session/try-auto-authentication.d.ts.map +1 -1
  38. package/dist/authentication/session/user-authentication.d.ts +7 -2
  39. package/dist/authentication/session/user-authentication.d.ts.map +1 -1
  40. package/dist/authentication/tokens/delete-web-token-cookie.d.ts +10 -5
  41. package/dist/authentication/tokens/delete-web-token-cookie.d.ts.map +1 -1
  42. package/dist/authentication/tokens/get-csrf-token.d.ts +4 -1
  43. package/dist/authentication/tokens/get-csrf-token.d.ts.map +1 -1
  44. package/dist/authentication/tokens/get-jwt-token.d.ts +29 -5
  45. package/dist/authentication/tokens/get-jwt-token.d.ts.map +1 -1
  46. package/dist/authentication/tokens/get-token.d.ts +7 -1
  47. package/dist/authentication/tokens/get-token.d.ts.map +1 -1
  48. package/dist/authentication/tokens/index.d.ts +1 -1
  49. package/dist/authentication/tokens/index.d.ts.map +1 -1
  50. package/dist/authentication/tokens/set-token.d.ts +7 -1
  51. package/dist/authentication/tokens/set-token.d.ts.map +1 -1
  52. package/dist/client/atomic-context.d.ts +61 -0
  53. package/dist/client/atomic-context.d.ts.map +1 -0
  54. package/dist/client/create-api.d.ts +109 -0
  55. package/dist/client/create-api.d.ts.map +1 -0
  56. package/dist/client/create-atomic-client.d.ts +138 -0
  57. package/dist/client/create-atomic-client.d.ts.map +1 -0
  58. package/dist/client/http-adapter.d.ts +30 -0
  59. package/dist/client/http-adapter.d.ts.map +1 -0
  60. package/dist/client/index.d.ts +5 -0
  61. package/dist/client/index.d.ts.map +1 -0
  62. package/dist/configurations/auth-mode.d.ts +51 -1
  63. package/dist/configurations/auth-mode.d.ts.map +1 -1
  64. package/dist/configurations/auth-options.d.ts +78 -0
  65. package/dist/configurations/auth-options.d.ts.map +1 -0
  66. package/dist/configurations/global.config.d.ts +23 -3
  67. package/dist/configurations/global.config.d.ts.map +1 -1
  68. package/dist/configurations/index.d.ts +1 -0
  69. package/dist/configurations/index.d.ts.map +1 -1
  70. package/dist/helpers/filters.d.ts +24 -0
  71. package/dist/helpers/filters.d.ts.map +1 -1
  72. package/dist/helpers/index.d.ts +1 -0
  73. package/dist/helpers/index.d.ts.map +1 -1
  74. package/dist/helpers/pagination.d.ts +23 -0
  75. package/dist/helpers/pagination.d.ts.map +1 -0
  76. package/dist/helpers/ts-helper.d.ts +6 -0
  77. package/dist/helpers/ts-helper.d.ts.map +1 -1
  78. package/dist/index.d.ts +1 -0
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/polyfills/storage.d.ts +12 -3
  81. package/dist/polyfills/storage.d.ts.map +1 -1
  82. package/dist/spfx/index.cjs +1 -1
  83. package/dist/spfx/index.d.ts +1 -0
  84. package/dist/spfx/index.d.ts.map +1 -1
  85. package/dist/spfx/index.js +2 -2
  86. package/dist/src-1RUu1uXc.cjs +1 -0
  87. package/dist/src-DFuZeDvd.js +2198 -0
  88. package/dist/types/search/Result.d.ts +36 -2
  89. package/dist/types/search/Result.d.ts.map +1 -1
  90. package/dist/types/search/index.d.ts +1 -1
  91. package/dist/types/search/index.d.ts.map +1 -1
  92. package/dist/utils/logger.d.ts +27 -16
  93. package/dist/utils/logger.d.ts.map +1 -1
  94. package/dist/web-api/helpers/aad-http-client-manager.d.ts +8 -0
  95. package/dist/web-api/helpers/aad-http-client-manager.d.ts.map +1 -1
  96. package/dist/web-api/helpers/create-headers.d.ts +9 -0
  97. package/dist/web-api/helpers/create-headers.d.ts.map +1 -1
  98. package/dist/web-api/helpers/errors/api-error.d.ts.map +1 -1
  99. package/dist/web-api/helpers/handle-response.d.ts +17 -1
  100. package/dist/web-api/helpers/handle-response.d.ts.map +1 -1
  101. package/dist/web-api/helpers/index.d.ts +1 -1
  102. package/dist/web-api/helpers/index.d.ts.map +1 -1
  103. package/dist/web-api/helpers/methods/del.d.ts +13 -11
  104. package/dist/web-api/helpers/methods/del.d.ts.map +1 -1
  105. package/dist/web-api/helpers/methods/get.d.ts +6 -12
  106. package/dist/web-api/helpers/methods/get.d.ts.map +1 -1
  107. package/dist/web-api/helpers/methods/patch.d.ts +6 -7
  108. package/dist/web-api/helpers/methods/patch.d.ts.map +1 -1
  109. package/dist/web-api/helpers/methods/post.d.ts +6 -8
  110. package/dist/web-api/helpers/methods/post.d.ts.map +1 -1
  111. package/dist/web-api/helpers/methods/put.d.ts +6 -7
  112. package/dist/web-api/helpers/methods/put.d.ts.map +1 -1
  113. package/dist/web-api/helpers/methods/send-request.d.ts +24 -0
  114. package/dist/web-api/helpers/methods/send-request.d.ts.map +1 -0
  115. package/dist/web-api/helpers/request-options.d.ts +35 -12
  116. package/dist/web-api/helpers/request-options.d.ts.map +1 -1
  117. package/dist/web-api/helpers/utils/build-request-url.d.ts +12 -0
  118. package/dist/web-api/helpers/utils/build-request-url.d.ts.map +1 -0
  119. package/dist/web-api/helpers/utils/{date-utils..d.ts → date-utils.d.ts} +1 -1
  120. package/dist/web-api/helpers/utils/date-utils.d.ts.map +1 -0
  121. package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts +9 -0
  122. package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts.map +1 -1
  123. package/dist/web-api/helpers/utils/with-retry.d.ts +10 -5
  124. package/dist/web-api/helpers/utils/with-retry.d.ts.map +1 -1
  125. package/dist/web-api/v1/fetch-aggregation.d.ts +2 -1
  126. package/dist/web-api/v1/fetch-aggregation.d.ts.map +1 -1
  127. package/dist/web-api/v1/fetch-app.d.ts +12 -5
  128. package/dist/web-api/v1/fetch-app.d.ts.map +1 -1
  129. package/dist/web-api/v1/fetch-audit.d.ts +2 -1
  130. package/dist/web-api/v1/fetch-audit.d.ts.map +1 -1
  131. package/dist/web-api/v1/fetch-dataset.d.ts +4 -3
  132. package/dist/web-api/v1/fetch-dataset.d.ts.map +1 -1
  133. package/dist/web-api/v1/fetch-labels.d.ts +9 -8
  134. package/dist/web-api/v1/fetch-labels.d.ts.map +1 -1
  135. package/dist/web-api/v1/fetch-preview.d.ts +2 -1
  136. package/dist/web-api/v1/fetch-preview.d.ts.map +1 -1
  137. package/dist/web-api/v1/fetch-principal.d.ts +8 -4
  138. package/dist/web-api/v1/fetch-principal.d.ts.map +1 -1
  139. package/dist/web-api/v1/fetch-query-export.d.ts +2 -1
  140. package/dist/web-api/v1/fetch-query-export.d.ts.map +1 -1
  141. package/dist/web-api/v1/fetch-query-intent.d.ts +2 -1
  142. package/dist/web-api/v1/fetch-query-intent.d.ts.map +1 -1
  143. package/dist/web-api/v1/fetch-query.d.ts +3 -2
  144. package/dist/web-api/v1/fetch-query.d.ts.map +1 -1
  145. package/dist/web-api/v1/fetch-security-principal.d.ts +2 -1
  146. package/dist/web-api/v1/fetch-security-principal.d.ts.map +1 -1
  147. package/dist/web-api/v1/fetch-similar-documents.d.ts +2 -1
  148. package/dist/web-api/v1/fetch-similar-documents.d.ts.map +1 -1
  149. package/dist/web-api/v1/fetch-sponsored-links.d.ts +2 -1
  150. package/dist/web-api/v1/fetch-sponsored-links.d.ts.map +1 -1
  151. package/dist/web-api/v1/fetch-suggest.d.ts +4 -3
  152. package/dist/web-api/v1/fetch-suggest.d.ts.map +1 -1
  153. package/dist/web-api/v1/fetch-text-chunk.d.ts +2 -1
  154. package/dist/web-api/v1/fetch-text-chunk.d.ts.map +1 -1
  155. package/dist/web-api/v1/fetch-user-settings.d.ts +5 -4
  156. package/dist/web-api/v1/fetch-user-settings.d.ts.map +1 -1
  157. package/dist/web-api/v2/fetch-change-password.d.ts +2 -1
  158. package/dist/web-api/v2/fetch-change-password.d.ts.map +1 -1
  159. package/dist/web-api/v2/fetch-document-upload-container.d.ts +8 -7
  160. package/dist/web-api/v2/fetch-document-upload-container.d.ts.map +1 -1
  161. package/dist/web-api/v2/fetch-forgot-password.d.ts +2 -1
  162. package/dist/web-api/v2/fetch-forgot-password.d.ts.map +1 -1
  163. package/dist/web-api/v2/fetch-user-profile.d.ts +5 -4
  164. package/dist/web-api/v2/fetch-user-profile.d.ts.map +1 -1
  165. package/dist/web-api/v2/fetch-version.d.ts +2 -1
  166. package/dist/web-api/v2/fetch-version.d.ts.map +1 -1
  167. package/package.json +1 -1
  168. package/dist/src-BCIlSfZp.js +0 -1923
  169. package/dist/src-Dg2926V9.cjs +0 -1
  170. package/dist/web-api/helpers/utils/date-utils..d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"with-retry.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/utils/with-retry.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,UAAU,GAAE,MAAU,EACtB,UAAU,GAAE,MAAa,GACxB,OAAO,CAAC,CAAC,CAAC,CAmCZ"}
1
+ {"version":3,"file":"with-retry.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/utils/with-retry.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,UAAU,GAAE,MAAU,EACtB,UAAU,GAAE,MAAa,GACxB,OAAO,CAAC,CAAC,CAAC,CAmCZ"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Aggregation, AuditEvents, Query } from "../../types";
2
3
  /**
3
4
  * Fetches an aggregation from the server.
@@ -7,5 +8,5 @@ import { Aggregation, AuditEvents, Query } from "../../types";
7
8
  * @param audit - Optional audit events.
8
9
  * @returns A promise that resolves to the fetched aggregation.
9
10
  */
10
- export declare function fetchAggregation(aggregation: Aggregation, query: Query, audit?: AuditEvents): Promise<Aggregation>;
11
+ export declare function fetchAggregation(aggregation: Aggregation, query: Query, audit?: AuditEvents, ctx?: AtomicContext): Promise<Aggregation>;
11
12
  //# sourceMappingURL=fetch-aggregation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-aggregation.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-aggregation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,aAAa,CAAC;AAItE;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,WAAW,CAAC,CAwBtB"}
1
+ {"version":3,"file":"fetch-aggregation.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-aggregation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,aAAa,CAAC;AAKtE;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,KAAK,CAAC,EAAE,WAAW,EACnB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,WAAW,CAAC,CAwBtB"}
@@ -1,20 +1,27 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import type { CCApp, CCAppPreLogin } from "../../types";
2
3
  /**
3
4
  * Fetches the CCApp object.
4
- * @param appName - Optional app name to fetch. Defaults to `globalConfig.app` if not provided.
5
+ * @param appName - Optional app name to fetch. Defaults to the context's `app` if not provided.
6
+ * @param ctx - Client context to run on. Defaults to the one backing the free functions.
5
7
  * @returns A promise that resolves to the CCApp object.
6
8
  */
7
- export declare function fetchApp(appName?: string): Promise<CCApp>;
9
+ export declare function fetchApp(appName?: string, ctx?: AtomicContext): Promise<CCApp>;
8
10
  /**
9
11
  * Fetches the pre-login information for the app.
12
+ * @param ctx - Client context to run on. Defaults to the one backing the free functions.
10
13
  * @returns A promise that resolves to the pre-login information of the app.
11
14
  */
12
- export declare function fetchAppPreLogin(): Promise<CCAppPreLogin>;
15
+ export declare function fetchAppPreLogin(ctx?: AtomicContext): Promise<CCAppPreLogin>;
13
16
  /**
14
- * Initializes the application configuration by setting the global configuration and fetching app pre-login data.
17
+ * Resolves the configuration of a context: `backendUrl`/`app` when they can be derived from the
18
+ * browser URL, then the authentication mode from the server's pre-login response.
19
+ *
20
+ * @param ctx - Client context to configure. Defaults to the one backing the free functions, whose
21
+ * configuration IS `globalConfig` — so calling it without an argument behaves exactly as before.
15
22
  * @returns A promise that resolves when the initialization is complete.
16
23
  */
17
- export declare function initializeAppConfig(): Promise<CCAppPreLogin>;
24
+ export declare function initializeAppConfig(ctx?: AtomicContext): Promise<CCAppPreLogin>;
18
25
  /**
19
26
  * Initializes the application by setting the global configuration and fetching app pre-login data.
20
27
  * @deprecated Use {@link initializeAppConfig} instead.
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-app.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-app.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIxD;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAK/D;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,aAAa,CAAC,CA4D5D;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,4BAAsB,CAAC"}
1
+ {"version":3,"file":"fetch-app.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-app.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGxD;;;;;GAKG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,CAAC,EAAE,MAAM,EAChB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,KAAK,CAAC,CAKhB;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,aAAa,CAAC,CAQxB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,aAAa,CAAC,CA2DxB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,4BAAsB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { AuditEvents, AuditRecord } from "../../types";
2
3
  /**
3
4
  * Adds additional audit information to the provided body object.
@@ -26,7 +27,7 @@ export declare function addUrl(auditRecord: AuditRecord): AuditRecord;
26
27
  * @param addUrl - Whether the url should be automatically added to the request details.
27
28
  * @returns A promise that resolves to the updated audit events.
28
29
  */
29
- declare function notify(auditEvents: AuditEvents, addUrl?: boolean): Promise<AuditEvents>;
30
+ declare function notify(auditEvents: AuditEvents, addUrl?: boolean, ctx?: AtomicContext): Promise<AuditEvents>;
30
31
  export declare const Audit: {
31
32
  notify: typeof notify;
32
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-audit.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-audit.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EAEX,WAAW,EACZ,MAAM,aAAa,CAAC;AAOrB;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,EACb,WAAW,GAAE,OAAc,QAU5B;AA2BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,eASpD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,eAc9C;AAuBD;;;;;;GAMG;AACH,iBAAe,MAAM,CACnB,WAAW,EAAE,WAAW,EACxB,MAAM,GAAE,OAAc,GACrB,OAAO,CAAC,WAAW,CAAC,CAStB;AAED,eAAO,MAAM,KAAK;;CAAa,CAAC"}
1
+ {"version":3,"file":"fetch-audit.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-audit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,WAAW,EAEX,WAAW,EACZ,MAAM,aAAa,CAAC;AAOrB;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,EACb,WAAW,GAAE,OAAc,QAU5B;AA2BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,eASpD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,eAc9C;AAuBD;;;;;;GAMG;AACH,iBAAe,MAAM,CACnB,WAAW,EAAE,WAAW,EACxB,MAAM,GAAE,OAAc,EACtB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,WAAW,CAAC,CAStB;AAED,eAAO,MAAM,KAAK;;CAAa,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Result } from "../../types";
2
3
  export type DatasetError = {
3
4
  errorCode: number;
@@ -18,7 +19,7 @@ export type DataSet<T extends Result = Result> = Record<string, T | DatasetError
18
19
  * @returns {Promise<T>} A promise that resolves to the fetched dataset.
19
20
  * @throws {Error} If the dataset contains an error code and message.
20
21
  */
21
- export declare function fetchDataset<T extends Result = Result>(webserviceName: string, datasetName: string, parameters?: {}): Promise<T>;
22
+ export declare function fetchDataset<T extends Result = Result>(webserviceName: string, datasetName: string, parameters?: {}, ctx?: AtomicContext): Promise<T>;
22
23
  /**
23
24
  * Fetches datasets from a specified web service.
24
25
  *
@@ -32,12 +33,12 @@ export declare function fetchDataset<T extends Result = Result>(webserviceName:
32
33
  export declare function fetchDatasets<T extends Result = Result>(webserviceName: string, options: {
33
34
  parameters?: {};
34
35
  datasets?: string[];
35
- }): Promise<DataSet<T>>;
36
+ }, ctx?: AtomicContext): Promise<DataSet<T>>;
36
37
  /**
37
38
  * Fetches a list of dataset descriptions from the specified web service.
38
39
  *
39
40
  * @param webserviceName - The name of the web service to fetch the dataset list from.
40
41
  * @returns A promise that resolves to an array of `DatasetDescription` objects.
41
42
  */
42
- export declare function fetchDatasetList(webserviceName: string): Promise<DatasetDescription[]>;
43
+ export declare function fetchDatasetList(webserviceName: string, ctx?: AtomicContext): Promise<DatasetDescription[]>;
43
44
  //# sourceMappingURL=fetch-dataset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-dataset.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CACrD,MAAM,EACN,CAAC,GAAG,YAAY,CACjB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAC1D,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,UAAU,KAAK,GACd,OAAO,CAAC,CAAC,CAAC,CAYZ;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAC3D,cAAc,EAAE,MAAM,EACtB,OA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,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAUrB;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,MAAM,EACtB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAM/B"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { LabelsRights, Query } from "../../types";
2
3
  /**
3
4
  * Fetches all existing labels based on the provided prefix and other optional parameters.
@@ -7,7 +8,7 @@ import { LabelsRights, Query } from "../../types";
7
8
  * @param {string} [locale] - Optional locale to filter the labels.
8
9
  * @returns {Promise<Labels>} A promise that resolves to the fetched labels.
9
10
  */
10
- export declare function fetchLabels(prefix: string, publicOnly?: boolean, locale?: string): Promise<string[]>;
11
+ export declare function fetchLabels(prefix: string, publicOnly?: boolean, locale?: string, ctx?: AtomicContext): Promise<string[]>;
11
12
  /**
12
13
  * Fetches the user labels's rights.
13
14
  *
@@ -17,7 +18,7 @@ export declare function fetchLabels(prefix: string, publicOnly?: boolean, locale
17
18
  *
18
19
  * @returns {Promise<LabelsRights>} A promise that resolves to the user rights for the current application.
19
20
  */
20
- declare function getUserRights(): Promise<LabelsRights>;
21
+ declare function getUserRights(ctx?: AtomicContext): Promise<LabelsRights>;
21
22
  /**
22
23
  * Adds labels to the specified document IDs.
23
24
  *
@@ -26,7 +27,7 @@ declare function getUserRights(): Promise<LabelsRights>;
26
27
  * @param publicOnly - A boolean indicating whether the labels should be public. Defaults to true.
27
28
  * @returns A promise that resolves when the labels have been added.
28
29
  */
29
- declare function add(labels: string[], ids: string[], publicOnly?: boolean): Promise<void>;
30
+ declare function add(labels: string[], ids: string[], publicOnly?: boolean, ctx?: AtomicContext): Promise<void>;
30
31
  /**
31
32
  * Removes labels from documents.
32
33
  *
@@ -35,7 +36,7 @@ declare function add(labels: string[], ids: string[], publicOnly?: boolean): Pro
35
36
  * @param {boolean} [publicOnly=true] - Indicates whether the operation should be public only.
36
37
  * @returns {Promise<void>} A promise that resolves when the operation is complete.
37
38
  */
38
- declare function remove(labels: string[], ids: string[], publicOnly?: boolean): Promise<void>;
39
+ declare function remove(labels: string[], ids: string[], publicOnly?: boolean, ctx?: AtomicContext): Promise<void>;
39
40
  /**
40
41
  * Renames a set of labels to a new label.
41
42
  *
@@ -44,7 +45,7 @@ declare function remove(labels: string[], ids: string[], publicOnly?: boolean):
44
45
  * @param {boolean} [publicOnly=true] - Indicates if the operation should be applied to public labels only.
45
46
  * @returns {Promise<void>} A promise that resolves when the operation is complete.
46
47
  */
47
- declare function rename(labels: string[], newLabel: string, publicOnly?: boolean): Promise<void>;
48
+ declare function rename(labels: string[], newLabel: string, publicOnly?: boolean, ctx?: AtomicContext): Promise<void>;
48
49
  /**
49
50
  * Deletes the specified labels.
50
51
  *
@@ -52,7 +53,7 @@ declare function rename(labels: string[], newLabel: string, publicOnly?: boolean
52
53
  * @param {boolean} [publicOnly=true] - Indicates whether to delete only public labels. Defaults to true.
53
54
  * @returns {Promise<void>} A promise that resolves when the labels have been deleted.
54
55
  */
55
- declare function deleteLabels(labels: string[], publicOnly?: boolean): Promise<void>;
56
+ declare function deleteLabels(labels: string[], publicOnly?: boolean, ctx?: AtomicContext): Promise<void>;
56
57
  /**
57
58
  * Adds multiple labels in bulk to the specified query.
58
59
  *
@@ -61,7 +62,7 @@ declare function deleteLabels(labels: string[], publicOnly?: boolean): Promise<v
61
62
  * @param publicOnly - A boolean indicating whether the labels should be public. Defaults to true.
62
63
  * @returns A promise that resolves when the labels have been added.
63
64
  */
64
- declare function bulkAdd(labels: string[], query: Query, publicOnly?: boolean): Promise<void>;
65
+ declare function bulkAdd(labels: string[], query: Query, publicOnly?: boolean, ctx?: AtomicContext): Promise<void>;
65
66
  /**
66
67
  * Removes multiple labels based on the provided query.
67
68
  *
@@ -70,7 +71,7 @@ declare function bulkAdd(labels: string[], query: Query, publicOnly?: boolean):
70
71
  * @param publicOnly - A boolean indicating whether to remove only public labels. Defaults to true.
71
72
  * @returns A promise that resolves when the labels have been removed.
72
73
  */
73
- declare function bulkRemove(labels: string[], query: Query, publicOnly?: boolean): Promise<void>;
74
+ declare function bulkRemove(labels: string[], query: Query, publicOnly?: boolean, ctx?: AtomicContext): Promise<void>;
74
75
  /**
75
76
  * A collection of functions related to label management.
76
77
  *
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-labels.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIlE;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,OAAc,EAC1B,MAAM,CAAC,EAAE,MAAM,qBAiBhB;AAED;;;;;;;;GAQG;AACH,iBAAe,aAAa,0BAa3B;AAED;;;;;;;GAOG;AACH,iBAAe,GAAG,CAChB,MAAM,EAAE,MAAM,EAAE,EAChB,GAAG,EAAE,MAAM,EAAE,EACb,UAAU,GAAE,OAAc,iBAiC3B;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CACnB,MAAM,EAAE,MAAM,EAAE,EAChB,GAAG,EAAE,MAAM,EAAE,EACb,UAAU,GAAE,OAAc,iBAiC3B;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CACnB,MAAM,EAAE,MAAM,EAAE,EAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,GAAE,OAAc,iBAuB3B;AAED;;;;;;GAMG;AACH,iBAAe,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBAoBvE;AAED;;;;;;;GAOG;AACH,iBAAe,OAAO,CACpB,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,EAAE,KAAK,EACZ,UAAU,GAAE,OAAc,iBAuB3B;AAED;;;;;;;GAOG;AACH,iBAAe,UAAU,CACvB,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,EAAE,KAAK,E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EAC1B,GAAG,GAAE,aAA8B,iBAuBpC;AAED;;;;;;;GAOG;AACH,iBAAe,UAAU,CACvB,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,EAAE,KAAK,EACZ,UAAU,GAAE,OAAc,EAC1B,GAAG,GAAE,aAA8B,iBAuBpC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { PreviewData, Query } from "../../types";
2
3
  /**
3
4
  * Fetches preview data for a given id and query.
@@ -6,7 +7,7 @@ import { PreviewData, Query } from "../../types";
6
7
  * @param query - The query parameters for the preview.
7
8
  * @returns A promise that resolves to the PreviewData.
8
9
  */
9
- export declare function fetchPreview(id: string, q: Query): Promise<PreviewData>;
10
+ export declare function fetchPreview(id: string, q: Query, ctx?: AtomicContext): Promise<PreviewData>;
10
11
  /**
11
12
  * Fetches preview document content from a given URL.
12
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-preview.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAsB7E;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,iBAUhD"}
1
+ {"version":3,"file":"fetch-preview.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIjD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,EAAE,EAAE,MAAM,EACV,CAAC,EAAE,KAAK,EACR,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,WAAW,CAAC,CAsBtB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,iBAUhD"}
@@ -1,4 +1,6 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Principal } from "../../types";
3
+ import type { RequestOptions } from "../helpers/request-options";
2
4
  /**
3
5
  * Fetches the principal (current user) information from the backend API.
4
6
  *
@@ -6,10 +8,12 @@ import { Principal } from "../../types";
6
8
  * query parameters to retrieve the current user's data without triggering
7
9
  * automatic authentication.
8
10
  *
11
+ * @param options - Request options. `noAutoAuthentication` defaults to the value resolved from the
12
+ * context's auth mode; pass `noRecovery` when probing the session from inside a sign-in.
9
13
  * @returns A promise that resolves to the Principal object, representing
10
14
  * the current user's information.
11
15
  */
12
- export declare function fetchPrincipal(): Promise<Principal>;
16
+ export declare function fetchPrincipal(options?: RequestOptions, ctx?: AtomicContext): Promise<Principal>;
13
17
  type ListOptions = {
14
18
  search?: string;
15
19
  isuser?: boolean;
@@ -30,7 +34,7 @@ type ListOptions = {
30
34
  * const principals = await fetchPrincipalList({ search: "john", isuser: true });
31
35
  * ```
32
36
  */
33
- export declare function fetchPrincipalList(options: ListOptions): Promise<Principal[]>;
37
+ export declare function fetchPrincipalList(options: ListOptions, ctx?: AtomicContext): Promise<Principal[]>;
34
38
  /**
35
39
  * Fetches principal information for a given user ID.
36
40
  *
@@ -42,7 +46,7 @@ export declare function fetchPrincipalList(options: ListOptions): Promise<Princi
42
46
  * This function performs an API call with automatic authentication disabled.
43
47
  * The API endpoint used is "api/v1/principal".
44
48
  */
45
- export declare function fetchPrincipalUserid(userid: string): Promise<Principal>;
49
+ export declare function fetchPrincipalUserid(userid: string, ctx?: AtomicContext): Promise<Principal>;
46
50
  /**
47
51
  * Fetches principal information for the specified user IDs.
48
52
  *
@@ -55,7 +59,7 @@ export declare function fetchPrincipalUserid(userid: string): Promise<Principal>
55
59
  * const principals = await fetchPrincipalUserids(['user1', 'user2']);
56
60
  * ```
57
61
  */
58
- export declare function fetchPrincipalUserids(userids: string[]): Promise<Principal[]>;
62
+ export declare function fetchPrincipalUserids(userids: string[], ctx?: AtomicContext): Promise<Principal[]>;
59
63
  export declare const API: {
60
64
  principal: {
61
65
  get: typeof fetchPrincipal;
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-principal.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-principal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;;;;;;;;GASG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,SAAS,CAAC,CAOzD;AAED,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,SAAS,EAAE,CAAC,CAatB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAU7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,SAAS,EAAE,CAAC,CAStB;AAED,eAAO,MAAM,GAAG;;;;;;;CAOf,CAAC"}
1
+ {"version":3,"file":"fetch-principal.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-principal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAClC,OAAO,CAAC,EAAE,cAAc,EACxB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,CAAC,CAOpB;AAED,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,WAAW,EACpB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,EAAE,CAAC,CAWtB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,CAAC,CAQpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,EAAE,CAAC,CAQtB;AAED,eAAO,MAAM,GAAG;;;;;;;CAOf,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Article, Query } from "../../types";
2
3
  import { ExportQueryModel } from "../../types/export/types";
3
4
  /**
@@ -15,5 +16,5 @@ export declare function fetchQueryExport({ model, appName, query, article, }: {
15
16
  appName: string;
16
17
  query: Query;
17
18
  article?: Article;
18
- }): Promise<Response>;
19
+ }, ctx?: AtomicContext): Promise<Response>;
19
20
  //# sourceMappingURL=fetch-query-export.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-query-export.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-query-export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4BpB"}
1
+ {"version":3,"file":"fetch-query-export.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-query-export.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,EACE,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,EACD,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,QAAQ,CAAC,CAiCnB"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Query, QueryIntentMatch } from "../../types";
2
3
  /**
3
4
  * Fetches query intent based on the query.
@@ -9,5 +10,5 @@ import { Query, QueryIntentMatch } from "../../types";
9
10
  * @returns A promise that resolves to an array of QueryIntentMatch objects, each
10
11
  * representing a query intent match.
11
12
  */
12
- export declare function fetchQueryIntent(query: Query): Promise<QueryIntentMatch[]>;
13
+ export declare function fetchQueryIntent(query: Query, ctx?: AtomicContext): Promise<QueryIntentMatch[]>;
13
14
  //# sourceMappingURL=fetch-query-intent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-query-intent.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-query-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAuB,MAAM,aAAa,CAAC;AAG3E;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAO7B"}
1
+ {"version":3,"file":"fetch-query-intent.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-query-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAuB,MAAM,aAAa,CAAC;AAG3E;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,KAAK,EACZ,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAW7B"}
@@ -1,17 +1,18 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { AuditEvents, Query, QueryIntentData, Result, TreeAggregation, TreeAggregationNode } from "../../types";
2
3
  /**
3
4
  * Fetches data from the backend using the specified query.
4
5
  * @param query The query to be sent to the backend.
5
6
  * @returns A promise that resolves to the fetched data.
6
7
  */
7
- export declare function fetchQuery(query: Query, audit?: AuditEvents, queryIntentData?: QueryIntentData): Promise<Result>;
8
+ export declare function fetchQuery(query: Query, audit?: AuditEvents, queryIntentData?: QueryIntentData, ctx?: AtomicContext): Promise<Result>;
8
9
  /**
9
10
  * Fetches multiple queries in bulk.
10
11
  * @param queries - An array of Query objects representing the queries to be fetched.
11
12
  * @param auditEvents - Optional AuditEvents object containing audit events for the request.
12
13
  * @returns A Promise that resolves to an array of Result objects representing the query results.
13
14
  */
14
- export declare function fetchBulkQuery(queries: Query[], mode?: "parallel", auditEvents?: AuditEvents): Promise<Result[]>;
15
+ export declare function fetchBulkQuery(queries: Query[], mode?: "parallel", auditEvents?: AuditEvents, ctx?: AtomicContext): Promise<Result[]>;
15
16
  /**
16
17
  * Builds an array of paths and levels for a given tree aggregation.
17
18
  *
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-query.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-query.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,WAAW,EACX,KAAK,EACL,eAAe,EACf,MAAM,EACN,eAAe,EACf,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAKrB;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,KAAK,EACZ,KAAK,CAAC,EAAE,WAAW,EACnB,eAAe,CAAC,EAAE,eAAe,GAChC,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,KAAK,EAAE,EAChB,IAAI,CAAC,EAAE,UAAU,EACjB,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,MAAM,EAAE,CAAC,CAiEnB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,eAAe,GAAG,mBAAmB,EAC3C,WAAW,SAAK,EAChB,YAAY,SAAI,GACf;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAmBnC"}
1
+ {"version":3,"file":"fetch-query.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-query.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,WAAW,EACX,KAAK,EACL,eAAe,EACf,MAAM,EACN,eAAe,EACf,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAKrB;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,KAAK,EACZ,KAAK,CAAC,EAAE,WAAW,EACnB,eAAe,CAAC,EAAE,eAAe,EACjC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,KAAK,EAAE,EAChB,IAAI,CAAC,EAAE,UAAU,EACjB,WAAW,CAAC,EAAE,WAAW,EACzB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,MAAM,EAAE,CAAC,CAyDnB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,eAAe,GAAG,mBAAmB,EAC3C,WAAW,SAAK,EAChB,YAAY,SAAI,GACf;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAmBnC"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import type { SecurityPrincipalSearchResponse } from "../../types";
2
3
  /**
3
4
  * Searches Sinequa principals (users/groups) by free text, via the
@@ -18,5 +19,5 @@ export declare function searchPrincipals(params: {
18
19
  offset: number;
19
20
  limit: number;
20
21
  search: string;
21
- }, signal?: AbortSignal): Promise<SecurityPrincipalSearchResponse>;
22
+ }, signal?: AbortSignal, ctx?: AtomicContext): Promise<SecurityPrincipalSearchResponse>;
22
23
  //# sourceMappingURL=fetch-security-principal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-security-principal.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-security-principal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAGnE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACzD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,+BAA+B,CAAC,CAE1C"}
1
+ {"version":3,"file":"fetch-security-principal.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-security-principal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAGnE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACzD,MAAM,CAAC,EAAE,WAAW,EACpB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,+BAA+B,CAAC,CAE1C"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Article } from "../../types";
2
3
  /**
3
4
  * Fetches similar documents based on the provided document ID and query name.
@@ -7,5 +8,5 @@ import { Article } from "../../types";
7
8
  * @param AbortSignal signal - An optional AbortSignal to cancel the request.
8
9
  * @returns Article[] Document list detected as similar.
9
10
  */
10
- export declare function fetchSimilarDocuments(documentId: string, queryName: string, signal?: AbortSignal): Promise<Article[]>;
11
+ export declare function fetchSimilarDocuments(documentId: string, queryName: string, signal?: AbortSignal, ctx?: AtomicContext): Promise<Article[]>;
11
12
  //# sourceMappingURL=fetch-similar-documents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-similar-documents.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-similar-documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,WAAW,sBAgBrB"}
1
+ {"version":3,"file":"fetch-similar-documents.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-similar-documents.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,WAAW,EACpB,GAAG,GAAE,aAA8B,sBAepC"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { LinkResult, Query } from "../../types";
2
3
  /**
3
4
  * Fetches sponsored links based on the provided webservice and query.
@@ -10,5 +11,5 @@ import { LinkResult, Query } from "../../types";
10
11
  * @returns A promise that resolves to an array of LinkResult objects, each
11
12
  * representing a sponsored link with the original query attached.
12
13
  */
13
- export declare function fetchSponsoredLinks(webservice: string, query: Query): Promise<LinkResult[]>;
14
+ export declare function fetchSponsoredLinks(webservice: string, query: Query, ctx?: AtomicContext): Promise<LinkResult[]>;
14
15
  //# sourceMappingURL=fetch-sponsored-links.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-sponsored-links.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-sponsored-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,KAAK,EAAE,MAAM,aAAa,CAAC;AAG9D;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,UAAU,EAAE,CAAC,CAQvB"}
1
+ {"version":3,"file":"fetch-sponsored-links.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-sponsored-links.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,UAAU,EAAgB,KAAK,EAAE,MAAM,aAAa,CAAC;AAG9D;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC,CAYvB"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Query, Suggestion } from "../../types";
2
3
  /**
3
4
  * Fetches suggestions based on the provided parameters.
@@ -26,7 +27,7 @@ import { Query, Suggestion } from "../../types";
26
27
  * @param showSource - Optional flag, when set to true, returns the name of the index column from which the suggested term is extracted.
27
28
  * @returns A promise that resolves to an array of suggestions.
28
29
  */
29
- export declare function fetchSuggest(suggestQueryName: string, text: string, filter?: Record<string, unknown>, kinds?: string[], showSource?: boolean): Promise<Suggestion[]>;
30
+ export declare function fetchSuggest(suggestQueryName: string, text: string, filter?: Record<string, unknown>, kinds?: string[], showSource?: boolean, ctx?: AtomicContext): Promise<Suggestion[]>;
30
31
  /**
31
32
  * @deprecated Use fetchSuggest instead.
32
33
  *
@@ -41,7 +42,7 @@ export declare function fetchSuggest(suggestQueryName: string, text: string, fil
41
42
  * @example "kinds": ["city", "name"]
42
43
  * @returns A promise that resolves to an array of suggestions.
43
44
  */
44
- export declare function fetchSuggestQuery(suggestQueryName: string, text: string, queryName: string, fields?: string | string[]): Promise<Suggestion[]>;
45
+ export declare function fetchSuggestQuery(suggestQueryName: string, text: string, queryName: string, fields?: string | string[], ctx?: AtomicContext): Promise<Suggestion[]>;
45
46
  /**
46
47
  * Fetches suggestions for a specific field.
47
48
  *
@@ -51,5 +52,5 @@ export declare function fetchSuggestQuery(suggestQueryName: string, text: string
51
52
  *
52
53
  * @returns A promise that resolves to an array of suggestions.
53
54
  */
54
- export declare function fetchSuggestField(text: string, fields: string[], query?: Query): Promise<Suggestion[]>;
55
+ export declare function fetchSuggestField(text: string, fields: string[], query?: Query, ctx?: AtomicContext): Promise<Suggestion[]>;
55
56
  //# sourceMappingURL=fetch-suggest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-suggest.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-suggest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAChC,gBAAgB,EAAE,MAAM,EACxB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,UAAU,CAAC,EAAE,OAAO,GACnB,OAAO,CAAC,UAAU,EAAE,CAAC,CAqBvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,EACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GACzB,OAAO,CAAC,UAAU,EAAE,CAAC,CAevB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,CAAC,EAAE,KAAK,GACZ,OAAO,CAAC,UAAU,EAAE,CAAC,CAmBvB"}
1
+ {"version":3,"file":"fetch-suggest.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAChC,gBAAgB,EAAE,MAAM,EACxB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,UAAU,CAAC,EAAE,OAAO,EACpB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC,CAsBvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,EACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC,CAgBvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,CAAC,EAAE,KAAK,EACb,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC,CAoBvB"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { Query, TextChunk, TextLocation } from "../../types";
2
3
  /**
3
4
  * Fetches text chunks from a document based on specified parameters.
@@ -10,7 +11,7 @@ import { Query, TextChunk, TextLocation } from "../../types";
10
11
  * @param rightSentencesCount - The number of sentences to include after each chunk.
11
12
  * @returns A Promise that resolves to an object containing an array of TextChunk objects.
12
13
  */
13
- export declare function fetchTextChunks(id: string, textChunks: TextLocation[], highlights: string[], query: Query, leftSentencesCount: number, rightSentencesCount: number): Promise<{
14
+ export declare function fetchTextChunks(id: string, textChunks: TextLocation[], highlights: string[], query: Query, leftSentencesCount: number, rightSentencesCount: number, ctx?: AtomicContext): Promise<{
14
15
  chunks: TextChunk[];
15
16
  }>;
16
17
  //# sourceMappingURL=fetch-text-chunk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-text-chunk.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-text-chunk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG7D;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,YAAY,EAAE,EAC1B,UAAU,EAAE,MAAM,EAAE,EACpB,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,MAAM,EAC1B,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,CAWlC"}
1
+ {"version":3,"file":"fetch-text-chunk.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-text-chunk.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG7D;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,YAAY,EAAE,EAC1B,UAAU,EAAE,MAAM,EAAE,EACpB,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,MAAM,EAC1B,mBAAmB,EAAE,MAAM,EAC3B,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,CAWlC"}
@@ -1,28 +1,29 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import { AuditEvents } from "../../types";
2
3
  /**
3
4
  * Fetches the user settings from the backend API.
4
5
  * @returns A promise that resolves to the user settings.
5
6
  */
6
- export declare function fetchUserSettings<T>(): Promise<T>;
7
+ export declare function fetchUserSettings<T>(ctx?: AtomicContext): Promise<T>;
7
8
  /**
8
9
  * Saves the user settings to the backend API.
9
10
  * @param userSettings - The user settings to be saved.
10
11
  * @param audit - Optional audit event to be recorded with the save action.
11
12
  * @returns A promise that resolves when the settings are saved successfully.
12
13
  */
13
- export declare function saveUserSettings<T>(userSettings: T, audit?: AuditEvents): Promise<void>;
14
+ export declare function saveUserSettings<T>(userSettings: T, audit?: AuditEvents, ctx?: AtomicContext): Promise<void>;
14
15
  /**
15
16
  * Patches the user settings in the backend API.
16
17
  * @param userSettings - Partial user settings to be patched.
17
18
  * @param audit - Optional audit event to be recorded with the patch action.
18
19
  * @returns A promise that resolves to the updated user settings.
19
20
  */
20
- export declare function patchUserSettings<T>(userSettings: Partial<T>, audit?: AuditEvents): Promise<T>;
21
+ export declare function patchUserSettings<T>(userSettings: Partial<T>, audit?: AuditEvents, ctx?: AtomicContext): Promise<T>;
21
22
  /**
22
23
  * Deletes all user settings by saving an empty object.
23
24
  * This effectively resets the user settings to their default state.
24
25
  *
25
26
  * @returns A promise that resolves when the settings are successfully deleted.
26
27
  */
27
- export declare function deleteUserSettings(): Promise<void>;
28
+ export declare function deleteUserSettings(ctx?: AtomicContext): Promise<void>;
28
29
  //# sourceMappingURL=fetch-user-settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-user-settings.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-user-settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAQvD;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,YAAY,EAAE,CAAC,EACf,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,EACxB,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,CAAC,CAAC,CAYZ;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAExD"}
1
+ {"version":3,"file":"fetch-user-settings.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-user-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,YAAY,EAAE,CAAC,EACf,KAAK,CAAC,EAAE,WAAW,EACnB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,EACxB,KAAK,CAAC,EAAE,WAAW,EACnB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,CAAC,CAAC,CAYZ;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  export type ChangePasswordResponse = {
2
3
  success: boolean;
3
4
  message?: string;
@@ -10,5 +11,5 @@ export type ChangePasswordResponse = {
10
11
  * @throws UnauthorizedError When the backend returns 401 (invalid current password / unauthorized).
11
12
  * @throws ApiError For any other HTTP or transport error.
12
13
  */
13
- export declare function fetchChangePassword(newPassword: string, currentPassword?: string): Promise<ChangePasswordResponse>;
14
+ export declare function fetchChangePassword(newPassword: string, currentPassword?: string, ctx?: AtomicContext): Promise<ChangePasswordResponse>;
14
15
  //# sourceMappingURL=fetch-change-password.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-change-password.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-change-password.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,sBAAsB,CAAC,CAMjC"}
1
+ {"version":3,"file":"fetch-change-password.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-change-password.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,EACxB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAMjC"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
1
2
  import type { Container, ContainerDocumentListResponse, ContainerListResponse } from "../../types";
2
3
  /**
3
4
  * Lists document-upload containers, paginated.
@@ -7,13 +8,13 @@ import type { Container, ContainerDocumentListResponse, ContainerListResponse }
7
8
  export declare function listContainers(params?: {
8
9
  page?: number;
9
10
  pageSize?: number;
10
- }): Promise<ContainerListResponse>;
11
+ }, ctx?: AtomicContext): Promise<ContainerListResponse>;
11
12
  /**
12
13
  * Fetches a single container by id.
13
14
  *
14
15
  * @param id - The container id.
15
16
  */
16
- export declare function getContainer(id: string): Promise<Container>;
17
+ export declare function getContainer(id: string, ctx?: AtomicContext): Promise<Container>;
17
18
  export interface CreateContainerInput {
18
19
  name: string;
19
20
  description?: string;
@@ -24,7 +25,7 @@ export interface CreateContainerInput {
24
25
  /**
25
26
  * Creates a new document-upload container.
26
27
  */
27
- export declare function createContainer(body: CreateContainerInput): Promise<Container>;
28
+ export declare function createContainer(body: CreateContainerInput, ctx?: AtomicContext): Promise<Container>;
28
29
  export interface UpdateContainerInput {
29
30
  name?: string;
30
31
  description?: string;
@@ -42,7 +43,7 @@ export interface UpdateContainerInput {
42
43
  * @throws {@link ApiError} with `status === 409` if an upload/indexing job is
43
44
  * currently active on this container (`container_locked`).
44
45
  */
45
- export declare function updateContainer(id: string, patch: UpdateContainerInput): Promise<Container>;
46
+ export declare function updateContainer(id: string, patch: UpdateContainerInput, ctx?: AtomicContext): Promise<Container>;
46
47
  export interface DeleteContainersResult {
47
48
  succeeded: string[];
48
49
  failed: {
@@ -58,7 +59,7 @@ export interface DeleteContainersResult {
58
59
  * @returns Which ids succeeded vs. failed (e.g. a locked container blocks its
59
60
  * own deletion without failing the rest of the batch).
60
61
  */
61
- export declare function deleteContainers(containerIds: string[]): Promise<DeleteContainersResult>;
62
+ export declare function deleteContainers(containerIds: string[], ctx?: AtomicContext): Promise<DeleteContainersResult>;
62
63
  /**
63
64
  * Lists the documents inside a container, paginated.
64
65
  *
@@ -68,7 +69,7 @@ export declare function deleteContainers(containerIds: string[]): Promise<Delete
68
69
  export declare function listContainerDocuments(id: string, params?: {
69
70
  page?: number;
70
71
  pageSize?: number;
71
- }): Promise<ContainerDocumentListResponse>;
72
+ }, ctx?: AtomicContext): Promise<ContainerDocumentListResponse>;
72
73
  /**
73
74
  * Deletes documents from a container by id.
74
75
  *
@@ -78,5 +79,5 @@ export declare function listContainerDocuments(id: string, params?: {
78
79
  * currently active on this container (`container_locked`), same as
79
80
  * {@link updateContainer}.
80
81
  */
81
- export declare function deleteContainerDocuments(id: string, fileIds: string[]): Promise<void>;
82
+ export declare function deleteContainerDocuments(id: string, fileIds: string[], ctx?: AtomicContext): Promise<void>;
82
83
  //# sourceMappingURL=fetch-document-upload-container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-document-upload-container.d.ts","sourceRoot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,CAAC;CAClD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,sBAAsB,CAAC,CAUjC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,MAAM,EACV,MAAM,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAChD,OAAO,CAAC,6BAA6B,CAAC,CAExC;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,IAAI,CAAC,CAIf"}
1
+ {"version":3,"file":"fetch-document-upload-container.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-document-upload-container.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,SAAS,EACT,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAmBrB;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,EACjD,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,qBAAqB,CAAC,CAEhC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,EACV,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;A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