@crevio/sdk 0.4.8 → 0.4.11

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 (290) hide show
  1. package/README.md +1 -1
  2. package/dist/commonjs/funcs/blogPostsGet.d.ts +1 -1
  3. package/dist/commonjs/funcs/blogPostsGet.js +3 -3
  4. package/dist/commonjs/funcs/blogPostsGet.js.map +1 -1
  5. package/dist/commonjs/funcs/blogPostsList.d.ts +1 -1
  6. package/dist/commonjs/funcs/blogPostsList.js +2 -1
  7. package/dist/commonjs/funcs/blogPostsList.js.map +1 -1
  8. package/dist/commonjs/funcs/experiencesGet.js +2 -2
  9. package/dist/commonjs/funcs/experiencesGet.js.map +1 -1
  10. package/dist/commonjs/funcs/filesGet.d.ts +1 -1
  11. package/dist/commonjs/funcs/filesGet.js +1 -1
  12. package/dist/commonjs/funcs/productsDelete.js +2 -2
  13. package/dist/commonjs/funcs/productsDelete.js.map +1 -1
  14. package/dist/commonjs/funcs/productsGet.js +2 -2
  15. package/dist/commonjs/funcs/productsGet.js.map +1 -1
  16. package/dist/commonjs/funcs/productsRequestX402Access.js +2 -2
  17. package/dist/commonjs/funcs/productsRequestX402Access.js.map +1 -1
  18. package/dist/commonjs/funcs/productsUpdate.js +2 -2
  19. package/dist/commonjs/funcs/productsUpdate.js.map +1 -1
  20. package/dist/commonjs/lib/config.d.ts +3 -3
  21. package/dist/commonjs/lib/config.js +3 -3
  22. package/dist/commonjs/lib/config.js.map +1 -1
  23. package/dist/commonjs/lib/encodings.d.ts.map +1 -1
  24. package/dist/commonjs/lib/encodings.js +20 -5
  25. package/dist/commonjs/lib/encodings.js.map +1 -1
  26. package/dist/commonjs/models/cartcreaterequest.d.ts +1 -1
  27. package/dist/commonjs/models/checkoutcreaterequest.d.ts +1 -1
  28. package/dist/commonjs/models/checkoutlink.d.ts +2 -2
  29. package/dist/commonjs/models/checkoutlinkrequest.d.ts +1 -1
  30. package/dist/commonjs/models/invoice.d.ts +6 -6
  31. package/dist/commonjs/models/invoicerequest.d.ts +2 -2
  32. package/dist/commonjs/models/operations/cancelsubscription.d.ts +1 -1
  33. package/dist/commonjs/models/operations/deletecart.d.ts +1 -1
  34. package/dist/commonjs/models/operations/deletecheckoutlink.d.ts +1 -1
  35. package/dist/commonjs/models/operations/deletediscount.d.ts +1 -1
  36. package/dist/commonjs/models/operations/deletefile.d.ts +1 -1
  37. package/dist/commonjs/models/operations/deleteproduct.d.ts +3 -3
  38. package/dist/commonjs/models/operations/deleteproduct.d.ts.map +1 -1
  39. package/dist/commonjs/models/operations/deleteproduct.js +6 -1
  40. package/dist/commonjs/models/operations/deleteproduct.js.map +1 -1
  41. package/dist/commonjs/models/operations/deletewebhookendpoint.d.ts +1 -1
  42. package/dist/commonjs/models/operations/getblogpost.d.ts +3 -3
  43. package/dist/commonjs/models/operations/getblogpost.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/getblogpost.js +6 -1
  45. package/dist/commonjs/models/operations/getblogpost.js.map +1 -1
  46. package/dist/commonjs/models/operations/getcart.d.ts +1 -1
  47. package/dist/commonjs/models/operations/getcheckout.d.ts +1 -1
  48. package/dist/commonjs/models/operations/getcheckoutlink.d.ts +1 -1
  49. package/dist/commonjs/models/operations/getcustomer.d.ts +1 -1
  50. package/dist/commonjs/models/operations/getdiscount.d.ts +1 -1
  51. package/dist/commonjs/models/operations/getexperience.d.ts +3 -3
  52. package/dist/commonjs/models/operations/getexperience.d.ts.map +1 -1
  53. package/dist/commonjs/models/operations/getexperience.js +6 -1
  54. package/dist/commonjs/models/operations/getexperience.js.map +1 -1
  55. package/dist/commonjs/models/operations/getfile.d.ts +1 -1
  56. package/dist/commonjs/models/operations/getinvoice.d.ts +1 -1
  57. package/dist/commonjs/models/operations/getorder.d.ts +1 -1
  58. package/dist/commonjs/models/operations/getorderitem.d.ts +1 -1
  59. package/dist/commonjs/models/operations/getpricevariant.d.ts +1 -1
  60. package/dist/commonjs/models/operations/getproduct.d.ts +3 -3
  61. package/dist/commonjs/models/operations/getproduct.d.ts.map +1 -1
  62. package/dist/commonjs/models/operations/getproduct.js +6 -1
  63. package/dist/commonjs/models/operations/getproduct.js.map +1 -1
  64. package/dist/commonjs/models/operations/getreview.d.ts +1 -1
  65. package/dist/commonjs/models/operations/getsubscription.d.ts +1 -1
  66. package/dist/commonjs/models/operations/getwebhookendpoint.d.ts +1 -1
  67. package/dist/commonjs/models/operations/listblogposts.d.ts +22 -1
  68. package/dist/commonjs/models/operations/listblogposts.d.ts.map +1 -1
  69. package/dist/commonjs/models/operations/listblogposts.js +13 -1
  70. package/dist/commonjs/models/operations/listblogposts.js.map +1 -1
  71. package/dist/commonjs/models/operations/listcheckoutlinks.d.ts +1 -1
  72. package/dist/commonjs/models/operations/listcustomers.d.ts +1 -1
  73. package/dist/commonjs/models/operations/listdiscounts.d.ts +1 -1
  74. package/dist/commonjs/models/operations/listexperiences.d.ts +1 -1
  75. package/dist/commonjs/models/operations/listfiles.d.ts +1 -1
  76. package/dist/commonjs/models/operations/listinvoices.d.ts +2 -2
  77. package/dist/commonjs/models/operations/listorders.d.ts +2 -2
  78. package/dist/commonjs/models/operations/listpricevariants.d.ts +2 -2
  79. package/dist/commonjs/models/operations/listproducts.d.ts +1 -1
  80. package/dist/commonjs/models/operations/listreviews.d.ts +2 -2
  81. package/dist/commonjs/models/operations/listsubscriptions.d.ts +1 -1
  82. package/dist/commonjs/models/operations/listwebhookendpoints.d.ts +1 -1
  83. package/dist/commonjs/models/operations/pausesubscription.d.ts +1 -1
  84. package/dist/commonjs/models/operations/payinvoice.d.ts +1 -1
  85. package/dist/commonjs/models/operations/requestx402access.d.ts +4 -4
  86. package/dist/commonjs/models/operations/requestx402access.d.ts.map +1 -1
  87. package/dist/commonjs/models/operations/requestx402access.js +2 -1
  88. package/dist/commonjs/models/operations/requestx402access.js.map +1 -1
  89. package/dist/commonjs/models/operations/resumesubscription.d.ts +1 -1
  90. package/dist/commonjs/models/operations/testwebhookendpoint.d.ts +1 -1
  91. package/dist/commonjs/models/operations/updatecart.d.ts +1 -1
  92. package/dist/commonjs/models/operations/updatecheckout.d.ts +1 -1
  93. package/dist/commonjs/models/operations/updatecheckoutlink.d.ts +1 -1
  94. package/dist/commonjs/models/operations/updatecustomer.d.ts +1 -1
  95. package/dist/commonjs/models/operations/updatediscount.d.ts +1 -1
  96. package/dist/commonjs/models/operations/updatepricevariant.d.ts +1 -1
  97. package/dist/commonjs/models/operations/updateproduct.d.ts +3 -3
  98. package/dist/commonjs/models/operations/updateproduct.d.ts.map +1 -1
  99. package/dist/commonjs/models/operations/updateproduct.js +2 -1
  100. package/dist/commonjs/models/operations/updateproduct.js.map +1 -1
  101. package/dist/commonjs/models/operations/updatewebhookendpoint.d.ts +1 -1
  102. package/dist/commonjs/models/operations/voidinvoice.d.ts +1 -1
  103. package/dist/commonjs/models/order.d.ts +2 -2
  104. package/dist/commonjs/models/orderitem.d.ts +6 -6
  105. package/dist/commonjs/models/product.d.ts +2 -2
  106. package/dist/commonjs/sdk/blogposts.d.ts +2 -2
  107. package/dist/commonjs/sdk/blogposts.js +2 -2
  108. package/dist/commonjs/sdk/files.d.ts +1 -1
  109. package/dist/commonjs/sdk/files.js +1 -1
  110. package/dist/esm/funcs/blogPostsGet.d.ts +1 -1
  111. package/dist/esm/funcs/blogPostsGet.js +3 -3
  112. package/dist/esm/funcs/blogPostsGet.js.map +1 -1
  113. package/dist/esm/funcs/blogPostsList.d.ts +1 -1
  114. package/dist/esm/funcs/blogPostsList.js +2 -1
  115. package/dist/esm/funcs/blogPostsList.js.map +1 -1
  116. package/dist/esm/funcs/experiencesGet.js +2 -2
  117. package/dist/esm/funcs/experiencesGet.js.map +1 -1
  118. package/dist/esm/funcs/filesGet.d.ts +1 -1
  119. package/dist/esm/funcs/filesGet.js +1 -1
  120. package/dist/esm/funcs/productsDelete.js +2 -2
  121. package/dist/esm/funcs/productsDelete.js.map +1 -1
  122. package/dist/esm/funcs/productsGet.js +2 -2
  123. package/dist/esm/funcs/productsGet.js.map +1 -1
  124. package/dist/esm/funcs/productsRequestX402Access.js +2 -2
  125. package/dist/esm/funcs/productsRequestX402Access.js.map +1 -1
  126. package/dist/esm/funcs/productsUpdate.js +2 -2
  127. package/dist/esm/funcs/productsUpdate.js.map +1 -1
  128. package/dist/esm/lib/config.d.ts +3 -3
  129. package/dist/esm/lib/config.js +3 -3
  130. package/dist/esm/lib/config.js.map +1 -1
  131. package/dist/esm/lib/encodings.d.ts.map +1 -1
  132. package/dist/esm/lib/encodings.js +20 -5
  133. package/dist/esm/lib/encodings.js.map +1 -1
  134. package/dist/esm/models/cartcreaterequest.d.ts +1 -1
  135. package/dist/esm/models/checkoutcreaterequest.d.ts +1 -1
  136. package/dist/esm/models/checkoutlink.d.ts +2 -2
  137. package/dist/esm/models/checkoutlinkrequest.d.ts +1 -1
  138. package/dist/esm/models/invoice.d.ts +6 -6
  139. package/dist/esm/models/invoicerequest.d.ts +2 -2
  140. package/dist/esm/models/operations/cancelsubscription.d.ts +1 -1
  141. package/dist/esm/models/operations/deletecart.d.ts +1 -1
  142. package/dist/esm/models/operations/deletecheckoutlink.d.ts +1 -1
  143. package/dist/esm/models/operations/deletediscount.d.ts +1 -1
  144. package/dist/esm/models/operations/deletefile.d.ts +1 -1
  145. package/dist/esm/models/operations/deleteproduct.d.ts +3 -3
  146. package/dist/esm/models/operations/deleteproduct.d.ts.map +1 -1
  147. package/dist/esm/models/operations/deleteproduct.js +6 -1
  148. package/dist/esm/models/operations/deleteproduct.js.map +1 -1
  149. package/dist/esm/models/operations/deletewebhookendpoint.d.ts +1 -1
  150. package/dist/esm/models/operations/getblogpost.d.ts +3 -3
  151. package/dist/esm/models/operations/getblogpost.d.ts.map +1 -1
  152. package/dist/esm/models/operations/getblogpost.js +6 -1
  153. package/dist/esm/models/operations/getblogpost.js.map +1 -1
  154. package/dist/esm/models/operations/getcart.d.ts +1 -1
  155. package/dist/esm/models/operations/getcheckout.d.ts +1 -1
  156. package/dist/esm/models/operations/getcheckoutlink.d.ts +1 -1
  157. package/dist/esm/models/operations/getcustomer.d.ts +1 -1
  158. package/dist/esm/models/operations/getdiscount.d.ts +1 -1
  159. package/dist/esm/models/operations/getexperience.d.ts +3 -3
  160. package/dist/esm/models/operations/getexperience.d.ts.map +1 -1
  161. package/dist/esm/models/operations/getexperience.js +6 -1
  162. package/dist/esm/models/operations/getexperience.js.map +1 -1
  163. package/dist/esm/models/operations/getfile.d.ts +1 -1
  164. package/dist/esm/models/operations/getinvoice.d.ts +1 -1
  165. package/dist/esm/models/operations/getorder.d.ts +1 -1
  166. package/dist/esm/models/operations/getorderitem.d.ts +1 -1
  167. package/dist/esm/models/operations/getpricevariant.d.ts +1 -1
  168. package/dist/esm/models/operations/getproduct.d.ts +3 -3
  169. package/dist/esm/models/operations/getproduct.d.ts.map +1 -1
  170. package/dist/esm/models/operations/getproduct.js +6 -1
  171. package/dist/esm/models/operations/getproduct.js.map +1 -1
  172. package/dist/esm/models/operations/getreview.d.ts +1 -1
  173. package/dist/esm/models/operations/getsubscription.d.ts +1 -1
  174. package/dist/esm/models/operations/getwebhookendpoint.d.ts +1 -1
  175. package/dist/esm/models/operations/listblogposts.d.ts +22 -1
  176. package/dist/esm/models/operations/listblogposts.d.ts.map +1 -1
  177. package/dist/esm/models/operations/listblogposts.js +12 -0
  178. package/dist/esm/models/operations/listblogposts.js.map +1 -1
  179. package/dist/esm/models/operations/listcheckoutlinks.d.ts +1 -1
  180. package/dist/esm/models/operations/listcustomers.d.ts +1 -1
  181. package/dist/esm/models/operations/listdiscounts.d.ts +1 -1
  182. package/dist/esm/models/operations/listexperiences.d.ts +1 -1
  183. package/dist/esm/models/operations/listfiles.d.ts +1 -1
  184. package/dist/esm/models/operations/listinvoices.d.ts +2 -2
  185. package/dist/esm/models/operations/listorders.d.ts +2 -2
  186. package/dist/esm/models/operations/listpricevariants.d.ts +2 -2
  187. package/dist/esm/models/operations/listproducts.d.ts +1 -1
  188. package/dist/esm/models/operations/listreviews.d.ts +2 -2
  189. package/dist/esm/models/operations/listsubscriptions.d.ts +1 -1
  190. package/dist/esm/models/operations/listwebhookendpoints.d.ts +1 -1
  191. package/dist/esm/models/operations/pausesubscription.d.ts +1 -1
  192. package/dist/esm/models/operations/payinvoice.d.ts +1 -1
  193. package/dist/esm/models/operations/requestx402access.d.ts +4 -4
  194. package/dist/esm/models/operations/requestx402access.d.ts.map +1 -1
  195. package/dist/esm/models/operations/requestx402access.js +2 -1
  196. package/dist/esm/models/operations/requestx402access.js.map +1 -1
  197. package/dist/esm/models/operations/resumesubscription.d.ts +1 -1
  198. package/dist/esm/models/operations/testwebhookendpoint.d.ts +1 -1
  199. package/dist/esm/models/operations/updatecart.d.ts +1 -1
  200. package/dist/esm/models/operations/updatecheckout.d.ts +1 -1
  201. package/dist/esm/models/operations/updatecheckoutlink.d.ts +1 -1
  202. package/dist/esm/models/operations/updatecustomer.d.ts +1 -1
  203. package/dist/esm/models/operations/updatediscount.d.ts +1 -1
  204. package/dist/esm/models/operations/updatepricevariant.d.ts +1 -1
  205. package/dist/esm/models/operations/updateproduct.d.ts +3 -3
  206. package/dist/esm/models/operations/updateproduct.d.ts.map +1 -1
  207. package/dist/esm/models/operations/updateproduct.js +2 -1
  208. package/dist/esm/models/operations/updateproduct.js.map +1 -1
  209. package/dist/esm/models/operations/updatewebhookendpoint.d.ts +1 -1
  210. package/dist/esm/models/operations/voidinvoice.d.ts +1 -1
  211. package/dist/esm/models/order.d.ts +2 -2
  212. package/dist/esm/models/orderitem.d.ts +6 -6
  213. package/dist/esm/models/product.d.ts +2 -2
  214. package/dist/esm/sdk/blogposts.d.ts +2 -2
  215. package/dist/esm/sdk/blogposts.js +2 -2
  216. package/dist/esm/sdk/files.d.ts +1 -1
  217. package/dist/esm/sdk/files.js +1 -1
  218. package/jsr.json +1 -1
  219. package/package.json +2 -2
  220. package/src/funcs/blogPostsGet.ts +3 -3
  221. package/src/funcs/blogPostsList.ts +2 -1
  222. package/src/funcs/experiencesGet.ts +2 -2
  223. package/src/funcs/filesGet.ts +1 -1
  224. package/src/funcs/productsDelete.ts +2 -2
  225. package/src/funcs/productsGet.ts +2 -2
  226. package/src/funcs/productsRequestX402Access.ts +2 -2
  227. package/src/funcs/productsUpdate.ts +2 -2
  228. package/src/lib/config.ts +3 -3
  229. package/src/lib/encodings.ts +23 -4
  230. package/src/models/cartcreaterequest.ts +1 -1
  231. package/src/models/checkoutcreaterequest.ts +1 -1
  232. package/src/models/checkoutlink.ts +2 -2
  233. package/src/models/checkoutlinkrequest.ts +1 -1
  234. package/src/models/invoice.ts +6 -6
  235. package/src/models/invoicerequest.ts +2 -2
  236. package/src/models/operations/cancelsubscription.ts +1 -1
  237. package/src/models/operations/deletecart.ts +1 -1
  238. package/src/models/operations/deletecheckoutlink.ts +1 -1
  239. package/src/models/operations/deletediscount.ts +1 -1
  240. package/src/models/operations/deletefile.ts +1 -1
  241. package/src/models/operations/deleteproduct.ts +9 -4
  242. package/src/models/operations/deletewebhookendpoint.ts +1 -1
  243. package/src/models/operations/getblogpost.ts +9 -4
  244. package/src/models/operations/getcart.ts +1 -1
  245. package/src/models/operations/getcheckout.ts +1 -1
  246. package/src/models/operations/getcheckoutlink.ts +1 -1
  247. package/src/models/operations/getcustomer.ts +1 -1
  248. package/src/models/operations/getdiscount.ts +1 -1
  249. package/src/models/operations/getexperience.ts +9 -4
  250. package/src/models/operations/getfile.ts +1 -1
  251. package/src/models/operations/getinvoice.ts +1 -1
  252. package/src/models/operations/getorder.ts +1 -1
  253. package/src/models/operations/getorderitem.ts +1 -1
  254. package/src/models/operations/getpricevariant.ts +1 -1
  255. package/src/models/operations/getproduct.ts +9 -4
  256. package/src/models/operations/getreview.ts +1 -1
  257. package/src/models/operations/getsubscription.ts +1 -1
  258. package/src/models/operations/getwebhookendpoint.ts +1 -1
  259. package/src/models/operations/listblogposts.ts +27 -1
  260. package/src/models/operations/listcheckoutlinks.ts +1 -1
  261. package/src/models/operations/listcustomers.ts +1 -1
  262. package/src/models/operations/listdiscounts.ts +1 -1
  263. package/src/models/operations/listexperiences.ts +1 -1
  264. package/src/models/operations/listfiles.ts +1 -1
  265. package/src/models/operations/listinvoices.ts +2 -2
  266. package/src/models/operations/listorders.ts +2 -2
  267. package/src/models/operations/listpricevariants.ts +2 -2
  268. package/src/models/operations/listproducts.ts +1 -1
  269. package/src/models/operations/listreviews.ts +2 -2
  270. package/src/models/operations/listsubscriptions.ts +1 -1
  271. package/src/models/operations/listwebhookendpoints.ts +1 -1
  272. package/src/models/operations/pausesubscription.ts +1 -1
  273. package/src/models/operations/payinvoice.ts +1 -1
  274. package/src/models/operations/requestx402access.ts +6 -5
  275. package/src/models/operations/resumesubscription.ts +1 -1
  276. package/src/models/operations/testwebhookendpoint.ts +1 -1
  277. package/src/models/operations/updatecart.ts +1 -1
  278. package/src/models/operations/updatecheckout.ts +1 -1
  279. package/src/models/operations/updatecheckoutlink.ts +1 -1
  280. package/src/models/operations/updatecustomer.ts +1 -1
  281. package/src/models/operations/updatediscount.ts +1 -1
  282. package/src/models/operations/updatepricevariant.ts +1 -1
  283. package/src/models/operations/updateproduct.ts +5 -4
  284. package/src/models/operations/updatewebhookendpoint.ts +1 -1
  285. package/src/models/operations/voidinvoice.ts +1 -1
  286. package/src/models/order.ts +2 -2
  287. package/src/models/orderitem.ts +6 -6
  288. package/src/models/product.ts +2 -2
  289. package/src/sdk/blogposts.ts +2 -2
  290. package/src/sdk/files.ts +1 -1
@@ -25,7 +25,7 @@ export declare class Files extends ClientSDK {
25
25
  * Get file
26
26
  *
27
27
  * @remarks
28
- * Returns a single file by its prefix ID
28
+ * Returns a single file by its ID
29
29
  */
30
30
  get(request: operations.GetFileRequest, options?: RequestOptions): Promise<models.FileT>;
31
31
  /**
@@ -35,7 +35,7 @@ export class Files extends ClientSDK {
35
35
  * Get file
36
36
  *
37
37
  * @remarks
38
- * Returns a single file by its prefix ID
38
+ * Returns a single file by its ID
39
39
  */
40
40
  async get(request, options) {
41
41
  return unwrapAsync(filesGet(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@crevio/sdk",
5
- "version": "0.4.8",
5
+ "version": "0.4.11",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crevio/sdk",
3
- "version": "0.4.8",
3
+ "version": "0.4.11",
4
4
  "author": "Crevio",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -23,7 +23,7 @@
23
23
  "lint": "eslint --cache --max-warnings=0 src",
24
24
  "build": "tshy",
25
25
  "prepublishOnly": "npm run build",
26
- "generate": "speakeasy run && speakeasy overlay apply -s ../crevio-app/docs/developer/api-reference/openapi.json -o .speakeasy/out.codeSamples.yaml --out ../crevio-app/docs/developer/api-reference/openapi-combined.json && mv ../crevio-app/docs/developer/api-reference/openapi-combined.json ../crevio-app/docs/developer/api-reference/openapi.json",
26
+ "generate": "speakeasy run && jq 'walk(if type == \"object\" then del(.[\"x-codeSamples\"]) else . end)' ../crevio-app/docs/developer/api-reference/openapi.json > ../crevio-app/docs/developer/api-reference/openapi-clean.json && speakeasy overlay apply -s ../crevio-app/docs/developer/api-reference/openapi-clean.json -o .speakeasy/out.codeSamples.yaml --out ../crevio-app/docs/developer/api-reference/openapi.json && rm ../crevio-app/docs/developer/api-reference/openapi-clean.json",
27
27
  "prebuild": "rm -rf .tshy-build .tshy && find . -name '.DS_Store' -type f -delete 2>/dev/null || true"
28
28
  },
29
29
  "peerDependencies": {},
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Get blog post
31
31
  *
32
32
  * @remarks
33
- * Returns a specific published blog post
33
+ * Returns a specific blog post by ID or slug
34
34
  */
35
35
  export function blogPostsGet(
36
36
  client: CrevioCore,
@@ -90,12 +90,12 @@ async function $do(
90
90
  const body = null;
91
91
 
92
92
  const pathParams = {
93
- id: encodeSimple("id", payload.id, {
93
+ id_or_slug: encodeSimple("id_or_slug", payload.id_or_slug, {
94
94
  explode: false,
95
95
  charEncoding: "percent",
96
96
  }),
97
97
  };
98
- const path = pathToFunc("/blog_posts/{id}")(pathParams);
98
+ const path = pathToFunc("/blog_posts/{id_or_slug}")(pathParams);
99
99
 
100
100
  const headers = new Headers(compactMap({
101
101
  Accept: "application/json",
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * List blog posts
31
31
  *
32
32
  * @remarks
33
- * Returns a list of published blog posts
33
+ * Returns a list of blog posts, optionally filtered by status
34
34
  */
35
35
  export function blogPostsList(
36
36
  client: CrevioCore,
@@ -97,6 +97,7 @@ async function $do(
97
97
  "limit": payload?.limit,
98
98
  "query": payload?.query,
99
99
  "starting_after": payload?.starting_after,
100
+ "status": payload?.status,
100
101
  });
101
102
 
102
103
  const headers = new Headers(compactMap({
@@ -90,12 +90,12 @@ async function $do(
90
90
  const body = null;
91
91
 
92
92
  const pathParams = {
93
- id: encodeSimple("id", payload.id, {
93
+ id_or_slug: encodeSimple("id_or_slug", payload.id_or_slug, {
94
94
  explode: false,
95
95
  charEncoding: "percent",
96
96
  }),
97
97
  };
98
- const path = pathToFunc("/experiences/{id}")(pathParams);
98
+ const path = pathToFunc("/experiences/{id_or_slug}")(pathParams);
99
99
 
100
100
  const headers = new Headers(compactMap({
101
101
  Accept: "application/json",
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Get file
31
31
  *
32
32
  * @remarks
33
- * Returns a single file by its prefix ID
33
+ * Returns a single file by its ID
34
34
  */
35
35
  export function filesGet(
36
36
  client: CrevioCore,
@@ -90,12 +90,12 @@ async function $do(
90
90
  const body = null;
91
91
 
92
92
  const pathParams = {
93
- id: encodeSimple("id", payload.id, {
93
+ id_or_slug: encodeSimple("id_or_slug", payload.id_or_slug, {
94
94
  explode: false,
95
95
  charEncoding: "percent",
96
96
  }),
97
97
  };
98
- const path = pathToFunc("/products/{id}")(pathParams);
98
+ const path = pathToFunc("/products/{id_or_slug}")(pathParams);
99
99
 
100
100
  const headers = new Headers(compactMap({
101
101
  Accept: "application/json",
@@ -90,12 +90,12 @@ async function $do(
90
90
  const body = null;
91
91
 
92
92
  const pathParams = {
93
- id: encodeSimple("id", payload.id, {
93
+ id_or_slug: encodeSimple("id_or_slug", payload.id_or_slug, {
94
94
  explode: false,
95
95
  charEncoding: "percent",
96
96
  }),
97
97
  };
98
- const path = pathToFunc("/products/{id}")(pathParams);
98
+ const path = pathToFunc("/products/{id_or_slug}")(pathParams);
99
99
 
100
100
  const query = encodeFormQuery({
101
101
  "expand": payload.expand,
@@ -91,12 +91,12 @@ async function $do(
91
91
  const body = null;
92
92
 
93
93
  const pathParams = {
94
- id: encodeSimple("id", payload.id, {
94
+ id_or_slug: encodeSimple("id_or_slug", payload.id_or_slug, {
95
95
  explode: false,
96
96
  charEncoding: "percent",
97
97
  }),
98
98
  };
99
- const path = pathToFunc("/products/{id}/x402_access")(pathParams);
99
+ const path = pathToFunc("/products/{id_or_slug}/x402_access")(pathParams);
100
100
 
101
101
  const query = encodeFormQuery({
102
102
  "price_variant": payload.price_variant,
@@ -90,12 +90,12 @@ async function $do(
90
90
  const body = encodeJSON("body", payload.ProductRequest, { explode: true });
91
91
 
92
92
  const pathParams = {
93
- id: encodeSimple("id", payload.id, {
93
+ id_or_slug: encodeSimple("id_or_slug", payload.id_or_slug, {
94
94
  explode: false,
95
95
  charEncoding: "percent",
96
96
  }),
97
97
  };
98
- const path = pathToFunc("/products/{id}")(pathParams);
98
+ const path = pathToFunc("/products/{id_or_slug}")(pathParams);
99
99
 
100
100
  const headers = new Headers(compactMap({
101
101
  "Content-Type": "application/json",
package/src/lib/config.ts CHANGED
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "1.0.0",
64
- sdkVersion: "0.4.8",
65
- genVersion: "2.869.3",
66
- userAgent: "speakeasy-sdk/typescript 0.4.8 2.869.3 1.0.0 @crevio/sdk",
64
+ sdkVersion: "0.4.11",
65
+ genVersion: "2.869.23",
66
+ userAgent: "speakeasy-sdk/typescript 0.4.11 2.869.23 1.0.0 @crevio/sdk",
67
67
  } as const;
@@ -479,6 +479,23 @@ export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited);
479
479
  export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited);
480
480
  export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject);
481
481
 
482
+ function isBlobLike(val: unknown): val is Blob {
483
+ if (val instanceof Blob) {
484
+ return true;
485
+ }
486
+
487
+ if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
488
+ return false;
489
+ }
490
+
491
+ const tag = val[Symbol.toStringTag];
492
+ if (tag !== "Blob" && tag !== "File") {
493
+ return false;
494
+ }
495
+
496
+ return "stream" in val && typeof val.stream === "function";
497
+ }
498
+
482
499
  export function appendForm(
483
500
  fd: FormData,
484
501
  key: string,
@@ -487,10 +504,12 @@ export function appendForm(
487
504
  ): void {
488
505
  if (value == null) {
489
506
  return;
490
- } else if (value instanceof Blob && fileName) {
491
- fd.append(key, value, fileName);
492
- } else if (value instanceof Blob) {
493
- fd.append(key, value);
507
+ } else if (isBlobLike(value)) {
508
+ if (fileName) {
509
+ fd.append(key, value as Blob, fileName);
510
+ } else {
511
+ fd.append(key, value as Blob);
512
+ }
494
513
  } else {
495
514
  fd.append(key, String(value));
496
515
  }
@@ -13,7 +13,7 @@ export type CartCreateRequestCartItemsAttribute = {
13
13
 
14
14
  export type CartCreateRequestCart = {
15
15
  /**
16
- * Customer prefix ID
16
+ * Customer ID
17
17
  */
18
18
  customer?: string | undefined;
19
19
  cartItemsAttributes?: Array<CartCreateRequestCartItemsAttribute> | undefined;
@@ -13,7 +13,7 @@ export type LineItem = {
13
13
  export type CheckoutCreateRequestCheckout = {
14
14
  email?: string | null | undefined;
15
15
  /**
16
- * Customer prefix ID
16
+ * Customer ID
17
17
  */
18
18
  customer?: string | null | undefined;
19
19
  discountCode?: string | null | undefined;
@@ -11,7 +11,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
11
11
  import { PriceVariant, PriceVariant$inboundSchema } from "./pricevariant.js";
12
12
 
13
13
  /**
14
- * Prefix ID by default, full object when expanded
14
+ * ID by default, full object when expanded
15
15
  */
16
16
  export type DiscountUnion = Discount | string;
17
17
 
@@ -25,7 +25,7 @@ export type CheckoutLink = {
25
25
  updatedAt: Date;
26
26
  url: string;
27
27
  /**
28
- * Prefix ID by default, full object when expanded
28
+ * ID by default, full object when expanded
29
29
  */
30
30
  discount?: Discount | string | null | undefined;
31
31
  priceVariants?: Array<PriceVariant> | undefined;
@@ -10,7 +10,7 @@ export type Metadata = {};
10
10
  export type CheckoutLinkRequestCheckoutLink = {
11
11
  name?: string | null | undefined;
12
12
  /**
13
- * Discount prefix ID
13
+ * Discount ID
14
14
  */
15
15
  discount?: string | null | undefined;
16
16
  allowDiscountCodes?: boolean | undefined;
@@ -21,17 +21,17 @@ export const InvoiceStatus = {
21
21
  export type InvoiceStatus = ClosedEnum<typeof InvoiceStatus>;
22
22
 
23
23
  /**
24
- * Prefix ID by default, full object when expanded
24
+ * ID by default, full object when expanded
25
25
  */
26
26
  export type InvoiceCustomer = Customer | string;
27
27
 
28
28
  /**
29
- * Prefix ID by default, full object when expanded
29
+ * ID by default, full object when expanded
30
30
  */
31
31
  export type InvoicePriceVariant = PriceVariant | string;
32
32
 
33
33
  /**
34
- * Prefix ID by default, full object when expanded
34
+ * ID by default, full object when expanded
35
35
  */
36
36
  export type InvoiceOrder = Order | string;
37
37
 
@@ -50,15 +50,15 @@ export type Invoice = {
50
50
  currency: string;
51
51
  paidAt: string;
52
52
  /**
53
- * Prefix ID by default, full object when expanded
53
+ * ID by default, full object when expanded
54
54
  */
55
55
  customer?: Customer | string | null | undefined;
56
56
  /**
57
- * Prefix ID by default, full object when expanded
57
+ * ID by default, full object when expanded
58
58
  */
59
59
  priceVariant: PriceVariant | string | null;
60
60
  /**
61
- * Prefix ID by default, full object when expanded
61
+ * ID by default, full object when expanded
62
62
  */
63
63
  order?: Order | string | null | undefined;
64
64
  };
@@ -10,11 +10,11 @@ export type InvoiceRequestInvoice = {
10
10
  emailAddress?: string | null | undefined;
11
11
  description?: string | null | undefined;
12
12
  /**
13
- * Customer prefix ID
13
+ * Customer ID
14
14
  */
15
15
  customer?: string | null | undefined;
16
16
  /**
17
- * Price variant prefix ID
17
+ * Price variant ID
18
18
  */
19
19
  priceVariant?: string | null | undefined;
20
20
  dueAt?: Date | undefined;
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type CancelSubscriptionRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type DeleteCartRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type DeleteCheckoutLinkRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type DeleteDiscountRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type DeleteFileRequest = {
8
8
  /**
9
- * File prefix ID (e.g., "file_abc123")
9
+ * File ID (e.g., "file_abc123")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -3,17 +3,18 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
 
7
8
  export type DeleteProductRequest = {
8
9
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
10
+ * The resource prefix ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
11
  */
11
- id: string;
12
+ idOrSlug: string;
12
13
  };
13
14
 
14
15
  /** @internal */
15
16
  export type DeleteProductRequest$Outbound = {
16
- id: string;
17
+ id_or_slug: string;
17
18
  };
18
19
 
19
20
  /** @internal */
@@ -22,7 +23,11 @@ export const DeleteProductRequest$outboundSchema: z.ZodType<
22
23
  z.ZodTypeDef,
23
24
  DeleteProductRequest
24
25
  > = z.object({
25
- id: z.string(),
26
+ idOrSlug: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ idOrSlug: "id_or_slug",
30
+ });
26
31
  });
27
32
 
28
33
  export function deleteProductRequestToJSON(
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type DeleteWebhookEndpointRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -3,17 +3,18 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
 
7
8
  export type GetBlogPostRequest = {
8
9
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
10
+ * The resource prefix ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
11
  */
11
- id: string;
12
+ idOrSlug: string;
12
13
  };
13
14
 
14
15
  /** @internal */
15
16
  export type GetBlogPostRequest$Outbound = {
16
- id: string;
17
+ id_or_slug: string;
17
18
  };
18
19
 
19
20
  /** @internal */
@@ -22,7 +23,11 @@ export const GetBlogPostRequest$outboundSchema: z.ZodType<
22
23
  z.ZodTypeDef,
23
24
  GetBlogPostRequest
24
25
  > = z.object({
25
- id: z.string(),
26
+ idOrSlug: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ idOrSlug: "id_or_slug",
30
+ });
26
31
  });
27
32
 
28
33
  export function getBlogPostRequestToJSON(
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetCartRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetCheckoutRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetCheckoutLinkRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  /**
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetCustomerRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetDiscountRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -3,17 +3,18 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
 
7
8
  export type GetExperienceRequest = {
8
9
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
10
+ * The resource prefix ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
11
  */
11
- id: string;
12
+ idOrSlug: string;
12
13
  };
13
14
 
14
15
  /** @internal */
15
16
  export type GetExperienceRequest$Outbound = {
16
- id: string;
17
+ id_or_slug: string;
17
18
  };
18
19
 
19
20
  /** @internal */
@@ -22,7 +23,11 @@ export const GetExperienceRequest$outboundSchema: z.ZodType<
22
23
  z.ZodTypeDef,
23
24
  GetExperienceRequest
24
25
  > = z.object({
25
- id: z.string(),
26
+ idOrSlug: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ idOrSlug: "id_or_slug",
30
+ });
26
31
  });
27
32
 
28
33
  export function getExperienceRequestToJSON(
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetFileRequest = {
8
8
  /**
9
- * File prefix ID (e.g., "file_abc123")
9
+ * File ID (e.g., "file_abc123")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetInvoiceRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  /**
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetOrderRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  /**
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetOrderItemRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  /**
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetPriceVariantRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };
@@ -3,12 +3,13 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
 
7
8
  export type GetProductRequest = {
8
9
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
10
+ * The resource prefix ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
11
  */
11
- id: string;
12
+ idOrSlug: string;
12
13
  /**
13
14
  * Comma-separated relations to expand: reviews
14
15
  */
@@ -17,7 +18,7 @@ export type GetProductRequest = {
17
18
 
18
19
  /** @internal */
19
20
  export type GetProductRequest$Outbound = {
20
- id: string;
21
+ id_or_slug: string;
21
22
  expand?: string | undefined;
22
23
  };
23
24
 
@@ -27,8 +28,12 @@ export const GetProductRequest$outboundSchema: z.ZodType<
27
28
  z.ZodTypeDef,
28
29
  GetProductRequest
29
30
  > = z.object({
30
- id: z.string(),
31
+ idOrSlug: z.string(),
31
32
  expand: z.string().optional(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ idOrSlug: "id_or_slug",
36
+ });
32
37
  });
33
38
 
34
39
  export function getProductRequestToJSON(
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type GetReviewRequest = {
8
8
  /**
9
- * The resource prefix ID (e.g., "prod_abc123")
9
+ * The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
10
10
  */
11
11
  id: string;
12
12
  };