@flexprice/sdk 2.0.11 → 2.0.13

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 (289) hide show
  1. package/README.md +78 -0
  2. package/docs/sdk/models/dto-create-customer-request.md +0 -1
  3. package/docs/sdk/models/dto-customer-response.md +1 -0
  4. package/docs/sdk/models/dto-invoice-response.md +1 -0
  5. package/docs/sdk/models/{dto-create-entity-integration-mapping-request.md → dto-link-integration-mapping-request.md} +4 -4
  6. package/docs/sdk/models/dto-link-integration-mapping-response.md +15 -0
  7. package/docs/sdk/models/dto-update-customer-request.md +0 -1
  8. package/docs/sdk/models/invoice-status.md +1 -1
  9. package/docs/sdk/models/schedule-draft-finalization-response.md +16 -0
  10. package/docs/sdk/models/scheduled-task-interval.md +1 -1
  11. package/docs/sdk/models/webhook-dto-alert-webhook-payload.md +1 -1
  12. package/docs/sdk/models/webhook-dto-communication-webhook-payload.md +1 -1
  13. package/docs/sdk/models/webhook-dto-credit-note-webhook-payload.md +1 -1
  14. package/docs/sdk/models/webhook-dto-customer-webhook-payload.md +1 -1
  15. package/docs/sdk/models/webhook-dto-entitlement-webhook-payload.md +1 -1
  16. package/docs/sdk/models/webhook-dto-feature-webhook-payload.md +1 -1
  17. package/docs/sdk/models/webhook-dto-invoice-webhook-payload.md +1 -1
  18. package/docs/sdk/models/webhook-dto-payment-webhook-payload.md +1 -1
  19. package/docs/sdk/models/webhook-dto-subscription-phase-webhook-payload.md +1 -1
  20. package/docs/sdk/models/webhook-dto-subscription-webhook-payload.md +1 -1
  21. package/docs/sdk/models/webhook-dto-transaction-webhook-payload.md +1 -1
  22. package/docs/sdk/models/webhook-dto-wallet-webhook-payload.md +1 -1
  23. package/docs/sdk/models/webhook-event-name.md +17 -0
  24. package/docs/sdks/integrations/README.md +18 -235
  25. package/docs/sdks/scheduledtasks/README.md +73 -2
  26. package/esm/funcs/coupons-create-coupon.d.ts +2 -0
  27. package/esm/funcs/coupons-create-coupon.d.ts.map +1 -1
  28. package/esm/funcs/coupons-create-coupon.js +3 -1
  29. package/esm/funcs/coupons-create-coupon.js.map +1 -1
  30. package/esm/funcs/coupons-delete-coupon.d.ts +2 -0
  31. package/esm/funcs/coupons-delete-coupon.d.ts.map +1 -1
  32. package/esm/funcs/coupons-delete-coupon.js +3 -1
  33. package/esm/funcs/coupons-delete-coupon.js.map +1 -1
  34. package/esm/funcs/coupons-update-coupon.d.ts +2 -0
  35. package/esm/funcs/coupons-update-coupon.d.ts.map +1 -1
  36. package/esm/funcs/coupons-update-coupon.js +3 -1
  37. package/esm/funcs/coupons-update-coupon.js.map +1 -1
  38. package/esm/funcs/credit-notes-create-credit-note.d.ts +2 -0
  39. package/esm/funcs/credit-notes-create-credit-note.d.ts.map +1 -1
  40. package/esm/funcs/credit-notes-create-credit-note.js +3 -1
  41. package/esm/funcs/credit-notes-create-credit-note.js.map +1 -1
  42. package/esm/funcs/credit-notes-process-credit-note.d.ts +2 -0
  43. package/esm/funcs/credit-notes-process-credit-note.d.ts.map +1 -1
  44. package/esm/funcs/credit-notes-process-credit-note.js +3 -1
  45. package/esm/funcs/credit-notes-process-credit-note.js.map +1 -1
  46. package/esm/funcs/credit-notes-void-credit-note.d.ts +2 -0
  47. package/esm/funcs/credit-notes-void-credit-note.d.ts.map +1 -1
  48. package/esm/funcs/credit-notes-void-credit-note.js +3 -1
  49. package/esm/funcs/credit-notes-void-credit-note.js.map +1 -1
  50. package/esm/funcs/{integrations-get-integration.d.ts → integrations-link-integration-mapping.d.ts} +4 -4
  51. package/esm/funcs/integrations-link-integration-mapping.d.ts.map +1 -0
  52. package/esm/funcs/{entity-integration-mappings-create-entity-integration-mapping.js → integrations-link-integration-mapping.js} +9 -9
  53. package/esm/funcs/integrations-link-integration-mapping.js.map +1 -0
  54. package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts +17 -0
  55. package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts.map +1 -0
  56. package/esm/funcs/{integrations-list-linked-integrations.js → scheduled-tasks-schedule-draft-finalization.js} +9 -9
  57. package/esm/funcs/scheduled-tasks-schedule-draft-finalization.js.map +1 -0
  58. package/esm/lib/config.d.ts +3 -3
  59. package/esm/lib/config.js +3 -3
  60. package/esm/lib/config.js.map +1 -1
  61. package/esm/lib/security.d.ts +1 -1
  62. package/esm/lib/security.d.ts.map +1 -1
  63. package/esm/lib/security.js +19 -8
  64. package/esm/lib/security.js.map +1 -1
  65. package/esm/sdk/integrations.d.ts +3 -24
  66. package/esm/sdk/integrations.d.ts.map +1 -1
  67. package/esm/sdk/integrations.js +5 -35
  68. package/esm/sdk/integrations.js.map +1 -1
  69. package/esm/sdk/models/dto-create-customer-request.d.ts +0 -6
  70. package/esm/sdk/models/dto-create-customer-request.d.ts.map +1 -1
  71. package/esm/sdk/models/dto-create-customer-request.js +0 -3
  72. package/esm/sdk/models/dto-create-customer-request.js.map +1 -1
  73. package/esm/sdk/models/dto-customer-response.d.ts +2 -0
  74. package/esm/sdk/models/dto-customer-response.d.ts.map +1 -1
  75. package/esm/sdk/models/dto-customer-response.js +2 -0
  76. package/esm/sdk/models/dto-customer-response.js.map +1 -1
  77. package/esm/sdk/models/dto-invoice-response.d.ts +4 -0
  78. package/esm/sdk/models/dto-invoice-response.d.ts.map +1 -1
  79. package/esm/sdk/models/dto-invoice-response.js +2 -0
  80. package/esm/sdk/models/dto-invoice-response.js.map +1 -1
  81. package/esm/sdk/models/dto-link-integration-mapping-request.d.ts +25 -0
  82. package/esm/sdk/models/dto-link-integration-mapping-request.d.ts.map +1 -0
  83. package/esm/sdk/models/{dto-create-entity-integration-mapping-request.js → dto-link-integration-mapping-request.js} +4 -4
  84. package/esm/sdk/models/dto-link-integration-mapping-request.js.map +1 -0
  85. package/esm/sdk/models/dto-link-integration-mapping-response.d.ts +11 -0
  86. package/esm/sdk/models/dto-link-integration-mapping-response.d.ts.map +1 -0
  87. package/esm/sdk/models/dto-link-integration-mapping-response.js +15 -0
  88. package/esm/sdk/models/dto-link-integration-mapping-response.js.map +1 -0
  89. package/esm/sdk/models/dto-update-customer-request.d.ts +0 -6
  90. package/esm/sdk/models/dto-update-customer-request.d.ts.map +1 -1
  91. package/esm/sdk/models/dto-update-customer-request.js +0 -3
  92. package/esm/sdk/models/dto-update-customer-request.js.map +1 -1
  93. package/esm/sdk/models/index.d.ts +4 -8
  94. package/esm/sdk/models/index.d.ts.map +1 -1
  95. package/esm/sdk/models/index.js +4 -8
  96. package/esm/sdk/models/index.js.map +1 -1
  97. package/esm/sdk/models/invoice-status.d.ts +1 -0
  98. package/esm/sdk/models/invoice-status.d.ts.map +1 -1
  99. package/esm/sdk/models/invoice-status.js +1 -0
  100. package/esm/sdk/models/invoice-status.js.map +1 -1
  101. package/esm/sdk/models/schedule-draft-finalization-op.d.ts +11 -0
  102. package/esm/sdk/models/schedule-draft-finalization-op.d.ts.map +1 -0
  103. package/esm/sdk/models/schedule-draft-finalization-op.js +11 -0
  104. package/esm/sdk/models/schedule-draft-finalization-op.js.map +1 -0
  105. package/esm/sdk/models/scheduled-task-interval.d.ts +1 -0
  106. package/esm/sdk/models/scheduled-task-interval.d.ts.map +1 -1
  107. package/esm/sdk/models/scheduled-task-interval.js +1 -0
  108. package/esm/sdk/models/scheduled-task-interval.js.map +1 -1
  109. package/esm/sdk/models/secret-provider.d.ts +0 -2
  110. package/esm/sdk/models/secret-provider.d.ts.map +1 -1
  111. package/esm/sdk/models/secret-provider.js +0 -2
  112. package/esm/sdk/models/secret-provider.js.map +1 -1
  113. package/esm/sdk/models/webhook-dto-alert-webhook-payload.d.ts +2 -1
  114. package/esm/sdk/models/webhook-dto-alert-webhook-payload.d.ts.map +1 -1
  115. package/esm/sdk/models/webhook-dto-alert-webhook-payload.js +2 -1
  116. package/esm/sdk/models/webhook-dto-alert-webhook-payload.js.map +1 -1
  117. package/esm/sdk/models/webhook-dto-communication-webhook-payload.d.ts +2 -1
  118. package/esm/sdk/models/webhook-dto-communication-webhook-payload.d.ts.map +1 -1
  119. package/esm/sdk/models/webhook-dto-communication-webhook-payload.js +2 -1
  120. package/esm/sdk/models/webhook-dto-communication-webhook-payload.js.map +1 -1
  121. package/esm/sdk/models/webhook-dto-credit-note-webhook-payload.d.ts +2 -1
  122. package/esm/sdk/models/webhook-dto-credit-note-webhook-payload.d.ts.map +1 -1
  123. package/esm/sdk/models/webhook-dto-credit-note-webhook-payload.js +2 -1
  124. package/esm/sdk/models/webhook-dto-credit-note-webhook-payload.js.map +1 -1
  125. package/esm/sdk/models/webhook-dto-customer-webhook-payload.d.ts +2 -1
  126. package/esm/sdk/models/webhook-dto-customer-webhook-payload.d.ts.map +1 -1
  127. package/esm/sdk/models/webhook-dto-customer-webhook-payload.js +2 -1
  128. package/esm/sdk/models/webhook-dto-customer-webhook-payload.js.map +1 -1
  129. package/esm/sdk/models/webhook-dto-entitlement-webhook-payload.d.ts +2 -1
  130. package/esm/sdk/models/webhook-dto-entitlement-webhook-payload.d.ts.map +1 -1
  131. package/esm/sdk/models/webhook-dto-entitlement-webhook-payload.js +2 -1
  132. package/esm/sdk/models/webhook-dto-entitlement-webhook-payload.js.map +1 -1
  133. package/esm/sdk/models/webhook-dto-feature-webhook-payload.d.ts +2 -1
  134. package/esm/sdk/models/webhook-dto-feature-webhook-payload.d.ts.map +1 -1
  135. package/esm/sdk/models/webhook-dto-feature-webhook-payload.js +2 -1
  136. package/esm/sdk/models/webhook-dto-feature-webhook-payload.js.map +1 -1
  137. package/esm/sdk/models/webhook-dto-invoice-webhook-payload.d.ts +2 -1
  138. package/esm/sdk/models/webhook-dto-invoice-webhook-payload.d.ts.map +1 -1
  139. package/esm/sdk/models/webhook-dto-invoice-webhook-payload.js +2 -1
  140. package/esm/sdk/models/webhook-dto-invoice-webhook-payload.js.map +1 -1
  141. package/esm/sdk/models/webhook-dto-payment-webhook-payload.d.ts +2 -1
  142. package/esm/sdk/models/webhook-dto-payment-webhook-payload.d.ts.map +1 -1
  143. package/esm/sdk/models/webhook-dto-payment-webhook-payload.js +2 -1
  144. package/esm/sdk/models/webhook-dto-payment-webhook-payload.js.map +1 -1
  145. package/esm/sdk/models/webhook-dto-subscription-phase-webhook-payload.d.ts +2 -1
  146. package/esm/sdk/models/webhook-dto-subscription-phase-webhook-payload.d.ts.map +1 -1
  147. package/esm/sdk/models/webhook-dto-subscription-phase-webhook-payload.js +2 -1
  148. package/esm/sdk/models/webhook-dto-subscription-phase-webhook-payload.js.map +1 -1
  149. package/esm/sdk/models/webhook-dto-subscription-webhook-payload.d.ts +2 -1
  150. package/esm/sdk/models/webhook-dto-subscription-webhook-payload.d.ts.map +1 -1
  151. package/esm/sdk/models/webhook-dto-subscription-webhook-payload.js +2 -1
  152. package/esm/sdk/models/webhook-dto-subscription-webhook-payload.js.map +1 -1
  153. package/esm/sdk/models/webhook-dto-transaction-webhook-payload.d.ts +2 -1
  154. package/esm/sdk/models/webhook-dto-transaction-webhook-payload.d.ts.map +1 -1
  155. package/esm/sdk/models/webhook-dto-transaction-webhook-payload.js +2 -1
  156. package/esm/sdk/models/webhook-dto-transaction-webhook-payload.js.map +1 -1
  157. package/esm/sdk/models/webhook-dto-wallet-webhook-payload.d.ts +2 -1
  158. package/esm/sdk/models/webhook-dto-wallet-webhook-payload.d.ts.map +1 -1
  159. package/esm/sdk/models/webhook-dto-wallet-webhook-payload.js +2 -1
  160. package/esm/sdk/models/webhook-dto-wallet-webhook-payload.js.map +1 -1
  161. package/esm/sdk/models/webhook-event-name.d.ts +51 -0
  162. package/esm/sdk/models/webhook-event-name.d.ts.map +1 -0
  163. package/esm/sdk/models/webhook-event-name.js +52 -0
  164. package/esm/sdk/models/webhook-event-name.js.map +1 -0
  165. package/esm/sdk/scheduled-tasks.d.ts +7 -0
  166. package/esm/sdk/scheduled-tasks.d.ts.map +1 -1
  167. package/esm/sdk/scheduled-tasks.js +10 -0
  168. package/esm/sdk/scheduled-tasks.js.map +1 -1
  169. package/esm/sdk/sdk.d.ts +2 -5
  170. package/esm/sdk/sdk.d.ts.map +1 -1
  171. package/esm/sdk/sdk.js +4 -9
  172. package/esm/sdk/sdk.js.map +1 -1
  173. package/jsr.json +1 -1
  174. package/package.json +1 -1
  175. package/src/funcs/coupons-create-coupon.ts +3 -1
  176. package/src/funcs/coupons-delete-coupon.ts +3 -1
  177. package/src/funcs/coupons-update-coupon.ts +3 -1
  178. package/src/funcs/credit-notes-create-credit-note.ts +3 -1
  179. package/src/funcs/credit-notes-process-credit-note.ts +3 -1
  180. package/src/funcs/credit-notes-void-credit-note.ts +3 -1
  181. package/src/funcs/{entity-integration-mappings-create-entity-integration-mapping.ts → integrations-link-integration-mapping.ts} +14 -17
  182. package/src/funcs/{integrations-list-linked-integrations.ts → scheduled-tasks-schedule-draft-finalization.ts} +12 -11
  183. package/src/lib/config.ts +3 -3
  184. package/src/lib/security.ts +14 -2
  185. package/src/sdk/integrations.ts +8 -62
  186. package/src/sdk/models/dto-create-customer-request.ts +0 -16
  187. package/src/sdk/models/dto-customer-response.ts +8 -0
  188. package/src/sdk/models/dto-invoice-response.ts +6 -0
  189. package/src/sdk/models/dto-link-integration-mapping-request.ts +59 -0
  190. package/src/sdk/models/dto-link-integration-mapping-response.ts +35 -0
  191. package/src/sdk/models/dto-update-customer-request.ts +0 -16
  192. package/src/sdk/models/index.ts +4 -8
  193. package/src/sdk/models/invoice-status.ts +1 -0
  194. package/src/sdk/models/schedule-draft-finalization-op.ts +29 -0
  195. package/src/sdk/models/scheduled-task-interval.ts +1 -0
  196. package/src/sdk/models/secret-provider.ts +0 -5
  197. package/src/sdk/models/webhook-dto-alert-webhook-payload.ts +6 -2
  198. package/src/sdk/models/webhook-dto-communication-webhook-payload.ts +6 -2
  199. package/src/sdk/models/webhook-dto-credit-note-webhook-payload.ts +6 -2
  200. package/src/sdk/models/webhook-dto-customer-webhook-payload.ts +6 -2
  201. package/src/sdk/models/webhook-dto-entitlement-webhook-payload.ts +6 -2
  202. package/src/sdk/models/webhook-dto-feature-webhook-payload.ts +6 -2
  203. package/src/sdk/models/webhook-dto-invoice-webhook-payload.ts +6 -2
  204. package/src/sdk/models/webhook-dto-payment-webhook-payload.ts +6 -2
  205. package/src/sdk/models/webhook-dto-subscription-phase-webhook-payload.ts +6 -2
  206. package/src/sdk/models/webhook-dto-subscription-webhook-payload.ts +6 -2
  207. package/src/sdk/models/webhook-dto-transaction-webhook-payload.ts +6 -2
  208. package/src/sdk/models/webhook-dto-wallet-webhook-payload.ts +6 -2
  209. package/src/sdk/models/webhook-event-name.ts +60 -0
  210. package/src/sdk/scheduled-tasks.ts +16 -0
  211. package/src/sdk/sdk.ts +5 -13
  212. package/docs/sdk/models/create-or-update-integration-request.md +0 -26
  213. package/docs/sdk/models/delete-entity-integration-mapping-request.md +0 -17
  214. package/docs/sdk/models/delete-integration-request.md +0 -17
  215. package/docs/sdk/models/dto-create-integration-request.md +0 -21
  216. package/docs/sdk/models/dto-integration-entity-mapping.md +0 -21
  217. package/docs/sdk/models/dto-linked-integrations-response.md +0 -15
  218. package/docs/sdk/models/get-integration-request.md +0 -17
  219. package/docs/sdk/models/provider.md +0 -17
  220. package/docs/sdks/entityintegrationmappings/README.md +0 -160
  221. package/esm/funcs/entity-integration-mappings-create-entity-integration-mapping.d.ts +0 -17
  222. package/esm/funcs/entity-integration-mappings-create-entity-integration-mapping.d.ts.map +0 -1
  223. package/esm/funcs/entity-integration-mappings-create-entity-integration-mapping.js.map +0 -1
  224. package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.d.ts +0 -17
  225. package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.d.ts.map +0 -1
  226. package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.js +0 -90
  227. package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.js.map +0 -1
  228. package/esm/funcs/integrations-create-or-update-integration.d.ts +0 -17
  229. package/esm/funcs/integrations-create-or-update-integration.d.ts.map +0 -1
  230. package/esm/funcs/integrations-create-or-update-integration.js +0 -92
  231. package/esm/funcs/integrations-create-or-update-integration.js.map +0 -1
  232. package/esm/funcs/integrations-delete-integration.d.ts +0 -17
  233. package/esm/funcs/integrations-delete-integration.d.ts.map +0 -1
  234. package/esm/funcs/integrations-delete-integration.js +0 -90
  235. package/esm/funcs/integrations-delete-integration.js.map +0 -1
  236. package/esm/funcs/integrations-get-integration.d.ts.map +0 -1
  237. package/esm/funcs/integrations-get-integration.js +0 -90
  238. package/esm/funcs/integrations-get-integration.js.map +0 -1
  239. package/esm/funcs/integrations-list-linked-integrations.d.ts +0 -17
  240. package/esm/funcs/integrations-list-linked-integrations.d.ts.map +0 -1
  241. package/esm/funcs/integrations-list-linked-integrations.js.map +0 -1
  242. package/esm/sdk/entity-integration-mappings.d.ts +0 -19
  243. package/esm/sdk/entity-integration-mappings.d.ts.map +0 -1
  244. package/esm/sdk/entity-integration-mappings.js +0 -28
  245. package/esm/sdk/entity-integration-mappings.js.map +0 -1
  246. package/esm/sdk/models/create-or-update-integration-op.d.ts +0 -21
  247. package/esm/sdk/models/create-or-update-integration-op.d.ts.map +0 -1
  248. package/esm/sdk/models/create-or-update-integration-op.js +0 -14
  249. package/esm/sdk/models/create-or-update-integration-op.js.map +0 -1
  250. package/esm/sdk/models/delete-entity-integration-mapping-op.d.ts +0 -15
  251. package/esm/sdk/models/delete-entity-integration-mapping-op.d.ts.map +0 -1
  252. package/esm/sdk/models/delete-entity-integration-mapping-op.js +0 -12
  253. package/esm/sdk/models/delete-entity-integration-mapping-op.js.map +0 -1
  254. package/esm/sdk/models/delete-integration-op.d.ts +0 -15
  255. package/esm/sdk/models/delete-integration-op.d.ts.map +0 -1
  256. package/esm/sdk/models/delete-integration-op.js +0 -12
  257. package/esm/sdk/models/delete-integration-op.js.map +0 -1
  258. package/esm/sdk/models/dto-create-entity-integration-mapping-request.d.ts +0 -25
  259. package/esm/sdk/models/dto-create-entity-integration-mapping-request.d.ts.map +0 -1
  260. package/esm/sdk/models/dto-create-entity-integration-mapping-request.js.map +0 -1
  261. package/esm/sdk/models/dto-create-integration-request.d.ts +0 -21
  262. package/esm/sdk/models/dto-create-integration-request.d.ts.map +0 -1
  263. package/esm/sdk/models/dto-create-integration-request.js +0 -15
  264. package/esm/sdk/models/dto-create-integration-request.js.map +0 -1
  265. package/esm/sdk/models/dto-integration-entity-mapping.d.ts +0 -38
  266. package/esm/sdk/models/dto-integration-entity-mapping.d.ts.map +0 -1
  267. package/esm/sdk/models/dto-integration-entity-mapping.js +0 -23
  268. package/esm/sdk/models/dto-integration-entity-mapping.js.map +0 -1
  269. package/esm/sdk/models/dto-linked-integrations-response.d.ts +0 -10
  270. package/esm/sdk/models/dto-linked-integrations-response.d.ts.map +0 -1
  271. package/esm/sdk/models/dto-linked-integrations-response.js +0 -14
  272. package/esm/sdk/models/dto-linked-integrations-response.js.map +0 -1
  273. package/esm/sdk/models/get-integration-op.d.ts +0 -15
  274. package/esm/sdk/models/get-integration-op.d.ts.map +0 -1
  275. package/esm/sdk/models/get-integration-op.js +0 -12
  276. package/esm/sdk/models/get-integration-op.js.map +0 -1
  277. package/src/funcs/entity-integration-mappings-delete-entity-integration-mapping.ts +0 -183
  278. package/src/funcs/integrations-create-or-update-integration.ts +0 -187
  279. package/src/funcs/integrations-delete-integration.ts +0 -179
  280. package/src/funcs/integrations-get-integration.ts +0 -181
  281. package/src/sdk/entity-integration-mappings.ts +0 -45
  282. package/src/sdk/models/create-or-update-integration-op.ts +0 -46
  283. package/src/sdk/models/delete-entity-integration-mapping-op.ts +0 -36
  284. package/src/sdk/models/delete-integration-op.ts +0 -33
  285. package/src/sdk/models/dto-create-entity-integration-mapping-request.ts +0 -61
  286. package/src/sdk/models/dto-create-integration-request.ts +0 -42
  287. package/src/sdk/models/dto-integration-entity-mapping.ts +0 -63
  288. package/src/sdk/models/dto-linked-integrations-response.ts +0 -31
  289. package/src/sdk/models/get-integration-op.ts +0 -33
@@ -1,181 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import { FlexpriceCore } from "../core.js";
7
- import { encodeSimple } from "../lib/encodings.js";
8
- import * as M from "../lib/matchers.js";
9
- import { compactMap } from "../lib/primitives.js";
10
- import { safeParse } from "../lib/schemas.js";
11
- import { RequestOptions } from "../lib/sdks.js";
12
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
- import { pathToFunc } from "../lib/url.js";
14
- import { FlexPriceError } from "../sdk/models/flex-price-error.js";
15
- import {
16
- ConnectionError,
17
- InvalidRequestError,
18
- RequestAbortedError,
19
- RequestTimeoutError,
20
- UnexpectedClientError,
21
- } from "../sdk/models/http-client-errors.js";
22
- import * as models from "../sdk/models/index.js";
23
- import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
24
- import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
25
- import { APICall, APIPromise } from "../types/async.js";
26
- import { Result } from "../types/fp.js";
27
-
28
- /**
29
- * Get integration details
30
- *
31
- * @remarks
32
- * Use when you need to check or display integration config (e.g. which provider is linked). Sensitive values may be redacted.
33
- */
34
- export function integrationsGetIntegration(
35
- client: FlexpriceCore,
36
- provider: string,
37
- options?: RequestOptions,
38
- ): APIPromise<
39
- Result<
40
- models.DtoSecretResponse,
41
- | models.ErrorsErrorsErrorResponse
42
- | FlexPriceError
43
- | ResponseValidationError
44
- | ConnectionError
45
- | RequestAbortedError
46
- | RequestTimeoutError
47
- | InvalidRequestError
48
- | UnexpectedClientError
49
- | SDKValidationError
50
- >
51
- > {
52
- return new APIPromise($do(
53
- client,
54
- provider,
55
- options,
56
- ));
57
- }
58
-
59
- async function $do(
60
- client: FlexpriceCore,
61
- provider: string,
62
- options?: RequestOptions,
63
- ): Promise<
64
- [
65
- Result<
66
- models.DtoSecretResponse,
67
- | models.ErrorsErrorsErrorResponse
68
- | FlexPriceError
69
- | ResponseValidationError
70
- | ConnectionError
71
- | RequestAbortedError
72
- | RequestTimeoutError
73
- | InvalidRequestError
74
- | UnexpectedClientError
75
- | SDKValidationError
76
- >,
77
- APICall,
78
- ]
79
- > {
80
- const input: models.GetIntegrationRequest = {
81
- provider: provider,
82
- };
83
-
84
- const parsed = safeParse(
85
- input,
86
- (value) => z.parse(models.GetIntegrationRequest$outboundSchema, value),
87
- "Input validation failed",
88
- );
89
- if (!parsed.ok) {
90
- return [parsed, { status: "invalid" }];
91
- }
92
- const payload = parsed.value;
93
- const body = null;
94
-
95
- const pathParams = {
96
- provider: encodeSimple("provider", payload.provider, {
97
- explode: false,
98
- charEncoding: "percent",
99
- }),
100
- };
101
- const path = pathToFunc("/secrets/integrations/by-provider/{provider}")(
102
- pathParams,
103
- );
104
-
105
- const headers = new Headers(compactMap({
106
- Accept: "application/json",
107
- }));
108
-
109
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
110
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
111
- const requestSecurity = resolveGlobalSecurity(securityInput);
112
-
113
- const context = {
114
- options: client._options,
115
- baseURL: options?.serverURL ?? client._baseURL ?? "",
116
- operationID: "getIntegration",
117
- oAuth2Scopes: null,
118
-
119
- resolvedSecurity: requestSecurity,
120
-
121
- securitySource: client._options.apiKeyAuth,
122
- retryConfig: options?.retries
123
- || client._options.retryConfig
124
- || { strategy: "none" },
125
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
126
- };
127
-
128
- const requestRes = client._createRequest(context, {
129
- security: requestSecurity,
130
- method: "GET",
131
- baseURL: options?.serverURL,
132
- path: path,
133
- headers: headers,
134
- body: body,
135
- userAgent: client._options.userAgent,
136
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
137
- }, options);
138
- if (!requestRes.ok) {
139
- return [requestRes, { status: "invalid" }];
140
- }
141
- const req = requestRes.value;
142
-
143
- const doResult = await client._do(req, {
144
- context,
145
- errorCodes: ["404", "4XX", "500", "5XX"],
146
- retryConfig: context.retryConfig,
147
- retryCodes: context.retryCodes,
148
- });
149
- if (!doResult.ok) {
150
- return [doResult, { status: "request-error", request: req }];
151
- }
152
- const response = doResult.value;
153
-
154
- const responseFields = {
155
- HttpMeta: { Response: response, Request: req },
156
- };
157
-
158
- const [result] = await M.match<
159
- models.DtoSecretResponse,
160
- | models.ErrorsErrorsErrorResponse
161
- | FlexPriceError
162
- | ResponseValidationError
163
- | ConnectionError
164
- | RequestAbortedError
165
- | RequestTimeoutError
166
- | InvalidRequestError
167
- | UnexpectedClientError
168
- | SDKValidationError
169
- >(
170
- M.json(200, models.DtoSecretResponse$inboundSchema),
171
- M.jsonErr(404, models.ErrorsErrorsErrorResponse$inboundSchema),
172
- M.jsonErr(500, models.ErrorsErrorsErrorResponse$inboundSchema),
173
- M.fail("4XX"),
174
- M.fail("5XX"),
175
- )(response, req, { extraFields: responseFields });
176
- if (!result.ok) {
177
- return [result, { status: "complete", request: req, response }];
178
- }
179
-
180
- return [result, { status: "complete", request: req, response }];
181
- }
@@ -1,45 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { entityIntegrationMappingsCreateEntityIntegrationMapping } from "../funcs/entity-integration-mappings-create-entity-integration-mapping.js";
6
- import { entityIntegrationMappingsDeleteEntityIntegrationMapping } from "../funcs/entity-integration-mappings-delete-entity-integration-mapping.js";
7
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
- import { unwrapAsync } from "../types/fp.js";
9
- import * as models from "./models/index.js";
10
-
11
- export class EntityIntegrationMappings extends ClientSDK {
12
- /**
13
- * Create entity integration mapping
14
- *
15
- * @remarks
16
- * Use when linking a FlexPrice entity to an external system (e.g. CRM or payment provider) so you can sync or reconcile by external ID.
17
- */
18
- async createEntityIntegrationMapping(
19
- request: models.DtoCreateEntityIntegrationMappingRequest,
20
- options?: RequestOptions,
21
- ): Promise<models.DtoEntityIntegrationMappingResponse> {
22
- return unwrapAsync(entityIntegrationMappingsCreateEntityIntegrationMapping(
23
- this,
24
- request,
25
- options,
26
- ));
27
- }
28
-
29
- /**
30
- * Delete entity integration mapping
31
- *
32
- * @remarks
33
- * Use when unlinking a FlexPrice entity from an external system or cleaning up stale integration mappings.
34
- */
35
- async deleteEntityIntegrationMapping(
36
- id: string,
37
- options?: RequestOptions,
38
- ): Promise<void> {
39
- return unwrapAsync(entityIntegrationMappingsDeleteEntityIntegrationMapping(
40
- this,
41
- id,
42
- options,
43
- ));
44
- }
45
- }
@@ -1,46 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import {
7
- DtoCreateIntegrationRequest,
8
- DtoCreateIntegrationRequest$Outbound,
9
- DtoCreateIntegrationRequest$outboundSchema,
10
- } from "./dto-create-integration-request.js";
11
-
12
- export type CreateOrUpdateIntegrationRequest = {
13
- /**
14
- * Integration provider
15
- */
16
- provider: string;
17
- /**
18
- * Integration creation request
19
- */
20
- body: DtoCreateIntegrationRequest;
21
- };
22
-
23
- /** @internal */
24
- export type CreateOrUpdateIntegrationRequest$Outbound = {
25
- provider: string;
26
- body: DtoCreateIntegrationRequest$Outbound;
27
- };
28
-
29
- /** @internal */
30
- export const CreateOrUpdateIntegrationRequest$outboundSchema: z.ZodMiniType<
31
- CreateOrUpdateIntegrationRequest$Outbound,
32
- CreateOrUpdateIntegrationRequest
33
- > = z.object({
34
- provider: z.string(),
35
- body: DtoCreateIntegrationRequest$outboundSchema,
36
- });
37
-
38
- export function createOrUpdateIntegrationRequestToJSON(
39
- createOrUpdateIntegrationRequest: CreateOrUpdateIntegrationRequest,
40
- ): string {
41
- return JSON.stringify(
42
- CreateOrUpdateIntegrationRequest$outboundSchema.parse(
43
- createOrUpdateIntegrationRequest,
44
- ),
45
- );
46
- }
@@ -1,36 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
-
7
- export type DeleteEntityIntegrationMappingRequest = {
8
- /**
9
- * Entity integration mapping ID
10
- */
11
- id: string;
12
- };
13
-
14
- /** @internal */
15
- export type DeleteEntityIntegrationMappingRequest$Outbound = {
16
- id: string;
17
- };
18
-
19
- /** @internal */
20
- export const DeleteEntityIntegrationMappingRequest$outboundSchema:
21
- z.ZodMiniType<
22
- DeleteEntityIntegrationMappingRequest$Outbound,
23
- DeleteEntityIntegrationMappingRequest
24
- > = z.object({
25
- id: z.string(),
26
- });
27
-
28
- export function deleteEntityIntegrationMappingRequestToJSON(
29
- deleteEntityIntegrationMappingRequest: DeleteEntityIntegrationMappingRequest,
30
- ): string {
31
- return JSON.stringify(
32
- DeleteEntityIntegrationMappingRequest$outboundSchema.parse(
33
- deleteEntityIntegrationMappingRequest,
34
- ),
35
- );
36
- }
@@ -1,33 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
-
7
- export type DeleteIntegrationRequest = {
8
- /**
9
- * Integration ID
10
- */
11
- id: string;
12
- };
13
-
14
- /** @internal */
15
- export type DeleteIntegrationRequest$Outbound = {
16
- id: string;
17
- };
18
-
19
- /** @internal */
20
- export const DeleteIntegrationRequest$outboundSchema: z.ZodMiniType<
21
- DeleteIntegrationRequest$Outbound,
22
- DeleteIntegrationRequest
23
- > = z.object({
24
- id: z.string(),
25
- });
26
-
27
- export function deleteIntegrationRequestToJSON(
28
- deleteIntegrationRequest: DeleteIntegrationRequest,
29
- ): string {
30
- return JSON.stringify(
31
- DeleteIntegrationRequest$outboundSchema.parse(deleteIntegrationRequest),
32
- );
33
- }
@@ -1,61 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import {
8
- IntegrationEntityType,
9
- IntegrationEntityType$outboundSchema,
10
- } from "./integration-entity-type.js";
11
-
12
- export type DtoCreateEntityIntegrationMappingRequest = {
13
- entityId: string;
14
- entityType: IntegrationEntityType;
15
- metadata?: { [k: string]: any } | undefined;
16
- providerEntityId: string;
17
- providerType: string;
18
- };
19
-
20
- /** @internal */
21
- export type DtoCreateEntityIntegrationMappingRequest$Outbound = {
22
- entity_id: string;
23
- entity_type: string;
24
- metadata?: { [k: string]: any } | undefined;
25
- provider_entity_id: string;
26
- provider_type: string;
27
- };
28
-
29
- /** @internal */
30
- export const DtoCreateEntityIntegrationMappingRequest$outboundSchema:
31
- z.ZodMiniType<
32
- DtoCreateEntityIntegrationMappingRequest$Outbound,
33
- DtoCreateEntityIntegrationMappingRequest
34
- > = z.pipe(
35
- z.object({
36
- entityId: z.string(),
37
- entityType: IntegrationEntityType$outboundSchema,
38
- metadata: z.optional(z.record(z.string(), z.any())),
39
- providerEntityId: z.string(),
40
- providerType: z.string(),
41
- }),
42
- z.transform((v) => {
43
- return remap$(v, {
44
- entityId: "entity_id",
45
- entityType: "entity_type",
46
- providerEntityId: "provider_entity_id",
47
- providerType: "provider_type",
48
- });
49
- }),
50
- );
51
-
52
- export function dtoCreateEntityIntegrationMappingRequestToJSON(
53
- dtoCreateEntityIntegrationMappingRequest:
54
- DtoCreateEntityIntegrationMappingRequest,
55
- ): string {
56
- return JSON.stringify(
57
- DtoCreateEntityIntegrationMappingRequest$outboundSchema.parse(
58
- dtoCreateEntityIntegrationMappingRequest,
59
- ),
60
- );
61
- }
@@ -1,42 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import {
7
- SecretProvider,
8
- SecretProvider$outboundSchema,
9
- } from "./secret-provider.js";
10
-
11
- export type DtoCreateIntegrationRequest = {
12
- credentials: { [k: string]: string };
13
- name: string;
14
- provider: SecretProvider;
15
- };
16
-
17
- /** @internal */
18
- export type DtoCreateIntegrationRequest$Outbound = {
19
- credentials: { [k: string]: string };
20
- name: string;
21
- provider: string;
22
- };
23
-
24
- /** @internal */
25
- export const DtoCreateIntegrationRequest$outboundSchema: z.ZodMiniType<
26
- DtoCreateIntegrationRequest$Outbound,
27
- DtoCreateIntegrationRequest
28
- > = z.object({
29
- credentials: z.record(z.string(), z.string()),
30
- name: z.string(),
31
- provider: SecretProvider$outboundSchema,
32
- });
33
-
34
- export function dtoCreateIntegrationRequestToJSON(
35
- dtoCreateIntegrationRequest: DtoCreateIntegrationRequest,
36
- ): string {
37
- return JSON.stringify(
38
- DtoCreateIntegrationRequest$outboundSchema.parse(
39
- dtoCreateIntegrationRequest,
40
- ),
41
- );
42
- }
@@ -1,63 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import { ClosedEnum } from "../../types/enums.js";
7
-
8
- /**
9
- * provider is the integration provider name (e.g., "stripe", "razorpay")
10
- */
11
- export const Provider = {
12
- Stripe: "stripe",
13
- Razorpay: "razorpay",
14
- Paypal: "paypal",
15
- } as const;
16
- /**
17
- * provider is the integration provider name (e.g., "stripe", "razorpay")
18
- */
19
- export type Provider = ClosedEnum<typeof Provider>;
20
-
21
- /**
22
- * Integration entity mapping for external provider systems
23
- */
24
- export type DtoIntegrationEntityMapping = {
25
- /**
26
- * id is the external entity ID from the provider
27
- */
28
- id: string;
29
- /**
30
- * provider is the integration provider name (e.g., "stripe", "razorpay")
31
- */
32
- provider: Provider;
33
- };
34
-
35
- /** @internal */
36
- export const Provider$outboundSchema: z.ZodMiniEnum<typeof Provider> = z.enum(
37
- Provider,
38
- );
39
-
40
- /** @internal */
41
- export type DtoIntegrationEntityMapping$Outbound = {
42
- id: string;
43
- provider: string;
44
- };
45
-
46
- /** @internal */
47
- export const DtoIntegrationEntityMapping$outboundSchema: z.ZodMiniType<
48
- DtoIntegrationEntityMapping$Outbound,
49
- DtoIntegrationEntityMapping
50
- > = z.object({
51
- id: z.string(),
52
- provider: Provider$outboundSchema,
53
- });
54
-
55
- export function dtoIntegrationEntityMappingToJSON(
56
- dtoIntegrationEntityMapping: DtoIntegrationEntityMapping,
57
- ): string {
58
- return JSON.stringify(
59
- DtoIntegrationEntityMapping$outboundSchema.parse(
60
- dtoIntegrationEntityMapping,
61
- ),
62
- );
63
- }
@@ -1,31 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../../types/fp.js";
8
- import * as types from "../../types/primitives.js";
9
- import { SDKValidationError } from "./sdk-validation-error.js";
10
-
11
- export type DtoLinkedIntegrationsResponse = {
12
- providers?: Array<string> | undefined;
13
- };
14
-
15
- /** @internal */
16
- export const DtoLinkedIntegrationsResponse$inboundSchema: z.ZodMiniType<
17
- DtoLinkedIntegrationsResponse,
18
- unknown
19
- > = z.object({
20
- providers: types.optional(z.array(types.string())),
21
- });
22
-
23
- export function dtoLinkedIntegrationsResponseFromJSON(
24
- jsonString: string,
25
- ): SafeParseResult<DtoLinkedIntegrationsResponse, SDKValidationError> {
26
- return safeParse(
27
- jsonString,
28
- (x) => DtoLinkedIntegrationsResponse$inboundSchema.parse(JSON.parse(x)),
29
- `Failed to parse 'DtoLinkedIntegrationsResponse' from JSON`,
30
- );
31
- }
@@ -1,33 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
-
7
- export type GetIntegrationRequest = {
8
- /**
9
- * Integration provider
10
- */
11
- provider: string;
12
- };
13
-
14
- /** @internal */
15
- export type GetIntegrationRequest$Outbound = {
16
- provider: string;
17
- };
18
-
19
- /** @internal */
20
- export const GetIntegrationRequest$outboundSchema: z.ZodMiniType<
21
- GetIntegrationRequest$Outbound,
22
- GetIntegrationRequest
23
- > = z.object({
24
- provider: z.string(),
25
- });
26
-
27
- export function getIntegrationRequestToJSON(
28
- getIntegrationRequest: GetIntegrationRequest,
29
- ): string {
30
- return JSON.stringify(
31
- GetIntegrationRequest$outboundSchema.parse(getIntegrationRequest),
32
- );
33
- }