@algolia/client-query-suggestions 5.0.0-alpha.10 → 5.0.0-alpha.101

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 (84) hide show
  1. package/dist/builds/browser.d.ts +5 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +5 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/{client-query-suggestions.cjs.js → client-query-suggestions.cjs} +361 -353
  6. package/dist/client-query-suggestions.esm.browser.js +573 -589
  7. package/dist/client-query-suggestions.esm.node.js +361 -351
  8. package/dist/client-query-suggestions.umd.js +2 -2
  9. package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts +15 -0
  10. package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts.map +1 -0
  11. package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts +7 -0
  12. package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts.map +1 -0
  13. package/dist/model/baseResponse.d.ts +11 -0
  14. package/dist/model/baseResponse.d.ts.map +1 -0
  15. package/dist/model/clientMethodProps.d.ts +107 -107
  16. package/dist/model/clientMethodProps.d.ts.map +1 -1
  17. package/dist/model/errorBase.d.ts +6 -6
  18. package/dist/model/errorBase.d.ts.map +1 -1
  19. package/dist/model/facet.d.ts +14 -0
  20. package/dist/model/facet.d.ts.map +1 -0
  21. package/dist/model/getConfigStatus200Response.d.ts +23 -0
  22. package/dist/model/getConfigStatus200Response.d.ts.map +1 -0
  23. package/dist/model/getLogFile200Response.d.ts +17 -0
  24. package/dist/model/getLogFile200Response.d.ts.map +1 -0
  25. package/dist/model/index.d.ts +14 -13
  26. package/dist/model/index.d.ts.map +1 -1
  27. package/dist/model/languages.d.ts +5 -0
  28. package/dist/model/languages.d.ts.map +1 -0
  29. package/dist/model/logLevel.d.ts +4 -4
  30. package/dist/model/logLevel.d.ts.map +1 -1
  31. package/dist/model/querySuggestionsConfiguration.d.ts +25 -0
  32. package/dist/model/querySuggestionsConfiguration.d.ts.map +1 -0
  33. package/dist/model/querySuggestionsConfigurationResponse.d.ts +4 -0
  34. package/dist/model/querySuggestionsConfigurationResponse.d.ts.map +1 -0
  35. package/dist/model/querySuggestionsConfigurationWithIndex.d.ts +7 -0
  36. package/dist/model/querySuggestionsConfigurationWithIndex.d.ts.map +1 -0
  37. package/dist/model/sourceIndex.d.ts +35 -31
  38. package/dist/model/sourceIndex.d.ts.map +1 -1
  39. package/dist/src/querySuggestionsClient.d.ts +151 -141
  40. package/dist/src/querySuggestionsClient.d.ts.map +1 -1
  41. package/index.js +1 -1
  42. package/model/baseQuerySuggestionsConfigurationResponse.ts +18 -0
  43. package/model/baseQuerySuggestionsConfigurationWithIndex.ts +8 -0
  44. package/model/baseResponse.ts +13 -0
  45. package/model/clientMethodProps.ts +50 -50
  46. package/model/errorBase.ts +1 -1
  47. package/model/facet.ts +16 -0
  48. package/model/getConfigStatus200Response.ts +28 -0
  49. package/model/getLogFile200Response.ts +22 -0
  50. package/model/index.ts +11 -10
  51. package/model/languages.ts +6 -0
  52. package/model/logLevel.ts +2 -2
  53. package/model/querySuggestionsConfiguration.ts +31 -0
  54. package/model/querySuggestionsConfigurationResponse.ts +8 -0
  55. package/model/querySuggestionsConfigurationWithIndex.ts +10 -0
  56. package/model/sourceIndex.ts +19 -14
  57. package/package.json +30 -13
  58. package/dist/model/indexName.d.ts +0 -7
  59. package/dist/model/indexName.d.ts.map +0 -1
  60. package/dist/model/logFile.d.ts +0 -17
  61. package/dist/model/logFile.d.ts.map +0 -1
  62. package/dist/model/querySuggestionsIndex.d.ts +0 -20
  63. package/dist/model/querySuggestionsIndex.d.ts.map +0 -1
  64. package/dist/model/querySuggestionsIndexParam.d.ts +0 -16
  65. package/dist/model/querySuggestionsIndexParam.d.ts.map +0 -1
  66. package/dist/model/querySuggestionsIndexWithIndexParam.d.ts +0 -4
  67. package/dist/model/querySuggestionsIndexWithIndexParam.d.ts.map +0 -1
  68. package/dist/model/sourceIndexExternal.d.ts +0 -11
  69. package/dist/model/sourceIndexExternal.d.ts.map +0 -1
  70. package/dist/model/sourceIndexWithReplicas.d.ts +0 -39
  71. package/dist/model/sourceIndexWithReplicas.d.ts.map +0 -1
  72. package/dist/model/status.d.ts +0 -15
  73. package/dist/model/status.d.ts.map +0 -1
  74. package/dist/model/successResponse.d.ts +0 -11
  75. package/dist/model/successResponse.d.ts.map +0 -1
  76. package/model/indexName.ts +0 -8
  77. package/model/logFile.ts +0 -22
  78. package/model/querySuggestionsIndex.ts +0 -25
  79. package/model/querySuggestionsIndexParam.ts +0 -20
  80. package/model/querySuggestionsIndexWithIndexParam.ts +0 -7
  81. package/model/sourceIndexExternal.ts +0 -13
  82. package/model/sourceIndexWithReplicas.ts +0 -48
  83. package/model/status.ts +0 -18
  84. package/model/successResponse.ts +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"sourceIndex.d.ts","sourceRoot":"","sources":["../../model/sourceIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,oBAAY,WAAW,GAAG;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAEpC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAClC,CAAC"}
1
+ {"version":3,"file":"sourceIndex.d.ts","sourceRoot":"","sources":["../../model/sourceIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC5B,CAAC"}
@@ -1,142 +1,152 @@
1
- import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { DelProps, DeleteConfigProps, GetProps, GetConfigProps, GetConfigStatusProps, GetLogFileProps, PostProps, PutProps, UpdateConfigProps } from '../model/clientMethodProps';
3
- import type { LogFile } from '../model/logFile';
4
- import type { QuerySuggestionsIndex } from '../model/querySuggestionsIndex';
5
- import type { QuerySuggestionsIndexWithIndexParam } from '../model/querySuggestionsIndexWithIndexParam';
6
- import type { Status } from '../model/status';
7
- import type { SuccessResponse } from '../model/successResponse';
8
- export declare const apiClientVersion = "5.0.0-alpha.10";
9
- export declare const REGIONS: readonly ["eu", "us"];
10
- export declare type Region = typeof REGIONS[number];
11
- export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
12
- region: Region;
13
- }): {
14
- transporter: import("@algolia/client-common").Transporter;
15
- /**
16
- * The `appId` currently in use.
17
- */
18
- appId: string;
19
- /**
20
- * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
21
- */
22
- clearCache(): Promise<void>;
23
- /**
24
- * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
25
- */
26
- readonly _ua: string;
27
- /**
28
- * Adds a `segment` to the `x-algolia-agent` sent with every requests.
29
- *
30
- * @param segment - The algolia agent (user-agent) segment to add.
31
- * @param version - The version of the agent.
32
- */
33
- addAlgoliaAgent(segment: string, version?: string): void;
34
- /**
35
- * Create a configuration of a Query Suggestions index. There\'s a limit of 100 configurations per application.
36
- *
37
- * @summary Create a configuration.
38
- * @param querySuggestionsIndexWithIndexParam - The querySuggestionsIndexWithIndexParam object.
39
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
40
- */
41
- createConfig(querySuggestionsIndexWithIndexParam: QuerySuggestionsIndexWithIndexParam, requestOptions?: RequestOptions): Promise<SuccessResponse>;
42
- /**
43
- * This method allow you to send requests to the Algolia REST API.
44
- *
45
- * @summary Send requests to the Algolia REST API.
46
- * @param del - The del object.
47
- * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
48
- * @param del.parameters - Query parameters to be applied to the current query.
49
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
50
- */
51
- del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
52
- /**
53
- * Delete a configuration of a Query Suggestion\'s index. By deleting a configuration, you stop all updates to the underlying query suggestion index. Note that when doing this, the underlying index does not change - existing suggestions remain untouched.
54
- *
55
- * @summary Delete a configuration.
56
- * @param deleteConfig - The deleteConfig object.
57
- * @param deleteConfig.indexName - The index in which to perform the request.
58
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
59
- */
60
- deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<SuccessResponse>;
61
- /**
62
- * This method allow you to send requests to the Algolia REST API.
63
- *
64
- * @summary Send requests to the Algolia REST API.
65
- * @param get - The get object.
66
- * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
67
- * @param get.parameters - Query parameters to be applied to the current query.
68
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
69
- */
70
- get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
71
- /**
72
- * Get all the configurations of Query Suggestions. For each index, you get a block of JSON with a list of its configuration settings.
73
- *
74
- * @summary List configurations.
75
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
76
- */
77
- getAllConfigs(requestOptions?: RequestOptions): Promise<QuerySuggestionsIndex[]>;
78
- /**
79
- * Get the configuration of a single Query Suggestions index.
80
- *
81
- * @summary Get a single configuration.
82
- * @param getConfig - The getConfig object.
83
- * @param getConfig.indexName - The index in which to perform the request.
84
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
85
- */
86
- getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<QuerySuggestionsIndex>;
87
- /**
88
- * Get the status of a Query Suggestion\'s index. The status includes whether the Query Suggestions index is currently in the process of being built, and the last build time.
89
- *
90
- * @summary Get configuration status.
91
- * @param getConfigStatus - The getConfigStatus object.
92
- * @param getConfigStatus.indexName - The index in which to perform the request.
93
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
94
- */
95
- getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<Status>;
96
- /**
97
- * Get the log file of the last build of a single Query Suggestion index.
98
- *
99
- * @summary Get a log file.
100
- * @param getLogFile - The getLogFile object.
101
- * @param getLogFile.indexName - The index in which to perform the request.
102
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
103
- */
104
- getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<LogFile[]>;
105
- /**
106
- * This method allow you to send requests to the Algolia REST API.
107
- *
108
- * @summary Send requests to the Algolia REST API.
109
- * @param post - The post object.
110
- * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
111
- * @param post.parameters - Query parameters to be applied to the current query.
112
- * @param post.body - The parameters to send with the custom request.
113
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
114
- */
115
- post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
116
- /**
117
- * This method allow you to send requests to the Algolia REST API.
118
- *
119
- * @summary Send requests to the Algolia REST API.
120
- * @param put - The put object.
121
- * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
122
- * @param put.parameters - Query parameters to be applied to the current query.
123
- * @param put.body - The parameters to send with the custom request.
124
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
125
- */
126
- put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
127
- /**
128
- * Update the configuration of a Query Suggestions index.
129
- *
130
- * @summary Update a configuration.
131
- * @param updateConfig - The updateConfig object.
132
- * @param updateConfig.indexName - The index in which to perform the request.
133
- * @param updateConfig.querySuggestionsIndexParam - The querySuggestionsIndexParam object.
134
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
135
- */
136
- updateConfig({ indexName, querySuggestionsIndexParam }: UpdateConfigProps, requestOptions?: RequestOptions): Promise<SuccessResponse>;
137
- };
138
- /**
139
- * The client type.
140
- */
141
- export declare type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;
1
+ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
+ import type { BaseResponse } from '../model/baseResponse';
3
+ import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteConfigProps, GetConfigProps, GetConfigStatusProps, GetLogFileProps, UpdateConfigProps } from '../model/clientMethodProps';
4
+ import type { GetConfigStatus200Response } from '../model/getConfigStatus200Response';
5
+ import type { GetLogFile200Response } from '../model/getLogFile200Response';
6
+ import type { QuerySuggestionsConfigurationResponse } from '../model/querySuggestionsConfigurationResponse';
7
+ import type { QuerySuggestionsConfigurationWithIndex } from '../model/querySuggestionsConfigurationWithIndex';
8
+ export declare const apiClientVersion = "5.0.0-alpha.101";
9
+ export declare const REGIONS: readonly ["eu", "us"];
10
+ export type Region = (typeof REGIONS)[number];
11
+ export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
12
+ region: Region;
13
+ }): {
14
+ transporter: import("@algolia/client-common").Transporter;
15
+ /**
16
+ * The `appId` currently in use.
17
+ */
18
+ appId: string;
19
+ /**
20
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
21
+ */
22
+ clearCache(): Promise<void>;
23
+ /**
24
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
25
+ */
26
+ readonly _ua: string;
27
+ /**
28
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
29
+ *
30
+ * @param segment - The algolia agent (user-agent) segment to add.
31
+ * @param version - The version of the agent.
32
+ */
33
+ addAlgoliaAgent(segment: string, version?: string): void;
34
+ /**
35
+ * Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
36
+ *
37
+ * Required API Key ACLs:
38
+ * - editSettings.
39
+ *
40
+ * @param querySuggestionsConfigurationWithIndex - The querySuggestionsConfigurationWithIndex object.
41
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
42
+ */
43
+ createConfig(querySuggestionsConfigurationWithIndex: QuerySuggestionsConfigurationWithIndex, requestOptions?: RequestOptions): Promise<BaseResponse>;
44
+ /**
45
+ * This method allow you to send requests to the Algolia REST API.
46
+ *
47
+ * @param customDelete - The customDelete object.
48
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
49
+ * @param customDelete.parameters - Query parameters to apply to the current query.
50
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
51
+ */
52
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
53
+ /**
54
+ * This method allow you to send requests to the Algolia REST API.
55
+ *
56
+ * @param customGet - The customGet object.
57
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
58
+ * @param customGet.parameters - Query parameters to apply to the current query.
59
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
+ */
61
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
+ /**
63
+ * This method allow you to send requests to the Algolia REST API.
64
+ *
65
+ * @param customPost - The customPost object.
66
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
67
+ * @param customPost.parameters - Query parameters to apply to the current query.
68
+ * @param customPost.body - Parameters to send with the custom request.
69
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
70
+ */
71
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
72
+ /**
73
+ * This method allow you to send requests to the Algolia REST API.
74
+ *
75
+ * @param customPut - The customPut object.
76
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
77
+ * @param customPut.parameters - Query parameters to apply to the current query.
78
+ * @param customPut.body - Parameters to send with the custom request.
79
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
80
+ */
81
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
82
+ /**
83
+ * Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
84
+ *
85
+ * Required API Key ACLs:
86
+ * - editSettings.
87
+ *
88
+ * @param deleteConfig - The deleteConfig object.
89
+ * @param deleteConfig.indexName - Query Suggestions index name.
90
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
91
+ */
92
+ deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse>;
93
+ /**
94
+ * List all Query Suggestions configurations of your Algolia application.
95
+ *
96
+ * Required API Key ACLs:
97
+ * - settings.
98
+ *
99
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
100
+ */
101
+ getAllConfigs(requestOptions?: RequestOptions): Promise<QuerySuggestionsConfigurationResponse[]>;
102
+ /**
103
+ * Get a single Query Suggestions configuration.
104
+ *
105
+ * Required API Key ACLs:
106
+ * - settings.
107
+ *
108
+ * @param getConfig - The getConfig object.
109
+ * @param getConfig.indexName - Query Suggestions index name.
110
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
111
+ */
112
+ getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<QuerySuggestionsConfigurationResponse>;
113
+ /**
114
+ * Report the status of a Query Suggestions index.
115
+ *
116
+ * Required API Key ACLs:
117
+ * - settings.
118
+ *
119
+ * @param getConfigStatus - The getConfigStatus object.
120
+ * @param getConfigStatus.indexName - Query Suggestions index name.
121
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
122
+ */
123
+ getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<GetConfigStatus200Response>;
124
+ /**
125
+ * Get the logs for a single Query Suggestions index.
126
+ *
127
+ * Required API Key ACLs:
128
+ * - settings.
129
+ *
130
+ * @param getLogFile - The getLogFile object.
131
+ * @param getLogFile.indexName - Query Suggestions index name.
132
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
133
+ */
134
+ getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<GetLogFile200Response>;
135
+ /**
136
+ * Update a QuerySuggestions configuration.
137
+ *
138
+ * Required API Key ACLs:
139
+ * - editSettings.
140
+ *
141
+ * @param updateConfig - The updateConfig object.
142
+ * @param updateConfig.indexName - Query Suggestions index name.
143
+ * @param updateConfig.querySuggestionsConfiguration - The querySuggestionsConfiguration object.
144
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
145
+ */
146
+ updateConfig({ indexName, querySuggestionsConfiguration }: UpdateConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse>;
147
+ };
148
+ /**
149
+ * The client type.
150
+ */
151
+ export type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;
142
152
  //# sourceMappingURL=querySuggestionsClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"querySuggestionsClient.d.ts","sourceRoot":"","sources":["../../src/querySuggestionsClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,QAAQ,EACR,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,8CAA8C,CAAC;AACxG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,oBAAY,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAY5C,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;IAwBvC;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,G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cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;gCAEc,iBAAiB,mBACf,cAAc,GAC9B,QAAQ,YAAY,CAAC;IAwBxB;;;;;;;OAOG;mCAEgB,cAAc,GAC9B,QAAQ,qCAAqC,EAAE,CAAC;IAenD;;;;;;;;;OASG;6BAEc,cAAc,mBACZ,cAAc,GAC9B,QAAQ,qCAAqC,CAAC;IAwBjD;;;;;;;;;OASG;mCAEc,oBAAoB,mBAClB,cAAc,GAC9B,QAAQ,0BAA0B,CAAC;IAwBtC;;;;;;;;;OASG;8BAEc,eAAe,mBACb,cAAc,GAC9B,QAAQ,qBAAqB,CAAC;IAwBjC;;;;;;;;;;OAUG;+DAE6C,iBAAiB,mBAC9C,cAAc,GAC9B,QAAQ,YAAY,CAAC;EAqC3B;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,OAAO,4BAA4B,CACpC,CAAC"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // eslint-disable-next-line import/no-commonjs,import/extensions
2
- module.exports = require('./dist/client-query-suggestions.cjs.js');
2
+ module.exports = require('./dist/client-query-suggestions.cjs');
@@ -0,0 +1,18 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ export type BaseQuerySuggestionsConfigurationResponse = {
4
+ /**
5
+ * API key used to read from your source index.
6
+ */
7
+ sourceIndicesAPIKey?: string;
8
+
9
+ /**
10
+ * API key used to write and configure your Query Suggestions index.
11
+ */
12
+ suggestionsIndicesAPIKey?: string;
13
+
14
+ /**
15
+ * API key used to read from external Algolia indices.
16
+ */
17
+ externalIndicesAPIKey?: string;
18
+ };
@@ -0,0 +1,8 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ export type BaseQuerySuggestionsConfigurationWithIndex = {
4
+ /**
5
+ * Query Suggestions index name.
6
+ */
7
+ indexName: string;
8
+ };
@@ -0,0 +1,13 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ export type BaseResponse = {
4
+ /**
5
+ * HTTP status code.
6
+ */
7
+ status?: number;
8
+
9
+ /**
10
+ * Details about the response, such as error messages.
11
+ */
12
+ message?: string;
13
+ };
@@ -1,109 +1,109 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- import type { QuerySuggestionsIndexParam } from './querySuggestionsIndexParam';
3
+ import type { QuerySuggestionsConfiguration } from './querySuggestionsConfiguration';
4
4
 
5
5
  /**
6
- * Properties for the `del` method.
6
+ * Properties for the `customDelete` method.
7
7
  */
8
- export type DelProps = {
8
+ export type CustomDeleteProps = {
9
9
  /**
10
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
10
+ * Path of the endpoint, anything after \"/1\" must be specified.
11
11
  */
12
12
  path: string;
13
13
  /**
14
- * Query parameters to be applied to the current query.
14
+ * Query parameters to apply to the current query.
15
15
  */
16
16
  parameters?: Record<string, any>;
17
17
  };
18
18
 
19
19
  /**
20
- * Properties for the `deleteConfig` method.
20
+ * Properties for the `customGet` method.
21
21
  */
22
- export type DeleteConfigProps = {
22
+ export type CustomGetProps = {
23
23
  /**
24
- * The index in which to perform the request.
24
+ * Path of the endpoint, anything after \"/1\" must be specified.
25
25
  */
26
- indexName: string;
26
+ path: string;
27
+ /**
28
+ * Query parameters to apply to the current query.
29
+ */
30
+ parameters?: Record<string, any>;
27
31
  };
28
32
 
29
33
  /**
30
- * Properties for the `get` method.
34
+ * Properties for the `customPost` method.
31
35
  */
32
- export type GetProps = {
36
+ export type CustomPostProps = {
33
37
  /**
34
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
38
+ * Path of the endpoint, anything after \"/1\" must be specified.
35
39
  */
36
40
  path: string;
37
41
  /**
38
- * Query parameters to be applied to the current query.
42
+ * Query parameters to apply to the current query.
39
43
  */
40
44
  parameters?: Record<string, any>;
45
+ /**
46
+ * Parameters to send with the custom request.
47
+ */
48
+ body?: Record<string, any>;
41
49
  };
42
50
 
43
51
  /**
44
- * Properties for the `getConfig` method.
52
+ * Properties for the `customPut` method.
45
53
  */
46
- export type GetConfigProps = {
54
+ export type CustomPutProps = {
47
55
  /**
48
- * The index in which to perform the request.
56
+ * Path of the endpoint, anything after \"/1\" must be specified.
49
57
  */
50
- indexName: string;
58
+ path: string;
59
+ /**
60
+ * Query parameters to apply to the current query.
61
+ */
62
+ parameters?: Record<string, any>;
63
+ /**
64
+ * Parameters to send with the custom request.
65
+ */
66
+ body?: Record<string, any>;
51
67
  };
52
68
 
53
69
  /**
54
- * Properties for the `getConfigStatus` method.
70
+ * Properties for the `deleteConfig` method.
55
71
  */
56
- export type GetConfigStatusProps = {
72
+ export type DeleteConfigProps = {
57
73
  /**
58
- * The index in which to perform the request.
74
+ * Query Suggestions index name.
59
75
  */
60
76
  indexName: string;
61
77
  };
62
78
 
63
79
  /**
64
- * Properties for the `getLogFile` method.
80
+ * Properties for the `getConfig` method.
65
81
  */
66
- export type GetLogFileProps = {
82
+ export type GetConfigProps = {
67
83
  /**
68
- * The index in which to perform the request.
84
+ * Query Suggestions index name.
69
85
  */
70
86
  indexName: string;
71
87
  };
72
88
 
73
89
  /**
74
- * Properties for the `post` method.
90
+ * Properties for the `getConfigStatus` method.
75
91
  */
76
- export type PostProps = {
77
- /**
78
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
79
- */
80
- path: string;
81
- /**
82
- * Query parameters to be applied to the current query.
83
- */
84
- parameters?: Record<string, any>;
92
+ export type GetConfigStatusProps = {
85
93
  /**
86
- * The parameters to send with the custom request.
94
+ * Query Suggestions index name.
87
95
  */
88
- body?: Record<string, any>;
96
+ indexName: string;
89
97
  };
90
98
 
91
99
  /**
92
- * Properties for the `put` method.
100
+ * Properties for the `getLogFile` method.
93
101
  */
94
- export type PutProps = {
95
- /**
96
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
97
- */
98
- path: string;
99
- /**
100
- * Query parameters to be applied to the current query.
101
- */
102
- parameters?: Record<string, any>;
102
+ export type GetLogFileProps = {
103
103
  /**
104
- * The parameters to send with the custom request.
104
+ * Query Suggestions index name.
105
105
  */
106
- body?: Record<string, any>;
106
+ indexName: string;
107
107
  };
108
108
 
109
109
  /**
@@ -111,8 +111,8 @@ export type PutProps = {
111
111
  */
112
112
  export type UpdateConfigProps = {
113
113
  /**
114
- * The index in which to perform the request.
114
+ * Query Suggestions index name.
115
115
  */
116
116
  indexName: string;
117
- querySuggestionsIndexParam: QuerySuggestionsIndexParam;
117
+ querySuggestionsConfiguration: QuerySuggestionsConfiguration;
118
118
  };
@@ -1,4 +1,4 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
4
  * Error.
package/model/facet.ts ADDED
@@ -0,0 +1,16 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ /**
4
+ * Facet to use as category.
5
+ */
6
+ export type Facet = {
7
+ /**
8
+ * Facet name.
9
+ */
10
+ attribute?: string;
11
+
12
+ /**
13
+ * Number of suggestions.
14
+ */
15
+ amount?: number;
16
+ };
@@ -0,0 +1,28 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ export type GetConfigStatus200Response = {
4
+ /**
5
+ * Query Suggestions index name.
6
+ */
7
+ indexName?: string;
8
+
9
+ /**
10
+ * Indicates whether the creation or update of the Query Suggestions is in progress.
11
+ */
12
+ isRunning?: boolean;
13
+
14
+ /**
15
+ * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last built.
16
+ */
17
+ lastBuiltAt?: string;
18
+
19
+ /**
20
+ * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last updated successfully.
21
+ */
22
+ lastSuccessfulBuiltAt?: string;
23
+
24
+ /**
25
+ * Duration of the last successful build in seconds.
26
+ */
27
+ lastSuccessfulBuildDuration?: string;
28
+ };
@@ -0,0 +1,22 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ import type { LogLevel } from './logLevel';
4
+
5
+ export type GetLogFile200Response = {
6
+ /**
7
+ * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
8
+ */
9
+ timestamp?: string;
10
+
11
+ level?: LogLevel;
12
+
13
+ /**
14
+ * Details about this log entry.
15
+ */
16
+ message?: string;
17
+
18
+ /**
19
+ * Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
20
+ */
21
+ contextLevel?: number;
22
+ };