@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.
- 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 +12 -7
- 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 +5 -2
- 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 +29 -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 +51 -1
- 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-1RUu1uXc.cjs +1 -0
- package/dist/src-DFuZeDvd.js +2198 -0
- package/dist/types/api-endpoints.d.ts +1 -1
- package/dist/types/api-endpoints.d.ts.map +1 -1
- package/dist/types/document-upload/container-document.d.ts +22 -0
- package/dist/types/document-upload/container-document.d.ts.map +1 -0
- package/dist/types/document-upload/container.d.ts +31 -0
- package/dist/types/document-upload/container.d.ts.map +1 -0
- package/dist/types/document-upload/index.d.ts +3 -0
- package/dist/types/document-upload/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- 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/types/security-principal/index.d.ts +2 -0
- package/dist/types/security-principal/index.d.ts.map +1 -0
- package/dist/types/security-principal/security-principal.d.ts +25 -0
- package/dist/types/security-principal/security-principal.d.ts.map +1 -0
- 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/index.d.ts +2 -0
- package/dist/web-api/index.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 +23 -0
- package/dist/web-api/v1/fetch-security-principal.d.ts.map +1 -0
- 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 +83 -0
- package/dist/web-api/v2/fetch-document-upload-container.d.ts.map +1 -0
- 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 +10 -7
- package/dist/src-C3yJArxW.js +0 -1886
- package/dist/src-CGNARSYI.cjs +0 -1
- package/dist/web-api/helpers/utils/date-utils..d.ts.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
import { Query, Suggestion } from "../../types";
|
|
2
3
|
/**
|
|
3
4
|
* Fetches suggestions based on the provided parameters.
|
|
@@ -26,7 +27,7 @@ import { Query, Suggestion } from "../../types";
|
|
|
26
27
|
* @param showSource - Optional flag, when set to true, returns the name of the index column from which the suggested term is extracted.
|
|
27
28
|
* @returns A promise that resolves to an array of suggestions.
|
|
28
29
|
*/
|
|
29
|
-
export declare function fetchSuggest(suggestQueryName: string, text: string, filter?: Record<string, unknown>, kinds?: string[], showSource?: boolean): Promise<Suggestion[]>;
|
|
30
|
+
export declare function fetchSuggest(suggestQueryName: string, text: string, filter?: Record<string, unknown>, kinds?: string[], showSource?: boolean, ctx?: AtomicContext): Promise<Suggestion[]>;
|
|
30
31
|
/**
|
|
31
32
|
* @deprecated Use fetchSuggest instead.
|
|
32
33
|
*
|
|
@@ -41,7 +42,7 @@ export declare function fetchSuggest(suggestQueryName: string, text: string, fil
|
|
|
41
42
|
* @example "kinds": ["city", "name"]
|
|
42
43
|
* @returns A promise that resolves to an array of suggestions.
|
|
43
44
|
*/
|
|
44
|
-
export declare function fetchSuggestQuery(suggestQueryName: string, text: string, queryName: string, fields?: string | string[]): Promise<Suggestion[]>;
|
|
45
|
+
export declare function fetchSuggestQuery(suggestQueryName: string, text: string, queryName: string, fields?: string | string[], ctx?: AtomicContext): Promise<Suggestion[]>;
|
|
45
46
|
/**
|
|
46
47
|
* Fetches suggestions for a specific field.
|
|
47
48
|
*
|
|
@@ -51,5 +52,5 @@ export declare function fetchSuggestQuery(suggestQueryName: string, text: string
|
|
|
51
52
|
*
|
|
52
53
|
* @returns A promise that resolves to an array of suggestions.
|
|
53
54
|
*/
|
|
54
|
-
export declare function fetchSuggestField(text: string, fields: string[], query?: Query): Promise<Suggestion[]>;
|
|
55
|
+
export declare function fetchSuggestField(text: string, fields: string[], query?: Query, ctx?: AtomicContext): Promise<Suggestion[]>;
|
|
55
56
|
//# sourceMappingURL=fetch-suggest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-suggest.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-suggest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-suggest.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAChC,gBAAgB,EAAE,MAAM,EACxB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,UAAU,CAAC,EAAE,OAAO,EACpB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC,CAsBvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,EACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC,CAgBvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,CAAC,EAAE,KAAK,EACb,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC,CAoBvB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
import { Query, TextChunk, TextLocation } from "../../types";
|
|
2
3
|
/**
|
|
3
4
|
* Fetches text chunks from a document based on specified parameters.
|
|
@@ -10,7 +11,7 @@ import { Query, TextChunk, TextLocation } from "../../types";
|
|
|
10
11
|
* @param rightSentencesCount - The number of sentences to include after each chunk.
|
|
11
12
|
* @returns A Promise that resolves to an object containing an array of TextChunk objects.
|
|
12
13
|
*/
|
|
13
|
-
export declare function fetchTextChunks(id: string, textChunks: TextLocation[], highlights: string[], query: Query, leftSentencesCount: number, rightSentencesCount: number): Promise<{
|
|
14
|
+
export declare function fetchTextChunks(id: string, textChunks: TextLocation[], highlights: string[], query: Query, leftSentencesCount: number, rightSentencesCount: number, ctx?: AtomicContext): Promise<{
|
|
14
15
|
chunks: TextChunk[];
|
|
15
16
|
}>;
|
|
16
17
|
//# sourceMappingURL=fetch-text-chunk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-text-chunk.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-text-chunk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG7D;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,YAAY,EAAE,EAC1B,UAAU,EAAE,MAAM,EAAE,EACpB,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,MAAM,EAC1B,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fetch-text-chunk.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-text-chunk.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG7D;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,YAAY,EAAE,EAC1B,UAAU,EAAE,MAAM,EAAE,EACpB,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,MAAM,EAC1B,mBAAmB,EAAE,MAAM,EAC3B,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,CAWlC"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
import { AuditEvents } from "../../types";
|
|
2
3
|
/**
|
|
3
4
|
* Fetches the user settings from the backend API.
|
|
4
5
|
* @returns A promise that resolves to the user settings.
|
|
5
6
|
*/
|
|
6
|
-
export declare function fetchUserSettings<T>(): Promise<T>;
|
|
7
|
+
export declare function fetchUserSettings<T>(ctx?: AtomicContext): Promise<T>;
|
|
7
8
|
/**
|
|
8
9
|
* Saves the user settings to the backend API.
|
|
9
10
|
* @param userSettings - The user settings to be saved.
|
|
10
11
|
* @param audit - Optional audit event to be recorded with the save action.
|
|
11
12
|
* @returns A promise that resolves when the settings are saved successfully.
|
|
12
13
|
*/
|
|
13
|
-
export declare function saveUserSettings<T>(userSettings: T, audit?: AuditEvents): Promise<void>;
|
|
14
|
+
export declare function saveUserSettings<T>(userSettings: T, audit?: AuditEvents, ctx?: AtomicContext): Promise<void>;
|
|
14
15
|
/**
|
|
15
16
|
* Patches the user settings in the backend API.
|
|
16
17
|
* @param userSettings - Partial user settings to be patched.
|
|
17
18
|
* @param audit - Optional audit event to be recorded with the patch action.
|
|
18
19
|
* @returns A promise that resolves to the updated user settings.
|
|
19
20
|
*/
|
|
20
|
-
export declare function patchUserSettings<T>(userSettings: Partial<T>, audit?: AuditEvents): Promise<T>;
|
|
21
|
+
export declare function patchUserSettings<T>(userSettings: Partial<T>, audit?: AuditEvents, ctx?: AtomicContext): Promise<T>;
|
|
21
22
|
/**
|
|
22
23
|
* Deletes all user settings by saving an empty object.
|
|
23
24
|
* This effectively resets the user settings to their default state.
|
|
24
25
|
*
|
|
25
26
|
* @returns A promise that resolves when the settings are successfully deleted.
|
|
26
27
|
*/
|
|
27
|
-
export declare function deleteUserSettings(): Promise<void>;
|
|
28
|
+
export declare function deleteUserSettings(ctx?: AtomicContext): Promise<void>;
|
|
28
29
|
//# sourceMappingURL=fetch-user-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-user-settings.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-user-settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-user-settings.d.ts","sourceRoot":"","sources":["../../../src/web-api/v1/fetch-user-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,YAAY,EAAE,CAAC,EACf,KAAK,CAAC,EAAE,WAAW,EACnB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,EACxB,KAAK,CAAC,EAAE,WAAW,EACnB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,CAAC,CAAC,CAYZ;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
export type ChangePasswordResponse = {
|
|
2
3
|
success: boolean;
|
|
3
4
|
message?: string;
|
|
@@ -10,5 +11,5 @@ export type ChangePasswordResponse = {
|
|
|
10
11
|
* @throws UnauthorizedError When the backend returns 401 (invalid current password / unauthorized).
|
|
11
12
|
* @throws ApiError For any other HTTP or transport error.
|
|
12
13
|
*/
|
|
13
|
-
export declare function fetchChangePassword(newPassword: string, currentPassword?: string): Promise<ChangePasswordResponse>;
|
|
14
|
+
export declare function fetchChangePassword(newPassword: string, currentPassword?: string, ctx?: AtomicContext): Promise<ChangePasswordResponse>;
|
|
14
15
|
//# sourceMappingURL=fetch-change-password.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-change-password.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-change-password.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-change-password.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-change-password.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,EACxB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAMjC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
2
|
+
import type { Container, ContainerDocumentListResponse, ContainerListResponse } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Lists document-upload containers, paginated.
|
|
5
|
+
*
|
|
6
|
+
* @param params - `page`/`pageSize` (server-side pagination; both optional).
|
|
7
|
+
*/
|
|
8
|
+
export declare function listContainers(params?: {
|
|
9
|
+
page?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
}, ctx?: AtomicContext): Promise<ContainerListResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Fetches a single container by id.
|
|
14
|
+
*
|
|
15
|
+
* @param id - The container id.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getContainer(id: string, ctx?: AtomicContext): Promise<Container>;
|
|
18
|
+
export interface CreateContainerInput {
|
|
19
|
+
name: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
owners?: string[];
|
|
22
|
+
readers?: string[];
|
|
23
|
+
tags?: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new document-upload container.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createContainer(body: CreateContainerInput, ctx?: AtomicContext): Promise<Container>;
|
|
29
|
+
export interface UpdateContainerInput {
|
|
30
|
+
name?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
owners?: string[];
|
|
33
|
+
readers?: string[];
|
|
34
|
+
tags?: string[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Updates a container's metadata and/or access (owners/readers).
|
|
38
|
+
*
|
|
39
|
+
* @param id - The container id.
|
|
40
|
+
* @param patch - Fields to update; the API replaces `owners`/`readers`
|
|
41
|
+
* wholesale rather than patching a delta, so callers must send the full
|
|
42
|
+
* arrays.
|
|
43
|
+
* @throws {@link ApiError} with `status === 409` if an upload/indexing job is
|
|
44
|
+
* currently active on this container (`container_locked`).
|
|
45
|
+
*/
|
|
46
|
+
export declare function updateContainer(id: string, patch: UpdateContainerInput, ctx?: AtomicContext): Promise<Container>;
|
|
47
|
+
export interface DeleteContainersResult {
|
|
48
|
+
succeeded: string[];
|
|
49
|
+
failed: {
|
|
50
|
+
containerId: string;
|
|
51
|
+
error: string;
|
|
52
|
+
}[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Bulk-deletes containers by id — the API only exposes a bulk endpoint, so
|
|
56
|
+
* this is the single call site for deleting one container as much as many.
|
|
57
|
+
*
|
|
58
|
+
* @param containerIds - The ids to delete.
|
|
59
|
+
* @returns Which ids succeeded vs. failed (e.g. a locked container blocks its
|
|
60
|
+
* own deletion without failing the rest of the batch).
|
|
61
|
+
*/
|
|
62
|
+
export declare function deleteContainers(containerIds: string[], ctx?: AtomicContext): Promise<DeleteContainersResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Lists the documents inside a container, paginated.
|
|
65
|
+
*
|
|
66
|
+
* @param id - The container id.
|
|
67
|
+
* @param params - `page`/`pageSize` (server-side pagination; both optional).
|
|
68
|
+
*/
|
|
69
|
+
export declare function listContainerDocuments(id: string, params?: {
|
|
70
|
+
page?: number;
|
|
71
|
+
pageSize?: number;
|
|
72
|
+
}, ctx?: AtomicContext): Promise<ContainerDocumentListResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Deletes documents from a container by id.
|
|
75
|
+
*
|
|
76
|
+
* @param id - The container id.
|
|
77
|
+
* @param fileIds - The document ids to delete.
|
|
78
|
+
* @throws {@link ApiError} with `status === 409` if an upload/indexing job is
|
|
79
|
+
* currently active on this container (`container_locked`), same as
|
|
80
|
+
* {@link updateContainer}.
|
|
81
|
+
*/
|
|
82
|
+
export declare function deleteContainerDocuments(id: string, fileIds: string[], ctx?: AtomicContext): Promise<void>;
|
|
83
|
+
//# sourceMappingURL=fetch-document-upload-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-document-upload-container.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-document-upload-container.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,SAAS,EACT,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAmBrB;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,EACjD,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,qBAAqB,CAAC,CAEhC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,EACV,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,oBAAoB,EAC1B,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,oBAAoB,EAC3B,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,MAAM,EAAE,EACtB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAUjC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,MAAM,EACV,MAAM,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,EACjD,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,6BAA6B,CAAC,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
export type PasswordResetEmailResponse = {
|
|
2
3
|
email?: string;
|
|
3
4
|
passwordResetTokenExpiry?: string;
|
|
@@ -7,5 +8,5 @@ export type PasswordResetEmailResponse = {
|
|
|
7
8
|
*
|
|
8
9
|
* @param userName - The username for which the reset email should be sent.
|
|
9
10
|
*/
|
|
10
|
-
export declare function fetchSendPasswordResetEmail(userName: string): Promise<PasswordResetEmailResponse>;
|
|
11
|
+
export declare function fetchSendPasswordResetEmail(userName: string, ctx?: AtomicContext): Promise<PasswordResetEmailResponse>;
|
|
11
12
|
//# sourceMappingURL=fetch-forgot-password.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-forgot-password.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-forgot-password.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-forgot-password.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-forgot-password.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAQrC,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,0BAA0B,CAAC,CAWrC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
import { UserProfile } from "../../types";
|
|
2
3
|
/**
|
|
3
4
|
* Fetches the user profile for the specified user ID.
|
|
@@ -12,7 +13,7 @@ import { UserProfile } from "../../types";
|
|
|
12
13
|
* console.log(profile);
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
export declare function fetchUserProfile(userId: string): Promise<UserProfile>;
|
|
16
|
+
export declare function fetchUserProfile(userId: string, ctx?: AtomicContext): Promise<UserProfile>;
|
|
16
17
|
/**
|
|
17
18
|
* Creates a new user profile by sending a POST request to the API.
|
|
18
19
|
*
|
|
@@ -27,7 +28,7 @@ export declare function fetchUserProfile(userId: string): Promise<UserProfile>;
|
|
|
27
28
|
* });
|
|
28
29
|
* ```
|
|
29
30
|
*/
|
|
30
|
-
export declare function createUserProfile(userProfile: Partial<UserProfile
|
|
31
|
+
export declare function createUserProfile(userProfile: Partial<UserProfile>, ctx?: AtomicContext): Promise<UserProfile>;
|
|
31
32
|
/**
|
|
32
33
|
* Updates a specific property of a user profile.
|
|
33
34
|
*
|
|
@@ -46,7 +47,7 @@ export declare function createUserProfile(userProfile: Partial<UserProfile>): Pr
|
|
|
46
47
|
* );
|
|
47
48
|
* ```
|
|
48
49
|
*/
|
|
49
|
-
export declare function patchUserProfile(userProfile: Partial<Omit<UserProfile, "created" | "modified">>, category: string, propertyName: string): Promise<UserProfile>;
|
|
50
|
+
export declare function patchUserProfile(userProfile: Partial<Omit<UserProfile, "created" | "modified">>, category: string, propertyName: string, ctx?: AtomicContext): Promise<UserProfile>;
|
|
50
51
|
/**
|
|
51
52
|
* Deletes a specific property of a user profile.
|
|
52
53
|
*
|
|
@@ -65,5 +66,5 @@ export declare function patchUserProfile(userProfile: Partial<Omit<UserProfile,
|
|
|
65
66
|
* );
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
|
-
export declare function deleteUserProfileProperty(userProfile: Partial<Omit<UserProfile, "created" | "modified">>, category: string, propertyName: string): Promise<boolean>;
|
|
69
|
+
export declare function deleteUserProfileProperty(userProfile: Partial<Omit<UserProfile, "created" | "modified">>, category: string, propertyName: string, ctx?: AtomicContext): Promise<boolean>;
|
|
69
70
|
//# sourceMappingURL=fetch-user-profile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-user-profile.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch-user-profile.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,WAAW,CAAC,CAMtB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,EACjC,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,WAAW,CAAC,CAOtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC,EAC/D,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,WAAW,CAAC,CAOtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC,EAC/D,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,GAAG,GAAE,aAA8B,GAClC,OAAO,CAAC,OAAO,CAAC,CAUlB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
export type VersionResponse = {
|
|
2
3
|
serverVersion: string;
|
|
3
4
|
features: Record<string, boolean>[];
|
|
4
5
|
};
|
|
5
|
-
export declare function fetchVersion(): Promise<VersionResponse>;
|
|
6
|
+
export declare function fetchVersion(ctx?: AtomicContext): Promise<VersionResponse>;
|
|
6
7
|
//# sourceMappingURL=fetch-version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-version.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-version.d.ts","sourceRoot":"","sources":["../../../src/web-api/v2/fetch-version.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF,wBAAsB,YAAY,CAAC,GAAG,GAAE,aAA8B,4BAGrE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sinequa/atomic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/atomic.cjs",
|
|
7
7
|
"module": "./dist/atomic.js",
|
|
@@ -24,16 +24,15 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"dev": "vite",
|
|
26
26
|
"build": "vite build && tsc",
|
|
27
|
-
"build:patch": "npm run build",
|
|
28
|
-
"build:minor": "npm run build",
|
|
29
|
-
"build:major": "npm run build",
|
|
30
27
|
"dev:pack": "npm run build && npm pack --pack-destination=package",
|
|
31
|
-
"prebuild:patch": "npm version patch",
|
|
32
|
-
"prebuild:minor": "npm version minor",
|
|
33
|
-
"prebuild:major": "npm version major",
|
|
34
28
|
"preview": "vite preview",
|
|
35
29
|
"watch": "vite build --watch",
|
|
36
30
|
"test": "vitest",
|
|
31
|
+
"changeset": "changeset",
|
|
32
|
+
"changeset:status": "changeset status",
|
|
33
|
+
"changeset:version": "changeset version",
|
|
34
|
+
"release": "tsx scripts/release.ts",
|
|
35
|
+
"pre-release": "tsx scripts/pre-release.ts",
|
|
37
36
|
"v:publish": "npm publish --registry https://npm.sinequa.com",
|
|
38
37
|
"v:unpublish": "npm unpublish --registry https://npm.sinequa.com --force",
|
|
39
38
|
"prepare": "husky"
|
|
@@ -59,11 +58,15 @@
|
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
60
|
"@biomejs/biome": "^2.3.11",
|
|
61
|
+
"@changesets/changelog-git": "^0.2.1",
|
|
62
|
+
"@changesets/cli": "^2.31.1",
|
|
63
|
+
"@clack/prompts": "^1.1.0",
|
|
62
64
|
"@types/node": "^20.11.0",
|
|
63
65
|
"@typescript/typescript6": "^6.0.2",
|
|
64
66
|
"husky": "^9.1.7",
|
|
65
67
|
"jsdom": "^26.0.0",
|
|
66
68
|
"lint-staged": "^16.2.6",
|
|
69
|
+
"tsx": "^4.21.0",
|
|
67
70
|
"typescript": "^7.0.2",
|
|
68
71
|
"vite": "^8.0.0",
|
|
69
72
|
"vite-plugin-dts": "^5.0.3",
|