@algolia/client-insights 0.0.0 → 5.0.0-alpha.10
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/builds/browser.d.ts +6 -0
- package/dist/builds/browser.d.ts.map +1 -0
- package/dist/builds/node.d.ts +6 -0
- package/dist/builds/node.d.ts.map +1 -0
- package/dist/client-insights.cjs.js +227 -0
- package/dist/client-insights.esm.browser.js +938 -0
- package/dist/client-insights.esm.node.js +222 -0
- package/dist/client-insights.umd.js +2 -0
- package/dist/model/clientMethodProps.d.ts +61 -0
- package/dist/model/clientMethodProps.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts +7 -0
- package/dist/model/errorBase.d.ts.map +1 -0
- package/dist/model/eventType.d.ts +2 -0
- package/dist/model/eventType.d.ts.map +1 -0
- package/dist/model/index.d.ts +7 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/insightEvent.d.ts +40 -0
- package/dist/model/insightEvent.d.ts.map +1 -0
- package/dist/model/insightEvents.d.ts +11 -0
- package/dist/model/insightEvents.d.ts.map +1 -0
- package/dist/model/pushEventsResponse.d.ts +7 -0
- package/dist/model/pushEventsResponse.d.ts.map +1 -0
- package/dist/src/insightsClient.d.ts +86 -0
- package/dist/src/insightsClient.d.ts.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/model/clientMethodProps.ts +65 -0
- package/model/errorBase.ts +8 -0
- package/model/eventType.ts +3 -0
- package/model/index.ts +8 -0
- package/model/insightEvent.ts +50 -0
- package/model/insightEvents.ts +13 -0
- package/model/pushEventsResponse.ts +8 -0
- package/package.json +37 -1
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';
|
|
2
|
+
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
|
+
|
|
4
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.10';
|
|
6
|
+
const REGIONS = ['de', 'us'];
|
|
7
|
+
function getDefaultHosts(region) {
|
|
8
|
+
const url = !region
|
|
9
|
+
? 'insights.algolia.io'
|
|
10
|
+
: 'insights.{region}.algolia.io'.replace('{region}', region);
|
|
11
|
+
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
12
|
+
}
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
14
|
+
function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
15
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
16
|
+
const transporter = createTransporter({
|
|
17
|
+
hosts: getDefaultHosts(regionOption),
|
|
18
|
+
...options,
|
|
19
|
+
algoliaAgent: getAlgoliaAgent({
|
|
20
|
+
algoliaAgents,
|
|
21
|
+
client: 'Insights',
|
|
22
|
+
version: apiClientVersion,
|
|
23
|
+
}),
|
|
24
|
+
baseHeaders: {
|
|
25
|
+
'content-type': 'text/plain',
|
|
26
|
+
...auth.headers(),
|
|
27
|
+
...options.baseHeaders,
|
|
28
|
+
},
|
|
29
|
+
baseQueryParameters: {
|
|
30
|
+
...auth.queryParameters(),
|
|
31
|
+
...options.baseQueryParameters,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
transporter,
|
|
36
|
+
/**
|
|
37
|
+
* The `appId` currently in use.
|
|
38
|
+
*/
|
|
39
|
+
appId: appIdOption,
|
|
40
|
+
/**
|
|
41
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
42
|
+
*/
|
|
43
|
+
clearCache() {
|
|
44
|
+
return Promise.all([
|
|
45
|
+
transporter.requestsCache.clear(),
|
|
46
|
+
transporter.responsesCache.clear(),
|
|
47
|
+
]).then(() => undefined);
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
51
|
+
*/
|
|
52
|
+
get _ua() {
|
|
53
|
+
return transporter.algoliaAgent.value;
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
57
|
+
*
|
|
58
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
59
|
+
* @param version - The version of the agent.
|
|
60
|
+
*/
|
|
61
|
+
addAlgoliaAgent(segment, version) {
|
|
62
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
66
|
+
*
|
|
67
|
+
* @summary Send requests to the Algolia REST API.
|
|
68
|
+
* @param del - The del object.
|
|
69
|
+
* @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
70
|
+
* @param del.parameters - Query parameters to be applied to the current query.
|
|
71
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
72
|
+
*/
|
|
73
|
+
del({ path, parameters }, requestOptions) {
|
|
74
|
+
if (!path) {
|
|
75
|
+
throw new Error('Parameter `path` is required when calling `del`.');
|
|
76
|
+
}
|
|
77
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
78
|
+
const headers = {};
|
|
79
|
+
const queryParameters = parameters ? parameters : {};
|
|
80
|
+
const request = {
|
|
81
|
+
method: 'DELETE',
|
|
82
|
+
path: requestPath,
|
|
83
|
+
queryParameters,
|
|
84
|
+
headers,
|
|
85
|
+
};
|
|
86
|
+
return transporter.request(request, requestOptions);
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
90
|
+
*
|
|
91
|
+
* @summary Send requests to the Algolia REST API.
|
|
92
|
+
* @param get - The get object.
|
|
93
|
+
* @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
94
|
+
* @param get.parameters - Query parameters to be applied to the current query.
|
|
95
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
96
|
+
*/
|
|
97
|
+
get({ path, parameters }, requestOptions) {
|
|
98
|
+
if (!path) {
|
|
99
|
+
throw new Error('Parameter `path` is required when calling `get`.');
|
|
100
|
+
}
|
|
101
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
102
|
+
const headers = {};
|
|
103
|
+
const queryParameters = parameters ? parameters : {};
|
|
104
|
+
const request = {
|
|
105
|
+
method: 'GET',
|
|
106
|
+
path: requestPath,
|
|
107
|
+
queryParameters,
|
|
108
|
+
headers,
|
|
109
|
+
};
|
|
110
|
+
return transporter.request(request, requestOptions);
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
114
|
+
*
|
|
115
|
+
* @summary Send requests to the Algolia REST API.
|
|
116
|
+
* @param post - The post object.
|
|
117
|
+
* @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
118
|
+
* @param post.parameters - Query parameters to be applied to the current query.
|
|
119
|
+
* @param post.body - The parameters to send with the custom request.
|
|
120
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
121
|
+
*/
|
|
122
|
+
post({ path, parameters, body }, requestOptions) {
|
|
123
|
+
if (!path) {
|
|
124
|
+
throw new Error('Parameter `path` is required when calling `post`.');
|
|
125
|
+
}
|
|
126
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
127
|
+
const headers = {};
|
|
128
|
+
const queryParameters = parameters ? parameters : {};
|
|
129
|
+
const request = {
|
|
130
|
+
method: 'POST',
|
|
131
|
+
path: requestPath,
|
|
132
|
+
queryParameters,
|
|
133
|
+
headers,
|
|
134
|
+
data: body ? body : {},
|
|
135
|
+
};
|
|
136
|
+
return transporter.request(request, requestOptions);
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* This command pushes an array of events. An event is - an action: `eventName` - performed in a context: `eventType` - at some point in time provided: `timestamp` - by an end user: `userToken` - on something: `index` Notes: - To be accepted, all events sent must be valid. - The size of the body must be *less than 2 MB*. - When an event is tied to an Algolia search, it must also provide a `queryID`. If that event is a `click`, their absolute `positions` should also be passed. - We consider that an `index` provides access to 2 resources: objects and filters. An event can only interact with a single resource type, but not necessarily on a single item. As such an event will accept an array of `objectIDs` or `filters`.
|
|
140
|
+
*
|
|
141
|
+
* @summary Push events.
|
|
142
|
+
* @param insightEvents - The insightEvents object.
|
|
143
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
144
|
+
*/
|
|
145
|
+
pushEvents(insightEvents, requestOptions) {
|
|
146
|
+
if (!insightEvents) {
|
|
147
|
+
throw new Error('Parameter `insightEvents` is required when calling `pushEvents`.');
|
|
148
|
+
}
|
|
149
|
+
if (!insightEvents.events) {
|
|
150
|
+
throw new Error('Parameter `insightEvents.events` is required when calling `pushEvents`.');
|
|
151
|
+
}
|
|
152
|
+
const requestPath = '/1/events';
|
|
153
|
+
const headers = {};
|
|
154
|
+
const queryParameters = {};
|
|
155
|
+
const request = {
|
|
156
|
+
method: 'POST',
|
|
157
|
+
path: requestPath,
|
|
158
|
+
queryParameters,
|
|
159
|
+
headers,
|
|
160
|
+
data: insightEvents,
|
|
161
|
+
};
|
|
162
|
+
return transporter.request(request, requestOptions);
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
166
|
+
*
|
|
167
|
+
* @summary Send requests to the Algolia REST API.
|
|
168
|
+
* @param put - The put object.
|
|
169
|
+
* @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
170
|
+
* @param put.parameters - Query parameters to be applied to the current query.
|
|
171
|
+
* @param put.body - The parameters to send with the custom request.
|
|
172
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
173
|
+
*/
|
|
174
|
+
put({ path, parameters, body }, requestOptions) {
|
|
175
|
+
if (!path) {
|
|
176
|
+
throw new Error('Parameter `path` is required when calling `put`.');
|
|
177
|
+
}
|
|
178
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
179
|
+
const headers = {};
|
|
180
|
+
const queryParameters = parameters ? parameters : {};
|
|
181
|
+
const request = {
|
|
182
|
+
method: 'PUT',
|
|
183
|
+
path: requestPath,
|
|
184
|
+
queryParameters,
|
|
185
|
+
headers,
|
|
186
|
+
data: body ? body : {},
|
|
187
|
+
};
|
|
188
|
+
return transporter.request(request, requestOptions);
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
194
|
+
function insightsClient(appId, apiKey, region, options) {
|
|
195
|
+
if (!appId || typeof appId !== 'string') {
|
|
196
|
+
throw new Error('`appId` is missing.');
|
|
197
|
+
}
|
|
198
|
+
if (!apiKey || typeof apiKey !== 'string') {
|
|
199
|
+
throw new Error('`apiKey` is missing.');
|
|
200
|
+
}
|
|
201
|
+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
|
|
202
|
+
throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`);
|
|
203
|
+
}
|
|
204
|
+
return createInsightsClient({
|
|
205
|
+
appId,
|
|
206
|
+
apiKey,
|
|
207
|
+
region,
|
|
208
|
+
timeouts: {
|
|
209
|
+
connect: DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
210
|
+
read: DEFAULT_READ_TIMEOUT_NODE,
|
|
211
|
+
write: DEFAULT_WRITE_TIMEOUT_NODE,
|
|
212
|
+
},
|
|
213
|
+
requester: createHttpRequester(),
|
|
214
|
+
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
215
|
+
responsesCache: createNullCache(),
|
|
216
|
+
requestsCache: createNullCache(),
|
|
217
|
+
hostsCache: createMemoryCache(),
|
|
218
|
+
...options,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { apiClientVersion, insightsClient };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! client-insights.umd.js | 5.0.0-alpha.10 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-insights"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r){super(e,r,"ApiError"),o(this,"status",void 0),this.status=t}}class h extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}function d(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function m({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:m}){async function g(c,m,g=!0){const f=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,m),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,m.headers),v="GET"===c.method?{...c.data,...m.data}:{},w={...s,...c.queryParameters,...v};if(a.value&&(w["x-algolia-agent"]=a.value),m&&m.queryParameters)for(const e of Object.keys(m.queryParameters))m.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(m.queryParameters[e])?w[e]=m.queryParameters[e].toString():w[e]=m.queryParameters[e];let q=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(f));let a=m.timeout;void 0===a&&(a=g?o.read:o.write);const v={data:y,headers:P,method:c.method,url:d(s,c.path,w),connectTimeout:r(q,o.connect),responseTimeout:r(q,a)},O=t=>{const r={request:v,response:t,host:s,triesLeft:e.length};return f.push(r),r},T=await i.send(v);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(T)){const a=O(T);return T.isTimedOut&&q++,console.log("Retryable failure",p(a)),await t.set(s,n(s,T.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(T))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(T);throw O(T),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new l(s,t,r)}(T,f)},O=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),T=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return b([...T.hosts].reverse(),T.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const n=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return m.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>m.set(o,e)})},requestsCache:c,responsesCache:m}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const f="5.0.0-alpha.10",y=["de","us"];e.apiClientVersion=f,e.insightsClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!y.includes(n)))throw new Error(`\`region\` must be one of the following: ${y.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=m({hosts:(c=a,[{url:c?"insights.{region}.algolia.io".replace("{region}",c):"insights.algolia.io",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:g({algoliaAgents:s,client:"Insights",version:f}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var c;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},pushEvents(e,t){if(!e)throw new Error("Parameter `insightEvents` is required when calling `pushEvents`.");if(!e.events)throw new Error("Parameter `insightEvents.events` is required when calling `pushEvents`.");const r={method:"POST",path:"/1/events",queryParameters:{},headers:{},data:e};return i.request(r,t)},put({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)}}}({appId:e,apiKey:a,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`5.0.0-alpha.10-${e}`}),s()]}),...o})}}));
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Properties for the `del` method.
|
|
3
|
+
*/
|
|
4
|
+
export declare type DelProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
7
|
+
*/
|
|
8
|
+
path: string;
|
|
9
|
+
/**
|
|
10
|
+
* Query parameters to be applied to the current query.
|
|
11
|
+
*/
|
|
12
|
+
parameters?: Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Properties for the `get` method.
|
|
16
|
+
*/
|
|
17
|
+
export declare type GetProps = {
|
|
18
|
+
/**
|
|
19
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
20
|
+
*/
|
|
21
|
+
path: string;
|
|
22
|
+
/**
|
|
23
|
+
* Query parameters to be applied to the current query.
|
|
24
|
+
*/
|
|
25
|
+
parameters?: Record<string, any>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Properties for the `post` method.
|
|
29
|
+
*/
|
|
30
|
+
export declare type PostProps = {
|
|
31
|
+
/**
|
|
32
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
33
|
+
*/
|
|
34
|
+
path: string;
|
|
35
|
+
/**
|
|
36
|
+
* Query parameters to be applied to the current query.
|
|
37
|
+
*/
|
|
38
|
+
parameters?: Record<string, any>;
|
|
39
|
+
/**
|
|
40
|
+
* The parameters to send with the custom request.
|
|
41
|
+
*/
|
|
42
|
+
body?: Record<string, any>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Properties for the `put` method.
|
|
46
|
+
*/
|
|
47
|
+
export declare type PutProps = {
|
|
48
|
+
/**
|
|
49
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
50
|
+
*/
|
|
51
|
+
path: string;
|
|
52
|
+
/**
|
|
53
|
+
* Query parameters to be applied to the current query.
|
|
54
|
+
*/
|
|
55
|
+
parameters?: Record<string, any>;
|
|
56
|
+
/**
|
|
57
|
+
* The parameters to send with the custom request.
|
|
58
|
+
*/
|
|
59
|
+
body?: Record<string, any>;
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS,GAAG;IACtB;;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,oBAAY,QAAQ,GAAG;IACrB;;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventType.d.ts","sourceRoot":"","sources":["../../model/eventType.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { EventType } from './eventType';
|
|
2
|
+
/**
|
|
3
|
+
* Insights event.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InsightEvent = {
|
|
6
|
+
eventType: EventType;
|
|
7
|
+
/**
|
|
8
|
+
* A user-defined string used to categorize events.
|
|
9
|
+
*/
|
|
10
|
+
eventName: string;
|
|
11
|
+
/**
|
|
12
|
+
* Name of the targeted index.
|
|
13
|
+
*/
|
|
14
|
+
index: string;
|
|
15
|
+
/**
|
|
16
|
+
* A user identifier. Depending if the user is logged-in or not, several strategies can be used from a sessionId to a technical identifier. You should always send pseudonymous or anonymous userTokens.
|
|
17
|
+
*/
|
|
18
|
+
userToken: string;
|
|
19
|
+
/**
|
|
20
|
+
* Time of the event expressed in milliseconds since the Unix epoch.
|
|
21
|
+
*/
|
|
22
|
+
timestamp?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Algolia queryID. This is required when an event is tied to a search.
|
|
25
|
+
*/
|
|
26
|
+
queryID?: string;
|
|
27
|
+
/**
|
|
28
|
+
* An array of index objectID. Limited to 20 objects. An event can’t have both objectIDs and filters at the same time.
|
|
29
|
+
*/
|
|
30
|
+
objectIDs?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* An array of filters. Limited to 10 filters. An event can’t have both objectIDs and filters at the same time.
|
|
33
|
+
*/
|
|
34
|
+
filters?: string[];
|
|
35
|
+
/**
|
|
36
|
+
* Position of the click in the list of Algolia search results. This field is required if a queryID is provided. One position must be provided for each objectID.
|
|
37
|
+
*/
|
|
38
|
+
positions?: number[];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=insightEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightEvent.d.ts","sourceRoot":"","sources":["../../model/insightEvent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,oBAAY,YAAY,GAAG;IACzB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightEvents.d.ts","sourceRoot":"","sources":["../../model/insightEvents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,oBAAY,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushEventsResponse.d.ts","sourceRoot":"","sources":["../../model/pushEventsResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
|
|
2
|
+
import type { DelProps, GetProps, PostProps, PutProps } from '../model/clientMethodProps';
|
|
3
|
+
import type { InsightEvents } from '../model/insightEvents';
|
|
4
|
+
import type { PushEventsResponse } from '../model/pushEventsResponse';
|
|
5
|
+
export declare const apiClientVersion = "5.0.0-alpha.10";
|
|
6
|
+
export declare const REGIONS: readonly ["de", "us"];
|
|
7
|
+
export declare type Region = typeof REGIONS[number];
|
|
8
|
+
export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
9
|
+
region?: Region;
|
|
10
|
+
}): {
|
|
11
|
+
transporter: import("@algolia/client-common").Transporter;
|
|
12
|
+
/**
|
|
13
|
+
* The `appId` currently in use.
|
|
14
|
+
*/
|
|
15
|
+
appId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
18
|
+
*/
|
|
19
|
+
clearCache(): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
22
|
+
*/
|
|
23
|
+
readonly _ua: string;
|
|
24
|
+
/**
|
|
25
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
26
|
+
*
|
|
27
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
28
|
+
* @param version - The version of the agent.
|
|
29
|
+
*/
|
|
30
|
+
addAlgoliaAgent(segment: string, version?: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
33
|
+
*
|
|
34
|
+
* @summary Send requests to the Algolia REST API.
|
|
35
|
+
* @param del - The del object.
|
|
36
|
+
* @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
37
|
+
* @param del.parameters - Query parameters to be applied to the current query.
|
|
38
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
39
|
+
*/
|
|
40
|
+
del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
41
|
+
/**
|
|
42
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
43
|
+
*
|
|
44
|
+
* @summary Send requests to the Algolia REST API.
|
|
45
|
+
* @param get - The get object.
|
|
46
|
+
* @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
47
|
+
* @param get.parameters - Query parameters to be applied to the current query.
|
|
48
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
49
|
+
*/
|
|
50
|
+
get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
51
|
+
/**
|
|
52
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
53
|
+
*
|
|
54
|
+
* @summary Send requests to the Algolia REST API.
|
|
55
|
+
* @param post - The post object.
|
|
56
|
+
* @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
57
|
+
* @param post.parameters - Query parameters to be applied to the current query.
|
|
58
|
+
* @param post.body - The parameters to send with the custom request.
|
|
59
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
60
|
+
*/
|
|
61
|
+
post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
62
|
+
/**
|
|
63
|
+
* This command pushes an array of events. An event is - an action: `eventName` - performed in a context: `eventType` - at some point in time provided: `timestamp` - by an end user: `userToken` - on something: `index` Notes: - To be accepted, all events sent must be valid. - The size of the body must be *less than 2 MB*. - When an event is tied to an Algolia search, it must also provide a `queryID`. If that event is a `click`, their absolute `positions` should also be passed. - We consider that an `index` provides access to 2 resources: objects and filters. An event can only interact with a single resource type, but not necessarily on a single item. As such an event will accept an array of `objectIDs` or `filters`.
|
|
64
|
+
*
|
|
65
|
+
* @summary Push events.
|
|
66
|
+
* @param insightEvents - The insightEvents object.
|
|
67
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
68
|
+
*/
|
|
69
|
+
pushEvents(insightEvents: InsightEvents, requestOptions?: RequestOptions): Promise<PushEventsResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
72
|
+
*
|
|
73
|
+
* @summary Send requests to the Algolia REST API.
|
|
74
|
+
* @param put - The put object.
|
|
75
|
+
* @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
76
|
+
* @param put.parameters - Query parameters to be applied to the current query.
|
|
77
|
+
* @param put.body - The parameters to send with the custom request.
|
|
78
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
79
|
+
*/
|
|
80
|
+
put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* The client type.
|
|
84
|
+
*/
|
|
85
|
+
export declare type InsightsClient = ReturnType<typeof createInsightsClient>;
|
|
86
|
+
//# sourceMappingURL=insightsClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightsClient.d.ts","sourceRoot":"","sources":["../../src/insightsClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,oBAAY,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAW5C,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAwBxC;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;OAMG;8BAEc,aAAa,mBACX,cAAc,GAC9B,QAAQ,kBAAkB,CAAC;IA4B9B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;EAoBlC;AAED;;GAEG;AACH,oBAAY,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Properties for the `del` method.
|
|
5
|
+
*/
|
|
6
|
+
export type DelProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
9
|
+
*/
|
|
10
|
+
path: string;
|
|
11
|
+
/**
|
|
12
|
+
* Query parameters to be applied to the current query.
|
|
13
|
+
*/
|
|
14
|
+
parameters?: Record<string, any>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Properties for the `get` method.
|
|
19
|
+
*/
|
|
20
|
+
export type GetProps = {
|
|
21
|
+
/**
|
|
22
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
23
|
+
*/
|
|
24
|
+
path: string;
|
|
25
|
+
/**
|
|
26
|
+
* Query parameters to be applied to the current query.
|
|
27
|
+
*/
|
|
28
|
+
parameters?: Record<string, any>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Properties for the `post` method.
|
|
33
|
+
*/
|
|
34
|
+
export type PostProps = {
|
|
35
|
+
/**
|
|
36
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
37
|
+
*/
|
|
38
|
+
path: string;
|
|
39
|
+
/**
|
|
40
|
+
* Query parameters to be applied to the current query.
|
|
41
|
+
*/
|
|
42
|
+
parameters?: Record<string, any>;
|
|
43
|
+
/**
|
|
44
|
+
* The parameters to send with the custom request.
|
|
45
|
+
*/
|
|
46
|
+
body?: Record<string, any>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Properties for the `put` method.
|
|
51
|
+
*/
|
|
52
|
+
export type PutProps = {
|
|
53
|
+
/**
|
|
54
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
55
|
+
*/
|
|
56
|
+
path: string;
|
|
57
|
+
/**
|
|
58
|
+
* Query parameters to be applied to the current query.
|
|
59
|
+
*/
|
|
60
|
+
parameters?: Record<string, any>;
|
|
61
|
+
/**
|
|
62
|
+
* The parameters to send with the custom request.
|
|
63
|
+
*/
|
|
64
|
+
body?: Record<string, any>;
|
|
65
|
+
};
|
package/model/index.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export * from './errorBase';
|
|
4
|
+
export * from './eventType';
|
|
5
|
+
export * from './insightEvent';
|
|
6
|
+
export * from './insightEvents';
|
|
7
|
+
export * from './pushEventsResponse';
|
|
8
|
+
export * from './clientMethodProps';
|