@vrplatform/api 1.3.1-stage.2239 → 1.3.1-stage.2241
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/build/main/services/analytics/generated/v1.d.ts +2 -2
- package/build/main/services/analytics/generated/v1.js.map +1 -1
- package/build/main/services/api/client.js +15 -0
- package/build/main/services/api/client.js.map +1 -1
- package/build/main/services/api/generated/v1.d.ts +117 -117
- package/build/main/services/api/generated/v1.js.map +1 -1
- package/build/main/services/api/types.d.ts +68 -1
- package/build/main/services/api/types.js.map +1 -1
- package/build/main/services/cache/generated/v1.d.ts +6 -6
- package/build/main/services/cache/generated/v1.js.map +1 -1
- package/build/main/services/control-plane/generated/v1.d.ts +10 -10
- package/build/main/services/control-plane/generated/v1.js.map +1 -1
- package/build/main/services/ingest/generated/v1.d.ts +9 -9
- package/build/main/services/ingest/generated/v1.js.map +1 -1
- package/build/module/services/analytics/generated/v1.d.ts +2 -2
- package/build/module/services/analytics/generated/v1.js.map +1 -1
- package/build/module/services/api/client.js +15 -0
- package/build/module/services/api/client.js.map +1 -1
- package/build/module/services/api/generated/v1.d.ts +117 -117
- package/build/module/services/api/generated/v1.js.map +1 -1
- package/build/module/services/api/types.d.ts +68 -1
- package/build/module/services/api/types.js.map +1 -1
- package/build/module/services/cache/generated/v1.d.ts +6 -6
- package/build/module/services/cache/generated/v1.js.map +1 -1
- package/build/module/services/control-plane/generated/v1.d.ts +10 -10
- package/build/module/services/control-plane/generated/v1.js.map +1 -1
- package/build/module/services/ingest/generated/v1.d.ts +9 -9
- package/build/module/services/ingest/generated/v1.js.map +1 -1
- package/package.json +4 -3
- package/src/services/analytics/generated/v1.ts +2 -2
- package/src/services/api/client.ts +30 -0
- package/src/services/api/generated/v1.ts +117 -117
- package/src/services/api/types.ts +113 -1
- package/src/services/cache/generated/v1.ts +6 -6
- package/src/services/control-plane/generated/v1.ts +10 -10
- package/src/services/ingest/generated/v1.ts +9 -9
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type createClient from 'openapi-fetch';
|
|
2
|
+
import type {
|
|
3
|
+
ErrorResponse,
|
|
4
|
+
HttpMethod,
|
|
5
|
+
IsOperationRequestBodyOptional,
|
|
6
|
+
MediaType,
|
|
7
|
+
OperationRequestBodyContent,
|
|
8
|
+
PathsWithMethod,
|
|
9
|
+
RequiredKeysOf,
|
|
10
|
+
ResponseObjectMap,
|
|
11
|
+
SuccessResponse,
|
|
12
|
+
} from 'openapi-typescript-helpers';
|
|
2
13
|
import type { paths } from './generated/v1';
|
|
3
14
|
|
|
4
15
|
export type ApiClientAuth = {
|
|
@@ -8,7 +19,108 @@ export type ApiClientAuth = {
|
|
|
8
19
|
accessToken?: string;
|
|
9
20
|
};
|
|
10
21
|
|
|
11
|
-
|
|
22
|
+
type BaseApiClient = ReturnType<typeof createClient<paths>>;
|
|
23
|
+
|
|
24
|
+
type BodyType<T = unknown> = {
|
|
25
|
+
json: T;
|
|
26
|
+
text: Awaited<ReturnType<Response['text']>>;
|
|
27
|
+
blob: Awaited<ReturnType<Response['blob']>>;
|
|
28
|
+
arrayBuffer: Awaited<ReturnType<Response['arrayBuffer']>>;
|
|
29
|
+
stream: Response['body'];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
type ParseAs = keyof BodyType;
|
|
33
|
+
|
|
34
|
+
type ParseAsResponse<T, Options> = Options extends {
|
|
35
|
+
parseAs: ParseAs;
|
|
36
|
+
}
|
|
37
|
+
? BodyType<T>[Options['parseAs']]
|
|
38
|
+
: T;
|
|
39
|
+
|
|
40
|
+
type DefaultParamsOption = {
|
|
41
|
+
params?: {
|
|
42
|
+
query?: Record<string, unknown>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type ParamsOption<T> = T extends {
|
|
47
|
+
parameters: any;
|
|
48
|
+
}
|
|
49
|
+
? RequiredKeysOf<T['parameters']> extends never
|
|
50
|
+
? { params?: T['parameters'] }
|
|
51
|
+
: { params: T['parameters'] }
|
|
52
|
+
: DefaultParamsOption;
|
|
53
|
+
|
|
54
|
+
type RequestBodyOption<T> =
|
|
55
|
+
OperationRequestBodyContent<T> extends never
|
|
56
|
+
? { body?: never }
|
|
57
|
+
: IsOperationRequestBodyOptional<T> extends true
|
|
58
|
+
? { body?: OperationRequestBodyContent<T> }
|
|
59
|
+
: { body: OperationRequestBodyContent<T> };
|
|
60
|
+
|
|
61
|
+
type EmptyJsonBody = Record<string, never>;
|
|
62
|
+
|
|
63
|
+
type RelaxDeleteBody<T> = T extends {
|
|
64
|
+
body: infer Body;
|
|
65
|
+
}
|
|
66
|
+
? Body extends EmptyJsonBody
|
|
67
|
+
? Omit<T, 'body'> & { body?: Body }
|
|
68
|
+
: T
|
|
69
|
+
: T;
|
|
70
|
+
|
|
71
|
+
type MethodRequestOptions<T> = ParamsOption<T> &
|
|
72
|
+
RelaxDeleteBody<RequestBodyOption<T>> & {
|
|
73
|
+
baseUrl?: string;
|
|
74
|
+
querySerializer?: unknown;
|
|
75
|
+
bodySerializer?: unknown;
|
|
76
|
+
pathSerializer?: unknown;
|
|
77
|
+
parseAs?: ParseAs;
|
|
78
|
+
fetch?: unknown;
|
|
79
|
+
headers?: unknown;
|
|
80
|
+
middleware?: unknown[];
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
type InitParam<Init> =
|
|
84
|
+
RequiredKeysOf<Init> extends never
|
|
85
|
+
? [(Init & { [key: string]: unknown })?]
|
|
86
|
+
: [Init & { [key: string]: unknown }];
|
|
87
|
+
|
|
88
|
+
type DeleteFetchResponse<
|
|
89
|
+
T extends Record<string | number, any>,
|
|
90
|
+
Options,
|
|
91
|
+
Media extends MediaType = MediaType,
|
|
92
|
+
> =
|
|
93
|
+
| {
|
|
94
|
+
data: ParseAsResponse<
|
|
95
|
+
SuccessResponse<ResponseObjectMap<T>, Media>,
|
|
96
|
+
Options
|
|
97
|
+
>;
|
|
98
|
+
error?: never;
|
|
99
|
+
response: Response;
|
|
100
|
+
}
|
|
101
|
+
| {
|
|
102
|
+
data?: never;
|
|
103
|
+
error: ErrorResponse<ResponseObjectMap<T>, Media>;
|
|
104
|
+
response: Response;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
type ApiMethod<Method extends HttpMethod> = <
|
|
108
|
+
Path extends PathsWithMethod<paths, Method>,
|
|
109
|
+
Operation extends Extract<paths[Path][Method], Record<string | number, any>>,
|
|
110
|
+
Init extends MethodRequestOptions<Operation>,
|
|
111
|
+
>(
|
|
112
|
+
url: Path,
|
|
113
|
+
...init: InitParam<Init>
|
|
114
|
+
) => Promise<DeleteFetchResponse<Operation, Init>>;
|
|
115
|
+
|
|
116
|
+
export type ApiClient = Omit<
|
|
117
|
+
BaseApiClient,
|
|
118
|
+
'DELETE' | 'PATCH' | 'POST' | 'PUT'
|
|
119
|
+
> & {
|
|
120
|
+
DELETE: ApiMethod<'delete'>;
|
|
121
|
+
PATCH: ApiMethod<'patch'>;
|
|
122
|
+
POST: ApiMethod<'post'>;
|
|
123
|
+
PUT: ApiMethod<'put'>;
|
|
12
124
|
sessionId: string;
|
|
13
125
|
};
|
|
14
126
|
|
|
@@ -243,7 +243,7 @@ export interface operations {
|
|
|
243
243
|
path?: never;
|
|
244
244
|
cookie?: never;
|
|
245
245
|
};
|
|
246
|
-
requestBody
|
|
246
|
+
requestBody: {
|
|
247
247
|
content: {
|
|
248
248
|
"application/json": {
|
|
249
249
|
ctxKey: string;
|
|
@@ -383,7 +383,7 @@ export interface operations {
|
|
|
383
383
|
path?: never;
|
|
384
384
|
cookie?: never;
|
|
385
385
|
};
|
|
386
|
-
requestBody
|
|
386
|
+
requestBody: {
|
|
387
387
|
content: {
|
|
388
388
|
"application/json": {
|
|
389
389
|
/** @default [] */
|
|
@@ -476,7 +476,7 @@ export interface operations {
|
|
|
476
476
|
path?: never;
|
|
477
477
|
cookie?: never;
|
|
478
478
|
};
|
|
479
|
-
requestBody
|
|
479
|
+
requestBody: {
|
|
480
480
|
content: {
|
|
481
481
|
"application/json": {
|
|
482
482
|
credential: string;
|
|
@@ -727,7 +727,7 @@ export interface operations {
|
|
|
727
727
|
path?: never;
|
|
728
728
|
cookie?: never;
|
|
729
729
|
};
|
|
730
|
-
requestBody
|
|
730
|
+
requestBody: {
|
|
731
731
|
content: {
|
|
732
732
|
"application/json": {
|
|
733
733
|
rows: {
|
|
@@ -827,7 +827,7 @@ export interface operations {
|
|
|
827
827
|
path?: never;
|
|
828
828
|
cookie?: never;
|
|
829
829
|
};
|
|
830
|
-
requestBody
|
|
830
|
+
requestBody: {
|
|
831
831
|
content: {
|
|
832
832
|
"application/json": {
|
|
833
833
|
/** Format: uuid */
|
|
@@ -921,7 +921,7 @@ export interface operations {
|
|
|
921
921
|
path?: never;
|
|
922
922
|
cookie?: never;
|
|
923
923
|
};
|
|
924
|
-
requestBody
|
|
924
|
+
requestBody: {
|
|
925
925
|
content: {
|
|
926
926
|
"application/json": {
|
|
927
927
|
/** Format: uuid */
|
|
@@ -444,7 +444,7 @@ export interface operations {
|
|
|
444
444
|
path?: never;
|
|
445
445
|
cookie?: never;
|
|
446
446
|
};
|
|
447
|
-
requestBody
|
|
447
|
+
requestBody: {
|
|
448
448
|
content: {
|
|
449
449
|
"application/json": {
|
|
450
450
|
uniqueRef: string;
|
|
@@ -554,7 +554,7 @@ export interface operations {
|
|
|
554
554
|
path?: never;
|
|
555
555
|
cookie?: never;
|
|
556
556
|
};
|
|
557
|
-
requestBody
|
|
557
|
+
requestBody: {
|
|
558
558
|
content: {
|
|
559
559
|
"application/json": {
|
|
560
560
|
apiKey: string;
|
|
@@ -663,7 +663,7 @@ export interface operations {
|
|
|
663
663
|
path?: never;
|
|
664
664
|
cookie?: never;
|
|
665
665
|
};
|
|
666
|
-
requestBody
|
|
666
|
+
requestBody: {
|
|
667
667
|
content: {
|
|
668
668
|
"application/json": {
|
|
669
669
|
apiKey: string;
|
|
@@ -806,7 +806,7 @@ export interface operations {
|
|
|
806
806
|
path?: never;
|
|
807
807
|
cookie?: never;
|
|
808
808
|
};
|
|
809
|
-
requestBody
|
|
809
|
+
requestBody: {
|
|
810
810
|
content: {
|
|
811
811
|
"application/json": {
|
|
812
812
|
bearerToken: string;
|
|
@@ -948,7 +948,7 @@ export interface operations {
|
|
|
948
948
|
path?: never;
|
|
949
949
|
cookie?: never;
|
|
950
950
|
};
|
|
951
|
-
requestBody
|
|
951
|
+
requestBody: {
|
|
952
952
|
content: {
|
|
953
953
|
"application/json": {
|
|
954
954
|
/** @default [] */
|
|
@@ -1041,7 +1041,7 @@ export interface operations {
|
|
|
1041
1041
|
path?: never;
|
|
1042
1042
|
cookie?: never;
|
|
1043
1043
|
};
|
|
1044
|
-
requestBody
|
|
1044
|
+
requestBody: {
|
|
1045
1045
|
content: {
|
|
1046
1046
|
"application/json": {
|
|
1047
1047
|
apiKey: string;
|
|
@@ -1139,7 +1139,7 @@ export interface operations {
|
|
|
1139
1139
|
path?: never;
|
|
1140
1140
|
cookie?: never;
|
|
1141
1141
|
};
|
|
1142
|
-
requestBody
|
|
1142
|
+
requestBody: {
|
|
1143
1143
|
content: {
|
|
1144
1144
|
"application/json": {
|
|
1145
1145
|
/** Format: uuid */
|
|
@@ -1468,7 +1468,7 @@ export interface operations {
|
|
|
1468
1468
|
path?: never;
|
|
1469
1469
|
cookie?: never;
|
|
1470
1470
|
};
|
|
1471
|
-
requestBody
|
|
1471
|
+
requestBody: {
|
|
1472
1472
|
content: {
|
|
1473
1473
|
"application/json": {
|
|
1474
1474
|
uniqueRef: string;
|
|
@@ -1657,7 +1657,7 @@ export interface operations {
|
|
|
1657
1657
|
};
|
|
1658
1658
|
cookie?: never;
|
|
1659
1659
|
};
|
|
1660
|
-
requestBody
|
|
1660
|
+
requestBody: {
|
|
1661
1661
|
content: {
|
|
1662
1662
|
"application/json": {
|
|
1663
1663
|
/** Format: uuid */
|
|
@@ -1940,7 +1940,7 @@ export interface operations {
|
|
|
1940
1940
|
};
|
|
1941
1941
|
cookie?: never;
|
|
1942
1942
|
};
|
|
1943
|
-
requestBody
|
|
1943
|
+
requestBody: {
|
|
1944
1944
|
content: {
|
|
1945
1945
|
"application/json": {
|
|
1946
1946
|
status: ("all" | "disabled" | "partially") | null;
|
|
@@ -296,7 +296,7 @@ export interface operations {
|
|
|
296
296
|
path?: never;
|
|
297
297
|
cookie?: never;
|
|
298
298
|
};
|
|
299
|
-
requestBody
|
|
299
|
+
requestBody: {
|
|
300
300
|
content: {
|
|
301
301
|
"application/json": {
|
|
302
302
|
connectionIds: string[];
|
|
@@ -502,7 +502,7 @@ export interface operations {
|
|
|
502
502
|
};
|
|
503
503
|
cookie?: never;
|
|
504
504
|
};
|
|
505
|
-
requestBody
|
|
505
|
+
requestBody: {
|
|
506
506
|
content: {
|
|
507
507
|
"application/json": {
|
|
508
508
|
/** Format: uuid */
|
|
@@ -686,7 +686,7 @@ export interface operations {
|
|
|
686
686
|
path?: never;
|
|
687
687
|
cookie?: never;
|
|
688
688
|
};
|
|
689
|
-
requestBody
|
|
689
|
+
requestBody: {
|
|
690
690
|
content: {
|
|
691
691
|
"application/json": {
|
|
692
692
|
/** Format: uuid */
|
|
@@ -829,7 +829,7 @@ export interface operations {
|
|
|
829
829
|
path?: never;
|
|
830
830
|
cookie?: never;
|
|
831
831
|
};
|
|
832
|
-
requestBody
|
|
832
|
+
requestBody: {
|
|
833
833
|
content: {
|
|
834
834
|
"application/json": {
|
|
835
835
|
/** Format: uuid */
|
|
@@ -982,7 +982,7 @@ export interface operations {
|
|
|
982
982
|
path?: never;
|
|
983
983
|
cookie?: never;
|
|
984
984
|
};
|
|
985
|
-
requestBody
|
|
985
|
+
requestBody: {
|
|
986
986
|
content: {
|
|
987
987
|
"application/json": {
|
|
988
988
|
/** Format: uuid */
|
|
@@ -1137,7 +1137,7 @@ export interface operations {
|
|
|
1137
1137
|
path?: never;
|
|
1138
1138
|
cookie?: never;
|
|
1139
1139
|
};
|
|
1140
|
-
requestBody
|
|
1140
|
+
requestBody: {
|
|
1141
1141
|
content: {
|
|
1142
1142
|
"application/json": {
|
|
1143
1143
|
/** Format: uuid */
|
|
@@ -1283,7 +1283,7 @@ export interface operations {
|
|
|
1283
1283
|
path?: never;
|
|
1284
1284
|
cookie?: never;
|
|
1285
1285
|
};
|
|
1286
|
-
requestBody
|
|
1286
|
+
requestBody: {
|
|
1287
1287
|
content: {
|
|
1288
1288
|
"application/json": {
|
|
1289
1289
|
/** Format: uuid */
|
|
@@ -1445,7 +1445,7 @@ export interface operations {
|
|
|
1445
1445
|
path?: never;
|
|
1446
1446
|
cookie?: never;
|
|
1447
1447
|
};
|
|
1448
|
-
requestBody
|
|
1448
|
+
requestBody: {
|
|
1449
1449
|
content: {
|
|
1450
1450
|
"application/json": {
|
|
1451
1451
|
/** Format: uuid */
|
|
@@ -1625,7 +1625,7 @@ export interface operations {
|
|
|
1625
1625
|
path?: never;
|
|
1626
1626
|
cookie?: never;
|
|
1627
1627
|
};
|
|
1628
|
-
requestBody
|
|
1628
|
+
requestBody: {
|
|
1629
1629
|
content: {
|
|
1630
1630
|
"application/json": {
|
|
1631
1631
|
/** Format: uuid */
|