@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,179 @@
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 GetResolutionLinkGlobals = {
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 GetResolutionLinkRequest = {
31
+ accountID: string;
32
+ resolutionLinkCode: string;
33
+ };
34
+
35
+ export type GetResolutionLinkResponse = {
36
+ headers: { [k: string]: Array<string> };
37
+ result: components.ResolutionLink;
38
+ };
39
+
40
+ /** @internal */
41
+ export const GetResolutionLinkGlobals$inboundSchema: z.ZodType<
42
+ GetResolutionLinkGlobals,
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 GetResolutionLinkGlobals$Outbound = {
54
+ "X-Moov-Version"?: string | undefined;
55
+ };
56
+
57
+ /** @internal */
58
+ export const GetResolutionLinkGlobals$outboundSchema: z.ZodType<
59
+ GetResolutionLinkGlobals$Outbound,
60
+ z.ZodTypeDef,
61
+ GetResolutionLinkGlobals
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 getResolutionLinkGlobalsToJSON(
71
+ getResolutionLinkGlobals: GetResolutionLinkGlobals,
72
+ ): string {
73
+ return JSON.stringify(
74
+ GetResolutionLinkGlobals$outboundSchema.parse(getResolutionLinkGlobals),
75
+ );
76
+ }
77
+ export function getResolutionLinkGlobalsFromJSON(
78
+ jsonString: string,
79
+ ): SafeParseResult<GetResolutionLinkGlobals, SDKValidationError> {
80
+ return safeParse(
81
+ jsonString,
82
+ (x) => GetResolutionLinkGlobals$inboundSchema.parse(JSON.parse(x)),
83
+ `Failed to parse 'GetResolutionLinkGlobals' from JSON`,
84
+ );
85
+ }
86
+
87
+ /** @internal */
88
+ export const GetResolutionLinkRequest$inboundSchema: z.ZodType<
89
+ GetResolutionLinkRequest,
90
+ z.ZodTypeDef,
91
+ unknown
92
+ > = z.object({
93
+ accountID: z.string(),
94
+ resolutionLinkCode: z.string(),
95
+ });
96
+ /** @internal */
97
+ export type GetResolutionLinkRequest$Outbound = {
98
+ accountID: string;
99
+ resolutionLinkCode: string;
100
+ };
101
+
102
+ /** @internal */
103
+ export const GetResolutionLinkRequest$outboundSchema: z.ZodType<
104
+ GetResolutionLinkRequest$Outbound,
105
+ z.ZodTypeDef,
106
+ GetResolutionLinkRequest
107
+ > = z.object({
108
+ accountID: z.string(),
109
+ resolutionLinkCode: z.string(),
110
+ });
111
+
112
+ export function getResolutionLinkRequestToJSON(
113
+ getResolutionLinkRequest: GetResolutionLinkRequest,
114
+ ): string {
115
+ return JSON.stringify(
116
+ GetResolutionLinkRequest$outboundSchema.parse(getResolutionLinkRequest),
117
+ );
118
+ }
119
+ export function getResolutionLinkRequestFromJSON(
120
+ jsonString: string,
121
+ ): SafeParseResult<GetResolutionLinkRequest, SDKValidationError> {
122
+ return safeParse(
123
+ jsonString,
124
+ (x) => GetResolutionLinkRequest$inboundSchema.parse(JSON.parse(x)),
125
+ `Failed to parse 'GetResolutionLinkRequest' from JSON`,
126
+ );
127
+ }
128
+
129
+ /** @internal */
130
+ export const GetResolutionLinkResponse$inboundSchema: z.ZodType<
131
+ GetResolutionLinkResponse,
132
+ z.ZodTypeDef,
133
+ unknown
134
+ > = z.object({
135
+ Headers: z.record(z.array(z.string())).default({}),
136
+ Result: components.ResolutionLink$inboundSchema,
137
+ }).transform((v) => {
138
+ return remap$(v, {
139
+ "Headers": "headers",
140
+ "Result": "result",
141
+ });
142
+ });
143
+ /** @internal */
144
+ export type GetResolutionLinkResponse$Outbound = {
145
+ Headers: { [k: string]: Array<string> };
146
+ Result: components.ResolutionLink$Outbound;
147
+ };
148
+
149
+ /** @internal */
150
+ export const GetResolutionLinkResponse$outboundSchema: z.ZodType<
151
+ GetResolutionLinkResponse$Outbound,
152
+ z.ZodTypeDef,
153
+ GetResolutionLinkResponse
154
+ > = z.object({
155
+ headers: z.record(z.array(z.string())),
156
+ result: components.ResolutionLink$outboundSchema,
157
+ }).transform((v) => {
158
+ return remap$(v, {
159
+ headers: "Headers",
160
+ result: "Result",
161
+ });
162
+ });
163
+
164
+ export function getResolutionLinkResponseToJSON(
165
+ getResolutionLinkResponse: GetResolutionLinkResponse,
166
+ ): string {
167
+ return JSON.stringify(
168
+ GetResolutionLinkResponse$outboundSchema.parse(getResolutionLinkResponse),
169
+ );
170
+ }
171
+ export function getResolutionLinkResponseFromJSON(
172
+ jsonString: string,
173
+ ): SafeParseResult<GetResolutionLinkResponse, SDKValidationError> {
174
+ return safeParse(
175
+ jsonString,
176
+ (x) => GetResolutionLinkResponse$inboundSchema.parse(JSON.parse(x)),
177
+ `Failed to parse 'GetResolutionLinkResponse' from JSON`,
178
+ );
179
+ }
@@ -21,6 +21,7 @@ export * from "./createpaymentlink.js";
21
21
  export * from "./createproduct.js";
22
22
  export * from "./createreceipts.js";
23
23
  export * from "./createrepresentative.js";
24
+ export * from "./createresolutionlink.js";
24
25
  export * from "./createreversal.js";
25
26
  export * from "./createschedule.js";
26
27
  export * from "./createsweepconfig.js";
@@ -33,6 +34,7 @@ export * from "./createwallet.js";
33
34
  export * from "./createwebhook.js";
34
35
  export * from "./deletedisputeevidencefile.js";
35
36
  export * from "./deleteimage.js";
37
+ export * from "./deleteinvoice.js";
36
38
  export * from "./deleterepresentative.js";
37
39
  export * from "./deleteterminalapplication.js";
38
40
  export * from "./disablebankaccount.js";
@@ -40,6 +42,7 @@ export * from "./disablecapability.js";
40
42
  export * from "./disablecard.js";
41
43
  export * from "./disablepaymentlink.js";
42
44
  export * from "./disableproduct.js";
45
+ export * from "./disableresolutionlink.js";
43
46
  export * from "./disablewebhook.js";
44
47
  export * from "./disconnectaccount.js";
45
48
  export * from "./generateendtoendkey.js";
@@ -77,6 +80,7 @@ export * from "./getpublicimage.js";
77
80
  export * from "./getrefund.js";
78
81
  export * from "./getrepresentative.js";
79
82
  export * from "./getresidual.js";
83
+ export * from "./getresolutionlink.js";
80
84
  export * from "./getscheduledoccurrence.js";
81
85
  export * from "./getschedules.js";
82
86
  export * from "./getstatement.js";
@@ -133,6 +137,7 @@ export * from "./listrefunds.js";
133
137
  export * from "./listrepresentatives.js";
134
138
  export * from "./listresidualfees.js";
135
139
  export * from "./listresiduals.js";
140
+ export * from "./listresolutionlinks.js";
136
141
  export * from "./listschedules.js";
137
142
  export * from "./liststatements.js";
138
143
  export * from "./listsweepconfigs.js";
@@ -0,0 +1,177 @@
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 ListResolutionLinksGlobals = {
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 ListResolutionLinksRequest = {
31
+ accountID: string;
32
+ };
33
+
34
+ export type ListResolutionLinksResponse = {
35
+ headers: { [k: string]: Array<string> };
36
+ result: Array<components.ResolutionLink>;
37
+ };
38
+
39
+ /** @internal */
40
+ export const ListResolutionLinksGlobals$inboundSchema: z.ZodType<
41
+ ListResolutionLinksGlobals,
42
+ z.ZodTypeDef,
43
+ unknown
44
+ > = z.object({
45
+ "X-Moov-Version": z.string().optional(),
46
+ }).transform((v) => {
47
+ return remap$(v, {
48
+ "X-Moov-Version": "xMoovVersion",
49
+ });
50
+ });
51
+ /** @internal */
52
+ export type ListResolutionLinksGlobals$Outbound = {
53
+ "X-Moov-Version"?: string | undefined;
54
+ };
55
+
56
+ /** @internal */
57
+ export const ListResolutionLinksGlobals$outboundSchema: z.ZodType<
58
+ ListResolutionLinksGlobals$Outbound,
59
+ z.ZodTypeDef,
60
+ ListResolutionLinksGlobals
61
+ > = z.object({
62
+ xMoovVersion: z.string().optional(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ xMoovVersion: "X-Moov-Version",
66
+ });
67
+ });
68
+
69
+ export function listResolutionLinksGlobalsToJSON(
70
+ listResolutionLinksGlobals: ListResolutionLinksGlobals,
71
+ ): string {
72
+ return JSON.stringify(
73
+ ListResolutionLinksGlobals$outboundSchema.parse(listResolutionLinksGlobals),
74
+ );
75
+ }
76
+ export function listResolutionLinksGlobalsFromJSON(
77
+ jsonString: string,
78
+ ): SafeParseResult<ListResolutionLinksGlobals, SDKValidationError> {
79
+ return safeParse(
80
+ jsonString,
81
+ (x) => ListResolutionLinksGlobals$inboundSchema.parse(JSON.parse(x)),
82
+ `Failed to parse 'ListResolutionLinksGlobals' from JSON`,
83
+ );
84
+ }
85
+
86
+ /** @internal */
87
+ export const ListResolutionLinksRequest$inboundSchema: z.ZodType<
88
+ ListResolutionLinksRequest,
89
+ z.ZodTypeDef,
90
+ unknown
91
+ > = z.object({
92
+ accountID: z.string(),
93
+ });
94
+ /** @internal */
95
+ export type ListResolutionLinksRequest$Outbound = {
96
+ accountID: string;
97
+ };
98
+
99
+ /** @internal */
100
+ export const ListResolutionLinksRequest$outboundSchema: z.ZodType<
101
+ ListResolutionLinksRequest$Outbound,
102
+ z.ZodTypeDef,
103
+ ListResolutionLinksRequest
104
+ > = z.object({
105
+ accountID: z.string(),
106
+ });
107
+
108
+ export function listResolutionLinksRequestToJSON(
109
+ listResolutionLinksRequest: ListResolutionLinksRequest,
110
+ ): string {
111
+ return JSON.stringify(
112
+ ListResolutionLinksRequest$outboundSchema.parse(listResolutionLinksRequest),
113
+ );
114
+ }
115
+ export function listResolutionLinksRequestFromJSON(
116
+ jsonString: string,
117
+ ): SafeParseResult<ListResolutionLinksRequest, SDKValidationError> {
118
+ return safeParse(
119
+ jsonString,
120
+ (x) => ListResolutionLinksRequest$inboundSchema.parse(JSON.parse(x)),
121
+ `Failed to parse 'ListResolutionLinksRequest' from JSON`,
122
+ );
123
+ }
124
+
125
+ /** @internal */
126
+ export const ListResolutionLinksResponse$inboundSchema: z.ZodType<
127
+ ListResolutionLinksResponse,
128
+ z.ZodTypeDef,
129
+ unknown
130
+ > = z.object({
131
+ Headers: z.record(z.array(z.string())).default({}),
132
+ Result: z.array(components.ResolutionLink$inboundSchema),
133
+ }).transform((v) => {
134
+ return remap$(v, {
135
+ "Headers": "headers",
136
+ "Result": "result",
137
+ });
138
+ });
139
+ /** @internal */
140
+ export type ListResolutionLinksResponse$Outbound = {
141
+ Headers: { [k: string]: Array<string> };
142
+ Result: Array<components.ResolutionLink$Outbound>;
143
+ };
144
+
145
+ /** @internal */
146
+ export const ListResolutionLinksResponse$outboundSchema: z.ZodType<
147
+ ListResolutionLinksResponse$Outbound,
148
+ z.ZodTypeDef,
149
+ ListResolutionLinksResponse
150
+ > = z.object({
151
+ headers: z.record(z.array(z.string())),
152
+ result: z.array(components.ResolutionLink$outboundSchema),
153
+ }).transform((v) => {
154
+ return remap$(v, {
155
+ headers: "Headers",
156
+ result: "Result",
157
+ });
158
+ });
159
+
160
+ export function listResolutionLinksResponseToJSON(
161
+ listResolutionLinksResponse: ListResolutionLinksResponse,
162
+ ): string {
163
+ return JSON.stringify(
164
+ ListResolutionLinksResponse$outboundSchema.parse(
165
+ listResolutionLinksResponse,
166
+ ),
167
+ );
168
+ }
169
+ export function listResolutionLinksResponseFromJSON(
170
+ jsonString: string,
171
+ ): SafeParseResult<ListResolutionLinksResponse, SDKValidationError> {
172
+ return safeParse(
173
+ jsonString,
174
+ (x) => ListResolutionLinksResponse$inboundSchema.parse(JSON.parse(x)),
175
+ `Failed to parse 'ListResolutionLinksResponse' from JSON`,
176
+ );
177
+ }
@@ -4,6 +4,7 @@
4
4
 
5
5
  import { invoicesCreateInvoice } from "../funcs/invoicesCreateInvoice.js";
6
6
  import { invoicesCreateInvoicePayment } from "../funcs/invoicesCreateInvoicePayment.js";
7
+ import { invoicesDelete } from "../funcs/invoicesDelete.js";
7
8
  import { invoicesGetInvoice } from "../funcs/invoicesGetInvoice.js";
8
9
  import { invoicesListInvoicePayments } from "../funcs/invoicesListInvoicePayments.js";
9
10
  import { invoicesListInvoices } from "../funcs/invoicesListInvoices.js";
@@ -81,6 +82,29 @@ export class Invoices extends ClientSDK {
81
82
  ));
82
83
  }
83
84
 
85
+ /**
86
+ * Delete an invoice. Only invoices in `draft` status can be deleted.
87
+ *
88
+ * Deleting an invoice indicates it was created by mistake and should be completely disregarded.
89
+ * Deleted invoices are hidden from list results by default, but can still be retrieved
90
+ * individually through the get invoice endpoint. If you need to void an invoice that was
91
+ * already sent or is otherwise part of the invoice history, cancel it instead by updating
92
+ * its status to `canceled`.
93
+ *
94
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
95
+ * you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
96
+ */
97
+ async delete(
98
+ request: operations.DeleteInvoiceRequest,
99
+ options?: RequestOptions,
100
+ ): Promise<operations.DeleteInvoiceResponse | undefined> {
101
+ return unwrapAsync(invoicesDelete(
102
+ this,
103
+ request,
104
+ options,
105
+ ));
106
+ }
107
+
84
108
  /**
85
109
  * Creates a payment resource to represent that an invoice was paid outside of the Moov platform.
86
110
  * If a payment link was created for the invoice, the corresponding payment link is canceled, but a receipt is still sent.
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { resolutionLinksCreate } from "../funcs/resolutionLinksCreate.js";
6
+ import { resolutionLinksDisable } from "../funcs/resolutionLinksDisable.js";
7
+ import { resolutionLinksGet } from "../funcs/resolutionLinksGet.js";
8
+ import { resolutionLinksList } from "../funcs/resolutionLinksList.js";
9
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
10
+ import * as operations from "../models/operations/index.js";
11
+ import { unwrapAsync } from "../types/fp.js";
12
+
13
+ export class ResolutionLinks extends ClientSDK {
14
+ /**
15
+ * Create a resolution link for the specified account. Resolution links are temporary, secure links
16
+ * sent to merchants to resolve account requirements such as KYC verification or document uploads. Only one active resolution link
17
+ * is allowed per connected account.
18
+ *
19
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
20
+ * you'll need to specify the `/accounts/{accountID}/profile.write`, `/accounts/{accountID}/representatives.write` and `/accounts/{accountID}/files.write` scopes.
21
+ */
22
+ async create(
23
+ request: operations.CreateResolutionLinkRequest,
24
+ options?: RequestOptions,
25
+ ): Promise<operations.CreateResolutionLinkResponse> {
26
+ return unwrapAsync(resolutionLinksCreate(
27
+ this,
28
+ request,
29
+ options,
30
+ ));
31
+ }
32
+
33
+ /**
34
+ * List resolution links for the specified account.
35
+ *
36
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
37
+ * you'll need to specify the `/accounts/{accountID}/profile.read` scope.
38
+ */
39
+ async list(
40
+ request: operations.ListResolutionLinksRequest,
41
+ options?: RequestOptions,
42
+ ): Promise<operations.ListResolutionLinksResponse> {
43
+ return unwrapAsync(resolutionLinksList(
44
+ this,
45
+ request,
46
+ options,
47
+ ));
48
+ }
49
+
50
+ /**
51
+ * Get a resolution link by code.
52
+ *
53
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
54
+ * you'll need to specify the `/accounts/{accountID}/profile.read` scope.
55
+ */
56
+ async get(
57
+ request: operations.GetResolutionLinkRequest,
58
+ options?: RequestOptions,
59
+ ): Promise<operations.GetResolutionLinkResponse> {
60
+ return unwrapAsync(resolutionLinksGet(
61
+ this,
62
+ request,
63
+ options,
64
+ ));
65
+ }
66
+
67
+ /**
68
+ * Disable a resolution link. Disabled resolution links can no longer be used by merchants.
69
+ *
70
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
71
+ * you'll need to specify the `/accounts/{accountID}/profile.write` scope.
72
+ */
73
+ async disable(
74
+ request: operations.DisableResolutionLinkRequest,
75
+ options?: RequestOptions,
76
+ ): Promise<operations.DisableResolutionLinkResponse | undefined> {
77
+ return unwrapAsync(resolutionLinksDisable(
78
+ this,
79
+ request,
80
+ options,
81
+ ));
82
+ }
83
+ }
package/src/sdk/sdk.ts CHANGED
@@ -32,6 +32,7 @@ import { Ping } from "./ping.js";
32
32
  import { Products } from "./products.js";
33
33
  import { Receipts } from "./receipts.js";
34
34
  import { Representatives } from "./representatives.js";
35
+ import { ResolutionLinks } from "./resolutionlinks.js";
35
36
  import { Scheduling } from "./scheduling.js";
36
37
  import { Statements } from "./statements.js";
37
38
  import { Support } from "./support.js";
@@ -124,6 +125,11 @@ export class Moov extends ClientSDK {
124
125
  return (this._representatives ??= new Representatives(this._options));
125
126
  }
126
127
 
128
+ private _resolutionLinks?: ResolutionLinks;
129
+ get resolutionLinks(): ResolutionLinks {
130
+ return (this._resolutionLinks ??= new ResolutionLinks(this._options));
131
+ }
132
+
127
133
  private _scheduling?: Scheduling;
128
134
  get scheduling(): Scheduling {
129
135
  return (this._scheduling ??= new Scheduling(this._options));
@@ -1,26 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { ClosedEnum } from "../../types/enums.js";
3
- /**
4
- * Status codes for RTP failures.
5
- */
6
- export declare const RTPFailureCode: {
7
- readonly ProcessingError: "processing-error";
8
- readonly InvalidAccount: "invalid-account";
9
- readonly AccountClosed: "account-closed";
10
- readonly AccountBlocked: "account-blocked";
11
- readonly InvalidField: "invalid-field";
12
- readonly TransactionNotSupported: "transaction-not-supported";
13
- readonly LimitExceeded: "limit-exceeded";
14
- readonly InvalidAmount: "invalid-amount";
15
- readonly CustomerDeceased: "customer-deceased";
16
- readonly Other: "other";
17
- };
18
- /**
19
- * Status codes for RTP failures.
20
- */
21
- export type RTPFailureCode = ClosedEnum<typeof RTPFailureCode>;
22
- /** @internal */
23
- export declare const RTPFailureCode$inboundSchema: z.ZodNativeEnum<typeof RTPFailureCode>;
24
- /** @internal */
25
- export declare const RTPFailureCode$outboundSchema: z.ZodNativeEnum<typeof RTPFailureCode>;
26
- //# sourceMappingURL=rtpfailurecode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rtpfailurecode.d.ts","sourceRoot":"","sources":["../../src/models/components/rtpfailurecode.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;CAWjB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE/D,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,aAAa,CACxD,OAAO,cAAc,CACS,CAAC;AACjC,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,aAAa,CACzD,OAAO,cAAc,CACS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rtpfailurecode.js","sourceRoot":"","sources":["../../src/models/components/rtpfailurecode.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAG5B;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,eAAe,EAAE,kBAAkB;IACnC,cAAc,EAAE,iBAAiB;IACjC,aAAa,EAAE,gBAAgB;IAC/B,cAAc,EAAE,iBAAiB;IACjC,YAAY,EAAE,eAAe;IAC7B,uBAAuB,EAAE,2BAA2B;IACpD,aAAa,EAAE,gBAAgB;IAC/B,aAAa,EAAE,gBAAgB;IAC/B,gBAAgB,EAAE,mBAAmB;IACrC,KAAK,EAAE,OAAO;CACN,CAAC;AAMX,gBAAgB;AACH,QAAA,4BAA4B,GAErC,CAAC,CAAC,UAAU,CAAC,sBAAc,CAAC,CAAC;AACjC,gBAAgB;AACH,QAAA,6BAA6B,GAEtC,oCAA4B,CAAC"}
@@ -1,43 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { RTPFailureCode } from "./rtpfailurecode.js";
5
- import { RTPTransactionStatus } from "./rtptransactionstatus.js";
6
- /**
7
- * RTP specific details about the transaction.
8
- */
9
- export type RTPTransactionDetails = {
10
- /**
11
- * Status of a transaction within the RTP lifecycle.
12
- */
13
- status?: RTPTransactionStatus | undefined;
14
- /**
15
- * Response code returned by network on failure.
16
- */
17
- networkResponseCode?: string | undefined;
18
- /**
19
- * Status codes for RTP failures.
20
- */
21
- failureCode?: RTPFailureCode | undefined;
22
- initiatedOn?: Date | undefined;
23
- completedOn?: Date | undefined;
24
- failedOn?: Date | undefined;
25
- acceptedWithoutPostingOn?: Date | undefined;
26
- };
27
- /** @internal */
28
- export declare const RTPTransactionDetails$inboundSchema: z.ZodType<RTPTransactionDetails, z.ZodTypeDef, unknown>;
29
- /** @internal */
30
- export type RTPTransactionDetails$Outbound = {
31
- status?: string | undefined;
32
- networkResponseCode?: string | undefined;
33
- failureCode?: string | undefined;
34
- initiatedOn?: string | undefined;
35
- completedOn?: string | undefined;
36
- failedOn?: string | undefined;
37
- acceptedWithoutPostingOn?: string | undefined;
38
- };
39
- /** @internal */
40
- export declare const RTPTransactionDetails$outboundSchema: z.ZodType<RTPTransactionDetails$Outbound, z.ZodTypeDef, RTPTransactionDetails>;
41
- export declare function rtpTransactionDetailsToJSON(rtpTransactionDetails: RTPTransactionDetails): string;
42
- export declare function rtpTransactionDetailsFromJSON(jsonString: string): SafeParseResult<RTPTransactionDetails, SDKValidationError>;
43
- //# sourceMappingURL=rtptransactiondetails.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rtptransactiondetails.d.ts","sourceRoot":"","sources":["../../src/models/components/rtptransactiondetails.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAGf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EAGrB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,WAAW,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACzC,WAAW,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,wBAAwB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAcP,CAAC;AACH,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,wBAAwB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,qBAAqB,CASrB,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR;AACD,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}