bantr-api-client 1.3.0 → 1.4.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 +7 -5
- package/api-type/src/trpcRouter/free_agent_payments.router.d.ts +2 -2
- package/api-type/src/trpcRouter/league_payments.router.d.ts +11 -9
- package/api-type/src/trpcRouter/oauth.router.d.ts +3 -3
- package/api-type/src/trpcRouter/pickup_payments.router.d.ts +4 -4
- package/api-type/src/trpcRouter/router.d.ts +44 -36
- package/dist/src/index.d.ts +2047 -0
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/provider.d.ts +1352 -0
- package/dist/src/provider.js +60 -0
- package/dist/src/provider.js.map +1 -0
- package/dist/src/query.d.ts +689 -0
- package/dist/src/query.js +38 -0
- package/dist/src/query.js.map +1 -0
- package/package.json +3 -3
@@ -0,0 +1,38 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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,CAAC;QACd,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;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "bantr-api-client",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.4.0",
|
4
4
|
"description": "SDK for Bantr API integration using tRPC and react-query",
|
5
|
-
"main": "dist/index.js",
|
6
|
-
"types": "dist/index.d.ts",
|
5
|
+
"main": "dist/src/index.js",
|
6
|
+
"types": "dist/src/index.d.ts",
|
7
7
|
"publishConfig": {
|
8
8
|
"access": "public"
|
9
9
|
},
|