@financeable/aggregation 0.2.5 → 0.3.2

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.
Files changed (71) hide show
  1. package/FUNCTIONS.md +9 -119
  2. package/README.md +73 -472
  3. package/docs/sdks/applications/README.md +18 -6
  4. package/docs/sdks/financeable/README.md +84 -0
  5. package/funcs/applicationsCreate.d.ts +2 -1
  6. package/funcs/applicationsCreate.d.ts.map +1 -1
  7. package/funcs/applicationsCreate.js +19 -8
  8. package/funcs/applicationsCreate.js.map +1 -1
  9. package/funcs/applicationsGet.d.ts +2 -1
  10. package/funcs/applicationsGet.d.ts.map +1 -1
  11. package/funcs/applicationsGet.js +19 -8
  12. package/funcs/applicationsGet.js.map +1 -1
  13. package/funcs/applicationsList.d.ts +2 -1
  14. package/funcs/applicationsList.d.ts.map +1 -1
  15. package/funcs/applicationsList.js +19 -8
  16. package/funcs/applicationsList.js.map +1 -1
  17. package/funcs/getToken.d.ts +13 -0
  18. package/funcs/getToken.d.ts.map +1 -0
  19. package/funcs/getToken.js +111 -0
  20. package/funcs/getToken.js.map +1 -0
  21. package/jsr.json +1 -1
  22. package/lib/config.d.ts +5 -4
  23. package/lib/config.d.ts.map +1 -1
  24. package/lib/config.js +7 -4
  25. package/lib/config.js.map +1 -1
  26. package/lib/env.d.ts +1 -0
  27. package/lib/env.d.ts.map +1 -1
  28. package/lib/env.js +1 -0
  29. package/lib/env.js.map +1 -1
  30. package/lib/security.d.ts +3 -0
  31. package/lib/security.d.ts.map +1 -1
  32. package/lib/security.js +19 -0
  33. package/lib/security.js.map +1 -1
  34. package/models/components/index.d.ts +3 -0
  35. package/models/components/index.d.ts.map +1 -1
  36. package/models/components/index.js +3 -0
  37. package/models/components/index.js.map +1 -1
  38. package/models/components/security.d.ts +29 -0
  39. package/models/components/security.d.ts.map +1 -0
  40. package/models/components/security.js +69 -0
  41. package/models/components/security.js.map +1 -0
  42. package/models/components/tokenrequest.d.ts +79 -0
  43. package/models/components/tokenrequest.d.ts.map +1 -0
  44. package/models/components/tokenrequest.js +110 -0
  45. package/models/components/tokenrequest.js.map +1 -0
  46. package/models/components/tokenresponse.d.ts +50 -0
  47. package/models/components/tokenresponse.d.ts.map +1 -0
  48. package/models/components/tokenresponse.js +88 -0
  49. package/models/components/tokenresponse.js.map +1 -0
  50. package/package.json +1 -1
  51. package/sdk/sdk.d.ts +6 -1
  52. package/sdk/sdk.d.ts.map +1 -1
  53. package/sdk/sdk.js +8 -0
  54. package/sdk/sdk.js.map +1 -1
  55. package/src/funcs/applicationsCreate.ts +45 -9
  56. package/src/funcs/applicationsGet.ts +45 -9
  57. package/src/funcs/applicationsList.ts +45 -9
  58. package/src/funcs/getToken.ts +153 -0
  59. package/src/lib/config.ts +9 -4
  60. package/src/lib/env.ts +4 -0
  61. package/src/lib/security.ts +27 -0
  62. package/src/models/components/index.ts +3 -0
  63. package/src/models/components/security.ts +62 -0
  64. package/src/models/components/tokenrequest.ts +133 -0
  65. package/src/models/components/tokenresponse.ts +102 -0
  66. package/src/sdk/sdk.ts +18 -1
  67. package/src/types/async.ts +68 -0
  68. package/types/async.d.ts +23 -0
  69. package/types/async.d.ts.map +1 -0
  70. package/types/async.js +44 -0
  71. package/types/async.js.map +1 -0
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type Security = {
11
+ clientCredentials?: string | undefined;
12
+ };
13
+
14
+ /** @internal */
15
+ export const Security$inboundSchema: z.ZodType<
16
+ Security,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ clientCredentials: z.string().optional(),
21
+ });
22
+
23
+ /** @internal */
24
+ export type Security$Outbound = {
25
+ clientCredentials?: string | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const Security$outboundSchema: z.ZodType<
30
+ Security$Outbound,
31
+ z.ZodTypeDef,
32
+ Security
33
+ > = z.object({
34
+ clientCredentials: z.string().optional(),
35
+ });
36
+
37
+ /**
38
+ * @internal
39
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
+ */
41
+ export namespace Security$ {
42
+ /** @deprecated use `Security$inboundSchema` instead. */
43
+ export const inboundSchema = Security$inboundSchema;
44
+ /** @deprecated use `Security$outboundSchema` instead. */
45
+ export const outboundSchema = Security$outboundSchema;
46
+ /** @deprecated use `Security$Outbound` instead. */
47
+ export type Outbound = Security$Outbound;
48
+ }
49
+
50
+ export function securityToJSON(security: Security): string {
51
+ return JSON.stringify(Security$outboundSchema.parse(security));
52
+ }
53
+
54
+ export function securityFromJSON(
55
+ jsonString: string,
56
+ ): SafeParseResult<Security, SDKValidationError> {
57
+ return safeParse(
58
+ jsonString,
59
+ (x) => Security$inboundSchema.parse(JSON.parse(x)),
60
+ `Failed to parse 'Security' from JSON`,
61
+ );
62
+ }
@@ -0,0 +1,133 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * Must be 'client_credentials'
14
+ */
15
+ export const GrantType = {
16
+ ClientCredentials: "client_credentials",
17
+ } as const;
18
+ /**
19
+ * Must be 'client_credentials'
20
+ */
21
+ export type GrantType = ClosedEnum<typeof GrantType>;
22
+
23
+ /**
24
+ * Token request for client credentials flow
25
+ */
26
+ export type TokenRequest = {
27
+ /**
28
+ * Must be 'client_credentials'
29
+ */
30
+ grantType: GrantType;
31
+ /**
32
+ * The client ID
33
+ */
34
+ clientId: string;
35
+ /**
36
+ * The client secret
37
+ */
38
+ clientSecret: string;
39
+ /**
40
+ * Scope of the token
41
+ */
42
+ scope: string;
43
+ };
44
+
45
+ /** @internal */
46
+ export const GrantType$inboundSchema: z.ZodNativeEnum<typeof GrantType> = z
47
+ .nativeEnum(GrantType);
48
+
49
+ /** @internal */
50
+ export const GrantType$outboundSchema: z.ZodNativeEnum<typeof GrantType> =
51
+ GrantType$inboundSchema;
52
+
53
+ /**
54
+ * @internal
55
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
+ */
57
+ export namespace GrantType$ {
58
+ /** @deprecated use `GrantType$inboundSchema` instead. */
59
+ export const inboundSchema = GrantType$inboundSchema;
60
+ /** @deprecated use `GrantType$outboundSchema` instead. */
61
+ export const outboundSchema = GrantType$outboundSchema;
62
+ }
63
+
64
+ /** @internal */
65
+ export const TokenRequest$inboundSchema: z.ZodType<
66
+ TokenRequest,
67
+ z.ZodTypeDef,
68
+ unknown
69
+ > = z.object({
70
+ grant_type: GrantType$inboundSchema,
71
+ client_id: z.string(),
72
+ client_secret: z.string(),
73
+ scope: z.string(),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ "grant_type": "grantType",
77
+ "client_id": "clientId",
78
+ "client_secret": "clientSecret",
79
+ });
80
+ });
81
+
82
+ /** @internal */
83
+ export type TokenRequest$Outbound = {
84
+ grant_type: string;
85
+ client_id: string;
86
+ client_secret: string;
87
+ scope: string;
88
+ };
89
+
90
+ /** @internal */
91
+ export const TokenRequest$outboundSchema: z.ZodType<
92
+ TokenRequest$Outbound,
93
+ z.ZodTypeDef,
94
+ TokenRequest
95
+ > = z.object({
96
+ grantType: GrantType$outboundSchema,
97
+ clientId: z.string(),
98
+ clientSecret: z.string(),
99
+ scope: z.string(),
100
+ }).transform((v) => {
101
+ return remap$(v, {
102
+ grantType: "grant_type",
103
+ clientId: "client_id",
104
+ clientSecret: "client_secret",
105
+ });
106
+ });
107
+
108
+ /**
109
+ * @internal
110
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
+ */
112
+ export namespace TokenRequest$ {
113
+ /** @deprecated use `TokenRequest$inboundSchema` instead. */
114
+ export const inboundSchema = TokenRequest$inboundSchema;
115
+ /** @deprecated use `TokenRequest$outboundSchema` instead. */
116
+ export const outboundSchema = TokenRequest$outboundSchema;
117
+ /** @deprecated use `TokenRequest$Outbound` instead. */
118
+ export type Outbound = TokenRequest$Outbound;
119
+ }
120
+
121
+ export function tokenRequestToJSON(tokenRequest: TokenRequest): string {
122
+ return JSON.stringify(TokenRequest$outboundSchema.parse(tokenRequest));
123
+ }
124
+
125
+ export function tokenRequestFromJSON(
126
+ jsonString: string,
127
+ ): SafeParseResult<TokenRequest, SDKValidationError> {
128
+ return safeParse(
129
+ jsonString,
130
+ (x) => TokenRequest$inboundSchema.parse(JSON.parse(x)),
131
+ `Failed to parse 'TokenRequest' from JSON`,
132
+ );
133
+ }
@@ -0,0 +1,102 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Token response
13
+ */
14
+ export type TokenResponse = {
15
+ /**
16
+ * The access token
17
+ */
18
+ accessToken: string;
19
+ /**
20
+ * Token type, usually 'Bearer'
21
+ */
22
+ tokenType: string;
23
+ /**
24
+ * Expiration time in seconds
25
+ */
26
+ expiresIn: number;
27
+ /**
28
+ * Scope of the token
29
+ */
30
+ scope: string;
31
+ };
32
+
33
+ /** @internal */
34
+ export const TokenResponse$inboundSchema: z.ZodType<
35
+ TokenResponse,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ access_token: z.string(),
40
+ token_type: z.string(),
41
+ expires_in: z.number().int(),
42
+ scope: z.string(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ "access_token": "accessToken",
46
+ "token_type": "tokenType",
47
+ "expires_in": "expiresIn",
48
+ });
49
+ });
50
+
51
+ /** @internal */
52
+ export type TokenResponse$Outbound = {
53
+ access_token: string;
54
+ token_type: string;
55
+ expires_in: number;
56
+ scope: string;
57
+ };
58
+
59
+ /** @internal */
60
+ export const TokenResponse$outboundSchema: z.ZodType<
61
+ TokenResponse$Outbound,
62
+ z.ZodTypeDef,
63
+ TokenResponse
64
+ > = z.object({
65
+ accessToken: z.string(),
66
+ tokenType: z.string(),
67
+ expiresIn: z.number().int(),
68
+ scope: z.string(),
69
+ }).transform((v) => {
70
+ return remap$(v, {
71
+ accessToken: "access_token",
72
+ tokenType: "token_type",
73
+ expiresIn: "expires_in",
74
+ });
75
+ });
76
+
77
+ /**
78
+ * @internal
79
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
+ */
81
+ export namespace TokenResponse$ {
82
+ /** @deprecated use `TokenResponse$inboundSchema` instead. */
83
+ export const inboundSchema = TokenResponse$inboundSchema;
84
+ /** @deprecated use `TokenResponse$outboundSchema` instead. */
85
+ export const outboundSchema = TokenResponse$outboundSchema;
86
+ /** @deprecated use `TokenResponse$Outbound` instead. */
87
+ export type Outbound = TokenResponse$Outbound;
88
+ }
89
+
90
+ export function tokenResponseToJSON(tokenResponse: TokenResponse): string {
91
+ return JSON.stringify(TokenResponse$outboundSchema.parse(tokenResponse));
92
+ }
93
+
94
+ export function tokenResponseFromJSON(
95
+ jsonString: string,
96
+ ): SafeParseResult<TokenResponse, SDKValidationError> {
97
+ return safeParse(
98
+ jsonString,
99
+ (x) => TokenResponse$inboundSchema.parse(JSON.parse(x)),
100
+ `Failed to parse 'TokenResponse' from JSON`,
101
+ );
102
+ }
package/src/sdk/sdk.ts CHANGED
@@ -2,7 +2,10 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { ClientSDK } from "../lib/sdks.js";
5
+ import { getToken } from "../funcs/getToken.js";
6
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
+ import * as components from "../models/components/index.js";
8
+ import { unwrapAsync } from "../types/fp.js";
6
9
  import { Applications } from "./applications.js";
7
10
 
8
11
  export class Financeable extends ClientSDK {
@@ -10,4 +13,18 @@ export class Financeable extends ClientSDK {
10
13
  get applications(): Applications {
11
14
  return (this._applications ??= new Applications(this._options));
12
15
  }
16
+
17
+ /**
18
+ * Obtain an OAuth client_credentials token
19
+ */
20
+ async getToken(
21
+ request: components.TokenRequest,
22
+ options?: RequestOptions,
23
+ ): Promise<components.TokenResponse> {
24
+ return unwrapAsync(getToken(
25
+ this,
26
+ request,
27
+ options,
28
+ ));
29
+ }
13
30
  }
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ export type APICall =
6
+ | {
7
+ status: "complete";
8
+ request: Request;
9
+ response: Response;
10
+ }
11
+ | {
12
+ status: "request-error";
13
+ request: Request;
14
+ response?: undefined;
15
+ }
16
+ | {
17
+ status: "invalid";
18
+ request?: undefined;
19
+ response?: undefined;
20
+ };
21
+
22
+ export class APIPromise<T> implements Promise<T> {
23
+ readonly #promise: Promise<[T, APICall]>;
24
+ readonly #unwrapped: Promise<T>;
25
+
26
+ readonly [Symbol.toStringTag] = "APIPromise";
27
+
28
+ constructor(p: [T, APICall] | Promise<[T, APICall]>) {
29
+ this.#promise = p instanceof Promise ? p : Promise.resolve(p);
30
+ this.#unwrapped =
31
+ p instanceof Promise
32
+ ? this.#promise.then(([value]) => value)
33
+ : Promise.resolve(p[0]);
34
+ }
35
+
36
+ then<TResult1 = T, TResult2 = never>(
37
+ onfulfilled?:
38
+ | ((value: T) => TResult1 | PromiseLike<TResult1>)
39
+ | null
40
+ | undefined,
41
+ onrejected?:
42
+ | ((reason: any) => TResult2 | PromiseLike<TResult2>)
43
+ | null
44
+ | undefined,
45
+ ): Promise<TResult1 | TResult2> {
46
+ return this.#promise.then(
47
+ onfulfilled ? ([value]) => onfulfilled(value) : void 0,
48
+ onrejected,
49
+ );
50
+ }
51
+
52
+ catch<TResult = never>(
53
+ onrejected?:
54
+ | ((reason: any) => TResult | PromiseLike<TResult>)
55
+ | null
56
+ | undefined,
57
+ ): Promise<T | TResult> {
58
+ return this.#unwrapped.catch(onrejected);
59
+ }
60
+
61
+ finally(onfinally?: (() => void) | null | undefined): Promise<T> {
62
+ return this.#unwrapped.finally(onfinally);
63
+ }
64
+
65
+ $inspect(): Promise<[T, APICall]> {
66
+ return this.#promise;
67
+ }
68
+ }
@@ -0,0 +1,23 @@
1
+ export type APICall = {
2
+ status: "complete";
3
+ request: Request;
4
+ response: Response;
5
+ } | {
6
+ status: "request-error";
7
+ request: Request;
8
+ response?: undefined;
9
+ } | {
10
+ status: "invalid";
11
+ request?: undefined;
12
+ response?: undefined;
13
+ };
14
+ export declare class APIPromise<T> implements Promise<T> {
15
+ #private;
16
+ readonly [Symbol.toStringTag] = "APIPromise";
17
+ constructor(p: [T, APICall] | Promise<[T, APICall]>);
18
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
19
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>;
20
+ finally(onfinally?: (() => void) | null | undefined): Promise<T>;
21
+ $inspect(): Promise<[T, APICall]>;
22
+ }
23
+ //# sourceMappingURL=async.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,OAAO,CAAC,CAAC,CAAC;;IAI9C,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB;gBAEjC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAQnD,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EACjC,WAAW,CAAC,EACR,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAChD,IAAI,GACJ,SAAS,EACb,UAAU,CAAC,EACP,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GACnD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAO/B,KAAK,CAAC,OAAO,GAAG,KAAK,EACnB,UAAU,CAAC,EACP,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GACjD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC;IAIvB,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CAGlC"}
package/types/async.js ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
6
+ if (kind === "m") throw new TypeError("Private method is not writable");
7
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
9
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _APIPromise_promise, _APIPromise_unwrapped, _a;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.APIPromise = void 0;
19
+ class APIPromise {
20
+ constructor(p) {
21
+ _APIPromise_promise.set(this, void 0);
22
+ _APIPromise_unwrapped.set(this, void 0);
23
+ this[_a] = "APIPromise";
24
+ __classPrivateFieldSet(this, _APIPromise_promise, p instanceof Promise ? p : Promise.resolve(p), "f");
25
+ __classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise
26
+ ? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value)
27
+ : Promise.resolve(p[0]), "f");
28
+ }
29
+ then(onfulfilled, onrejected) {
30
+ return __classPrivateFieldGet(this, _APIPromise_promise, "f").then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
31
+ }
32
+ catch(onrejected) {
33
+ return __classPrivateFieldGet(this, _APIPromise_unwrapped, "f").catch(onrejected);
34
+ }
35
+ finally(onfinally) {
36
+ return __classPrivateFieldGet(this, _APIPromise_unwrapped, "f").finally(onfinally);
37
+ }
38
+ $inspect() {
39
+ return __classPrivateFieldGet(this, _APIPromise_promise, "f");
40
+ }
41
+ }
42
+ exports.APIPromise = APIPromise;
43
+ _APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _a = Symbol.toStringTag;
44
+ //# sourceMappingURL=async.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAAU;IAMrB,YAAY,CAAuC;QAL1C,sCAAgC;QAChC,wCAAuB;QAEvB,QAAoB,GAAG,YAAY,CAAC;QAG3C,uBAAA,IAAI,uBAAY,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,MAAA,CAAC;QAC9D,uBAAA,IAAI,yBACF,CAAC,YAAY,OAAO;YAClB,CAAC,CAAC,uBAAA,IAAI,2BAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;YACxC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAA,CAAC;IAC9B,CAAC;IAED,IAAI,CACF,WAGa,EACb,UAGa;QAEb,OAAO,uBAAA,IAAI,2BAAS,CAAC,IAAI,CACvB,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EACtD,UAAU,CACX,CAAC;IACJ,CAAC;IAED,KAAK,CACH,UAGa;QAEb,OAAO,uBAAA,IAAI,6BAAW,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,CAAC,SAA2C;QACjD,OAAO,uBAAA,IAAI,6BAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ;QACN,OAAO,uBAAA,IAAI,2BAAS,CAAC;IACvB,CAAC;CACF;AA9CD,gCA8CC;iFA1CW,MAAM,CAAC,WAAW"}