bantr-api-client 1.0.4 → 1.0.5
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/api-type/src/trpcRouter/oauth.router.d.ts +28 -2
- package/api-type/src/trpcRouter/router.d.ts +50 -0
- package/dist/index.d.ts +76 -0
- package/dist/provider.d.ts +50 -0
- package/dist/query.d.ts +28 -0
- package/package.json +1 -1
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
/// <reference types="node/http" />
|
2
|
+
/// <reference types="trpc-koa-adapter" />
|
3
|
+
import Router from 'koa-router';
|
2
4
|
export declare const oauthRouter: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
3
5
|
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
4
6
|
meta: object;
|
@@ -147,5 +149,29 @@ export declare const oauthRouter: import("@trpc/server").CreateRouterInner<impor
|
|
147
149
|
firstName: string | null;
|
148
150
|
lastName: string | null;
|
149
151
|
}>;
|
152
|
+
revokeAccessToken: import("@trpc/server").BuildProcedure<"mutation", {
|
153
|
+
_config: import("@trpc/server").RootConfig<{
|
154
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
155
|
+
meta: object;
|
156
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
157
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
158
|
+
}>;
|
159
|
+
_meta: object;
|
160
|
+
_ctx_out: {
|
161
|
+
user: import("../types/auth").TJwtPayload;
|
162
|
+
req: import("http").IncomingMessage;
|
163
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
164
|
+
};
|
165
|
+
_input_in: {
|
166
|
+
authorization?: string | undefined;
|
167
|
+
provider: "google" | "apple";
|
168
|
+
};
|
169
|
+
_input_out: {
|
170
|
+
authorization?: string | undefined;
|
171
|
+
provider: "google" | "apple";
|
172
|
+
};
|
173
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
174
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
175
|
+
}, import("../types/auth").MemberAuthResponse>;
|
150
176
|
}>;
|
151
|
-
export declare const
|
177
|
+
export declare const oauthRouterKoa: Router.IMiddleware<any, {}>;
|
@@ -1,3 +1,5 @@
|
|
1
|
+
/// <reference types="node/http" />
|
2
|
+
/// <reference types="trpc-koa-adapter" />
|
1
3
|
export declare const appRouter: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
2
4
|
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
3
5
|
meta: object;
|
@@ -152,6 +154,30 @@ export declare const appRouter: import("@trpc/server").CreateRouterInner<import(
|
|
152
154
|
firstName: string | null;
|
153
155
|
lastName: string | null;
|
154
156
|
}>;
|
157
|
+
revokeAccessToken: import("@trpc/server").BuildProcedure<"mutation", {
|
158
|
+
_config: import("@trpc/server").RootConfig<{
|
159
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
160
|
+
meta: object;
|
161
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
162
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
163
|
+
}>;
|
164
|
+
_meta: object;
|
165
|
+
_ctx_out: {
|
166
|
+
user: import("../types/auth").TJwtPayload;
|
167
|
+
req: import("http").IncomingMessage;
|
168
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
169
|
+
};
|
170
|
+
_input_in: {
|
171
|
+
authorization?: string | undefined;
|
172
|
+
provider: "google" | "apple";
|
173
|
+
};
|
174
|
+
_input_out: {
|
175
|
+
authorization?: string | undefined;
|
176
|
+
provider: "google" | "apple";
|
177
|
+
};
|
178
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
179
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
180
|
+
}, import("../types/auth").MemberAuthResponse>;
|
155
181
|
}>;
|
156
182
|
}>;
|
157
183
|
export declare const createTrpcCaller: import("@trpc/server").RouterCaller<import("@trpc/server/dist/core/router").RouterDef<import("@trpc/server").RootConfig<{
|
@@ -308,6 +334,30 @@ export declare const createTrpcCaller: import("@trpc/server").RouterCaller<impor
|
|
308
334
|
firstName: string | null;
|
309
335
|
lastName: string | null;
|
310
336
|
}>;
|
337
|
+
revokeAccessToken: import("@trpc/server").BuildProcedure<"mutation", {
|
338
|
+
_config: import("@trpc/server").RootConfig<{
|
339
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
340
|
+
meta: object;
|
341
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
342
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
343
|
+
}>;
|
344
|
+
_meta: object;
|
345
|
+
_ctx_out: {
|
346
|
+
user: import("../types/auth").TJwtPayload;
|
347
|
+
req: import("http").IncomingMessage;
|
348
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
349
|
+
};
|
350
|
+
_input_in: {
|
351
|
+
authorization?: string | undefined;
|
352
|
+
provider: "google" | "apple";
|
353
|
+
};
|
354
|
+
_input_out: {
|
355
|
+
authorization?: string | undefined;
|
356
|
+
provider: "google" | "apple";
|
357
|
+
};
|
358
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
359
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
360
|
+
}, import("../types/auth").MemberAuthResponse>;
|
311
361
|
}>;
|
312
362
|
}, {
|
313
363
|
queries: {};
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
/// <reference types="node" />
|
3
|
+
/// <reference types="trpc-koa-adapter" />
|
2
4
|
export declare const BantrSdk: {
|
3
5
|
TRPCProvider: ({ children, useLocalUrl, customUrl, queryClientConfig, queryClient, }: {
|
4
6
|
children: import("react").ReactNode;
|
@@ -161,6 +163,30 @@ export declare const BantrSdk: {
|
|
161
163
|
firstName: string | null;
|
162
164
|
lastName: string | null;
|
163
165
|
}>;
|
166
|
+
revokeAccessToken: import("@trpc/server").BuildProcedure<"mutation", {
|
167
|
+
_config: import("@trpc/server").RootConfig<{
|
168
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
169
|
+
meta: object;
|
170
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
171
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
172
|
+
}>;
|
173
|
+
_meta: object;
|
174
|
+
_ctx_out: {
|
175
|
+
user: import("../api-type/src/types/auth").TJwtPayload;
|
176
|
+
req: import("http").IncomingMessage;
|
177
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
178
|
+
};
|
179
|
+
_input_in: {
|
180
|
+
authorization?: string | undefined;
|
181
|
+
provider: "google" | "apple";
|
182
|
+
};
|
183
|
+
_input_out: {
|
184
|
+
authorization?: string | undefined;
|
185
|
+
provider: "google" | "apple";
|
186
|
+
};
|
187
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
188
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
189
|
+
}, import("../api-type/src/types/auth").MemberAuthResponse>;
|
164
190
|
}>;
|
165
191
|
}>, unknown> & import("@trpc/react-query/dist/createTRPCReact").DecoratedProcedureRecord<{
|
166
192
|
oauth: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
@@ -311,6 +337,30 @@ export declare const BantrSdk: {
|
|
311
337
|
firstName: string | null;
|
312
338
|
lastName: string | null;
|
313
339
|
}>;
|
340
|
+
revokeAccessToken: import("@trpc/server").BuildProcedure<"mutation", {
|
341
|
+
_config: import("@trpc/server").RootConfig<{
|
342
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
343
|
+
meta: object;
|
344
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
345
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
346
|
+
}>;
|
347
|
+
_meta: object;
|
348
|
+
_ctx_out: {
|
349
|
+
user: import("../api-type/src/types/auth").TJwtPayload;
|
350
|
+
req: import("http").IncomingMessage;
|
351
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
352
|
+
};
|
353
|
+
_input_in: {
|
354
|
+
authorization?: string | undefined;
|
355
|
+
provider: "google" | "apple";
|
356
|
+
};
|
357
|
+
_input_out: {
|
358
|
+
authorization?: string | undefined;
|
359
|
+
provider: "google" | "apple";
|
360
|
+
};
|
361
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
362
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
363
|
+
}, import("../api-type/src/types/auth").MemberAuthResponse>;
|
314
364
|
}>;
|
315
365
|
}, null, "">;
|
316
366
|
createTRPCClientQuery: (options?: {
|
@@ -472,6 +522,32 @@ export declare const BantrSdk: {
|
|
472
522
|
lastName: string | null;
|
473
523
|
}>>;
|
474
524
|
};
|
525
|
+
revokeAccessToken: {
|
526
|
+
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
527
|
+
_config: import("@trpc/server").RootConfig<{
|
528
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
529
|
+
meta: object;
|
530
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
531
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
532
|
+
}>;
|
533
|
+
_meta: object;
|
534
|
+
_ctx_out: {
|
535
|
+
user: import("../api-type/src/types/auth").TJwtPayload;
|
536
|
+
req: import("http").IncomingMessage;
|
537
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
538
|
+
};
|
539
|
+
_input_in: {
|
540
|
+
authorization?: string | undefined;
|
541
|
+
provider: "google" | "apple";
|
542
|
+
};
|
543
|
+
_input_out: {
|
544
|
+
authorization?: string | undefined;
|
545
|
+
provider: "google" | "apple";
|
546
|
+
};
|
547
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
548
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
549
|
+
}, import("../api-type/src/types/auth").MemberAuthResponse>>;
|
550
|
+
};
|
475
551
|
};
|
476
552
|
};
|
477
553
|
};
|
package/dist/provider.d.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
/// <reference types="trpc-koa-adapter" />
|
1
3
|
import { QueryClient, QueryClientConfig } from '@tanstack/react-query';
|
2
4
|
import React, { ReactNode } from 'react';
|
3
5
|
export declare const QueryClientContext: React.Context<QueryClient | undefined>;
|
@@ -155,6 +157,30 @@ export declare const reactQuery: import("@trpc/react-query/dist/createTRPCReact"
|
|
155
157
|
firstName: string | null;
|
156
158
|
lastName: string | null;
|
157
159
|
}>;
|
160
|
+
revokeAccessToken: import("@trpc/server").BuildProcedure<"mutation", {
|
161
|
+
_config: import("@trpc/server").RootConfig<{
|
162
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
163
|
+
meta: object;
|
164
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
165
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
166
|
+
}>;
|
167
|
+
_meta: object;
|
168
|
+
_ctx_out: {
|
169
|
+
user: import("../api-type/src/types/auth").TJwtPayload;
|
170
|
+
req: import("http").IncomingMessage;
|
171
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
172
|
+
};
|
173
|
+
_input_in: {
|
174
|
+
authorization?: string | undefined;
|
175
|
+
provider: "google" | "apple";
|
176
|
+
};
|
177
|
+
_input_out: {
|
178
|
+
authorization?: string | undefined;
|
179
|
+
provider: "google" | "apple";
|
180
|
+
};
|
181
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
182
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
183
|
+
}, import("../api-type/src/types/auth").MemberAuthResponse>;
|
158
184
|
}>;
|
159
185
|
}>, unknown> & import("@trpc/react-query/dist/createTRPCReact").DecoratedProcedureRecord<{
|
160
186
|
oauth: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
@@ -305,6 +331,30 @@ export declare const reactQuery: import("@trpc/react-query/dist/createTRPCReact"
|
|
305
331
|
firstName: string | null;
|
306
332
|
lastName: string | null;
|
307
333
|
}>;
|
334
|
+
revokeAccessToken: import("@trpc/server").BuildProcedure<"mutation", {
|
335
|
+
_config: import("@trpc/server").RootConfig<{
|
336
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
337
|
+
meta: object;
|
338
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
339
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
340
|
+
}>;
|
341
|
+
_meta: object;
|
342
|
+
_ctx_out: {
|
343
|
+
user: import("../api-type/src/types/auth").TJwtPayload;
|
344
|
+
req: import("http").IncomingMessage;
|
345
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
346
|
+
};
|
347
|
+
_input_in: {
|
348
|
+
authorization?: string | undefined;
|
349
|
+
provider: "google" | "apple";
|
350
|
+
};
|
351
|
+
_input_out: {
|
352
|
+
authorization?: string | undefined;
|
353
|
+
provider: "google" | "apple";
|
354
|
+
};
|
355
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
356
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
357
|
+
}, import("../api-type/src/types/auth").MemberAuthResponse>;
|
308
358
|
}>;
|
309
359
|
}, null, "">;
|
310
360
|
export declare const TRPCProvider: ({ children, useLocalUrl, customUrl, queryClientConfig, queryClient, }: {
|
package/dist/query.d.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
/// <reference types="trpc-koa-adapter" />
|
1
3
|
declare type InstanceOptions = {
|
2
4
|
useLocalUrl?: boolean;
|
3
5
|
customUrl?: string;
|
@@ -158,6 +160,32 @@ export declare const createTRPCClientQuery: (options?: InstanceOptions) => {
|
|
158
160
|
lastName: string | null;
|
159
161
|
}>>;
|
160
162
|
};
|
163
|
+
revokeAccessToken: {
|
164
|
+
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
165
|
+
_config: import("@trpc/server").RootConfig<{
|
166
|
+
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
167
|
+
meta: object;
|
168
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
169
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
170
|
+
}>;
|
171
|
+
_meta: object;
|
172
|
+
_ctx_out: {
|
173
|
+
user: import("../api-type/src/types/auth").TJwtPayload;
|
174
|
+
req: import("http").IncomingMessage;
|
175
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
176
|
+
};
|
177
|
+
_input_in: {
|
178
|
+
authorization?: string | undefined;
|
179
|
+
provider: "google" | "apple";
|
180
|
+
};
|
181
|
+
_input_out: {
|
182
|
+
authorization?: string | undefined;
|
183
|
+
provider: "google" | "apple";
|
184
|
+
};
|
185
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
186
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
187
|
+
}, import("../api-type/src/types/auth").MemberAuthResponse>>;
|
188
|
+
};
|
161
189
|
};
|
162
190
|
};
|
163
191
|
export {};
|