postgrid-node 0.1.0-alpha.1

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 (291) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +201 -0
  3. package/README.md +346 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +914 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +882 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +144 -0
  87. package/index.d.ts +144 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +161 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +118 -0
  92. package/index.mjs.map +1 -0
  93. package/package.json +124 -0
  94. package/pagination.d.ts +24 -0
  95. package/pagination.d.ts.map +1 -0
  96. package/pagination.js +45 -0
  97. package/pagination.js.map +1 -0
  98. package/pagination.mjs +41 -0
  99. package/pagination.mjs.map +1 -0
  100. package/resource.d.ts +6 -0
  101. package/resource.d.ts.map +1 -0
  102. package/resource.js +11 -0
  103. package/resource.js.map +1 -0
  104. package/resource.mjs +7 -0
  105. package/resource.mjs.map +1 -0
  106. package/resources/bank-accounts.d.ts +285 -0
  107. package/resources/bank-accounts.d.ts.map +1 -0
  108. package/resources/bank-accounts.js +45 -0
  109. package/resources/bank-accounts.js.map +1 -0
  110. package/resources/bank-accounts.mjs +40 -0
  111. package/resources/bank-accounts.mjs.map +1 -0
  112. package/resources/boxes.d.ts +683 -0
  113. package/resources/boxes.d.ts.map +1 -0
  114. package/resources/boxes.js +54 -0
  115. package/resources/boxes.js.map +1 -0
  116. package/resources/boxes.mjs +49 -0
  117. package/resources/boxes.mjs.map +1 -0
  118. package/resources/campaigns.d.ts +644 -0
  119. package/resources/campaigns.d.ts.map +1 -0
  120. package/resources/campaigns.js +67 -0
  121. package/resources/campaigns.js.map +1 -0
  122. package/resources/campaigns.mjs +62 -0
  123. package/resources/campaigns.mjs.map +1 -0
  124. package/resources/cheques/cheques.d.ts +349 -0
  125. package/resources/cheques/cheques.d.ts.map +1 -0
  126. package/resources/cheques/cheques.js +95 -0
  127. package/resources/cheques/cheques.js.map +1 -0
  128. package/resources/cheques/cheques.mjs +67 -0
  129. package/resources/cheques/cheques.mjs.map +1 -0
  130. package/resources/cheques/index.d.ts +4 -0
  131. package/resources/cheques/index.d.ts.map +1 -0
  132. package/resources/cheques/index.js +12 -0
  133. package/resources/cheques/index.js.map +1 -0
  134. package/resources/cheques/index.mjs +5 -0
  135. package/resources/cheques/index.mjs.map +1 -0
  136. package/resources/cheques/url.d.ts +29 -0
  137. package/resources/cheques/url.d.ts.map +1 -0
  138. package/resources/cheques/url.js +20 -0
  139. package/resources/cheques/url.js.map +1 -0
  140. package/resources/cheques/url.mjs +16 -0
  141. package/resources/cheques/url.mjs.map +1 -0
  142. package/resources/cheques/with-deposit-ready-pdf.d.ts +13 -0
  143. package/resources/cheques/with-deposit-ready-pdf.d.ts.map +1 -0
  144. package/resources/cheques/with-deposit-ready-pdf.js +18 -0
  145. package/resources/cheques/with-deposit-ready-pdf.js.map +1 -0
  146. package/resources/cheques/with-deposit-ready-pdf.mjs +14 -0
  147. package/resources/cheques/with-deposit-ready-pdf.mjs.map +1 -0
  148. package/resources/contacts.d.ts +295 -0
  149. package/resources/contacts.d.ts.map +1 -0
  150. package/resources/contacts.js +52 -0
  151. package/resources/contacts.js.map +1 -0
  152. package/resources/contacts.mjs +47 -0
  153. package/resources/contacts.mjs.map +1 -0
  154. package/resources/index.d.ts +12 -0
  155. package/resources/index.d.ts.map +1 -0
  156. package/resources/index.js +50 -0
  157. package/resources/index.js.map +1 -0
  158. package/resources/index.mjs +13 -0
  159. package/resources/index.mjs.map +1 -0
  160. package/resources/letters.d.ts +639 -0
  161. package/resources/letters.d.ts.map +1 -0
  162. package/resources/letters.js +55 -0
  163. package/resources/letters.js.map +1 -0
  164. package/resources/letters.mjs +50 -0
  165. package/resources/letters.mjs.map +1 -0
  166. package/resources/postcards.d.ts +346 -0
  167. package/resources/postcards.d.ts.map +1 -0
  168. package/resources/postcards.js +56 -0
  169. package/resources/postcards.js.map +1 -0
  170. package/resources/postcards.mjs +51 -0
  171. package/resources/postcards.mjs.map +1 -0
  172. package/resources/reports/exports.d.ts +207 -0
  173. package/resources/reports/exports.d.ts.map +1 -0
  174. package/resources/reports/exports.js +33 -0
  175. package/resources/reports/exports.js.map +1 -0
  176. package/resources/reports/exports.mjs +29 -0
  177. package/resources/reports/exports.mjs.map +1 -0
  178. package/resources/reports/index.d.ts +4 -0
  179. package/resources/reports/index.d.ts.map +1 -0
  180. package/resources/reports/index.js +12 -0
  181. package/resources/reports/index.js.map +1 -0
  182. package/resources/reports/index.mjs +5 -0
  183. package/resources/reports/index.mjs.map +1 -0
  184. package/resources/reports/reports.d.ts +245 -0
  185. package/resources/reports/reports.d.ts.map +1 -0
  186. package/resources/reports/reports.js +85 -0
  187. package/resources/reports/reports.js.map +1 -0
  188. package/resources/reports/reports.mjs +57 -0
  189. package/resources/reports/reports.mjs.map +1 -0
  190. package/resources/reports/samples.d.ts +81 -0
  191. package/resources/reports/samples.d.ts.map +1 -0
  192. package/resources/reports/samples.js +26 -0
  193. package/resources/reports/samples.js.map +1 -0
  194. package/resources/reports/samples.mjs +22 -0
  195. package/resources/reports/samples.mjs.map +1 -0
  196. package/resources/self-mailers.d.ts +622 -0
  197. package/resources/self-mailers.d.ts.map +1 -0
  198. package/resources/self-mailers.js +45 -0
  199. package/resources/self-mailers.js.map +1 -0
  200. package/resources/self-mailers.mjs +40 -0
  201. package/resources/self-mailers.mjs.map +1 -0
  202. package/resources/shared.d.ts +147 -0
  203. package/resources/shared.d.ts.map +1 -0
  204. package/resources/shared.js +4 -0
  205. package/resources/shared.js.map +1 -0
  206. package/resources/shared.mjs +3 -0
  207. package/resources/shared.mjs.map +1 -0
  208. package/resources/templates.d.ts +126 -0
  209. package/resources/templates.d.ts.map +1 -0
  210. package/resources/templates.js +46 -0
  211. package/resources/templates.js.map +1 -0
  212. package/resources/templates.mjs +41 -0
  213. package/resources/templates.mjs.map +1 -0
  214. package/shims/node.d.ts +30 -0
  215. package/shims/node.d.ts.map +1 -0
  216. package/shims/node.js +31 -0
  217. package/shims/node.js.map +1 -0
  218. package/shims/node.mjs +5 -0
  219. package/shims/node.mjs.map +1 -0
  220. package/shims/web.d.ts +26 -0
  221. package/shims/web.d.ts.map +1 -0
  222. package/shims/web.js +31 -0
  223. package/shims/web.js.map +1 -0
  224. package/shims/web.mjs +5 -0
  225. package/shims/web.mjs.map +1 -0
  226. package/src/_shims/MultipartBody.ts +9 -0
  227. package/src/_shims/README.md +46 -0
  228. package/src/_shims/auto/runtime-bun.ts +4 -0
  229. package/src/_shims/auto/runtime-node.ts +4 -0
  230. package/src/_shims/auto/runtime.ts +4 -0
  231. package/src/_shims/auto/types-node.ts +4 -0
  232. package/src/_shims/auto/types.d.ts +101 -0
  233. package/src/_shims/auto/types.js +3 -0
  234. package/src/_shims/auto/types.mjs +3 -0
  235. package/src/_shims/bun-runtime.ts +14 -0
  236. package/src/_shims/index.d.ts +81 -0
  237. package/src/_shims/index.js +13 -0
  238. package/src/_shims/index.mjs +7 -0
  239. package/src/_shims/manual-types.d.ts +12 -0
  240. package/src/_shims/manual-types.js +3 -0
  241. package/src/_shims/manual-types.mjs +3 -0
  242. package/src/_shims/node-runtime.ts +81 -0
  243. package/src/_shims/node-types.d.ts +42 -0
  244. package/src/_shims/node-types.js +3 -0
  245. package/src/_shims/node-types.mjs +3 -0
  246. package/src/_shims/registry.ts +67 -0
  247. package/src/_shims/web-runtime.ts +103 -0
  248. package/src/_shims/web-types.d.ts +83 -0
  249. package/src/_shims/web-types.js +3 -0
  250. package/src/_shims/web-types.mjs +3 -0
  251. package/src/core.ts +1208 -0
  252. package/src/error.ts +130 -0
  253. package/src/index.ts +428 -0
  254. package/src/lib/.keep +4 -0
  255. package/src/pagination.ts +69 -0
  256. package/src/resource.ts +11 -0
  257. package/src/resources/bank-accounts.ts +382 -0
  258. package/src/resources/boxes.ts +982 -0
  259. package/src/resources/campaigns.ts +853 -0
  260. package/src/resources/cheques/cheques.ts +493 -0
  261. package/src/resources/cheques/index.ts +12 -0
  262. package/src/resources/cheques/url.ts +37 -0
  263. package/src/resources/cheques/with-deposit-ready-pdf.ts +17 -0
  264. package/src/resources/contacts.ts +387 -0
  265. package/src/resources/index.ts +102 -0
  266. package/src/resources/letters.ts +870 -0
  267. package/src/resources/postcards.ts +548 -0
  268. package/src/resources/reports/exports.ts +272 -0
  269. package/src/resources/reports/index.ts +28 -0
  270. package/src/resources/reports/reports.ts +359 -0
  271. package/src/resources/reports/samples.ts +109 -0
  272. package/src/resources/self-mailers.ts +958 -0
  273. package/src/resources/shared.ts +182 -0
  274. package/src/resources/templates.ts +184 -0
  275. package/src/shims/node.ts +50 -0
  276. package/src/shims/web.ts +50 -0
  277. package/src/tsconfig.json +11 -0
  278. package/src/uploads.ts +255 -0
  279. package/src/version.ts +1 -0
  280. package/uploads.d.ts +75 -0
  281. package/uploads.d.ts.map +1 -0
  282. package/uploads.js +171 -0
  283. package/uploads.js.map +1 -0
  284. package/uploads.mjs +158 -0
  285. package/uploads.mjs.map +1 -0
  286. package/version.d.ts +2 -0
  287. package/version.d.ts.map +1 -0
  288. package/version.js +5 -0
  289. package/version.js.map +1 -0
  290. package/version.mjs +2 -0
  291. package/version.mjs.map +1 -0
@@ -0,0 +1,4 @@
1
+ export { ChequesList, Cheques, type Cheque, type ChequeList, type ChequeCreateParams, type ChequeListParams, } from "./cheques.js";
2
+ export { URL, type URLRetrieveResponse } from "./url.js";
3
+ export { WithDepositReadyPdf } from "./with-deposit-ready-pdf.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/cheques/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,GAAG,EAAE,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WithDepositReadyPdf = exports.URL = exports.Cheques = exports.ChequesList = void 0;
5
+ var cheques_1 = require("./cheques.js");
6
+ Object.defineProperty(exports, "ChequesList", { enumerable: true, get: function () { return cheques_1.ChequesList; } });
7
+ Object.defineProperty(exports, "Cheques", { enumerable: true, get: function () { return cheques_1.Cheques; } });
8
+ var url_1 = require("./url.js");
9
+ Object.defineProperty(exports, "URL", { enumerable: true, get: function () { return url_1.URL; } });
10
+ var with_deposit_ready_pdf_1 = require("./with-deposit-ready-pdf.js");
11
+ Object.defineProperty(exports, "WithDepositReadyPdf", { enumerable: true, get: function () { return with_deposit_ready_pdf_1.WithDepositReadyPdf; } });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/cheques/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAOmB;AANjB,sGAAA,WAAW,OAAA;AACX,kGAAA,OAAO,OAAA;AAMT,gCAAsD;AAA7C,0FAAA,GAAG,OAAA;AACZ,sEAA+D;AAAtD,6HAAA,mBAAmB,OAAA"}
@@ -0,0 +1,5 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { ChequesList, Cheques, } from "./cheques.mjs";
3
+ export { URL } from "./url.mjs";
4
+ export { WithDepositReadyPdf } from "./with-deposit-ready-pdf.mjs";
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/cheques/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,EACX,OAAO,GAKR;OACM,EAAE,GAAG,EAA4B;OACjC,EAAE,mBAAmB,EAAE"}
@@ -0,0 +1,29 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ export declare class URL extends APIResource {
4
+ /**
5
+ * Retrieve a cheque preview URL.
6
+ *
7
+ * This is only available for customers with our document management addon, which
8
+ * offers document generation and hosting capabilities. This endpoint has a much
9
+ * higher rate limit than the regular order retrieval endpoint, so it is suitable
10
+ * for customer-facing use-cases.
11
+ */
12
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<URLRetrieveResponse>;
13
+ }
14
+ export interface URLRetrieveResponse {
15
+ /**
16
+ * A unique ID prefixed with cheque\_
17
+ */
18
+ id: string;
19
+ object: string;
20
+ /**
21
+ * A signed URL linking to the order preview PDF. The link remains valid for 15
22
+ * minutes from the time of the API call.
23
+ */
24
+ url: string;
25
+ }
26
+ export declare namespace URL {
27
+ export { type URLRetrieveResponse as URLRetrieveResponse };
28
+ }
29
+ //# sourceMappingURL=url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/resources/cheques/url.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;CAG1F;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.URL = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class URL extends resource_1.APIResource {
7
+ /**
8
+ * Retrieve a cheque preview URL.
9
+ *
10
+ * This is only available for customers with our document management addon, which
11
+ * offers document generation and hosting capabilities. This endpoint has a much
12
+ * higher rate limit than the regular order retrieval endpoint, so it is suitable
13
+ * for customer-facing use-cases.
14
+ */
15
+ retrieve(id, options) {
16
+ return this._client.get(`/cheques/${id}/url`, options);
17
+ }
18
+ }
19
+ exports.URL = URL;
20
+ //# sourceMappingURL=url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/resources/cheques/url.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,GAAI,SAAQ,sBAAW;IAClC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAZD,kBAYC"}
@@ -0,0 +1,16 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class URL extends APIResource {
4
+ /**
5
+ * Retrieve a cheque preview URL.
6
+ *
7
+ * This is only available for customers with our document management addon, which
8
+ * offers document generation and hosting capabilities. This endpoint has a much
9
+ * higher rate limit than the regular order retrieval endpoint, so it is suitable
10
+ * for customer-facing use-cases.
11
+ */
12
+ retrieve(id, options) {
13
+ return this._client.get(`/cheques/${id}/url`, options);
14
+ }
15
+ }
16
+ //# sourceMappingURL=url.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.mjs","sourceRoot":"","sources":["../../src/resources/cheques/url.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,GAAI,SAAQ,WAAW;IAClC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import * as ChequesAPI from "./cheques.js";
4
+ export declare class WithDepositReadyPdf extends APIResource {
5
+ /**
6
+ * Retrieve the deposit-ready PDF for a digital-only cheque. The endpoint can only
7
+ * be called by users with 'Admin' role. In test mode, the preview PDF of the
8
+ * digitalOnly cheque and the deposit-ready PDF are the same. In live mode, the
9
+ * deposit-ready will have the full account number.
10
+ */
11
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<ChequesAPI.Cheque>;
12
+ }
13
+ //# sourceMappingURL=with-deposit-ready-pdf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-deposit-ready-pdf.d.ts","sourceRoot":"","sources":["../../src/resources/cheques/with-deposit-ready-pdf.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AAExC,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC;CAGxF"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WithDepositReadyPdf = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class WithDepositReadyPdf extends resource_1.APIResource {
7
+ /**
8
+ * Retrieve the deposit-ready PDF for a digital-only cheque. The endpoint can only
9
+ * be called by users with 'Admin' role. In test mode, the preview PDF of the
10
+ * digitalOnly cheque and the deposit-ready PDF are the same. In live mode, the
11
+ * deposit-ready will have the full account number.
12
+ */
13
+ retrieve(id, options) {
14
+ return this._client.get(`/cheques/${id}/with_deposit_ready_pdf`, options);
15
+ }
16
+ }
17
+ exports.WithDepositReadyPdf = WithDepositReadyPdf;
18
+ //# sourceMappingURL=with-deposit-ready-pdf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-deposit-ready-pdf.js","sourceRoot":"","sources":["../../src/resources/cheques/with-deposit-ready-pdf.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAI7C,MAAa,mBAAoB,SAAQ,sBAAW;IAClD;;;;;OAKG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF;AAVD,kDAUC"}
@@ -0,0 +1,14 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class WithDepositReadyPdf extends APIResource {
4
+ /**
5
+ * Retrieve the deposit-ready PDF for a digital-only cheque. The endpoint can only
6
+ * be called by users with 'Admin' role. In test mode, the preview PDF of the
7
+ * digitalOnly cheque and the deposit-ready PDF are the same. In live mode, the
8
+ * deposit-ready will have the full account number.
9
+ */
10
+ retrieve(id, options) {
11
+ return this._client.get(`/cheques/${id}/with_deposit_ready_pdf`, options);
12
+ }
13
+ }
14
+ //# sourceMappingURL=with-deposit-ready-pdf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-deposit-ready-pdf.mjs","sourceRoot":"","sources":["../../src/resources/cheques/with-deposit-ready-pdf.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAClD;;;;;OAKG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF"}
@@ -0,0 +1,295 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ import { List, type ListParams } from "../pagination.js";
4
+ export declare class Contacts extends APIResource {
5
+ /**
6
+ * Creates a contact. This will also verify the contact's address **if you create
7
+ * it using a live API key**. To sucessfully create a contact, either a
8
+ * `firstName`, a `companyName`, or both are required. You can supply both, but you
9
+ * **cannot** supply neither.
10
+ *
11
+ * You have the option to supply the entire address (except for `countryCode`) via
12
+ * `addressLine1`, in which case PostGrid will parse it automatically. However,
13
+ * this is **not guaranteed to be correct**, so we recommend passing along the
14
+ * structured address fields (`city`, `provinceOrState`, etc) if you have them.
15
+ *
16
+ * _Note that if you create a contact that has identical information to another
17
+ * contact, this will simply update the description of the existing contact and
18
+ * return it. This avoids creating duplicate contacts._
19
+ */
20
+ create(body: ContactCreateParams, options?: Core.RequestOptions): Core.APIPromise<Contact>;
21
+ /**
22
+ * Retrieve a contact.
23
+ */
24
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Contact>;
25
+ /**
26
+ * Get a list of contacts.
27
+ */
28
+ list(query?: ContactListParams, options?: Core.RequestOptions): Core.PagePromise<ContactsList, Contact>;
29
+ list(options?: Core.RequestOptions): Core.PagePromise<ContactsList, Contact>;
30
+ /**
31
+ * Delete a contact. Note that this will not affect orders that were sent to this
32
+ * contact.
33
+ */
34
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<ContactDeleteResponse>;
35
+ }
36
+ export declare class ContactsList extends List<Contact> {
37
+ }
38
+ export interface Contact {
39
+ /**
40
+ * A unique ID prefixed with contact\_
41
+ */
42
+ id: string;
43
+ /**
44
+ * The first line of the contact's address.
45
+ */
46
+ addressLine1: string;
47
+ /**
48
+ * One of `verified`, `corrected`, or `failed`.
49
+ */
50
+ addressStatus: 'verified' | 'corrected' | 'failed';
51
+ /**
52
+ * The ISO 3611-1 country code of the contact's address.
53
+ */
54
+ countryCode: string;
55
+ /**
56
+ * The UTC time at which this resource was created.
57
+ */
58
+ createdAt: string;
59
+ /**
60
+ * `true` if this is a live mode resource else `false`.
61
+ */
62
+ live: boolean;
63
+ /**
64
+ * Always `contact`.
65
+ */
66
+ object: 'contact';
67
+ /**
68
+ * The UTC time at which this resource was last updated.
69
+ */
70
+ updatedAt: string;
71
+ /**
72
+ * A series of human-readable errors/warnings that were raised when running the
73
+ * provided address through our address verification.
74
+ */
75
+ addressErrors?: string;
76
+ /**
77
+ * Second line of the contact's address, if applicable.
78
+ */
79
+ addressLine2?: string;
80
+ /**
81
+ * The city of the contact's address.
82
+ */
83
+ city?: string;
84
+ /**
85
+ * Company name of the contact.
86
+ */
87
+ companyName?: string;
88
+ /**
89
+ * An optional string describing this resource. Will be visible in the API and the
90
+ * dashboard.
91
+ */
92
+ description?: string;
93
+ /**
94
+ * Email of the contact.
95
+ */
96
+ email?: string;
97
+ /**
98
+ * First name of the contact.
99
+ */
100
+ firstName?: string;
101
+ /**
102
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
103
+ * `verified` even if our address verification system says otherwise.
104
+ */
105
+ forceVerifiedStatus?: boolean;
106
+ /**
107
+ * Job title of the contact.
108
+ */
109
+ jobTitle?: string;
110
+ /**
111
+ * Last name of the contact.
112
+ */
113
+ lastName?: string;
114
+ /**
115
+ * See the section on Metadata.
116
+ */
117
+ metadata?: Record<string, unknown>;
118
+ /**
119
+ * Phone number of the contact.
120
+ */
121
+ phoneNumber?: string;
122
+ /**
123
+ * The postal or ZIP code of the contact's address.
124
+ */
125
+ postalOrZip?: string;
126
+ /**
127
+ * Province or state of the contact's address.
128
+ */
129
+ provinceOrState?: string;
130
+ /**
131
+ * If `true`, PostGrid will skip running this contact's address through our address
132
+ * verification system.
133
+ */
134
+ skipVerification?: boolean;
135
+ }
136
+ export interface ContactDeleteResponse {
137
+ /**
138
+ * A unique ID prefixed with contact\_
139
+ */
140
+ id: string;
141
+ deleted: true;
142
+ /**
143
+ * Always `contact`.
144
+ */
145
+ object: 'contact';
146
+ }
147
+ export type ContactCreateParams = ContactCreateParams.ContactCreateWithFirstName | ContactCreateParams.ContactCreateWithCompanyName;
148
+ export declare namespace ContactCreateParams {
149
+ interface ContactCreateWithFirstName {
150
+ /**
151
+ * The first line of the contact's address.
152
+ */
153
+ addressLine1: string;
154
+ /**
155
+ * The ISO 3611-1 country code of the contact's address.
156
+ */
157
+ countryCode: string;
158
+ firstName: string;
159
+ /**
160
+ * Second line of the contact's address, if applicable.
161
+ */
162
+ addressLine2?: string;
163
+ /**
164
+ * The city of the contact's address.
165
+ */
166
+ city?: string;
167
+ /**
168
+ * Company name of the contact.
169
+ */
170
+ companyName?: string;
171
+ /**
172
+ * An optional string describing this resource. Will be visible in the API and the
173
+ * dashboard.
174
+ */
175
+ description?: string;
176
+ /**
177
+ * Email of the contact.
178
+ */
179
+ email?: string;
180
+ /**
181
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
182
+ * `verified` even if our address verification system says otherwise.
183
+ */
184
+ forceVerifiedStatus?: boolean;
185
+ /**
186
+ * Job title of the contact.
187
+ */
188
+ jobTitle?: string;
189
+ /**
190
+ * Last name of the contact.
191
+ */
192
+ lastName?: string;
193
+ /**
194
+ * See the section on Metadata.
195
+ */
196
+ metadata?: Record<string, unknown>;
197
+ /**
198
+ * Phone number of the contact.
199
+ */
200
+ phoneNumber?: string;
201
+ /**
202
+ * The postal or ZIP code of the contact's address.
203
+ */
204
+ postalOrZip?: string;
205
+ /**
206
+ * Province or state of the contact's address.
207
+ */
208
+ provinceOrState?: string;
209
+ /**
210
+ * If `true`, PostGrid will skip running this contact's address through our address
211
+ * verification system.
212
+ */
213
+ skipVerification?: boolean;
214
+ }
215
+ interface ContactCreateWithCompanyName {
216
+ /**
217
+ * The first line of the contact's address.
218
+ */
219
+ addressLine1: string;
220
+ companyName: string;
221
+ /**
222
+ * The ISO 3611-1 country code of the contact's address.
223
+ */
224
+ countryCode: string;
225
+ /**
226
+ * Second line of the contact's address, if applicable.
227
+ */
228
+ addressLine2?: string;
229
+ /**
230
+ * The city of the contact's address.
231
+ */
232
+ city?: string;
233
+ /**
234
+ * An optional string describing this resource. Will be visible in the API and the
235
+ * dashboard.
236
+ */
237
+ description?: string;
238
+ /**
239
+ * Email of the contact.
240
+ */
241
+ email?: string;
242
+ /**
243
+ * First name of the contact.
244
+ */
245
+ firstName?: string;
246
+ /**
247
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
248
+ * `verified` even if our address verification system says otherwise.
249
+ */
250
+ forceVerifiedStatus?: boolean;
251
+ /**
252
+ * Job title of the contact.
253
+ */
254
+ jobTitle?: string;
255
+ /**
256
+ * Last name of the contact.
257
+ */
258
+ lastName?: string;
259
+ /**
260
+ * See the section on Metadata.
261
+ */
262
+ metadata?: Record<string, unknown>;
263
+ /**
264
+ * Phone number of the contact.
265
+ */
266
+ phoneNumber?: string;
267
+ /**
268
+ * The postal or ZIP code of the contact's address.
269
+ */
270
+ postalOrZip?: string;
271
+ /**
272
+ * Province or state of the contact's address.
273
+ */
274
+ provinceOrState?: string;
275
+ /**
276
+ * If `true`, PostGrid will skip running this contact's address through our address
277
+ * verification system.
278
+ */
279
+ skipVerification?: boolean;
280
+ }
281
+ }
282
+ export interface ContactListParams extends ListParams {
283
+ /**
284
+ * You can supply any string to help narrow down the list of resources. For
285
+ * example, if you pass `"New York"` (quoted), it will return resources that have
286
+ * that string present somewhere in their response. Alternatively, you can supply a
287
+ * structured search query. See the documentation on `StructuredSearchQuery` for
288
+ * more details.
289
+ */
290
+ search?: string;
291
+ }
292
+ export declare namespace Contacts {
293
+ export { type Contact as Contact, type ContactDeleteResponse as ContactDeleteResponse, ContactsList as ContactsList, type ContactCreateParams as ContactCreateParams, type ContactListParams as ContactListParams, };
294
+ }
295
+ //# sourceMappingURL=contacts.d.ts.map
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,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAE9B;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAEnC;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB;;;WAGG;QACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,YAAY,IAAI,YAAY,EAC5B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ContactsList = exports.Contacts = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ const core_1 = require("../core.js");
7
+ const pagination_1 = require("../pagination.js");
8
+ class Contacts extends resource_1.APIResource {
9
+ /**
10
+ * Creates a contact. This will also verify the contact's address **if you create
11
+ * it using a live API key**. To sucessfully create a contact, either a
12
+ * `firstName`, a `companyName`, or both are required. You can supply both, but you
13
+ * **cannot** supply neither.
14
+ *
15
+ * You have the option to supply the entire address (except for `countryCode`) via
16
+ * `addressLine1`, in which case PostGrid will parse it automatically. However,
17
+ * this is **not guaranteed to be correct**, so we recommend passing along the
18
+ * structured address fields (`city`, `provinceOrState`, etc) if you have them.
19
+ *
20
+ * _Note that if you create a contact that has identical information to another
21
+ * contact, this will simply update the description of the existing contact and
22
+ * return it. This avoids creating duplicate contacts._
23
+ */
24
+ create(body, options) {
25
+ return this._client.post('/contacts', { body, ...options });
26
+ }
27
+ /**
28
+ * Retrieve a contact.
29
+ */
30
+ retrieve(id, options) {
31
+ return this._client.get(`/contacts/${id}`, options);
32
+ }
33
+ list(query = {}, options) {
34
+ if ((0, core_1.isRequestOptions)(query)) {
35
+ return this.list({}, query);
36
+ }
37
+ return this._client.getAPIList('/contacts', ContactsList, { query, ...options });
38
+ }
39
+ /**
40
+ * Delete a contact. Note that this will not affect orders that were sent to this
41
+ * contact.
42
+ */
43
+ delete(id, options) {
44
+ return this._client.delete(`/contacts/${id}`, options);
45
+ }
46
+ }
47
+ exports.Contacts = Contacts;
48
+ class ContactsList extends pagination_1.List {
49
+ }
50
+ exports.ContactsList = ContactsList;
51
+ Contacts.ContactsList = ContactsList;
52
+ //# sourceMappingURL=contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.js","sourceRoot":"","sources":["../src/resources/contacts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAE3C,iDAAsD;AAEtD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAOD,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAjDD,4BAiDC;AAED,MAAa,YAAa,SAAQ,iBAAa;CAAG;AAAlD,oCAAkD;AA8TlD,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC"}
@@ -0,0 +1,47 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ import { isRequestOptions } from "../core.mjs";
4
+ import { List } from "../pagination.mjs";
5
+ export class Contacts extends APIResource {
6
+ /**
7
+ * Creates a contact. This will also verify the contact's address **if you create
8
+ * it using a live API key**. To sucessfully create a contact, either a
9
+ * `firstName`, a `companyName`, or both are required. You can supply both, but you
10
+ * **cannot** supply neither.
11
+ *
12
+ * You have the option to supply the entire address (except for `countryCode`) via
13
+ * `addressLine1`, in which case PostGrid will parse it automatically. However,
14
+ * this is **not guaranteed to be correct**, so we recommend passing along the
15
+ * structured address fields (`city`, `provinceOrState`, etc) if you have them.
16
+ *
17
+ * _Note that if you create a contact that has identical information to another
18
+ * contact, this will simply update the description of the existing contact and
19
+ * return it. This avoids creating duplicate contacts._
20
+ */
21
+ create(body, options) {
22
+ return this._client.post('/contacts', { body, ...options });
23
+ }
24
+ /**
25
+ * Retrieve a contact.
26
+ */
27
+ retrieve(id, options) {
28
+ return this._client.get(`/contacts/${id}`, options);
29
+ }
30
+ list(query = {}, options) {
31
+ if (isRequestOptions(query)) {
32
+ return this.list({}, query);
33
+ }
34
+ return this._client.getAPIList('/contacts', ContactsList, { query, ...options });
35
+ }
36
+ /**
37
+ * Delete a contact. Note that this will not affect orders that were sent to this
38
+ * contact.
39
+ */
40
+ delete(id, options) {
41
+ return this._client.delete(`/contacts/${id}`, options);
42
+ }
43
+ }
44
+ export class ContactsList extends List {
45
+ }
46
+ Contacts.ContactsList = ContactsList;
47
+ //# sourceMappingURL=contacts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.mjs","sourceRoot":"","sources":["../src/resources/contacts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAOD,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,IAAa;CAAG;AA8TlD,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC"}
@@ -0,0 +1,12 @@
1
+ export * from "./shared.js";
2
+ export { BankAccountsList, BankAccounts, type BankAccount, type BankAccountList, type BankAccountDeleteResponse, type BankAccountCreateParams, type BankAccountListParams, } from "./bank-accounts.js";
3
+ export { BoxListResponsesList, Boxes, type BoxCreateResponse, type BoxRetrieveResponse, type BoxListResponse, type BoxCancelResponse, type BoxCreateParams, type BoxListParams, } from "./boxes.js";
4
+ export { CampaignListResponsesList, Campaigns, type CampaignCreateResponse, type CampaignRetrieveResponse, type CampaignUpdateResponse, type CampaignListResponse, type CampaignDeleteResponse, type CampaignSendResponse, type CampaignCreateParams, type CampaignUpdateParams, type CampaignListParams, type CampaignSendParams, } from "./campaigns.js";
5
+ export { ChequesList, Cheques, type Cheque, type ChequeList, type ChequeCreateParams, type ChequeListParams, } from "./cheques/cheques.js";
6
+ export { ContactsList, Contacts, type Contact, type ContactDeleteResponse, type ContactCreateParams, type ContactListParams, } from "./contacts.js";
7
+ export { LettersList, Letters, type Letter, type LetterList, type LetterURLResponse, type LetterCreateParams, type LetterListParams, } from "./letters.js";
8
+ export { PostcardsList, Postcards, type Postcard, type PostcardList, type PostcardURLResponse, type PostcardCreateParams, type PostcardListParams, } from "./postcards.js";
9
+ export { ReportListResponsesList, Reports, type ReportCreateResponse, type ReportRetrieveResponse, type ReportUpdateResponse, type ReportListResponse, type ReportDeleteResponse, type ReportCreateParams, type ReportUpdateParams, type ReportListParams, } from "./reports/reports.js";
10
+ export { SelfMailerListResponsesList, SelfMailers, type SelfMailerCreateResponse, type SelfMailerRetrieveResponse, type SelfMailerListResponse, type SelfMailerCancelResponse, type SelfMailerCreateParams, type SelfMailerListParams, } from "./self-mailers.js";
11
+ export { TemplatesList, Templates, type Template, type TemplateList, type TemplateDeleteResponse, type TemplateCreateParams, type TemplateUpdateParams, type TemplateListParams, } from "./templates.js";
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,yBAAyB,EACzB,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,g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