@sinequa/atomic 0.0.61 → 0.0.100

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 (77) hide show
  1. package/README.md +60 -11
  2. package/dist/atomic.js +1089 -735
  3. package/dist/atomic.umd.cjs +1 -1
  4. package/dist/authentication/auth.d.ts +59 -0
  5. package/dist/authentication/auth.d.ts.map +1 -0
  6. package/dist/authentication/index.d.ts.map +1 -0
  7. package/dist/configurations/global.config.d.ts +19 -15
  8. package/dist/configurations/global.config.d.ts.map +1 -1
  9. package/dist/configurations/index.d.ts +1 -1
  10. package/dist/helpers/metadata.d.ts +22 -7
  11. package/dist/helpers/metadata.d.ts.map +1 -1
  12. package/dist/helpers/metadata.test.d.ts +2 -0
  13. package/dist/helpers/metadata.test.d.ts.map +1 -0
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/types/api-endpoints.d.ts +1 -1
  17. package/dist/types/api-endpoints.d.ts.map +1 -1
  18. package/dist/types/config/CCAppPreLogin.d.ts +7 -3
  19. package/dist/types/config/CCAppPreLogin.d.ts.map +1 -1
  20. package/dist/types/config/index.d.ts +2 -5
  21. package/dist/types/config/index.d.ts.map +1 -1
  22. package/dist/types/export/types.d.ts +22 -0
  23. package/dist/types/export/types.d.ts.map +1 -0
  24. package/dist/types/index.d.ts +1 -0
  25. package/dist/types/index.d.ts.map +1 -1
  26. package/dist/types/search/QueryIntentEntity.d.ts +16 -1
  27. package/dist/types/search/QueryIntentEntity.d.ts.map +1 -1
  28. package/dist/types/search/QueryIntentMatch.d.ts +17 -0
  29. package/dist/types/search/QueryIntentMatch.d.ts.map +1 -0
  30. package/dist/types/search/QueryIntentResponse.d.ts +9 -0
  31. package/dist/types/search/QueryIntentResponse.d.ts.map +1 -0
  32. package/dist/types/search/index.d.ts +4 -2
  33. package/dist/types/search/index.d.ts.map +1 -1
  34. package/dist/utils/bisect.d.ts.map +1 -0
  35. package/dist/utils/index.d.ts +4 -1
  36. package/dist/utils/index.d.ts.map +1 -1
  37. package/dist/utils/is-not-input-event.d.ts +2 -0
  38. package/dist/utils/is-not-input-event.d.ts.map +1 -0
  39. package/dist/utils/logger.d.ts +40 -0
  40. package/dist/utils/logger.d.ts.map +1 -0
  41. package/dist/utils/query-params.d.ts +1 -3
  42. package/dist/utils/query-params.d.ts.map +1 -1
  43. package/dist/utils/utilities.d.ts +23 -0
  44. package/dist/utils/utilities.d.ts.map +1 -0
  45. package/dist/web-api/fetch-aggregation.d.ts.map +1 -1
  46. package/dist/web-api/fetch-app.d.ts.map +1 -1
  47. package/dist/web-api/fetch-audit.d.ts +3 -2
  48. package/dist/web-api/fetch-audit.d.ts.map +1 -1
  49. package/dist/web-api/fetch-dataset.d.ts +2 -2
  50. package/dist/web-api/fetch-dataset.d.ts.map +1 -1
  51. package/dist/web-api/fetch-labels.d.ts +1 -1
  52. package/dist/web-api/fetch-labels.d.ts.map +1 -1
  53. package/dist/web-api/fetch-query-export.d.ts +19 -0
  54. package/dist/web-api/fetch-query-export.d.ts.map +1 -0
  55. package/dist/web-api/fetch-query-intent.d.ts +13 -0
  56. package/dist/web-api/fetch-query-intent.d.ts.map +1 -0
  57. package/dist/web-api/fetch-query.d.ts.map +1 -1
  58. package/dist/web-api/fetch-similar-documents.d.ts +13 -0
  59. package/dist/web-api/fetch-similar-documents.d.ts.map +1 -0
  60. package/dist/web-api/fetch-suggest.d.ts.map +1 -1
  61. package/dist/web-api/helpers.d.ts +111 -1
  62. package/dist/web-api/helpers.d.ts.map +1 -1
  63. package/dist/web-api/index.d.ts +11 -8
  64. package/dist/web-api/index.d.ts.map +1 -1
  65. package/package.json +9 -8
  66. package/dist/auth/auth.d.ts +0 -39
  67. package/dist/auth/auth.d.ts.map +0 -1
  68. package/dist/auth/index.d.ts.map +0 -1
  69. package/dist/types/config/ExportDialogModel.d.ts +0 -13
  70. package/dist/types/config/ExportDialogModel.d.ts.map +0 -1
  71. package/dist/types/config/ExportOutputFormat.d.ts +0 -10
  72. package/dist/types/config/ExportOutputFormat.d.ts.map +0 -1
  73. package/dist/types/config/ExportSourceType.d.ts +0 -10
  74. package/dist/types/config/ExportSourceType.d.ts.map +0 -1
  75. package/dist/utils/array/bisect.d.ts.map +0 -1
  76. /package/dist/{auth → authentication}/index.d.ts +0 -0
  77. /package/dist/utils/{array/bisect.d.ts → bisect.d.ts} +0 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Centralized logging system for authentication module
3
+ *
4
+ * This module provides standardized logging functions with different severity levels,
5
+ * which can be configured globally to output to different destinations.
6
+ */
7
+ export declare enum LogLevel {
8
+ DEBUG = 0,
9
+ INFO = 1,
10
+ WARN = 2,
11
+ ERROR = 3,
12
+ NONE = 4
13
+ }
14
+ interface LoggerConfig {
15
+ level: LogLevel;
16
+ enableConsoleOutput: boolean;
17
+ }
18
+ /**
19
+ * Configure the logger system
20
+ * @param config - Logger configuration options
21
+ */
22
+ export declare function configureLogger(config: Partial<LoggerConfig>): void;
23
+ /**
24
+ * Log a debug message
25
+ */
26
+ export declare function debug(message: string, data?: any): void;
27
+ /**
28
+ * Log an info message
29
+ */
30
+ export declare function info(message: string, data?: any): void;
31
+ /**
32
+ * Log a warning message
33
+ */
34
+ export declare function warn(message: string, data?: any): void;
35
+ /**
36
+ * Log an error message
37
+ */
38
+ export declare function error(message: string, error?: any): void;
39
+ export {};
40
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACT;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,QAAQ,CAAC;IAChB,mBAAmB,EAAE,OAAO,CAAC;CAE9B;AAQD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAEnE;AAgCD;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAEvD;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAEtD;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAEtD;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,CAExD"}
@@ -3,13 +3,11 @@ import { LegacyFilter, Query } from "../types";
3
3
  * `path`: hash of the search without the bang in form of `/search/all`
4
4
  * `filters`: filters associated to the query
5
5
  * `id`: document id if there's one opened,
6
- * `queryName`: name of the query
7
6
  */
8
- export type QueryParams = Query & {
7
+ export type QueryParams = Partial<Omit<Query, "filters">> & {
9
8
  path?: string;
10
9
  filters?: LegacyFilter[];
11
10
  id?: string;
12
- queryName?: string;
13
11
  };
14
12
  /**
15
13
  * Get {@link QueryParams} from url string
@@ -1 +1 @@
1
- {"version":3,"file":"query-params.d.ts","sourceRoot":"","sources":["../../src/utils/query-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,S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G;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAQ7D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOtE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAItD"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `HelpFolderOptions` is an object with four properties: `name`, `indexFile`, `useLocale`, and
3
+ * `useLocaleAsPrefix`.
4
+ *
5
+ * @property folder - The name of the folder.
6
+ * @property indexFile - The name of the file that will be used as the index file for the folder.
7
+ * @property useLocale - If true, the locale will be used to determine the folder to use.
8
+ * @property useLocaleAsPrefix - If true, the locale will be used as a prefix for the help
9
+ * folder. For example, if the locale is "en-US", the help folder will be inside "en-US/" folder.
10
+ * If false, no locale will be used as a prefix.
11
+ */
12
+ export type HelpFolderOptions = {
13
+ path: string;
14
+ folder?: string;
15
+ indexFile?: string;
16
+ useLocale?: boolean;
17
+ useLocaleAsPrefix?: boolean;
18
+ };
19
+ /**
20
+ * helper function to retrieve the help html file accordingly with the current locale
21
+ */
22
+ export declare function getHelpIndexUrl(locale: string, options: HelpFolderOptions): string;
23
+ //# sourceMappingURL=utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/utils/utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAOlF"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-aggregation.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-aggregation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,UAAU,CAAC;AAGnE;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAkBxH"}
1
+ {"version":3,"file":"fetch-aggregation.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-aggregation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,UAAU,CAAC;AAInE;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAoBxH"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-app.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIhD;;;GAGG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,CAK/C;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,CA8C/C"}
1
+ {"version":3,"file":"fetch-app.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIhD;;;GAGG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,CAK/C;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,CAkD/C"}
@@ -4,7 +4,7 @@ import { AuditEvents, AuditRecord } from "../types";
4
4
  *
5
5
  * @param body - The body object to add audit information to.
6
6
  */
7
- export declare function addAuditAdditionalInfo(body: unknown): void;
7
+ export declare function addAuditAdditionalInfo(body: unknown, addUrlParam?: boolean): void;
8
8
  /**
9
9
  * Adds a session ID to the audit record.
10
10
  *
@@ -23,9 +23,10 @@ export declare function addUrl(auditRecord: AuditRecord): AuditRecord;
23
23
  * Notifies the server about audit events.
24
24
  *
25
25
  * @param auditEvents - The audit events to be sent to the server.
26
+ * @param addUrl - Whether the url should be automatically added to the request details.
26
27
  * @returns A promise that resolves to the updated audit events.
27
28
  */
28
- declare function notify(auditEvents: AuditEvents): Promise<AuditEvents>;
29
+ declare function notify(auditEvents: AuditEvents, addUrl?: boolean): Promise<AuditEvents>;
29
30
  export declare const Audit: {
30
31
  notify: typeof notify;
31
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-audit.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-audit.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,WAAW,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;AAOhF;;;;EAIE;AACF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,QAOlD;AA6BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,eASpD;AAGD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,eAS9C;AAwBF;;;;;GAKG;AACH,iBAAe,MAAM,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CASpE;AAED,eAAO,MAAM,KAAK;;CAAa,CAAA"}
1
+ {"version":3,"file":"fetch-audit.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-audit.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,WAAW,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;AAOhF;;;;EAIE;AACF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,GAAE,OAAc,QAS/E;AA6BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,eASpD;AAGD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,eAS9C;AAwBF;;;;;;GAMG;AACH,iBAAe,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,GAAE,OAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAS5F;AAED,eAAO,MAAM,KAAK;;CAAa,CAAA"}
@@ -13,12 +13,12 @@ export type DataSet<T extends Result = Result> = Record<string, T | DatasetError
13
13
  *
14
14
  * @template T - The type of the dataset, defaults to `Article`.
15
15
  * @param {string} webserviceName - The name of the web service to fetch the dataset from.
16
- * @param {string} queryName - The name of the query to execute.
16
+ * @param {string} datasetName - The name of the dataset to execute.
17
17
  * @param {object} [parameters={}] - Optional parameters to pass to the query.
18
18
  * @returns {Promise<T>} A promise that resolves to the fetched dataset.
19
19
  * @throws {Error} If the dataset contains an error code and message.
20
20
  */
21
- export declare function fetchDataset<T extends Result = Result>(webserviceName: string, queryName: string, parameters?: {}): Promise<T>;
21
+ export declare function fetchDataset<T extends Result = Result>(webserviceName: string, datasetName: string, parameters?: {}): Promise<T>;
22
22
  /**
23
23
  * Fetches datasets from a specified web service.
24
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-dataset.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,GAAC,YAAY,CAAC,CAAC;AAEhF;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CASpI;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAO7J;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAG5F"}
1
+ {"version":3,"file":"fetch-dataset.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,GAAC,YAAY,CAAC,CAAC;AAEhF;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAYtI;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAO7J;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAG5F"}
@@ -1,6 +1,6 @@
1
1
  import { LabelsRights, Query } from "../types";
2
2
  /**
3
- * Fetches labels based on the provided prefix and other optional parameters.
3
+ * Fetches all existing labels based on the provided prefix and other optional parameters.
4
4
  *
5
5
  * @param {string} prefix - The prefix to filter the labels.
6
6
  * @param {boolean} [publicOnly=true] - Whether to fetch only public labels. Defaults to true.
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-labels.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;A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BAgB5F;AAED;;;;;;;;GAQG;AACH,iBAAe,aAAa,0BAa3B;AAED;;;;;;;GAOG;AACH,iBAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBAgC7E;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBAgChF;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,GAAE,OAAc,iBAsBnF;AAED;;;;;;GAMG;AACH,iBAAe,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBAoBvE;AAED;;;;;;;GAOG;AACH,iBAAe,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAE,OAAc,iBAsBhF;AAED;;;;;;;GAOG;AACH,iBAAe,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAE,OAAc,iBAsBnF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { Article, Query } from "../types";
2
+ import { ExportQueryModel } from "../types/export/types";
3
+ /**
4
+ * Fetches the export of a query result from the web service.
5
+ *
6
+ * @param {Object} params - The parameters for the export query.
7
+ * @param {ExportQueryModel} params.model - The model containing export query details.
8
+ * @param {string} params.appName - The name of the application.
9
+ * @param {Query} params.query - The query to be exported.
10
+ * @param {Article} [params.article] - Optional article associated with the query.
11
+ * @returns {Promise<Response>} A promise that resolves to the response of the export request.
12
+ */
13
+ export declare function fetchQueryExport({ model, appName, query, article }: {
14
+ model: ExportQueryModel;
15
+ appName: string;
16
+ query: Query;
17
+ article?: Article;
18
+ }): Promise<Response>;
19
+ //# sourceMappingURL=fetch-query-export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-query-export.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-query-export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAKzD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,KAAK,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAwB5K"}
@@ -0,0 +1,13 @@
1
+ import { Query, QueryIntentMatch } from "../types";
2
+ /**
3
+ * Fetches query intent based on the query.
4
+ *
5
+ * This function sends a POST request to the "queryintent" endpoint with the
6
+ * app name and query parameters to retrieve query intent matches.
7
+ *
8
+ * @param query - The query parameters for fetching query intent matches.
9
+ * @returns A promise that resolves to an array of QueryIntentMatch objects, each
10
+ * representing a query intent match.
11
+ */
12
+ export declare function fetchQueryIntent(query: Query): Promise<QueryIntentMatch[]>;
13
+ //# sourceMappingURL=fetch-query-intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-query-intent.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-query-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAuB,MAAM,UAAU,CAAC;AAGxE;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAOhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-query.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-query.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnI;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BtH;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoDtH;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,mBAAmB,EAAE,WAAW,SAAK,EAAE,YAAY,SAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAG,CAkBvJ"}
1
+ {"version":3,"file":"fetch-query.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-query.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnI;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BtH;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoDtH;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,mBAAmB,EAAE,WAAW,SAAK,EAAE,YAAY,SAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAG,CAoBvJ"}
@@ -0,0 +1,13 @@
1
+ import { Article } from "../types";
2
+ /**
3
+ * Fetches similar documents based on the provided document ID and query name.
4
+ *
5
+ * @param {string} documentId - The ID of the document to compare against.
6
+ * @param {string} queryName - The name of the query to use for comparison.
7
+ * @returns {{ data: Article[]; methodresult: string }} Document list detected as similar.
8
+ */
9
+ export declare function fetchSimilarDocuments(documentId: string, queryName: string): Promise<{
10
+ data: Article[];
11
+ methodresult: string;
12
+ }>;
13
+ //# sourceMappingURL=fetch-similar-documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-similar-documents.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-similar-documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM;UASiB,OAAO,EAAE;kBAAgB,MAAM;GAMlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-suggest.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-suggest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAazK;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAYpJ;AAGD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAa7F"}
1
+ {"version":3,"file":"fetch-suggest.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-suggest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAkBzK;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAYpJ;AAGD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAa7F"}
@@ -1,4 +1,63 @@
1
1
  import { API_ENDPOINTS } from "../types";
2
+ /**
3
+ * Base class for API errors
4
+ */
5
+ export declare class ApiError extends Error {
6
+ status: number;
7
+ constructor(message: string, status: number);
8
+ }
9
+ /**
10
+ * Error thrown when authentication fails
11
+ */
12
+ export declare class UnauthorizedError extends ApiError {
13
+ constructor(message?: string);
14
+ }
15
+ /**
16
+ * Error thrown when server encounters an internal error
17
+ */
18
+ export declare class ServerError extends ApiError {
19
+ constructor(message?: string);
20
+ }
21
+ /**
22
+ * Error thrown when request times out
23
+ */
24
+ export declare class TimeoutError extends ApiError {
25
+ constructor(message?: string);
26
+ }
27
+ /**
28
+ * Type définissant les options avancées pour les requêtes HTTP
29
+ */
30
+ export interface RequestOptions {
31
+ /** Headers personnalisés à inclure dans la requête */
32
+ headers?: Headers;
33
+ /** Type de réponse attendu */
34
+ responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
35
+ /** Temps maximum d'attente avant expiration de la requête (en ms) */
36
+ timeout?: number;
37
+ /** Signal pour annuler la requête */
38
+ abortSignal?: AbortSignal;
39
+ /** Nombre maximum de tentatives en cas d'échec */
40
+ maxRetries?: number;
41
+ /** Délai entre les tentatives (en ms) */
42
+ retryDelay?: number;
43
+ }
44
+ /**
45
+ * Crée un AbortController avec un timeout
46
+ * @param timeoutMs - Temps en millisecondes avant expiration
47
+ * @returns Un objet contenant le controller et le signal
48
+ */
49
+ export declare function createTimeoutController(timeoutMs?: number): {
50
+ controller: AbortController;
51
+ signal: AbortSignal;
52
+ };
53
+ /**
54
+ * Fonction utilitaire pour effectuer des requêtes avec retry
55
+ * @param fetchFn - Fonction qui exécute la requête fetch
56
+ * @param maxRetries - Nombre maximum de tentatives
57
+ * @param retryDelay - Délai entre les tentatives (en ms)
58
+ * @returns Résultat de la requête
59
+ */
60
+ export declare function withRetry<T>(fetchFn: () => Promise<T>, maxRetries?: number, retryDelay?: number): Promise<T>;
2
61
  /**
3
62
  * Creates headers for a web API request.
4
63
  * @returns {Headers} The headers object.
@@ -8,28 +67,79 @@ export declare function createHeaders(headers?: Headers): Headers;
8
67
  * Handles the response from the web API.
9
68
  *
10
69
  * @param response - The response from the web API.
70
+ * @param responseType - The type of response expected ('arraybuffer', 'blob', 'json', or 'text')
11
71
  * @returns A promise that resolves to the response data of type T.
12
72
  */
13
- export declare function handleResponse<T>(response: Response): Promise<T>;
73
+ export declare function handleResponse<T>(response: Response, responseType?: 'arraybuffer' | 'blob' | 'json' | 'text'): Promise<T>;
14
74
  /**
15
75
  * Makes a POST request to the specified API endpoint.
16
76
  * `app` and `locale` are added automatically to the request body.
17
77
  *
18
78
  * @param endpoint - The API endpoint to send the request to.
19
79
  * @param body - The request body as a record of key-value pairs.
80
+ * @param options - Additional options for the request.
81
+ * @param options.headers - Custom headers to include in the request.
82
+ * @param options.responseType - The expected type of response data.
20
83
  * @returns A promise that resolves to the response data of type T.
21
84
  */
22
85
  export declare function post<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: {
23
86
  headers?: Headers;
87
+ responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
24
88
  }): Promise<T>;
25
89
  /**
26
90
  * Makes a GET request to the specified API endpoint with the given parameters.
27
91
  *
28
92
  * @param endpoint - The API endpoint to send the GET request to.
29
93
  * @param params - The URL parameters to include in the request.
94
+ * @param options - Additional options for the request.
95
+ * @param options.headers - Custom headers to include in the request.
96
+ * @param options.responseType - The expected type of response data.
30
97
  * @returns A Promise that resolves to the response data of type T.
31
98
  */
32
99
  export declare function get<T>(endpoint: API_ENDPOINTS, params?: URLSearchParams, options?: {
33
100
  headers?: Headers;
101
+ responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
102
+ }): Promise<T>;
103
+ /**
104
+ * Makes a PUT request to the specified API endpoint.
105
+ *
106
+ * @param endpoint - The API endpoint to send the request to.
107
+ * @param body - The request body as a record of key-value pairs.
108
+ * @param options - Additional options for the request.
109
+ * @param options.headers - Custom headers to include in the request.
110
+ * @param options.responseType - The expected type of response data.
111
+ * @returns A promise that resolves to the response data of type T.
112
+ */
113
+ export declare function put<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: {
114
+ headers?: Headers;
115
+ responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
116
+ }): Promise<T>;
117
+ /**
118
+ * Makes a DELETE request to the specified API endpoint.
119
+ *
120
+ * @param endpoint - The API endpoint to send the request to.
121
+ * @param params - The URL parameters to include in the request.
122
+ * @param options - Additional options for the request.
123
+ * @param options.headers - Custom headers to include in the request.
124
+ * @param options.responseType - The expected type of response data.
125
+ * @returns A promise that resolves to the response data of type T.
126
+ */
127
+ export declare function del<T>(endpoint: API_ENDPOINTS, params?: URLSearchParams, options?: {
128
+ headers?: Headers;
129
+ responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
130
+ }): Promise<T>;
131
+ /**
132
+ * Makes a PATCH request to the specified API endpoint.
133
+ *
134
+ * @param endpoint - The API endpoint to send the request to.
135
+ * @param body - The request body as a record of key-value pairs.
136
+ * @param options - Additional options for the request.
137
+ * @param options.headers - Custom headers to include in the request.
138
+ * @param options.responseType - The expected type of response data.
139
+ * @returns A promise that resolves to the response data of type T.
140
+ */
141
+ export declare function patch<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: {
142
+ headers?: Headers;
143
+ responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
34
144
  }): Promise<T>;
35
145
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/web-api/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAiBxD;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAgCtE;AAED;;;;;;;GAOG;AACH,wBAAsB,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MA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AAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,aAAa,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CA4BnL;AAED;;;;;;;;;GASG;AACH,wBAAsB,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,aAAa,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAsB9K;AAED;;;;;;;;;GASG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,aAAa,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CA4BrL"}
@@ -1,14 +1,17 @@
1
- export * from "./fetch-query";
2
- export * from "./fetch-preview";
3
- export * from "./fetch-principal";
4
- export * from "./fetch-app";
5
1
  export * from "./fetch-aggregation";
6
- export * from "./fetch-user-settings";
7
- export * from "./fetch-suggest";
8
- export * from "./fetch-sponsored-links";
9
- export * from "./fetch-text-chunk";
2
+ export * from "./fetch-app";
10
3
  export * from "./fetch-audit";
11
4
  export * from "./fetch-dataset";
12
5
  export * from "./fetch-labels";
6
+ export * from "./fetch-preview";
7
+ export * from "./fetch-principal";
8
+ export * from "./fetch-query";
9
+ export * from "./fetch-query-intent";
10
+ export * from "./fetch-query-export";
11
+ export * from "./fetch-similar-documents";
12
+ export * from "./fetch-sponsored-links";
13
+ export * from "./fetch-suggest";
14
+ export * from "./fetch-text-chunk";
15
+ export * from "./fetch-user-settings";
13
16
  export * from "./helpers";
14
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sinequa/atomic",
3
3
  "private": false,
4
- "version": "0.0.61",
4
+ "version": "0.0.100",
5
5
  "type": "module",
6
6
  "main": "./dist/atomic.umd.cjs",
7
7
  "module": "./dist/atomic.js",
@@ -26,16 +26,17 @@
26
26
  "prebuild:minor": "npm version minor",
27
27
  "prebuild:major": "npm version major",
28
28
  "preview": "vite preview",
29
+ "watch": "vite build --watch",
29
30
  "test": "vitest",
30
- "v:publish": "npm publish --registry https://npm.sinequa.com:4873",
31
- "v:unpublish": "npm unpublish --registry https://npm.sinequa.com:4873 --force"
31
+ "v:publish": "npm publish --registry https://npm.sinequa.com",
32
+ "v:unpublish": "npm unpublish --registry https://npm.sinequa.com --force"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@types/node": "^20.11.0",
35
- "jsdom": "^23.2.0",
36
- "typescript": "^5.2.2",
37
- "vite": "^5.0.8",
38
- "vite-plugin-dts": "^4.2.4",
39
- "vitest": "^1.1.3"
36
+ "jsdom": "^26.0.0",
37
+ "typescript": "^5.7.3",
38
+ "vite": "^6.2.0",
39
+ "vite-plugin-dts": "^4.5.0",
40
+ "vitest": "^3.0.7"
40
41
  }
41
42
  }
@@ -1,39 +0,0 @@
1
- import { Credentials } from "../types";
2
- /**
3
- * Retrieves a JSON Web Token (JWT) for authentication.
4
- *
5
- * @param credentials - The user credentials.
6
- * @returns A boolean indicating whether the JWT retrieval was successful.
7
- */
8
- export declare const getJWToken: (credentails: Credentials) => Promise<boolean>;
9
- /**
10
- * Deletes the JSON Web Token (JWT) cookie by sending a GET request to the backend server.
11
- * @returns {Promise<Response>} - A promise that resolves to the response from the server.
12
- */
13
- export declare const deleteWebTokenCookie: () => Promise<{
14
- methodresult: string;
15
- }>;
16
- /**
17
- * Retrieves the CSRF token from the local storage.
18
- * @returns The CSRF token.
19
- */
20
- export declare const getToken: () => string;
21
- export declare const setToken: (token: string) => void;
22
- /**
23
- * Logs in the user with the provided credentials.
24
- *
25
- * @param credentials - The user's login credentials.
26
- * @returns A promise that resolves to a boolean indicating whether the login was successful.
27
- */
28
- export declare const login: (credentails?: Credentials) => Promise<boolean>;
29
- /**
30
- * Logs out the user.
31
- * @returns {Promise<void>}
32
- */
33
- export declare const logout: () => Promise<void>;
34
- /**
35
- * Checks if the user is authenticated.
36
- * @returns {boolean} True if the user is authenticated, false otherwise.
37
- */
38
- export declare const isAuthenticated: () => boolean;
39
- //# sourceMappingURL=auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AA+EvC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAkBxD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;kBAQL,MAAM;EACjC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,cAAgD,CAAC;AACtE,eAAO,MAAM,QAAQ,UAAW,MAAM,SAA6C,CAAC;AAGpF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,iBAAwB,WAAW,KAAG,QAAQ,OAAO,CAkBtE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,qBAclB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,OAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -1,13 +0,0 @@
1
- import { ExportOutputFormat } from "./ExportOutputFormat";
2
- import { ExportSourceType } from "./ExportSourceType";
3
- /**
4
- * Data model of the Export dialog.
5
- */
6
- export interface ExportDialogModel {
7
- format: ExportOutputFormat;
8
- export: ExportSourceType;
9
- webService: string;
10
- maxCount?: number;
11
- queryName?: string;
12
- }
13
- //# sourceMappingURL=ExportDialogModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExportDialogModel.d.ts","sourceRoot":"","sources":["../../../src/types/config/ExportDialogModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AAGH,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Enum representing supported export format.
3
- */
4
- export declare enum ExportOutputFormat {
5
- None = 0,
6
- Csv = 1,
7
- Xlsx = 2,
8
- Json = 4
9
- }
10
- //# sourceMappingURL=ExportOutputFormat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExportOutputFormat.d.ts","sourceRoot":"","sources":["../../../src/types/config/ExportOutputFormat.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,oBAAY,kBAAkB;IAC1B,IAAI,IAAI;IACR,GAAG,IAAI;IACP,IAAI,IAAI;IACR,IAAI,IAAI;CACX"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Enum representing supported export source.
3
- */
4
- export declare enum ExportSourceType {
5
- None = 0,
6
- Result = 1,
7
- Selection = 2,
8
- SavedQuery = 4
9
- }
10
- //# sourceMappingURL=ExportSourceType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExportSourceType.d.ts","sourceRoot":"","sources":["../../../src/types/config/ExportSourceType.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,oBAAY,gBAAgB;IACxB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,SAAS,IAAI;IACb,UAAU,IAAI;CACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"bisect.d.ts","sourceRoot":"","sources":["../../../src/utils/array/bisect.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,GAAG,IAAI;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,CAAA;CAAE,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAQrF"}
File without changes
File without changes