@moovio/sdk 0.0.0-dev.5 → 0.0.0-dev.7

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 (210) hide show
  1. package/README.md +115 -55
  2. package/bin/mcp-server.js +1792 -876
  3. package/bin/mcp-server.js.map +43 -27
  4. package/funcs/disputesUploadEvidenceFile.js +6 -0
  5. package/funcs/disputesUploadEvidenceFile.js.map +1 -1
  6. package/funcs/filesUpload.js +6 -0
  7. package/funcs/filesUpload.js.map +1 -1
  8. package/funcs/imagesUpdate.js +7 -0
  9. package/funcs/imagesUpdate.js.map +1 -1
  10. package/funcs/imagesUpload.js +7 -0
  11. package/funcs/imagesUpload.js.map +1 -1
  12. package/funcs/invoicesDelete.d.ts +24 -0
  13. package/funcs/invoicesDelete.d.ts.map +1 -0
  14. package/funcs/invoicesDelete.js +146 -0
  15. package/funcs/invoicesDelete.js.map +1 -0
  16. package/funcs/resolutionLinksCreate.d.ts +20 -0
  17. package/funcs/resolutionLinksCreate.d.ts.map +1 -0
  18. package/funcs/resolutionLinksCreate.js +145 -0
  19. package/funcs/resolutionLinksCreate.js.map +1 -0
  20. package/funcs/resolutionLinksDisable.d.ts +18 -0
  21. package/funcs/resolutionLinksDisable.d.ts.map +1 -0
  22. package/funcs/resolutionLinksDisable.js +135 -0
  23. package/funcs/resolutionLinksDisable.js.map +1 -0
  24. package/funcs/resolutionLinksGet.d.ts +17 -0
  25. package/funcs/resolutionLinksGet.d.ts.map +1 -0
  26. package/funcs/resolutionLinksGet.js +126 -0
  27. package/funcs/resolutionLinksGet.js.map +1 -0
  28. package/funcs/resolutionLinksList.d.ts +17 -0
  29. package/funcs/resolutionLinksList.d.ts.map +1 -0
  30. package/funcs/resolutionLinksList.js +125 -0
  31. package/funcs/resolutionLinksList.js.map +1 -0
  32. package/hooks/moov-version-hook.d.ts +3 -4
  33. package/hooks/moov-version-hook.d.ts.map +1 -1
  34. package/hooks/moov-version-hook.js +5 -4
  35. package/hooks/moov-version-hook.js.map +1 -1
  36. package/hooks/registration.js +1 -1
  37. package/hooks/registration.js.map +1 -1
  38. package/jsr.json +1 -1
  39. package/lib/config.d.ts +3 -3
  40. package/lib/config.js +3 -3
  41. package/lib/config.js.map +1 -1
  42. package/lib/matchers.d.ts.map +1 -1
  43. package/lib/matchers.js +0 -1
  44. package/lib/matchers.js.map +1 -1
  45. package/lib/security.d.ts.map +1 -1
  46. package/lib/security.js +1 -2
  47. package/lib/security.js.map +1 -1
  48. package/mcp-server/mcp-server.js +1 -1
  49. package/mcp-server/server.d.ts.map +1 -1
  50. package/mcp-server/server.js +11 -1
  51. package/mcp-server/server.js.map +1 -1
  52. package/mcp-server/shared.js +1 -1
  53. package/mcp-server/shared.js.map +1 -1
  54. package/mcp-server/tools/invoicesDelete.d.ts +8 -0
  55. package/mcp-server/tools/invoicesDelete.d.ts.map +1 -0
  56. package/mcp-server/tools/invoicesDelete.js +70 -0
  57. package/mcp-server/tools/invoicesDelete.js.map +1 -0
  58. package/mcp-server/tools/resolutionLinksCreate.d.ts +8 -0
  59. package/mcp-server/tools/resolutionLinksCreate.d.ts.map +1 -0
  60. package/mcp-server/tools/resolutionLinksCreate.js +67 -0
  61. package/mcp-server/tools/resolutionLinksCreate.js.map +1 -0
  62. package/mcp-server/tools/resolutionLinksDisable.d.ts +8 -0
  63. package/mcp-server/tools/resolutionLinksDisable.d.ts.map +1 -0
  64. package/mcp-server/tools/resolutionLinksDisable.js +64 -0
  65. package/mcp-server/tools/resolutionLinksDisable.js.map +1 -0
  66. package/mcp-server/tools/resolutionLinksGet.d.ts +8 -0
  67. package/mcp-server/tools/resolutionLinksGet.d.ts.map +1 -0
  68. package/mcp-server/tools/resolutionLinksGet.js +65 -0
  69. package/mcp-server/tools/resolutionLinksGet.js.map +1 -0
  70. package/mcp-server/tools/resolutionLinksList.d.ts +8 -0
  71. package/mcp-server/tools/resolutionLinksList.d.ts.map +1 -0
  72. package/mcp-server/tools/resolutionLinksList.js +65 -0
  73. package/mcp-server/tools/resolutionLinksList.js.map +1 -0
  74. package/models/components/createinvoicelineitem.d.ts +2 -1
  75. package/models/components/createinvoicelineitem.d.ts.map +1 -1
  76. package/models/components/createinvoicelineitem.js.map +1 -1
  77. package/models/components/createpaymentlinklineitem.d.ts +2 -1
  78. package/models/components/createpaymentlinklineitem.d.ts.map +1 -1
  79. package/models/components/createpaymentlinklineitem.js.map +1 -1
  80. package/models/components/createresolutionlink.d.ts +24 -0
  81. package/models/components/createresolutionlink.d.ts.map +1 -0
  82. package/models/components/{rtpfailurecode.js → createresolutionlink.js} +18 -19
  83. package/models/components/createresolutionlink.js.map +1 -0
  84. package/models/components/index.d.ts +3 -3
  85. package/models/components/index.d.ts.map +1 -1
  86. package/models/components/index.js +3 -3
  87. package/models/components/index.js.map +1 -1
  88. package/models/components/invoice.d.ts +12 -0
  89. package/models/components/invoice.d.ts.map +1 -1
  90. package/models/components/invoice.js +6 -0
  91. package/models/components/invoice.js.map +1 -1
  92. package/models/components/invoicelineitem.d.ts +2 -1
  93. package/models/components/invoicelineitem.d.ts.map +1 -1
  94. package/models/components/invoicelineitem.js.map +1 -1
  95. package/models/components/resolutionlink.d.ts +63 -0
  96. package/models/components/resolutionlink.d.ts.map +1 -0
  97. package/models/components/resolutionlink.js +75 -0
  98. package/models/components/resolutionlink.js.map +1 -0
  99. package/models/components/resolutionlinkrecipient.d.ts +29 -0
  100. package/models/components/resolutionlinkrecipient.d.ts.map +1 -0
  101. package/models/components/{rtptransactionstatus.js → resolutionlinkrecipient.js} +20 -13
  102. package/models/components/resolutionlinkrecipient.js.map +1 -0
  103. package/models/components/transferdestination.d.ts +0 -6
  104. package/models/components/transferdestination.d.ts.map +1 -1
  105. package/models/components/transferdestination.js +0 -3
  106. package/models/components/transferdestination.js.map +1 -1
  107. package/models/components/updateinvoice.d.ts +4 -1
  108. package/models/components/updateinvoice.d.ts.map +1 -1
  109. package/models/components/updateinvoice.js.map +1 -1
  110. package/models/errors/createresolutionlinkerror.d.ts +45 -0
  111. package/models/errors/createresolutionlinkerror.d.ts.map +1 -0
  112. package/models/errors/createresolutionlinkerror.js +82 -0
  113. package/models/errors/createresolutionlinkerror.js.map +1 -0
  114. package/models/errors/index.d.ts +1 -0
  115. package/models/errors/index.d.ts.map +1 -1
  116. package/models/errors/index.js +1 -0
  117. package/models/errors/index.js.map +1 -1
  118. package/models/operations/createresolutionlink.d.ts +66 -0
  119. package/models/operations/createresolutionlink.d.ts.map +1 -0
  120. package/models/operations/createresolutionlink.js +122 -0
  121. package/models/operations/createresolutionlink.js.map +1 -0
  122. package/models/operations/deleteinvoice.d.ts +63 -0
  123. package/models/operations/deleteinvoice.d.ts.map +1 -0
  124. package/models/operations/deleteinvoice.js +109 -0
  125. package/models/operations/deleteinvoice.js.map +1 -0
  126. package/models/operations/disableresolutionlink.d.ts +63 -0
  127. package/models/operations/disableresolutionlink.d.ts.map +1 -0
  128. package/models/operations/disableresolutionlink.js +109 -0
  129. package/models/operations/disableresolutionlink.js.map +1 -0
  130. package/models/operations/getresolutionlink.d.ts +66 -0
  131. package/models/operations/getresolutionlink.d.ts.map +1 -0
  132. package/models/operations/getresolutionlink.js +114 -0
  133. package/models/operations/getresolutionlink.js.map +1 -0
  134. package/models/operations/index.d.ts +5 -0
  135. package/models/operations/index.d.ts.map +1 -1
  136. package/models/operations/index.js +5 -0
  137. package/models/operations/index.js.map +1 -1
  138. package/models/operations/listresolutionlinks.d.ts +64 -0
  139. package/models/operations/listresolutionlinks.d.ts.map +1 -0
  140. package/models/operations/listresolutionlinks.js +112 -0
  141. package/models/operations/listresolutionlinks.js.map +1 -0
  142. package/package.json +1 -1
  143. package/sdk/invoices.d.ts +13 -0
  144. package/sdk/invoices.d.ts.map +1 -1
  145. package/sdk/invoices.js +16 -0
  146. package/sdk/invoices.js.map +1 -1
  147. package/sdk/resolutionlinks.d.ts +35 -0
  148. package/sdk/resolutionlinks.d.ts.map +1 -0
  149. package/sdk/resolutionlinks.js +54 -0
  150. package/sdk/resolutionlinks.js.map +1 -0
  151. package/sdk/sdk.d.ts +3 -0
  152. package/sdk/sdk.d.ts.map +1 -1
  153. package/sdk/sdk.js +4 -0
  154. package/sdk/sdk.js.map +1 -1
  155. package/src/funcs/disputesUploadEvidenceFile.ts +15 -0
  156. package/src/funcs/filesUpload.ts +15 -0
  157. package/src/funcs/imagesUpdate.ts +16 -0
  158. package/src/funcs/imagesUpload.ts +16 -0
  159. package/src/funcs/invoicesDelete.ts +206 -0
  160. package/src/funcs/resolutionLinksCreate.ts +208 -0
  161. package/src/funcs/resolutionLinksDisable.ts +204 -0
  162. package/src/funcs/resolutionLinksGet.ts +186 -0
  163. package/src/funcs/resolutionLinksList.ts +180 -0
  164. package/src/hooks/moov-version-hook.ts +10 -6
  165. package/src/hooks/registration.ts +1 -1
  166. package/src/lib/config.ts +3 -3
  167. package/src/lib/matchers.ts +3 -2
  168. package/src/lib/security.ts +1 -2
  169. package/src/mcp-server/mcp-server.ts +1 -1
  170. package/src/mcp-server/server.ts +11 -1
  171. package/src/mcp-server/shared.ts +2 -2
  172. package/src/mcp-server/tools/invoicesDelete.ts +43 -0
  173. package/src/mcp-server/tools/resolutionLinksCreate.ts +41 -0
  174. package/src/mcp-server/tools/resolutionLinksDisable.ts +37 -0
  175. package/src/mcp-server/tools/resolutionLinksGet.ts +38 -0
  176. package/src/mcp-server/tools/resolutionLinksList.ts +38 -0
  177. package/src/models/components/createinvoicelineitem.ts +2 -1
  178. package/src/models/components/createpaymentlinklineitem.ts +2 -1
  179. package/src/models/components/createresolutionlink.ts +63 -0
  180. package/src/models/components/index.ts +3 -3
  181. package/src/models/components/invoice.ts +20 -0
  182. package/src/models/components/invoicelineitem.ts +2 -1
  183. package/src/models/components/resolutionlink.ts +110 -0
  184. package/src/models/components/resolutionlinkrecipient.ts +70 -0
  185. package/src/models/components/transferdestination.ts +0 -13
  186. package/src/models/components/updateinvoice.ts +4 -1
  187. package/src/models/errors/createresolutionlinkerror.ts +90 -0
  188. package/src/models/errors/index.ts +1 -0
  189. package/src/models/operations/createresolutionlink.ts +193 -0
  190. package/src/models/operations/deleteinvoice.ts +172 -0
  191. package/src/models/operations/disableresolutionlink.ts +178 -0
  192. package/src/models/operations/getresolutionlink.ts +179 -0
  193. package/src/models/operations/index.ts +5 -0
  194. package/src/models/operations/listresolutionlinks.ts +177 -0
  195. package/src/sdk/invoices.ts +24 -0
  196. package/src/sdk/resolutionlinks.ts +83 -0
  197. package/src/sdk/sdk.ts +6 -0
  198. package/models/components/rtpfailurecode.d.ts +0 -26
  199. package/models/components/rtpfailurecode.d.ts.map +0 -1
  200. package/models/components/rtpfailurecode.js.map +0 -1
  201. package/models/components/rtptransactiondetails.d.ts +0 -43
  202. package/models/components/rtptransactiondetails.d.ts.map +0 -1
  203. package/models/components/rtptransactiondetails.js +0 -75
  204. package/models/components/rtptransactiondetails.js.map +0 -1
  205. package/models/components/rtptransactionstatus.d.ts +0 -20
  206. package/models/components/rtptransactionstatus.d.ts.map +0 -1
  207. package/models/components/rtptransactionstatus.js.map +0 -1
  208. package/src/models/components/rtpfailurecode.ts +0 -35
  209. package/src/models/components/rtptransactiondetails.ts +0 -102
  210. package/src/models/components/rtptransactionstatus.ts +0 -29
@@ -0,0 +1,193 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type CreateResolutionLinkGlobals = {
13
+ /**
14
+ * Specify an API version.
15
+ *
16
+ * @remarks
17
+ *
18
+ * API versioning follows the format `vYYYY.QQ.BB`, where
19
+ * - `YYYY` is the year
20
+ * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
21
+ * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
22
+ * - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
23
+ *
24
+ * The `dev` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
25
+ * When no version is specified, the API defaults to `v2024.01.00`.
26
+ */
27
+ xMoovVersion?: string | undefined;
28
+ };
29
+
30
+ export type CreateResolutionLinkRequest = {
31
+ accountID: string;
32
+ createResolutionLink: components.CreateResolutionLink;
33
+ };
34
+
35
+ export type CreateResolutionLinkResponse = {
36
+ headers: { [k: string]: Array<string> };
37
+ result: components.ResolutionLink;
38
+ };
39
+
40
+ /** @internal */
41
+ export const CreateResolutionLinkGlobals$inboundSchema: z.ZodType<
42
+ CreateResolutionLinkGlobals,
43
+ z.ZodTypeDef,
44
+ unknown
45
+ > = z.object({
46
+ "X-Moov-Version": z.string().optional(),
47
+ }).transform((v) => {
48
+ return remap$(v, {
49
+ "X-Moov-Version": "xMoovVersion",
50
+ });
51
+ });
52
+ /** @internal */
53
+ export type CreateResolutionLinkGlobals$Outbound = {
54
+ "X-Moov-Version"?: string | undefined;
55
+ };
56
+
57
+ /** @internal */
58
+ export const CreateResolutionLinkGlobals$outboundSchema: z.ZodType<
59
+ CreateResolutionLinkGlobals$Outbound,
60
+ z.ZodTypeDef,
61
+ CreateResolutionLinkGlobals
62
+ > = z.object({
63
+ xMoovVersion: z.string().optional(),
64
+ }).transform((v) => {
65
+ return remap$(v, {
66
+ xMoovVersion: "X-Moov-Version",
67
+ });
68
+ });
69
+
70
+ export function createResolutionLinkGlobalsToJSON(
71
+ createResolutionLinkGlobals: CreateResolutionLinkGlobals,
72
+ ): string {
73
+ return JSON.stringify(
74
+ CreateResolutionLinkGlobals$outboundSchema.parse(
75
+ createResolutionLinkGlobals,
76
+ ),
77
+ );
78
+ }
79
+ export function createResolutionLinkGlobalsFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<CreateResolutionLinkGlobals, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => CreateResolutionLinkGlobals$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'CreateResolutionLinkGlobals' from JSON`,
86
+ );
87
+ }
88
+
89
+ /** @internal */
90
+ export const CreateResolutionLinkRequest$inboundSchema: z.ZodType<
91
+ CreateResolutionLinkRequest,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = z.object({
95
+ accountID: z.string(),
96
+ CreateResolutionLink: components.CreateResolutionLink$inboundSchema,
97
+ }).transform((v) => {
98
+ return remap$(v, {
99
+ "CreateResolutionLink": "createResolutionLink",
100
+ });
101
+ });
102
+ /** @internal */
103
+ export type CreateResolutionLinkRequest$Outbound = {
104
+ accountID: string;
105
+ CreateResolutionLink: components.CreateResolutionLink$Outbound;
106
+ };
107
+
108
+ /** @internal */
109
+ export const CreateResolutionLinkRequest$outboundSchema: z.ZodType<
110
+ CreateResolutionLinkRequest$Outbound,
111
+ z.ZodTypeDef,
112
+ CreateResolutionLinkRequest
113
+ > = z.object({
114
+ accountID: z.string(),
115
+ createResolutionLink: components.CreateResolutionLink$outboundSchema,
116
+ }).transform((v) => {
117
+ return remap$(v, {
118
+ createResolutionLink: "CreateResolutionLink",
119
+ });
120
+ });
121
+
122
+ export function createResolutionLinkRequestToJSON(
123
+ createResolutionLinkRequest: CreateResolutionLinkRequest,
124
+ ): string {
125
+ return JSON.stringify(
126
+ CreateResolutionLinkRequest$outboundSchema.parse(
127
+ createResolutionLinkRequest,
128
+ ),
129
+ );
130
+ }
131
+ export function createResolutionLinkRequestFromJSON(
132
+ jsonString: string,
133
+ ): SafeParseResult<CreateResolutionLinkRequest, SDKValidationError> {
134
+ return safeParse(
135
+ jsonString,
136
+ (x) => CreateResolutionLinkRequest$inboundSchema.parse(JSON.parse(x)),
137
+ `Failed to parse 'CreateResolutionLinkRequest' from JSON`,
138
+ );
139
+ }
140
+
141
+ /** @internal */
142
+ export const CreateResolutionLinkResponse$inboundSchema: z.ZodType<
143
+ CreateResolutionLinkResponse,
144
+ z.ZodTypeDef,
145
+ unknown
146
+ > = z.object({
147
+ Headers: z.record(z.array(z.string())).default({}),
148
+ Result: components.ResolutionLink$inboundSchema,
149
+ }).transform((v) => {
150
+ return remap$(v, {
151
+ "Headers": "headers",
152
+ "Result": "result",
153
+ });
154
+ });
155
+ /** @internal */
156
+ export type CreateResolutionLinkResponse$Outbound = {
157
+ Headers: { [k: string]: Array<string> };
158
+ Result: components.ResolutionLink$Outbound;
159
+ };
160
+
161
+ /** @internal */
162
+ export const CreateResolutionLinkResponse$outboundSchema: z.ZodType<
163
+ CreateResolutionLinkResponse$Outbound,
164
+ z.ZodTypeDef,
165
+ CreateResolutionLinkResponse
166
+ > = z.object({
167
+ headers: z.record(z.array(z.string())),
168
+ result: components.ResolutionLink$outboundSchema,
169
+ }).transform((v) => {
170
+ return remap$(v, {
171
+ headers: "Headers",
172
+ result: "Result",
173
+ });
174
+ });
175
+
176
+ export function createResolutionLinkResponseToJSON(
177
+ createResolutionLinkResponse: CreateResolutionLinkResponse,
178
+ ): string {
179
+ return JSON.stringify(
180
+ CreateResolutionLinkResponse$outboundSchema.parse(
181
+ createResolutionLinkResponse,
182
+ ),
183
+ );
184
+ }
185
+ export function createResolutionLinkResponseFromJSON(
186
+ jsonString: string,
187
+ ): SafeParseResult<CreateResolutionLinkResponse, SDKValidationError> {
188
+ return safeParse(
189
+ jsonString,
190
+ (x) => CreateResolutionLinkResponse$inboundSchema.parse(JSON.parse(x)),
191
+ `Failed to parse 'CreateResolutionLinkResponse' from JSON`,
192
+ );
193
+ }
@@ -0,0 +1,172 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 DeleteInvoiceGlobals = {
12
+ /**
13
+ * Specify an API version.
14
+ *
15
+ * @remarks
16
+ *
17
+ * API versioning follows the format `vYYYY.QQ.BB`, where
18
+ * - `YYYY` is the year
19
+ * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
20
+ * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
21
+ * - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
22
+ *
23
+ * The `dev` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
24
+ * When no version is specified, the API defaults to `v2024.01.00`.
25
+ */
26
+ xMoovVersion?: string | undefined;
27
+ };
28
+
29
+ export type DeleteInvoiceRequest = {
30
+ accountID: string;
31
+ invoiceID: string;
32
+ };
33
+
34
+ export type DeleteInvoiceResponse = {
35
+ headers: { [k: string]: Array<string> };
36
+ };
37
+
38
+ /** @internal */
39
+ export const DeleteInvoiceGlobals$inboundSchema: z.ZodType<
40
+ DeleteInvoiceGlobals,
41
+ z.ZodTypeDef,
42
+ unknown
43
+ > = z.object({
44
+ "X-Moov-Version": z.string().optional(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ "X-Moov-Version": "xMoovVersion",
48
+ });
49
+ });
50
+ /** @internal */
51
+ export type DeleteInvoiceGlobals$Outbound = {
52
+ "X-Moov-Version"?: string | undefined;
53
+ };
54
+
55
+ /** @internal */
56
+ export const DeleteInvoiceGlobals$outboundSchema: z.ZodType<
57
+ DeleteInvoiceGlobals$Outbound,
58
+ z.ZodTypeDef,
59
+ DeleteInvoiceGlobals
60
+ > = z.object({
61
+ xMoovVersion: z.string().optional(),
62
+ }).transform((v) => {
63
+ return remap$(v, {
64
+ xMoovVersion: "X-Moov-Version",
65
+ });
66
+ });
67
+
68
+ export function deleteInvoiceGlobalsToJSON(
69
+ deleteInvoiceGlobals: DeleteInvoiceGlobals,
70
+ ): string {
71
+ return JSON.stringify(
72
+ DeleteInvoiceGlobals$outboundSchema.parse(deleteInvoiceGlobals),
73
+ );
74
+ }
75
+ export function deleteInvoiceGlobalsFromJSON(
76
+ jsonString: string,
77
+ ): SafeParseResult<DeleteInvoiceGlobals, SDKValidationError> {
78
+ return safeParse(
79
+ jsonString,
80
+ (x) => DeleteInvoiceGlobals$inboundSchema.parse(JSON.parse(x)),
81
+ `Failed to parse 'DeleteInvoiceGlobals' from JSON`,
82
+ );
83
+ }
84
+
85
+ /** @internal */
86
+ export const DeleteInvoiceRequest$inboundSchema: z.ZodType<
87
+ DeleteInvoiceRequest,
88
+ z.ZodTypeDef,
89
+ unknown
90
+ > = z.object({
91
+ accountID: z.string(),
92
+ invoiceID: z.string(),
93
+ });
94
+ /** @internal */
95
+ export type DeleteInvoiceRequest$Outbound = {
96
+ accountID: string;
97
+ invoiceID: string;
98
+ };
99
+
100
+ /** @internal */
101
+ export const DeleteInvoiceRequest$outboundSchema: z.ZodType<
102
+ DeleteInvoiceRequest$Outbound,
103
+ z.ZodTypeDef,
104
+ DeleteInvoiceRequest
105
+ > = z.object({
106
+ accountID: z.string(),
107
+ invoiceID: z.string(),
108
+ });
109
+
110
+ export function deleteInvoiceRequestToJSON(
111
+ deleteInvoiceRequest: DeleteInvoiceRequest,
112
+ ): string {
113
+ return JSON.stringify(
114
+ DeleteInvoiceRequest$outboundSchema.parse(deleteInvoiceRequest),
115
+ );
116
+ }
117
+ export function deleteInvoiceRequestFromJSON(
118
+ jsonString: string,
119
+ ): SafeParseResult<DeleteInvoiceRequest, SDKValidationError> {
120
+ return safeParse(
121
+ jsonString,
122
+ (x) => DeleteInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'DeleteInvoiceRequest' from JSON`,
124
+ );
125
+ }
126
+
127
+ /** @internal */
128
+ export const DeleteInvoiceResponse$inboundSchema: z.ZodType<
129
+ DeleteInvoiceResponse,
130
+ z.ZodTypeDef,
131
+ unknown
132
+ > = z.object({
133
+ Headers: z.record(z.array(z.string())).default({}),
134
+ }).transform((v) => {
135
+ return remap$(v, {
136
+ "Headers": "headers",
137
+ });
138
+ });
139
+ /** @internal */
140
+ export type DeleteInvoiceResponse$Outbound = {
141
+ Headers: { [k: string]: Array<string> };
142
+ };
143
+
144
+ /** @internal */
145
+ export const DeleteInvoiceResponse$outboundSchema: z.ZodType<
146
+ DeleteInvoiceResponse$Outbound,
147
+ z.ZodTypeDef,
148
+ DeleteInvoiceResponse
149
+ > = z.object({
150
+ headers: z.record(z.array(z.string())),
151
+ }).transform((v) => {
152
+ return remap$(v, {
153
+ headers: "Headers",
154
+ });
155
+ });
156
+
157
+ export function deleteInvoiceResponseToJSON(
158
+ deleteInvoiceResponse: DeleteInvoiceResponse,
159
+ ): string {
160
+ return JSON.stringify(
161
+ DeleteInvoiceResponse$outboundSchema.parse(deleteInvoiceResponse),
162
+ );
163
+ }
164
+ export function deleteInvoiceResponseFromJSON(
165
+ jsonString: string,
166
+ ): SafeParseResult<DeleteInvoiceResponse, SDKValidationError> {
167
+ return safeParse(
168
+ jsonString,
169
+ (x) => DeleteInvoiceResponse$inboundSchema.parse(JSON.parse(x)),
170
+ `Failed to parse 'DeleteInvoiceResponse' from JSON`,
171
+ );
172
+ }
@@ -0,0 +1,178 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 DisableResolutionLinkGlobals = {
12
+ /**
13
+ * Specify an API version.
14
+ *
15
+ * @remarks
16
+ *
17
+ * API versioning follows the format `vYYYY.QQ.BB`, where
18
+ * - `YYYY` is the year
19
+ * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
20
+ * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
21
+ * - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
22
+ *
23
+ * The `dev` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
24
+ * When no version is specified, the API defaults to `v2024.01.00`.
25
+ */
26
+ xMoovVersion?: string | undefined;
27
+ };
28
+
29
+ export type DisableResolutionLinkRequest = {
30
+ accountID: string;
31
+ resolutionLinkCode: string;
32
+ };
33
+
34
+ export type DisableResolutionLinkResponse = {
35
+ headers: { [k: string]: Array<string> };
36
+ };
37
+
38
+ /** @internal */
39
+ export const DisableResolutionLinkGlobals$inboundSchema: z.ZodType<
40
+ DisableResolutionLinkGlobals,
41
+ z.ZodTypeDef,
42
+ unknown
43
+ > = z.object({
44
+ "X-Moov-Version": z.string().optional(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ "X-Moov-Version": "xMoovVersion",
48
+ });
49
+ });
50
+ /** @internal */
51
+ export type DisableResolutionLinkGlobals$Outbound = {
52
+ "X-Moov-Version"?: string | undefined;
53
+ };
54
+
55
+ /** @internal */
56
+ export const DisableResolutionLinkGlobals$outboundSchema: z.ZodType<
57
+ DisableResolutionLinkGlobals$Outbound,
58
+ z.ZodTypeDef,
59
+ DisableResolutionLinkGlobals
60
+ > = z.object({
61
+ xMoovVersion: z.string().optional(),
62
+ }).transform((v) => {
63
+ return remap$(v, {
64
+ xMoovVersion: "X-Moov-Version",
65
+ });
66
+ });
67
+
68
+ export function disableResolutionLinkGlobalsToJSON(
69
+ disableResolutionLinkGlobals: DisableResolutionLinkGlobals,
70
+ ): string {
71
+ return JSON.stringify(
72
+ DisableResolutionLinkGlobals$outboundSchema.parse(
73
+ disableResolutionLinkGlobals,
74
+ ),
75
+ );
76
+ }
77
+ export function disableResolutionLinkGlobalsFromJSON(
78
+ jsonString: string,
79
+ ): SafeParseResult<DisableResolutionLinkGlobals, SDKValidationError> {
80
+ return safeParse(
81
+ jsonString,
82
+ (x) => DisableResolutionLinkGlobals$inboundSchema.parse(JSON.parse(x)),
83
+ `Failed to parse 'DisableResolutionLinkGlobals' from JSON`,
84
+ );
85
+ }
86
+
87
+ /** @internal */
88
+ export const DisableResolutionLinkRequest$inboundSchema: z.ZodType<
89
+ DisableResolutionLinkRequest,
90
+ z.ZodTypeDef,
91
+ unknown
92
+ > = z.object({
93
+ accountID: z.string(),
94
+ resolutionLinkCode: z.string(),
95
+ });
96
+ /** @internal */
97
+ export type DisableResolutionLinkRequest$Outbound = {
98
+ accountID: string;
99
+ resolutionLinkCode: string;
100
+ };
101
+
102
+ /** @internal */
103
+ export const DisableResolutionLinkRequest$outboundSchema: z.ZodType<
104
+ DisableResolutionLinkRequest$Outbound,
105
+ z.ZodTypeDef,
106
+ DisableResolutionLinkRequest
107
+ > = z.object({
108
+ accountID: z.string(),
109
+ resolutionLinkCode: z.string(),
110
+ });
111
+
112
+ export function disableResolutionLinkRequestToJSON(
113
+ disableResolutionLinkRequest: DisableResolutionLinkRequest,
114
+ ): string {
115
+ return JSON.stringify(
116
+ DisableResolutionLinkRequest$outboundSchema.parse(
117
+ disableResolutionLinkRequest,
118
+ ),
119
+ );
120
+ }
121
+ export function disableResolutionLinkRequestFromJSON(
122
+ jsonString: string,
123
+ ): SafeParseResult<DisableResolutionLinkRequest, SDKValidationError> {
124
+ return safeParse(
125
+ jsonString,
126
+ (x) => DisableResolutionLinkRequest$inboundSchema.parse(JSON.parse(x)),
127
+ `Failed to parse 'DisableResolutionLinkRequest' from JSON`,
128
+ );
129
+ }
130
+
131
+ /** @internal */
132
+ export const DisableResolutionLinkResponse$inboundSchema: z.ZodType<
133
+ DisableResolutionLinkResponse,
134
+ z.ZodTypeDef,
135
+ unknown
136
+ > = z.object({
137
+ Headers: z.record(z.array(z.string())).default({}),
138
+ }).transform((v) => {
139
+ return remap$(v, {
140
+ "Headers": "headers",
141
+ });
142
+ });
143
+ /** @internal */
144
+ export type DisableResolutionLinkResponse$Outbound = {
145
+ Headers: { [k: string]: Array<string> };
146
+ };
147
+
148
+ /** @internal */
149
+ export const DisableResolutionLinkResponse$outboundSchema: z.ZodType<
150
+ DisableResolutionLinkResponse$Outbound,
151
+ z.ZodTypeDef,
152
+ DisableResolutionLinkResponse
153
+ > = z.object({
154
+ headers: z.record(z.array(z.string())),
155
+ }).transform((v) => {
156
+ return remap$(v, {
157
+ headers: "Headers",
158
+ });
159
+ });
160
+
161
+ export function disableResolutionLinkResponseToJSON(
162
+ disableResolutionLinkResponse: DisableResolutionLinkResponse,
163
+ ): string {
164
+ return JSON.stringify(
165
+ DisableResolutionLinkResponse$outboundSchema.parse(
166
+ disableResolutionLinkResponse,
167
+ ),
168
+ );
169
+ }
170
+ export function disableResolutionLinkResponseFromJSON(
171
+ jsonString: string,
172
+ ): SafeParseResult<DisableResolutionLinkResponse, SDKValidationError> {
173
+ return safeParse(
174
+ jsonString,
175
+ (x) => DisableResolutionLinkResponse$inboundSchema.parse(JSON.parse(x)),
176
+ `Failed to parse 'DisableResolutionLinkResponse' from JSON`,
177
+ );
178
+ }