@apideck/unify 0.11.6 → 0.12.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/README.md +27 -15
- package/docs/sdks/agedcreditors/README.md +113 -0
- package/docs/sdks/ageddebtors/README.md +113 -0
- package/funcs/accountingAgedCreditorsGet.d.ts +16 -0
- package/funcs/accountingAgedCreditorsGet.d.ts.map +1 -0
- package/funcs/accountingAgedCreditorsGet.js +121 -0
- package/funcs/accountingAgedCreditorsGet.js.map +1 -0
- package/funcs/accountingAgedDebtorsGet.d.ts +16 -0
- package/funcs/accountingAgedDebtorsGet.d.ts.map +1 -0
- package/funcs/accountingAgedDebtorsGet.js +121 -0
- package/funcs/accountingAgedDebtorsGet.js.map +1 -0
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/agedcreditors.d.ts +51 -0
- package/models/components/agedcreditors.d.ts.map +1 -0
- package/models/components/agedcreditors.js +86 -0
- package/models/components/agedcreditors.js.map +1 -0
- package/models/components/ageddebtors.d.ts +51 -0
- package/models/components/ageddebtors.d.ts.map +1 -0
- package/models/components/ageddebtors.js +86 -0
- package/models/components/ageddebtors.js.map +1 -0
- package/models/components/agedreportfilter.d.ts +47 -0
- package/models/components/agedreportfilter.d.ts.map +1 -0
- package/models/components/agedreportfilter.js +80 -0
- package/models/components/agedreportfilter.js.map +1 -0
- package/models/components/balancebyperiod.d.ts +46 -0
- package/models/components/balancebyperiod.d.ts.map +1 -0
- package/models/components/balancebyperiod.js +84 -0
- package/models/components/balancebyperiod.js.map +1 -0
- package/models/components/balancebytransaction.d.ts +99 -0
- package/models/components/balancebytransaction.d.ts.map +1 -0
- package/models/components/balancebytransaction.js +115 -0
- package/models/components/balancebytransaction.js.map +1 -0
- package/models/components/getagedcreditorsresponse.d.ts +58 -0
- package/models/components/getagedcreditorsresponse.d.ts.map +1 -0
- package/models/components/getagedcreditorsresponse.js +79 -0
- package/models/components/getagedcreditorsresponse.js.map +1 -0
- package/models/components/getageddebtorsresponse.d.ts +58 -0
- package/models/components/getageddebtorsresponse.d.ts.map +1 -0
- package/models/components/getageddebtorsresponse.js +79 -0
- package/models/components/getageddebtorsresponse.js.map +1 -0
- package/models/components/index.d.ts +9 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -0
- package/models/components/index.js.map +1 -1
- package/models/components/outstandingbalance.d.ts +40 -0
- package/models/components/outstandingbalance.d.ts.map +1 -0
- package/models/components/outstandingbalance.js +77 -0
- package/models/components/outstandingbalance.js.map +1 -0
- package/models/components/outstandingbalancebycurrency.d.ts +36 -0
- package/models/components/outstandingbalancebycurrency.d.ts.map +1 -0
- package/models/components/outstandingbalancebycurrency.js +72 -0
- package/models/components/outstandingbalancebycurrency.js.map +1 -0
- package/models/operations/accountingagedcreditorsone.d.ts +125 -0
- package/models/operations/accountingagedcreditorsone.d.ts.map +1 -0
- package/models/operations/accountingagedcreditorsone.js +153 -0
- package/models/operations/accountingagedcreditorsone.js.map +1 -0
- package/models/operations/accountingageddebtorsone.d.ts +125 -0
- package/models/operations/accountingageddebtorsone.d.ts.map +1 -0
- package/models/operations/accountingageddebtorsone.js +153 -0
- package/models/operations/accountingageddebtorsone.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/accounting.d.ts +6 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +10 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/agedcreditors.d.ts +12 -0
- package/sdk/agedcreditors.d.ts.map +1 -0
- package/sdk/agedcreditors.js +22 -0
- package/sdk/agedcreditors.js.map +1 -0
- package/sdk/ageddebtors.d.ts +12 -0
- package/sdk/ageddebtors.d.ts.map +1 -0
- package/sdk/ageddebtors.js +22 -0
- package/sdk/ageddebtors.js.map +1 -0
- package/src/funcs/accountingAgedCreditorsGet.ts +192 -0
- package/src/funcs/accountingAgedDebtorsGet.ts +192 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/agedcreditors.ts +116 -0
- package/src/models/components/ageddebtors.ts +116 -0
- package/src/models/components/agedreportfilter.ts +105 -0
- package/src/models/components/balancebyperiod.ts +109 -0
- package/src/models/components/balancebytransaction.ts +162 -0
- package/src/models/components/getagedcreditorsresponse.ts +119 -0
- package/src/models/components/getageddebtorsresponse.ts +119 -0
- package/src/models/components/index.ts +9 -0
- package/src/models/components/outstandingbalance.ts +107 -0
- package/src/models/components/outstandingbalancebycurrency.ts +95 -0
- package/src/models/operations/accountingagedcreditorsone.ts +277 -0
- package/src/models/operations/accountingageddebtorsone.ts +273 -0
- package/src/models/operations/index.ts +2 -0
- package/src/sdk/accounting.ts +12 -0
- package/src/sdk/agedcreditors.ts +27 -0
- package/src/sdk/ageddebtors.ts +27 -0
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
export type AgedReportFilter = {
|
|
12
|
+
/**
|
|
13
|
+
* Filter by customer id
|
|
14
|
+
*/
|
|
15
|
+
customerId?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The cutoff date for considering transactions
|
|
18
|
+
*/
|
|
19
|
+
reportAsOfDate?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Number of periods to split the aged creditors report into
|
|
22
|
+
*/
|
|
23
|
+
periodCount?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Length of each period in days
|
|
26
|
+
*/
|
|
27
|
+
periodLength?: number | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const AgedReportFilter$inboundSchema: z.ZodType<
|
|
32
|
+
AgedReportFilter,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
customer_id: z.string().optional(),
|
|
37
|
+
report_as_of_date: z.string().optional(),
|
|
38
|
+
period_count: z.number().int().optional(),
|
|
39
|
+
period_length: z.number().int().optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"customer_id": "customerId",
|
|
43
|
+
"report_as_of_date": "reportAsOfDate",
|
|
44
|
+
"period_count": "periodCount",
|
|
45
|
+
"period_length": "periodLength",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type AgedReportFilter$Outbound = {
|
|
51
|
+
customer_id?: string | undefined;
|
|
52
|
+
report_as_of_date?: string | undefined;
|
|
53
|
+
period_count?: number | undefined;
|
|
54
|
+
period_length?: number | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const AgedReportFilter$outboundSchema: z.ZodType<
|
|
59
|
+
AgedReportFilter$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
AgedReportFilter
|
|
62
|
+
> = z.object({
|
|
63
|
+
customerId: z.string().optional(),
|
|
64
|
+
reportAsOfDate: z.string().optional(),
|
|
65
|
+
periodCount: z.number().int().optional(),
|
|
66
|
+
periodLength: z.number().int().optional(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
customerId: "customer_id",
|
|
70
|
+
reportAsOfDate: "report_as_of_date",
|
|
71
|
+
periodCount: "period_count",
|
|
72
|
+
periodLength: "period_length",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export namespace AgedReportFilter$ {
|
|
81
|
+
/** @deprecated use `AgedReportFilter$inboundSchema` instead. */
|
|
82
|
+
export const inboundSchema = AgedReportFilter$inboundSchema;
|
|
83
|
+
/** @deprecated use `AgedReportFilter$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema = AgedReportFilter$outboundSchema;
|
|
85
|
+
/** @deprecated use `AgedReportFilter$Outbound` instead. */
|
|
86
|
+
export type Outbound = AgedReportFilter$Outbound;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function agedReportFilterToJSON(
|
|
90
|
+
agedReportFilter: AgedReportFilter,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
AgedReportFilter$outboundSchema.parse(agedReportFilter),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function agedReportFilterFromJSON(
|
|
98
|
+
jsonString: string,
|
|
99
|
+
): SafeParseResult<AgedReportFilter, SDKValidationError> {
|
|
100
|
+
return safeParse(
|
|
101
|
+
jsonString,
|
|
102
|
+
(x) => AgedReportFilter$inboundSchema.parse(JSON.parse(x)),
|
|
103
|
+
`Failed to parse 'AgedReportFilter' from JSON`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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 { RFCDate } from "../../types/rfcdate.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
BalanceByTransaction,
|
|
13
|
+
BalanceByTransaction$inboundSchema,
|
|
14
|
+
BalanceByTransaction$Outbound,
|
|
15
|
+
BalanceByTransaction$outboundSchema,
|
|
16
|
+
} from "./balancebytransaction.js";
|
|
17
|
+
|
|
18
|
+
export type BalanceByPeriod = {
|
|
19
|
+
/**
|
|
20
|
+
* Start date of the period.
|
|
21
|
+
*/
|
|
22
|
+
startDate?: RFCDate | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* End date of the period.
|
|
25
|
+
*/
|
|
26
|
+
endDate?: RFCDate | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Total amount of the period.
|
|
29
|
+
*/
|
|
30
|
+
totalAmount?: number | undefined;
|
|
31
|
+
balancesByTransaction?: Array<BalanceByTransaction> | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const BalanceByPeriod$inboundSchema: z.ZodType<
|
|
36
|
+
BalanceByPeriod,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
start_date: z.string().transform(v => new RFCDate(v)).optional(),
|
|
41
|
+
end_date: z.string().transform(v => new RFCDate(v)).optional(),
|
|
42
|
+
total_amount: z.number().optional(),
|
|
43
|
+
balances_by_transaction: z.array(BalanceByTransaction$inboundSchema)
|
|
44
|
+
.optional(),
|
|
45
|
+
}).transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
"start_date": "startDate",
|
|
48
|
+
"end_date": "endDate",
|
|
49
|
+
"total_amount": "totalAmount",
|
|
50
|
+
"balances_by_transaction": "balancesByTransaction",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type BalanceByPeriod$Outbound = {
|
|
56
|
+
start_date?: string | undefined;
|
|
57
|
+
end_date?: string | undefined;
|
|
58
|
+
total_amount?: number | undefined;
|
|
59
|
+
balances_by_transaction?: Array<BalanceByTransaction$Outbound> | undefined;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const BalanceByPeriod$outboundSchema: z.ZodType<
|
|
64
|
+
BalanceByPeriod$Outbound,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
BalanceByPeriod
|
|
67
|
+
> = z.object({
|
|
68
|
+
startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
69
|
+
endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
70
|
+
totalAmount: z.number().optional(),
|
|
71
|
+
balancesByTransaction: z.array(BalanceByTransaction$outboundSchema)
|
|
72
|
+
.optional(),
|
|
73
|
+
}).transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
startDate: "start_date",
|
|
76
|
+
endDate: "end_date",
|
|
77
|
+
totalAmount: "total_amount",
|
|
78
|
+
balancesByTransaction: "balances_by_transaction",
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
+
*/
|
|
86
|
+
export namespace BalanceByPeriod$ {
|
|
87
|
+
/** @deprecated use `BalanceByPeriod$inboundSchema` instead. */
|
|
88
|
+
export const inboundSchema = BalanceByPeriod$inboundSchema;
|
|
89
|
+
/** @deprecated use `BalanceByPeriod$outboundSchema` instead. */
|
|
90
|
+
export const outboundSchema = BalanceByPeriod$outboundSchema;
|
|
91
|
+
/** @deprecated use `BalanceByPeriod$Outbound` instead. */
|
|
92
|
+
export type Outbound = BalanceByPeriod$Outbound;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function balanceByPeriodToJSON(
|
|
96
|
+
balanceByPeriod: BalanceByPeriod,
|
|
97
|
+
): string {
|
|
98
|
+
return JSON.stringify(BalanceByPeriod$outboundSchema.parse(balanceByPeriod));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function balanceByPeriodFromJSON(
|
|
102
|
+
jsonString: string,
|
|
103
|
+
): SafeParseResult<BalanceByPeriod, SDKValidationError> {
|
|
104
|
+
return safeParse(
|
|
105
|
+
jsonString,
|
|
106
|
+
(x) => BalanceByPeriod$inboundSchema.parse(JSON.parse(x)),
|
|
107
|
+
`Failed to parse 'BalanceByPeriod' from JSON`,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
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 { RFCDate } from "../../types/rfcdate.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Type of the transaction.
|
|
15
|
+
*/
|
|
16
|
+
export const TransactionType = {
|
|
17
|
+
Invoice: "invoice",
|
|
18
|
+
CreditNote: "credit_note",
|
|
19
|
+
Bill: "bill",
|
|
20
|
+
Payment: "payment",
|
|
21
|
+
BillPayment: "bill-payment",
|
|
22
|
+
} as const;
|
|
23
|
+
/**
|
|
24
|
+
* Type of the transaction.
|
|
25
|
+
*/
|
|
26
|
+
export type TransactionType = ClosedEnum<typeof TransactionType>;
|
|
27
|
+
|
|
28
|
+
export type BalanceByTransaction = {
|
|
29
|
+
/**
|
|
30
|
+
* Unique identifier for the transaction.
|
|
31
|
+
*/
|
|
32
|
+
transactionId?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Date of the transaction.
|
|
35
|
+
*/
|
|
36
|
+
transactionDate?: RFCDate | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Type of the transaction.
|
|
39
|
+
*/
|
|
40
|
+
transactionType?: TransactionType | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Due date of the transaction.
|
|
43
|
+
*/
|
|
44
|
+
dueDate?: RFCDate | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Original amount of the transaction.
|
|
47
|
+
*/
|
|
48
|
+
originalAmount?: number | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Outstanding balance of the transaction.
|
|
51
|
+
*/
|
|
52
|
+
outstandingBalance?: number | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const TransactionType$inboundSchema: z.ZodNativeEnum<
|
|
57
|
+
typeof TransactionType
|
|
58
|
+
> = z.nativeEnum(TransactionType);
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const TransactionType$outboundSchema: z.ZodNativeEnum<
|
|
62
|
+
typeof TransactionType
|
|
63
|
+
> = TransactionType$inboundSchema;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace TransactionType$ {
|
|
70
|
+
/** @deprecated use `TransactionType$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = TransactionType$inboundSchema;
|
|
72
|
+
/** @deprecated use `TransactionType$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = TransactionType$outboundSchema;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const BalanceByTransaction$inboundSchema: z.ZodType<
|
|
78
|
+
BalanceByTransaction,
|
|
79
|
+
z.ZodTypeDef,
|
|
80
|
+
unknown
|
|
81
|
+
> = z.object({
|
|
82
|
+
transaction_id: z.string().optional(),
|
|
83
|
+
transaction_date: z.string().transform(v => new RFCDate(v)).optional(),
|
|
84
|
+
transaction_type: TransactionType$inboundSchema.optional(),
|
|
85
|
+
due_date: z.string().transform(v => new RFCDate(v)).optional(),
|
|
86
|
+
original_amount: z.number().optional(),
|
|
87
|
+
outstanding_balance: z.number().optional(),
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
"transaction_id": "transactionId",
|
|
91
|
+
"transaction_date": "transactionDate",
|
|
92
|
+
"transaction_type": "transactionType",
|
|
93
|
+
"due_date": "dueDate",
|
|
94
|
+
"original_amount": "originalAmount",
|
|
95
|
+
"outstanding_balance": "outstandingBalance",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export type BalanceByTransaction$Outbound = {
|
|
101
|
+
transaction_id?: string | undefined;
|
|
102
|
+
transaction_date?: string | undefined;
|
|
103
|
+
transaction_type?: string | undefined;
|
|
104
|
+
due_date?: string | undefined;
|
|
105
|
+
original_amount?: number | undefined;
|
|
106
|
+
outstanding_balance?: number | undefined;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const BalanceByTransaction$outboundSchema: z.ZodType<
|
|
111
|
+
BalanceByTransaction$Outbound,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
BalanceByTransaction
|
|
114
|
+
> = z.object({
|
|
115
|
+
transactionId: z.string().optional(),
|
|
116
|
+
transactionDate: z.instanceof(RFCDate).transform(v => v.toString())
|
|
117
|
+
.optional(),
|
|
118
|
+
transactionType: TransactionType$outboundSchema.optional(),
|
|
119
|
+
dueDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
120
|
+
originalAmount: z.number().optional(),
|
|
121
|
+
outstandingBalance: z.number().optional(),
|
|
122
|
+
}).transform((v) => {
|
|
123
|
+
return remap$(v, {
|
|
124
|
+
transactionId: "transaction_id",
|
|
125
|
+
transactionDate: "transaction_date",
|
|
126
|
+
transactionType: "transaction_type",
|
|
127
|
+
dueDate: "due_date",
|
|
128
|
+
originalAmount: "original_amount",
|
|
129
|
+
outstandingBalance: "outstanding_balance",
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
136
|
+
*/
|
|
137
|
+
export namespace BalanceByTransaction$ {
|
|
138
|
+
/** @deprecated use `BalanceByTransaction$inboundSchema` instead. */
|
|
139
|
+
export const inboundSchema = BalanceByTransaction$inboundSchema;
|
|
140
|
+
/** @deprecated use `BalanceByTransaction$outboundSchema` instead. */
|
|
141
|
+
export const outboundSchema = BalanceByTransaction$outboundSchema;
|
|
142
|
+
/** @deprecated use `BalanceByTransaction$Outbound` instead. */
|
|
143
|
+
export type Outbound = BalanceByTransaction$Outbound;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function balanceByTransactionToJSON(
|
|
147
|
+
balanceByTransaction: BalanceByTransaction,
|
|
148
|
+
): string {
|
|
149
|
+
return JSON.stringify(
|
|
150
|
+
BalanceByTransaction$outboundSchema.parse(balanceByTransaction),
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function balanceByTransactionFromJSON(
|
|
155
|
+
jsonString: string,
|
|
156
|
+
): SafeParseResult<BalanceByTransaction, SDKValidationError> {
|
|
157
|
+
return safeParse(
|
|
158
|
+
jsonString,
|
|
159
|
+
(x) => BalanceByTransaction$inboundSchema.parse(JSON.parse(x)),
|
|
160
|
+
`Failed to parse 'BalanceByTransaction' from JSON`,
|
|
161
|
+
);
|
|
162
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
import {
|
|
11
|
+
AgedCreditors,
|
|
12
|
+
AgedCreditors$inboundSchema,
|
|
13
|
+
AgedCreditors$Outbound,
|
|
14
|
+
AgedCreditors$outboundSchema,
|
|
15
|
+
} from "./agedcreditors.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Aged Creditors
|
|
19
|
+
*/
|
|
20
|
+
export type GetAgedCreditorsResponse = {
|
|
21
|
+
/**
|
|
22
|
+
* HTTP Response Status Code
|
|
23
|
+
*/
|
|
24
|
+
statusCode: number;
|
|
25
|
+
/**
|
|
26
|
+
* HTTP Response Status
|
|
27
|
+
*/
|
|
28
|
+
status: string;
|
|
29
|
+
/**
|
|
30
|
+
* Apideck ID of service provider
|
|
31
|
+
*/
|
|
32
|
+
service: string;
|
|
33
|
+
/**
|
|
34
|
+
* Unified API resource name
|
|
35
|
+
*/
|
|
36
|
+
resource: string;
|
|
37
|
+
/**
|
|
38
|
+
* Operation performed
|
|
39
|
+
*/
|
|
40
|
+
operation: string;
|
|
41
|
+
data: AgedCreditors;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const GetAgedCreditorsResponse$inboundSchema: z.ZodType<
|
|
46
|
+
GetAgedCreditorsResponse,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
status_code: z.number().int(),
|
|
51
|
+
status: z.string(),
|
|
52
|
+
service: z.string(),
|
|
53
|
+
resource: z.string(),
|
|
54
|
+
operation: z.string(),
|
|
55
|
+
data: AgedCreditors$inboundSchema,
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
"status_code": "statusCode",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type GetAgedCreditorsResponse$Outbound = {
|
|
64
|
+
status_code: number;
|
|
65
|
+
status: string;
|
|
66
|
+
service: string;
|
|
67
|
+
resource: string;
|
|
68
|
+
operation: string;
|
|
69
|
+
data: AgedCreditors$Outbound;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const GetAgedCreditorsResponse$outboundSchema: z.ZodType<
|
|
74
|
+
GetAgedCreditorsResponse$Outbound,
|
|
75
|
+
z.ZodTypeDef,
|
|
76
|
+
GetAgedCreditorsResponse
|
|
77
|
+
> = z.object({
|
|
78
|
+
statusCode: z.number().int(),
|
|
79
|
+
status: z.string(),
|
|
80
|
+
service: z.string(),
|
|
81
|
+
resource: z.string(),
|
|
82
|
+
operation: z.string(),
|
|
83
|
+
data: AgedCreditors$outboundSchema,
|
|
84
|
+
}).transform((v) => {
|
|
85
|
+
return remap$(v, {
|
|
86
|
+
statusCode: "status_code",
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
93
|
+
*/
|
|
94
|
+
export namespace GetAgedCreditorsResponse$ {
|
|
95
|
+
/** @deprecated use `GetAgedCreditorsResponse$inboundSchema` instead. */
|
|
96
|
+
export const inboundSchema = GetAgedCreditorsResponse$inboundSchema;
|
|
97
|
+
/** @deprecated use `GetAgedCreditorsResponse$outboundSchema` instead. */
|
|
98
|
+
export const outboundSchema = GetAgedCreditorsResponse$outboundSchema;
|
|
99
|
+
/** @deprecated use `GetAgedCreditorsResponse$Outbound` instead. */
|
|
100
|
+
export type Outbound = GetAgedCreditorsResponse$Outbound;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function getAgedCreditorsResponseToJSON(
|
|
104
|
+
getAgedCreditorsResponse: GetAgedCreditorsResponse,
|
|
105
|
+
): string {
|
|
106
|
+
return JSON.stringify(
|
|
107
|
+
GetAgedCreditorsResponse$outboundSchema.parse(getAgedCreditorsResponse),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function getAgedCreditorsResponseFromJSON(
|
|
112
|
+
jsonString: string,
|
|
113
|
+
): SafeParseResult<GetAgedCreditorsResponse, SDKValidationError> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) => GetAgedCreditorsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
117
|
+
`Failed to parse 'GetAgedCreditorsResponse' from JSON`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
import {
|
|
11
|
+
AgedDebtors,
|
|
12
|
+
AgedDebtors$inboundSchema,
|
|
13
|
+
AgedDebtors$Outbound,
|
|
14
|
+
AgedDebtors$outboundSchema,
|
|
15
|
+
} from "./ageddebtors.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Aged Debtors
|
|
19
|
+
*/
|
|
20
|
+
export type GetAgedDebtorsResponse = {
|
|
21
|
+
/**
|
|
22
|
+
* HTTP Response Status Code
|
|
23
|
+
*/
|
|
24
|
+
statusCode: number;
|
|
25
|
+
/**
|
|
26
|
+
* HTTP Response Status
|
|
27
|
+
*/
|
|
28
|
+
status: string;
|
|
29
|
+
/**
|
|
30
|
+
* Apideck ID of service provider
|
|
31
|
+
*/
|
|
32
|
+
service: string;
|
|
33
|
+
/**
|
|
34
|
+
* Unified API resource name
|
|
35
|
+
*/
|
|
36
|
+
resource: string;
|
|
37
|
+
/**
|
|
38
|
+
* Operation performed
|
|
39
|
+
*/
|
|
40
|
+
operation: string;
|
|
41
|
+
data: AgedDebtors;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const GetAgedDebtorsResponse$inboundSchema: z.ZodType<
|
|
46
|
+
GetAgedDebtorsResponse,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
status_code: z.number().int(),
|
|
51
|
+
status: z.string(),
|
|
52
|
+
service: z.string(),
|
|
53
|
+
resource: z.string(),
|
|
54
|
+
operation: z.string(),
|
|
55
|
+
data: AgedDebtors$inboundSchema,
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
"status_code": "statusCode",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type GetAgedDebtorsResponse$Outbound = {
|
|
64
|
+
status_code: number;
|
|
65
|
+
status: string;
|
|
66
|
+
service: string;
|
|
67
|
+
resource: string;
|
|
68
|
+
operation: string;
|
|
69
|
+
data: AgedDebtors$Outbound;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const GetAgedDebtorsResponse$outboundSchema: z.ZodType<
|
|
74
|
+
GetAgedDebtorsResponse$Outbound,
|
|
75
|
+
z.ZodTypeDef,
|
|
76
|
+
GetAgedDebtorsResponse
|
|
77
|
+
> = z.object({
|
|
78
|
+
statusCode: z.number().int(),
|
|
79
|
+
status: z.string(),
|
|
80
|
+
service: z.string(),
|
|
81
|
+
resource: z.string(),
|
|
82
|
+
operation: z.string(),
|
|
83
|
+
data: AgedDebtors$outboundSchema,
|
|
84
|
+
}).transform((v) => {
|
|
85
|
+
return remap$(v, {
|
|
86
|
+
statusCode: "status_code",
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
93
|
+
*/
|
|
94
|
+
export namespace GetAgedDebtorsResponse$ {
|
|
95
|
+
/** @deprecated use `GetAgedDebtorsResponse$inboundSchema` instead. */
|
|
96
|
+
export const inboundSchema = GetAgedDebtorsResponse$inboundSchema;
|
|
97
|
+
/** @deprecated use `GetAgedDebtorsResponse$outboundSchema` instead. */
|
|
98
|
+
export const outboundSchema = GetAgedDebtorsResponse$outboundSchema;
|
|
99
|
+
/** @deprecated use `GetAgedDebtorsResponse$Outbound` instead. */
|
|
100
|
+
export type Outbound = GetAgedDebtorsResponse$Outbound;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function getAgedDebtorsResponseToJSON(
|
|
104
|
+
getAgedDebtorsResponse: GetAgedDebtorsResponse,
|
|
105
|
+
): string {
|
|
106
|
+
return JSON.stringify(
|
|
107
|
+
GetAgedDebtorsResponse$outboundSchema.parse(getAgedDebtorsResponse),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function getAgedDebtorsResponseFromJSON(
|
|
112
|
+
jsonString: string,
|
|
113
|
+
): SafeParseResult<GetAgedDebtorsResponse, SDKValidationError> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) => GetAgedDebtorsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
117
|
+
`Failed to parse 'GetAgedDebtorsResponse' from JSON`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
@@ -11,6 +11,9 @@ export * from "./activitiessort.js";
|
|
|
11
11
|
export * from "./activity.js";
|
|
12
12
|
export * from "./activityattendee.js";
|
|
13
13
|
export * from "./address.js";
|
|
14
|
+
export * from "./agedcreditors.js";
|
|
15
|
+
export * from "./ageddebtors.js";
|
|
16
|
+
export * from "./agedreportfilter.js";
|
|
14
17
|
export * from "./allocation.js";
|
|
15
18
|
export * from "./api.js";
|
|
16
19
|
export * from "./apiresource.js";
|
|
@@ -26,6 +29,8 @@ export * from "./attachment.js";
|
|
|
26
29
|
export * from "./attachmentreference.js";
|
|
27
30
|
export * from "./attachmentreferencetype.js";
|
|
28
31
|
export * from "./authtype.js";
|
|
32
|
+
export * from "./balancebyperiod.js";
|
|
33
|
+
export * from "./balancebytransaction.js";
|
|
29
34
|
export * from "./balancesheet.js";
|
|
30
35
|
export * from "./balancesheetfilter.js";
|
|
31
36
|
export * from "./bankaccount.js";
|
|
@@ -219,6 +224,8 @@ export * from "./getaccountinglocationresponse.js";
|
|
|
219
224
|
export * from "./getaccountinglocationsresponse.js";
|
|
220
225
|
export * from "./getactivitiesresponse.js";
|
|
221
226
|
export * from "./getactivityresponse.js";
|
|
227
|
+
export * from "./getagedcreditorsresponse.js";
|
|
228
|
+
export * from "./getageddebtorsresponse.js";
|
|
222
229
|
export * from "./getapiresourcecoverageresponse.js";
|
|
223
230
|
export * from "./getapiresourceresponse.js";
|
|
224
231
|
export * from "./getapiresponse.js";
|
|
@@ -386,6 +393,8 @@ export * from "./opportunitiessort.js";
|
|
|
386
393
|
export * from "./opportunity.js";
|
|
387
394
|
export * from "./opportunityinput.js";
|
|
388
395
|
export * from "./orderssort.js";
|
|
396
|
+
export * from "./outstandingbalance.js";
|
|
397
|
+
export * from "./outstandingbalancebycurrency.js";
|
|
389
398
|
export * from "./owner.js";
|
|
390
399
|
export * from "./paginationcoverage.js";
|
|
391
400
|
export * from "./passthroughbody.js";
|