@algolia/monitoring 1.0.0-alpha.3 → 1.0.0-alpha.30
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/dist/model/clientMethodProps.d.ts +38 -38
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/{monitoring.cjs.js → monitoring.cjs} +65 -103
- package/dist/monitoring.esm.browser.js +110 -135
- package/dist/monitoring.esm.node.js +66 -104
- package/dist/monitoring.umd.js +2 -2
- package/dist/src/monitoringClient.d.ts +30 -43
- package/dist/src/monitoringClient.d.ts.map +1 -1
- package/index.js +1 -1
- package/model/clientMethodProps.ts +40 -40
- package/package.json +9 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Metric } from './metric';
|
|
2
2
|
import type { Period } from './period';
|
|
3
3
|
/**
|
|
4
|
-
* Properties for the `
|
|
4
|
+
* Properties for the `customDelete` method.
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type CustomDeleteProps = {
|
|
7
7
|
/**
|
|
8
8
|
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
9
9
|
*/
|
|
@@ -14,9 +14,9 @@ export type DelProps = {
|
|
|
14
14
|
parameters?: Record<string, any>;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Properties for the `
|
|
17
|
+
* Properties for the `customGet` method.
|
|
18
18
|
*/
|
|
19
|
-
export type
|
|
19
|
+
export type CustomGetProps = {
|
|
20
20
|
/**
|
|
21
21
|
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
22
22
|
*/
|
|
@@ -26,6 +26,40 @@ export type GetProps = {
|
|
|
26
26
|
*/
|
|
27
27
|
parameters?: Record<string, any>;
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Properties for the `customPost` method.
|
|
31
|
+
*/
|
|
32
|
+
export type CustomPostProps = {
|
|
33
|
+
/**
|
|
34
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
35
|
+
*/
|
|
36
|
+
path: string;
|
|
37
|
+
/**
|
|
38
|
+
* Query parameters to apply to the current query.
|
|
39
|
+
*/
|
|
40
|
+
parameters?: Record<string, any>;
|
|
41
|
+
/**
|
|
42
|
+
* Parameters to send with the custom request.
|
|
43
|
+
*/
|
|
44
|
+
body?: Record<string, any>;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Properties for the `customPut` method.
|
|
48
|
+
*/
|
|
49
|
+
export type CustomPutProps = {
|
|
50
|
+
/**
|
|
51
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
52
|
+
*/
|
|
53
|
+
path: string;
|
|
54
|
+
/**
|
|
55
|
+
* Query parameters to apply to the current query.
|
|
56
|
+
*/
|
|
57
|
+
parameters?: Record<string, any>;
|
|
58
|
+
/**
|
|
59
|
+
* Parameters to send with the custom request.
|
|
60
|
+
*/
|
|
61
|
+
body?: Record<string, any>;
|
|
62
|
+
};
|
|
29
63
|
/**
|
|
30
64
|
* Properties for the `getClusterIncidents` method.
|
|
31
65
|
*/
|
|
@@ -84,38 +118,4 @@ export type GetReachabilityProps = {
|
|
|
84
118
|
*/
|
|
85
119
|
clusters: string;
|
|
86
120
|
};
|
|
87
|
-
/**
|
|
88
|
-
* Properties for the `post` method.
|
|
89
|
-
*/
|
|
90
|
-
export type PostProps = {
|
|
91
|
-
/**
|
|
92
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
93
|
-
*/
|
|
94
|
-
path: string;
|
|
95
|
-
/**
|
|
96
|
-
* Query parameters to apply to the current query.
|
|
97
|
-
*/
|
|
98
|
-
parameters?: Record<string, any>;
|
|
99
|
-
/**
|
|
100
|
-
* Parameters to send with the custom request.
|
|
101
|
-
*/
|
|
102
|
-
body?: Record<string, any>;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Properties for the `put` method.
|
|
106
|
-
*/
|
|
107
|
-
export type PutProps = {
|
|
108
|
-
/**
|
|
109
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
110
|
-
*/
|
|
111
|
-
path: string;
|
|
112
|
-
/**
|
|
113
|
-
* Query parameters to apply to the current query.
|
|
114
|
-
*/
|
|
115
|
-
parameters?: Record<string, any>;
|
|
116
|
-
/**
|
|
117
|
-
* Parameters to send with the custom request.
|
|
118
|
-
*/
|
|
119
|
-
body?: Record<string, any>;
|
|
120
|
-
};
|
|
121
121
|
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -4,42 +4,17 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// 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.
|
|
7
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
8
|
-
function getDefaultHosts(
|
|
7
|
+
const apiClientVersion = '1.0.0-alpha.30';
|
|
8
|
+
function getDefaultHosts() {
|
|
9
9
|
return [
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
accept: 'read',
|
|
13
|
-
protocol: 'https',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
url: `${appId}.algolia.net`,
|
|
17
|
-
accept: 'write',
|
|
18
|
-
protocol: 'https',
|
|
19
|
-
},
|
|
20
|
-
].concat(clientCommon.shuffle([
|
|
21
|
-
{
|
|
22
|
-
url: `${appId}-1.algolianet.com`,
|
|
23
|
-
accept: 'readWrite',
|
|
24
|
-
protocol: 'https',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
url: `${appId}-2.algolianet.com`,
|
|
28
|
-
accept: 'readWrite',
|
|
29
|
-
protocol: 'https',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
url: `${appId}-3.algolianet.com`,
|
|
33
|
-
accept: 'readWrite',
|
|
34
|
-
protocol: 'https',
|
|
35
|
-
},
|
|
36
|
-
]));
|
|
10
|
+
{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
|
|
11
|
+
];
|
|
37
12
|
}
|
|
38
13
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
39
14
|
function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
40
15
|
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
41
16
|
const transporter = clientCommon.createTransporter({
|
|
42
|
-
hosts: getDefaultHosts(
|
|
17
|
+
hosts: getDefaultHosts(),
|
|
43
18
|
...options,
|
|
44
19
|
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
45
20
|
algoliaAgents,
|
|
@@ -89,15 +64,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
89
64
|
/**
|
|
90
65
|
* This method allow you to send requests to the Algolia REST API.
|
|
91
66
|
*
|
|
92
|
-
* @
|
|
93
|
-
* @param
|
|
94
|
-
* @param
|
|
95
|
-
* @param del.parameters - Query parameters to apply to the current query.
|
|
67
|
+
* @param customDelete - The customDelete object.
|
|
68
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
69
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
96
70
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
97
71
|
*/
|
|
98
|
-
|
|
72
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
99
73
|
if (!path) {
|
|
100
|
-
throw new Error('Parameter `path` is required when calling `
|
|
74
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
101
75
|
}
|
|
102
76
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
103
77
|
const headers = {};
|
|
@@ -113,15 +87,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
113
87
|
/**
|
|
114
88
|
* This method allow you to send requests to the Algolia REST API.
|
|
115
89
|
*
|
|
116
|
-
* @
|
|
117
|
-
* @param
|
|
118
|
-
* @param
|
|
119
|
-
* @param get.parameters - Query parameters to apply to the current query.
|
|
90
|
+
* @param customGet - The customGet object.
|
|
91
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
92
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
120
93
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
121
94
|
*/
|
|
122
|
-
|
|
95
|
+
customGet({ path, parameters }, requestOptions) {
|
|
123
96
|
if (!path) {
|
|
124
|
-
throw new Error('Parameter `path` is required when calling `
|
|
97
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
125
98
|
}
|
|
126
99
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
127
100
|
const headers = {};
|
|
@@ -134,10 +107,59 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
134
107
|
};
|
|
135
108
|
return transporter.request(request, requestOptions);
|
|
136
109
|
},
|
|
110
|
+
/**
|
|
111
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
112
|
+
*
|
|
113
|
+
* @param customPost - The customPost object.
|
|
114
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
115
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
116
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
117
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
118
|
+
*/
|
|
119
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
120
|
+
if (!path) {
|
|
121
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
122
|
+
}
|
|
123
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
124
|
+
const headers = {};
|
|
125
|
+
const queryParameters = parameters ? parameters : {};
|
|
126
|
+
const request = {
|
|
127
|
+
method: 'POST',
|
|
128
|
+
path: requestPath,
|
|
129
|
+
queryParameters,
|
|
130
|
+
headers,
|
|
131
|
+
data: body ? body : {},
|
|
132
|
+
};
|
|
133
|
+
return transporter.request(request, requestOptions);
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
137
|
+
*
|
|
138
|
+
* @param customPut - The customPut object.
|
|
139
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
140
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
141
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
142
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
143
|
+
*/
|
|
144
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
145
|
+
if (!path) {
|
|
146
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
147
|
+
}
|
|
148
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
149
|
+
const headers = {};
|
|
150
|
+
const queryParameters = parameters ? parameters : {};
|
|
151
|
+
const request = {
|
|
152
|
+
method: 'PUT',
|
|
153
|
+
path: requestPath,
|
|
154
|
+
queryParameters,
|
|
155
|
+
headers,
|
|
156
|
+
data: body ? body : {},
|
|
157
|
+
};
|
|
158
|
+
return transporter.request(request, requestOptions);
|
|
159
|
+
},
|
|
137
160
|
/**
|
|
138
161
|
* List known incidents for selected clusters.
|
|
139
162
|
*
|
|
140
|
-
* @summary List incidents for selected clusters.
|
|
141
163
|
* @param getClusterIncidents - The getClusterIncidents object.
|
|
142
164
|
* @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
|
|
143
165
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -160,7 +182,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
160
182
|
/**
|
|
161
183
|
* Report whether a cluster is operational.
|
|
162
184
|
*
|
|
163
|
-
* @summary List statuses of selected clusters.
|
|
164
185
|
* @param getClusterStatus - The getClusterStatus object.
|
|
165
186
|
* @param getClusterStatus.clusters - Subset of clusters, separated by comma.
|
|
166
187
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -183,7 +204,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
183
204
|
/**
|
|
184
205
|
* List known incidents for all clusters.
|
|
185
206
|
*
|
|
186
|
-
* @summary List incidents.
|
|
187
207
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
188
208
|
*/
|
|
189
209
|
getIncidents(requestOptions) {
|
|
@@ -201,7 +221,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
201
221
|
/**
|
|
202
222
|
* List the average times for indexing operations for selected clusters.
|
|
203
223
|
*
|
|
204
|
-
* @summary Get indexing times.
|
|
205
224
|
* @param getIndexingTime - The getIndexingTime object.
|
|
206
225
|
* @param getIndexingTime.clusters - Subset of clusters, separated by comma.
|
|
207
226
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -224,7 +243,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
224
243
|
/**
|
|
225
244
|
* List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
|
|
226
245
|
*
|
|
227
|
-
* @summary List servers.
|
|
228
246
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
229
247
|
*/
|
|
230
248
|
getInventory(requestOptions) {
|
|
@@ -242,7 +260,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
242
260
|
/**
|
|
243
261
|
* List the average latency for search requests for selected clusters.
|
|
244
262
|
*
|
|
245
|
-
* @summary Get search latency times.
|
|
246
263
|
* @param getLatency - The getLatency object.
|
|
247
264
|
* @param getLatency.clusters - Subset of clusters, separated by comma.
|
|
248
265
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -265,7 +282,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
265
282
|
/**
|
|
266
283
|
* Report the aggregate value of a metric for a selected period of time.
|
|
267
284
|
*
|
|
268
|
-
* @summary Get metrics for a given period.
|
|
269
285
|
* @param getMetrics - The getMetrics object.
|
|
270
286
|
* @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use `*` as the parameter.
|
|
271
287
|
* @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.
|
|
@@ -294,7 +310,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
294
310
|
/**
|
|
295
311
|
* Test whether clusters are reachable or not.
|
|
296
312
|
*
|
|
297
|
-
* @summary Test the reachability of clusters.
|
|
298
313
|
* @param getReachability - The getReachability object.
|
|
299
314
|
* @param getReachability.clusters - Subset of clusters, separated by comma.
|
|
300
315
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -317,7 +332,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
317
332
|
/**
|
|
318
333
|
* Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
|
|
319
334
|
*
|
|
320
|
-
* @summary List cluster statuses.
|
|
321
335
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
322
336
|
*/
|
|
323
337
|
getStatus(requestOptions) {
|
|
@@ -332,58 +346,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
332
346
|
};
|
|
333
347
|
return transporter.request(request, requestOptions);
|
|
334
348
|
},
|
|
335
|
-
/**
|
|
336
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
337
|
-
*
|
|
338
|
-
* @summary Send requests to the Algolia REST API.
|
|
339
|
-
* @param post - The post object.
|
|
340
|
-
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
341
|
-
* @param post.parameters - Query parameters to apply to the current query.
|
|
342
|
-
* @param post.body - Parameters to send with the custom request.
|
|
343
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
344
|
-
*/
|
|
345
|
-
post({ path, parameters, body }, requestOptions) {
|
|
346
|
-
if (!path) {
|
|
347
|
-
throw new Error('Parameter `path` is required when calling `post`.');
|
|
348
|
-
}
|
|
349
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
350
|
-
const headers = {};
|
|
351
|
-
const queryParameters = parameters ? parameters : {};
|
|
352
|
-
const request = {
|
|
353
|
-
method: 'POST',
|
|
354
|
-
path: requestPath,
|
|
355
|
-
queryParameters,
|
|
356
|
-
headers,
|
|
357
|
-
data: body ? body : {},
|
|
358
|
-
};
|
|
359
|
-
return transporter.request(request, requestOptions);
|
|
360
|
-
},
|
|
361
|
-
/**
|
|
362
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
363
|
-
*
|
|
364
|
-
* @summary Send requests to the Algolia REST API.
|
|
365
|
-
* @param put - The put object.
|
|
366
|
-
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
367
|
-
* @param put.parameters - Query parameters to apply to the current query.
|
|
368
|
-
* @param put.body - Parameters to send with the custom request.
|
|
369
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
370
|
-
*/
|
|
371
|
-
put({ path, parameters, body }, requestOptions) {
|
|
372
|
-
if (!path) {
|
|
373
|
-
throw new Error('Parameter `path` is required when calling `put`.');
|
|
374
|
-
}
|
|
375
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
376
|
-
const headers = {};
|
|
377
|
-
const queryParameters = parameters ? parameters : {};
|
|
378
|
-
const request = {
|
|
379
|
-
method: 'PUT',
|
|
380
|
-
path: requestPath,
|
|
381
|
-
queryParameters,
|
|
382
|
-
headers,
|
|
383
|
-
data: body ? body : {},
|
|
384
|
-
};
|
|
385
|
-
return transporter.request(request, requestOptions);
|
|
386
|
-
},
|
|
387
349
|
};
|
|
388
350
|
}
|
|
389
351
|
|