@financeable/aggregation 0.2.0 → 0.2.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.
Files changed (97) hide show
  1. package/FUNCTIONS.md +1 -7
  2. package/README.md +938 -31
  3. package/docs/sdks/applications/README.md +2 -14
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/models/components/applicationresourcebulksubmission.d.ts +0 -6
  8. package/models/components/applicationresourcebulksubmission.d.ts.map +1 -1
  9. package/models/components/applicationresourcebulksubmission.js +0 -6
  10. package/models/components/applicationresourcebulksubmission.js.map +1 -1
  11. package/models/components/customerattributes.d.ts +5 -36
  12. package/models/components/customerattributes.d.ts.map +1 -1
  13. package/models/components/customerattributes.js +6 -41
  14. package/models/components/customerattributes.js.map +1 -1
  15. package/models/components/customeridtype.d.ts +28 -0
  16. package/models/components/customeridtype.d.ts.map +1 -0
  17. package/models/components/customeridtype.js +60 -0
  18. package/models/components/customeridtype.js.map +1 -0
  19. package/models/components/index.d.ts +1 -0
  20. package/models/components/index.d.ts.map +1 -1
  21. package/models/components/index.js +1 -0
  22. package/models/components/index.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/lib/config.ts +3 -3
  25. package/src/models/components/applicationresourcebulksubmission.ts +0 -12
  26. package/src/models/components/customerattributes.ts +13 -53
  27. package/src/models/components/customeridtype.ts +33 -0
  28. package/src/models/components/index.ts +1 -0
  29. package/financeable-typescript/.devcontainer/README.md +0 -30
  30. package/financeable-typescript/FUNCTIONS.md +0 -205
  31. package/financeable-typescript/README.md +0 -895
  32. package/financeable-typescript/RUNTIMES.md +0 -22
  33. package/financeable-typescript/docs/sdks/applications/README.md +0 -427
  34. package/financeable-typescript/docs/sdks/financeable/README.md +0 -5
  35. package/financeable-typescript/src/core.ts +0 -13
  36. package/financeable-typescript/src/funcs/applicationsCreate.ts +0 -124
  37. package/financeable-typescript/src/funcs/applicationsGet.ts +0 -128
  38. package/financeable-typescript/src/funcs/applicationsList.ts +0 -126
  39. package/financeable-typescript/src/hooks/hooks.ts +0 -129
  40. package/financeable-typescript/src/hooks/index.ts +0 -6
  41. package/financeable-typescript/src/hooks/types.ts +0 -109
  42. package/financeable-typescript/src/index.ts +0 -7
  43. package/financeable-typescript/src/lib/base64.ts +0 -37
  44. package/financeable-typescript/src/lib/config.ts +0 -59
  45. package/financeable-typescript/src/lib/dlv.ts +0 -53
  46. package/financeable-typescript/src/lib/encodings.ts +0 -449
  47. package/financeable-typescript/src/lib/env.ts +0 -37
  48. package/financeable-typescript/src/lib/files.ts +0 -40
  49. package/financeable-typescript/src/lib/http.ts +0 -323
  50. package/financeable-typescript/src/lib/is-plain-object.ts +0 -43
  51. package/financeable-typescript/src/lib/logger.ts +0 -9
  52. package/financeable-typescript/src/lib/matchers.ts +0 -322
  53. package/financeable-typescript/src/lib/primitives.ts +0 -122
  54. package/financeable-typescript/src/lib/retries.ts +0 -219
  55. package/financeable-typescript/src/lib/schemas.ts +0 -86
  56. package/financeable-typescript/src/lib/sdks.ts +0 -392
  57. package/financeable-typescript/src/lib/security.ts +0 -227
  58. package/financeable-typescript/src/lib/url.ts +0 -33
  59. package/financeable-typescript/src/models/components/addressattributes.ts +0 -148
  60. package/financeable-typescript/src/models/components/apierrorlinks.ts +0 -65
  61. package/financeable-typescript/src/models/components/applicationattributes.ts +0 -128
  62. package/financeable-typescript/src/models/components/applicationattributescreate.ts +0 -90
  63. package/financeable-typescript/src/models/components/applicationresourcebulksubmission.ts +0 -1000
  64. package/financeable-typescript/src/models/components/applicationstatus.ts +0 -39
  65. package/financeable-typescript/src/models/components/applicationtype.ts +0 -33
  66. package/financeable-typescript/src/models/components/assetattributes.ts +0 -400
  67. package/financeable-typescript/src/models/components/customerattributes.ts +0 -171
  68. package/financeable-typescript/src/models/components/customertitle.ts +0 -35
  69. package/financeable-typescript/src/models/components/errorsource.ts +0 -79
  70. package/financeable-typescript/src/models/components/forbiddenerror.ts +0 -207
  71. package/financeable-typescript/src/models/components/frequencytype.ts +0 -40
  72. package/financeable-typescript/src/models/components/index.ts +0 -20
  73. package/financeable-typescript/src/models/components/links.ts +0 -72
  74. package/financeable-typescript/src/models/components/loandetailsattributes.ts +0 -187
  75. package/financeable-typescript/src/models/components/repaymentstructure.ts +0 -40
  76. package/financeable-typescript/src/models/errors/apierror.ts +0 -27
  77. package/financeable-typescript/src/models/errors/createapplication.ts +0 -76
  78. package/financeable-typescript/src/models/errors/getapplication.ts +0 -76
  79. package/financeable-typescript/src/models/errors/getapplications.ts +0 -76
  80. package/financeable-typescript/src/models/errors/httpclienterrors.ts +0 -62
  81. package/financeable-typescript/src/models/errors/index.ts +0 -10
  82. package/financeable-typescript/src/models/errors/sdkvalidationerror.ts +0 -97
  83. package/financeable-typescript/src/models/operations/createapplication.ts +0 -1649
  84. package/financeable-typescript/src/models/operations/getapplication.ts +0 -1829
  85. package/financeable-typescript/src/models/operations/getapplications.ts +0 -1790
  86. package/financeable-typescript/src/models/operations/index.ts +0 -7
  87. package/financeable-typescript/src/sdk/applications.ts +0 -55
  88. package/financeable-typescript/src/sdk/index.ts +0 -5
  89. package/financeable-typescript/src/sdk/sdk.ts +0 -13
  90. package/financeable-typescript/src/types/blobs.ts +0 -31
  91. package/financeable-typescript/src/types/constdatetime.ts +0 -15
  92. package/financeable-typescript/src/types/enums.ts +0 -16
  93. package/financeable-typescript/src/types/fp.ts +0 -50
  94. package/financeable-typescript/src/types/index.ts +0 -11
  95. package/financeable-typescript/src/types/operations.ts +0 -105
  96. package/financeable-typescript/src/types/rfcdate.ts +0 -54
  97. package/financeable-typescript/src/types/streams.ts +0 -21
@@ -1,7 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export * from "./createapplication.js";
6
- export * from "./getapplication.js";
7
- export * from "./getapplications.js";
@@ -1,55 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { applicationsCreate } from "../funcs/applicationsCreate.js";
6
- import { applicationsGet } from "../funcs/applicationsGet.js";
7
- import { applicationsList } from "../funcs/applicationsList.js";
8
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
9
- import * as components from "../models/components/index.js";
10
- import * as operations from "../models/operations/index.js";
11
- import { unwrapAsync } from "../types/fp.js";
12
-
13
- export class Applications extends ClientSDK {
14
- /**
15
- * Create an application in the Financeable platform.
16
- */
17
- async create(
18
- request: components.ApplicationResourceBulkSubmission,
19
- options?: RequestOptions,
20
- ): Promise<operations.CreateApplicationResponseBody> {
21
- return unwrapAsync(applicationsCreate(
22
- this,
23
- request,
24
- options,
25
- ));
26
- }
27
-
28
- /**
29
- * Retrieve a list of applications
30
- */
31
- async list(
32
- request: operations.GetApplicationsRequest,
33
- options?: RequestOptions,
34
- ): Promise<operations.GetApplicationsResponseBody> {
35
- return unwrapAsync(applicationsList(
36
- this,
37
- request,
38
- options,
39
- ));
40
- }
41
-
42
- /**
43
- * Retrieve an application by its ID
44
- */
45
- async get(
46
- request: operations.GetApplicationRequest,
47
- options?: RequestOptions,
48
- ): Promise<operations.GetApplicationResponseBody> {
49
- return unwrapAsync(applicationsGet(
50
- this,
51
- request,
52
- options,
53
- ));
54
- }
55
- }
@@ -1,5 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export * from "./sdk.js";
@@ -1,13 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { ClientSDK } from "../lib/sdks.js";
6
- import { Applications } from "./applications.js";
7
-
8
- export class Financeable extends ClientSDK {
9
- private _applications?: Applications;
10
- get applications(): Applications {
11
- return (this._applications ??= new Applications(this._options));
12
- }
13
- }
@@ -1,31 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
-
7
- export const blobLikeSchema: z.ZodType<Blob, z.ZodTypeDef, Blob> =
8
- z.custom<Blob>(isBlobLike, {
9
- message: "expected a Blob, File or Blob-like object",
10
- fatal: true,
11
- });
12
-
13
- export function isBlobLike(val: unknown): val is Blob {
14
- if (val instanceof Blob) {
15
- return true;
16
- }
17
-
18
- if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
19
- return false;
20
- }
21
-
22
- const name = val[Symbol.toStringTag];
23
- if (typeof name !== "string") {
24
- return false;
25
- }
26
- if (name !== "Blob" && name !== "File") {
27
- return false;
28
- }
29
-
30
- return "stream" in val && typeof val.stream === "function";
31
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
-
7
- export function constDateTime(
8
- val: string,
9
- ): z.ZodType<string, z.ZodTypeDef, unknown> {
10
- return z.custom<string>((v) => {
11
- return (
12
- typeof v === "string" && new Date(v).getTime() === new Date(val).getTime()
13
- );
14
- }, `Value must be equivelant to ${val}`);
15
- }
@@ -1,16 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- declare const __brand: unique symbol;
6
- export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
7
-
8
- export function catchUnrecognizedEnum<T>(value: T): Unrecognized<T> {
9
- return value as Unrecognized<T>;
10
- }
11
-
12
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
13
- export type ClosedEnum<T> = T[keyof T];
14
- export type OpenEnum<T> =
15
- | Prettify<T[keyof T]>
16
- | Unrecognized<T[keyof T] extends number ? number : string>;
@@ -1,50 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- /**
6
- * A monad that captures the result of a function call or an error if it was not
7
- * successful. Railway programming, enabled by this type, can be a nicer
8
- * alternative to traditional exception throwing because it allows functions to
9
- * declare all _known_ errors with static types and then check for them
10
- * exhaustively in application code. Thrown exception have a type of `unknown`
11
- * and break out of regular control flow of programs making them harder to
12
- * inspect and more verbose work with due to try-catch blocks.
13
- */
14
- export type Result<T, E = unknown> =
15
- | { ok: true; value: T; error?: never }
16
- | { ok: false; value?: never; error: E };
17
-
18
- export function OK<V>(value: V): Result<V, never> {
19
- return { ok: true, value };
20
- }
21
-
22
- export function ERR<E>(error: E): Result<never, E> {
23
- return { ok: false, error };
24
- }
25
-
26
- /**
27
- * unwrap is a convenience function for extracting a value from a result or
28
- * throwing if there was an error.
29
- */
30
- export function unwrap<T>(r: Result<T, unknown>): T {
31
- if (!r.ok) {
32
- throw r.error;
33
- }
34
- return r.value;
35
- }
36
-
37
- /**
38
- * unwrapAsync is a convenience function for resolving a value from a Promise
39
- * of a result or rejecting if an error occurred.
40
- */
41
- export async function unwrapAsync<T>(
42
- pr: Promise<Result<T, unknown>>,
43
- ): Promise<T> {
44
- const r = await pr;
45
- if (!r.ok) {
46
- throw r.error;
47
- }
48
-
49
- return r.value;
50
- }
@@ -1,11 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export { blobLikeSchema, isBlobLike } from "./blobs.js";
6
- export { catchUnrecognizedEnum } from "./enums.js";
7
- export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
8
- export type { Result } from "./fp.js";
9
- export type { PageIterator, Paginator } from "./operations.js";
10
- export { createPageIterator } from "./operations.js";
11
- export { RFCDate } from "./rfcdate.js";
@@ -1,105 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { Result } from "./fp.js";
6
-
7
- export type Paginator<V> = () => Promise<V & { next: Paginator<V> }> | null;
8
-
9
- export type PageIterator<V, PageState = unknown> = V & {
10
- next: Paginator<V>;
11
- [Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
12
- "~next"?: PageState | undefined;
13
- };
14
-
15
- export function createPageIterator<V>(
16
- page: V & { next: Paginator<V> },
17
- halt: (v: V) => boolean,
18
- ): {
19
- [Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
20
- } {
21
- return {
22
- [Symbol.asyncIterator]: async function* paginator() {
23
- yield page;
24
- if (halt(page)) {
25
- return;
26
- }
27
-
28
- let p: typeof page | null = page;
29
- for (p = await p.next(); p != null; p = await p.next()) {
30
- yield p;
31
- if (halt(p)) {
32
- return;
33
- }
34
- }
35
- },
36
- };
37
- }
38
-
39
- /**
40
- * This utility create a special iterator that yields a single value and
41
- * terminates. It is useful in paginated SDK functions that have early return
42
- * paths when things go wrong.
43
- */
44
- export function haltIterator<V extends object>(
45
- v: V,
46
- ): PageIterator<V, undefined> {
47
- return {
48
- ...v,
49
- next: () => null,
50
- [Symbol.asyncIterator]: async function* paginator() {
51
- yield v;
52
- },
53
- };
54
- }
55
-
56
- /**
57
- * Converts an async iterator of `Result<V, E>` into an async iterator of `V`.
58
- * When error results occur, the underlying error value is thrown.
59
- */
60
- export async function unwrapResultIterator<V, PageState>(
61
- iteratorPromise: Promise<PageIterator<Result<V, unknown>, PageState>>,
62
- ): Promise<PageIterator<V, PageState>> {
63
- const resultIter = await iteratorPromise;
64
-
65
- if (!resultIter.ok) {
66
- throw resultIter.error;
67
- }
68
-
69
- return {
70
- ...resultIter.value,
71
- next: unwrapPaginator(resultIter.next),
72
- "~next": resultIter["~next"],
73
- [Symbol.asyncIterator]: async function* paginator() {
74
- for await (const page of resultIter) {
75
- if (!page.ok) {
76
- throw page.error;
77
- }
78
- yield page.value;
79
- }
80
- },
81
- };
82
- }
83
-
84
- function unwrapPaginator<V>(
85
- paginator: Paginator<Result<V, unknown>>,
86
- ): Paginator<V> {
87
- return () => {
88
- const nextResult = paginator();
89
- if (nextResult == null) {
90
- return null;
91
- }
92
- return nextResult.then((res) => {
93
- if (!res.ok) {
94
- throw res.error;
95
- }
96
- const out = {
97
- ...res.value,
98
- next: unwrapPaginator(res.next),
99
- };
100
- return out;
101
- });
102
- };
103
- }
104
-
105
- export const URL_OVERRIDE = Symbol("URL_OVERRIDE");
@@ -1,54 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- const dateRE = /^\d{4}-\d{2}-\d{2}$/;
6
-
7
- export class RFCDate {
8
- private serialized: string;
9
-
10
- /**
11
- * Creates a new RFCDate instance using today's date.
12
- */
13
- static today(): RFCDate {
14
- return new RFCDate(new Date());
15
- }
16
-
17
- /**
18
- * Creates a new RFCDate instance using the provided input.
19
- * If a string is used then in must be in the format YYYY-MM-DD.
20
- *
21
- * @param date A Date object or a date string in YYYY-MM-DD format
22
- * @example
23
- * new RFCDate("2022-01-01")
24
- * @example
25
- * new RFCDate(new Date())
26
- */
27
- constructor(date: Date | string) {
28
- if (typeof date === "string" && !dateRE.test(date)) {
29
- throw new RangeError(
30
- "RFCDate: date strings must be in the format YYYY-MM-DD: " + date,
31
- );
32
- }
33
-
34
- const value = new Date(date);
35
- if (isNaN(+value)) {
36
- throw new RangeError("RFCDate: invalid date provided: " + date);
37
- }
38
-
39
- this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length);
40
- if (!dateRE.test(this.serialized)) {
41
- throw new TypeError(
42
- `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`,
43
- );
44
- }
45
- }
46
-
47
- toJSON(): string {
48
- return this.toString();
49
- }
50
-
51
- toString(): string {
52
- return this.serialized;
53
- }
54
- }
@@ -1,21 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export function isReadableStream<T = Uint8Array>(
6
- val: unknown,
7
- ): val is ReadableStream<T> {
8
- if (typeof val !== "object" || val === null) {
9
- return false;
10
- }
11
-
12
- // Check for the presence of methods specific to ReadableStream
13
- const stream = val as ReadableStream<Uint8Array>;
14
-
15
- // ReadableStream has methods like getReader, cancel, and tee
16
- return (
17
- typeof stream.getReader === "function" &&
18
- typeof stream.cancel === "function" &&
19
- typeof stream.tee === "function"
20
- );
21
- }