@codeserk/forge-api-public-generated 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +10 -2
- package/dist/index.cjs +2211 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1955 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +1955 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2012 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +39 -4
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2211 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/generated/runtime.ts
|
|
3
|
+
/**
|
|
4
|
+
* Forge API / Public
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
15
|
+
var Configuration = class {
|
|
16
|
+
constructor(configuration = {}) {
|
|
17
|
+
this.configuration = configuration;
|
|
18
|
+
}
|
|
19
|
+
set config(configuration) {
|
|
20
|
+
this.configuration = configuration;
|
|
21
|
+
}
|
|
22
|
+
get basePath() {
|
|
23
|
+
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
|
|
24
|
+
}
|
|
25
|
+
get fetchApi() {
|
|
26
|
+
return this.configuration.fetchApi;
|
|
27
|
+
}
|
|
28
|
+
get middleware() {
|
|
29
|
+
return this.configuration.middleware || [];
|
|
30
|
+
}
|
|
31
|
+
get queryParamsStringify() {
|
|
32
|
+
return this.configuration.queryParamsStringify || querystring;
|
|
33
|
+
}
|
|
34
|
+
get username() {
|
|
35
|
+
return this.configuration.username;
|
|
36
|
+
}
|
|
37
|
+
get password() {
|
|
38
|
+
return this.configuration.password;
|
|
39
|
+
}
|
|
40
|
+
get apiKey() {
|
|
41
|
+
const apiKey = this.configuration.apiKey;
|
|
42
|
+
if (apiKey) return typeof apiKey === "function" ? apiKey : () => apiKey;
|
|
43
|
+
}
|
|
44
|
+
get accessToken() {
|
|
45
|
+
const accessToken = this.configuration.accessToken;
|
|
46
|
+
if (accessToken) return typeof accessToken === "function" ? accessToken : async () => accessToken;
|
|
47
|
+
}
|
|
48
|
+
get headers() {
|
|
49
|
+
return this.configuration.headers;
|
|
50
|
+
}
|
|
51
|
+
get credentials() {
|
|
52
|
+
return this.configuration.credentials;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const DefaultConfig = new Configuration();
|
|
56
|
+
/**
|
|
57
|
+
* This is the base class for all generated API classes.
|
|
58
|
+
*/
|
|
59
|
+
var BaseAPI = class BaseAPI {
|
|
60
|
+
static {
|
|
61
|
+
this.jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
|
|
62
|
+
}
|
|
63
|
+
constructor(configuration = DefaultConfig) {
|
|
64
|
+
this.configuration = configuration;
|
|
65
|
+
this.fetchApi = async (url, init) => {
|
|
66
|
+
let fetchParams = {
|
|
67
|
+
url,
|
|
68
|
+
init
|
|
69
|
+
};
|
|
70
|
+
for (const middleware of this.middleware) if (middleware.pre) fetchParams = await middleware.pre({
|
|
71
|
+
fetch: this.fetchApi,
|
|
72
|
+
...fetchParams
|
|
73
|
+
}) || fetchParams;
|
|
74
|
+
let response = void 0;
|
|
75
|
+
try {
|
|
76
|
+
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
77
|
+
} catch (e) {
|
|
78
|
+
for (const middleware of this.middleware) if (middleware.onError) response = await middleware.onError({
|
|
79
|
+
fetch: this.fetchApi,
|
|
80
|
+
url: fetchParams.url,
|
|
81
|
+
init: fetchParams.init,
|
|
82
|
+
error: e,
|
|
83
|
+
response: response ? response.clone() : void 0
|
|
84
|
+
}) || response;
|
|
85
|
+
if (response === void 0) if (e instanceof Error) throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
|
|
86
|
+
else throw e;
|
|
87
|
+
}
|
|
88
|
+
for (const middleware of this.middleware) if (middleware.post) response = await middleware.post({
|
|
89
|
+
fetch: this.fetchApi,
|
|
90
|
+
url: fetchParams.url,
|
|
91
|
+
init: fetchParams.init,
|
|
92
|
+
response: response.clone()
|
|
93
|
+
}) || response;
|
|
94
|
+
return response;
|
|
95
|
+
};
|
|
96
|
+
this.middleware = configuration.middleware;
|
|
97
|
+
}
|
|
98
|
+
withMiddleware(...middlewares) {
|
|
99
|
+
const next = this.clone();
|
|
100
|
+
next.middleware = next.middleware.concat(...middlewares);
|
|
101
|
+
return next;
|
|
102
|
+
}
|
|
103
|
+
withPreMiddleware(...preMiddlewares) {
|
|
104
|
+
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
105
|
+
return this.withMiddleware(...middlewares);
|
|
106
|
+
}
|
|
107
|
+
withPostMiddleware(...postMiddlewares) {
|
|
108
|
+
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
109
|
+
return this.withMiddleware(...middlewares);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Check if the given MIME is a JSON MIME.
|
|
113
|
+
* JSON MIME examples:
|
|
114
|
+
* application/json
|
|
115
|
+
* application/json; charset=UTF8
|
|
116
|
+
* APPLICATION/JSON
|
|
117
|
+
* application/vnd.company+json
|
|
118
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
119
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
120
|
+
*/
|
|
121
|
+
isJsonMime(mime) {
|
|
122
|
+
if (!mime) return false;
|
|
123
|
+
return BaseAPI.jsonRegex.test(mime);
|
|
124
|
+
}
|
|
125
|
+
async request(context, initOverrides) {
|
|
126
|
+
const { url, init } = await this.createFetchParams(context, initOverrides);
|
|
127
|
+
const response = await this.fetchApi(url, init);
|
|
128
|
+
if (response && response.status >= 200 && response.status < 300) return response;
|
|
129
|
+
throw new ResponseError(response, "Response returned an error code");
|
|
130
|
+
}
|
|
131
|
+
async createFetchParams(context, initOverrides) {
|
|
132
|
+
let url = this.configuration.basePath + context.path;
|
|
133
|
+
if (context.query !== void 0 && Object.keys(context.query).length !== 0) url += "?" + this.configuration.queryParamsStringify(context.query);
|
|
134
|
+
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
135
|
+
Object.keys(headers).forEach((key) => headers[key] === void 0 ? delete headers[key] : {});
|
|
136
|
+
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
|
|
137
|
+
const initParams = {
|
|
138
|
+
method: context.method,
|
|
139
|
+
headers,
|
|
140
|
+
body: context.body,
|
|
141
|
+
credentials: this.configuration.credentials
|
|
142
|
+
};
|
|
143
|
+
const overriddenInit = {
|
|
144
|
+
...initParams,
|
|
145
|
+
...await initOverrideFn({
|
|
146
|
+
init: initParams,
|
|
147
|
+
context
|
|
148
|
+
})
|
|
149
|
+
};
|
|
150
|
+
let body;
|
|
151
|
+
if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) body = overriddenInit.body;
|
|
152
|
+
else if (this.isJsonMime(headers["Content-Type"])) body = JSON.stringify(overriddenInit.body);
|
|
153
|
+
else body = overriddenInit.body;
|
|
154
|
+
const init = {
|
|
155
|
+
...overriddenInit,
|
|
156
|
+
body
|
|
157
|
+
};
|
|
158
|
+
return {
|
|
159
|
+
url,
|
|
160
|
+
init
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
165
|
+
* and then shallow cloning data members.
|
|
166
|
+
*/
|
|
167
|
+
clone() {
|
|
168
|
+
const constructor = this.constructor;
|
|
169
|
+
const next = new constructor(this.configuration);
|
|
170
|
+
next.middleware = this.middleware.slice();
|
|
171
|
+
return next;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
function isBlob(value) {
|
|
175
|
+
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
176
|
+
}
|
|
177
|
+
function isFormData(value) {
|
|
178
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
179
|
+
}
|
|
180
|
+
var ResponseError = class extends Error {
|
|
181
|
+
constructor(response, msg) {
|
|
182
|
+
super(msg);
|
|
183
|
+
this.response = response;
|
|
184
|
+
this.name = "ResponseError";
|
|
185
|
+
const actualProto = new.target.prototype;
|
|
186
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
var FetchError = class extends Error {
|
|
190
|
+
constructor(cause, msg) {
|
|
191
|
+
super(msg);
|
|
192
|
+
this.cause = cause;
|
|
193
|
+
this.name = "FetchError";
|
|
194
|
+
const actualProto = new.target.prototype;
|
|
195
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
var RequiredError = class extends Error {
|
|
199
|
+
constructor(field, msg) {
|
|
200
|
+
super(msg);
|
|
201
|
+
this.field = field;
|
|
202
|
+
this.name = "RequiredError";
|
|
203
|
+
const actualProto = new.target.prototype;
|
|
204
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const COLLECTION_FORMATS = {
|
|
208
|
+
csv: ",",
|
|
209
|
+
ssv: " ",
|
|
210
|
+
tsv: " ",
|
|
211
|
+
pipes: "|"
|
|
212
|
+
};
|
|
213
|
+
function querystring(params, prefix = "") {
|
|
214
|
+
return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
|
|
215
|
+
}
|
|
216
|
+
function querystringSingleKey(key, value, keyPrefix = "") {
|
|
217
|
+
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
218
|
+
if (value instanceof Array) {
|
|
219
|
+
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
|
|
220
|
+
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
221
|
+
}
|
|
222
|
+
if (value instanceof Set) return querystringSingleKey(key, Array.from(value), keyPrefix);
|
|
223
|
+
if (value instanceof Date) return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
224
|
+
if (value instanceof Object) return querystring(value, fullKey);
|
|
225
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
226
|
+
}
|
|
227
|
+
function exists(json, key) {
|
|
228
|
+
const value = json[key];
|
|
229
|
+
return value !== null && value !== void 0;
|
|
230
|
+
}
|
|
231
|
+
function mapValues(data, fn) {
|
|
232
|
+
const result = {};
|
|
233
|
+
for (const key of Object.keys(data)) result[key] = fn(data[key]);
|
|
234
|
+
return result;
|
|
235
|
+
}
|
|
236
|
+
function canConsumeForm(consumes) {
|
|
237
|
+
for (const consume of consumes) if ("multipart/form-data" === consume.contentType) return true;
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
var JSONApiResponse = class {
|
|
241
|
+
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
242
|
+
this.raw = raw;
|
|
243
|
+
this.transformer = transformer;
|
|
244
|
+
}
|
|
245
|
+
async value() {
|
|
246
|
+
return this.transformer(await this.raw.json());
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
var VoidApiResponse = class {
|
|
250
|
+
constructor(raw) {
|
|
251
|
+
this.raw = raw;
|
|
252
|
+
}
|
|
253
|
+
async value() {}
|
|
254
|
+
};
|
|
255
|
+
var BlobApiResponse = class {
|
|
256
|
+
constructor(raw) {
|
|
257
|
+
this.raw = raw;
|
|
258
|
+
}
|
|
259
|
+
async value() {
|
|
260
|
+
return await this.raw.blob();
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
var TextApiResponse = class {
|
|
264
|
+
constructor(raw) {
|
|
265
|
+
this.raw = raw;
|
|
266
|
+
}
|
|
267
|
+
async value() {
|
|
268
|
+
return await this.raw.text();
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/generated/models/UploadDebugSymbolsSourceMapRequest.ts
|
|
273
|
+
/**
|
|
274
|
+
* @export
|
|
275
|
+
*/
|
|
276
|
+
const UploadDebugSymbolsSourceMapRequestFormatVersionEnum = { NUMBER_1: 1 };
|
|
277
|
+
/**
|
|
278
|
+
* Check if a given object implements the UploadDebugSymbolsSourceMapRequest interface.
|
|
279
|
+
*/
|
|
280
|
+
function instanceOfUploadDebugSymbolsSourceMapRequest(value) {
|
|
281
|
+
if (!("formatVersion" in value) || value["formatVersion"] === void 0) return false;
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
function UploadDebugSymbolsSourceMapRequestFromJSON(json) {
|
|
285
|
+
return UploadDebugSymbolsSourceMapRequestFromJSONTyped(json, false);
|
|
286
|
+
}
|
|
287
|
+
function UploadDebugSymbolsSourceMapRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
288
|
+
if (json == null) return json;
|
|
289
|
+
return {
|
|
290
|
+
"formatVersion": json["formatVersion"],
|
|
291
|
+
"ignoredSources": json["ignoredSources"] == null ? void 0 : json["ignoredSources"],
|
|
292
|
+
"names": json["names"] == null ? void 0 : json["names"],
|
|
293
|
+
"segments": json["segments"] == null ? void 0 : json["segments"],
|
|
294
|
+
"sources": json["sources"] == null ? void 0 : json["sources"]
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
function UploadDebugSymbolsSourceMapRequestToJSON(json) {
|
|
298
|
+
return UploadDebugSymbolsSourceMapRequestToJSONTyped(json, false);
|
|
299
|
+
}
|
|
300
|
+
function UploadDebugSymbolsSourceMapRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
301
|
+
if (value == null) return value;
|
|
302
|
+
return {
|
|
303
|
+
"formatVersion": value["formatVersion"],
|
|
304
|
+
"ignoredSources": value["ignoredSources"],
|
|
305
|
+
"names": value["names"],
|
|
306
|
+
"segments": value["segments"],
|
|
307
|
+
"sources": value["sources"]
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/generated/models/UploadDebugSymbolsFileRequest.ts
|
|
312
|
+
/**
|
|
313
|
+
* Check if a given object implements the UploadDebugSymbolsFileRequest interface.
|
|
314
|
+
*/
|
|
315
|
+
function instanceOfUploadDebugSymbolsFileRequest(value) {
|
|
316
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
317
|
+
if (!("sourceMap" in value) || value["sourceMap"] === void 0) return false;
|
|
318
|
+
return true;
|
|
319
|
+
}
|
|
320
|
+
function UploadDebugSymbolsFileRequestFromJSON(json) {
|
|
321
|
+
return UploadDebugSymbolsFileRequestFromJSONTyped(json, false);
|
|
322
|
+
}
|
|
323
|
+
function UploadDebugSymbolsFileRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
324
|
+
if (json == null) return json;
|
|
325
|
+
return {
|
|
326
|
+
"name": json["name"],
|
|
327
|
+
"sourceMap": UploadDebugSymbolsSourceMapRequestFromJSON(json["sourceMap"])
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function UploadDebugSymbolsFileRequestToJSON(json) {
|
|
331
|
+
return UploadDebugSymbolsFileRequestToJSONTyped(json, false);
|
|
332
|
+
}
|
|
333
|
+
function UploadDebugSymbolsFileRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
334
|
+
if (value == null) return value;
|
|
335
|
+
return {
|
|
336
|
+
"name": value["name"],
|
|
337
|
+
"sourceMap": UploadDebugSymbolsSourceMapRequestToJSON(value["sourceMap"])
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region src/generated/models/UploadDebugSymbolsRequest.ts
|
|
342
|
+
/**
|
|
343
|
+
* @export
|
|
344
|
+
*/
|
|
345
|
+
const UploadDebugSymbolsRequestTypeEnum = { Sourcemap: "sourcemap" };
|
|
346
|
+
/**
|
|
347
|
+
* Check if a given object implements the UploadDebugSymbolsRequest interface.
|
|
348
|
+
*/
|
|
349
|
+
function instanceOfUploadDebugSymbolsRequest(value) {
|
|
350
|
+
if (!("files" in value) || value["files"] === void 0) return false;
|
|
351
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
352
|
+
if (!("version" in value) || value["version"] === void 0) return false;
|
|
353
|
+
return true;
|
|
354
|
+
}
|
|
355
|
+
function UploadDebugSymbolsRequestFromJSON(json) {
|
|
356
|
+
return UploadDebugSymbolsRequestFromJSONTyped(json, false);
|
|
357
|
+
}
|
|
358
|
+
function UploadDebugSymbolsRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
359
|
+
if (json == null) return json;
|
|
360
|
+
return {
|
|
361
|
+
"files": json["files"].map(UploadDebugSymbolsFileRequestFromJSON),
|
|
362
|
+
"type": json["type"],
|
|
363
|
+
"version": json["version"]
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function UploadDebugSymbolsRequestToJSON(json) {
|
|
367
|
+
return UploadDebugSymbolsRequestToJSONTyped(json, false);
|
|
368
|
+
}
|
|
369
|
+
function UploadDebugSymbolsRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
370
|
+
if (value == null) return value;
|
|
371
|
+
return {
|
|
372
|
+
"files": value["files"].map(UploadDebugSymbolsFileRequestToJSON),
|
|
373
|
+
"type": value["type"],
|
|
374
|
+
"version": value["version"]
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region src/generated/apis/DebugSymbolsApi.ts
|
|
379
|
+
/**
|
|
380
|
+
* Forge API / Public
|
|
381
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
382
|
+
*
|
|
383
|
+
* The version of the OpenAPI document: 1.0
|
|
384
|
+
*
|
|
385
|
+
*
|
|
386
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
387
|
+
* https://openapi-generator.tech
|
|
388
|
+
* Do not edit the class manually.
|
|
389
|
+
*/
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
*/
|
|
393
|
+
var DebugSymbolsApi = class extends BaseAPI {
|
|
394
|
+
/**
|
|
395
|
+
* Creates request options for uploadDebugSymbols without sending the request
|
|
396
|
+
*/
|
|
397
|
+
async uploadDebugSymbolsRequestOpts(requestParameters) {
|
|
398
|
+
const queryParameters = {};
|
|
399
|
+
const headerParameters = {};
|
|
400
|
+
headerParameters["Content-Type"] = "application/json";
|
|
401
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
402
|
+
return {
|
|
403
|
+
path: `/api/v1/debug-symbols`,
|
|
404
|
+
method: "POST",
|
|
405
|
+
headers: headerParameters,
|
|
406
|
+
query: queryParameters,
|
|
407
|
+
body: UploadDebugSymbolsRequestToJSON(requestParameters["uploadDebugSymbolsRequest"])
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Stores the source map of every generated file of the build, replacing the files the version had.
|
|
412
|
+
* Upload the debug symbols of a build
|
|
413
|
+
*/
|
|
414
|
+
async uploadDebugSymbolsRaw(requestParameters, initOverrides) {
|
|
415
|
+
const requestOptions = await this.uploadDebugSymbolsRequestOpts(requestParameters);
|
|
416
|
+
return new VoidApiResponse(await this.request(requestOptions, initOverrides));
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Stores the source map of every generated file of the build, replacing the files the version had.
|
|
420
|
+
* Upload the debug symbols of a build
|
|
421
|
+
*/
|
|
422
|
+
async uploadDebugSymbols(requestParameters = {}, initOverrides) {
|
|
423
|
+
await this.uploadDebugSymbolsRaw(requestParameters, initOverrides);
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/generated/models/HealthResponse.ts
|
|
428
|
+
/**
|
|
429
|
+
* Check if a given object implements the HealthResponse interface.
|
|
430
|
+
*/
|
|
431
|
+
function instanceOfHealthResponse(value) {
|
|
432
|
+
if (!("ok" in value) || value["ok"] === void 0) return false;
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
function HealthResponseFromJSON(json) {
|
|
436
|
+
return HealthResponseFromJSONTyped(json, false);
|
|
437
|
+
}
|
|
438
|
+
function HealthResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
439
|
+
if (json == null) return json;
|
|
440
|
+
return { "ok": json["ok"] };
|
|
441
|
+
}
|
|
442
|
+
function HealthResponseToJSON(json) {
|
|
443
|
+
return HealthResponseToJSONTyped(json, false);
|
|
444
|
+
}
|
|
445
|
+
function HealthResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
446
|
+
if (value == null) return value;
|
|
447
|
+
return { "ok": value["ok"] };
|
|
448
|
+
}
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region src/generated/apis/HealthApi.ts
|
|
451
|
+
/**
|
|
452
|
+
* Forge API / Public
|
|
453
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
454
|
+
*
|
|
455
|
+
* The version of the OpenAPI document: 1.0
|
|
456
|
+
*
|
|
457
|
+
*
|
|
458
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
459
|
+
* https://openapi-generator.tech
|
|
460
|
+
* Do not edit the class manually.
|
|
461
|
+
*/
|
|
462
|
+
/**
|
|
463
|
+
*
|
|
464
|
+
*/
|
|
465
|
+
var HealthApi = class extends BaseAPI {
|
|
466
|
+
/**
|
|
467
|
+
* Creates request options for health without sending the request
|
|
468
|
+
*/
|
|
469
|
+
async healthRequestOpts() {
|
|
470
|
+
return {
|
|
471
|
+
path: `/health`,
|
|
472
|
+
method: "GET",
|
|
473
|
+
headers: {},
|
|
474
|
+
query: {}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Answers ok while the application is running, for uptime checks.
|
|
479
|
+
* Health endpoint
|
|
480
|
+
*/
|
|
481
|
+
async healthRaw(initOverrides) {
|
|
482
|
+
const requestOptions = await this.healthRequestOpts();
|
|
483
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => HealthResponseFromJSON(jsonValue));
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Answers ok while the application is running, for uptime checks.
|
|
487
|
+
* Health endpoint
|
|
488
|
+
*/
|
|
489
|
+
async health(initOverrides) {
|
|
490
|
+
return await (await this.healthRaw(initOverrides)).value();
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region src/generated/models/OrganizationResponse.ts
|
|
495
|
+
/**
|
|
496
|
+
* Check if a given object implements the OrganizationResponse interface.
|
|
497
|
+
*/
|
|
498
|
+
function instanceOfOrganizationResponse(value) {
|
|
499
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
500
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
501
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
502
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
503
|
+
return true;
|
|
504
|
+
}
|
|
505
|
+
function OrganizationResponseFromJSON(json) {
|
|
506
|
+
return OrganizationResponseFromJSONTyped(json, false);
|
|
507
|
+
}
|
|
508
|
+
function OrganizationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
509
|
+
if (json == null) return json;
|
|
510
|
+
return {
|
|
511
|
+
"archivedAt": json["archivedAt"] == null ? void 0 : new Date(json["archivedAt"]),
|
|
512
|
+
"createdAt": new Date(json["createdAt"]),
|
|
513
|
+
"id": json["id"],
|
|
514
|
+
"name": json["name"],
|
|
515
|
+
"updatedAt": new Date(json["updatedAt"])
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
function OrganizationResponseToJSON(json) {
|
|
519
|
+
return OrganizationResponseToJSONTyped(json, false);
|
|
520
|
+
}
|
|
521
|
+
function OrganizationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
522
|
+
if (value == null) return value;
|
|
523
|
+
return {
|
|
524
|
+
"archivedAt": value["archivedAt"] == null ? value["archivedAt"] : value["archivedAt"].toISOString(),
|
|
525
|
+
"createdAt": value["createdAt"].toISOString(),
|
|
526
|
+
"id": value["id"],
|
|
527
|
+
"name": value["name"],
|
|
528
|
+
"updatedAt": value["updatedAt"].toISOString()
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
//#endregion
|
|
532
|
+
//#region src/generated/apis/OrganizationApi.ts
|
|
533
|
+
/**
|
|
534
|
+
* Forge API / Public
|
|
535
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
536
|
+
*
|
|
537
|
+
* The version of the OpenAPI document: 1.0
|
|
538
|
+
*
|
|
539
|
+
*
|
|
540
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
541
|
+
* https://openapi-generator.tech
|
|
542
|
+
* Do not edit the class manually.
|
|
543
|
+
*/
|
|
544
|
+
/**
|
|
545
|
+
*
|
|
546
|
+
*/
|
|
547
|
+
var OrganizationApi = class extends BaseAPI {
|
|
548
|
+
/**
|
|
549
|
+
* Creates request options for getOrganizationByID without sending the request
|
|
550
|
+
*/
|
|
551
|
+
async getOrganizationByIDRequestOpts(requestParameters) {
|
|
552
|
+
if (requestParameters["id"] == null) throw new RequiredError("id", "Required parameter \"id\" was null or undefined when calling getOrganizationByID().");
|
|
553
|
+
const queryParameters = {};
|
|
554
|
+
const headerParameters = {};
|
|
555
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
556
|
+
let urlPath = `/api/v1/organizations/{id}`;
|
|
557
|
+
urlPath = urlPath.replace("{id}", encodeURIComponent(String(requestParameters["id"])));
|
|
558
|
+
return {
|
|
559
|
+
path: urlPath,
|
|
560
|
+
method: "GET",
|
|
561
|
+
headers: headerParameters,
|
|
562
|
+
query: queryParameters
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Returns the organization of the project the client belongs to; any other ID answers 404.
|
|
567
|
+
* Get organization by ID
|
|
568
|
+
*/
|
|
569
|
+
async getOrganizationByIDRaw(requestParameters, initOverrides) {
|
|
570
|
+
const requestOptions = await this.getOrganizationByIDRequestOpts(requestParameters);
|
|
571
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => OrganizationResponseFromJSON(jsonValue));
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Returns the organization of the project the client belongs to; any other ID answers 404.
|
|
575
|
+
* Get organization by ID
|
|
576
|
+
*/
|
|
577
|
+
async getOrganizationByID(requestParameters, initOverrides) {
|
|
578
|
+
return await (await this.getOrganizationByIDRaw(requestParameters, initOverrides)).value();
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
//#endregion
|
|
582
|
+
//#region src/generated/models/ProjectPublicSettingsResponse.ts
|
|
583
|
+
/**
|
|
584
|
+
* Check if a given object implements the ProjectPublicSettingsResponse interface.
|
|
585
|
+
*/
|
|
586
|
+
function instanceOfProjectPublicSettingsResponse(value) {
|
|
587
|
+
if (!("isEnabled" in value) || value["isEnabled"] === void 0) return false;
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
function ProjectPublicSettingsResponseFromJSON(json) {
|
|
591
|
+
return ProjectPublicSettingsResponseFromJSONTyped(json, false);
|
|
592
|
+
}
|
|
593
|
+
function ProjectPublicSettingsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
594
|
+
if (json == null) return json;
|
|
595
|
+
return {
|
|
596
|
+
"isEnabled": json["isEnabled"],
|
|
597
|
+
"token": json["token"] == null ? void 0 : json["token"]
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
function ProjectPublicSettingsResponseToJSON(json) {
|
|
601
|
+
return ProjectPublicSettingsResponseToJSONTyped(json, false);
|
|
602
|
+
}
|
|
603
|
+
function ProjectPublicSettingsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
604
|
+
if (value == null) return value;
|
|
605
|
+
return {
|
|
606
|
+
"isEnabled": value["isEnabled"],
|
|
607
|
+
"token": value["token"]
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
//#endregion
|
|
611
|
+
//#region src/generated/models/ProjectResponse.ts
|
|
612
|
+
/**
|
|
613
|
+
* Check if a given object implements the ProjectResponse interface.
|
|
614
|
+
*/
|
|
615
|
+
function instanceOfProjectResponse(value) {
|
|
616
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
617
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
618
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
619
|
+
if (!("organizationID" in value) || value["organizationID"] === void 0) return false;
|
|
620
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
621
|
+
return true;
|
|
622
|
+
}
|
|
623
|
+
function ProjectResponseFromJSON(json) {
|
|
624
|
+
return ProjectResponseFromJSONTyped(json, false);
|
|
625
|
+
}
|
|
626
|
+
function ProjectResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
627
|
+
if (json == null) return json;
|
|
628
|
+
return {
|
|
629
|
+
"archivedAt": json["archivedAt"] == null ? void 0 : new Date(json["archivedAt"]),
|
|
630
|
+
"createdAt": new Date(json["createdAt"]),
|
|
631
|
+
"id": json["id"],
|
|
632
|
+
"name": json["name"],
|
|
633
|
+
"organizationID": json["organizationID"],
|
|
634
|
+
"publicSettings": json["publicSettings"] == null ? void 0 : ProjectPublicSettingsResponseFromJSON(json["publicSettings"]),
|
|
635
|
+
"updatedAt": new Date(json["updatedAt"])
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
function ProjectResponseToJSON(json) {
|
|
639
|
+
return ProjectResponseToJSONTyped(json, false);
|
|
640
|
+
}
|
|
641
|
+
function ProjectResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
642
|
+
if (value == null) return value;
|
|
643
|
+
return {
|
|
644
|
+
"archivedAt": value["archivedAt"] == null ? value["archivedAt"] : value["archivedAt"].toISOString(),
|
|
645
|
+
"createdAt": value["createdAt"].toISOString(),
|
|
646
|
+
"id": value["id"],
|
|
647
|
+
"name": value["name"],
|
|
648
|
+
"organizationID": value["organizationID"],
|
|
649
|
+
"publicSettings": ProjectPublicSettingsResponseToJSON(value["publicSettings"]),
|
|
650
|
+
"updatedAt": value["updatedAt"].toISOString()
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region src/generated/apis/ProjectApi.ts
|
|
655
|
+
/**
|
|
656
|
+
* Forge API / Public
|
|
657
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
658
|
+
*
|
|
659
|
+
* The version of the OpenAPI document: 1.0
|
|
660
|
+
*
|
|
661
|
+
*
|
|
662
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
663
|
+
* https://openapi-generator.tech
|
|
664
|
+
* Do not edit the class manually.
|
|
665
|
+
*/
|
|
666
|
+
/**
|
|
667
|
+
*
|
|
668
|
+
*/
|
|
669
|
+
var ProjectApi = class extends BaseAPI {
|
|
670
|
+
/**
|
|
671
|
+
* Creates request options for getProjectByID without sending the request
|
|
672
|
+
*/
|
|
673
|
+
async getProjectByIDRequestOpts(requestParameters) {
|
|
674
|
+
if (requestParameters["id"] == null) throw new RequiredError("id", "Required parameter \"id\" was null or undefined when calling getProjectByID().");
|
|
675
|
+
const queryParameters = {};
|
|
676
|
+
const headerParameters = {};
|
|
677
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
678
|
+
let urlPath = `/api/v1/projects/{id}`;
|
|
679
|
+
urlPath = urlPath.replace("{id}", encodeURIComponent(String(requestParameters["id"])));
|
|
680
|
+
return {
|
|
681
|
+
path: urlPath,
|
|
682
|
+
method: "GET",
|
|
683
|
+
headers: headerParameters,
|
|
684
|
+
query: queryParameters
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Returns the project the client belongs to, without client tokens; any other ID answers 404.
|
|
689
|
+
* Get project by ID
|
|
690
|
+
*/
|
|
691
|
+
async getProjectByIDRaw(requestParameters, initOverrides) {
|
|
692
|
+
const requestOptions = await this.getProjectByIDRequestOpts(requestParameters);
|
|
693
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => ProjectResponseFromJSON(jsonValue));
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Returns the project the client belongs to, without client tokens; any other ID answers 404.
|
|
697
|
+
* Get project by ID
|
|
698
|
+
*/
|
|
699
|
+
async getProjectByID(requestParameters, initOverrides) {
|
|
700
|
+
return await (await this.getProjectByIDRaw(requestParameters, initOverrides)).value();
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
//#endregion
|
|
704
|
+
//#region src/generated/models/GranularityType.ts
|
|
705
|
+
/**
|
|
706
|
+
* Forge API / Public
|
|
707
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
708
|
+
*
|
|
709
|
+
* The version of the OpenAPI document: 1.0
|
|
710
|
+
*
|
|
711
|
+
*
|
|
712
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
713
|
+
* https://openapi-generator.tech
|
|
714
|
+
* Do not edit the class manually.
|
|
715
|
+
*/
|
|
716
|
+
/**
|
|
717
|
+
*
|
|
718
|
+
* @export
|
|
719
|
+
*/
|
|
720
|
+
const GranularityType = {
|
|
721
|
+
Hourly: "hourly",
|
|
722
|
+
Daily: "daily",
|
|
723
|
+
Monthly: "monthly",
|
|
724
|
+
Yearly: "yearly",
|
|
725
|
+
TotalByHour: "total_by_hour",
|
|
726
|
+
TotalByWeekday: "total_by_weekday",
|
|
727
|
+
Total: "total"
|
|
728
|
+
};
|
|
729
|
+
function instanceOfGranularityType(value) {
|
|
730
|
+
for (const key in GranularityType) if (Object.prototype.hasOwnProperty.call(GranularityType, key)) {
|
|
731
|
+
if (GranularityType[key] === value) return true;
|
|
732
|
+
}
|
|
733
|
+
return false;
|
|
734
|
+
}
|
|
735
|
+
function GranularityTypeFromJSON(json) {
|
|
736
|
+
return GranularityTypeFromJSONTyped(json, false);
|
|
737
|
+
}
|
|
738
|
+
function GranularityTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
739
|
+
return json;
|
|
740
|
+
}
|
|
741
|
+
function GranularityTypeToJSON(value) {
|
|
742
|
+
return value;
|
|
743
|
+
}
|
|
744
|
+
function GranularityTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
745
|
+
return value;
|
|
746
|
+
}
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region src/generated/models/EventTimeStatsRowResponse.ts
|
|
749
|
+
/**
|
|
750
|
+
* Check if a given object implements the EventTimeStatsRowResponse interface.
|
|
751
|
+
*/
|
|
752
|
+
function instanceOfEventTimeStatsRowResponse(value) {
|
|
753
|
+
if (!("count" in value) || value["count"] === void 0) return false;
|
|
754
|
+
if (!("estimatedCount" in value) || value["estimatedCount"] === void 0) return false;
|
|
755
|
+
if (!("key" in value) || value["key"] === void 0) return false;
|
|
756
|
+
if (!("users" in value) || value["users"] === void 0) return false;
|
|
757
|
+
return true;
|
|
758
|
+
}
|
|
759
|
+
function EventTimeStatsRowResponseFromJSON(json) {
|
|
760
|
+
return EventTimeStatsRowResponseFromJSONTyped(json, false);
|
|
761
|
+
}
|
|
762
|
+
function EventTimeStatsRowResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
763
|
+
if (json == null) return json;
|
|
764
|
+
return {
|
|
765
|
+
"count": json["count"],
|
|
766
|
+
"estimatedCount": json["estimatedCount"],
|
|
767
|
+
"key": new Date(json["key"]),
|
|
768
|
+
"users": json["users"]
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
function EventTimeStatsRowResponseToJSON(json) {
|
|
772
|
+
return EventTimeStatsRowResponseToJSONTyped(json, false);
|
|
773
|
+
}
|
|
774
|
+
function EventTimeStatsRowResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
775
|
+
if (value == null) return value;
|
|
776
|
+
return {
|
|
777
|
+
"count": value["count"],
|
|
778
|
+
"estimatedCount": value["estimatedCount"],
|
|
779
|
+
"key": value["key"].toISOString(),
|
|
780
|
+
"users": value["users"]
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
//#endregion
|
|
784
|
+
//#region src/generated/models/StatsAggregationResponse.ts
|
|
785
|
+
/**
|
|
786
|
+
* Check if a given object implements the StatsAggregationResponse interface.
|
|
787
|
+
*/
|
|
788
|
+
function instanceOfStatsAggregationResponse(value) {
|
|
789
|
+
if (!("aggregation" in value) || value["aggregation"] === void 0) return false;
|
|
790
|
+
if (!("keys" in value) || value["keys"] === void 0) return false;
|
|
791
|
+
if (!("values" in value) || value["values"] === void 0) return false;
|
|
792
|
+
return true;
|
|
793
|
+
}
|
|
794
|
+
function StatsAggregationResponseFromJSON(json) {
|
|
795
|
+
return StatsAggregationResponseFromJSONTyped(json, false);
|
|
796
|
+
}
|
|
797
|
+
function StatsAggregationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
798
|
+
if (json == null) return json;
|
|
799
|
+
return {
|
|
800
|
+
"aggregation": json["aggregation"],
|
|
801
|
+
"keys": json["keys"],
|
|
802
|
+
"values": json["values"]
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
function StatsAggregationResponseToJSON(json) {
|
|
806
|
+
return StatsAggregationResponseToJSONTyped(json, false);
|
|
807
|
+
}
|
|
808
|
+
function StatsAggregationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
809
|
+
if (value == null) return value;
|
|
810
|
+
return {
|
|
811
|
+
"aggregation": value["aggregation"],
|
|
812
|
+
"keys": value["keys"],
|
|
813
|
+
"values": value["values"]
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
//#endregion
|
|
817
|
+
//#region src/generated/models/EventTimeStatsAggregationResponse.ts
|
|
818
|
+
/**
|
|
819
|
+
* Check if a given object implements the EventTimeStatsAggregationResponse interface.
|
|
820
|
+
*/
|
|
821
|
+
function instanceOfEventTimeStatsAggregationResponse(value) {
|
|
822
|
+
return true;
|
|
823
|
+
}
|
|
824
|
+
function EventTimeStatsAggregationResponseFromJSON(json) {
|
|
825
|
+
return EventTimeStatsAggregationResponseFromJSONTyped(json, false);
|
|
826
|
+
}
|
|
827
|
+
function EventTimeStatsAggregationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
828
|
+
if (json == null) return json;
|
|
829
|
+
return {
|
|
830
|
+
"aggregation": json["aggregation"] == null ? void 0 : StatsAggregationResponseFromJSON(json["aggregation"]),
|
|
831
|
+
"current": json["current"] == null ? void 0 : json["current"].map(EventTimeStatsRowResponseFromJSON),
|
|
832
|
+
"previous": json["previous"] == null ? void 0 : json["previous"].map(EventTimeStatsRowResponseFromJSON)
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function EventTimeStatsAggregationResponseToJSON(json) {
|
|
836
|
+
return EventTimeStatsAggregationResponseToJSONTyped(json, false);
|
|
837
|
+
}
|
|
838
|
+
function EventTimeStatsAggregationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
839
|
+
if (value == null) return value;
|
|
840
|
+
return {
|
|
841
|
+
"aggregation": StatsAggregationResponseToJSON(value["aggregation"]),
|
|
842
|
+
"current": value["current"] == null ? void 0 : value["current"].map(EventTimeStatsRowResponseToJSON),
|
|
843
|
+
"previous": value["previous"] == null ? void 0 : value["previous"].map(EventTimeStatsRowResponseToJSON)
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
//#endregion
|
|
847
|
+
//#region src/generated/models/EventTimeStatsResponse.ts
|
|
848
|
+
/**
|
|
849
|
+
* Check if a given object implements the EventTimeStatsResponse interface.
|
|
850
|
+
*/
|
|
851
|
+
function instanceOfEventTimeStatsResponse(value) {
|
|
852
|
+
return true;
|
|
853
|
+
}
|
|
854
|
+
function EventTimeStatsResponseFromJSON(json) {
|
|
855
|
+
return EventTimeStatsResponseFromJSONTyped(json, false);
|
|
856
|
+
}
|
|
857
|
+
function EventTimeStatsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
858
|
+
if (json == null) return json;
|
|
859
|
+
return {
|
|
860
|
+
"aggregations": json["aggregations"] == null ? void 0 : json["aggregations"].map(EventTimeStatsAggregationResponseFromJSON),
|
|
861
|
+
"granularity": json["granularity"] == null ? void 0 : GranularityTypeFromJSON(json["granularity"]),
|
|
862
|
+
"projectID": json["projectID"] == null ? void 0 : json["projectID"]
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
function EventTimeStatsResponseToJSON(json) {
|
|
866
|
+
return EventTimeStatsResponseToJSONTyped(json, false);
|
|
867
|
+
}
|
|
868
|
+
function EventTimeStatsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
869
|
+
if (value == null) return value;
|
|
870
|
+
return {
|
|
871
|
+
"aggregations": value["aggregations"] == null ? void 0 : value["aggregations"].map(EventTimeStatsAggregationResponseToJSON),
|
|
872
|
+
"granularity": GranularityTypeToJSON(value["granularity"]),
|
|
873
|
+
"projectID": value["projectID"]
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region src/generated/models/StatsDistributionResponse.ts
|
|
878
|
+
/**
|
|
879
|
+
* Check if a given object implements the StatsDistributionResponse interface.
|
|
880
|
+
*/
|
|
881
|
+
function instanceOfStatsDistributionResponse(value) {
|
|
882
|
+
if (!("avg" in value) || value["avg"] === void 0) return false;
|
|
883
|
+
if (!("max" in value) || value["max"] === void 0) return false;
|
|
884
|
+
if (!("min" in value) || value["min"] === void 0) return false;
|
|
885
|
+
if (!("q25" in value) || value["q25"] === void 0) return false;
|
|
886
|
+
if (!("q50" in value) || value["q50"] === void 0) return false;
|
|
887
|
+
if (!("q75" in value) || value["q75"] === void 0) return false;
|
|
888
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
889
|
+
return true;
|
|
890
|
+
}
|
|
891
|
+
function StatsDistributionResponseFromJSON(json) {
|
|
892
|
+
return StatsDistributionResponseFromJSONTyped(json, false);
|
|
893
|
+
}
|
|
894
|
+
function StatsDistributionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
895
|
+
if (json == null) return json;
|
|
896
|
+
return {
|
|
897
|
+
"avg": json["avg"],
|
|
898
|
+
"max": json["max"],
|
|
899
|
+
"min": json["min"],
|
|
900
|
+
"q25": json["q25"],
|
|
901
|
+
"q50": json["q50"],
|
|
902
|
+
"q75": json["q75"],
|
|
903
|
+
"total": json["total"]
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
function StatsDistributionResponseToJSON(json) {
|
|
907
|
+
return StatsDistributionResponseToJSONTyped(json, false);
|
|
908
|
+
}
|
|
909
|
+
function StatsDistributionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
910
|
+
if (value == null) return value;
|
|
911
|
+
return {
|
|
912
|
+
"avg": value["avg"],
|
|
913
|
+
"max": value["max"],
|
|
914
|
+
"min": value["min"],
|
|
915
|
+
"q25": value["q25"],
|
|
916
|
+
"q50": value["q50"],
|
|
917
|
+
"q75": value["q75"],
|
|
918
|
+
"total": value["total"]
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
//#endregion
|
|
922
|
+
//#region src/generated/models/EventTotalStatsValuesResponse.ts
|
|
923
|
+
/**
|
|
924
|
+
* Check if a given object implements the EventTotalStatsValuesResponse interface.
|
|
925
|
+
*/
|
|
926
|
+
function instanceOfEventTotalStatsValuesResponse(value) {
|
|
927
|
+
if (!("events" in value) || value["events"] === void 0) return false;
|
|
928
|
+
if (!("users" in value) || value["users"] === void 0) return false;
|
|
929
|
+
return true;
|
|
930
|
+
}
|
|
931
|
+
function EventTotalStatsValuesResponseFromJSON(json) {
|
|
932
|
+
return EventTotalStatsValuesResponseFromJSONTyped(json, false);
|
|
933
|
+
}
|
|
934
|
+
function EventTotalStatsValuesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
935
|
+
if (json == null) return json;
|
|
936
|
+
return {
|
|
937
|
+
"events": StatsDistributionResponseFromJSON(json["events"]),
|
|
938
|
+
"users": StatsDistributionResponseFromJSON(json["users"])
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
function EventTotalStatsValuesResponseToJSON(json) {
|
|
942
|
+
return EventTotalStatsValuesResponseToJSONTyped(json, false);
|
|
943
|
+
}
|
|
944
|
+
function EventTotalStatsValuesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
945
|
+
if (value == null) return value;
|
|
946
|
+
return {
|
|
947
|
+
"events": StatsDistributionResponseToJSON(value["events"]),
|
|
948
|
+
"users": StatsDistributionResponseToJSON(value["users"])
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
//#endregion
|
|
952
|
+
//#region src/generated/models/EventTotalStatsResponse.ts
|
|
953
|
+
/**
|
|
954
|
+
* Check if a given object implements the EventTotalStatsResponse interface.
|
|
955
|
+
*/
|
|
956
|
+
function instanceOfEventTotalStatsResponse(value) {
|
|
957
|
+
if (!("current" in value) || value["current"] === void 0) return false;
|
|
958
|
+
if (!("granularity" in value) || value["granularity"] === void 0) return false;
|
|
959
|
+
if (!("projectID" in value) || value["projectID"] === void 0) return false;
|
|
960
|
+
return true;
|
|
961
|
+
}
|
|
962
|
+
function EventTotalStatsResponseFromJSON(json) {
|
|
963
|
+
return EventTotalStatsResponseFromJSONTyped(json, false);
|
|
964
|
+
}
|
|
965
|
+
function EventTotalStatsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
966
|
+
if (json == null) return json;
|
|
967
|
+
return {
|
|
968
|
+
"current": EventTotalStatsValuesResponseFromJSON(json["current"]),
|
|
969
|
+
"granularity": GranularityTypeFromJSON(json["granularity"]),
|
|
970
|
+
"previous": json["previous"] == null ? void 0 : EventTotalStatsValuesResponseFromJSON(json["previous"]),
|
|
971
|
+
"projectID": json["projectID"]
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
function EventTotalStatsResponseToJSON(json) {
|
|
975
|
+
return EventTotalStatsResponseToJSONTyped(json, false);
|
|
976
|
+
}
|
|
977
|
+
function EventTotalStatsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
978
|
+
if (value == null) return value;
|
|
979
|
+
return {
|
|
980
|
+
"current": EventTotalStatsValuesResponseToJSON(value["current"]),
|
|
981
|
+
"granularity": GranularityTypeToJSON(value["granularity"]),
|
|
982
|
+
"previous": EventTotalStatsValuesResponseToJSON(value["previous"]),
|
|
983
|
+
"projectID": value["projectID"]
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
//#endregion
|
|
987
|
+
//#region src/generated/models/EventQueryConditionRequest.ts
|
|
988
|
+
/**
|
|
989
|
+
* @export
|
|
990
|
+
*/
|
|
991
|
+
const EventQueryConditionRequestOperationEnum = {
|
|
992
|
+
Eq: "eq",
|
|
993
|
+
Neq: "neq"
|
|
994
|
+
};
|
|
995
|
+
/**
|
|
996
|
+
* Check if a given object implements the EventQueryConditionRequest interface.
|
|
997
|
+
*/
|
|
998
|
+
function instanceOfEventQueryConditionRequest(value) {
|
|
999
|
+
if (!("operation" in value) || value["operation"] === void 0) return false;
|
|
1000
|
+
if (!("predicate" in value) || value["predicate"] === void 0) return false;
|
|
1001
|
+
if (!("value" in value) || value["value"] === void 0) return false;
|
|
1002
|
+
return true;
|
|
1003
|
+
}
|
|
1004
|
+
function EventQueryConditionRequestFromJSON(json) {
|
|
1005
|
+
return EventQueryConditionRequestFromJSONTyped(json, false);
|
|
1006
|
+
}
|
|
1007
|
+
function EventQueryConditionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
1008
|
+
if (json == null) return json;
|
|
1009
|
+
return {
|
|
1010
|
+
"operation": json["operation"],
|
|
1011
|
+
"predicate": json["predicate"],
|
|
1012
|
+
"value": json["value"]
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
function EventQueryConditionRequestToJSON(json) {
|
|
1016
|
+
return EventQueryConditionRequestToJSONTyped(json, false);
|
|
1017
|
+
}
|
|
1018
|
+
function EventQueryConditionRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1019
|
+
if (value == null) return value;
|
|
1020
|
+
return {
|
|
1021
|
+
"operation": value["operation"],
|
|
1022
|
+
"predicate": value["predicate"],
|
|
1023
|
+
"value": value["value"]
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
//#endregion
|
|
1027
|
+
//#region src/generated/models/EventQueryRequest.ts
|
|
1028
|
+
/**
|
|
1029
|
+
* @export
|
|
1030
|
+
*/
|
|
1031
|
+
const EventQueryRequestResultEnum = {
|
|
1032
|
+
NumEvents: "NumEvents",
|
|
1033
|
+
Users: "Users"
|
|
1034
|
+
};
|
|
1035
|
+
/**
|
|
1036
|
+
* Check if a given object implements the EventQueryRequest interface.
|
|
1037
|
+
*/
|
|
1038
|
+
function instanceOfEventQueryRequest(value) {
|
|
1039
|
+
if (!("conditions" in value) || value["conditions"] === void 0) return false;
|
|
1040
|
+
if (!("result" in value) || value["result"] === void 0) return false;
|
|
1041
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1042
|
+
return true;
|
|
1043
|
+
}
|
|
1044
|
+
function EventQueryRequestFromJSON(json) {
|
|
1045
|
+
return EventQueryRequestFromJSONTyped(json, false);
|
|
1046
|
+
}
|
|
1047
|
+
function EventQueryRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
1048
|
+
if (json == null) return json;
|
|
1049
|
+
return {
|
|
1050
|
+
"conditions": json["conditions"].map(EventQueryConditionRequestFromJSON),
|
|
1051
|
+
"result": json["result"],
|
|
1052
|
+
"type": json["type"]
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
function EventQueryRequestToJSON(json) {
|
|
1056
|
+
return EventQueryRequestToJSONTyped(json, false);
|
|
1057
|
+
}
|
|
1058
|
+
function EventQueryRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1059
|
+
if (value == null) return value;
|
|
1060
|
+
return {
|
|
1061
|
+
"conditions": value["conditions"].map(EventQueryConditionRequestToJSON),
|
|
1062
|
+
"result": value["result"],
|
|
1063
|
+
"type": value["type"]
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
//#endregion
|
|
1067
|
+
//#region src/generated/models/Period.ts
|
|
1068
|
+
/**
|
|
1069
|
+
* Forge API / Public
|
|
1070
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
1071
|
+
*
|
|
1072
|
+
* The version of the OpenAPI document: 1.0
|
|
1073
|
+
*
|
|
1074
|
+
*
|
|
1075
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1076
|
+
* https://openapi-generator.tech
|
|
1077
|
+
* Do not edit the class manually.
|
|
1078
|
+
*/
|
|
1079
|
+
/**
|
|
1080
|
+
*
|
|
1081
|
+
* @export
|
|
1082
|
+
*/
|
|
1083
|
+
const Period = {
|
|
1084
|
+
Realtime: "realtime",
|
|
1085
|
+
Day: "day",
|
|
1086
|
+
_7days: "7days",
|
|
1087
|
+
_14days: "14days",
|
|
1088
|
+
Week: "week",
|
|
1089
|
+
Month: "month",
|
|
1090
|
+
Year: "year",
|
|
1091
|
+
All: "all"
|
|
1092
|
+
};
|
|
1093
|
+
function instanceOfPeriod(value) {
|
|
1094
|
+
for (const key in Period) if (Object.prototype.hasOwnProperty.call(Period, key)) {
|
|
1095
|
+
if (Period[key] === value) return true;
|
|
1096
|
+
}
|
|
1097
|
+
return false;
|
|
1098
|
+
}
|
|
1099
|
+
function PeriodFromJSON(json) {
|
|
1100
|
+
return PeriodFromJSONTyped(json, false);
|
|
1101
|
+
}
|
|
1102
|
+
function PeriodFromJSONTyped(json, ignoreDiscriminator) {
|
|
1103
|
+
return json;
|
|
1104
|
+
}
|
|
1105
|
+
function PeriodToJSON(value) {
|
|
1106
|
+
return value;
|
|
1107
|
+
}
|
|
1108
|
+
function PeriodToJSONTyped(value, ignoreDiscriminator) {
|
|
1109
|
+
return value;
|
|
1110
|
+
}
|
|
1111
|
+
//#endregion
|
|
1112
|
+
//#region src/generated/models/GetEventQueryStatsRequest.ts
|
|
1113
|
+
/**
|
|
1114
|
+
* Check if a given object implements the GetEventQueryStatsRequest interface.
|
|
1115
|
+
*/
|
|
1116
|
+
function instanceOfGetEventQueryStatsRequest(value) {
|
|
1117
|
+
if (!("period" in value) || value["period"] === void 0) return false;
|
|
1118
|
+
if (!("projectID" in value) || value["projectID"] === void 0) return false;
|
|
1119
|
+
if (!("query" in value) || value["query"] === void 0) return false;
|
|
1120
|
+
return true;
|
|
1121
|
+
}
|
|
1122
|
+
function GetEventQueryStatsRequestFromJSON(json) {
|
|
1123
|
+
return GetEventQueryStatsRequestFromJSONTyped(json, false);
|
|
1124
|
+
}
|
|
1125
|
+
function GetEventQueryStatsRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
1126
|
+
if (json == null) return json;
|
|
1127
|
+
return {
|
|
1128
|
+
"period": PeriodFromJSON(json["period"]),
|
|
1129
|
+
"projectID": json["projectID"],
|
|
1130
|
+
"query": EventQueryRequestFromJSON(json["query"])
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
function GetEventQueryStatsRequestToJSON(json) {
|
|
1134
|
+
return GetEventQueryStatsRequestToJSONTyped(json, false);
|
|
1135
|
+
}
|
|
1136
|
+
function GetEventQueryStatsRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1137
|
+
if (value == null) return value;
|
|
1138
|
+
return {
|
|
1139
|
+
"period": PeriodToJSON(value["period"]),
|
|
1140
|
+
"projectID": value["projectID"],
|
|
1141
|
+
"query": EventQueryRequestToJSON(value["query"])
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
//#endregion
|
|
1145
|
+
//#region src/generated/models/SessionTimeStatsRowResponse.ts
|
|
1146
|
+
/**
|
|
1147
|
+
* Check if a given object implements the SessionTimeStatsRowResponse interface.
|
|
1148
|
+
*/
|
|
1149
|
+
function instanceOfSessionTimeStatsRowResponse(value) {
|
|
1150
|
+
if (!("bounceRate" in value) || value["bounceRate"] === void 0) return false;
|
|
1151
|
+
if (!("duration" in value) || value["duration"] === void 0) return false;
|
|
1152
|
+
if (!("events" in value) || value["events"] === void 0) return false;
|
|
1153
|
+
if (!("key" in value) || value["key"] === void 0) return false;
|
|
1154
|
+
if (!("sessions" in value) || value["sessions"] === void 0) return false;
|
|
1155
|
+
if (!("users" in value) || value["users"] === void 0) return false;
|
|
1156
|
+
return true;
|
|
1157
|
+
}
|
|
1158
|
+
function SessionTimeStatsRowResponseFromJSON(json) {
|
|
1159
|
+
return SessionTimeStatsRowResponseFromJSONTyped(json, false);
|
|
1160
|
+
}
|
|
1161
|
+
function SessionTimeStatsRowResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1162
|
+
if (json == null) return json;
|
|
1163
|
+
return {
|
|
1164
|
+
"bounceRate": StatsDistributionResponseFromJSON(json["bounceRate"]),
|
|
1165
|
+
"duration": StatsDistributionResponseFromJSON(json["duration"]),
|
|
1166
|
+
"events": StatsDistributionResponseFromJSON(json["events"]),
|
|
1167
|
+
"key": new Date(json["key"]),
|
|
1168
|
+
"sessions": StatsDistributionResponseFromJSON(json["sessions"]),
|
|
1169
|
+
"users": StatsDistributionResponseFromJSON(json["users"])
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1172
|
+
function SessionTimeStatsRowResponseToJSON(json) {
|
|
1173
|
+
return SessionTimeStatsRowResponseToJSONTyped(json, false);
|
|
1174
|
+
}
|
|
1175
|
+
function SessionTimeStatsRowResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1176
|
+
if (value == null) return value;
|
|
1177
|
+
return {
|
|
1178
|
+
"bounceRate": StatsDistributionResponseToJSON(value["bounceRate"]),
|
|
1179
|
+
"duration": StatsDistributionResponseToJSON(value["duration"]),
|
|
1180
|
+
"events": StatsDistributionResponseToJSON(value["events"]),
|
|
1181
|
+
"key": value["key"].toISOString(),
|
|
1182
|
+
"sessions": StatsDistributionResponseToJSON(value["sessions"]),
|
|
1183
|
+
"users": StatsDistributionResponseToJSON(value["users"])
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
//#endregion
|
|
1187
|
+
//#region src/generated/models/SessionTimeStatsResponse.ts
|
|
1188
|
+
/**
|
|
1189
|
+
* Check if a given object implements the SessionTimeStatsResponse interface.
|
|
1190
|
+
*/
|
|
1191
|
+
function instanceOfSessionTimeStatsResponse(value) {
|
|
1192
|
+
if (!("comparison" in value) || value["comparison"] === void 0) return false;
|
|
1193
|
+
if (!("current" in value) || value["current"] === void 0) return false;
|
|
1194
|
+
if (!("granularity" in value) || value["granularity"] === void 0) return false;
|
|
1195
|
+
if (!("projectID" in value) || value["projectID"] === void 0) return false;
|
|
1196
|
+
return true;
|
|
1197
|
+
}
|
|
1198
|
+
function SessionTimeStatsResponseFromJSON(json) {
|
|
1199
|
+
return SessionTimeStatsResponseFromJSONTyped(json, false);
|
|
1200
|
+
}
|
|
1201
|
+
function SessionTimeStatsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1202
|
+
if (json == null) return json;
|
|
1203
|
+
return {
|
|
1204
|
+
"comparison": json["comparison"].map(SessionTimeStatsRowResponseFromJSON),
|
|
1205
|
+
"current": json["current"].map(SessionTimeStatsRowResponseFromJSON),
|
|
1206
|
+
"granularity": GranularityTypeFromJSON(json["granularity"]),
|
|
1207
|
+
"projectID": json["projectID"]
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
function SessionTimeStatsResponseToJSON(json) {
|
|
1211
|
+
return SessionTimeStatsResponseToJSONTyped(json, false);
|
|
1212
|
+
}
|
|
1213
|
+
function SessionTimeStatsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1214
|
+
if (value == null) return value;
|
|
1215
|
+
return {
|
|
1216
|
+
"comparison": value["comparison"].map(SessionTimeStatsRowResponseToJSON),
|
|
1217
|
+
"current": value["current"].map(SessionTimeStatsRowResponseToJSON),
|
|
1218
|
+
"granularity": GranularityTypeToJSON(value["granularity"]),
|
|
1219
|
+
"projectID": value["projectID"]
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
//#endregion
|
|
1223
|
+
//#region src/generated/models/SessionTotalStatsValuesResponse.ts
|
|
1224
|
+
/**
|
|
1225
|
+
* Check if a given object implements the SessionTotalStatsValuesResponse interface.
|
|
1226
|
+
*/
|
|
1227
|
+
function instanceOfSessionTotalStatsValuesResponse(value) {
|
|
1228
|
+
if (!("bounceRate" in value) || value["bounceRate"] === void 0) return false;
|
|
1229
|
+
if (!("duration" in value) || value["duration"] === void 0) return false;
|
|
1230
|
+
if (!("events" in value) || value["events"] === void 0) return false;
|
|
1231
|
+
if (!("eventsBySession" in value) || value["eventsBySession"] === void 0) return false;
|
|
1232
|
+
if (!("sessions" in value) || value["sessions"] === void 0) return false;
|
|
1233
|
+
if (!("users" in value) || value["users"] === void 0) return false;
|
|
1234
|
+
return true;
|
|
1235
|
+
}
|
|
1236
|
+
function SessionTotalStatsValuesResponseFromJSON(json) {
|
|
1237
|
+
return SessionTotalStatsValuesResponseFromJSONTyped(json, false);
|
|
1238
|
+
}
|
|
1239
|
+
function SessionTotalStatsValuesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1240
|
+
if (json == null) return json;
|
|
1241
|
+
return {
|
|
1242
|
+
"bounceRate": StatsDistributionResponseFromJSON(json["bounceRate"]),
|
|
1243
|
+
"duration": StatsDistributionResponseFromJSON(json["duration"]),
|
|
1244
|
+
"events": StatsDistributionResponseFromJSON(json["events"]),
|
|
1245
|
+
"eventsBySession": StatsDistributionResponseFromJSON(json["eventsBySession"]),
|
|
1246
|
+
"sessions": StatsDistributionResponseFromJSON(json["sessions"]),
|
|
1247
|
+
"users": StatsDistributionResponseFromJSON(json["users"])
|
|
1248
|
+
};
|
|
1249
|
+
}
|
|
1250
|
+
function SessionTotalStatsValuesResponseToJSON(json) {
|
|
1251
|
+
return SessionTotalStatsValuesResponseToJSONTyped(json, false);
|
|
1252
|
+
}
|
|
1253
|
+
function SessionTotalStatsValuesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1254
|
+
if (value == null) return value;
|
|
1255
|
+
return {
|
|
1256
|
+
"bounceRate": StatsDistributionResponseToJSON(value["bounceRate"]),
|
|
1257
|
+
"duration": StatsDistributionResponseToJSON(value["duration"]),
|
|
1258
|
+
"events": StatsDistributionResponseToJSON(value["events"]),
|
|
1259
|
+
"eventsBySession": StatsDistributionResponseToJSON(value["eventsBySession"]),
|
|
1260
|
+
"sessions": StatsDistributionResponseToJSON(value["sessions"]),
|
|
1261
|
+
"users": StatsDistributionResponseToJSON(value["users"])
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
//#endregion
|
|
1265
|
+
//#region src/generated/models/SessionTotalStatsResponse.ts
|
|
1266
|
+
/**
|
|
1267
|
+
* Check if a given object implements the SessionTotalStatsResponse interface.
|
|
1268
|
+
*/
|
|
1269
|
+
function instanceOfSessionTotalStatsResponse(value) {
|
|
1270
|
+
if (!("current" in value) || value["current"] === void 0) return false;
|
|
1271
|
+
if (!("granularity" in value) || value["granularity"] === void 0) return false;
|
|
1272
|
+
if (!("projectID" in value) || value["projectID"] === void 0) return false;
|
|
1273
|
+
return true;
|
|
1274
|
+
}
|
|
1275
|
+
function SessionTotalStatsResponseFromJSON(json) {
|
|
1276
|
+
return SessionTotalStatsResponseFromJSONTyped(json, false);
|
|
1277
|
+
}
|
|
1278
|
+
function SessionTotalStatsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1279
|
+
if (json == null) return json;
|
|
1280
|
+
return {
|
|
1281
|
+
"current": SessionTotalStatsValuesResponseFromJSON(json["current"]),
|
|
1282
|
+
"granularity": GranularityTypeFromJSON(json["granularity"]),
|
|
1283
|
+
"previous": json["previous"] == null ? void 0 : SessionTotalStatsValuesResponseFromJSON(json["previous"]),
|
|
1284
|
+
"projectID": json["projectID"]
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
function SessionTotalStatsResponseToJSON(json) {
|
|
1288
|
+
return SessionTotalStatsResponseToJSONTyped(json, false);
|
|
1289
|
+
}
|
|
1290
|
+
function SessionTotalStatsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1291
|
+
if (value == null) return value;
|
|
1292
|
+
return {
|
|
1293
|
+
"current": SessionTotalStatsValuesResponseToJSON(value["current"]),
|
|
1294
|
+
"granularity": GranularityTypeToJSON(value["granularity"]),
|
|
1295
|
+
"previous": SessionTotalStatsValuesResponseToJSON(value["previous"]),
|
|
1296
|
+
"projectID": value["projectID"]
|
|
1297
|
+
};
|
|
1298
|
+
}
|
|
1299
|
+
//#endregion
|
|
1300
|
+
//#region src/generated/models/StatsCardinalityResponse.ts
|
|
1301
|
+
/**
|
|
1302
|
+
* Check if a given object implements the StatsCardinalityResponse interface.
|
|
1303
|
+
*/
|
|
1304
|
+
function instanceOfStatsCardinalityResponse(value) {
|
|
1305
|
+
if (!("aggregation" in value) || value["aggregation"] === void 0) return false;
|
|
1306
|
+
if (!("cardinality" in value) || value["cardinality"] === void 0) return false;
|
|
1307
|
+
if (!("keys" in value) || value["keys"] === void 0) return false;
|
|
1308
|
+
return true;
|
|
1309
|
+
}
|
|
1310
|
+
function StatsCardinalityResponseFromJSON(json) {
|
|
1311
|
+
return StatsCardinalityResponseFromJSONTyped(json, false);
|
|
1312
|
+
}
|
|
1313
|
+
function StatsCardinalityResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1314
|
+
if (json == null) return json;
|
|
1315
|
+
return {
|
|
1316
|
+
"aggregation": json["aggregation"],
|
|
1317
|
+
"cardinality": json["cardinality"],
|
|
1318
|
+
"keys": json["keys"]
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
function StatsCardinalityResponseToJSON(json) {
|
|
1322
|
+
return StatsCardinalityResponseToJSONTyped(json, false);
|
|
1323
|
+
}
|
|
1324
|
+
function StatsCardinalityResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1325
|
+
if (value == null) return value;
|
|
1326
|
+
return {
|
|
1327
|
+
"aggregation": value["aggregation"],
|
|
1328
|
+
"cardinality": value["cardinality"],
|
|
1329
|
+
"keys": value["keys"]
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
//#endregion
|
|
1333
|
+
//#region src/generated/models/StatsCardinalitiesResponse.ts
|
|
1334
|
+
/**
|
|
1335
|
+
* Check if a given object implements the StatsCardinalitiesResponse interface.
|
|
1336
|
+
*/
|
|
1337
|
+
function instanceOfStatsCardinalitiesResponse(value) {
|
|
1338
|
+
if (!("cardinalities" in value) || value["cardinalities"] === void 0) return false;
|
|
1339
|
+
if (!("projectID" in value) || value["projectID"] === void 0) return false;
|
|
1340
|
+
return true;
|
|
1341
|
+
}
|
|
1342
|
+
function StatsCardinalitiesResponseFromJSON(json) {
|
|
1343
|
+
return StatsCardinalitiesResponseFromJSONTyped(json, false);
|
|
1344
|
+
}
|
|
1345
|
+
function StatsCardinalitiesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1346
|
+
if (json == null) return json;
|
|
1347
|
+
return {
|
|
1348
|
+
"cardinalities": json["cardinalities"].map(StatsCardinalityResponseFromJSON),
|
|
1349
|
+
"projectID": json["projectID"]
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
function StatsCardinalitiesResponseToJSON(json) {
|
|
1353
|
+
return StatsCardinalitiesResponseToJSONTyped(json, false);
|
|
1354
|
+
}
|
|
1355
|
+
function StatsCardinalitiesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1356
|
+
if (value == null) return value;
|
|
1357
|
+
return {
|
|
1358
|
+
"cardinalities": value["cardinalities"].map(StatsCardinalityResponseToJSON),
|
|
1359
|
+
"projectID": value["projectID"]
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
//#endregion
|
|
1363
|
+
//#region src/generated/models/StatsEventsGlobalDistributionTypeNameResponse.ts
|
|
1364
|
+
/**
|
|
1365
|
+
* Check if a given object implements the StatsEventsGlobalDistributionTypeNameResponse interface.
|
|
1366
|
+
*/
|
|
1367
|
+
function instanceOfStatsEventsGlobalDistributionTypeNameResponse(value) {
|
|
1368
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1369
|
+
if (!("percentage" in value) || value["percentage"] === void 0) return false;
|
|
1370
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
1371
|
+
return true;
|
|
1372
|
+
}
|
|
1373
|
+
function StatsEventsGlobalDistributionTypeNameResponseFromJSON(json) {
|
|
1374
|
+
return StatsEventsGlobalDistributionTypeNameResponseFromJSONTyped(json, false);
|
|
1375
|
+
}
|
|
1376
|
+
function StatsEventsGlobalDistributionTypeNameResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1377
|
+
if (json == null) return json;
|
|
1378
|
+
return {
|
|
1379
|
+
"name": json["name"],
|
|
1380
|
+
"percentage": json["percentage"],
|
|
1381
|
+
"total": json["total"]
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
function StatsEventsGlobalDistributionTypeNameResponseToJSON(json) {
|
|
1385
|
+
return StatsEventsGlobalDistributionTypeNameResponseToJSONTyped(json, false);
|
|
1386
|
+
}
|
|
1387
|
+
function StatsEventsGlobalDistributionTypeNameResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1388
|
+
if (value == null) return value;
|
|
1389
|
+
return {
|
|
1390
|
+
"name": value["name"],
|
|
1391
|
+
"percentage": value["percentage"],
|
|
1392
|
+
"total": value["total"]
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
//#endregion
|
|
1396
|
+
//#region src/generated/models/StatsEventsGlobalDistributionTypeResponse.ts
|
|
1397
|
+
/**
|
|
1398
|
+
* Check if a given object implements the StatsEventsGlobalDistributionTypeResponse interface.
|
|
1399
|
+
*/
|
|
1400
|
+
function instanceOfStatsEventsGlobalDistributionTypeResponse(value) {
|
|
1401
|
+
if (!("names" in value) || value["names"] === void 0) return false;
|
|
1402
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
1403
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1404
|
+
return true;
|
|
1405
|
+
}
|
|
1406
|
+
function StatsEventsGlobalDistributionTypeResponseFromJSON(json) {
|
|
1407
|
+
return StatsEventsGlobalDistributionTypeResponseFromJSONTyped(json, false);
|
|
1408
|
+
}
|
|
1409
|
+
function StatsEventsGlobalDistributionTypeResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1410
|
+
if (json == null) return json;
|
|
1411
|
+
return {
|
|
1412
|
+
"names": json["names"].map(StatsEventsGlobalDistributionTypeNameResponseFromJSON),
|
|
1413
|
+
"total": json["total"],
|
|
1414
|
+
"type": json["type"]
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
function StatsEventsGlobalDistributionTypeResponseToJSON(json) {
|
|
1418
|
+
return StatsEventsGlobalDistributionTypeResponseToJSONTyped(json, false);
|
|
1419
|
+
}
|
|
1420
|
+
function StatsEventsGlobalDistributionTypeResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1421
|
+
if (value == null) return value;
|
|
1422
|
+
return {
|
|
1423
|
+
"names": value["names"].map(StatsEventsGlobalDistributionTypeNameResponseToJSON),
|
|
1424
|
+
"total": value["total"],
|
|
1425
|
+
"type": value["type"]
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1428
|
+
//#endregion
|
|
1429
|
+
//#region src/generated/models/StatsEventsGlobalDistributionResponse.ts
|
|
1430
|
+
/**
|
|
1431
|
+
* Check if a given object implements the StatsEventsGlobalDistributionResponse interface.
|
|
1432
|
+
*/
|
|
1433
|
+
function instanceOfStatsEventsGlobalDistributionResponse(value) {
|
|
1434
|
+
if (!("types" in value) || value["types"] === void 0) return false;
|
|
1435
|
+
return true;
|
|
1436
|
+
}
|
|
1437
|
+
function StatsEventsGlobalDistributionResponseFromJSON(json) {
|
|
1438
|
+
return StatsEventsGlobalDistributionResponseFromJSONTyped(json, false);
|
|
1439
|
+
}
|
|
1440
|
+
function StatsEventsGlobalDistributionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1441
|
+
if (json == null) return json;
|
|
1442
|
+
return { "types": json["types"].map(StatsEventsGlobalDistributionTypeResponseFromJSON) };
|
|
1443
|
+
}
|
|
1444
|
+
function StatsEventsGlobalDistributionResponseToJSON(json) {
|
|
1445
|
+
return StatsEventsGlobalDistributionResponseToJSONTyped(json, false);
|
|
1446
|
+
}
|
|
1447
|
+
function StatsEventsGlobalDistributionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1448
|
+
if (value == null) return value;
|
|
1449
|
+
return { "types": value["types"].map(StatsEventsGlobalDistributionTypeResponseToJSON) };
|
|
1450
|
+
}
|
|
1451
|
+
//#endregion
|
|
1452
|
+
//#region src/generated/models/StatsTopAggregationValuesResponse.ts
|
|
1453
|
+
/**
|
|
1454
|
+
* Check if a given object implements the StatsTopAggregationValuesResponse interface.
|
|
1455
|
+
*/
|
|
1456
|
+
function instanceOfStatsTopAggregationValuesResponse(value) {
|
|
1457
|
+
if (!("count" in value) || value["count"] === void 0) return false;
|
|
1458
|
+
if (!("users" in value) || value["users"] === void 0) return false;
|
|
1459
|
+
if (!("values" in value) || value["values"] === void 0) return false;
|
|
1460
|
+
return true;
|
|
1461
|
+
}
|
|
1462
|
+
function StatsTopAggregationValuesResponseFromJSON(json) {
|
|
1463
|
+
return StatsTopAggregationValuesResponseFromJSONTyped(json, false);
|
|
1464
|
+
}
|
|
1465
|
+
function StatsTopAggregationValuesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1466
|
+
if (json == null) return json;
|
|
1467
|
+
return {
|
|
1468
|
+
"count": json["count"],
|
|
1469
|
+
"users": json["users"],
|
|
1470
|
+
"values": json["values"]
|
|
1471
|
+
};
|
|
1472
|
+
}
|
|
1473
|
+
function StatsTopAggregationValuesResponseToJSON(json) {
|
|
1474
|
+
return StatsTopAggregationValuesResponseToJSONTyped(json, false);
|
|
1475
|
+
}
|
|
1476
|
+
function StatsTopAggregationValuesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1477
|
+
if (value == null) return value;
|
|
1478
|
+
return {
|
|
1479
|
+
"count": value["count"],
|
|
1480
|
+
"users": value["users"],
|
|
1481
|
+
"values": value["values"]
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
//#endregion
|
|
1485
|
+
//#region src/generated/models/StatsTopAggregationResponse.ts
|
|
1486
|
+
/**
|
|
1487
|
+
* Check if a given object implements the StatsTopAggregationResponse interface.
|
|
1488
|
+
*/
|
|
1489
|
+
function instanceOfStatsTopAggregationResponse(value) {
|
|
1490
|
+
if (!("aggregation" in value) || value["aggregation"] === void 0) return false;
|
|
1491
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
1492
|
+
if (!("keys" in value) || value["keys"] === void 0) return false;
|
|
1493
|
+
if (!("values" in value) || value["values"] === void 0) return false;
|
|
1494
|
+
return true;
|
|
1495
|
+
}
|
|
1496
|
+
function StatsTopAggregationResponseFromJSON(json) {
|
|
1497
|
+
return StatsTopAggregationResponseFromJSONTyped(json, false);
|
|
1498
|
+
}
|
|
1499
|
+
function StatsTopAggregationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1500
|
+
if (json == null) return json;
|
|
1501
|
+
return {
|
|
1502
|
+
"aggregation": json["aggregation"],
|
|
1503
|
+
"id": json["id"],
|
|
1504
|
+
"keys": json["keys"],
|
|
1505
|
+
"values": json["values"].map(StatsTopAggregationValuesResponseFromJSON)
|
|
1506
|
+
};
|
|
1507
|
+
}
|
|
1508
|
+
function StatsTopAggregationResponseToJSON(json) {
|
|
1509
|
+
return StatsTopAggregationResponseToJSONTyped(json, false);
|
|
1510
|
+
}
|
|
1511
|
+
function StatsTopAggregationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1512
|
+
if (value == null) return value;
|
|
1513
|
+
return {
|
|
1514
|
+
"aggregation": value["aggregation"],
|
|
1515
|
+
"id": value["id"],
|
|
1516
|
+
"keys": value["keys"],
|
|
1517
|
+
"values": value["values"].map(StatsTopAggregationValuesResponseToJSON)
|
|
1518
|
+
};
|
|
1519
|
+
}
|
|
1520
|
+
//#endregion
|
|
1521
|
+
//#region src/generated/models/StatsTopResponse.ts
|
|
1522
|
+
/**
|
|
1523
|
+
* Check if a given object implements the StatsTopResponse interface.
|
|
1524
|
+
*/
|
|
1525
|
+
function instanceOfStatsTopResponse(value) {
|
|
1526
|
+
if (!("aggregations" in value) || value["aggregations"] === void 0) return false;
|
|
1527
|
+
if (!("granularity" in value) || value["granularity"] === void 0) return false;
|
|
1528
|
+
if (!("projectID" in value) || value["projectID"] === void 0) return false;
|
|
1529
|
+
return true;
|
|
1530
|
+
}
|
|
1531
|
+
function StatsTopResponseFromJSON(json) {
|
|
1532
|
+
return StatsTopResponseFromJSONTyped(json, false);
|
|
1533
|
+
}
|
|
1534
|
+
function StatsTopResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1535
|
+
if (json == null) return json;
|
|
1536
|
+
return {
|
|
1537
|
+
"aggregations": json["aggregations"].map(StatsTopAggregationResponseFromJSON),
|
|
1538
|
+
"granularity": GranularityTypeFromJSON(json["granularity"]),
|
|
1539
|
+
"projectID": json["projectID"]
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
function StatsTopResponseToJSON(json) {
|
|
1543
|
+
return StatsTopResponseToJSONTyped(json, false);
|
|
1544
|
+
}
|
|
1545
|
+
function StatsTopResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1546
|
+
if (value == null) return value;
|
|
1547
|
+
return {
|
|
1548
|
+
"aggregations": value["aggregations"].map(StatsTopAggregationResponseToJSON),
|
|
1549
|
+
"granularity": GranularityTypeToJSON(value["granularity"]),
|
|
1550
|
+
"projectID": value["projectID"]
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
//#endregion
|
|
1554
|
+
//#region src/generated/apis/StatsApi.ts
|
|
1555
|
+
/**
|
|
1556
|
+
* Forge API / Public
|
|
1557
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
1558
|
+
*
|
|
1559
|
+
* The version of the OpenAPI document: 1.0
|
|
1560
|
+
*
|
|
1561
|
+
*
|
|
1562
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1563
|
+
* https://openapi-generator.tech
|
|
1564
|
+
* Do not edit the class manually.
|
|
1565
|
+
*/
|
|
1566
|
+
/**
|
|
1567
|
+
*
|
|
1568
|
+
*/
|
|
1569
|
+
var StatsApi = class extends BaseAPI {
|
|
1570
|
+
/**
|
|
1571
|
+
* Creates request options for getCardinalities without sending the request
|
|
1572
|
+
*/
|
|
1573
|
+
async getCardinalitiesRequestOpts(requestParameters) {
|
|
1574
|
+
if (requestParameters["projectID"] == null) throw new RequiredError("projectID", "Required parameter \"projectID\" was null or undefined when calling getCardinalities().");
|
|
1575
|
+
const queryParameters = {};
|
|
1576
|
+
if (requestParameters["projectID"] != null) queryParameters["projectID"] = requestParameters["projectID"];
|
|
1577
|
+
const headerParameters = {};
|
|
1578
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1579
|
+
return {
|
|
1580
|
+
path: `/api/v1/stats/cardinalities`,
|
|
1581
|
+
method: "GET",
|
|
1582
|
+
headers: headerParameters,
|
|
1583
|
+
query: queryParameters
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Returns how many distinct values each dimension aggregation of the project has.
|
|
1588
|
+
* Get cardinalities
|
|
1589
|
+
*/
|
|
1590
|
+
async getCardinalitiesRaw(requestParameters, initOverrides) {
|
|
1591
|
+
const requestOptions = await this.getCardinalitiesRequestOpts(requestParameters);
|
|
1592
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => StatsCardinalitiesResponseFromJSON(jsonValue));
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* Returns how many distinct values each dimension aggregation of the project has.
|
|
1596
|
+
* Get cardinalities
|
|
1597
|
+
*/
|
|
1598
|
+
async getCardinalities(requestParameters, initOverrides) {
|
|
1599
|
+
return await (await this.getCardinalitiesRaw(requestParameters, initOverrides)).value();
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Creates request options for getEventQueryStats without sending the request
|
|
1603
|
+
*/
|
|
1604
|
+
async getEventQueryStatsRequestOpts(requestParameters) {
|
|
1605
|
+
const queryParameters = {};
|
|
1606
|
+
const headerParameters = {};
|
|
1607
|
+
headerParameters["Content-Type"] = "application/json";
|
|
1608
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1609
|
+
return {
|
|
1610
|
+
path: `/api/v1/stats/event/query`,
|
|
1611
|
+
method: "POST",
|
|
1612
|
+
headers: headerParameters,
|
|
1613
|
+
query: queryParameters,
|
|
1614
|
+
body: GetEventQueryStatsRequestToJSON(requestParameters["getEventQueryStatsRequest"])
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Returns the event counts over time of events matching a query, with the previous period.
|
|
1619
|
+
* Get event query stats
|
|
1620
|
+
*/
|
|
1621
|
+
async getEventQueryStatsRaw(requestParameters, initOverrides) {
|
|
1622
|
+
const requestOptions = await this.getEventQueryStatsRequestOpts(requestParameters);
|
|
1623
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => EventTimeStatsResponseFromJSON(jsonValue));
|
|
1624
|
+
}
|
|
1625
|
+
/**
|
|
1626
|
+
* Returns the event counts over time of events matching a query, with the previous period.
|
|
1627
|
+
* Get event query stats
|
|
1628
|
+
*/
|
|
1629
|
+
async getEventQueryStats(requestParameters = {}, initOverrides) {
|
|
1630
|
+
return await (await this.getEventQueryStatsRaw(requestParameters, initOverrides)).value();
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Creates request options for getEventTimeStats without sending the request
|
|
1634
|
+
*/
|
|
1635
|
+
async getEventTimeStatsRequestOpts(requestParameters) {
|
|
1636
|
+
if (requestParameters["projectID"] == null) throw new RequiredError("projectID", "Required parameter \"projectID\" was null or undefined when calling getEventTimeStats().");
|
|
1637
|
+
if (requestParameters["period"] == null) throw new RequiredError("period", "Required parameter \"period\" was null or undefined when calling getEventTimeStats().");
|
|
1638
|
+
const queryParameters = {};
|
|
1639
|
+
if (requestParameters["projectID"] != null) queryParameters["projectID"] = requestParameters["projectID"];
|
|
1640
|
+
if (requestParameters["keys"] != null) queryParameters["keys"] = requestParameters["keys"];
|
|
1641
|
+
if (requestParameters["values"] != null) queryParameters["values"] = requestParameters["values"];
|
|
1642
|
+
if (requestParameters["period"] != null) queryParameters["period"] = requestParameters["period"];
|
|
1643
|
+
const headerParameters = {};
|
|
1644
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1645
|
+
return {
|
|
1646
|
+
path: `/api/v1/stats/event/time`,
|
|
1647
|
+
method: "GET",
|
|
1648
|
+
headers: headerParameters,
|
|
1649
|
+
query: queryParameters
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Returns the event counts of each requested aggregation over time, with the previous period.
|
|
1654
|
+
* Get event time stats
|
|
1655
|
+
*/
|
|
1656
|
+
async getEventTimeStatsRaw(requestParameters, initOverrides) {
|
|
1657
|
+
const requestOptions = await this.getEventTimeStatsRequestOpts(requestParameters);
|
|
1658
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => EventTimeStatsResponseFromJSON(jsonValue));
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* Returns the event counts of each requested aggregation over time, with the previous period.
|
|
1662
|
+
* Get event time stats
|
|
1663
|
+
*/
|
|
1664
|
+
async getEventTimeStats(requestParameters, initOverrides) {
|
|
1665
|
+
return await (await this.getEventTimeStatsRaw(requestParameters, initOverrides)).value();
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* Creates request options for getEventTotalStats without sending the request
|
|
1669
|
+
*/
|
|
1670
|
+
async getEventTotalStatsRequestOpts(requestParameters) {
|
|
1671
|
+
if (requestParameters["projectID"] == null) throw new RequiredError("projectID", "Required parameter \"projectID\" was null or undefined when calling getEventTotalStats().");
|
|
1672
|
+
if (requestParameters["period"] == null) throw new RequiredError("period", "Required parameter \"period\" was null or undefined when calling getEventTotalStats().");
|
|
1673
|
+
const queryParameters = {};
|
|
1674
|
+
if (requestParameters["projectID"] != null) queryParameters["projectID"] = requestParameters["projectID"];
|
|
1675
|
+
if (requestParameters["period"] != null) queryParameters["period"] = requestParameters["period"];
|
|
1676
|
+
const headerParameters = {};
|
|
1677
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1678
|
+
return {
|
|
1679
|
+
path: `/api/v1/stats/event/total`,
|
|
1680
|
+
method: "GET",
|
|
1681
|
+
headers: headerParameters,
|
|
1682
|
+
query: queryParameters
|
|
1683
|
+
};
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Returns the event and user distributions of the period, with the previous period.
|
|
1687
|
+
* Get event total stats
|
|
1688
|
+
*/
|
|
1689
|
+
async getEventTotalStatsRaw(requestParameters, initOverrides) {
|
|
1690
|
+
const requestOptions = await this.getEventTotalStatsRequestOpts(requestParameters);
|
|
1691
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => EventTotalStatsResponseFromJSON(jsonValue));
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* Returns the event and user distributions of the period, with the previous period.
|
|
1695
|
+
* Get event total stats
|
|
1696
|
+
*/
|
|
1697
|
+
async getEventTotalStats(requestParameters, initOverrides) {
|
|
1698
|
+
return await (await this.getEventTotalStatsRaw(requestParameters, initOverrides)).value();
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* Creates request options for getEventsGlobalDistribution without sending the request
|
|
1702
|
+
*/
|
|
1703
|
+
async getEventsGlobalDistributionRequestOpts(requestParameters) {
|
|
1704
|
+
if (requestParameters["types"] == null) throw new RequiredError("types", "Required parameter \"types\" was null or undefined when calling getEventsGlobalDistribution().");
|
|
1705
|
+
const queryParameters = {};
|
|
1706
|
+
if (requestParameters["types"] != null) queryParameters["types"] = requestParameters["types"];
|
|
1707
|
+
const headerParameters = {};
|
|
1708
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1709
|
+
return {
|
|
1710
|
+
path: `/api/v1/stats/event/distribution`,
|
|
1711
|
+
method: "GET",
|
|
1712
|
+
headers: headerParameters,
|
|
1713
|
+
query: queryParameters
|
|
1714
|
+
};
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* Returns, for each requested event type, how its events split by name across the project.
|
|
1718
|
+
* Get events global distribution
|
|
1719
|
+
*/
|
|
1720
|
+
async getEventsGlobalDistributionRaw(requestParameters, initOverrides) {
|
|
1721
|
+
const requestOptions = await this.getEventsGlobalDistributionRequestOpts(requestParameters);
|
|
1722
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => StatsEventsGlobalDistributionResponseFromJSON(jsonValue));
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Returns, for each requested event type, how its events split by name across the project.
|
|
1726
|
+
* Get events global distribution
|
|
1727
|
+
*/
|
|
1728
|
+
async getEventsGlobalDistribution(requestParameters, initOverrides) {
|
|
1729
|
+
return await (await this.getEventsGlobalDistributionRaw(requestParameters, initOverrides)).value();
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* Creates request options for getSessionTimeStats without sending the request
|
|
1733
|
+
*/
|
|
1734
|
+
async getSessionTimeStatsRequestOpts(requestParameters) {
|
|
1735
|
+
if (requestParameters["projectID"] == null) throw new RequiredError("projectID", "Required parameter \"projectID\" was null or undefined when calling getSessionTimeStats().");
|
|
1736
|
+
if (requestParameters["period"] == null) throw new RequiredError("period", "Required parameter \"period\" was null or undefined when calling getSessionTimeStats().");
|
|
1737
|
+
const queryParameters = {};
|
|
1738
|
+
if (requestParameters["projectID"] != null) queryParameters["projectID"] = requestParameters["projectID"];
|
|
1739
|
+
if (requestParameters["period"] != null) queryParameters["period"] = requestParameters["period"];
|
|
1740
|
+
const headerParameters = {};
|
|
1741
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1742
|
+
return {
|
|
1743
|
+
path: `/api/v1/stats/session/time`,
|
|
1744
|
+
method: "GET",
|
|
1745
|
+
headers: headerParameters,
|
|
1746
|
+
query: queryParameters
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* Returns the session stats of each row over time, with the comparison period.
|
|
1751
|
+
* Get sessions time stats
|
|
1752
|
+
*/
|
|
1753
|
+
async getSessionTimeStatsRaw(requestParameters, initOverrides) {
|
|
1754
|
+
const requestOptions = await this.getSessionTimeStatsRequestOpts(requestParameters);
|
|
1755
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => SessionTimeStatsResponseFromJSON(jsonValue));
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Returns the session stats of each row over time, with the comparison period.
|
|
1759
|
+
* Get sessions time stats
|
|
1760
|
+
*/
|
|
1761
|
+
async getSessionTimeStats(requestParameters, initOverrides) {
|
|
1762
|
+
return await (await this.getSessionTimeStatsRaw(requestParameters, initOverrides)).value();
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* Creates request options for getSessionTotalStats without sending the request
|
|
1766
|
+
*/
|
|
1767
|
+
async getSessionTotalStatsRequestOpts(requestParameters) {
|
|
1768
|
+
if (requestParameters["projectID"] == null) throw new RequiredError("projectID", "Required parameter \"projectID\" was null or undefined when calling getSessionTotalStats().");
|
|
1769
|
+
if (requestParameters["period"] == null) throw new RequiredError("period", "Required parameter \"period\" was null or undefined when calling getSessionTotalStats().");
|
|
1770
|
+
const queryParameters = {};
|
|
1771
|
+
if (requestParameters["projectID"] != null) queryParameters["projectID"] = requestParameters["projectID"];
|
|
1772
|
+
if (requestParameters["period"] != null) queryParameters["period"] = requestParameters["period"];
|
|
1773
|
+
const headerParameters = {};
|
|
1774
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1775
|
+
return {
|
|
1776
|
+
path: `/api/v1/stats/session/total`,
|
|
1777
|
+
method: "GET",
|
|
1778
|
+
headers: headerParameters,
|
|
1779
|
+
query: queryParameters
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* Returns the session distributions of the period, with the previous period.
|
|
1784
|
+
* Get session total stats
|
|
1785
|
+
*/
|
|
1786
|
+
async getSessionTotalStatsRaw(requestParameters, initOverrides) {
|
|
1787
|
+
const requestOptions = await this.getSessionTotalStatsRequestOpts(requestParameters);
|
|
1788
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => SessionTotalStatsResponseFromJSON(jsonValue));
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Returns the session distributions of the period, with the previous period.
|
|
1792
|
+
* Get session total stats
|
|
1793
|
+
*/
|
|
1794
|
+
async getSessionTotalStats(requestParameters, initOverrides) {
|
|
1795
|
+
return await (await this.getSessionTotalStatsRaw(requestParameters, initOverrides)).value();
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Creates request options for getTopStats without sending the request
|
|
1799
|
+
*/
|
|
1800
|
+
async getTopStatsRequestOpts(requestParameters) {
|
|
1801
|
+
if (requestParameters["projectID"] == null) throw new RequiredError("projectID", "Required parameter \"projectID\" was null or undefined when calling getTopStats().");
|
|
1802
|
+
if (requestParameters["period"] == null) throw new RequiredError("period", "Required parameter \"period\" was null or undefined when calling getTopStats().");
|
|
1803
|
+
const queryParameters = {};
|
|
1804
|
+
if (requestParameters["projectID"] != null) queryParameters["projectID"] = requestParameters["projectID"];
|
|
1805
|
+
if (requestParameters["keys"] != null) queryParameters["keys"] = requestParameters["keys"];
|
|
1806
|
+
if (requestParameters["aggregation"] != null) queryParameters["aggregation"] = requestParameters["aggregation"];
|
|
1807
|
+
if (requestParameters["values"] != null) queryParameters["values"] = requestParameters["values"];
|
|
1808
|
+
if (requestParameters["period"] != null) queryParameters["period"] = requestParameters["period"];
|
|
1809
|
+
const headerParameters = {};
|
|
1810
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1811
|
+
return {
|
|
1812
|
+
path: `/api/v1/stats/top`,
|
|
1813
|
+
method: "GET",
|
|
1814
|
+
headers: headerParameters,
|
|
1815
|
+
query: queryParameters
|
|
1816
|
+
};
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Returns the most frequent values of each requested aggregation within the period.
|
|
1820
|
+
* Get top stats
|
|
1821
|
+
*/
|
|
1822
|
+
async getTopStatsRaw(requestParameters, initOverrides) {
|
|
1823
|
+
const requestOptions = await this.getTopStatsRequestOpts(requestParameters);
|
|
1824
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => StatsTopResponseFromJSON(jsonValue));
|
|
1825
|
+
}
|
|
1826
|
+
/**
|
|
1827
|
+
* Returns the most frequent values of each requested aggregation within the period.
|
|
1828
|
+
* Get top stats
|
|
1829
|
+
*/
|
|
1830
|
+
async getTopStats(requestParameters, initOverrides) {
|
|
1831
|
+
return await (await this.getTopStatsRaw(requestParameters, initOverrides)).value();
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
//#endregion
|
|
1835
|
+
//#region src/generated/models/IdentifyUserResponse.ts
|
|
1836
|
+
/**
|
|
1837
|
+
* Check if a given object implements the IdentifyUserResponse interface.
|
|
1838
|
+
*/
|
|
1839
|
+
function instanceOfIdentifyUserResponse(value) {
|
|
1840
|
+
if (!("city" in value) || value["city"] === void 0) return false;
|
|
1841
|
+
if (!("country" in value) || value["country"] === void 0) return false;
|
|
1842
|
+
if (!("deviceBrowser" in value) || value["deviceBrowser"] === void 0) return false;
|
|
1843
|
+
if (!("deviceType" in value) || value["deviceType"] === void 0) return false;
|
|
1844
|
+
if (!("lat" in value) || value["lat"] === void 0) return false;
|
|
1845
|
+
if (!("lng" in value) || value["lng"] === void 0) return false;
|
|
1846
|
+
if (!("os" in value) || value["os"] === void 0) return false;
|
|
1847
|
+
if (!("postcode" in value) || value["postcode"] === void 0) return false;
|
|
1848
|
+
if (!("region" in value) || value["region"] === void 0) return false;
|
|
1849
|
+
if (!("timeZone" in value) || value["timeZone"] === void 0) return false;
|
|
1850
|
+
return true;
|
|
1851
|
+
}
|
|
1852
|
+
function IdentifyUserResponseFromJSON(json) {
|
|
1853
|
+
return IdentifyUserResponseFromJSONTyped(json, false);
|
|
1854
|
+
}
|
|
1855
|
+
function IdentifyUserResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1856
|
+
if (json == null) return json;
|
|
1857
|
+
return {
|
|
1858
|
+
"city": json["city"],
|
|
1859
|
+
"country": json["country"],
|
|
1860
|
+
"deviceBrowser": json["deviceBrowser"],
|
|
1861
|
+
"deviceType": json["deviceType"],
|
|
1862
|
+
"lat": json["lat"],
|
|
1863
|
+
"lng": json["lng"],
|
|
1864
|
+
"os": json["os"],
|
|
1865
|
+
"postcode": json["postcode"],
|
|
1866
|
+
"region": json["region"],
|
|
1867
|
+
"timeZone": json["timeZone"]
|
|
1868
|
+
};
|
|
1869
|
+
}
|
|
1870
|
+
function IdentifyUserResponseToJSON(json) {
|
|
1871
|
+
return IdentifyUserResponseToJSONTyped(json, false);
|
|
1872
|
+
}
|
|
1873
|
+
function IdentifyUserResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1874
|
+
if (value == null) return value;
|
|
1875
|
+
return {
|
|
1876
|
+
"city": value["city"],
|
|
1877
|
+
"country": value["country"],
|
|
1878
|
+
"deviceBrowser": value["deviceBrowser"],
|
|
1879
|
+
"deviceType": value["deviceType"],
|
|
1880
|
+
"lat": value["lat"],
|
|
1881
|
+
"lng": value["lng"],
|
|
1882
|
+
"os": value["os"],
|
|
1883
|
+
"postcode": value["postcode"],
|
|
1884
|
+
"region": value["region"],
|
|
1885
|
+
"timeZone": value["timeZone"]
|
|
1886
|
+
};
|
|
1887
|
+
}
|
|
1888
|
+
//#endregion
|
|
1889
|
+
//#region src/generated/apis/UserApi.ts
|
|
1890
|
+
/**
|
|
1891
|
+
* Forge API / Public
|
|
1892
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
1893
|
+
*
|
|
1894
|
+
* The version of the OpenAPI document: 1.0
|
|
1895
|
+
*
|
|
1896
|
+
*
|
|
1897
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1898
|
+
* https://openapi-generator.tech
|
|
1899
|
+
* Do not edit the class manually.
|
|
1900
|
+
*/
|
|
1901
|
+
/**
|
|
1902
|
+
*
|
|
1903
|
+
*/
|
|
1904
|
+
var UserApi = class extends BaseAPI {
|
|
1905
|
+
/**
|
|
1906
|
+
* Creates request options for identifyUser without sending the request
|
|
1907
|
+
*/
|
|
1908
|
+
async identifyUserRequestOpts(requestParameters) {
|
|
1909
|
+
const queryParameters = {};
|
|
1910
|
+
if (requestParameters["userIp"] != null) queryParameters["userIp"] = requestParameters["userIp"];
|
|
1911
|
+
if (requestParameters["userAgent"] != null) queryParameters["userAgent"] = requestParameters["userAgent"];
|
|
1912
|
+
const headerParameters = {};
|
|
1913
|
+
if (this.configuration && this.configuration.apiKey) headerParameters["x-token"] = await this.configuration.apiKey("x-token");
|
|
1914
|
+
return {
|
|
1915
|
+
path: `/api/v1/user/identify`,
|
|
1916
|
+
method: "GET",
|
|
1917
|
+
headers: headerParameters,
|
|
1918
|
+
query: queryParameters
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
/**
|
|
1922
|
+
* Returns the location of the IP address and the device of the user agent, those of the request unless given; needs the get-stats permission.
|
|
1923
|
+
* Identify user
|
|
1924
|
+
*/
|
|
1925
|
+
async identifyUserRaw(requestParameters, initOverrides) {
|
|
1926
|
+
const requestOptions = await this.identifyUserRequestOpts(requestParameters);
|
|
1927
|
+
return new JSONApiResponse(await this.request(requestOptions, initOverrides), (jsonValue) => IdentifyUserResponseFromJSON(jsonValue));
|
|
1928
|
+
}
|
|
1929
|
+
/**
|
|
1930
|
+
* Returns the location of the IP address and the device of the user agent, those of the request unless given; needs the get-stats permission.
|
|
1931
|
+
* Identify user
|
|
1932
|
+
*/
|
|
1933
|
+
async identifyUser(requestParameters = {}, initOverrides) {
|
|
1934
|
+
return await (await this.identifyUserRaw(requestParameters, initOverrides)).value();
|
|
1935
|
+
}
|
|
1936
|
+
};
|
|
1937
|
+
//#endregion
|
|
1938
|
+
//#region src/generated/models/FieldError.ts
|
|
1939
|
+
/**
|
|
1940
|
+
* Check if a given object implements the FieldError interface.
|
|
1941
|
+
*/
|
|
1942
|
+
function instanceOfFieldError(value) {
|
|
1943
|
+
if (!("field" in value) || value["field"] === void 0) return false;
|
|
1944
|
+
if (!("message" in value) || value["message"] === void 0) return false;
|
|
1945
|
+
return true;
|
|
1946
|
+
}
|
|
1947
|
+
function FieldErrorFromJSON(json) {
|
|
1948
|
+
return FieldErrorFromJSONTyped(json, false);
|
|
1949
|
+
}
|
|
1950
|
+
function FieldErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
1951
|
+
if (json == null) return json;
|
|
1952
|
+
return {
|
|
1953
|
+
"field": json["field"],
|
|
1954
|
+
"message": json["message"]
|
|
1955
|
+
};
|
|
1956
|
+
}
|
|
1957
|
+
function FieldErrorToJSON(json) {
|
|
1958
|
+
return FieldErrorToJSONTyped(json, false);
|
|
1959
|
+
}
|
|
1960
|
+
function FieldErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1961
|
+
if (value == null) return value;
|
|
1962
|
+
return {
|
|
1963
|
+
"field": value["field"],
|
|
1964
|
+
"message": value["message"]
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
//#endregion
|
|
1968
|
+
//#region src/generated/models/ErrorResponse.ts
|
|
1969
|
+
/**
|
|
1970
|
+
* @export
|
|
1971
|
+
*/
|
|
1972
|
+
const ErrorResponseCodeEnum = {
|
|
1973
|
+
Internal001: "INTERNAL_001",
|
|
1974
|
+
Validation: "VALIDATION",
|
|
1975
|
+
BadRequest: "BAD_REQUEST",
|
|
1976
|
+
TooLarge: "TOO_LARGE",
|
|
1977
|
+
Org016: "ORG_016",
|
|
1978
|
+
Prj008: "PRJ_008"
|
|
1979
|
+
};
|
|
1980
|
+
/**
|
|
1981
|
+
* Check if a given object implements the ErrorResponse interface.
|
|
1982
|
+
*/
|
|
1983
|
+
function instanceOfErrorResponse(value) {
|
|
1984
|
+
if (!("code" in value) || value["code"] === void 0) return false;
|
|
1985
|
+
if (!("message" in value) || value["message"] === void 0) return false;
|
|
1986
|
+
return true;
|
|
1987
|
+
}
|
|
1988
|
+
function ErrorResponseFromJSON(json) {
|
|
1989
|
+
return ErrorResponseFromJSONTyped(json, false);
|
|
1990
|
+
}
|
|
1991
|
+
function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1992
|
+
if (json == null) return json;
|
|
1993
|
+
return {
|
|
1994
|
+
"code": json["code"],
|
|
1995
|
+
"fields": json["fields"] == null ? void 0 : json["fields"].map(FieldErrorFromJSON),
|
|
1996
|
+
"message": json["message"]
|
|
1997
|
+
};
|
|
1998
|
+
}
|
|
1999
|
+
function ErrorResponseToJSON(json) {
|
|
2000
|
+
return ErrorResponseToJSONTyped(json, false);
|
|
2001
|
+
}
|
|
2002
|
+
function ErrorResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2003
|
+
if (value == null) return value;
|
|
2004
|
+
return {
|
|
2005
|
+
"code": value["code"],
|
|
2006
|
+
"fields": value["fields"] == null ? void 0 : value["fields"].map(FieldErrorToJSON),
|
|
2007
|
+
"message": value["message"]
|
|
2008
|
+
};
|
|
2009
|
+
}
|
|
2010
|
+
//#endregion
|
|
2011
|
+
exports.BASE_PATH = BASE_PATH;
|
|
2012
|
+
exports.BaseAPI = BaseAPI;
|
|
2013
|
+
exports.BlobApiResponse = BlobApiResponse;
|
|
2014
|
+
exports.COLLECTION_FORMATS = COLLECTION_FORMATS;
|
|
2015
|
+
exports.Configuration = Configuration;
|
|
2016
|
+
exports.DebugSymbolsApi = DebugSymbolsApi;
|
|
2017
|
+
exports.DefaultConfig = DefaultConfig;
|
|
2018
|
+
exports.ErrorResponseCodeEnum = ErrorResponseCodeEnum;
|
|
2019
|
+
exports.ErrorResponseFromJSON = ErrorResponseFromJSON;
|
|
2020
|
+
exports.ErrorResponseFromJSONTyped = ErrorResponseFromJSONTyped;
|
|
2021
|
+
exports.ErrorResponseToJSON = ErrorResponseToJSON;
|
|
2022
|
+
exports.ErrorResponseToJSONTyped = ErrorResponseToJSONTyped;
|
|
2023
|
+
exports.EventQueryConditionRequestFromJSON = EventQueryConditionRequestFromJSON;
|
|
2024
|
+
exports.EventQueryConditionRequestFromJSONTyped = EventQueryConditionRequestFromJSONTyped;
|
|
2025
|
+
exports.EventQueryConditionRequestOperationEnum = EventQueryConditionRequestOperationEnum;
|
|
2026
|
+
exports.EventQueryConditionRequestToJSON = EventQueryConditionRequestToJSON;
|
|
2027
|
+
exports.EventQueryConditionRequestToJSONTyped = EventQueryConditionRequestToJSONTyped;
|
|
2028
|
+
exports.EventQueryRequestFromJSON = EventQueryRequestFromJSON;
|
|
2029
|
+
exports.EventQueryRequestFromJSONTyped = EventQueryRequestFromJSONTyped;
|
|
2030
|
+
exports.EventQueryRequestResultEnum = EventQueryRequestResultEnum;
|
|
2031
|
+
exports.EventQueryRequestToJSON = EventQueryRequestToJSON;
|
|
2032
|
+
exports.EventQueryRequestToJSONTyped = EventQueryRequestToJSONTyped;
|
|
2033
|
+
exports.EventTimeStatsAggregationResponseFromJSON = EventTimeStatsAggregationResponseFromJSON;
|
|
2034
|
+
exports.EventTimeStatsAggregationResponseFromJSONTyped = EventTimeStatsAggregationResponseFromJSONTyped;
|
|
2035
|
+
exports.EventTimeStatsAggregationResponseToJSON = EventTimeStatsAggregationResponseToJSON;
|
|
2036
|
+
exports.EventTimeStatsAggregationResponseToJSONTyped = EventTimeStatsAggregationResponseToJSONTyped;
|
|
2037
|
+
exports.EventTimeStatsResponseFromJSON = EventTimeStatsResponseFromJSON;
|
|
2038
|
+
exports.EventTimeStatsResponseFromJSONTyped = EventTimeStatsResponseFromJSONTyped;
|
|
2039
|
+
exports.EventTimeStatsResponseToJSON = EventTimeStatsResponseToJSON;
|
|
2040
|
+
exports.EventTimeStatsResponseToJSONTyped = EventTimeStatsResponseToJSONTyped;
|
|
2041
|
+
exports.EventTimeStatsRowResponseFromJSON = EventTimeStatsRowResponseFromJSON;
|
|
2042
|
+
exports.EventTimeStatsRowResponseFromJSONTyped = EventTimeStatsRowResponseFromJSONTyped;
|
|
2043
|
+
exports.EventTimeStatsRowResponseToJSON = EventTimeStatsRowResponseToJSON;
|
|
2044
|
+
exports.EventTimeStatsRowResponseToJSONTyped = EventTimeStatsRowResponseToJSONTyped;
|
|
2045
|
+
exports.EventTotalStatsResponseFromJSON = EventTotalStatsResponseFromJSON;
|
|
2046
|
+
exports.EventTotalStatsResponseFromJSONTyped = EventTotalStatsResponseFromJSONTyped;
|
|
2047
|
+
exports.EventTotalStatsResponseToJSON = EventTotalStatsResponseToJSON;
|
|
2048
|
+
exports.EventTotalStatsResponseToJSONTyped = EventTotalStatsResponseToJSONTyped;
|
|
2049
|
+
exports.EventTotalStatsValuesResponseFromJSON = EventTotalStatsValuesResponseFromJSON;
|
|
2050
|
+
exports.EventTotalStatsValuesResponseFromJSONTyped = EventTotalStatsValuesResponseFromJSONTyped;
|
|
2051
|
+
exports.EventTotalStatsValuesResponseToJSON = EventTotalStatsValuesResponseToJSON;
|
|
2052
|
+
exports.EventTotalStatsValuesResponseToJSONTyped = EventTotalStatsValuesResponseToJSONTyped;
|
|
2053
|
+
exports.FetchError = FetchError;
|
|
2054
|
+
exports.FieldErrorFromJSON = FieldErrorFromJSON;
|
|
2055
|
+
exports.FieldErrorFromJSONTyped = FieldErrorFromJSONTyped;
|
|
2056
|
+
exports.FieldErrorToJSON = FieldErrorToJSON;
|
|
2057
|
+
exports.FieldErrorToJSONTyped = FieldErrorToJSONTyped;
|
|
2058
|
+
exports.GetEventQueryStatsRequestFromJSON = GetEventQueryStatsRequestFromJSON;
|
|
2059
|
+
exports.GetEventQueryStatsRequestFromJSONTyped = GetEventQueryStatsRequestFromJSONTyped;
|
|
2060
|
+
exports.GetEventQueryStatsRequestToJSON = GetEventQueryStatsRequestToJSON;
|
|
2061
|
+
exports.GetEventQueryStatsRequestToJSONTyped = GetEventQueryStatsRequestToJSONTyped;
|
|
2062
|
+
exports.GranularityType = GranularityType;
|
|
2063
|
+
exports.GranularityTypeFromJSON = GranularityTypeFromJSON;
|
|
2064
|
+
exports.GranularityTypeFromJSONTyped = GranularityTypeFromJSONTyped;
|
|
2065
|
+
exports.GranularityTypeToJSON = GranularityTypeToJSON;
|
|
2066
|
+
exports.GranularityTypeToJSONTyped = GranularityTypeToJSONTyped;
|
|
2067
|
+
exports.HealthApi = HealthApi;
|
|
2068
|
+
exports.HealthResponseFromJSON = HealthResponseFromJSON;
|
|
2069
|
+
exports.HealthResponseFromJSONTyped = HealthResponseFromJSONTyped;
|
|
2070
|
+
exports.HealthResponseToJSON = HealthResponseToJSON;
|
|
2071
|
+
exports.HealthResponseToJSONTyped = HealthResponseToJSONTyped;
|
|
2072
|
+
exports.IdentifyUserResponseFromJSON = IdentifyUserResponseFromJSON;
|
|
2073
|
+
exports.IdentifyUserResponseFromJSONTyped = IdentifyUserResponseFromJSONTyped;
|
|
2074
|
+
exports.IdentifyUserResponseToJSON = IdentifyUserResponseToJSON;
|
|
2075
|
+
exports.IdentifyUserResponseToJSONTyped = IdentifyUserResponseToJSONTyped;
|
|
2076
|
+
exports.JSONApiResponse = JSONApiResponse;
|
|
2077
|
+
exports.OrganizationApi = OrganizationApi;
|
|
2078
|
+
exports.OrganizationResponseFromJSON = OrganizationResponseFromJSON;
|
|
2079
|
+
exports.OrganizationResponseFromJSONTyped = OrganizationResponseFromJSONTyped;
|
|
2080
|
+
exports.OrganizationResponseToJSON = OrganizationResponseToJSON;
|
|
2081
|
+
exports.OrganizationResponseToJSONTyped = OrganizationResponseToJSONTyped;
|
|
2082
|
+
exports.Period = Period;
|
|
2083
|
+
exports.PeriodFromJSON = PeriodFromJSON;
|
|
2084
|
+
exports.PeriodFromJSONTyped = PeriodFromJSONTyped;
|
|
2085
|
+
exports.PeriodToJSON = PeriodToJSON;
|
|
2086
|
+
exports.PeriodToJSONTyped = PeriodToJSONTyped;
|
|
2087
|
+
exports.ProjectApi = ProjectApi;
|
|
2088
|
+
exports.ProjectPublicSettingsResponseFromJSON = ProjectPublicSettingsResponseFromJSON;
|
|
2089
|
+
exports.ProjectPublicSettingsResponseFromJSONTyped = ProjectPublicSettingsResponseFromJSONTyped;
|
|
2090
|
+
exports.ProjectPublicSettingsResponseToJSON = ProjectPublicSettingsResponseToJSON;
|
|
2091
|
+
exports.ProjectPublicSettingsResponseToJSONTyped = ProjectPublicSettingsResponseToJSONTyped;
|
|
2092
|
+
exports.ProjectResponseFromJSON = ProjectResponseFromJSON;
|
|
2093
|
+
exports.ProjectResponseFromJSONTyped = ProjectResponseFromJSONTyped;
|
|
2094
|
+
exports.ProjectResponseToJSON = ProjectResponseToJSON;
|
|
2095
|
+
exports.ProjectResponseToJSONTyped = ProjectResponseToJSONTyped;
|
|
2096
|
+
exports.RequiredError = RequiredError;
|
|
2097
|
+
exports.ResponseError = ResponseError;
|
|
2098
|
+
exports.SessionTimeStatsResponseFromJSON = SessionTimeStatsResponseFromJSON;
|
|
2099
|
+
exports.SessionTimeStatsResponseFromJSONTyped = SessionTimeStatsResponseFromJSONTyped;
|
|
2100
|
+
exports.SessionTimeStatsResponseToJSON = SessionTimeStatsResponseToJSON;
|
|
2101
|
+
exports.SessionTimeStatsResponseToJSONTyped = SessionTimeStatsResponseToJSONTyped;
|
|
2102
|
+
exports.SessionTimeStatsRowResponseFromJSON = SessionTimeStatsRowResponseFromJSON;
|
|
2103
|
+
exports.SessionTimeStatsRowResponseFromJSONTyped = SessionTimeStatsRowResponseFromJSONTyped;
|
|
2104
|
+
exports.SessionTimeStatsRowResponseToJSON = SessionTimeStatsRowResponseToJSON;
|
|
2105
|
+
exports.SessionTimeStatsRowResponseToJSONTyped = SessionTimeStatsRowResponseToJSONTyped;
|
|
2106
|
+
exports.SessionTotalStatsResponseFromJSON = SessionTotalStatsResponseFromJSON;
|
|
2107
|
+
exports.SessionTotalStatsResponseFromJSONTyped = SessionTotalStatsResponseFromJSONTyped;
|
|
2108
|
+
exports.SessionTotalStatsResponseToJSON = SessionTotalStatsResponseToJSON;
|
|
2109
|
+
exports.SessionTotalStatsResponseToJSONTyped = SessionTotalStatsResponseToJSONTyped;
|
|
2110
|
+
exports.SessionTotalStatsValuesResponseFromJSON = SessionTotalStatsValuesResponseFromJSON;
|
|
2111
|
+
exports.SessionTotalStatsValuesResponseFromJSONTyped = SessionTotalStatsValuesResponseFromJSONTyped;
|
|
2112
|
+
exports.SessionTotalStatsValuesResponseToJSON = SessionTotalStatsValuesResponseToJSON;
|
|
2113
|
+
exports.SessionTotalStatsValuesResponseToJSONTyped = SessionTotalStatsValuesResponseToJSONTyped;
|
|
2114
|
+
exports.StatsAggregationResponseFromJSON = StatsAggregationResponseFromJSON;
|
|
2115
|
+
exports.StatsAggregationResponseFromJSONTyped = StatsAggregationResponseFromJSONTyped;
|
|
2116
|
+
exports.StatsAggregationResponseToJSON = StatsAggregationResponseToJSON;
|
|
2117
|
+
exports.StatsAggregationResponseToJSONTyped = StatsAggregationResponseToJSONTyped;
|
|
2118
|
+
exports.StatsApi = StatsApi;
|
|
2119
|
+
exports.StatsCardinalitiesResponseFromJSON = StatsCardinalitiesResponseFromJSON;
|
|
2120
|
+
exports.StatsCardinalitiesResponseFromJSONTyped = StatsCardinalitiesResponseFromJSONTyped;
|
|
2121
|
+
exports.StatsCardinalitiesResponseToJSON = StatsCardinalitiesResponseToJSON;
|
|
2122
|
+
exports.StatsCardinalitiesResponseToJSONTyped = StatsCardinalitiesResponseToJSONTyped;
|
|
2123
|
+
exports.StatsCardinalityResponseFromJSON = StatsCardinalityResponseFromJSON;
|
|
2124
|
+
exports.StatsCardinalityResponseFromJSONTyped = StatsCardinalityResponseFromJSONTyped;
|
|
2125
|
+
exports.StatsCardinalityResponseToJSON = StatsCardinalityResponseToJSON;
|
|
2126
|
+
exports.StatsCardinalityResponseToJSONTyped = StatsCardinalityResponseToJSONTyped;
|
|
2127
|
+
exports.StatsDistributionResponseFromJSON = StatsDistributionResponseFromJSON;
|
|
2128
|
+
exports.StatsDistributionResponseFromJSONTyped = StatsDistributionResponseFromJSONTyped;
|
|
2129
|
+
exports.StatsDistributionResponseToJSON = StatsDistributionResponseToJSON;
|
|
2130
|
+
exports.StatsDistributionResponseToJSONTyped = StatsDistributionResponseToJSONTyped;
|
|
2131
|
+
exports.StatsEventsGlobalDistributionResponseFromJSON = StatsEventsGlobalDistributionResponseFromJSON;
|
|
2132
|
+
exports.StatsEventsGlobalDistributionResponseFromJSONTyped = StatsEventsGlobalDistributionResponseFromJSONTyped;
|
|
2133
|
+
exports.StatsEventsGlobalDistributionResponseToJSON = StatsEventsGlobalDistributionResponseToJSON;
|
|
2134
|
+
exports.StatsEventsGlobalDistributionResponseToJSONTyped = StatsEventsGlobalDistributionResponseToJSONTyped;
|
|
2135
|
+
exports.StatsEventsGlobalDistributionTypeNameResponseFromJSON = StatsEventsGlobalDistributionTypeNameResponseFromJSON;
|
|
2136
|
+
exports.StatsEventsGlobalDistributionTypeNameResponseFromJSONTyped = StatsEventsGlobalDistributionTypeNameResponseFromJSONTyped;
|
|
2137
|
+
exports.StatsEventsGlobalDistributionTypeNameResponseToJSON = StatsEventsGlobalDistributionTypeNameResponseToJSON;
|
|
2138
|
+
exports.StatsEventsGlobalDistributionTypeNameResponseToJSONTyped = StatsEventsGlobalDistributionTypeNameResponseToJSONTyped;
|
|
2139
|
+
exports.StatsEventsGlobalDistributionTypeResponseFromJSON = StatsEventsGlobalDistributionTypeResponseFromJSON;
|
|
2140
|
+
exports.StatsEventsGlobalDistributionTypeResponseFromJSONTyped = StatsEventsGlobalDistributionTypeResponseFromJSONTyped;
|
|
2141
|
+
exports.StatsEventsGlobalDistributionTypeResponseToJSON = StatsEventsGlobalDistributionTypeResponseToJSON;
|
|
2142
|
+
exports.StatsEventsGlobalDistributionTypeResponseToJSONTyped = StatsEventsGlobalDistributionTypeResponseToJSONTyped;
|
|
2143
|
+
exports.StatsTopAggregationResponseFromJSON = StatsTopAggregationResponseFromJSON;
|
|
2144
|
+
exports.StatsTopAggregationResponseFromJSONTyped = StatsTopAggregationResponseFromJSONTyped;
|
|
2145
|
+
exports.StatsTopAggregationResponseToJSON = StatsTopAggregationResponseToJSON;
|
|
2146
|
+
exports.StatsTopAggregationResponseToJSONTyped = StatsTopAggregationResponseToJSONTyped;
|
|
2147
|
+
exports.StatsTopAggregationValuesResponseFromJSON = StatsTopAggregationValuesResponseFromJSON;
|
|
2148
|
+
exports.StatsTopAggregationValuesResponseFromJSONTyped = StatsTopAggregationValuesResponseFromJSONTyped;
|
|
2149
|
+
exports.StatsTopAggregationValuesResponseToJSON = StatsTopAggregationValuesResponseToJSON;
|
|
2150
|
+
exports.StatsTopAggregationValuesResponseToJSONTyped = StatsTopAggregationValuesResponseToJSONTyped;
|
|
2151
|
+
exports.StatsTopResponseFromJSON = StatsTopResponseFromJSON;
|
|
2152
|
+
exports.StatsTopResponseFromJSONTyped = StatsTopResponseFromJSONTyped;
|
|
2153
|
+
exports.StatsTopResponseToJSON = StatsTopResponseToJSON;
|
|
2154
|
+
exports.StatsTopResponseToJSONTyped = StatsTopResponseToJSONTyped;
|
|
2155
|
+
exports.TextApiResponse = TextApiResponse;
|
|
2156
|
+
exports.UploadDebugSymbolsFileRequestFromJSON = UploadDebugSymbolsFileRequestFromJSON;
|
|
2157
|
+
exports.UploadDebugSymbolsFileRequestFromJSONTyped = UploadDebugSymbolsFileRequestFromJSONTyped;
|
|
2158
|
+
exports.UploadDebugSymbolsFileRequestToJSON = UploadDebugSymbolsFileRequestToJSON;
|
|
2159
|
+
exports.UploadDebugSymbolsFileRequestToJSONTyped = UploadDebugSymbolsFileRequestToJSONTyped;
|
|
2160
|
+
exports.UploadDebugSymbolsRequestFromJSON = UploadDebugSymbolsRequestFromJSON;
|
|
2161
|
+
exports.UploadDebugSymbolsRequestFromJSONTyped = UploadDebugSymbolsRequestFromJSONTyped;
|
|
2162
|
+
exports.UploadDebugSymbolsRequestToJSON = UploadDebugSymbolsRequestToJSON;
|
|
2163
|
+
exports.UploadDebugSymbolsRequestToJSONTyped = UploadDebugSymbolsRequestToJSONTyped;
|
|
2164
|
+
exports.UploadDebugSymbolsRequestTypeEnum = UploadDebugSymbolsRequestTypeEnum;
|
|
2165
|
+
exports.UploadDebugSymbolsSourceMapRequestFormatVersionEnum = UploadDebugSymbolsSourceMapRequestFormatVersionEnum;
|
|
2166
|
+
exports.UploadDebugSymbolsSourceMapRequestFromJSON = UploadDebugSymbolsSourceMapRequestFromJSON;
|
|
2167
|
+
exports.UploadDebugSymbolsSourceMapRequestFromJSONTyped = UploadDebugSymbolsSourceMapRequestFromJSONTyped;
|
|
2168
|
+
exports.UploadDebugSymbolsSourceMapRequestToJSON = UploadDebugSymbolsSourceMapRequestToJSON;
|
|
2169
|
+
exports.UploadDebugSymbolsSourceMapRequestToJSONTyped = UploadDebugSymbolsSourceMapRequestToJSONTyped;
|
|
2170
|
+
exports.UserApi = UserApi;
|
|
2171
|
+
exports.VoidApiResponse = VoidApiResponse;
|
|
2172
|
+
exports.canConsumeForm = canConsumeForm;
|
|
2173
|
+
exports.exists = exists;
|
|
2174
|
+
exports.instanceOfErrorResponse = instanceOfErrorResponse;
|
|
2175
|
+
exports.instanceOfEventQueryConditionRequest = instanceOfEventQueryConditionRequest;
|
|
2176
|
+
exports.instanceOfEventQueryRequest = instanceOfEventQueryRequest;
|
|
2177
|
+
exports.instanceOfEventTimeStatsAggregationResponse = instanceOfEventTimeStatsAggregationResponse;
|
|
2178
|
+
exports.instanceOfEventTimeStatsResponse = instanceOfEventTimeStatsResponse;
|
|
2179
|
+
exports.instanceOfEventTimeStatsRowResponse = instanceOfEventTimeStatsRowResponse;
|
|
2180
|
+
exports.instanceOfEventTotalStatsResponse = instanceOfEventTotalStatsResponse;
|
|
2181
|
+
exports.instanceOfEventTotalStatsValuesResponse = instanceOfEventTotalStatsValuesResponse;
|
|
2182
|
+
exports.instanceOfFieldError = instanceOfFieldError;
|
|
2183
|
+
exports.instanceOfGetEventQueryStatsRequest = instanceOfGetEventQueryStatsRequest;
|
|
2184
|
+
exports.instanceOfGranularityType = instanceOfGranularityType;
|
|
2185
|
+
exports.instanceOfHealthResponse = instanceOfHealthResponse;
|
|
2186
|
+
exports.instanceOfIdentifyUserResponse = instanceOfIdentifyUserResponse;
|
|
2187
|
+
exports.instanceOfOrganizationResponse = instanceOfOrganizationResponse;
|
|
2188
|
+
exports.instanceOfPeriod = instanceOfPeriod;
|
|
2189
|
+
exports.instanceOfProjectPublicSettingsResponse = instanceOfProjectPublicSettingsResponse;
|
|
2190
|
+
exports.instanceOfProjectResponse = instanceOfProjectResponse;
|
|
2191
|
+
exports.instanceOfSessionTimeStatsResponse = instanceOfSessionTimeStatsResponse;
|
|
2192
|
+
exports.instanceOfSessionTimeStatsRowResponse = instanceOfSessionTimeStatsRowResponse;
|
|
2193
|
+
exports.instanceOfSessionTotalStatsResponse = instanceOfSessionTotalStatsResponse;
|
|
2194
|
+
exports.instanceOfSessionTotalStatsValuesResponse = instanceOfSessionTotalStatsValuesResponse;
|
|
2195
|
+
exports.instanceOfStatsAggregationResponse = instanceOfStatsAggregationResponse;
|
|
2196
|
+
exports.instanceOfStatsCardinalitiesResponse = instanceOfStatsCardinalitiesResponse;
|
|
2197
|
+
exports.instanceOfStatsCardinalityResponse = instanceOfStatsCardinalityResponse;
|
|
2198
|
+
exports.instanceOfStatsDistributionResponse = instanceOfStatsDistributionResponse;
|
|
2199
|
+
exports.instanceOfStatsEventsGlobalDistributionResponse = instanceOfStatsEventsGlobalDistributionResponse;
|
|
2200
|
+
exports.instanceOfStatsEventsGlobalDistributionTypeNameResponse = instanceOfStatsEventsGlobalDistributionTypeNameResponse;
|
|
2201
|
+
exports.instanceOfStatsEventsGlobalDistributionTypeResponse = instanceOfStatsEventsGlobalDistributionTypeResponse;
|
|
2202
|
+
exports.instanceOfStatsTopAggregationResponse = instanceOfStatsTopAggregationResponse;
|
|
2203
|
+
exports.instanceOfStatsTopAggregationValuesResponse = instanceOfStatsTopAggregationValuesResponse;
|
|
2204
|
+
exports.instanceOfStatsTopResponse = instanceOfStatsTopResponse;
|
|
2205
|
+
exports.instanceOfUploadDebugSymbolsFileRequest = instanceOfUploadDebugSymbolsFileRequest;
|
|
2206
|
+
exports.instanceOfUploadDebugSymbolsRequest = instanceOfUploadDebugSymbolsRequest;
|
|
2207
|
+
exports.instanceOfUploadDebugSymbolsSourceMapRequest = instanceOfUploadDebugSymbolsSourceMapRequest;
|
|
2208
|
+
exports.mapValues = mapValues;
|
|
2209
|
+
exports.querystring = querystring;
|
|
2210
|
+
|
|
2211
|
+
//# sourceMappingURL=index.cjs.map
|