@apideck/unify 0.13.1 → 0.13.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 (54) hide show
  1. package/docs/sdks/agedcreditors/README.md +2 -0
  2. package/docs/sdks/ageddebtors/README.md +2 -0
  3. package/lib/config.d.ts +2 -2
  4. package/lib/config.js +2 -2
  5. package/models/components/agedcreditors.d.ts +3 -3
  6. package/models/components/agedcreditors.d.ts.map +1 -1
  7. package/models/components/agedcreditors.js +5 -3
  8. package/models/components/agedcreditors.js.map +1 -1
  9. package/models/components/ageddebtors.d.ts +3 -3
  10. package/models/components/ageddebtors.d.ts.map +1 -1
  11. package/models/components/ageddebtors.js +5 -3
  12. package/models/components/ageddebtors.js.map +1 -1
  13. package/models/components/agedreportfilter.d.ts +5 -0
  14. package/models/components/agedreportfilter.d.ts.map +1 -1
  15. package/models/components/agedreportfilter.js +4 -0
  16. package/models/components/agedreportfilter.js.map +1 -1
  17. package/models/components/balancebyperiod.d.ts +6 -6
  18. package/models/components/balancebyperiod.d.ts.map +1 -1
  19. package/models/components/balancebyperiod.js +6 -4
  20. package/models/components/balancebyperiod.js.map +1 -1
  21. package/models/components/balancebytransaction.d.ts +8 -3
  22. package/models/components/balancebytransaction.d.ts.map +1 -1
  23. package/models/components/balancebytransaction.js +5 -1
  24. package/models/components/balancebytransaction.js.map +1 -1
  25. package/models/components/index.d.ts +2 -1
  26. package/models/components/index.d.ts.map +1 -1
  27. package/models/components/index.js +2 -1
  28. package/models/components/index.js.map +1 -1
  29. package/models/components/outstandingbalancebycurrency.d.ts +5 -0
  30. package/models/components/outstandingbalancebycurrency.d.ts.map +1 -1
  31. package/models/components/outstandingbalancebycurrency.js +4 -0
  32. package/models/components/outstandingbalancebycurrency.js.map +1 -1
  33. package/models/components/outstandingbalancebycustomer.d.ts +40 -0
  34. package/models/components/outstandingbalancebycustomer.d.ts.map +1 -0
  35. package/models/components/{outstandingbalance.js → outstandingbalancebycustomer.js} +17 -17
  36. package/models/components/outstandingbalancebycustomer.js.map +1 -0
  37. package/models/components/outstandingbalancebysupplier.d.ts +40 -0
  38. package/models/components/outstandingbalancebysupplier.d.ts.map +1 -0
  39. package/models/components/outstandingbalancebysupplier.js +77 -0
  40. package/models/components/outstandingbalancebysupplier.js.map +1 -0
  41. package/package.json +1 -1
  42. package/src/lib/config.ts +2 -2
  43. package/src/models/components/agedcreditors.ts +13 -9
  44. package/src/models/components/ageddebtors.ts +13 -9
  45. package/src/models/components/agedreportfilter.ts +9 -0
  46. package/src/models/components/balancebyperiod.ts +12 -10
  47. package/src/models/components/balancebytransaction.ts +10 -1
  48. package/src/models/components/index.ts +2 -1
  49. package/src/models/components/outstandingbalancebycurrency.ts +9 -0
  50. package/src/models/components/{outstandingbalance.ts → outstandingbalancebycustomer.ts} +25 -23
  51. package/src/models/components/outstandingbalancebysupplier.ts +109 -0
  52. package/models/components/outstandingbalance.d.ts +0 -40
  53. package/models/components/outstandingbalance.d.ts.map +0 -1
  54. package/models/components/outstandingbalance.js.map +0 -1
@@ -24,6 +24,10 @@ export type OutstandingBalanceByCurrency = {
24
24
  * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
25
25
  */
26
26
  currency?: Currency | null | undefined;
27
+ /**
28
+ * Total amount of the outstanding balance.
29
+ */
30
+ totalAmount?: number | undefined;
27
31
  balancesByPeriod?: Array<BalanceByPeriod> | undefined;
28
32
  };
29
33
 
@@ -34,9 +38,11 @@ export const OutstandingBalanceByCurrency$inboundSchema: z.ZodType<
34
38
  unknown
35
39
  > = z.object({
36
40
  currency: z.nullable(Currency$inboundSchema).optional(),
41
+ total_amount: z.number().optional(),
37
42
  balances_by_period: z.array(BalanceByPeriod$inboundSchema).optional(),
38
43
  }).transform((v) => {
39
44
  return remap$(v, {
45
+ "total_amount": "totalAmount",
40
46
  "balances_by_period": "balancesByPeriod",
41
47
  });
42
48
  });
@@ -44,6 +50,7 @@ export const OutstandingBalanceByCurrency$inboundSchema: z.ZodType<
44
50
  /** @internal */
45
51
  export type OutstandingBalanceByCurrency$Outbound = {
46
52
  currency?: string | null | undefined;
53
+ total_amount?: number | undefined;
47
54
  balances_by_period?: Array<BalanceByPeriod$Outbound> | undefined;
48
55
  };
49
56
 
@@ -54,9 +61,11 @@ export const OutstandingBalanceByCurrency$outboundSchema: z.ZodType<
54
61
  OutstandingBalanceByCurrency
55
62
  > = z.object({
56
63
  currency: z.nullable(Currency$outboundSchema).optional(),
64
+ totalAmount: z.number().optional(),
57
65
  balancesByPeriod: z.array(BalanceByPeriod$outboundSchema).optional(),
58
66
  }).transform((v) => {
59
67
  return remap$(v, {
68
+ totalAmount: "total_amount",
60
69
  balancesByPeriod: "balances_by_period",
61
70
  });
62
71
  });
@@ -14,13 +14,13 @@ import {
14
14
  OutstandingBalanceByCurrency$outboundSchema,
15
15
  } from "./outstandingbalancebycurrency.js";
16
16
 
17
- export type OutstandingBalance = {
17
+ export type OutstandingBalanceByCustomer = {
18
18
  /**
19
- * Unique identifier for the customer or supplier.
19
+ * Unique identifier for the customer.
20
20
  */
21
21
  customerId?: string | undefined;
22
22
  /**
23
- * Full name of the customer or supplier.
23
+ * Full name of the customer.
24
24
  */
25
25
  customerName?: string | undefined;
26
26
  outstandingBalancesByCurrency?:
@@ -29,8 +29,8 @@ export type OutstandingBalance = {
29
29
  };
30
30
 
31
31
  /** @internal */
32
- export const OutstandingBalance$inboundSchema: z.ZodType<
33
- OutstandingBalance,
32
+ export const OutstandingBalanceByCustomer$inboundSchema: z.ZodType<
33
+ OutstandingBalanceByCustomer,
34
34
  z.ZodTypeDef,
35
35
  unknown
36
36
  > = z.object({
@@ -48,7 +48,7 @@ export const OutstandingBalance$inboundSchema: z.ZodType<
48
48
  });
49
49
 
50
50
  /** @internal */
51
- export type OutstandingBalance$Outbound = {
51
+ export type OutstandingBalanceByCustomer$Outbound = {
52
52
  customer_id?: string | undefined;
53
53
  customer_name?: string | undefined;
54
54
  outstanding_balances_by_currency?:
@@ -57,10 +57,10 @@ export type OutstandingBalance$Outbound = {
57
57
  };
58
58
 
59
59
  /** @internal */
60
- export const OutstandingBalance$outboundSchema: z.ZodType<
61
- OutstandingBalance$Outbound,
60
+ export const OutstandingBalanceByCustomer$outboundSchema: z.ZodType<
61
+ OutstandingBalanceByCustomer$Outbound,
62
62
  z.ZodTypeDef,
63
- OutstandingBalance
63
+ OutstandingBalanceByCustomer
64
64
  > = z.object({
65
65
  customerId: z.string().optional(),
66
66
  customerName: z.string().optional(),
@@ -79,29 +79,31 @@ export const OutstandingBalance$outboundSchema: z.ZodType<
79
79
  * @internal
80
80
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
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;
82
+ export namespace OutstandingBalanceByCustomer$ {
83
+ /** @deprecated use `OutstandingBalanceByCustomer$inboundSchema` instead. */
84
+ export const inboundSchema = OutstandingBalanceByCustomer$inboundSchema;
85
+ /** @deprecated use `OutstandingBalanceByCustomer$outboundSchema` instead. */
86
+ export const outboundSchema = OutstandingBalanceByCustomer$outboundSchema;
87
+ /** @deprecated use `OutstandingBalanceByCustomer$Outbound` instead. */
88
+ export type Outbound = OutstandingBalanceByCustomer$Outbound;
89
89
  }
90
90
 
91
- export function outstandingBalanceToJSON(
92
- outstandingBalance: OutstandingBalance,
91
+ export function outstandingBalanceByCustomerToJSON(
92
+ outstandingBalanceByCustomer: OutstandingBalanceByCustomer,
93
93
  ): string {
94
94
  return JSON.stringify(
95
- OutstandingBalance$outboundSchema.parse(outstandingBalance),
95
+ OutstandingBalanceByCustomer$outboundSchema.parse(
96
+ outstandingBalanceByCustomer,
97
+ ),
96
98
  );
97
99
  }
98
100
 
99
- export function outstandingBalanceFromJSON(
101
+ export function outstandingBalanceByCustomerFromJSON(
100
102
  jsonString: string,
101
- ): SafeParseResult<OutstandingBalance, SDKValidationError> {
103
+ ): SafeParseResult<OutstandingBalanceByCustomer, SDKValidationError> {
102
104
  return safeParse(
103
105
  jsonString,
104
- (x) => OutstandingBalance$inboundSchema.parse(JSON.parse(x)),
105
- `Failed to parse 'OutstandingBalance' from JSON`,
106
+ (x) => OutstandingBalanceByCustomer$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'OutstandingBalanceByCustomer' from JSON`,
106
108
  );
107
109
  }
@@ -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 { 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 OutstandingBalanceBySupplier = {
18
+ /**
19
+ * Unique identifier for the supplier.
20
+ */
21
+ supplierId?: string | undefined;
22
+ /**
23
+ * Full name of the supplier.
24
+ */
25
+ supplierName?: string | undefined;
26
+ outstandingBalancesByCurrency?:
27
+ | Array<OutstandingBalanceByCurrency>
28
+ | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const OutstandingBalanceBySupplier$inboundSchema: z.ZodType<
33
+ OutstandingBalanceBySupplier,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ supplier_id: z.string().optional(),
38
+ supplier_name: z.string().optional(),
39
+ outstanding_balances_by_currency: z.array(
40
+ OutstandingBalanceByCurrency$inboundSchema,
41
+ ).optional(),
42
+ }).transform((v) => {
43
+ return remap$(v, {
44
+ "supplier_id": "supplierId",
45
+ "supplier_name": "supplierName",
46
+ "outstanding_balances_by_currency": "outstandingBalancesByCurrency",
47
+ });
48
+ });
49
+
50
+ /** @internal */
51
+ export type OutstandingBalanceBySupplier$Outbound = {
52
+ supplier_id?: string | undefined;
53
+ supplier_name?: string | undefined;
54
+ outstanding_balances_by_currency?:
55
+ | Array<OutstandingBalanceByCurrency$Outbound>
56
+ | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const OutstandingBalanceBySupplier$outboundSchema: z.ZodType<
61
+ OutstandingBalanceBySupplier$Outbound,
62
+ z.ZodTypeDef,
63
+ OutstandingBalanceBySupplier
64
+ > = z.object({
65
+ supplierId: z.string().optional(),
66
+ supplierName: z.string().optional(),
67
+ outstandingBalancesByCurrency: z.array(
68
+ OutstandingBalanceByCurrency$outboundSchema,
69
+ ).optional(),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ supplierId: "supplier_id",
73
+ supplierName: "supplier_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 OutstandingBalanceBySupplier$ {
83
+ /** @deprecated use `OutstandingBalanceBySupplier$inboundSchema` instead. */
84
+ export const inboundSchema = OutstandingBalanceBySupplier$inboundSchema;
85
+ /** @deprecated use `OutstandingBalanceBySupplier$outboundSchema` instead. */
86
+ export const outboundSchema = OutstandingBalanceBySupplier$outboundSchema;
87
+ /** @deprecated use `OutstandingBalanceBySupplier$Outbound` instead. */
88
+ export type Outbound = OutstandingBalanceBySupplier$Outbound;
89
+ }
90
+
91
+ export function outstandingBalanceBySupplierToJSON(
92
+ outstandingBalanceBySupplier: OutstandingBalanceBySupplier,
93
+ ): string {
94
+ return JSON.stringify(
95
+ OutstandingBalanceBySupplier$outboundSchema.parse(
96
+ outstandingBalanceBySupplier,
97
+ ),
98
+ );
99
+ }
100
+
101
+ export function outstandingBalanceBySupplierFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<OutstandingBalanceBySupplier, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) => OutstandingBalanceBySupplier$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'OutstandingBalanceBySupplier' from JSON`,
108
+ );
109
+ }
@@ -1,40 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { OutstandingBalanceByCurrency, OutstandingBalanceByCurrency$Outbound } from "./outstandingbalancebycurrency.js";
5
- export type OutstandingBalance = {
6
- /**
7
- * Unique identifier for the customer or supplier.
8
- */
9
- customerId?: string | undefined;
10
- /**
11
- * Full name of the customer or supplier.
12
- */
13
- customerName?: string | undefined;
14
- outstandingBalancesByCurrency?: Array<OutstandingBalanceByCurrency> | undefined;
15
- };
16
- /** @internal */
17
- export declare const OutstandingBalance$inboundSchema: z.ZodType<OutstandingBalance, z.ZodTypeDef, unknown>;
18
- /** @internal */
19
- export type OutstandingBalance$Outbound = {
20
- customer_id?: string | undefined;
21
- customer_name?: string | undefined;
22
- outstanding_balances_by_currency?: Array<OutstandingBalanceByCurrency$Outbound> | undefined;
23
- };
24
- /** @internal */
25
- export declare const OutstandingBalance$outboundSchema: z.ZodType<OutstandingBalance$Outbound, z.ZodTypeDef, OutstandingBalance>;
26
- /**
27
- * @internal
28
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
29
- */
30
- export declare namespace OutstandingBalance$ {
31
- /** @deprecated use `OutstandingBalance$inboundSchema` instead. */
32
- const inboundSchema: z.ZodType<OutstandingBalance, z.ZodTypeDef, unknown>;
33
- /** @deprecated use `OutstandingBalance$outboundSchema` instead. */
34
- const outboundSchema: z.ZodType<OutstandingBalance$Outbound, z.ZodTypeDef, OutstandingBalance>;
35
- /** @deprecated use `OutstandingBalance$Outbound` instead. */
36
- type Outbound = OutstandingBalance$Outbound;
37
- }
38
- export declare function outstandingBalanceToJSON(outstandingBalance: OutstandingBalance): string;
39
- export declare function outstandingBalanceFromJSON(jsonString: string): SafeParseResult<OutstandingBalance, SDKValidationError>;
40
- //# sourceMappingURL=outstandingbalance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"outstandingbalance.d.ts","sourceRoot":"","sources":["../../src/models/components/outstandingbalance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,4BAA4B,EAE5B,qCAAqC,EAEtC,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,6BAA6B,CAAC,EAC1B,KAAK,CAAC,4BAA4B,CAAC,GACnC,SAAS,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,gCAAgC,CAAC,EAC7B,KAAK,CAAC,qCAAqC,CAAC,GAC5C,SAAS,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAalB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,mBAAmB,CAAC;IACnC,kEAAkE;IAC3D,MAAM,aAAa,sDAAmC,CAAC;IAC9D,mEAAmE;IAC5D,MAAM,cAAc,0EAAoC,CAAC;IAChE,6DAA6D;IAC7D,KAAY,QAAQ,GAAG,2BAA2B,CAAC;CACpD;AAED,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"outstandingbalance.js","sourceRoot":"","sources":["../../src/models/components/outstandingbalance.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFH,4DAMC;AAED,gEAQC;AAtGD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,uFAK2C;AAgB3C,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,gCAAgC,EAAE,CAAC,CAAC,KAAK,CACvC,4EAA0C,CAC3C,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,aAAa,EAAE,YAAY;QAC3B,eAAe,EAAE,cAAc;QAC/B,kCAAkC,EAAE,+BAA+B;KACpE,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAWH,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,6BAA6B,EAAE,CAAC,CAAC,KAAK,CACpC,6EAA2C,CAC5C,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,YAAY,EAAE,eAAe;QAC7B,6BAA6B,EAAE,kCAAkC;KAClE,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,mBAAmB,CAOnC;AAPD,WAAiB,mBAAmB;IAClC,kEAAkE;IACrD,iCAAa,GAAG,wCAAgC,CAAC;IAC9D,mEAAmE;IACtD,kCAAc,GAAG,yCAAiC,CAAC;AAGlE,CAAC,EAPgB,mBAAmB,mCAAnB,mBAAmB,QAOnC;AAED,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,SAAgB,0BAA0B,CACxC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}