@apideck/unify 0.11.5 → 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.
Files changed (119) hide show
  1. package/README.md +27 -15
  2. package/docs/sdks/agedcreditors/README.md +113 -0
  3. package/docs/sdks/ageddebtors/README.md +113 -0
  4. package/funcs/accountingAgedCreditorsGet.d.ts +16 -0
  5. package/funcs/accountingAgedCreditorsGet.d.ts.map +1 -0
  6. package/funcs/accountingAgedCreditorsGet.js +121 -0
  7. package/funcs/accountingAgedCreditorsGet.js.map +1 -0
  8. package/funcs/accountingAgedDebtorsGet.d.ts +16 -0
  9. package/funcs/accountingAgedDebtorsGet.d.ts.map +1 -0
  10. package/funcs/accountingAgedDebtorsGet.js +121 -0
  11. package/funcs/accountingAgedDebtorsGet.js.map +1 -0
  12. package/funcs/accountingAttachmentsDownload.d.ts +1 -1
  13. package/funcs/accountingAttachmentsDownload.d.ts.map +1 -1
  14. package/funcs/accountingAttachmentsDownload.js +1 -1
  15. package/funcs/accountingAttachmentsDownload.js.map +1 -1
  16. package/funcs/fileStorageFilesDownload.d.ts +1 -1
  17. package/funcs/fileStorageFilesDownload.d.ts.map +1 -1
  18. package/funcs/fileStorageFilesDownload.js +1 -1
  19. package/funcs/fileStorageFilesDownload.js.map +1 -1
  20. package/funcs/fileStorageFilesExport.d.ts +1 -1
  21. package/funcs/fileStorageFilesExport.d.ts.map +1 -1
  22. package/funcs/fileStorageFilesExport.js +1 -1
  23. package/funcs/fileStorageFilesExport.js.map +1 -1
  24. package/hooks/hooks.d.ts.map +1 -1
  25. package/hooks/hooks.js +18 -0
  26. package/hooks/hooks.js.map +1 -1
  27. package/hooks/types.d.ts +1 -0
  28. package/hooks/types.d.ts.map +1 -1
  29. package/lib/config.d.ts +4 -4
  30. package/lib/config.js +4 -4
  31. package/models/components/agedcreditors.d.ts +51 -0
  32. package/models/components/agedcreditors.d.ts.map +1 -0
  33. package/models/components/agedcreditors.js +86 -0
  34. package/models/components/agedcreditors.js.map +1 -0
  35. package/models/components/ageddebtors.d.ts +51 -0
  36. package/models/components/ageddebtors.d.ts.map +1 -0
  37. package/models/components/ageddebtors.js +86 -0
  38. package/models/components/ageddebtors.js.map +1 -0
  39. package/models/components/agedreportfilter.d.ts +47 -0
  40. package/models/components/agedreportfilter.d.ts.map +1 -0
  41. package/models/components/agedreportfilter.js +80 -0
  42. package/models/components/agedreportfilter.js.map +1 -0
  43. package/models/components/balancebyperiod.d.ts +46 -0
  44. package/models/components/balancebyperiod.d.ts.map +1 -0
  45. package/models/components/balancebyperiod.js +84 -0
  46. package/models/components/balancebyperiod.js.map +1 -0
  47. package/models/components/balancebytransaction.d.ts +99 -0
  48. package/models/components/balancebytransaction.d.ts.map +1 -0
  49. package/models/components/balancebytransaction.js +115 -0
  50. package/models/components/balancebytransaction.js.map +1 -0
  51. package/models/components/getagedcreditorsresponse.d.ts +58 -0
  52. package/models/components/getagedcreditorsresponse.d.ts.map +1 -0
  53. package/models/components/getagedcreditorsresponse.js +79 -0
  54. package/models/components/getagedcreditorsresponse.js.map +1 -0
  55. package/models/components/getageddebtorsresponse.d.ts +58 -0
  56. package/models/components/getageddebtorsresponse.d.ts.map +1 -0
  57. package/models/components/getageddebtorsresponse.js +79 -0
  58. package/models/components/getageddebtorsresponse.js.map +1 -0
  59. package/models/components/index.d.ts +9 -0
  60. package/models/components/index.d.ts.map +1 -1
  61. package/models/components/index.js +9 -0
  62. package/models/components/index.js.map +1 -1
  63. package/models/components/outstandingbalance.d.ts +40 -0
  64. package/models/components/outstandingbalance.d.ts.map +1 -0
  65. package/models/components/outstandingbalance.js +77 -0
  66. package/models/components/outstandingbalance.js.map +1 -0
  67. package/models/components/outstandingbalancebycurrency.d.ts +36 -0
  68. package/models/components/outstandingbalancebycurrency.d.ts.map +1 -0
  69. package/models/components/outstandingbalancebycurrency.js +72 -0
  70. package/models/components/outstandingbalancebycurrency.js.map +1 -0
  71. package/models/operations/accountingagedcreditorsone.d.ts +125 -0
  72. package/models/operations/accountingagedcreditorsone.d.ts.map +1 -0
  73. package/models/operations/accountingagedcreditorsone.js +153 -0
  74. package/models/operations/accountingagedcreditorsone.js.map +1 -0
  75. package/models/operations/accountingageddebtorsone.d.ts +125 -0
  76. package/models/operations/accountingageddebtorsone.d.ts.map +1 -0
  77. package/models/operations/accountingageddebtorsone.js +153 -0
  78. package/models/operations/accountingageddebtorsone.js.map +1 -0
  79. package/models/operations/index.d.ts +2 -0
  80. package/models/operations/index.d.ts.map +1 -1
  81. package/models/operations/index.js +2 -0
  82. package/models/operations/index.js.map +1 -1
  83. package/package.json +1 -3
  84. package/sdk/accounting.d.ts +6 -0
  85. package/sdk/accounting.d.ts.map +1 -1
  86. package/sdk/accounting.js +10 -0
  87. package/sdk/accounting.js.map +1 -1
  88. package/sdk/agedcreditors.d.ts +12 -0
  89. package/sdk/agedcreditors.d.ts.map +1 -0
  90. package/sdk/agedcreditors.js +22 -0
  91. package/sdk/agedcreditors.js.map +1 -0
  92. package/sdk/ageddebtors.d.ts +12 -0
  93. package/sdk/ageddebtors.d.ts.map +1 -0
  94. package/sdk/ageddebtors.js +22 -0
  95. package/sdk/ageddebtors.js.map +1 -0
  96. package/src/funcs/accountingAgedCreditorsGet.ts +192 -0
  97. package/src/funcs/accountingAgedDebtorsGet.ts +192 -0
  98. package/src/funcs/accountingAttachmentsDownload.ts +1 -1
  99. package/src/funcs/fileStorageFilesDownload.ts +1 -1
  100. package/src/funcs/fileStorageFilesExport.ts +1 -1
  101. package/src/hooks/hooks.ts +20 -0
  102. package/src/hooks/types.ts +7 -0
  103. package/src/lib/config.ts +4 -4
  104. package/src/models/components/agedcreditors.ts +116 -0
  105. package/src/models/components/ageddebtors.ts +116 -0
  106. package/src/models/components/agedreportfilter.ts +105 -0
  107. package/src/models/components/balancebyperiod.ts +109 -0
  108. package/src/models/components/balancebytransaction.ts +162 -0
  109. package/src/models/components/getagedcreditorsresponse.ts +119 -0
  110. package/src/models/components/getageddebtorsresponse.ts +119 -0
  111. package/src/models/components/index.ts +9 -0
  112. package/src/models/components/outstandingbalance.ts +107 -0
  113. package/src/models/components/outstandingbalancebycurrency.ts +95 -0
  114. package/src/models/operations/accountingagedcreditorsone.ts +277 -0
  115. package/src/models/operations/accountingageddebtorsone.ts +273 -0
  116. package/src/models/operations/index.ts +2 -0
  117. package/src/sdk/accounting.ts +12 -0
  118. package/src/sdk/agedcreditors.ts +27 -0
  119. package/src/sdk/ageddebtors.ts +27 -0
@@ -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";
@@ -0,0 +1,107 @@
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
+ OutstandingBalanceByCurrency,
12
+ OutstandingBalanceByCurrency$inboundSchema,
13
+ OutstandingBalanceByCurrency$Outbound,
14
+ OutstandingBalanceByCurrency$outboundSchema,
15
+ } from "./outstandingbalancebycurrency.js";
16
+
17
+ export type OutstandingBalance = {
18
+ /**
19
+ * Unique identifier for the customer or supplier.
20
+ */
21
+ customerId?: string | undefined;
22
+ /**
23
+ * Full name of the customer or supplier.
24
+ */
25
+ customerName?: string | undefined;
26
+ outstandingBalancesByCurrency?:
27
+ | Array<OutstandingBalanceByCurrency>
28
+ | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const OutstandingBalance$inboundSchema: z.ZodType<
33
+ OutstandingBalance,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ customer_id: z.string().optional(),
38
+ customer_name: z.string().optional(),
39
+ outstanding_balances_by_currency: z.array(
40
+ OutstandingBalanceByCurrency$inboundSchema,
41
+ ).optional(),
42
+ }).transform((v) => {
43
+ return remap$(v, {
44
+ "customer_id": "customerId",
45
+ "customer_name": "customerName",
46
+ "outstanding_balances_by_currency": "outstandingBalancesByCurrency",
47
+ });
48
+ });
49
+
50
+ /** @internal */
51
+ export type OutstandingBalance$Outbound = {
52
+ customer_id?: string | undefined;
53
+ customer_name?: string | undefined;
54
+ outstanding_balances_by_currency?:
55
+ | Array<OutstandingBalanceByCurrency$Outbound>
56
+ | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const OutstandingBalance$outboundSchema: z.ZodType<
61
+ OutstandingBalance$Outbound,
62
+ z.ZodTypeDef,
63
+ OutstandingBalance
64
+ > = z.object({
65
+ customerId: z.string().optional(),
66
+ customerName: z.string().optional(),
67
+ outstandingBalancesByCurrency: z.array(
68
+ OutstandingBalanceByCurrency$outboundSchema,
69
+ ).optional(),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ customerId: "customer_id",
73
+ customerName: "customer_name",
74
+ outstandingBalancesByCurrency: "outstanding_balances_by_currency",
75
+ });
76
+ });
77
+
78
+ /**
79
+ * @internal
80
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
+ */
82
+ export namespace OutstandingBalance$ {
83
+ /** @deprecated use `OutstandingBalance$inboundSchema` instead. */
84
+ export const inboundSchema = OutstandingBalance$inboundSchema;
85
+ /** @deprecated use `OutstandingBalance$outboundSchema` instead. */
86
+ export const outboundSchema = OutstandingBalance$outboundSchema;
87
+ /** @deprecated use `OutstandingBalance$Outbound` instead. */
88
+ export type Outbound = OutstandingBalance$Outbound;
89
+ }
90
+
91
+ export function outstandingBalanceToJSON(
92
+ outstandingBalance: OutstandingBalance,
93
+ ): string {
94
+ return JSON.stringify(
95
+ OutstandingBalance$outboundSchema.parse(outstandingBalance),
96
+ );
97
+ }
98
+
99
+ export function outstandingBalanceFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<OutstandingBalance, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => OutstandingBalance$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'OutstandingBalance' from JSON`,
106
+ );
107
+ }
@@ -0,0 +1,95 @@
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
+ BalanceByPeriod,
12
+ BalanceByPeriod$inboundSchema,
13
+ BalanceByPeriod$Outbound,
14
+ BalanceByPeriod$outboundSchema,
15
+ } from "./balancebyperiod.js";
16
+ import {
17
+ Currency,
18
+ Currency$inboundSchema,
19
+ Currency$outboundSchema,
20
+ } from "./currency.js";
21
+
22
+ export type OutstandingBalanceByCurrency = {
23
+ /**
24
+ * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
25
+ */
26
+ currency?: Currency | null | undefined;
27
+ balancesByPeriod?: Array<BalanceByPeriod> | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const OutstandingBalanceByCurrency$inboundSchema: z.ZodType<
32
+ OutstandingBalanceByCurrency,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ currency: z.nullable(Currency$inboundSchema).optional(),
37
+ balances_by_period: z.array(BalanceByPeriod$inboundSchema).optional(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "balances_by_period": "balancesByPeriod",
41
+ });
42
+ });
43
+
44
+ /** @internal */
45
+ export type OutstandingBalanceByCurrency$Outbound = {
46
+ currency?: string | null | undefined;
47
+ balances_by_period?: Array<BalanceByPeriod$Outbound> | undefined;
48
+ };
49
+
50
+ /** @internal */
51
+ export const OutstandingBalanceByCurrency$outboundSchema: z.ZodType<
52
+ OutstandingBalanceByCurrency$Outbound,
53
+ z.ZodTypeDef,
54
+ OutstandingBalanceByCurrency
55
+ > = z.object({
56
+ currency: z.nullable(Currency$outboundSchema).optional(),
57
+ balancesByPeriod: z.array(BalanceByPeriod$outboundSchema).optional(),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ balancesByPeriod: "balances_by_period",
61
+ });
62
+ });
63
+
64
+ /**
65
+ * @internal
66
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
67
+ */
68
+ export namespace OutstandingBalanceByCurrency$ {
69
+ /** @deprecated use `OutstandingBalanceByCurrency$inboundSchema` instead. */
70
+ export const inboundSchema = OutstandingBalanceByCurrency$inboundSchema;
71
+ /** @deprecated use `OutstandingBalanceByCurrency$outboundSchema` instead. */
72
+ export const outboundSchema = OutstandingBalanceByCurrency$outboundSchema;
73
+ /** @deprecated use `OutstandingBalanceByCurrency$Outbound` instead. */
74
+ export type Outbound = OutstandingBalanceByCurrency$Outbound;
75
+ }
76
+
77
+ export function outstandingBalanceByCurrencyToJSON(
78
+ outstandingBalanceByCurrency: OutstandingBalanceByCurrency,
79
+ ): string {
80
+ return JSON.stringify(
81
+ OutstandingBalanceByCurrency$outboundSchema.parse(
82
+ outstandingBalanceByCurrency,
83
+ ),
84
+ );
85
+ }
86
+
87
+ export function outstandingBalanceByCurrencyFromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<OutstandingBalanceByCurrency, SDKValidationError> {
90
+ return safeParse(
91
+ jsonString,
92
+ (x) => OutstandingBalanceByCurrency$inboundSchema.parse(JSON.parse(x)),
93
+ `Failed to parse 'OutstandingBalanceByCurrency' from JSON`,
94
+ );
95
+ }