@vrplatform/api 1.3.0-stage.1074 → 1.3.0-stage.1078
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/client.js +6 -0
- package/build/main/client.js.map +1 -1
- package/build/main/generated/v1.d.ts +14 -14
- package/build/main/generated/v1.js.map +1 -1
- package/build/module/client.js +6 -0
- package/build/module/client.js.map +1 -1
- package/build/module/generated/v1.d.ts +14 -14
- package/build/module/generated/v1.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +6 -0
- package/src/generated/v1.ts +14 -14
package/build/main/client.js
CHANGED
|
@@ -62,6 +62,12 @@ testing, headers: h, ...retryableFetchParams }) {
|
|
|
62
62
|
const trace = Sentry.getTraceData();
|
|
63
63
|
const client = (0, openapi_fetch_1.default)({
|
|
64
64
|
baseUrl,
|
|
65
|
+
querySerializer: {
|
|
66
|
+
array: {
|
|
67
|
+
explode: false,
|
|
68
|
+
style: 'form',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
65
71
|
fetch(req) {
|
|
66
72
|
return retryableFetch(async () => {
|
|
67
73
|
let clone = req.clone();
|
package/build/main/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"src/","sources":["client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"src/","sources":["client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,oCAuFC;AAlGD,qDAAuC;AACvC,6CAG2B;AAC3B,kEAAyC;AACzC,mCAAmC;AAEnC,+BAA0C;AAG1C,SAAgB,YAAY,CAAC,EAC3B,OAAO,EAAE,IAAI,EACb,KAAK,EACL,IAAI,EACJ,SAAS,EAAE,GAAG;AACd,cAAc;AACd,OAAO,EACP,OAAO,EAAE,CAAC,EACV,GAAG,oBAAo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AK,CAAC,OAAO;oBAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBAE/D,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;IAEH,MAAM,aAAa,GAAc,MAAa,CAAC;IAC/C,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import * as Sentry from '@sentry/core';\nimport {\n type RetryableFetchParams,\n useRetryableFetch,\n} from '@vrplatform/utils';\nimport createClient from 'openapi-fetch';\nimport { useCache } from './cache';\nimport type { paths } from './generated/v1';\nimport { generateApiKeySec } from './sec';\nimport type { ApiClient, ApiClientAuth } from './types';\n\nexport function useApiClient({\n baseUrl: base,\n local,\n auth,\n sessionId: sid,\n // headers: h,\n testing,\n headers: h,\n ...retryableFetchParams\n}: {\n attempts?: number;\n auth?: ApiClientAuth | (() => ApiClientAuth);\n baseUrl?: string;\n sessionId?: string;\n local?: boolean | number;\n headers?: Record<string, string> | (() => Record<string, string>);\n testing?: {\n overwriteUri?: string;\n getOverwriteTimestamp?: () => number | undefined;\n };\n} & RetryableFetchParams) {\n const baseUrl =\n (local\n ? `http://localhost:${typeof local === 'number' ? local : 8877}`\n : base) || 'https://api.vrplatform.app';\n\n const sessionId = sid || crypto.randomUUID();\n // cache the sec key for 1 minute (its valid for 5 minutes on the API)\n const cache = useCache(\n async (v: string) =>\n generateApiKeySec(v, testing?.getOverwriteTimestamp?.()),\n 60_000\n );\n\n const retryableFetch = useRetryableFetch({\n ...retryableFetchParams,\n onRetry(arg) {\n cache.invalidate();\n if (retryableFetchParams.onRetry) retryableFetchParams.onRetry(arg);\n },\n });\n\n const trace = Sentry.getTraceData();\n const client = createClient<paths>({\n baseUrl,\n querySerializer: {\n array: {\n explode: false,\n style: 'form',\n },\n },\n fetch(req) {\n return retryableFetch(async () => {\n let clone: Request = req.clone() as any;\n if (testing?.overwriteUri)\n clone = new Request(testing.overwriteUri, clone);\n\n const a = (typeof auth === 'function' ? auth() : auth) || {};\n if (sessionId) clone.headers.set('X-Session-Id', sessionId);\n if (a.sec)\n clone.headers.set('X-Api-Key', `Sec ${await cache.current(a.sec)}`);\n if (a.apiKey) clone.headers.set('X-Api-Key', a.apiKey);\n if (a.tenantId) clone.headers.set('X-Team-Id', a.tenantId);\n if (a.accessToken)\n clone.headers.set(\n 'Authorization',\n a.accessToken.startsWith('Bearer ')\n ? a.accessToken\n : `Bearer ${a.accessToken}`\n );\n const additionalHeaders = h ? (typeof h === 'function' ? h() : h) : {};\n for (const key in additionalHeaders) {\n clone.headers.set(key, additionalHeaders[key]);\n }\n\n if (trace['sentry-trace'])\n clone.headers.set('sentry-trace', trace['sentry-trace']);\n if (trace.baggage) clone.headers.set('baggage', trace.baggage);\n\n return clone;\n });\n },\n });\n\n const sessionClient: ApiClient = client as any;\n sessionClient.sessionId = sessionId;\n return sessionClient;\n}\n"]}
|
|
@@ -5908,7 +5908,7 @@ export interface operations {
|
|
|
5908
5908
|
data: {
|
|
5909
5909
|
/** Format: uuid */
|
|
5910
5910
|
listingId: string;
|
|
5911
|
-
/** @default 2025-11-
|
|
5911
|
+
/** @default 2025-11-17 */
|
|
5912
5912
|
startAt: string;
|
|
5913
5913
|
endAt?: string | null;
|
|
5914
5914
|
setListingInactive?: boolean | null;
|
|
@@ -5990,7 +5990,7 @@ export interface operations {
|
|
|
5990
5990
|
"application/json": {
|
|
5991
5991
|
/** Format: uuid */
|
|
5992
5992
|
listingId: string;
|
|
5993
|
-
/** @default 2025-11-
|
|
5993
|
+
/** @default 2025-11-17 */
|
|
5994
5994
|
startAt?: string;
|
|
5995
5995
|
endAt?: string | null;
|
|
5996
5996
|
members: {
|
|
@@ -6024,7 +6024,7 @@ export interface operations {
|
|
|
6024
6024
|
"application/json": {
|
|
6025
6025
|
/** Format: uuid */
|
|
6026
6026
|
listingId: string;
|
|
6027
|
-
/** @default 2025-11-
|
|
6027
|
+
/** @default 2025-11-17 */
|
|
6028
6028
|
startAt: string;
|
|
6029
6029
|
endAt?: string | null;
|
|
6030
6030
|
setListingInactive?: boolean | null;
|
|
@@ -6104,7 +6104,7 @@ export interface operations {
|
|
|
6104
6104
|
"application/json": {
|
|
6105
6105
|
/** Format: uuid */
|
|
6106
6106
|
listingId: string;
|
|
6107
|
-
/** @default 2025-11-
|
|
6107
|
+
/** @default 2025-11-17 */
|
|
6108
6108
|
startAt: string;
|
|
6109
6109
|
endAt?: string | null;
|
|
6110
6110
|
setListingInactive?: boolean | null;
|
|
@@ -6187,7 +6187,7 @@ export interface operations {
|
|
|
6187
6187
|
"application/json": {
|
|
6188
6188
|
/** Format: uuid */
|
|
6189
6189
|
listingId?: string;
|
|
6190
|
-
/** @default 2025-11-
|
|
6190
|
+
/** @default 2025-11-17 */
|
|
6191
6191
|
startAt?: string;
|
|
6192
6192
|
endAt?: string | null;
|
|
6193
6193
|
members?: {
|
|
@@ -6221,7 +6221,7 @@ export interface operations {
|
|
|
6221
6221
|
"application/json": {
|
|
6222
6222
|
/** Format: uuid */
|
|
6223
6223
|
listingId: string;
|
|
6224
|
-
/** @default 2025-11-
|
|
6224
|
+
/** @default 2025-11-17 */
|
|
6225
6225
|
startAt: string;
|
|
6226
6226
|
endAt?: string | null;
|
|
6227
6227
|
setListingInactive?: boolean | null;
|
|
@@ -6407,7 +6407,7 @@ export interface operations {
|
|
|
6407
6407
|
/** Format: uuid */
|
|
6408
6408
|
sourceId?: string | null;
|
|
6409
6409
|
initialOwnership?: {
|
|
6410
|
-
/** @default 2025-11-
|
|
6410
|
+
/** @default 2025-11-17 */
|
|
6411
6411
|
startAt?: string;
|
|
6412
6412
|
endAt?: string | null;
|
|
6413
6413
|
members: {
|
|
@@ -6465,7 +6465,7 @@ export interface operations {
|
|
|
6465
6465
|
status: "active" | "inactive";
|
|
6466
6466
|
defaultCurrency?: string | null;
|
|
6467
6467
|
activeOwnership?: {
|
|
6468
|
-
/** @default 2025-11-
|
|
6468
|
+
/** @default 2025-11-17 */
|
|
6469
6469
|
startAt: string;
|
|
6470
6470
|
endAt?: string | null;
|
|
6471
6471
|
setListingInactive?: boolean | null;
|
|
@@ -6706,7 +6706,7 @@ export interface operations {
|
|
|
6706
6706
|
status: "active" | "inactive";
|
|
6707
6707
|
defaultCurrency?: string | null;
|
|
6708
6708
|
activeOwnership?: {
|
|
6709
|
-
/** @default 2025-11-
|
|
6709
|
+
/** @default 2025-11-17 */
|
|
6710
6710
|
startAt: string;
|
|
6711
6711
|
endAt?: string | null;
|
|
6712
6712
|
setListingInactive?: boolean | null;
|
|
@@ -6845,7 +6845,7 @@ export interface operations {
|
|
|
6845
6845
|
/** Format: uuid */
|
|
6846
6846
|
sourceId?: string | null;
|
|
6847
6847
|
initialOwnership?: {
|
|
6848
|
-
/** @default 2025-11-
|
|
6848
|
+
/** @default 2025-11-17 */
|
|
6849
6849
|
startAt?: string;
|
|
6850
6850
|
endAt?: string | null;
|
|
6851
6851
|
members: {
|
|
@@ -6899,7 +6899,7 @@ export interface operations {
|
|
|
6899
6899
|
status: "active" | "inactive";
|
|
6900
6900
|
defaultCurrency?: string | null;
|
|
6901
6901
|
activeOwnership?: {
|
|
6902
|
-
/** @default 2025-11-
|
|
6902
|
+
/** @default 2025-11-17 */
|
|
6903
6903
|
startAt: string;
|
|
6904
6904
|
endAt?: string | null;
|
|
6905
6905
|
setListingInactive?: boolean | null;
|
|
@@ -7116,7 +7116,7 @@ export interface operations {
|
|
|
7116
7116
|
status: "active" | "inactive";
|
|
7117
7117
|
defaultCurrency?: string | null;
|
|
7118
7118
|
activeOwnership?: {
|
|
7119
|
-
/** @default 2025-11-
|
|
7119
|
+
/** @default 2025-11-17 */
|
|
7120
7120
|
startAt: string;
|
|
7121
7121
|
endAt?: string | null;
|
|
7122
7122
|
setListingInactive?: boolean | null;
|
|
@@ -7263,7 +7263,7 @@ export interface operations {
|
|
|
7263
7263
|
/** Format: uuid */
|
|
7264
7264
|
sourceId?: string | null;
|
|
7265
7265
|
initialOwnership?: {
|
|
7266
|
-
/** @default 2025-11-
|
|
7266
|
+
/** @default 2025-11-17 */
|
|
7267
7267
|
startAt?: string;
|
|
7268
7268
|
endAt?: string | null;
|
|
7269
7269
|
members: {
|
|
@@ -7317,7 +7317,7 @@ export interface operations {
|
|
|
7317
7317
|
status: "active" | "inactive";
|
|
7318
7318
|
defaultCurrency?: string | null;
|
|
7319
7319
|
activeOwnership?: {
|
|
7320
|
-
/** @default 2025-11-
|
|
7320
|
+
/** @default 2025-11-17 */
|
|
7321
7321
|
startAt: string;
|
|
7322
7322
|
endAt?: string | null;
|
|
7323
7323
|
setListingInactive?: boolean | null;
|