Skip to content

Commit a8bde75

Browse files
committed
Update client
1 parent d46de6d commit a8bde75

File tree

10 files changed

+446
-9
lines changed

10 files changed

+446
-9
lines changed

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ docs/Session.md
5050
docs/SessionResponse.md
5151
docs/SessionStatistics.md
5252
docs/SessionWindow.md
53+
docs/SingleEventResponse.md
5354
docs/SlotPersonalized.md
5455
docs/SlotPersonalizedMetadata.md
5556
docs/SlotPersonalizedPersonalization.md

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.19.0-SNAPSHOT
1+
7.21.0-SNAPSHOT

api.ts

Lines changed: 241 additions & 2 deletions
Large diffs are not rendered by default.

base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Croct Export
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
7-
* The version of the OpenAPI document: 0.5.0
7+
* The version of the OpenAPI document: 0.6.0
88
* Contact: apis@croct.com
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

common.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Croct Export
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
7-
* The version of the OpenAPI document: 0.5.0
7+
* The version of the OpenAPI document: 0.6.0
88
* Contact: apis@croct.com
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -66,7 +66,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
6666
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
6767
if (parameter == null) return;
6868
if (typeof parameter === "object") {
69-
if (Array.isArray(parameter)) {
69+
if (Array.isArray(parameter) || parameter instanceof Set) {
7070
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
7171
}
7272
else {
@@ -91,13 +91,27 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
9191
url.search = searchParams.toString();
9292
}
9393

94+
/**
95+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
96+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
97+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
98+
*/
99+
// @ts-ignore
100+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
101+
if (value instanceof Set) {
102+
return Array.from(value);
103+
} else {
104+
return value;
105+
}
106+
}
107+
94108
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
95109
const nonString = typeof value !== 'string';
96110
const needsSerialization = nonString && configuration && configuration.isJsonMime
97111
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
98112
: nonString;
99113
return needsSerialization
100-
? JSON.stringify(value !== undefined ? value : {})
114+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
101115
: (value || "");
102116
}
103117

configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Croct Export
44
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
55
*
6-
* The version of the OpenAPI document: 0.5.0
6+
* The version of the OpenAPI document: 0.6.0
77
* Contact: apis@croct.com
88
*
99
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

docs/Event.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8+
**id** | **string** | The unique identifier of the event. | [default to undefined]
89
**sessionId** | **string** | The ID of the session assigned to the event. | [default to undefined]
910
**userId** | **string** | The internal ID of the user who originated the event. | [default to undefined]
1011
**timestamp** | **number** | The timestamp when the event was tracked, in milliseconds since epoch. | [default to undefined]
@@ -17,6 +18,7 @@ Name | Type | Description | Notes
1718
import { Event } from '@croct/export';
1819

1920
const instance: Event = {
21+
id,
2022
sessionId,
2123
userId,
2224
timestamp,

docs/ExportApi.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,65 @@ All URIs are relative to *https://api.croct.io/export*
44

55
|Method | HTTP request | Description|
66
|------------- | ------------- | -------------|
7+
|[**exportEventById**](#exporteventbyid) | **GET** /events/{id} | |
78
|[**exportEvents**](#exportevents) | **GET** /events | |
9+
|[**exportSessionById**](#exportsessionbyid) | **GET** /session/{sessionId} | |
810
|[**exportSessions**](#exportsessions) | **GET** /session | |
11+
|[**exportUserById**](#exportuserbyid) | **GET** /user/{userId} | |
912
|[**exportUsers**](#exportusers) | **GET** /user | |
1013

14+
# **exportEventById**
15+
> SingleEventResponse exportEventById()
16+
17+
18+
### Example
19+
20+
```typescript
21+
import {
22+
ExportApi,
23+
Configuration
24+
} from '@croct/export';
25+
26+
const configuration = new Configuration();
27+
const apiInstance = new ExportApi(configuration);
28+
29+
let id: string; //The unique identifier of the event (default to undefined)
30+
31+
const { status, data } = await apiInstance.exportEventById(
32+
id
33+
);
34+
```
35+
36+
### Parameters
37+
38+
|Name | Type | Description | Notes|
39+
|------------- | ------------- | ------------- | -------------|
40+
| **id** | [**string**] | The unique identifier of the event | defaults to undefined|
41+
42+
43+
### Return type
44+
45+
**SingleEventResponse**
46+
47+
### Authorization
48+
49+
[ApiKeyAuth](../README.md#ApiKeyAuth)
50+
51+
### HTTP request headers
52+
53+
- **Content-Type**: Not defined
54+
- **Accept**: application/json
55+
56+
57+
### HTTP response details
58+
| Status code | Description | Response headers |
59+
|-------------|-------------|------------------|
60+
|**200** | Event found | - |
61+
|**404** | Request error | - |
62+
|**0** | Request error | - |
63+
64+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
65+
1166
# **exportEvents**
1267
> EventResponse exportEvents()
1368
@@ -71,6 +126,58 @@ const { status, data } = await apiInstance.exportEvents(
71126

72127
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
73128

129+
# **exportSessionById**
130+
> Session exportSessionById()
131+
132+
133+
### Example
134+
135+
```typescript
136+
import {
137+
ExportApi,
138+
Configuration
139+
} from '@croct/export';
140+
141+
const configuration = new Configuration();
142+
const apiInstance = new ExportApi(configuration);
143+
144+
let sessionId: string; //The unique identifier of the session (default to undefined)
145+
146+
const { status, data } = await apiInstance.exportSessionById(
147+
sessionId
148+
);
149+
```
150+
151+
### Parameters
152+
153+
|Name | Type | Description | Notes|
154+
|------------- | ------------- | ------------- | -------------|
155+
| **sessionId** | [**string**] | The unique identifier of the session | defaults to undefined|
156+
157+
158+
### Return type
159+
160+
**Session**
161+
162+
### Authorization
163+
164+
[ApiKeyAuth](../README.md#ApiKeyAuth)
165+
166+
### HTTP request headers
167+
168+
- **Content-Type**: Not defined
169+
- **Accept**: application/json
170+
171+
172+
### HTTP response details
173+
| Status code | Description | Response headers |
174+
|-------------|-------------|------------------|
175+
|**200** | Session found | - |
176+
|**404** | Request error | - |
177+
|**0** | Request error | - |
178+
179+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
180+
74181
# **exportSessions**
75182
> SessionResponse exportSessions()
76183
@@ -131,6 +238,58 @@ const { status, data } = await apiInstance.exportSessions(
131238

132239
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
133240

241+
# **exportUserById**
242+
> User exportUserById()
243+
244+
245+
### Example
246+
247+
```typescript
248+
import {
249+
ExportApi,
250+
Configuration
251+
} from '@croct/export';
252+
253+
const configuration = new Configuration();
254+
const apiInstance = new ExportApi(configuration);
255+
256+
let userId: string; //The unique identifier of the user (default to undefined)
257+
258+
const { status, data } = await apiInstance.exportUserById(
259+
userId
260+
);
261+
```
262+
263+
### Parameters
264+
265+
|Name | Type | Description | Notes|
266+
|------------- | ------------- | ------------- | -------------|
267+
| **userId** | [**string**] | The unique identifier of the user | defaults to undefined|
268+
269+
270+
### Return type
271+
272+
**User**
273+
274+
### Authorization
275+
276+
[ApiKeyAuth](../README.md#ApiKeyAuth)
277+
278+
### HTTP request headers
279+
280+
- **Content-Type**: Not defined
281+
- **Accept**: application/json
282+
283+
284+
### HTTP response details
285+
| Status code | Description | Response headers |
286+
|-------------|-------------|------------------|
287+
|**200** | User found | - |
288+
|**404** | Request error | - |
289+
|**0** | Request error | - |
290+
291+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
292+
134293
# **exportUsers**
135294
> UserResponse exportUsers()
136295

docs/SingleEventResponse.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SingleEventResponse
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**metadata** | [**EventResponseMetadata**](EventResponseMetadata.md) | | [default to undefined]
9+
**event** | [**Event**](Event.md) | | [default to undefined]
10+
11+
## Example
12+
13+
```typescript
14+
import { SingleEventResponse } from '@croct/export';
15+
16+
const instance: SingleEventResponse = {
17+
metadata,
18+
event,
19+
};
20+
```
21+
22+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Croct Export
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
7-
* The version of the OpenAPI document: 0.5.0
7+
* The version of the OpenAPI document: 0.6.0
88
* Contact: apis@croct.com
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)