@xyd-js/openapi 0.1.0-xyd.1 → 0.1.0-xyd.3
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/CHANGELOG.md +17 -0
- package/dist/index.cjs +14 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/examples/dist/index.cjs +2 -0
- package/examples/dist/index.cjs.map +1 -0
- package/examples/dist/index.d.cts +2 -0
- package/examples/dist/index.d.ts +2 -0
- package/examples/dist/index.js +2 -0
- package/examples/dist/index.js.map +1 -0
- package/examples/semi/index.ts +16 -0
- package/examples/semi/openapi.yaml +365 -0
- package/examples/semi/references.json +500 -0
- package/examples/webhooks/references.json +895 -0
- package/package.json +4 -3
- package/src/paths.ts +4 -5
- package/src/properties.ts +6 -0
- package/src/schema.ts +10 -4
- package/tsup.examples-config.ts +2 -2
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
title: LiveSession API
|
|
5
|
+
version: v1
|
|
6
|
+
|
|
7
|
+
servers:
|
|
8
|
+
- url: https://api.livesession.io/v1
|
|
9
|
+
description: Production server (uses live data)
|
|
10
|
+
|
|
11
|
+
paths:
|
|
12
|
+
# BEGIN Sessions
|
|
13
|
+
/sessions:
|
|
14
|
+
get:
|
|
15
|
+
summary: Get Sessions
|
|
16
|
+
security:
|
|
17
|
+
- livesession_oauth: [ users.sessions:read ]
|
|
18
|
+
- api_token: [ users.sessions:read ]
|
|
19
|
+
description: |
|
|
20
|
+
---
|
|
21
|
+
title: List sessions
|
|
22
|
+
group: [ENDPOINTS]
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
List of all sessions
|
|
26
|
+
tags:
|
|
27
|
+
- Sessions
|
|
28
|
+
parameters:
|
|
29
|
+
- name: page
|
|
30
|
+
in: query
|
|
31
|
+
description: The number of page to start with (default 0, max 10000).
|
|
32
|
+
schema:
|
|
33
|
+
type: integer
|
|
34
|
+
- name: size
|
|
35
|
+
in: query
|
|
36
|
+
description: The number of page's size (default 25, max 100).
|
|
37
|
+
schema:
|
|
38
|
+
type: integer
|
|
39
|
+
- name: email
|
|
40
|
+
in: query
|
|
41
|
+
description: The email address that you have associated with a session via [identify](https://developers.livesession.io/javascript-api/methods/#identify).
|
|
42
|
+
schema:
|
|
43
|
+
type: string
|
|
44
|
+
- name: visitor_id
|
|
45
|
+
in: query
|
|
46
|
+
description: The visitor ID.
|
|
47
|
+
schema:
|
|
48
|
+
type: string
|
|
49
|
+
- name: tz
|
|
50
|
+
in: query
|
|
51
|
+
description: IANA timezone. Default Europe/London if RelativeDateString is applied.
|
|
52
|
+
schema:
|
|
53
|
+
type: string
|
|
54
|
+
- name: date_from
|
|
55
|
+
in: query
|
|
56
|
+
description: ISO 8601 string or RelativeDateString. For RelativeDateString see table below for possible values.
|
|
57
|
+
schema:
|
|
58
|
+
oneOf:
|
|
59
|
+
- type: string
|
|
60
|
+
- $ref: '#/components/schemas/RelativeDateString'
|
|
61
|
+
- name: date_to
|
|
62
|
+
in: query
|
|
63
|
+
description: ISO 8601 string or [RelativeDateString](#/components/schemas/RelativeDateString). For RelativeDateString see table below for possible values.
|
|
64
|
+
schema:
|
|
65
|
+
oneOf:
|
|
66
|
+
- type: string
|
|
67
|
+
- $ref: '#/components/schemas/RelativeDateString'
|
|
68
|
+
responses:
|
|
69
|
+
'200':
|
|
70
|
+
description: Successful response
|
|
71
|
+
content:
|
|
72
|
+
application/json:
|
|
73
|
+
schema:
|
|
74
|
+
$ref: '#/components/schemas/GetListSessionsResponse'
|
|
75
|
+
'400':
|
|
76
|
+
description: 400 response
|
|
77
|
+
content:
|
|
78
|
+
application/json:
|
|
79
|
+
schema:
|
|
80
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
81
|
+
'500':
|
|
82
|
+
description: 500 response
|
|
83
|
+
content:
|
|
84
|
+
application/json:
|
|
85
|
+
schema:
|
|
86
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
87
|
+
|
|
88
|
+
components:
|
|
89
|
+
securitySchemes:
|
|
90
|
+
api_token:
|
|
91
|
+
type: apiKey
|
|
92
|
+
name: Authorization
|
|
93
|
+
description: "[API Tokens](https://developers.livesession.io/rest-api/introduction/#creating-a-personal-access-token)"
|
|
94
|
+
in: header
|
|
95
|
+
|
|
96
|
+
livesession_oauth:
|
|
97
|
+
type: oauth2
|
|
98
|
+
flows:
|
|
99
|
+
authorizationCode:
|
|
100
|
+
authorizationUrl: https://apis.livesession.io/accounts/v1/oauth2/authorize # TODO: more friendly url
|
|
101
|
+
tokenUrl: https://apis.livesession.io/accounts/v1/oauth2/access_token # TODO: more friendly url
|
|
102
|
+
refreshUrl: https://apis.livesession.io/accounts/v1/oauth2/access_token # TODO: more friendly url
|
|
103
|
+
scopes:
|
|
104
|
+
users.sessions:read: read user sessions
|
|
105
|
+
|
|
106
|
+
webhooks:read: read webhooks
|
|
107
|
+
webhooks:write: write webhooks
|
|
108
|
+
|
|
109
|
+
alerts:read: read alerts
|
|
110
|
+
alerts:write: write alerts
|
|
111
|
+
|
|
112
|
+
websites:read: read websites
|
|
113
|
+
websites:write: write websites
|
|
114
|
+
|
|
115
|
+
payment_intents:write: write payment intents
|
|
116
|
+
payment_intents.confirm: confirm payment intents
|
|
117
|
+
|
|
118
|
+
schemas:
|
|
119
|
+
|
|
120
|
+
# BEGIN Errors
|
|
121
|
+
ErrorResponse:
|
|
122
|
+
type: object
|
|
123
|
+
properties:
|
|
124
|
+
error:
|
|
125
|
+
type: object
|
|
126
|
+
properties:
|
|
127
|
+
type:
|
|
128
|
+
type: string
|
|
129
|
+
code:
|
|
130
|
+
type: string
|
|
131
|
+
param:
|
|
132
|
+
type: string
|
|
133
|
+
message:
|
|
134
|
+
type: string
|
|
135
|
+
http_status_code:
|
|
136
|
+
type: integer
|
|
137
|
+
request_id:
|
|
138
|
+
type: string
|
|
139
|
+
|
|
140
|
+
# END Errors
|
|
141
|
+
|
|
142
|
+
# BEGIN Sessions
|
|
143
|
+
Session:
|
|
144
|
+
type: object
|
|
145
|
+
properties:
|
|
146
|
+
id:
|
|
147
|
+
type: string
|
|
148
|
+
website_id:
|
|
149
|
+
type: string
|
|
150
|
+
session_url:
|
|
151
|
+
type: string
|
|
152
|
+
creation_timestamp:
|
|
153
|
+
type: integer
|
|
154
|
+
duration:
|
|
155
|
+
type: integer
|
|
156
|
+
end_timestamp:
|
|
157
|
+
type: integer
|
|
158
|
+
active_time:
|
|
159
|
+
type: integer
|
|
160
|
+
end_url:
|
|
161
|
+
type: string
|
|
162
|
+
expiration_timestamp:
|
|
163
|
+
type: integer
|
|
164
|
+
last_event_timestamp:
|
|
165
|
+
type: integer
|
|
166
|
+
product:
|
|
167
|
+
type: string
|
|
168
|
+
device:
|
|
169
|
+
type: string
|
|
170
|
+
tags:
|
|
171
|
+
type: array
|
|
172
|
+
items:
|
|
173
|
+
type: string
|
|
174
|
+
last_seen_page_view_id:
|
|
175
|
+
type: string
|
|
176
|
+
seen:
|
|
177
|
+
type: boolean
|
|
178
|
+
referrer:
|
|
179
|
+
type: string
|
|
180
|
+
start_url:
|
|
181
|
+
type: string
|
|
182
|
+
visitor_first_session:
|
|
183
|
+
type: boolean
|
|
184
|
+
engagment_score:
|
|
185
|
+
type: number
|
|
186
|
+
visitor:
|
|
187
|
+
$ref: '#/components/schemas/SessionVisitorData'
|
|
188
|
+
resolution:
|
|
189
|
+
$ref: '#/components/schemas/SessionResolutionData'
|
|
190
|
+
os:
|
|
191
|
+
$ref: '#/components/schemas/SessionOsData'
|
|
192
|
+
browser:
|
|
193
|
+
$ref: '#/components/schemas/SessionBrowserData'
|
|
194
|
+
utm:
|
|
195
|
+
$ref: '#/components/schemas/SessionUTMData'
|
|
196
|
+
page_views_statistics:
|
|
197
|
+
$ref: '#/components/schemas/SessionPageViewsStatisticsData'
|
|
198
|
+
events_statistics:
|
|
199
|
+
$ref: '#/components/schemas/SessionEventsStatisticsData'
|
|
200
|
+
|
|
201
|
+
SessionVisitorData:
|
|
202
|
+
type: object
|
|
203
|
+
properties:
|
|
204
|
+
id:
|
|
205
|
+
type: string
|
|
206
|
+
ip:
|
|
207
|
+
type: string
|
|
208
|
+
geolocation:
|
|
209
|
+
$ref: '#/components/schemas/SessionVisitorDataGeolocation'
|
|
210
|
+
name:
|
|
211
|
+
type: string
|
|
212
|
+
email:
|
|
213
|
+
type: string
|
|
214
|
+
email_hash:
|
|
215
|
+
type: string
|
|
216
|
+
params:
|
|
217
|
+
type: array
|
|
218
|
+
items:
|
|
219
|
+
$ref: '#/components/schemas/SessionVisitorDataParams'
|
|
220
|
+
last_session_timestamp:
|
|
221
|
+
type: integer
|
|
222
|
+
first_session_timestamp:
|
|
223
|
+
type: integer
|
|
224
|
+
|
|
225
|
+
SessionOsData:
|
|
226
|
+
type: object
|
|
227
|
+
properties:
|
|
228
|
+
name:
|
|
229
|
+
type: string
|
|
230
|
+
version:
|
|
231
|
+
type: string
|
|
232
|
+
|
|
233
|
+
SessionBrowserData:
|
|
234
|
+
type: object
|
|
235
|
+
properties:
|
|
236
|
+
description:
|
|
237
|
+
type: string
|
|
238
|
+
name:
|
|
239
|
+
type: string
|
|
240
|
+
version:
|
|
241
|
+
type: string
|
|
242
|
+
|
|
243
|
+
SessionUTMData:
|
|
244
|
+
type: object
|
|
245
|
+
properties:
|
|
246
|
+
source:
|
|
247
|
+
type: string
|
|
248
|
+
medium:
|
|
249
|
+
type: string
|
|
250
|
+
campaign:
|
|
251
|
+
type: string
|
|
252
|
+
term:
|
|
253
|
+
type: string
|
|
254
|
+
content:
|
|
255
|
+
type: string
|
|
256
|
+
|
|
257
|
+
SessionEventsStatisticsData:
|
|
258
|
+
type: object
|
|
259
|
+
properties:
|
|
260
|
+
clicks:
|
|
261
|
+
type: integer
|
|
262
|
+
error_clicks:
|
|
263
|
+
type: integer
|
|
264
|
+
rage_clicks:
|
|
265
|
+
type: integer
|
|
266
|
+
error_logs:
|
|
267
|
+
type: integer
|
|
268
|
+
net_errors:
|
|
269
|
+
type: integer
|
|
270
|
+
|
|
271
|
+
SessionPageViewLocationData:
|
|
272
|
+
type: object
|
|
273
|
+
properties:
|
|
274
|
+
base:
|
|
275
|
+
type: string
|
|
276
|
+
href:
|
|
277
|
+
type: string
|
|
278
|
+
origin:
|
|
279
|
+
type: string
|
|
280
|
+
referrer:
|
|
281
|
+
type: string
|
|
282
|
+
|
|
283
|
+
SessionPageViewViewPortData:
|
|
284
|
+
type: object
|
|
285
|
+
properties:
|
|
286
|
+
height:
|
|
287
|
+
type: integer
|
|
288
|
+
width:
|
|
289
|
+
type: integer
|
|
290
|
+
|
|
291
|
+
SessionVisitorDataGeolocation:
|
|
292
|
+
type: object
|
|
293
|
+
properties:
|
|
294
|
+
country_code:
|
|
295
|
+
type: string
|
|
296
|
+
city:
|
|
297
|
+
type: string
|
|
298
|
+
region:
|
|
299
|
+
type: string
|
|
300
|
+
|
|
301
|
+
SessionVisitorDataParams:
|
|
302
|
+
type: object
|
|
303
|
+
properties:
|
|
304
|
+
name:
|
|
305
|
+
type: string
|
|
306
|
+
value:
|
|
307
|
+
type: string
|
|
308
|
+
|
|
309
|
+
SessionResolutionData:
|
|
310
|
+
type: object
|
|
311
|
+
properties:
|
|
312
|
+
height:
|
|
313
|
+
type: integer
|
|
314
|
+
width:
|
|
315
|
+
type: integer
|
|
316
|
+
resolution:
|
|
317
|
+
type: string
|
|
318
|
+
|
|
319
|
+
SessionPageViewsStatisticsData:
|
|
320
|
+
type: object
|
|
321
|
+
properties:
|
|
322
|
+
count:
|
|
323
|
+
type: integer
|
|
324
|
+
|
|
325
|
+
GetListSessionsResponse:
|
|
326
|
+
type: object
|
|
327
|
+
properties:
|
|
328
|
+
total:
|
|
329
|
+
type: integer
|
|
330
|
+
page:
|
|
331
|
+
$ref: '#/components/schemas/Pagination'
|
|
332
|
+
sessions:
|
|
333
|
+
type: array
|
|
334
|
+
items:
|
|
335
|
+
$ref: '#/components/schemas/Session'
|
|
336
|
+
|
|
337
|
+
Pagination:
|
|
338
|
+
type: object
|
|
339
|
+
properties:
|
|
340
|
+
num:
|
|
341
|
+
type: integer
|
|
342
|
+
size:
|
|
343
|
+
type: integer
|
|
344
|
+
|
|
345
|
+
RelativeDateString:
|
|
346
|
+
type: string
|
|
347
|
+
description: |
|
|
348
|
+
* `TODAY` - Today since midnight
|
|
349
|
+
* `YESTERDAY` - Yesterday since midnight
|
|
350
|
+
* `BEGINNING_OF_WEEK` - Nearest monday since midnight
|
|
351
|
+
* `BEGINNING_OF_MONTH` - 1st of the month since midnight
|
|
352
|
+
* `BEGINNING_OF_PREV_MONTH` - Previous 1st of the month since midnight
|
|
353
|
+
* `TODAY-7DAYS` - Exact 7 days ago since midnight
|
|
354
|
+
* `TODAY-30DAYS` - Exact 30 days ago since midnight
|
|
355
|
+
enum:
|
|
356
|
+
- TODAY
|
|
357
|
+
- YESTERDAY
|
|
358
|
+
- BEGINNING_OF_WEEK
|
|
359
|
+
- BEGINNING_OF_MONTH
|
|
360
|
+
- BEGINNING_OF_PREV_MONTH
|
|
361
|
+
- TODAY-7DAYS
|
|
362
|
+
- TODAY-30DAYS
|
|
363
|
+
# END Sessions
|
|
364
|
+
|
|
365
|
+
|