@uninspired/unproxied-client 0.0.5 → 0.0.7
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/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/types/index.d.ts +119 -6
- package/package.json +6 -5
package/dist/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var{defineProperty:
|
|
1
|
+
var{defineProperty:p,getOwnPropertyNames:s,getOwnPropertyDescriptor:u}=Object,d=Object.prototype.hasOwnProperty;var n=new WeakMap,x=(t)=>{var e=n.get(t),r;if(e)return e;if(e=p({},"__esModule",{value:!0}),t&&typeof t==="object"||typeof t==="function")s(t).map((i)=>!d.call(e,i)&&p(e,i,{get:()=>t[i],enumerable:!(r=u(t,i))||r.enumerable}));return n.set(t,e),e};var y=(t,e)=>{for(var r in e)p(t,r,{get:e[r],enumerable:!0,configurable:!0,set:(i)=>e[r]=()=>i})};var l={};y(l,{makeUnproxiedClient:()=>R});module.exports=x(l);var o=require("hono/client"),R=(t,e,r)=>{return o.hc(t,{...r,headers:{...r?.headers,"X-API-Key":e}})};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=4150A254172300FC64756E2164756E21
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { ApiRouter } from \"
|
|
5
|
+
"import type { ApiRouter } from \"@unproxied/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport type UnproxiedClient = ReturnType<typeof hc<ApiRouter>>;\n\nexport const makeUnproxiedClient = (\n baseUrl: string,\n apiKey: string,\n options?: ClientRequestOptions\n): UnproxiedClient => {\n return hc<ApiRouter>(baseUrl, {\n ...options,\n headers: {\n ...options?.headers,\n \"X-API-Key\": apiKey,\n },\n });\n};\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": "ugBAC8C,IAA9C,yBAIa,EAAsB,CACjC,EACA,EACA,IACoB,CACpB,OAAO,KAAc,EAAS,IACzB,EACH,QAAS,IACJ,GAAS,QACZ,YAAa,CACf,CACF,CAAC",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "4150A254172300FC64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{hc as
|
|
1
|
+
import{hc as i}from"hono/client";var n=(t,r,e)=>{return i(t,{...e,headers:{...e?.headers,"X-API-Key":r}})};export{n as makeUnproxiedClient};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=E1429FE8877974F764756E2164756E21
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { ApiRouter } from \"
|
|
5
|
+
"import type { ApiRouter } from \"@unproxied/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport type UnproxiedClient = ReturnType<typeof hc<ApiRouter>>;\n\nexport const makeUnproxiedClient = (\n baseUrl: string,\n apiKey: string,\n options?: ClientRequestOptions\n): UnproxiedClient => {\n return hc<ApiRouter>(baseUrl, {\n ...options,\n headers: {\n ...options?.headers,\n \"X-API-Key\": apiKey,\n },\n });\n};\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": "AACA,aAAS,oBAIF,IAAM,EAAsB,CACjC,EACA,EACA,IACoB,CACpB,OAAO,EAAc,EAAS,IACzB,EACH,QAAS,IACJ,GAAS,QACZ,YAAa,CACf,CACF,CAAC",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "E1429FE8877974F764756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,30 +1,143 @@
|
|
|
1
1
|
import * as hono_hono_base from 'hono/hono-base';
|
|
2
|
+
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
2
3
|
import * as hono_types from 'hono/types';
|
|
3
4
|
import { hc, ClientRequestOptions } from 'hono/client';
|
|
4
5
|
|
|
5
6
|
declare const apiRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.BlankSchema | hono_types.MergeSchemaPath<{
|
|
6
7
|
"/create": {
|
|
7
|
-
$post:
|
|
8
|
+
$post: {
|
|
9
|
+
input: {
|
|
10
|
+
json: {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
output: {
|
|
15
|
+
apiKey: string;
|
|
16
|
+
};
|
|
17
|
+
outputFormat: "json";
|
|
18
|
+
status: 201;
|
|
19
|
+
};
|
|
8
20
|
};
|
|
9
21
|
}, "/api/v1/api-keys"> | hono_types.MergeSchemaPath<{
|
|
10
22
|
"/": {
|
|
11
|
-
$post:
|
|
23
|
+
$post: {
|
|
24
|
+
input: {
|
|
25
|
+
json: {
|
|
26
|
+
serverName: string;
|
|
27
|
+
proxyUrl: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
output: "Created";
|
|
31
|
+
outputFormat: "text";
|
|
32
|
+
status: 201;
|
|
33
|
+
};
|
|
12
34
|
};
|
|
13
35
|
} & {
|
|
14
36
|
"/:domainId": {
|
|
15
|
-
$get:
|
|
37
|
+
$get: {
|
|
38
|
+
input: {
|
|
39
|
+
query: {
|
|
40
|
+
domainId: string;
|
|
41
|
+
};
|
|
42
|
+
} & {
|
|
43
|
+
param: {
|
|
44
|
+
domainId: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
output: "Not found";
|
|
48
|
+
outputFormat: "text";
|
|
49
|
+
status: 404;
|
|
50
|
+
} | {
|
|
51
|
+
input: {
|
|
52
|
+
query: {
|
|
53
|
+
domainId: string;
|
|
54
|
+
};
|
|
55
|
+
} & {
|
|
56
|
+
param: {
|
|
57
|
+
domainId: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
output: {
|
|
61
|
+
id: string;
|
|
62
|
+
serverName: string;
|
|
63
|
+
proxyUrl: string;
|
|
64
|
+
verificationToken: string;
|
|
65
|
+
domainVerified: boolean;
|
|
66
|
+
tlsActive: boolean;
|
|
67
|
+
publicHostname: string;
|
|
68
|
+
};
|
|
69
|
+
outputFormat: "json";
|
|
70
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
71
|
+
};
|
|
16
72
|
};
|
|
17
73
|
} & {
|
|
18
74
|
"/:domainId": {
|
|
19
|
-
$put:
|
|
75
|
+
$put: {
|
|
76
|
+
input: {
|
|
77
|
+
query: {
|
|
78
|
+
domainId: string;
|
|
79
|
+
};
|
|
80
|
+
} & {
|
|
81
|
+
json: {
|
|
82
|
+
serverName: string;
|
|
83
|
+
proxyUrl: string;
|
|
84
|
+
};
|
|
85
|
+
} & {
|
|
86
|
+
param: {
|
|
87
|
+
domainId: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
output: "Updated";
|
|
91
|
+
outputFormat: "text";
|
|
92
|
+
status: 200;
|
|
93
|
+
};
|
|
20
94
|
};
|
|
21
95
|
} & {
|
|
22
96
|
"/:domainId": {
|
|
23
|
-
$delete:
|
|
97
|
+
$delete: {
|
|
98
|
+
input: {
|
|
99
|
+
query: {
|
|
100
|
+
domainId: string;
|
|
101
|
+
};
|
|
102
|
+
} & {
|
|
103
|
+
param: {
|
|
104
|
+
domainId: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
output: "Deleted";
|
|
108
|
+
outputFormat: "text";
|
|
109
|
+
status: 200;
|
|
110
|
+
};
|
|
24
111
|
};
|
|
25
112
|
} & {
|
|
26
113
|
"/:domainId/verify": {
|
|
27
|
-
$post:
|
|
114
|
+
$post: {
|
|
115
|
+
input: {
|
|
116
|
+
query: {
|
|
117
|
+
domainId: string;
|
|
118
|
+
};
|
|
119
|
+
} & {
|
|
120
|
+
param: {
|
|
121
|
+
domainId: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
output: "Not found";
|
|
125
|
+
outputFormat: "text";
|
|
126
|
+
status: 404;
|
|
127
|
+
} | {
|
|
128
|
+
input: {
|
|
129
|
+
query: {
|
|
130
|
+
domainId: string;
|
|
131
|
+
};
|
|
132
|
+
} & {
|
|
133
|
+
param: {
|
|
134
|
+
domainId: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
output: "Verified";
|
|
138
|
+
outputFormat: "text";
|
|
139
|
+
status: 200;
|
|
140
|
+
};
|
|
28
141
|
};
|
|
29
142
|
}, "/api/v1/domains">, "/api/v1">;
|
|
30
143
|
type ApiRouter = typeof apiRouter;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"types": "dist/types/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.7",
|
|
9
9
|
"description": "Auth client for Uninspired Studio Products",
|
|
10
10
|
"author": "Chris Kolb <chris@uninspired.studio>",
|
|
11
11
|
"license": "MIT",
|
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
"build": "bun run scripts/build.ts"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@rollup/plugin-typescript": "^12.1.4",
|
|
21
20
|
"@types/bun": "latest",
|
|
22
21
|
"@types/semver": "^7.7.1",
|
|
22
|
+
"@unproxied/api": "workspace:*",
|
|
23
23
|
"rollup": "^4.52.5",
|
|
24
24
|
"rollup-plugin-dts": "^6.2.3",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"rollup-plugin-typescript": "^1.0.1",
|
|
26
|
+
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
27
|
+
"semver": "^7.7.3"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|
|
29
30
|
"typescript": "^5"
|
|
@@ -31,4 +32,4 @@
|
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"hono": "4.9.12"
|
|
33
34
|
}
|
|
34
|
-
}
|
|
35
|
+
}
|