@v-office/guest-app-client 0.1.0

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.
@@ -0,0 +1,77 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/api/test": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /** @description Testing get */
14
+ get: operations["testGet"];
15
+ put?: never;
16
+ post?: never;
17
+ delete?: never;
18
+ options?: never;
19
+ head?: never;
20
+ patch?: never;
21
+ trace?: never;
22
+ };
23
+ }
24
+ export type webhooks = Record<string, never>;
25
+ export interface components {
26
+ schemas: {
27
+ /** @description Unauthorized */
28
+ Unauthorized: {
29
+ /**
30
+ * @default not-authorized
31
+ * @constant
32
+ */
33
+ type: "not-authorized";
34
+ /** @default Not authorized */
35
+ message: string;
36
+ };
37
+ };
38
+ responses: never;
39
+ parameters: never;
40
+ requestBodies: never;
41
+ headers: never;
42
+ pathItems: never;
43
+ }
44
+ export type Unauthorized = components['schemas']['Unauthorized'];
45
+ export type $defs = Record<string, never>;
46
+ export interface operations {
47
+ testGet: {
48
+ parameters: {
49
+ query?: never;
50
+ header?: never;
51
+ path?: never;
52
+ cookie?: never;
53
+ };
54
+ requestBody?: never;
55
+ responses: {
56
+ /** @description Default Response */
57
+ 200: {
58
+ headers: {
59
+ [name: string]: unknown;
60
+ };
61
+ content: {
62
+ "application/json": string;
63
+ };
64
+ };
65
+ /** @description Default Response */
66
+ 403: {
67
+ headers: {
68
+ [name: string]: unknown;
69
+ };
70
+ content: {
71
+ "application/json": components["schemas"]["Unauthorized"];
72
+ };
73
+ };
74
+ };
75
+ };
76
+ }
77
+ //# sourceMappingURL=guest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guest.d.ts","sourceRoot":"","sources":["../../src/guest.ts"],"names":[],"mappings":"AAAA;;;GA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AC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAClB,CAAC;QACF,WAAW,CAAC,EAAE,KAAK,CAAC;QACpB,SAAS,EAAE;YACP,oCAAoC;YACpC,GAAG,EAAE;gBACD,OAAO,EAAE;oBACL,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;iBAC3B,CAAC;gBACF,OAAO,EAAE;oBACL,kBAAkB,EAAE,MAAM,CAAC;iBAC9B,CAAC;aACL,CAAC;YACF,oCAAoC;YACpC,GAAG,EAAE;gBACD,OAAO,EAAE;oBACL,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;iBAC3B,CAAC;gBACF,OAAO,EAAE;oBACL,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;iBAC7D,CAAC;aACL,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { paths } from './guest.js';
2
+ export type * from './guest.js';
3
+ /**
4
+ * Creates a typed openapi-fetch client for the Guest API.
5
+ * Uses relative URLs so it works on whichever host the guest app is served from.
6
+ */
7
+ export declare const createGuestClient: () => import("openapi-fetch").Client<paths, `${string}/${string}`>;
8
+ //# sourceMappingURL=guestClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guestClient.d.ts","sourceRoot":"","sources":["../../src/guestClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,mBAAmB,YAAY,CAAA;AAE/B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,oEAA8B,CAAA"}
@@ -0,0 +1,6 @@
1
+ import createClient from 'openapi-fetch';
2
+ /**
3
+ * Creates a typed openapi-fetch client for the Guest API.
4
+ * Uses relative URLs so it works on whichever host the guest app is served from.
5
+ */
6
+ export const createGuestClient = () => createClient();
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@v-office/guest-app-client",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "license": "UNLICENSED",
6
+ "author": "vOffice GmbH",
7
+ "files": [
8
+ "dist",
9
+ "src"
10
+ ],
11
+ "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/src/client.js",
15
+ "types": "./dist/src/client.d.ts"
16
+ }
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "dependencies": {
22
+ "openapi-fetch": "0.17.0"
23
+ },
24
+ "devDependencies": {
25
+ "@tsconfig/node24": "24.0.4",
26
+ "@types/node": "~24",
27
+ "openapi-typescript": "7.13.0",
28
+ "oxfmt": "0.51.0",
29
+ "oxlint": "1.66.0",
30
+ "oxlint-tsgolint": "0.23.0",
31
+ "typescript": "6.0.3"
32
+ },
33
+ "scripts": {
34
+ "build": "tsc",
35
+ "check": "tsc --noEmit",
36
+ "format": "oxfmt && oxlint",
37
+ "openapi": "openapi-typescript http://localhost:3001/openapi --root-types --root-types-no-schema-prefix -o ./src/guest.ts"
38
+ }
39
+ }
package/src/guest.ts ADDED
@@ -0,0 +1,77 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/api/test": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /** @description Testing get */
15
+ get: operations["testGet"];
16
+ put?: never;
17
+ post?: never;
18
+ delete?: never;
19
+ options?: never;
20
+ head?: never;
21
+ patch?: never;
22
+ trace?: never;
23
+ };
24
+ }
25
+ export type webhooks = Record<string, never>;
26
+ export interface components {
27
+ schemas: {
28
+ /** @description Unauthorized */
29
+ Unauthorized: {
30
+ /**
31
+ * @default not-authorized
32
+ * @constant
33
+ */
34
+ type: "not-authorized";
35
+ /** @default Not authorized */
36
+ message: string;
37
+ };
38
+ };
39
+ responses: never;
40
+ parameters: never;
41
+ requestBodies: never;
42
+ headers: never;
43
+ pathItems: never;
44
+ }
45
+ export type Unauthorized = components['schemas']['Unauthorized'];
46
+ export type $defs = Record<string, never>;
47
+ export interface operations {
48
+ testGet: {
49
+ parameters: {
50
+ query?: never;
51
+ header?: never;
52
+ path?: never;
53
+ cookie?: never;
54
+ };
55
+ requestBody?: never;
56
+ responses: {
57
+ /** @description Default Response */
58
+ 200: {
59
+ headers: {
60
+ [name: string]: unknown;
61
+ };
62
+ content: {
63
+ "application/json": string;
64
+ };
65
+ };
66
+ /** @description Default Response */
67
+ 403: {
68
+ headers: {
69
+ [name: string]: unknown;
70
+ };
71
+ content: {
72
+ "application/json": components["schemas"]["Unauthorized"];
73
+ };
74
+ };
75
+ };
76
+ };
77
+ }
@@ -0,0 +1,10 @@
1
+ import createClient from 'openapi-fetch'
2
+ import type { paths } from './guest.js'
3
+
4
+ export type * from './guest.js'
5
+
6
+ /**
7
+ * Creates a typed openapi-fetch client for the Guest API.
8
+ * Uses relative URLs so it works on whichever host the guest app is served from.
9
+ */
10
+ export const createGuestClient = () => createClient<paths>()