@sinequa/atomic 2.1.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 (186) 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/api-endpoints.d.ts +1 -1
  89. package/dist/types/api-endpoints.d.ts.map +1 -1
  90. package/dist/types/document-upload/container-document.d.ts +22 -0
  91. package/dist/types/document-upload/container-document.d.ts.map +1 -0
  92. package/dist/types/document-upload/container.d.ts +31 -0
  93. package/dist/types/document-upload/container.d.ts.map +1 -0
  94. package/dist/types/document-upload/index.d.ts +3 -0
  95. package/dist/types/document-upload/index.d.ts.map +1 -0
  96. package/dist/types/index.d.ts +2 -0
  97. package/dist/types/index.d.ts.map +1 -1
  98. package/dist/types/search/Result.d.ts +36 -2
  99. package/dist/types/search/Result.d.ts.map +1 -1
  100. package/dist/types/search/index.d.ts +1 -1
  101. package/dist/types/search/index.d.ts.map +1 -1
  102. package/dist/types/security-principal/index.d.ts +2 -0
  103. package/dist/types/security-principal/index.d.ts.map +1 -0
  104. package/dist/types/security-principal/security-principal.d.ts +25 -0
  105. package/dist/types/security-principal/security-principal.d.ts.map +1 -0
  106. package/dist/utils/logger.d.ts +27 -16
  107. package/dist/utils/logger.d.ts.map +1 -1
  108. package/dist/web-api/helpers/aad-http-client-manager.d.ts +8 -0
  109. package/dist/web-api/helpers/aad-http-client-manager.d.ts.map +1 -1
  110. package/dist/web-api/helpers/create-headers.d.ts +9 -0
  111. package/dist/web-api/helpers/create-headers.d.ts.map +1 -1
  112. package/dist/web-api/helpers/errors/api-error.d.ts.map +1 -1
  113. package/dist/web-api/helpers/handle-response.d.ts +17 -1
  114. package/dist/web-api/helpers/handle-response.d.ts.map +1 -1
  115. package/dist/web-api/helpers/index.d.ts +1 -1
  116. package/dist/web-api/helpers/index.d.ts.map +1 -1
  117. package/dist/web-api/helpers/methods/del.d.ts +13 -11
  118. package/dist/web-api/helpers/methods/del.d.ts.map +1 -1
  119. package/dist/web-api/helpers/methods/get.d.ts +6 -12
  120. package/dist/web-api/helpers/methods/get.d.ts.map +1 -1
  121. package/dist/web-api/helpers/methods/patch.d.ts +6 -7
  122. package/dist/web-api/helpers/methods/patch.d.ts.map +1 -1
  123. package/dist/web-api/helpers/methods/post.d.ts +6 -8
  124. package/dist/web-api/helpers/methods/post.d.ts.map +1 -1
  125. package/dist/web-api/helpers/methods/put.d.ts +6 -7
  126. package/dist/web-api/helpers/methods/put.d.ts.map +1 -1
  127. package/dist/web-api/helpers/methods/send-request.d.ts +24 -0
  128. package/dist/web-api/helpers/methods/send-request.d.ts.map +1 -0
  129. package/dist/web-api/helpers/request-options.d.ts +35 -12
  130. package/dist/web-api/helpers/request-options.d.ts.map +1 -1
  131. package/dist/web-api/helpers/utils/build-request-url.d.ts +12 -0
  132. package/dist/web-api/helpers/utils/build-request-url.d.ts.map +1 -0
  133. package/dist/web-api/helpers/utils/{date-utils..d.ts → date-utils.d.ts} +1 -1
  134. package/dist/web-api/helpers/utils/date-utils.d.ts.map +1 -0
  135. package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts +9 -0
  136. package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts.map +1 -1
  137. package/dist/web-api/helpers/utils/with-retry.d.ts +10 -5
  138. package/dist/web-api/helpers/utils/with-retry.d.ts.map +1 -1
  139. package/dist/web-api/index.d.ts +2 -0
  140. package/dist/web-api/index.d.ts.map +1 -1
  141. package/dist/web-api/v1/fetch-aggregation.d.ts +2 -1
  142. package/dist/web-api/v1/fetch-aggregation.d.ts.map +1 -1
  143. package/dist/web-api/v1/fetch-app.d.ts +12 -5
  144. package/dist/web-api/v1/fetch-app.d.ts.map +1 -1
  145. package/dist/web-api/v1/fetch-audit.d.ts +2 -1
  146. package/dist/web-api/v1/fetch-audit.d.ts.map +1 -1
  147. package/dist/web-api/v1/fetch-dataset.d.ts +4 -3
  148. package/dist/web-api/v1/fetch-dataset.d.ts.map +1 -1
  149. package/dist/web-api/v1/fetch-labels.d.ts +9 -8
  150. package/dist/web-api/v1/fetch-labels.d.ts.map +1 -1
  151. package/dist/web-api/v1/fetch-preview.d.ts +2 -1
  152. package/dist/web-api/v1/fetch-preview.d.ts.map +1 -1
  153. package/dist/web-api/v1/fetch-principal.d.ts +8 -4
  154. package/dist/web-api/v1/fetch-principal.d.ts.map +1 -1
  155. package/dist/web-api/v1/fetch-query-export.d.ts +2 -1
  156. package/dist/web-api/v1/fetch-query-export.d.ts.map +1 -1
  157. package/dist/web-api/v1/fetch-query-intent.d.ts +2 -1
  158. package/dist/web-api/v1/fetch-query-intent.d.ts.map +1 -1
  159. package/dist/web-api/v1/fetch-query.d.ts +3 -2
  160. package/dist/web-api/v1/fetch-query.d.ts.map +1 -1
  161. package/dist/web-api/v1/fetch-security-principal.d.ts +23 -0
  162. package/dist/web-api/v1/fetch-security-principal.d.ts.map +1 -0
  163. package/dist/web-api/v1/fetch-similar-documents.d.ts +2 -1
  164. package/dist/web-api/v1/fetch-similar-documents.d.ts.map +1 -1
  165. package/dist/web-api/v1/fetch-sponsored-links.d.ts +2 -1
  166. package/dist/web-api/v1/fetch-sponsored-links.d.ts.map +1 -1
  167. package/dist/web-api/v1/fetch-suggest.d.ts +4 -3
  168. package/dist/web-api/v1/fetch-suggest.d.ts.map +1 -1
  169. package/dist/web-api/v1/fetch-text-chunk.d.ts +2 -1
  170. package/dist/web-api/v1/fetch-text-chunk.d.ts.map +1 -1
  171. package/dist/web-api/v1/fetch-user-settings.d.ts +5 -4
  172. package/dist/web-api/v1/fetch-user-settings.d.ts.map +1 -1
  173. package/dist/web-api/v2/fetch-change-password.d.ts +2 -1
  174. package/dist/web-api/v2/fetch-change-password.d.ts.map +1 -1
  175. package/dist/web-api/v2/fetch-document-upload-container.d.ts +83 -0
  176. package/dist/web-api/v2/fetch-document-upload-container.d.ts.map +1 -0
  177. package/dist/web-api/v2/fetch-forgot-password.d.ts +2 -1
  178. package/dist/web-api/v2/fetch-forgot-password.d.ts.map +1 -1
  179. package/dist/web-api/v2/fetch-user-profile.d.ts +5 -4
  180. package/dist/web-api/v2/fetch-user-profile.d.ts.map +1 -1
  181. package/dist/web-api/v2/fetch-version.d.ts +2 -1
  182. package/dist/web-api/v2/fetch-version.d.ts.map +1 -1
  183. package/package.json +10 -7
  184. package/dist/src-C3yJArxW.js +0 -1886
  185. package/dist/src-CGNARSYI.cjs +0 -1
  186. package/dist/web-api/helpers/utils/date-utils..d.ts.map +0 -1
@@ -0,0 +1,24 @@
1
+ import { type AtomicContext } from "../../../client/atomic-context";
2
+ import type { RequestOptions } from "../request-options";
3
+ /**
4
+ * Issues the request on the context's transport — its `HttpAdapter` when one is configured (SPFx),
5
+ * the resolved `fetch` otherwise — and hands the response to `handleResponse`.
6
+ *
7
+ * On a 401, the configured {@link AuthOptions.recoverFromUnauthorized} hook gets one chance to
8
+ * re-establish the session; if it succeeds the request is replayed **once**, with the refreshed
9
+ * CSRF token. Without a hook — or with {@link RequestOptions.noRecovery} — the `UnauthorizedError`
10
+ * propagates unchanged.
11
+ *
12
+ * Centralising this removes the transport branch that used to be copy-pasted in the five verbs.
13
+ */
14
+ export declare function sendRequest<T>(ctx: AtomicContext, url: string, init: {
15
+ method: string;
16
+ headers: Headers;
17
+ body?: string;
18
+ }, options?: RequestOptions): Promise<T>;
19
+ /**
20
+ * Builds the JSON body shared by `post`, `put`, `patch` and `del`: the caller's payload plus the
21
+ * `app`/`locale` context and the two server flags.
22
+ */
23
+ export declare function buildJsonBody(ctx: AtomicContext, body: Record<string, unknown>, options?: RequestOptions): string;
24
+ //# sourceMappingURL=send-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-request.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/send-request.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAiEzD;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAAC,CAAC,EACjC,GAAG,EAAE,aAAa,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CA0BZ;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,MAAM,CAoBR"}
@@ -1,18 +1,41 @@
1
1
  /**
2
- * Type définissant les options avancées pour les requêtes HTTP
2
+ * Options accepted by every HTTP helper (`get`, `post`, `put`, `patch`, `del`).
3
+ *
4
+ * All fields are optional, and the set is the same across methods — a request built for one verb
5
+ * can be moved to another without rewriting its options.
3
6
  */
4
7
  export interface RequestOptions {
5
- /** Headers personnalisés à inclure dans la requête */
8
+ /** Extra headers to merge into the request. */
6
9
  headers?: Headers;
7
- /** Type de réponse attendu */
8
- responseType?: "arraybuffer" | "blob" | "json" | "text";
9
- /** Temps maximum d'attente avant expiration de la requête (en ms) */
10
- timeout?: number;
11
- /** Signal pour annuler la requête */
12
- abortSignal?: AbortSignal;
13
- /** Nombre maximum de tentatives en cas d'échec */
14
- maxRetries?: number;
15
- /** Délai entre les tentatives (en ms) */
16
- retryDelay?: number;
10
+ /**
11
+ * Expected shape of the response body. Defaults to `"json"`.
12
+ *
13
+ * `"response"` hands back the raw response instead of a parsed body, for the callers that need
14
+ * its headers or status — a download reading `content-disposition`, for instance.
15
+ */
16
+ responseType?: "arraybuffer" | "blob" | "json" | "text" | "response";
17
+ /** Signal used to abort the request (see `createTimeoutController`). */
18
+ signal?: AbortSignal;
19
+ /**
20
+ * How to handle a redirect response. Defaults to the browser's `follow`; pass `"manual"` to avoid
21
+ * following a cross-origin redirect (e.g. an auth challenge to an IdP), which would otherwise
22
+ * surface as a CORS network error.
23
+ */
24
+ redirect?: RequestRedirect;
25
+ /**
26
+ * Overrides the `noAutoAuthentication` flag sent to the server, which otherwise follows the
27
+ * resolved auth mode (see `resolveNoAutoAuthentication`): `false` in `sso`, so the server can
28
+ * replay its challenge, `true` everywhere else.
29
+ */
30
+ noAutoAuthentication?: boolean;
31
+ /**
32
+ * Keeps a `401` on this request from triggering {@link AuthOptions.recoverFromUnauthorized}.
33
+ *
34
+ * Set it on every request that is **part of** establishing a session — a sign-in, a session
35
+ * probe, a logout. Their `401` is an answer, not a session loss, and asking for the session to be
36
+ * re-established from inside the very procedure that establishes it makes that procedure wait on
37
+ * itself: the recovery hook never returns, and nothing ever rejects.
38
+ */
39
+ noRecovery?: boolean;
17
40
  }
18
41
  //# sourceMappingURL=request-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request-options.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/request-options.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACxD,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"request-options.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/request-options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;IACrE,wEAAwE;IACxE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -0,0 +1,12 @@
1
+ import type { AtomicContext } from "../../../client/atomic-context";
2
+ import type { API_ENDPOINTS } from "../../../types";
3
+ /**
4
+ * Builds the absolute request URL for an endpoint.
5
+ *
6
+ * Endpoints starting with `plugin` get the `api/v1/` prefix (assistant component v3.9.5) — that
7
+ * rule used to be duplicated in `get`/`post` and simply missing from `put`/`patch`/`del`. When no
8
+ * `backendUrl` is configured the endpoint stays relative, so the request targets the current origin
9
+ * instead of `undefined/api/...`.
10
+ */
11
+ export declare function buildRequestUrl(ctx: AtomicContext, endpoint: API_ENDPOINTS, params?: URLSearchParams): string;
12
+ //# sourceMappingURL=build-request-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-request-url.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/utils/build-request-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,aAAa,EACvB,MAAM,CAAC,EAAE,eAAe,GACvB,MAAM,CAQR"}
@@ -11,4 +11,4 @@ export declare function toDate(iso?: string): Date | undefined;
11
11
  export declare function isExpired(iso?: string): boolean;
12
12
  /** Returns true if the given ISO date is within the next N days. */
13
13
  export declare function expiresSoon(iso?: string, days?: number): boolean;
14
- //# sourceMappingURL=date-utils..d.ts.map
14
+ //# sourceMappingURL=date-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/utils/date-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,kDAAkD;AAClD,wBAAgB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAKrD;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAG/C;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,SAAI,GAAG,OAAO,CAS3D"}
@@ -1,3 +1,4 @@
1
+ import { type AtomicContext } from "../../../client/atomic-context";
1
2
  /**
2
3
  * Resolves the `noAutoAuthentication` flag sent on data requests.
3
4
  *
@@ -12,5 +13,13 @@
12
13
  *
13
14
  * @returns `false` in `sso` mode (let the server auto-authenticate), `true` otherwise.
14
15
  */
16
+ export declare function resolveNoAutoAuthenticationWithContext(ctx: AtomicContext): boolean;
17
+ /**
18
+ * @returns `false` in `sso` mode (let the server auto-authenticate), `true` otherwise.
19
+ *
20
+ * @deprecated Implementation detail of the HTTP helpers, which already apply it to every request.
21
+ * To override the flag on a single call, pass `noAutoAuthentication` in the request options instead.
22
+ * It will stop being exported in the next major.
23
+ */
15
24
  export declare function resolveNoAutoAuthentication(): boolean;
16
25
  //# sourceMappingURL=resolve-no-auto-authentication.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-no-auto-authentication.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/utils/resolve-no-auto-authentication.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAErD"}
1
+ {"version":3,"file":"resolve-no-auto-authentication.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/utils/resolve-no-auto-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sCAAsC,CACpD,GAAG,EAAE,aAAa,GACjB,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAErD"}
@@ -1,9 +1,14 @@
1
1
  /**
2
- * Fonction utilitaire pour effectuer des requêtes avec retry
3
- * @param fetchFn - Fonction qui exécute la requête fetch
4
- * @param maxRetries - Nombre maximum de tentatives
5
- * @param retryDelay - Délai entre les tentatives (en ms)
6
- * @returns Résultat de la requête
2
+ * Retries a request until it succeeds or the attempts run out. 4xx responses (except 429) and
3
+ * aborted requests are never retried.
4
+ *
5
+ * @param fetchFn - Function performing the request.
6
+ * @param maxRetries - Maximum number of retries.
7
+ * @param retryDelay - Delay between attempts, in ms.
8
+ * @returns The result of the request.
9
+ *
10
+ * @deprecated Never wired into the HTTP helpers, and unused since it was introduced. It will be
11
+ * removed in the next major; copy it into your application if you rely on it.
7
12
  */
8
13
  export declare function withRetry<T>(fetchFn: () => Promise<T>, maxRetries?: number, retryDelay?: number): Promise<T>;
9
14
  //# sourceMappingURL=with-retry.d.ts.map
@@ -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"}
@@ -9,12 +9,14 @@ export * from "./v1/fetch-principal";
9
9
  export * from "./v1/fetch-query";
10
10
  export * from "./v1/fetch-query-export";
11
11
  export * from "./v1/fetch-query-intent";
12
+ export * from "./v1/fetch-security-principal";
12
13
  export * from "./v1/fetch-similar-documents";
13
14
  export * from "./v1/fetch-sponsored-links";
14
15
  export * from "./v1/fetch-suggest";
15
16
  export * from "./v1/fetch-text-chunk";
16
17
  export * from "./v1/fetch-user-settings";
17
18
  export * from "./v2/fetch-change-password";
19
+ export * from "./v2/fetch-document-upload-container";
18
20
  export * from "./v2/fetch-forgot-password";
19
21
  export * from "./v2/fetch-user-profile";
20
22
  export * from "./v2/fetch-version";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
@@ -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,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAChD,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAUrB;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAK/B"}
1
+ {"version":3,"file":"fetch-dataset.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,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,EACf,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,CAAC,CAAC,CAcZ;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAC3D,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,EACjD,GAAG,GAAE,aAA8B,GAClC,OAAO,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,EACZ,UAAU,GAAE,OAAc,iBAuB3B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAC"}
1
+ {"version":3,"file":"fetch-labels.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAkB,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKlE;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,OAAc,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,GAAG,GAAE,aAA8B,qBAqBpC;AAED;;;;;;;;GAQG;AACH,iBAAe,aAAa,CAAC,GAAG,GAAE,aAA8B,yBAa/D;AAED;;;;;;;GAOG;AACH,iBAAe,GAAG,CAChB,MAAM,EAAE,MAAM,EAAE,EAChB,GAAG,EAAE,MAAM,EAAE,EACb,UAAU,GAAE,OAAc,EAC1B,GAAG,GAAE,aAA8B,iBAiCpC;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CACnB,MAAM,EAAE,MAAM,EAAE,EAChB,GAAG,EAAE,MAAM,EAAE,EACb,UAAU,GAAE,OAAc,EAC1B,GAAG,GAAE,aAA8B,iBAiCpC;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CACnB,MAAM,EAAE,MAAM,EAAE,EAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,GAAE,OAAc,EAC1B,GAAG,GAAE,aAA8B,iBAuBpC;AAED;;;;;;GAMG;AACH,iBAAe,YAAY,CACzB,MAAM,EAAE,MAAM,EAAE,EAChB,UAAU,GAAE,OAAc,EAC1B,GAAG,GAAE,aAA8B,iBAqBpC;AAED;;;;;;;GAOG;AACH,iBAAe,OAAO,CACpB,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,EAAE,KAAK,EACZ,UAAU,GAAE,OAAc,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"}
@@ -0,0 +1,23 @@
1
+ import { type AtomicContext } from "../../client/atomic-context";
2
+ import type { SecurityPrincipalSearchResponse } from "../../types";
3
+ /**
4
+ * Searches Sinequa principals (users/groups) by free text, via the
5
+ * `security.principal` endpoint — search-as-you-type for assigning access
6
+ * (e.g. owners/readers) to a resource. Distinct from `fetchPrincipalList()`
7
+ * (`api/v1/principal/list`): same idea, different endpoint/response shape.
8
+ *
9
+ * @param params - `offset`/`limit` (pagination) and `search` (free-text query).
10
+ * @param signal - Optional AbortSignal to cancel an in-flight request (e.g.
11
+ * a stale keystroke in a debounced search box).
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const results = await searchPrincipals({ offset: 0, limit: 20, search: "john" });
16
+ * ```
17
+ */
18
+ export declare function searchPrincipals(params: {
19
+ offset: number;
20
+ limit: number;
21
+ search: string;
22
+ }, signal?: AbortSignal, ctx?: AtomicContext): Promise<SecurityPrincipalSearchResponse>;
23
+ //# sourceMappingURL=fetch-security-principal.d.ts.map
@@ -0,0 +1 @@
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"}