bantr-api-client 1.0.5 → 1.3.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.
- package/api-type/src/trpcRouter/discount_code.router.d.ts +210 -0
- package/api-type/src/trpcRouter/free_agent_payments.router.d.ts +50 -0
- package/api-type/src/trpcRouter/league_payments.router.d.ts +189 -0
- package/api-type/src/trpcRouter/oauth.router.d.ts +12 -14
- package/api-type/src/trpcRouter/pickup_payments.router.d.ts +41 -0
- package/api-type/src/trpcRouter/router.d.ts +1079 -101
- package/package.json +1 -1
- package/tsconfig.json +1 -0
- package/dist/index.d.ts +0 -554
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/provider.d.ts +0 -366
- package/dist/provider.js +0 -54
- package/dist/provider.js.map +0 -1
- package/dist/query.d.ts +0 -191
- package/dist/query.js +0 -38
- package/dist/query.js.map +0 -1
package/dist/provider.d.ts
DELETED
@@ -1,366 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
/// <reference types="trpc-koa-adapter" />
|
3
|
-
import { QueryClient, QueryClientConfig } from '@tanstack/react-query';
|
4
|
-
import React, { ReactNode } from 'react';
|
5
|
-
export declare const QueryClientContext: React.Context<QueryClient | undefined>;
|
6
|
-
export declare const reactQuery: import("@trpc/react-query/dist/createTRPCReact").CreateTRPCReactBase<import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
7
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
8
|
-
meta: object;
|
9
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
10
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
11
|
-
}>, {
|
12
|
-
oauth: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
13
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
14
|
-
meta: object;
|
15
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
16
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
17
|
-
}>, {
|
18
|
-
googleAuth: import("@trpc/server").BuildProcedure<"mutation", {
|
19
|
-
_config: import("@trpc/server").RootConfig<{
|
20
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
21
|
-
meta: object;
|
22
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
23
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
24
|
-
}>;
|
25
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
26
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
27
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
28
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
29
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
30
|
-
_meta: object;
|
31
|
-
}, string>;
|
32
|
-
googleCallback: import("@trpc/server").BuildProcedure<"query", {
|
33
|
-
_config: import("@trpc/server").RootConfig<{
|
34
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
35
|
-
meta: object;
|
36
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
37
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
38
|
-
}>;
|
39
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
40
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
41
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
42
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
43
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
44
|
-
_meta: object;
|
45
|
-
}, void>;
|
46
|
-
googleMobileCallback: import("@trpc/server").BuildProcedure<"mutation", {
|
47
|
-
_config: import("@trpc/server").RootConfig<{
|
48
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
49
|
-
meta: object;
|
50
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
51
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
52
|
-
}>;
|
53
|
-
_meta: object;
|
54
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
55
|
-
_input_in: {
|
56
|
-
code: string;
|
57
|
-
idToken?: string | undefined;
|
58
|
-
};
|
59
|
-
_input_out: {
|
60
|
-
code: string;
|
61
|
-
idToken?: string | undefined;
|
62
|
-
};
|
63
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
64
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
65
|
-
}, {
|
66
|
-
accessToken: string;
|
67
|
-
refreshToken: string;
|
68
|
-
accountStatus: string;
|
69
|
-
redirectTeamId?: number | null | undefined;
|
70
|
-
authSchemas: import("../api-type/src/types/member").TAuthSchemas;
|
71
|
-
memberId: number;
|
72
|
-
bio: string | null;
|
73
|
-
city?: string | undefined;
|
74
|
-
street?: string | undefined;
|
75
|
-
state?: string | undefined;
|
76
|
-
avatar: string | null;
|
77
|
-
teams: import("../api-type/src/models/team").Team[];
|
78
|
-
favoriteTeam: number | null | undefined;
|
79
|
-
zip: string | undefined;
|
80
|
-
phoneNumber: string | null;
|
81
|
-
gender?: string | undefined;
|
82
|
-
birthday: string | null;
|
83
|
-
location: string | null;
|
84
|
-
email: string;
|
85
|
-
firstName: string | null;
|
86
|
-
lastName: string | null;
|
87
|
-
}>;
|
88
|
-
appleAuth: import("@trpc/server").BuildProcedure<"mutation", {
|
89
|
-
_config: import("@trpc/server").RootConfig<{
|
90
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
91
|
-
meta: object;
|
92
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
93
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
94
|
-
}>;
|
95
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
96
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
97
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
98
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
99
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
100
|
-
_meta: object;
|
101
|
-
}, string>;
|
102
|
-
appleCallback: import("@trpc/server").BuildProcedure<"mutation", {
|
103
|
-
_config: import("@trpc/server").RootConfig<{
|
104
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
105
|
-
meta: object;
|
106
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
107
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
108
|
-
}>;
|
109
|
-
_meta: object;
|
110
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
111
|
-
_input_in: {
|
112
|
-
code: string;
|
113
|
-
};
|
114
|
-
_input_out: {
|
115
|
-
code: string;
|
116
|
-
};
|
117
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
118
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
119
|
-
}, void>;
|
120
|
-
appleMobileCallback: import("@trpc/server").BuildProcedure<"mutation", {
|
121
|
-
_config: import("@trpc/server").RootConfig<{
|
122
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
123
|
-
meta: object;
|
124
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
125
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
126
|
-
}>;
|
127
|
-
_meta: object;
|
128
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
129
|
-
_input_in: {
|
130
|
-
idToken: string;
|
131
|
-
};
|
132
|
-
_input_out: {
|
133
|
-
idToken: string;
|
134
|
-
};
|
135
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
136
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
137
|
-
}, {
|
138
|
-
accessToken: string;
|
139
|
-
refreshToken: string;
|
140
|
-
accountStatus: string;
|
141
|
-
redirectTeamId?: number | null | undefined;
|
142
|
-
authSchemas: import("../api-type/src/types/member").TAuthSchemas;
|
143
|
-
memberId: number;
|
144
|
-
bio: string | null;
|
145
|
-
city?: string | undefined;
|
146
|
-
street?: string | undefined;
|
147
|
-
state?: string | undefined;
|
148
|
-
avatar: string | null;
|
149
|
-
teams: import("../api-type/src/models/team").Team[];
|
150
|
-
favoriteTeam: number | null | undefined;
|
151
|
-
zip: string | undefined;
|
152
|
-
phoneNumber: string | null;
|
153
|
-
gender?: string | undefined;
|
154
|
-
birthday: string | null;
|
155
|
-
location: string | null;
|
156
|
-
email: string;
|
157
|
-
firstName: string | null;
|
158
|
-
lastName: string | null;
|
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>;
|
184
|
-
}>;
|
185
|
-
}>, unknown> & import("@trpc/react-query/dist/createTRPCReact").DecoratedProcedureRecord<{
|
186
|
-
oauth: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
187
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
188
|
-
meta: object;
|
189
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
190
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
191
|
-
}>, {
|
192
|
-
googleAuth: import("@trpc/server").BuildProcedure<"mutation", {
|
193
|
-
_config: import("@trpc/server").RootConfig<{
|
194
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
195
|
-
meta: object;
|
196
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
197
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
198
|
-
}>;
|
199
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
200
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
201
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
202
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
203
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
204
|
-
_meta: object;
|
205
|
-
}, string>;
|
206
|
-
googleCallback: import("@trpc/server").BuildProcedure<"query", {
|
207
|
-
_config: import("@trpc/server").RootConfig<{
|
208
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
209
|
-
meta: object;
|
210
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
211
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
212
|
-
}>;
|
213
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
214
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
215
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
216
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
217
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
218
|
-
_meta: object;
|
219
|
-
}, void>;
|
220
|
-
googleMobileCallback: import("@trpc/server").BuildProcedure<"mutation", {
|
221
|
-
_config: import("@trpc/server").RootConfig<{
|
222
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
223
|
-
meta: object;
|
224
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
225
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
226
|
-
}>;
|
227
|
-
_meta: object;
|
228
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
229
|
-
_input_in: {
|
230
|
-
code: string;
|
231
|
-
idToken?: string | undefined;
|
232
|
-
};
|
233
|
-
_input_out: {
|
234
|
-
code: string;
|
235
|
-
idToken?: string | undefined;
|
236
|
-
};
|
237
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
238
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
239
|
-
}, {
|
240
|
-
accessToken: string;
|
241
|
-
refreshToken: string;
|
242
|
-
accountStatus: string;
|
243
|
-
redirectTeamId?: number | null | undefined;
|
244
|
-
authSchemas: import("../api-type/src/types/member").TAuthSchemas;
|
245
|
-
memberId: number;
|
246
|
-
bio: string | null;
|
247
|
-
city?: string | undefined;
|
248
|
-
street?: string | undefined;
|
249
|
-
state?: string | undefined;
|
250
|
-
avatar: string | null;
|
251
|
-
teams: import("../api-type/src/models/team").Team[];
|
252
|
-
favoriteTeam: number | null | undefined;
|
253
|
-
zip: string | undefined;
|
254
|
-
phoneNumber: string | null;
|
255
|
-
gender?: string | undefined;
|
256
|
-
birthday: string | null;
|
257
|
-
location: string | null;
|
258
|
-
email: string;
|
259
|
-
firstName: string | null;
|
260
|
-
lastName: string | null;
|
261
|
-
}>;
|
262
|
-
appleAuth: import("@trpc/server").BuildProcedure<"mutation", {
|
263
|
-
_config: import("@trpc/server").RootConfig<{
|
264
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
265
|
-
meta: object;
|
266
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
267
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
268
|
-
}>;
|
269
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
270
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
271
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
272
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
273
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
274
|
-
_meta: object;
|
275
|
-
}, string>;
|
276
|
-
appleCallback: import("@trpc/server").BuildProcedure<"mutation", {
|
277
|
-
_config: import("@trpc/server").RootConfig<{
|
278
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
279
|
-
meta: object;
|
280
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
281
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
282
|
-
}>;
|
283
|
-
_meta: object;
|
284
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
285
|
-
_input_in: {
|
286
|
-
code: string;
|
287
|
-
};
|
288
|
-
_input_out: {
|
289
|
-
code: string;
|
290
|
-
};
|
291
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
292
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
293
|
-
}, void>;
|
294
|
-
appleMobileCallback: import("@trpc/server").BuildProcedure<"mutation", {
|
295
|
-
_config: import("@trpc/server").RootConfig<{
|
296
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
297
|
-
meta: object;
|
298
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
299
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
300
|
-
}>;
|
301
|
-
_meta: object;
|
302
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
303
|
-
_input_in: {
|
304
|
-
idToken: string;
|
305
|
-
};
|
306
|
-
_input_out: {
|
307
|
-
idToken: string;
|
308
|
-
};
|
309
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
310
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
311
|
-
}, {
|
312
|
-
accessToken: string;
|
313
|
-
refreshToken: string;
|
314
|
-
accountStatus: string;
|
315
|
-
redirectTeamId?: number | null | undefined;
|
316
|
-
authSchemas: import("../api-type/src/types/member").TAuthSchemas;
|
317
|
-
memberId: number;
|
318
|
-
bio: string | null;
|
319
|
-
city?: string | undefined;
|
320
|
-
street?: string | undefined;
|
321
|
-
state?: string | undefined;
|
322
|
-
avatar: string | null;
|
323
|
-
teams: import("../api-type/src/models/team").Team[];
|
324
|
-
favoriteTeam: number | null | undefined;
|
325
|
-
zip: string | undefined;
|
326
|
-
phoneNumber: string | null;
|
327
|
-
gender?: string | undefined;
|
328
|
-
birthday: string | null;
|
329
|
-
location: string | null;
|
330
|
-
email: string;
|
331
|
-
firstName: string | null;
|
332
|
-
lastName: string | null;
|
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>;
|
358
|
-
}>;
|
359
|
-
}, null, "">;
|
360
|
-
export declare const TRPCProvider: ({ children, useLocalUrl, customUrl, queryClientConfig, queryClient, }: {
|
361
|
-
children: ReactNode;
|
362
|
-
useLocalUrl?: boolean | undefined;
|
363
|
-
customUrl?: string | undefined;
|
364
|
-
queryClientConfig?: QueryClientConfig | undefined;
|
365
|
-
queryClient?: QueryClient | undefined;
|
366
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/provider.js
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { QueryClient } from '@tanstack/react-query';
|
3
|
-
import { createTRPCReact, httpBatchLink, } from '@trpc/react-query';
|
4
|
-
import React, { useState } from 'react';
|
5
|
-
export const QueryClientContext = React.createContext(undefined);
|
6
|
-
export const reactQuery = createTRPCReact({
|
7
|
-
context: QueryClientContext,
|
8
|
-
});
|
9
|
-
export const TRPCProvider = ({ children, useLocalUrl, customUrl, queryClientConfig, queryClient, }) => {
|
10
|
-
const [queryClient2] = useState(queryClient ||
|
11
|
-
new QueryClient({
|
12
|
-
defaultOptions: {
|
13
|
-
queries: {
|
14
|
-
refetchOnWindowFocus: false,
|
15
|
-
refetchOnReconnect: false,
|
16
|
-
retry: false,
|
17
|
-
staleTime: 5 * 60 * 1000,
|
18
|
-
},
|
19
|
-
},
|
20
|
-
...queryClientConfig,
|
21
|
-
}));
|
22
|
-
const [trpcClientContext] = useState(reactQuery.createClient({
|
23
|
-
links: [
|
24
|
-
httpBatchLink({
|
25
|
-
url: customUrl ||
|
26
|
-
(useLocalUrl
|
27
|
-
? 'http://localhost:4242/trpc'
|
28
|
-
: 'https://api.bantr.club/trpc'),
|
29
|
-
}),
|
30
|
-
// splitLink({
|
31
|
-
// condition: (op) => op.type === 'subscription',
|
32
|
-
// false: httpBatchLink({
|
33
|
-
// url:
|
34
|
-
// customUrl ||
|
35
|
-
// (useLocalUrl
|
36
|
-
// ? 'http://localhost:4242/trpc'
|
37
|
-
// : 'https://api.bantr.club/trpc'),
|
38
|
-
// }),
|
39
|
-
// true: wsLink({
|
40
|
-
// client: createWSClient({
|
41
|
-
// url:
|
42
|
-
// customUrl ||
|
43
|
-
// (useLocalUrl
|
44
|
-
// ? 'http://localhost:4242/trpc'
|
45
|
-
// : 'https://api.bantr.club/trpc'),
|
46
|
-
// retryDelayMs: () => 5000,
|
47
|
-
// }),
|
48
|
-
// }),
|
49
|
-
// }),
|
50
|
-
],
|
51
|
-
}));
|
52
|
-
return (_jsx(QueryClientContext.Provider, { value: queryClient, children: _jsx(reactQuery.Provider, { client: trpcClientContext, queryClient: queryClient2, children: children }) }));
|
53
|
-
};
|
54
|
-
//# sourceMappingURL=provider.js.map
|
package/dist/provider.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAqB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACL,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CACnD,SAAS,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAY;IACnD,OAAO,EAAE,kBAAkB;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,WAAW,GAOZ,EAAE,EAAE;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,QAAQ,CAC7B,WAAW;QACX,IAAI,WAAW,CAAC;YACd,cAAc,EAAE;gBACd,OAAO,EAAE;oBACP,oBAAoB,EAAE,KAAK;oBAC3B,kBAAkB,EAAE,KAAK;oBACzB,KAAK,EAAE,KAAK;oBACZ,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;iBACzB;aACF;YACD,GAAG,iBAAiB;SACrB,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,iBAAiB,CAAC,GAAG,QAAQ,CAClC,UAAU,CAAC,YAAY,CAAC;QACtB,KAAK,EAAE;YACL,aAAa,CAAC;gBACZ,GAAG,EACD,SAAS;oBACT,CAAC,WAAW;wBACV,CAAC,CAAC,4BAA4B;wBAC9B,CAAC,CAAC,6BAA6B,CAAC;aACrC,CAAC;YACF,cAAc;YACd,mDAAmD;YACnD,2BAA2B;YAC3B,WAAW;YACX,qBAAqB;YACrB,qBAAqB;YACrB,yCAAyC;YACzC,4CAA4C;YAC5C,QAAQ;YACR,mBAAmB;YACnB,+BAA+B;YAC/B,aAAa;YACb,uBAAuB;YACvB,uBAAuB;YACvB,2CAA2C;YAC3C,8CAA8C;YAC9C,kCAAkC;YAClC,UAAU;YACV,QAAQ;YACR,MAAM;SACP;KACF,CAAC,CACH,CAAC;IAEF,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,YAC7C,KAAC,UAAU,CAAC,QAAQ,IAClB,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,YAAY,YAExB,QAAQ,GACW,GACM,CAC/B,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/query.d.ts
DELETED
@@ -1,191 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
/// <reference types="trpc-koa-adapter" />
|
3
|
-
declare type InstanceOptions = {
|
4
|
-
useLocalUrl?: boolean;
|
5
|
-
customUrl?: string;
|
6
|
-
};
|
7
|
-
export declare const createTRPCClientQuery: (options?: InstanceOptions) => {
|
8
|
-
oauth: {
|
9
|
-
googleAuth: {
|
10
|
-
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
11
|
-
_config: import("@trpc/server").RootConfig<{
|
12
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
13
|
-
meta: object;
|
14
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
15
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
16
|
-
}>;
|
17
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
18
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
19
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
20
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
21
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
22
|
-
_meta: object;
|
23
|
-
}, string>>;
|
24
|
-
};
|
25
|
-
googleCallback: {
|
26
|
-
query: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"query", {
|
27
|
-
_config: import("@trpc/server").RootConfig<{
|
28
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
29
|
-
meta: object;
|
30
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
31
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
32
|
-
}>;
|
33
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
34
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
35
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
36
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
37
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
38
|
-
_meta: object;
|
39
|
-
}, void>>;
|
40
|
-
};
|
41
|
-
googleMobileCallback: {
|
42
|
-
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
43
|
-
_config: import("@trpc/server").RootConfig<{
|
44
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
45
|
-
meta: object;
|
46
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
47
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
48
|
-
}>;
|
49
|
-
_meta: object;
|
50
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
51
|
-
_input_in: {
|
52
|
-
code: string;
|
53
|
-
idToken?: string | undefined;
|
54
|
-
};
|
55
|
-
_input_out: {
|
56
|
-
code: string;
|
57
|
-
idToken?: string | undefined;
|
58
|
-
};
|
59
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
60
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
61
|
-
}, {
|
62
|
-
accessToken: string;
|
63
|
-
refreshToken: string;
|
64
|
-
accountStatus: string;
|
65
|
-
redirectTeamId?: number | null | undefined;
|
66
|
-
authSchemas: import("../api-type/src/types/member").TAuthSchemas;
|
67
|
-
memberId: number;
|
68
|
-
bio: string | null;
|
69
|
-
city?: string | undefined;
|
70
|
-
street?: string | undefined;
|
71
|
-
state?: string | undefined;
|
72
|
-
avatar: string | null;
|
73
|
-
teams: import("../api-type/src/models/team").Team[];
|
74
|
-
favoriteTeam: number | null | undefined;
|
75
|
-
zip: string | undefined;
|
76
|
-
phoneNumber: string | null;
|
77
|
-
gender?: string | undefined;
|
78
|
-
birthday: string | null;
|
79
|
-
location: string | null;
|
80
|
-
email: string;
|
81
|
-
firstName: string | null;
|
82
|
-
lastName: string | null;
|
83
|
-
}>>;
|
84
|
-
};
|
85
|
-
appleAuth: {
|
86
|
-
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
87
|
-
_config: import("@trpc/server").RootConfig<{
|
88
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
89
|
-
meta: object;
|
90
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
91
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
92
|
-
}>;
|
93
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
94
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
95
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
96
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
97
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
98
|
-
_meta: object;
|
99
|
-
}, string>>;
|
100
|
-
};
|
101
|
-
appleCallback: {
|
102
|
-
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
103
|
-
_config: import("@trpc/server").RootConfig<{
|
104
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
105
|
-
meta: object;
|
106
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
107
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
108
|
-
}>;
|
109
|
-
_meta: object;
|
110
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
111
|
-
_input_in: {
|
112
|
-
code: string;
|
113
|
-
};
|
114
|
-
_input_out: {
|
115
|
-
code: string;
|
116
|
-
};
|
117
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
118
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
119
|
-
}, void>>;
|
120
|
-
};
|
121
|
-
appleMobileCallback: {
|
122
|
-
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
123
|
-
_config: import("@trpc/server").RootConfig<{
|
124
|
-
ctx: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
125
|
-
meta: object;
|
126
|
-
errorShape: import("@trpc/server").DefaultErrorShape;
|
127
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
128
|
-
}>;
|
129
|
-
_meta: object;
|
130
|
-
_ctx_out: import("trpc-koa-adapter").CreateTrpcKoaContextOptions;
|
131
|
-
_input_in: {
|
132
|
-
idToken: string;
|
133
|
-
};
|
134
|
-
_input_out: {
|
135
|
-
idToken: string;
|
136
|
-
};
|
137
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
138
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
139
|
-
}, {
|
140
|
-
accessToken: string;
|
141
|
-
refreshToken: string;
|
142
|
-
accountStatus: string;
|
143
|
-
redirectTeamId?: number | null | undefined;
|
144
|
-
authSchemas: import("../api-type/src/types/member").TAuthSchemas;
|
145
|
-
memberId: number;
|
146
|
-
bio: string | null;
|
147
|
-
city?: string | undefined;
|
148
|
-
street?: string | undefined;
|
149
|
-
state?: string | undefined;
|
150
|
-
avatar: string | null;
|
151
|
-
teams: import("../api-type/src/models/team").Team[];
|
152
|
-
favoriteTeam: number | null | undefined;
|
153
|
-
zip: string | undefined;
|
154
|
-
phoneNumber: string | null;
|
155
|
-
gender?: string | undefined;
|
156
|
-
birthday: string | null;
|
157
|
-
location: string | null;
|
158
|
-
email: string;
|
159
|
-
firstName: string | null;
|
160
|
-
lastName: string | null;
|
161
|
-
}>>;
|
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
|
-
};
|
189
|
-
};
|
190
|
-
};
|
191
|
-
export {};
|
package/dist/query.js
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
|
2
|
-
let instance = null;
|
3
|
-
export const createTRPCClientQuery = (options = {}) => {
|
4
|
-
if (!instance) {
|
5
|
-
instance = createTRPCProxyClient({
|
6
|
-
links: [
|
7
|
-
httpBatchLink({
|
8
|
-
url: options?.customUrl ||
|
9
|
-
(options?.useLocalUrl
|
10
|
-
? 'http://localhost:4242/trpc'
|
11
|
-
: 'https://api.bantr.club/trpc'),
|
12
|
-
}),
|
13
|
-
// splitLink({
|
14
|
-
// condition: (op) => op.type === 'subscription',
|
15
|
-
// false: httpBatchLink({
|
16
|
-
// url:
|
17
|
-
// options?.customUrl ||
|
18
|
-
// (options?.useLocalUrl
|
19
|
-
// ? 'http://localhost:4242/trpc'
|
20
|
-
// : 'https://api.bantr.club/trpc'),
|
21
|
-
// }),
|
22
|
-
// true: wsLink({
|
23
|
-
// client: createWSClient({
|
24
|
-
// url:
|
25
|
-
// options?.customUrl ||
|
26
|
-
// (options?.useLocalUrl
|
27
|
-
// ? 'http://localhost:4242/trpc'
|
28
|
-
// : 'https://api.bantr.club/trpc'),
|
29
|
-
// retryDelayMs: () => 5000,
|
30
|
-
// }),
|
31
|
-
// }),
|
32
|
-
// }),
|
33
|
-
],
|
34
|
-
});
|
35
|
-
}
|
36
|
-
return instance;
|
37
|
-
};
|
38
|
-
//# sourceMappingURL=query.js.map
|
package/dist/query.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGpE,IAAI,QAAQ,GAA+D,IAAI,CAAC;AAOhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,UAA2B,EAAE,EAAE,EAAE;IACrE,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,qBAAqB,CAAY;YAC1C,KAAK,EAAE;gBACL,aAAa,CAAC;oBACZ,GAAG,EACD,OAAO,EAAE,SAAS;wBAClB,CAAC,OAAO,EAAE,WAAW;4BACnB,CAAC,CAAC,4BAA4B;4BAC9B,CAAC,CAAC,6BAA6B,CAAC;iBACrC,CAAC;gBACF,cAAc;gBACd,mDAAmD;gBACnD,2BAA2B;gBAC3B,WAAW;gBACX,8BAA8B;gBAC9B,8BAA8B;gBAC9B,yCAAyC;gBACzC,4CAA4C;gBAC5C,QAAQ;gBACR,mBAAmB;gBACnB,+BAA+B;gBAC/B,aAAa;gBACb,gCAAgC;gBAChC,gCAAgC;gBAChC,2CAA2C;gBAC3C,8CAA8C;gBAC9C,kCAAkC;gBAClC,UAAU;gBACV,QAAQ;gBACR,MAAM;aACP;SACF,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|