postgrid-node 0.1.0-alpha.2 → 0.1.0-alpha.4

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 (265) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +26 -40
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +25 -15
  9. package/core.js.map +1 -1
  10. package/core.mjs +26 -16
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +21 -8
  13. package/index.d.ts +21 -8
  14. package/index.d.ts.map +1 -1
  15. package/index.js +28 -5
  16. package/index.js.map +1 -1
  17. package/index.mjs +28 -5
  18. package/index.mjs.map +1 -1
  19. package/internal/qs/formats.d.ts +6 -0
  20. package/internal/qs/formats.d.ts.map +1 -0
  21. package/internal/qs/formats.js +11 -0
  22. package/internal/qs/formats.js.map +1 -0
  23. package/internal/qs/formats.mjs +8 -0
  24. package/internal/qs/formats.mjs.map +1 -0
  25. package/internal/qs/index.d.ts +10 -0
  26. package/internal/qs/index.d.ts.map +1 -0
  27. package/internal/qs/index.js +14 -0
  28. package/internal/qs/index.js.map +1 -0
  29. package/internal/qs/index.mjs +10 -0
  30. package/internal/qs/index.mjs.map +1 -0
  31. package/internal/qs/stringify.d.ts +3 -0
  32. package/internal/qs/stringify.d.ts.map +1 -0
  33. package/internal/qs/stringify.js +280 -0
  34. package/internal/qs/stringify.js.map +1 -0
  35. package/internal/qs/stringify.mjs +276 -0
  36. package/internal/qs/stringify.mjs.map +1 -0
  37. package/internal/qs/types.d.ts +57 -0
  38. package/internal/qs/types.d.ts.map +1 -0
  39. package/internal/qs/types.js +3 -0
  40. package/internal/qs/types.js.map +1 -0
  41. package/internal/qs/types.mjs +2 -0
  42. package/internal/qs/types.mjs.map +1 -0
  43. package/internal/qs/utils.d.ts +14 -0
  44. package/internal/qs/utils.d.ts.map +1 -0
  45. package/internal/qs/utils.js +229 -0
  46. package/internal/qs/utils.js.map +1 -0
  47. package/internal/qs/utils.mjs +217 -0
  48. package/internal/qs/utils.mjs.map +1 -0
  49. package/package.json +8 -29
  50. package/pagination.d.ts +2 -0
  51. package/pagination.d.ts.map +1 -1
  52. package/pagination.js +2 -1
  53. package/pagination.js.map +1 -1
  54. package/pagination.mjs +2 -1
  55. package/pagination.mjs.map +1 -1
  56. package/resource.d.ts +1 -1
  57. package/resource.d.ts.map +1 -1
  58. package/resource.js.map +1 -1
  59. package/resource.mjs.map +1 -1
  60. package/resources/bank-accounts.d.ts +61 -4
  61. package/resources/bank-accounts.d.ts.map +1 -1
  62. package/resources/bank-accounts.js +25 -0
  63. package/resources/bank-accounts.js.map +1 -1
  64. package/resources/bank-accounts.mjs +25 -0
  65. package/resources/bank-accounts.mjs.map +1 -1
  66. package/resources/boxes.d.ts +80 -15
  67. package/resources/boxes.d.ts.map +1 -1
  68. package/resources/boxes.js +27 -0
  69. package/resources/boxes.js.map +1 -1
  70. package/resources/boxes.mjs +27 -0
  71. package/resources/boxes.mjs.map +1 -1
  72. package/resources/campaigns.d.ts +22 -8
  73. package/resources/campaigns.d.ts.map +1 -1
  74. package/resources/cheques/cheques.d.ts +43 -4
  75. package/resources/cheques/cheques.d.ts.map +1 -1
  76. package/resources/cheques/cheques.js +23 -0
  77. package/resources/cheques/cheques.js.map +1 -1
  78. package/resources/cheques/cheques.mjs +23 -0
  79. package/resources/cheques/cheques.mjs.map +1 -1
  80. package/resources/cheques/url.d.ts +5 -0
  81. package/resources/cheques/url.d.ts.map +1 -1
  82. package/resources/cheques/url.js +5 -0
  83. package/resources/cheques/url.js.map +1 -1
  84. package/resources/cheques/url.mjs +5 -0
  85. package/resources/cheques/url.mjs.map +1 -1
  86. package/resources/cheques/with-deposit-ready-pdf.d.ts +6 -0
  87. package/resources/cheques/with-deposit-ready-pdf.d.ts.map +1 -1
  88. package/resources/cheques/with-deposit-ready-pdf.js +6 -0
  89. package/resources/cheques/with-deposit-ready-pdf.js.map +1 -1
  90. package/resources/cheques/with-deposit-ready-pdf.mjs +6 -0
  91. package/resources/cheques/with-deposit-ready-pdf.mjs.map +1 -1
  92. package/resources/cheques.d.ts +2 -0
  93. package/resources/cheques.d.ts.map +1 -0
  94. package/resources/cheques.js +19 -0
  95. package/resources/cheques.js.map +1 -0
  96. package/resources/cheques.mjs +3 -0
  97. package/resources/cheques.mjs.map +1 -0
  98. package/resources/contacts.d.ts +37 -3
  99. package/resources/contacts.d.ts.map +1 -1
  100. package/resources/contacts.js +20 -0
  101. package/resources/contacts.js.map +1 -1
  102. package/resources/contacts.mjs +20 -0
  103. package/resources/contacts.mjs.map +1 -1
  104. package/resources/index.d.ts +5 -1
  105. package/resources/index.d.ts.map +1 -1
  106. package/resources/index.js +12 -1
  107. package/resources/index.js.map +1 -1
  108. package/resources/index.mjs +4 -0
  109. package/resources/index.mjs.map +1 -1
  110. package/resources/letters.d.ts +50 -6
  111. package/resources/letters.d.ts.map +1 -1
  112. package/resources/letters.js +24 -0
  113. package/resources/letters.js.map +1 -1
  114. package/resources/letters.mjs +24 -0
  115. package/resources/letters.mjs.map +1 -1
  116. package/resources/mailing-list-imports.d.ts +919 -0
  117. package/resources/mailing-list-imports.d.ts.map +1 -0
  118. package/resources/mailing-list-imports.js +95 -0
  119. package/resources/mailing-list-imports.js.map +1 -0
  120. package/resources/mailing-list-imports.mjs +90 -0
  121. package/resources/mailing-list-imports.mjs.map +1 -0
  122. package/resources/mailing-lists.d.ts +398 -0
  123. package/resources/mailing-lists.d.ts.map +1 -0
  124. package/resources/mailing-lists.js +101 -0
  125. package/resources/mailing-lists.js.map +1 -0
  126. package/resources/mailing-lists.mjs +96 -0
  127. package/resources/mailing-lists.mjs.map +1 -0
  128. package/resources/order-profiles/cheques.d.ts +588 -0
  129. package/resources/order-profiles/cheques.d.ts.map +1 -0
  130. package/resources/order-profiles/cheques.js +74 -0
  131. package/resources/order-profiles/cheques.js.map +1 -0
  132. package/resources/order-profiles/cheques.mjs +69 -0
  133. package/resources/order-profiles/cheques.mjs.map +1 -0
  134. package/resources/order-profiles/index.d.ts +6 -0
  135. package/resources/order-profiles/index.d.ts.map +1 -0
  136. package/resources/order-profiles/index.js +19 -0
  137. package/resources/order-profiles/index.js.map +1 -0
  138. package/resources/order-profiles/index.mjs +7 -0
  139. package/resources/order-profiles/index.mjs.map +1 -0
  140. package/resources/order-profiles/letters.d.ts +647 -0
  141. package/resources/order-profiles/letters.d.ts.map +1 -0
  142. package/resources/order-profiles/letters.js +80 -0
  143. package/resources/order-profiles/letters.js.map +1 -0
  144. package/resources/order-profiles/letters.mjs +75 -0
  145. package/resources/order-profiles/letters.mjs.map +1 -0
  146. package/resources/order-profiles/order-profiles.d.ts +22 -0
  147. package/resources/order-profiles/order-profiles.d.ts.map +1 -0
  148. package/resources/order-profiles/order-profiles.js +55 -0
  149. package/resources/order-profiles/order-profiles.js.map +1 -0
  150. package/resources/order-profiles/order-profiles.mjs +28 -0
  151. package/resources/order-profiles/order-profiles.mjs.map +1 -0
  152. package/resources/order-profiles/postcards.d.ts +423 -0
  153. package/resources/order-profiles/postcards.d.ts.map +1 -0
  154. package/resources/order-profiles/postcards.js +73 -0
  155. package/resources/order-profiles/postcards.js.map +1 -0
  156. package/resources/order-profiles/postcards.mjs +68 -0
  157. package/resources/order-profiles/postcards.mjs.map +1 -0
  158. package/resources/order-profiles/self-mailers.d.ts +435 -0
  159. package/resources/order-profiles/self-mailers.d.ts.map +1 -0
  160. package/resources/order-profiles/self-mailers.js +75 -0
  161. package/resources/order-profiles/self-mailers.js.map +1 -0
  162. package/resources/order-profiles/self-mailers.mjs +70 -0
  163. package/resources/order-profiles/self-mailers.mjs.map +1 -0
  164. package/resources/order-profiles.d.ts +2 -0
  165. package/resources/order-profiles.d.ts.map +1 -0
  166. package/resources/order-profiles.js +19 -0
  167. package/resources/order-profiles.js.map +1 -0
  168. package/resources/order-profiles.mjs +3 -0
  169. package/resources/order-profiles.mjs.map +1 -0
  170. package/resources/postcards.d.ts +58 -8
  171. package/resources/postcards.d.ts.map +1 -1
  172. package/resources/postcards.js +26 -0
  173. package/resources/postcards.js.map +1 -1
  174. package/resources/postcards.mjs +26 -0
  175. package/resources/postcards.mjs.map +1 -1
  176. package/resources/reports/exports.d.ts +36 -3
  177. package/resources/reports/exports.d.ts.map +1 -1
  178. package/resources/reports/exports.js +27 -0
  179. package/resources/reports/exports.js.map +1 -1
  180. package/resources/reports/exports.mjs +27 -0
  181. package/resources/reports/exports.mjs.map +1 -1
  182. package/resources/reports/reports.d.ts +76 -8
  183. package/resources/reports/reports.d.ts.map +1 -1
  184. package/resources/reports/reports.js +44 -0
  185. package/resources/reports/reports.js.map +1 -1
  186. package/resources/reports/reports.mjs +44 -0
  187. package/resources/reports/reports.mjs.map +1 -1
  188. package/resources/reports.d.ts +2 -0
  189. package/resources/reports.d.ts.map +1 -0
  190. package/resources/reports.js +19 -0
  191. package/resources/reports.js.map +1 -0
  192. package/resources/reports.mjs +3 -0
  193. package/resources/reports.mjs.map +1 -0
  194. package/resources/self-mailers.d.ts +99 -15
  195. package/resources/self-mailers.d.ts.map +1 -1
  196. package/resources/self-mailers.js +38 -0
  197. package/resources/self-mailers.js.map +1 -1
  198. package/resources/self-mailers.mjs +38 -0
  199. package/resources/self-mailers.mjs.map +1 -1
  200. package/resources/shared.d.ts +6 -2
  201. package/resources/shared.d.ts.map +1 -1
  202. package/resources/sub-organizations.d.ts +394 -0
  203. package/resources/sub-organizations.d.ts.map +1 -0
  204. package/resources/sub-organizations.js +63 -0
  205. package/resources/sub-organizations.js.map +1 -0
  206. package/resources/sub-organizations.mjs +58 -0
  207. package/resources/sub-organizations.mjs.map +1 -0
  208. package/resources/templates.d.ts +43 -3
  209. package/resources/templates.d.ts.map +1 -1
  210. package/resources/templates.js +26 -0
  211. package/resources/templates.js.map +1 -1
  212. package/resources/templates.mjs +26 -0
  213. package/resources/templates.mjs.map +1 -1
  214. package/resources.d.ts +2 -0
  215. package/resources.d.ts.map +1 -0
  216. package/resources.js +18 -0
  217. package/resources.js.map +1 -0
  218. package/resources.mjs +2 -0
  219. package/resources.mjs.map +1 -0
  220. package/src/_shims/index.d.ts +2 -0
  221. package/src/_shims/index.js +5 -1
  222. package/src/_shims/index.mjs +5 -1
  223. package/src/core.ts +44 -16
  224. package/src/index.ts +112 -11
  225. package/src/internal/qs/LICENSE.md +13 -0
  226. package/src/internal/qs/README.md +3 -0
  227. package/src/internal/qs/formats.ts +9 -0
  228. package/src/internal/qs/index.ts +13 -0
  229. package/src/internal/qs/stringify.ts +388 -0
  230. package/src/internal/qs/types.ts +71 -0
  231. package/src/internal/qs/utils.ts +265 -0
  232. package/src/pagination.ts +6 -1
  233. package/src/resource.ts +1 -1
  234. package/src/resources/bank-accounts.ts +57 -4
  235. package/src/resources/boxes.ts +50 -15
  236. package/src/resources/campaigns.ts +8 -8
  237. package/src/resources/cheques/cheques.ts +35 -4
  238. package/src/resources/cheques/url.ts +5 -0
  239. package/src/resources/cheques/with-deposit-ready-pdf.ts +6 -0
  240. package/src/resources/cheques.ts +3 -0
  241. package/src/resources/contacts.ts +31 -3
  242. package/src/resources/index.ts +39 -0
  243. package/src/resources/letters.ts +38 -6
  244. package/src/resources/mailing-list-imports.ts +1076 -0
  245. package/src/resources/mailing-lists.ts +511 -0
  246. package/src/resources/order-profiles/cheques.ts +888 -0
  247. package/src/resources/order-profiles/index.ts +55 -0
  248. package/src/resources/order-profiles/letters.ts +956 -0
  249. package/src/resources/order-profiles/order-profiles.ts +133 -0
  250. package/src/resources/order-profiles/postcards.ts +694 -0
  251. package/src/resources/order-profiles/self-mailers.ts +707 -0
  252. package/src/resources/order-profiles.ts +3 -0
  253. package/src/resources/postcards.ts +42 -8
  254. package/src/resources/reports/exports.ts +30 -3
  255. package/src/resources/reports/reports.ts +60 -8
  256. package/src/resources/reports.ts +3 -0
  257. package/src/resources/self-mailers.ts +80 -14
  258. package/src/resources/shared.ts +2 -2
  259. package/src/resources/sub-organizations.ts +518 -0
  260. package/src/resources/templates.ts +37 -3
  261. package/src/resources.ts +1 -0
  262. package/src/version.ts +1 -1
  263. package/version.d.ts +1 -1
  264. package/version.js +1 -1
  265. package/version.mjs +1 -1
@@ -9,18 +9,39 @@ class Templates extends resource_1.APIResource {
9
9
  /**
10
10
  * Create a template. Note that if you want to create a template that works with
11
11
  * our template editor, you must use our dashboard.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const template = await client.templates.create({
16
+ * description: 'Test',
17
+ * html: '<b>Hello</b> {{to.firstName}}',
18
+ * });
19
+ * ```
12
20
  */
13
21
  create(body, options) {
14
22
  return this._client.post('/templates', { body, ...options });
15
23
  }
16
24
  /**
17
25
  * Retrieve a template by ID.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const template = await client.templates.retrieve('id');
30
+ * ```
18
31
  */
19
32
  retrieve(id, options) {
20
33
  return this._client.get(`/templates/${id}`, options);
21
34
  }
22
35
  /**
23
36
  * Update a template by ID.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const template = await client.templates.update('id', {
41
+ * description: 'Test',
42
+ * html: '<b>Hello</b> {{to.firstName}}!',
43
+ * });
44
+ * ```
24
45
  */
25
46
  update(id, body, options) {
26
47
  return this._client.post(`/templates/${id}`, { body, ...options });
@@ -33,6 +54,11 @@ class Templates extends resource_1.APIResource {
33
54
  }
34
55
  /**
35
56
  * Delete a template by ID. Note that this operation cannot be undone.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const template = await client.templates.delete('id');
61
+ * ```
36
62
  */
37
63
  delete(id, options) {
38
64
  return this._client.delete(`/templates/${id}`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/resources/templates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAE3C,iDAAsD;AAEtD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;OAGG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,IAA0B,EAAE,OAA6B;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAOD,IAAI,CACF,QAAkD,EAAE,EACpD,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,YAAY,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AA5CD,8BA4CC;AAED,MAAa,aAAc,SAAQ,iBAAc;CAAG;AAApD,sCAAoD;AAsHpD,SAAS,CAAC,aAAa,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/resources/templates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAE3C,iDAAsD;AAEtD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAA0B,EAAE,OAA6B;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAeD,IAAI,CACF,QAAkD,EAAE,EACpD,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,YAAY,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AA9ED,8BA8EC;AAED,MAAa,aAAc,SAAQ,iBAAc;CAAG;AAApD,sCAAoD;AAsHpD,SAAS,CAAC,aAAa,GAAG,aAAa,CAAC"}
@@ -6,18 +6,39 @@ export class Templates extends APIResource {
6
6
  /**
7
7
  * Create a template. Note that if you want to create a template that works with
8
8
  * our template editor, you must use our dashboard.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const template = await client.templates.create({
13
+ * description: 'Test',
14
+ * html: '<b>Hello</b> {{to.firstName}}',
15
+ * });
16
+ * ```
9
17
  */
10
18
  create(body, options) {
11
19
  return this._client.post('/templates', { body, ...options });
12
20
  }
13
21
  /**
14
22
  * Retrieve a template by ID.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const template = await client.templates.retrieve('id');
27
+ * ```
15
28
  */
16
29
  retrieve(id, options) {
17
30
  return this._client.get(`/templates/${id}`, options);
18
31
  }
19
32
  /**
20
33
  * Update a template by ID.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const template = await client.templates.update('id', {
38
+ * description: 'Test',
39
+ * html: '<b>Hello</b> {{to.firstName}}!',
40
+ * });
41
+ * ```
21
42
  */
22
43
  update(id, body, options) {
23
44
  return this._client.post(`/templates/${id}`, { body, ...options });
@@ -30,6 +51,11 @@ export class Templates extends APIResource {
30
51
  }
31
52
  /**
32
53
  * Delete a template by ID. Note that this operation cannot be undone.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const template = await client.templates.delete('id');
58
+ * ```
33
59
  */
34
60
  delete(id, options) {
35
61
  return this._client.delete(`/templates/${id}`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"templates.mjs","sourceRoot":"","sources":["../src/resources/templates.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;OAGG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,IAA0B,EAAE,OAA6B;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAOD,IAAI,CACF,QAAkD,EAAE,EACpD,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,YAAY,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,IAAc;CAAG;AAsHpD,SAAS,CAAC,aAAa,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"templates.mjs","sourceRoot":"","sources":["../src/resources/templates.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAA0B,EAAE,OAA6B;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAeD,IAAI,CACF,QAAkD,EAAE,EACpD,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,YAAY,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,IAAc;CAAG;AAsHpD,SAAS,CAAC,aAAa,GAAG,aAAa,CAAC"}
package/resources.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./resources/index.js";
2
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
package/resources.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./resources/index.js"), exports);
18
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAkC"}
package/resources.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./resources/index.mjs";
2
+ //# sourceMappingURL=resources.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
@@ -79,3 +79,5 @@ export function fileFromPath(path: string, options?: FileFromPathOptions): Promi
79
79
  export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise<File>;
80
80
 
81
81
  export function isFsReadStream(value: any): value is FsReadStream;
82
+
83
+ export const init: () => void;
@@ -3,7 +3,9 @@
3
3
  */
4
4
  const shims = require('./registry');
5
5
  const auto = require('postgrid-node/_shims/auto/runtime');
6
- if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6
+ exports.init = () => {
7
+ if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8
+ };
7
9
  for (const property of Object.keys(shims)) {
8
10
  Object.defineProperty(exports, property, {
9
11
  get() {
@@ -11,3 +13,5 @@ for (const property of Object.keys(shims)) {
11
13
  },
12
14
  });
13
15
  }
16
+
17
+ exports.init();
@@ -3,5 +3,9 @@
3
3
  */
4
4
  import * as shims from './registry.mjs';
5
5
  import * as auto from "./auto/runtime";
6
- if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6
+ export const init = () => {
7
+ if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8
+ };
7
9
  export * from './registry.mjs';
10
+
11
+ init();
package/src/core.ts CHANGED
@@ -16,7 +16,12 @@ import {
16
16
  type RequestInit,
17
17
  type Response,
18
18
  type HeadersInit,
19
+ init,
19
20
  } from './_shims/index';
21
+
22
+ // try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881
23
+ init();
24
+
20
25
  export { type Response };
21
26
  import { BlobLike, isBlobLike, isMultipartBody } from './uploads';
22
27
  export {
@@ -28,6 +33,20 @@ export {
28
33
 
29
34
  export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
30
35
 
36
+ /**
37
+ * An alias to the builtin `Array` type so we can
38
+ * easily alias it in import statements if there are name clashes.
39
+ */
40
+ type _Array<T> = Array<T>;
41
+
42
+ /**
43
+ * An alias to the builtin `Record` type so we can
44
+ * easily alias it in import statements if there are name clashes.
45
+ */
46
+ type _Record<K extends keyof any, T> = Record<K, T>;
47
+
48
+ export type { _Array as Array, _Record as Record };
49
+
31
50
  type PromiseOrValue<T> = T | Promise<T>;
32
51
 
33
52
  type APIResponseProps = {
@@ -48,8 +67,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
48
67
  }
49
68
 
50
69
  const contentType = response.headers.get('content-type');
51
- const isJSON =
52
- contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
70
+ const mediaType = contentType?.split(';')[0]?.trim();
71
+ const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
53
72
  if (isJSON) {
54
73
  const json = await response.json();
55
74
 
@@ -151,6 +170,7 @@ export class APIPromise<T> extends Promise<T> {
151
170
 
152
171
  export abstract class APIClient {
153
172
  baseURL: string;
173
+ #baseURLOverridden: boolean;
154
174
  maxRetries: number;
155
175
  timeout: number;
156
176
  httpAgent: Agent | undefined;
@@ -160,18 +180,21 @@ export abstract class APIClient {
160
180
 
161
181
  constructor({
162
182
  baseURL,
183
+ baseURLOverridden,
163
184
  maxRetries = 2,
164
185
  timeout = 60000, // 1 minute
165
186
  httpAgent,
166
187
  fetch: overriddenFetch,
167
188
  }: {
168
189
  baseURL: string;
190
+ baseURLOverridden: boolean;
169
191
  maxRetries?: number | undefined;
170
192
  timeout: number | undefined;
171
193
  httpAgent: Agent | undefined;
172
194
  fetch: Fetch | undefined;
173
195
  }) {
174
196
  this.baseURL = baseURL;
197
+ this.#baseURLOverridden = baseURLOverridden;
175
198
  this.maxRetries = validatePositiveInteger('maxRetries', maxRetries);
176
199
  this.timeout = validatePositiveInteger('timeout', timeout);
177
200
  this.httpAgent = httpAgent;
@@ -194,7 +217,7 @@ export abstract class APIClient {
194
217
  protected defaultHeaders(opts: FinalRequestOptions): Headers {
195
218
  return {
196
219
  Accept: 'application/json',
197
- 'Content-Type': 'application/json',
220
+ ...(['head', 'get'].includes(opts.method) ? {} : { 'Content-Type': 'application/json' }),
198
221
  'User-Agent': this.getUserAgent(),
199
222
  ...getPlatformHeaders(),
200
223
  ...this.authHeaders(opts),
@@ -276,12 +299,12 @@ export abstract class APIClient {
276
299
  return null;
277
300
  }
278
301
 
279
- buildRequest<Req>(
280
- options: FinalRequestOptions<Req>,
302
+ async buildRequest<Req>(
303
+ inputOptions: FinalRequestOptions<Req>,
281
304
  { retryCount = 0 }: { retryCount?: number } = {},
282
- ): { req: RequestInit; url: string; timeout: number } {
283
- options = { ...options };
284
- const { method, path, query, headers: headers = {} } = options;
305
+ ): Promise<{ req: RequestInit; url: string; timeout: number }> {
306
+ const options = { ...inputOptions };
307
+ const { method, path, query, defaultBaseURL, headers: headers = {} } = options;
285
308
 
286
309
  const body =
287
310
  ArrayBuffer.isView(options.body) || (options.__binaryRequest && typeof options.body === 'string') ?
@@ -291,7 +314,7 @@ export abstract class APIClient {
291
314
  : null;
292
315
  const contentLength = this.calculateContentLength(body);
293
316
 
294
- const url = this.buildURL(path!, query);
317
+ const url = this.buildURL(path!, query, defaultBaseURL);
295
318
  if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
296
319
  options.timeout = options.timeout ?? this.timeout;
297
320
  const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
@@ -308,8 +331,8 @@ export abstract class APIClient {
308
331
  }
309
332
 
310
333
  if (this.idempotencyHeader && method !== 'get') {
311
- if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
312
- headers[this.idempotencyHeader] = options.idempotencyKey;
334
+ if (!inputOptions.idempotencyKey) inputOptions.idempotencyKey = this.defaultIdempotencyKey();
335
+ headers[this.idempotencyHeader] = inputOptions.idempotencyKey;
313
336
  }
314
337
 
315
338
  const reqHeaders = this.buildHeaders({ options, headers, contentLength, retryCount });
@@ -366,7 +389,7 @@ export abstract class APIClient {
366
389
  getHeader(headers, 'x-stainless-timeout') === undefined &&
367
390
  options.timeout
368
391
  ) {
369
- reqHeaders['x-stainless-timeout'] = String(options.timeout);
392
+ reqHeaders['x-stainless-timeout'] = String(Math.trunc(options.timeout / 1000));
370
393
  }
371
394
 
372
395
  this.validateHeaders(reqHeaders, headers);
@@ -395,7 +418,7 @@ export abstract class APIClient {
395
418
  !headers ? {}
396
419
  : Symbol.iterator in headers ?
397
420
  Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
398
- : { ...headers }
421
+ : { ...(headers as any as Record<string, string>) }
399
422
  );
400
423
  }
401
424
 
@@ -427,7 +450,9 @@ export abstract class APIClient {
427
450
 
428
451
  await this.prepareOptions(options);
429
452
 
430
- const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining });
453
+ const { req, url, timeout } = await this.buildRequest(options, {
454
+ retryCount: maxRetries - retriesRemaining,
455
+ });
431
456
 
432
457
  await this.prepareRequest(req, { url, options });
433
458
 
@@ -484,11 +509,12 @@ export abstract class APIClient {
484
509
  return new PagePromise<PageClass, Item>(this, request, Page);
485
510
  }
486
511
 
487
- buildURL<Req>(path: string, query: Req | null | undefined): string {
512
+ buildURL<Req>(path: string, query: Req | null | undefined, defaultBaseURL?: string | undefined): string {
513
+ const baseURL = (!this.#baseURLOverridden && defaultBaseURL) || this.baseURL;
488
514
  const url =
489
515
  isAbsoluteURL(path) ?
490
516
  new URL(path)
491
- : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
517
+ : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
492
518
 
493
519
  const defaultQuery = this.defaultQuery();
494
520
  if (!isEmptyObj(defaultQuery)) {
@@ -773,6 +799,7 @@ export type RequestOptions<
773
799
  query?: Req | undefined;
774
800
  body?: Req | null | undefined;
775
801
  headers?: Headers | undefined;
802
+ defaultBaseURL?: string | undefined;
776
803
 
777
804
  maxRetries?: number;
778
805
  stream?: boolean | undefined;
@@ -794,6 +821,7 @@ const requestOptionsKeys: KeysEnum<RequestOptions> = {
794
821
  query: true,
795
822
  body: true,
796
823
  headers: true,
824
+ defaultBaseURL: true,
797
825
 
798
826
  maxRetries: true,
799
827
  stream: true,
package/src/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { type Agent } from './_shims/index';
4
+ import * as qs from './internal/qs';
4
5
  import * as Core from './core';
5
6
  import * as Errors from './error';
6
7
  import * as Pagination from './pagination';
@@ -57,6 +58,32 @@ import {
57
58
  Letters,
58
59
  LettersList,
59
60
  } from './resources/letters';
61
+ import {
62
+ MailingListImportCreateParams,
63
+ MailingListImportCreateResponse,
64
+ MailingListImportDeleteResponse,
65
+ MailingListImportListParams,
66
+ MailingListImportListResponse,
67
+ MailingListImportListResponsesList,
68
+ MailingListImportRetrieveResponse,
69
+ MailingListImportUpdateParams,
70
+ MailingListImportUpdateResponse,
71
+ MailingListImports,
72
+ } from './resources/mailing-list-imports';
73
+ import {
74
+ MailingListCreateParams,
75
+ MailingListCreateResponse,
76
+ MailingListDeleteResponse,
77
+ MailingListListParams,
78
+ MailingListListResponse,
79
+ MailingListListResponsesList,
80
+ MailingListRetrieveResponse,
81
+ MailingListSubmitJobParams,
82
+ MailingListSubmitJobResponse,
83
+ MailingListUpdateParams,
84
+ MailingListUpdateResponse,
85
+ MailingLists,
86
+ } from './resources/mailing-lists';
60
87
  import {
61
88
  Postcard,
62
89
  PostcardCreateParams,
@@ -73,9 +100,21 @@ import {
73
100
  SelfMailerListParams,
74
101
  SelfMailerListResponse,
75
102
  SelfMailerListResponsesList,
103
+ SelfMailerRetrievePreviewURLResponse,
76
104
  SelfMailerRetrieveResponse,
77
105
  SelfMailers,
78
106
  } from './resources/self-mailers';
107
+ import {
108
+ SubOrganizationCreateParams,
109
+ SubOrganizationCreateResponse,
110
+ SubOrganizationListParams,
111
+ SubOrganizationListResponse,
112
+ SubOrganizationListResponsesList,
113
+ SubOrganizationListUsersParams,
114
+ SubOrganizationListUsersResponse,
115
+ SubOrganizationRetrieveResponse,
116
+ SubOrganizations,
117
+ } from './resources/sub-organizations';
79
118
  import {
80
119
  Template,
81
120
  TemplateCreateParams,
@@ -94,6 +133,7 @@ import {
94
133
  Cheques,
95
134
  ChequesList,
96
135
  } from './resources/cheques/cheques';
136
+ import { OrderProfiles } from './resources/order-profiles/order-profiles';
97
137
  import {
98
138
  ReportCreateParams,
99
139
  ReportCreateResponse,
@@ -112,10 +152,7 @@ import {
112
152
  } from './resources/reports/reports';
113
153
 
114
154
  export interface ClientOptions {
115
- /**
116
- * Defaults to process.env['POSTGRID_API_KEY'].
117
- */
118
- apiKey?: string | undefined;
155
+ apiKey: string;
119
156
 
120
157
  /**
121
158
  * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
@@ -130,6 +167,8 @@ export interface ClientOptions {
130
167
  *
131
168
  * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
132
169
  * much longer than this timeout before the promise succeeds or fails.
170
+ *
171
+ * @unit milliseconds
133
172
  */
134
173
  timeout?: number | undefined;
135
174
 
@@ -185,7 +224,7 @@ export class PostGrid extends Core.APIClient {
185
224
  /**
186
225
  * API Client for interfacing with the PostGrid API.
187
226
  *
188
- * @param {string | undefined} [opts.apiKey=process.env['POSTGRID_API_KEY'] ?? undefined]
227
+ * @param {string} opts.apiKey
189
228
  * @param {string} [opts.baseURL=process.env['POSTGRID_BASE_URL'] ?? https://api.postgrid.com/print-mail/v1] - Override the default base URL for the API.
190
229
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
191
230
  * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
@@ -194,14 +233,10 @@ export class PostGrid extends Core.APIClient {
194
233
  * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
195
234
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
196
235
  */
197
- constructor({
198
- baseURL = Core.readEnv('POSTGRID_BASE_URL'),
199
- apiKey = Core.readEnv('POSTGRID_API_KEY'),
200
- ...opts
201
- }: ClientOptions = {}) {
236
+ constructor({ baseURL = Core.readEnv('POSTGRID_BASE_URL'), apiKey, ...opts }: ClientOptions) {
202
237
  if (apiKey === undefined) {
203
238
  throw new Errors.PostGridError(
204
- "The POSTGRID_API_KEY environment variable is missing or empty; either provide it, or instantiate the PostGrid client with an apiKey option, like new PostGrid({ apiKey: 'My API Key' }).",
239
+ "Missing required client option apiKey; you need to instantiate the PostGrid client with an apiKey option, like new PostGrid({ apiKey: 'My API Key' }).",
205
240
  );
206
241
  }
207
242
 
@@ -213,6 +248,7 @@ export class PostGrid extends Core.APIClient {
213
248
 
214
249
  super({
215
250
  baseURL: options.baseURL!,
251
+ baseURLOverridden: baseURL ? baseURL !== 'https://api.postgrid.com/print-mail/v1' : false,
216
252
  timeout: options.timeout ?? 60000 /* 1 minute */,
217
253
  httpAgent: options.httpAgent,
218
254
  maxRetries: options.maxRetries,
@@ -235,6 +271,17 @@ export class PostGrid extends Core.APIClient {
235
271
  campaigns: API.Campaigns = new API.Campaigns(this);
236
272
  reports: API.Reports = new API.Reports(this);
237
273
  selfMailers: API.SelfMailers = new API.SelfMailers(this);
274
+ mailingListImports: API.MailingListImports = new API.MailingListImports(this);
275
+ mailingLists: API.MailingLists = new API.MailingLists(this);
276
+ orderProfiles: API.OrderProfiles = new API.OrderProfiles(this);
277
+ subOrganizations: API.SubOrganizations = new API.SubOrganizations(this);
278
+
279
+ /**
280
+ * Check whether the base URL is set to its default.
281
+ */
282
+ #baseURLOverridden(): boolean {
283
+ return this.baseURL !== 'https://api.postgrid.com/print-mail/v1';
284
+ }
238
285
 
239
286
  protected override defaultQuery(): Core.DefaultQuery | undefined {
240
287
  return this._options.defaultQuery;
@@ -251,6 +298,10 @@ export class PostGrid extends Core.APIClient {
251
298
  return { 'X-API-Key': this.apiKey };
252
299
  }
253
300
 
301
+ protected override stringifyQuery(query: Record<string, unknown>): string {
302
+ return qs.stringify(query, { arrayFormat: 'comma' });
303
+ }
304
+
254
305
  static PostGrid = this;
255
306
  static DEFAULT_TIMEOUT = 60000; // 1 minute
256
307
 
@@ -292,6 +343,13 @@ PostGrid.Reports = Reports;
292
343
  PostGrid.ReportListResponsesList = ReportListResponsesList;
293
344
  PostGrid.SelfMailers = SelfMailers;
294
345
  PostGrid.SelfMailerListResponsesList = SelfMailerListResponsesList;
346
+ PostGrid.MailingListImports = MailingListImports;
347
+ PostGrid.MailingListImportListResponsesList = MailingListImportListResponsesList;
348
+ PostGrid.MailingLists = MailingLists;
349
+ PostGrid.MailingListListResponsesList = MailingListListResponsesList;
350
+ PostGrid.OrderProfiles = OrderProfiles;
351
+ PostGrid.SubOrganizations = SubOrganizations;
352
+ PostGrid.SubOrganizationListResponsesList = SubOrganizationListResponsesList;
295
353
  export declare namespace PostGrid {
296
354
  export type RequestOptions = Core.RequestOptions;
297
355
 
@@ -406,11 +464,54 @@ export declare namespace PostGrid {
406
464
  type SelfMailerRetrieveResponse as SelfMailerRetrieveResponse,
407
465
  type SelfMailerListResponse as SelfMailerListResponse,
408
466
  type SelfMailerCancelResponse as SelfMailerCancelResponse,
467
+ type SelfMailerRetrievePreviewURLResponse as SelfMailerRetrievePreviewURLResponse,
409
468
  SelfMailerListResponsesList as SelfMailerListResponsesList,
410
469
  type SelfMailerCreateParams as SelfMailerCreateParams,
411
470
  type SelfMailerListParams as SelfMailerListParams,
412
471
  };
413
472
 
473
+ export {
474
+ MailingListImports as MailingListImports,
475
+ type MailingListImportCreateResponse as MailingListImportCreateResponse,
476
+ type MailingListImportRetrieveResponse as MailingListImportRetrieveResponse,
477
+ type MailingListImportUpdateResponse as MailingListImportUpdateResponse,
478
+ type MailingListImportListResponse as MailingListImportListResponse,
479
+ type MailingListImportDeleteResponse as MailingListImportDeleteResponse,
480
+ MailingListImportListResponsesList as MailingListImportListResponsesList,
481
+ type MailingListImportCreateParams as MailingListImportCreateParams,
482
+ type MailingListImportUpdateParams as MailingListImportUpdateParams,
483
+ type MailingListImportListParams as MailingListImportListParams,
484
+ };
485
+
486
+ export {
487
+ MailingLists as MailingLists,
488
+ type MailingListCreateResponse as MailingListCreateResponse,
489
+ type MailingListRetrieveResponse as MailingListRetrieveResponse,
490
+ type MailingListUpdateResponse as MailingListUpdateResponse,
491
+ type MailingListListResponse as MailingListListResponse,
492
+ type MailingListDeleteResponse as MailingListDeleteResponse,
493
+ type MailingListSubmitJobResponse as MailingListSubmitJobResponse,
494
+ MailingListListResponsesList as MailingListListResponsesList,
495
+ type MailingListCreateParams as MailingListCreateParams,
496
+ type MailingListUpdateParams as MailingListUpdateParams,
497
+ type MailingListListParams as MailingListListParams,
498
+ type MailingListSubmitJobParams as MailingListSubmitJobParams,
499
+ };
500
+
501
+ export { OrderProfiles as OrderProfiles };
502
+
503
+ export {
504
+ SubOrganizations as SubOrganizations,
505
+ type SubOrganizationCreateResponse as SubOrganizationCreateResponse,
506
+ type SubOrganizationRetrieveResponse as SubOrganizationRetrieveResponse,
507
+ type SubOrganizationListResponse as SubOrganizationListResponse,
508
+ type SubOrganizationListUsersResponse as SubOrganizationListUsersResponse,
509
+ SubOrganizationListResponsesList as SubOrganizationListResponsesList,
510
+ type SubOrganizationCreateParams as SubOrganizationCreateParams,
511
+ type SubOrganizationListParams as SubOrganizationListParams,
512
+ type SubOrganizationListUsersParams as SubOrganizationListUsersParams,
513
+ };
514
+
414
515
  export type Cancellation = API.Cancellation;
415
516
  export type ContactCreateWithCompanyName = API.ContactCreateWithCompanyName;
416
517
  export type ContactCreateWithFirstName = API.ContactCreateWithFirstName;
@@ -0,0 +1,13 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/puruvj/neoqs/graphs/contributors) All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
+
7
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10
+
11
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,3 @@
1
+ # qs
2
+
3
+ This is a vendored version of [neoqs](https://github.com/PuruVJ/neoqs) which is a TypeScript rewrite of [qs](https://github.com/ljharb/qs), a query string library.
@@ -0,0 +1,9 @@
1
+ import type { Format } from './types';
2
+
3
+ export const default_format: Format = 'RFC3986';
4
+ export const formatters: Record<Format, (str: PropertyKey) => string> = {
5
+ RFC1738: (v: PropertyKey) => String(v).replace(/%20/g, '+'),
6
+ RFC3986: (v: PropertyKey) => String(v),
7
+ };
8
+ export const RFC1738 = 'RFC1738';
9
+ export const RFC3986 = 'RFC3986';
@@ -0,0 +1,13 @@
1
+ import { default_format, formatters, RFC1738, RFC3986 } from './formats';
2
+
3
+ const formats = {
4
+ formatters,
5
+ RFC1738,
6
+ RFC3986,
7
+ default: default_format,
8
+ };
9
+
10
+ export { stringify } from './stringify';
11
+ export { formats };
12
+
13
+ export type { DefaultDecoder, DefaultEncoder, Format, ParseOptions, StringifyOptions } from './types';