@sinequa/atomic 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/dist/atomic.cjs +1 -1
- package/dist/atomic.js +2 -2
- package/dist/authentication/constants.d.ts +20 -0
- package/dist/authentication/constants.d.ts.map +1 -1
- package/dist/authentication/events/auth-events.d.ts +71 -0
- package/dist/authentication/events/auth-events.d.ts.map +1 -0
- package/dist/authentication/events/emit-authenticated-event.d.ts +9 -0
- package/dist/authentication/events/emit-authenticated-event.d.ts.map +1 -1
- package/dist/authentication/events/index.d.ts +1 -0
- package/dist/authentication/events/index.d.ts.map +1 -1
- package/dist/authentication/index.d.ts +3 -3
- package/dist/authentication/index.d.ts.map +1 -1
- package/dist/authentication/providers/oauth-authentication.d.ts +10 -1
- package/dist/authentication/providers/oauth-authentication.d.ts.map +1 -1
- package/dist/authentication/providers/redirect-to-identity-provider.d.ts +34 -0
- package/dist/authentication/providers/redirect-to-identity-provider.d.ts.map +1 -0
- package/dist/authentication/providers/saml-authentication.d.ts +10 -1
- package/dist/authentication/providers/saml-authentication.d.ts.map +1 -1
- package/dist/authentication/session/auth-mode-marker.d.ts +7 -0
- package/dist/authentication/session/auth-mode-marker.d.ts.map +1 -1
- package/dist/authentication/session/auth-state.d.ts +6 -1
- package/dist/authentication/session/auth-state.d.ts.map +1 -1
- package/dist/authentication/session/detect-auth-mode.d.ts +2 -1
- package/dist/authentication/session/detect-auth-mode.d.ts.map +1 -1
- package/dist/authentication/session/has-session.d.ts +26 -0
- package/dist/authentication/session/has-session.d.ts.map +1 -0
- package/dist/authentication/session/index.d.ts +2 -0
- package/dist/authentication/session/index.d.ts.map +1 -1
- package/dist/authentication/session/login.d.ts +15 -8
- package/dist/authentication/session/login.d.ts.map +1 -1
- package/dist/authentication/session/logout.d.ts +13 -2
- package/dist/authentication/session/logout.d.ts.map +1 -1
- package/dist/authentication/session/redirect-guard.d.ts +18 -0
- package/dist/authentication/session/redirect-guard.d.ts.map +1 -0
- package/dist/authentication/session/try-auto-authentication.d.ts +14 -6
- package/dist/authentication/session/try-auto-authentication.d.ts.map +1 -1
- package/dist/authentication/session/user-authentication.d.ts +7 -2
- package/dist/authentication/session/user-authentication.d.ts.map +1 -1
- package/dist/authentication/tokens/delete-web-token-cookie.d.ts +10 -5
- package/dist/authentication/tokens/delete-web-token-cookie.d.ts.map +1 -1
- package/dist/authentication/tokens/get-csrf-token.d.ts +4 -1
- package/dist/authentication/tokens/get-csrf-token.d.ts.map +1 -1
- package/dist/authentication/tokens/get-jwt-token.d.ts +35 -5
- package/dist/authentication/tokens/get-jwt-token.d.ts.map +1 -1
- package/dist/authentication/tokens/get-token.d.ts +7 -1
- package/dist/authentication/tokens/get-token.d.ts.map +1 -1
- package/dist/authentication/tokens/index.d.ts +1 -1
- package/dist/authentication/tokens/index.d.ts.map +1 -1
- package/dist/authentication/tokens/set-token.d.ts +7 -1
- package/dist/authentication/tokens/set-token.d.ts.map +1 -1
- package/dist/client/atomic-context.d.ts +61 -0
- package/dist/client/atomic-context.d.ts.map +1 -0
- package/dist/client/create-api.d.ts +109 -0
- package/dist/client/create-api.d.ts.map +1 -0
- package/dist/client/create-atomic-client.d.ts +138 -0
- package/dist/client/create-atomic-client.d.ts.map +1 -0
- package/dist/client/http-adapter.d.ts +30 -0
- package/dist/client/http-adapter.d.ts.map +1 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/configurations/auth-mode.d.ts +64 -3
- package/dist/configurations/auth-mode.d.ts.map +1 -1
- package/dist/configurations/auth-options.d.ts +78 -0
- package/dist/configurations/auth-options.d.ts.map +1 -0
- package/dist/configurations/global.config.d.ts +23 -3
- package/dist/configurations/global.config.d.ts.map +1 -1
- package/dist/configurations/index.d.ts +1 -0
- package/dist/configurations/index.d.ts.map +1 -1
- package/dist/helpers/filters.d.ts +24 -0
- package/dist/helpers/filters.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/pagination.d.ts +23 -0
- package/dist/helpers/pagination.d.ts.map +1 -0
- package/dist/helpers/ts-helper.d.ts +6 -0
- package/dist/helpers/ts-helper.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/polyfills/storage.d.ts +12 -3
- package/dist/polyfills/storage.d.ts.map +1 -1
- package/dist/spfx/index.cjs +1 -1
- package/dist/spfx/index.d.ts +1 -0
- package/dist/spfx/index.d.ts.map +1 -1
- package/dist/spfx/index.js +2 -2
- package/dist/src-BzPBKdDO.js +2201 -0
- package/dist/src-DeaVS0Tt.cjs +1 -0
- package/dist/types/search/Result.d.ts +36 -2
- package/dist/types/search/Result.d.ts.map +1 -1
- package/dist/types/search/index.d.ts +1 -1
- package/dist/types/search/index.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +27 -16
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/web-api/helpers/aad-http-client-manager.d.ts +8 -0
- package/dist/web-api/helpers/aad-http-client-manager.d.ts.map +1 -1
- package/dist/web-api/helpers/create-headers.d.ts +9 -0
- package/dist/web-api/helpers/create-headers.d.ts.map +1 -1
- package/dist/web-api/helpers/errors/api-error.d.ts.map +1 -1
- package/dist/web-api/helpers/handle-response.d.ts +17 -1
- package/dist/web-api/helpers/handle-response.d.ts.map +1 -1
- package/dist/web-api/helpers/index.d.ts +1 -1
- package/dist/web-api/helpers/index.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/del.d.ts +13 -11
- package/dist/web-api/helpers/methods/del.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/get.d.ts +6 -12
- package/dist/web-api/helpers/methods/get.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/patch.d.ts +6 -7
- package/dist/web-api/helpers/methods/patch.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/post.d.ts +6 -8
- package/dist/web-api/helpers/methods/post.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/put.d.ts +6 -7
- package/dist/web-api/helpers/methods/put.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/send-request.d.ts +24 -0
- package/dist/web-api/helpers/methods/send-request.d.ts.map +1 -0
- package/dist/web-api/helpers/request-options.d.ts +35 -12
- package/dist/web-api/helpers/request-options.d.ts.map +1 -1
- package/dist/web-api/helpers/utils/build-request-url.d.ts +12 -0
- package/dist/web-api/helpers/utils/build-request-url.d.ts.map +1 -0
- package/dist/web-api/helpers/utils/{date-utils..d.ts → date-utils.d.ts} +1 -1
- package/dist/web-api/helpers/utils/date-utils.d.ts.map +1 -0
- package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts +9 -0
- package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts.map +1 -1
- package/dist/web-api/helpers/utils/with-retry.d.ts +10 -5
- package/dist/web-api/helpers/utils/with-retry.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-aggregation.d.ts +2 -1
- package/dist/web-api/v1/fetch-aggregation.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-app.d.ts +12 -5
- package/dist/web-api/v1/fetch-app.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-audit.d.ts +2 -1
- package/dist/web-api/v1/fetch-audit.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-dataset.d.ts +4 -3
- package/dist/web-api/v1/fetch-dataset.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-labels.d.ts +9 -8
- package/dist/web-api/v1/fetch-labels.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-preview.d.ts +2 -1
- package/dist/web-api/v1/fetch-preview.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-principal.d.ts +8 -4
- package/dist/web-api/v1/fetch-principal.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-query-export.d.ts +2 -1
- package/dist/web-api/v1/fetch-query-export.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-query-intent.d.ts +2 -1
- package/dist/web-api/v1/fetch-query-intent.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-query.d.ts +3 -2
- package/dist/web-api/v1/fetch-query.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-security-principal.d.ts +2 -1
- package/dist/web-api/v1/fetch-security-principal.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-similar-documents.d.ts +2 -1
- package/dist/web-api/v1/fetch-similar-documents.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-sponsored-links.d.ts +2 -1
- package/dist/web-api/v1/fetch-sponsored-links.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-suggest.d.ts +4 -3
- package/dist/web-api/v1/fetch-suggest.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-text-chunk.d.ts +2 -1
- package/dist/web-api/v1/fetch-text-chunk.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-user-settings.d.ts +5 -4
- package/dist/web-api/v1/fetch-user-settings.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-change-password.d.ts +2 -1
- package/dist/web-api/v2/fetch-change-password.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-document-upload-container.d.ts +8 -7
- package/dist/web-api/v2/fetch-document-upload-container.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-forgot-password.d.ts +2 -1
- package/dist/web-api/v2/fetch-forgot-password.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-user-profile.d.ts +5 -4
- package/dist/web-api/v2/fetch-user-profile.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-version.d.ts +2 -1
- package/dist/web-api/v2/fetch-version.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src-BCIlSfZp.js +0 -1923
- package/dist/src-Dg2926V9.cjs +0 -1
- 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
|
-
*
|
|
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
|
-
/**
|
|
8
|
+
/** Extra headers to merge into the request. */
|
|
6
9
|
headers?: Headers;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
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
|
|
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":"
|
|
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
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param
|
|
6
|
-
* @
|
|
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
|
|
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;
|
|
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 `
|
|
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
|
-
*
|
|
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":"
|
|
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":"
|
|
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;
|
|
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":"
|
|
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;
|
|
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;
|
|
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,
|
|
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,
|
|
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":"
|
|
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,
|
|
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,
|
|
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,
|
|
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
|