@shim-finance/typescript-sdk 0.0.1
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/README.md +64 -0
- package/dist/client/client.gen.d.ts +3 -0
- package/dist/client/client.gen.d.ts.map +1 -0
- package/dist/client/client.gen.js +228 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +6 -0
- package/dist/client/types.gen.d.ts +118 -0
- package/dist/client/types.gen.d.ts.map +1 -0
- package/dist/client/types.gen.js +2 -0
- package/dist/client/utils.gen.d.ts +34 -0
- package/dist/client/utils.gen.d.ts.map +1 -0
- package/dist/client/utils.gen.js +231 -0
- package/dist/client.gen.d.ts +13 -0
- package/dist/client.gen.d.ts.map +1 -0
- package/dist/client.gen.js +3 -0
- package/dist/core/auth.gen.d.ts +19 -0
- package/dist/core/auth.gen.d.ts.map +1 -0
- package/dist/core/auth.gen.js +14 -0
- package/dist/core/bodySerializer.gen.d.ts +26 -0
- package/dist/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/core/bodySerializer.gen.js +57 -0
- package/dist/core/params.gen.d.ts +44 -0
- package/dist/core/params.gen.d.ts.map +1 -0
- package/dist/core/params.gen.js +100 -0
- package/dist/core/pathSerializer.gen.d.ts +34 -0
- package/dist/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/core/pathSerializer.gen.js +114 -0
- package/dist/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/core/queryKeySerializer.gen.js +99 -0
- package/dist/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/core/serverSentEvents.gen.js +137 -0
- package/dist/core/types.gen.d.ts +79 -0
- package/dist/core/types.gen.d.ts.map +1 -0
- package/dist/core/types.gen.js +2 -0
- package/dist/core/utils.gen.d.ts +20 -0
- package/dist/core/utils.gen.d.ts.map +1 -0
- package/dist/core/utils.gen.js +87 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/sdk.gen.d.ts +22 -0
- package/dist/sdk.gen.d.ts.map +1 -0
- package/dist/sdk.gen.js +8 -0
- package/dist/types.gen.d.ts +81 -0
- package/dist/types.gen.d.ts.map +1 -0
- package/dist/types.gen.js +2 -0
- package/package.json +35 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
+
import type { InstitutionsListData, InstitutionsListErrors, InstitutionsListResponses } from './types.gen';
|
|
3
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
|
+
/**
|
|
5
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
+
* individual options. This might be also useful if you want to implement a
|
|
7
|
+
* custom client.
|
|
8
|
+
*/
|
|
9
|
+
client?: Client;
|
|
10
|
+
/**
|
|
11
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
+
*/
|
|
14
|
+
meta?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* List institutions
|
|
18
|
+
*
|
|
19
|
+
* Returns all connected financial institutions for the authenticated user
|
|
20
|
+
*/
|
|
21
|
+
export declare const institutionsList: <ThrowOnError extends boolean = false>(options?: Options<InstitutionsListData, ThrowOnError>) => import("./client").RequestResult<InstitutionsListResponses, InstitutionsListErrors, ThrowOnError, "fields">;
|
|
22
|
+
//# sourceMappingURL=sdk.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.gen.d.ts","sourceRoot":"","sources":["../src/sdk.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,IAAI,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE3G,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,EAAE,YAAY,SAAS,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG;IACjI;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,UAAU,OAAO,CAAC,oBAAoB,EAAE,YAAY,CAAC,gHAAkJ,CAAC"}
|
package/dist/sdk.gen.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { client } from './client.gen';
|
|
3
|
+
/**
|
|
4
|
+
* List institutions
|
|
5
|
+
*
|
|
6
|
+
* Returns all connected financial institutions for the authenticated user
|
|
7
|
+
*/
|
|
8
|
+
export const institutionsList = (options) => (options?.client ?? client).get({ url: '/api/v1/institutions', ...options });
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: 'https://api.shim.finance' | (string & {});
|
|
3
|
+
};
|
|
4
|
+
export type Institution = {
|
|
5
|
+
id: string;
|
|
6
|
+
institutionId: string | null;
|
|
7
|
+
institutionName: string | null;
|
|
8
|
+
status: 'healthy' | 'error';
|
|
9
|
+
lastSyncedAt: DateTimeUtc | null;
|
|
10
|
+
createdAt: DateTimeUtc;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* a string to be decoded into a DateTime.Utc
|
|
14
|
+
*/
|
|
15
|
+
export type DateTimeUtc = string;
|
|
16
|
+
/**
|
|
17
|
+
* The request did not match the expected schema
|
|
18
|
+
*/
|
|
19
|
+
export type HttpApiDecodeError = {
|
|
20
|
+
issues: Array<Issue>;
|
|
21
|
+
message: string;
|
|
22
|
+
_tag: 'HttpApiDecodeError';
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Represents an error encountered while parsing a value to match the schema
|
|
26
|
+
*/
|
|
27
|
+
export type Issue = {
|
|
28
|
+
/**
|
|
29
|
+
* The tag identifying the type of parse issue
|
|
30
|
+
*/
|
|
31
|
+
_tag: 'Pointer' | 'Unexpected' | 'Missing' | 'Composite' | 'Refinement' | 'Transformation' | 'Type' | 'Forbidden';
|
|
32
|
+
/**
|
|
33
|
+
* The path to the property where the issue occurred
|
|
34
|
+
*/
|
|
35
|
+
path: Array<PropertyKey>;
|
|
36
|
+
/**
|
|
37
|
+
* A descriptive message explaining the issue
|
|
38
|
+
*/
|
|
39
|
+
message: string;
|
|
40
|
+
};
|
|
41
|
+
export type PropertyKey = string | number | {
|
|
42
|
+
_tag: 'symbol';
|
|
43
|
+
key: string;
|
|
44
|
+
};
|
|
45
|
+
export type Unauthorized = {
|
|
46
|
+
message: string;
|
|
47
|
+
_tag: 'Unauthorized';
|
|
48
|
+
};
|
|
49
|
+
export type InternalError = {
|
|
50
|
+
message: string;
|
|
51
|
+
_tag: 'InternalError';
|
|
52
|
+
};
|
|
53
|
+
export type InstitutionsListData = {
|
|
54
|
+
body?: never;
|
|
55
|
+
path?: never;
|
|
56
|
+
query?: never;
|
|
57
|
+
url: '/api/v1/institutions';
|
|
58
|
+
};
|
|
59
|
+
export type InstitutionsListErrors = {
|
|
60
|
+
/**
|
|
61
|
+
* The request did not match the expected schema
|
|
62
|
+
*/
|
|
63
|
+
400: HttpApiDecodeError;
|
|
64
|
+
/**
|
|
65
|
+
* Unauthorized
|
|
66
|
+
*/
|
|
67
|
+
401: Unauthorized;
|
|
68
|
+
/**
|
|
69
|
+
* InternalError
|
|
70
|
+
*/
|
|
71
|
+
500: InternalError;
|
|
72
|
+
};
|
|
73
|
+
export type InstitutionsListError = InstitutionsListErrors[keyof InstitutionsListErrors];
|
|
74
|
+
export type InstitutionsListResponses = {
|
|
75
|
+
/**
|
|
76
|
+
* Success
|
|
77
|
+
*/
|
|
78
|
+
200: Array<Institution>;
|
|
79
|
+
};
|
|
80
|
+
export type InstitutionsListResponse = InstitutionsListResponses[keyof InstitutionsListResponses];
|
|
81
|
+
//# sourceMappingURL=types.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../src/types.gen.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG;IACxB,OAAO,EAAE,0BAA0B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,MAAM,GAAG,WAAW,CAAC;IAClH;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,cAAc,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,GAAG,EAAE,sBAAsB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACjC;;OAEG;IACH,GAAG,EAAE,kBAAkB,CAAC;IACxB;;OAEG;IACH,GAAG,EAAE,YAAY,CAAC;IAClB;;OAEG;IACH,GAAG,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC,MAAM,sBAAsB,CAAC,CAAC;AAEzF,MAAM,MAAM,yBAAyB,GAAG;IACpC;;OAEG;IACH,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,CAAC,MAAM,yBAAyB,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shim-finance/typescript-sdk",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "TypeScript SDK for the Shim.Finance REST API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@hey-api/client-fetch": "^0.9.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/Shim-Finance/typescript-sdk"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT"
|
|
35
|
+
}
|