@vrplatform/api 1.2.33-rel.778 → 1.2.33-rel.834
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/generated/openapi-fetch.d.ts +1 -1
- package/build/main/generated/openapi-fetch.js.map +1 -1
- package/build/main/generated/v1.d.ts +329 -176
- package/build/main/generated/v1.js.map +1 -1
- package/build/main/index.d.ts +3 -2
- package/build/main/index.js +0 -2
- package/build/main/index.js.map +1 -1
- package/build/main/ingest/index.d.ts +0 -1
- package/build/main/ingest/index.js.map +1 -1
- package/build/main/ingest-compat/index.d.ts +0 -1
- package/build/main/ingest-compat/index.js.map +1 -1
- package/build/main/ingest-compat/types.d.ts +0 -1
- package/build/main/ingest-compat/types.js.map +1 -1
- package/build/main/tsconfig.main.tsbuildinfo +1 -1
- package/build/main/types.d.ts +0 -1
- package/build/main/types.js.map +1 -1
- package/build/module/generated/openapi-fetch.d.ts +1 -1
- package/build/module/generated/openapi-fetch.js.map +1 -1
- package/build/module/generated/v1.d.ts +329 -176
- package/build/module/generated/v1.js.map +1 -1
- package/build/module/index.d.ts +3 -2
- package/build/module/index.js +0 -2
- package/build/module/index.js.map +1 -1
- package/build/module/ingest/index.d.ts +0 -1
- package/build/module/ingest/index.js.map +1 -1
- package/build/module/ingest-compat/index.d.ts +0 -1
- package/build/module/ingest-compat/index.js.map +1 -1
- package/build/module/ingest-compat/types.d.ts +0 -1
- package/build/module/ingest-compat/types.js.map +1 -1
- package/build/module/tsconfig.esm.tsbuildinfo +1 -1
- package/build/module/types.d.ts +0 -1
- package/build/module/types.js.map +1 -1
- package/package.json +7 -3
- package/src/generated/openapi-fetch.ts +1 -1
- package/src/generated/v1.ts +329 -176
- package/src/index.ts +10 -3
- package/src/ingest/index.ts +0 -2
- package/src/ingest-compat/index.ts +0 -1
- package/src/ingest-compat/types.ts +0 -2
- package/src/types.ts +0 -1
- package/build/main/middlewares/curl.d.ts +0 -6
- package/build/main/middlewares/curl.js +0 -20
- package/build/main/middlewares/curl.js.map +0 -1
- package/build/main/middlewares/index.d.ts +0 -1
- package/build/main/middlewares/index.js +0 -18
- package/build/main/middlewares/index.js.map +0 -1
- package/build/module/middlewares/curl.d.ts +0 -6
- package/build/module/middlewares/curl.js +0 -16
- package/build/module/middlewares/curl.js.map +0 -1
- package/build/module/middlewares/index.d.ts +0 -1
- package/build/module/middlewares/index.js +0 -2
- package/build/module/middlewares/index.js.map +0 -1
- package/src/middlewares/curl.ts +0 -23
- package/src/middlewares/index.ts +0 -1
package/src/index.ts
CHANGED
|
@@ -2,8 +2,15 @@ export * from './client';
|
|
|
2
2
|
export * from './error';
|
|
3
3
|
export * from './generated/v1';
|
|
4
4
|
export * from './ingest';
|
|
5
|
-
export * from './ingest';
|
|
6
|
-
|
|
7
5
|
export * from './ingest-compat';
|
|
8
|
-
export * from './middlewares';
|
|
9
6
|
export * from './types';
|
|
7
|
+
|
|
8
|
+
export type ApiIngest = ReturnType<typeof import('./ingest').useIngest>;
|
|
9
|
+
export type ApiIngestCompat = ReturnType<
|
|
10
|
+
typeof import('./ingest-compat').useIngestCompat
|
|
11
|
+
>;
|
|
12
|
+
export type VRPlatformApi = import('./types').ApiClient;
|
|
13
|
+
|
|
14
|
+
type _EnsureApiIngest = ApiIngest;
|
|
15
|
+
type _EnsureApiIngestCompat = ApiIngestCompat;
|
|
16
|
+
type _EnsureVRPlatformApi = VRPlatformApi;
|
package/src/ingest/index.ts
CHANGED
|
@@ -42,8 +42,6 @@ export function usePostSources(api: ApiClient, config: t.IngestArg) {
|
|
|
42
42
|
return post;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export type ApiIngest = ReturnType<typeof useIngest>;
|
|
46
|
-
|
|
47
45
|
export function useIngest(api: ApiClient, config: t.IngestArg) {
|
|
48
46
|
const post = usePostSources(api, config);
|
|
49
47
|
return {
|
|
@@ -12,7 +12,6 @@ import type { ListingInput, PaymentInput, ReservationInput } from './types';
|
|
|
12
12
|
export * from './map';
|
|
13
13
|
export * from './types';
|
|
14
14
|
|
|
15
|
-
export type ApiIngestCompat = ReturnType<typeof useIngestCompat>;
|
|
16
15
|
export function useIngestCompat(api: ApiClient, config: IngestArg) {
|
|
17
16
|
const post = usePostSources(api, config);
|
|
18
17
|
return {
|
package/src/types.ts
CHANGED
|
@@ -10,7 +10,6 @@ export type ApiClientAuth = {
|
|
|
10
10
|
export type ApiClient = ReturnType<typeof createClient<paths>> & {
|
|
11
11
|
sessionId: string;
|
|
12
12
|
};
|
|
13
|
-
export type VRPlatformApi = ApiClient;
|
|
14
13
|
type ResponseCombinations = {
|
|
15
14
|
[Path in keyof paths]: {
|
|
16
15
|
[Method in keyof paths[Path]]: paths[Path][Method] extends never
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type createClient from 'openapi-fetch';
|
|
2
|
-
type Client = ReturnType<typeof createClient>;
|
|
3
|
-
type LogFn = (t: string) => void;
|
|
4
|
-
export declare function useCurlMiddleware(client: Client, log?: LogFn): void;
|
|
5
|
-
export declare function curl(request: Request, log?: LogFn): Promise<void>;
|
|
6
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCurlMiddleware = useCurlMiddleware;
|
|
4
|
-
exports.curl = curl;
|
|
5
|
-
const utils_1 = require("@finalytic/utils");
|
|
6
|
-
function useCurlMiddleware(client, log) {
|
|
7
|
-
client.use({
|
|
8
|
-
async onRequest({ request }) {
|
|
9
|
-
await curl(request, log);
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
async function curl(request, log = console.log) {
|
|
14
|
-
log((0, utils_1.fetchToCurl)(request.url, {
|
|
15
|
-
method: request.method,
|
|
16
|
-
headers: Object.fromEntries(request.headers.entries()),
|
|
17
|
-
body: await request.clone().text(),
|
|
18
|
-
}));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=curl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"curl.js","sourceRoot":"src/","sources":["middlewares/curl.ts"],"names":[],"mappings":";;AAMA,8CAMC;AAED,oBAQC;AAtBD,4CAA+C;AAM/C,SAAgB,iBAAiB,CAAC,MAAc,EAAE,GAAW;IAC3D,MAAM,CAAC,GAAG,CAAC;QACT,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE;YACzB,MAAM,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,IAAI,CAAC,OAAgB,EAAE,MAAa,OAAO,CAAC,GAAG;IACnE,GAAG,CACD,IAAA,mBAAW,EAAC,OAAO,CAAC,GAAG,EAAE;QACvB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,MAAM,CAAC,WAAW,CAAE,OAAO,CAAC,OAAe,CAAC,OAAO,EAAE,CAAC;QAC/D,IAAI,EAAE,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE;KACnC,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { fetchToCurl } from '@finalytic/utils';\nimport type createClient from 'openapi-fetch';\n\ntype Client = ReturnType<typeof createClient>;\n\ntype LogFn = (t: string) => void;\nexport function useCurlMiddleware(client: Client, log?: LogFn) {\n client.use({\n async onRequest({ request }) {\n await curl(request, log);\n },\n });\n}\n\nexport async function curl(request: Request, log: LogFn = console.log) {\n log(\n fetchToCurl(request.url, {\n method: request.method,\n headers: Object.fromEntries((request.headers as any).entries()),\n body: await request.clone().text(),\n })\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './curl';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./curl"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["middlewares/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB","sourcesContent":["export * from './curl';\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type createClient from 'openapi-fetch';
|
|
2
|
-
type Client = ReturnType<typeof createClient>;
|
|
3
|
-
type LogFn = (t: string) => void;
|
|
4
|
-
export declare function useCurlMiddleware(client: Client, log?: LogFn): void;
|
|
5
|
-
export declare function curl(request: Request, log?: LogFn): Promise<void>;
|
|
6
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { fetchToCurl } from '@finalytic/utils';
|
|
2
|
-
export function useCurlMiddleware(client, log) {
|
|
3
|
-
client.use({
|
|
4
|
-
async onRequest({ request }) {
|
|
5
|
-
await curl(request, log);
|
|
6
|
-
},
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
export async function curl(request, log = console.log) {
|
|
10
|
-
log(fetchToCurl(request.url, {
|
|
11
|
-
method: request.method,
|
|
12
|
-
headers: Object.fromEntries(request.headers.entries()),
|
|
13
|
-
body: await request.clone().text(),
|
|
14
|
-
}));
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=curl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"curl.js","sourceRoot":"src/","sources":["middlewares/curl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,GAAW;IAC3D,MAAM,CAAC,GAAG,CAAC;QACT,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE;YACzB,MAAM,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,OAAgB,EAAE,MAAa,OAAO,CAAC,GAAG;IACnE,GAAG,CACD,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE;QACvB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,MAAM,CAAC,WAAW,CAAE,OAAO,CAAC,OAAe,CAAC,OAAO,EAAE,CAAC;QAC/D,IAAI,EAAE,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE;KACnC,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { fetchToCurl } from '@finalytic/utils';\nimport type createClient from 'openapi-fetch';\n\ntype Client = ReturnType<typeof createClient>;\n\ntype LogFn = (t: string) => void;\nexport function useCurlMiddleware(client: Client, log?: LogFn) {\n client.use({\n async onRequest({ request }) {\n await curl(request, log);\n },\n });\n}\n\nexport async function curl(request: Request, log: LogFn = console.log) {\n log(\n fetchToCurl(request.url, {\n method: request.method,\n headers: Object.fromEntries((request.headers as any).entries()),\n body: await request.clone().text(),\n })\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './curl';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["middlewares/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './curl';\n"]}
|
package/src/middlewares/curl.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { fetchToCurl } from '@finalytic/utils';
|
|
2
|
-
import type createClient from 'openapi-fetch';
|
|
3
|
-
|
|
4
|
-
type Client = ReturnType<typeof createClient>;
|
|
5
|
-
|
|
6
|
-
type LogFn = (t: string) => void;
|
|
7
|
-
export function useCurlMiddleware(client: Client, log?: LogFn) {
|
|
8
|
-
client.use({
|
|
9
|
-
async onRequest({ request }) {
|
|
10
|
-
await curl(request, log);
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export async function curl(request: Request, log: LogFn = console.log) {
|
|
16
|
-
log(
|
|
17
|
-
fetchToCurl(request.url, {
|
|
18
|
-
method: request.method,
|
|
19
|
-
headers: Object.fromEntries((request.headers as any).entries()),
|
|
20
|
-
body: await request.clone().text(),
|
|
21
|
-
})
|
|
22
|
-
);
|
|
23
|
-
}
|
package/src/middlewares/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './curl';
|