@deeprelay/sdk 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/.openapi-generator/FILES +126 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +24 -0
  4. package/LICENSE +204 -0
  5. package/README.md +197 -4
  6. package/dist/apis/BillingApi.d.ts +169 -0
  7. package/dist/apis/BillingApi.js +457 -0
  8. package/dist/apis/InferenceApi.d.ts +217 -0
  9. package/dist/apis/InferenceApi.js +582 -0
  10. package/dist/apis/MetaApi.d.ts +44 -0
  11. package/dist/apis/MetaApi.js +105 -0
  12. package/dist/apis/OperationsApi.d.ts +33 -0
  13. package/dist/apis/OperationsApi.js +79 -0
  14. package/dist/apis/UsageApi.d.ts +56 -0
  15. package/dist/apis/UsageApi.js +109 -0
  16. package/dist/apis/WebhooksApi.d.ts +82 -0
  17. package/dist/apis/WebhooksApi.js +224 -0
  18. package/dist/apis/index.d.ts +6 -0
  19. package/dist/apis/index.js +24 -0
  20. package/dist/esm/apis/BillingApi.d.ts +169 -0
  21. package/dist/esm/apis/BillingApi.js +453 -0
  22. package/dist/esm/apis/InferenceApi.d.ts +217 -0
  23. package/dist/esm/apis/InferenceApi.js +578 -0
  24. package/dist/esm/apis/MetaApi.d.ts +44 -0
  25. package/dist/esm/apis/MetaApi.js +101 -0
  26. package/dist/esm/apis/OperationsApi.d.ts +33 -0
  27. package/dist/esm/apis/OperationsApi.js +75 -0
  28. package/dist/esm/apis/UsageApi.d.ts +56 -0
  29. package/dist/esm/apis/UsageApi.js +105 -0
  30. package/dist/esm/apis/WebhooksApi.d.ts +82 -0
  31. package/dist/esm/apis/WebhooksApi.js +220 -0
  32. package/dist/esm/apis/index.d.ts +6 -0
  33. package/dist/esm/apis/index.js +8 -0
  34. package/dist/esm/index.d.ts +3 -0
  35. package/dist/esm/index.js +5 -0
  36. package/dist/esm/models/Balance.d.ts +65 -0
  37. package/dist/esm/models/Balance.js +63 -0
  38. package/dist/esm/models/ChatChoice.d.ts +55 -0
  39. package/dist/esm/models/ChatChoice.js +55 -0
  40. package/dist/esm/models/ChatCompletionRequest.d.ts +64 -0
  41. package/dist/esm/models/ChatCompletionRequest.js +57 -0
  42. package/dist/esm/models/ChatCompletionResponse.d.ts +71 -0
  43. package/dist/esm/models/ChatCompletionResponse.js +73 -0
  44. package/dist/esm/models/ChatMessage.d.ts +47 -0
  45. package/dist/esm/models/ChatMessage.js +55 -0
  46. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +64 -0
  47. package/dist/esm/models/CreateCryptoDepositRequest.js +68 -0
  48. package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +50 -0
  49. package/dist/esm/models/CreateWebhookEndpointRequest.js +58 -0
  50. package/dist/esm/models/CryptoDeposit.d.ts +114 -0
  51. package/dist/esm/models/CryptoDeposit.js +90 -0
  52. package/dist/esm/models/Embedding.d.ts +51 -0
  53. package/dist/esm/models/Embedding.js +59 -0
  54. package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
  55. package/dist/esm/models/EmbeddingsRequest.js +60 -0
  56. package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
  57. package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
  58. package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
  59. package/dist/esm/models/EmbeddingsResponse.js +65 -0
  60. package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
  61. package/dist/esm/models/EmbeddingsUsage.js +47 -0
  62. package/dist/esm/models/GetHealth200Response.d.ts +39 -0
  63. package/dist/esm/models/GetHealth200Response.js +47 -0
  64. package/dist/esm/models/ImagesGenerationsRequest.d.ts +63 -0
  65. package/dist/esm/models/ImagesGenerationsRequest.js +59 -0
  66. package/dist/esm/models/ImagesResponse.d.ts +46 -0
  67. package/dist/esm/models/ImagesResponse.js +53 -0
  68. package/dist/esm/models/ImagesResponseDataInner.d.ts +32 -0
  69. package/dist/esm/models/ImagesResponseDataInner.js +43 -0
  70. package/dist/esm/models/ImagesResponseUsage.d.ts +32 -0
  71. package/dist/esm/models/ImagesResponseUsage.js +43 -0
  72. package/dist/esm/models/InferencePreflight.d.ts +92 -0
  73. package/dist/esm/models/InferencePreflight.js +86 -0
  74. package/dist/esm/models/ListDeposits200Response.d.ts +39 -0
  75. package/dist/esm/models/ListDeposits200Response.js +48 -0
  76. package/dist/esm/models/Model.d.ts +152 -0
  77. package/dist/esm/models/Model.js +110 -0
  78. package/dist/esm/models/ModelList.d.ts +46 -0
  79. package/dist/esm/models/ModelList.js +56 -0
  80. package/dist/esm/models/ModelParametersInner.d.ts +72 -0
  81. package/dist/esm/models/ModelParametersInner.js +64 -0
  82. package/dist/esm/models/ModelPricing.d.ts +126 -0
  83. package/dist/esm/models/ModelPricing.js +78 -0
  84. package/dist/esm/models/ModelRate.d.ts +62 -0
  85. package/dist/esm/models/ModelRate.js +51 -0
  86. package/dist/esm/models/OpenAIErrorEnvelope.d.ts +33 -0
  87. package/dist/esm/models/OpenAIErrorEnvelope.js +44 -0
  88. package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  89. package/dist/esm/models/OpenAIErrorEnvelopeError.js +53 -0
  90. package/dist/esm/models/Operation.d.ts +107 -0
  91. package/dist/esm/models/Operation.js +86 -0
  92. package/dist/esm/models/OperationError.d.ts +38 -0
  93. package/dist/esm/models/OperationError.js +43 -0
  94. package/dist/esm/models/OperationResult.d.ts +44 -0
  95. package/dist/esm/models/OperationResult.js +45 -0
  96. package/dist/esm/models/PeakWindow.d.ts +38 -0
  97. package/dist/esm/models/PeakWindow.js +47 -0
  98. package/dist/esm/models/Problem.d.ts +87 -0
  99. package/dist/esm/models/Problem.js +87 -0
  100. package/dist/esm/models/SpendingLimit.d.ts +101 -0
  101. package/dist/esm/models/SpendingLimit.js +85 -0
  102. package/dist/esm/models/StreamOptions.d.ts +32 -0
  103. package/dist/esm/models/StreamOptions.js +41 -0
  104. package/dist/esm/models/Subscription.d.ts +78 -0
  105. package/dist/esm/models/Subscription.js +68 -0
  106. package/dist/esm/models/SubscriptionCheckoutRequest.d.ts +45 -0
  107. package/dist/esm/models/SubscriptionCheckoutRequest.js +45 -0
  108. package/dist/esm/models/SubscriptionCheckoutSession.d.ts +45 -0
  109. package/dist/esm/models/SubscriptionCheckoutSession.js +52 -0
  110. package/dist/esm/models/SubscriptionPlan.d.ts +46 -0
  111. package/dist/esm/models/SubscriptionPlan.js +50 -0
  112. package/dist/esm/models/SubscriptionPortalRequest.d.ts +32 -0
  113. package/dist/esm/models/SubscriptionPortalRequest.js +41 -0
  114. package/dist/esm/models/SubscriptionPortalSession.d.ts +32 -0
  115. package/dist/esm/models/SubscriptionPortalSession.js +43 -0
  116. package/dist/esm/models/SubscriptionPrice.d.ts +53 -0
  117. package/dist/esm/models/SubscriptionPrice.js +55 -0
  118. package/dist/esm/models/SubscriptionQuota.d.ts +60 -0
  119. package/dist/esm/models/SubscriptionQuota.js +59 -0
  120. package/dist/esm/models/SubscriptionUsage.d.ts +65 -0
  121. package/dist/esm/models/SubscriptionUsage.js +63 -0
  122. package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +59 -0
  123. package/dist/esm/models/UpdateSpendingLimitRequest.js +57 -0
  124. package/dist/esm/models/Usage.d.ts +44 -0
  125. package/dist/esm/models/Usage.js +51 -0
  126. package/dist/esm/models/UsageBucket.d.ts +56 -0
  127. package/dist/esm/models/UsageBucket.js +55 -0
  128. package/dist/esm/models/UsagePage.d.ts +39 -0
  129. package/dist/esm/models/UsagePage.js +48 -0
  130. package/dist/esm/models/VideoCreateRequest.d.ts +50 -0
  131. package/dist/esm/models/VideoCreateRequest.js +51 -0
  132. package/dist/esm/models/VideoJob.d.ts +117 -0
  133. package/dist/esm/models/VideoJob.js +94 -0
  134. package/dist/esm/models/VideoList.d.ts +52 -0
  135. package/dist/esm/models/VideoList.js +60 -0
  136. package/dist/esm/models/WebhookEndpoint.d.ts +74 -0
  137. package/dist/esm/models/WebhookEndpoint.js +72 -0
  138. package/dist/esm/models/WebhookEndpointPage.d.ts +39 -0
  139. package/dist/esm/models/WebhookEndpointPage.js +48 -0
  140. package/dist/esm/models/index.d.ts +52 -0
  141. package/dist/esm/models/index.js +54 -0
  142. package/dist/esm/runtime.d.ts +185 -0
  143. package/dist/esm/runtime.js +354 -0
  144. package/dist/index.d.ts +3 -0
  145. package/dist/index.js +21 -0
  146. package/dist/models/Balance.d.ts +65 -0
  147. package/dist/models/Balance.js +70 -0
  148. package/dist/models/ChatChoice.d.ts +55 -0
  149. package/dist/models/ChatChoice.js +63 -0
  150. package/dist/models/ChatCompletionRequest.d.ts +64 -0
  151. package/dist/models/ChatCompletionRequest.js +64 -0
  152. package/dist/models/ChatCompletionResponse.d.ts +71 -0
  153. package/dist/models/ChatCompletionResponse.js +81 -0
  154. package/dist/models/ChatMessage.d.ts +47 -0
  155. package/dist/models/ChatMessage.js +63 -0
  156. package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
  157. package/dist/models/CreateCryptoDepositRequest.js +76 -0
  158. package/dist/models/CreateWebhookEndpointRequest.d.ts +50 -0
  159. package/dist/models/CreateWebhookEndpointRequest.js +66 -0
  160. package/dist/models/CryptoDeposit.d.ts +114 -0
  161. package/dist/models/CryptoDeposit.js +98 -0
  162. package/dist/models/Embedding.d.ts +51 -0
  163. package/dist/models/Embedding.js +67 -0
  164. package/dist/models/EmbeddingsRequest.d.ts +64 -0
  165. package/dist/models/EmbeddingsRequest.js +68 -0
  166. package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
  167. package/dist/models/EmbeddingsRequestInput.js +53 -0
  168. package/dist/models/EmbeddingsResponse.d.ts +59 -0
  169. package/dist/models/EmbeddingsResponse.js +73 -0
  170. package/dist/models/EmbeddingsUsage.d.ts +38 -0
  171. package/dist/models/EmbeddingsUsage.js +54 -0
  172. package/dist/models/GetHealth200Response.d.ts +39 -0
  173. package/dist/models/GetHealth200Response.js +55 -0
  174. package/dist/models/ImagesGenerationsRequest.d.ts +63 -0
  175. package/dist/models/ImagesGenerationsRequest.js +67 -0
  176. package/dist/models/ImagesResponse.d.ts +46 -0
  177. package/dist/models/ImagesResponse.js +60 -0
  178. package/dist/models/ImagesResponseDataInner.d.ts +32 -0
  179. package/dist/models/ImagesResponseDataInner.js +50 -0
  180. package/dist/models/ImagesResponseUsage.d.ts +32 -0
  181. package/dist/models/ImagesResponseUsage.js +50 -0
  182. package/dist/models/InferencePreflight.d.ts +92 -0
  183. package/dist/models/InferencePreflight.js +94 -0
  184. package/dist/models/ListDeposits200Response.d.ts +39 -0
  185. package/dist/models/ListDeposits200Response.js +55 -0
  186. package/dist/models/Model.d.ts +152 -0
  187. package/dist/models/Model.js +118 -0
  188. package/dist/models/ModelList.d.ts +46 -0
  189. package/dist/models/ModelList.js +64 -0
  190. package/dist/models/ModelParametersInner.d.ts +72 -0
  191. package/dist/models/ModelParametersInner.js +72 -0
  192. package/dist/models/ModelPricing.d.ts +126 -0
  193. package/dist/models/ModelPricing.js +86 -0
  194. package/dist/models/ModelRate.d.ts +62 -0
  195. package/dist/models/ModelRate.js +58 -0
  196. package/dist/models/OpenAIErrorEnvelope.d.ts +33 -0
  197. package/dist/models/OpenAIErrorEnvelope.js +51 -0
  198. package/dist/models/OpenAIErrorEnvelopeError.d.ts +50 -0
  199. package/dist/models/OpenAIErrorEnvelopeError.js +60 -0
  200. package/dist/models/Operation.d.ts +107 -0
  201. package/dist/models/Operation.js +94 -0
  202. package/dist/models/OperationError.d.ts +38 -0
  203. package/dist/models/OperationError.js +50 -0
  204. package/dist/models/OperationResult.d.ts +44 -0
  205. package/dist/models/OperationResult.js +52 -0
  206. package/dist/models/PeakWindow.d.ts +38 -0
  207. package/dist/models/PeakWindow.js +54 -0
  208. package/dist/models/Problem.d.ts +87 -0
  209. package/dist/models/Problem.js +95 -0
  210. package/dist/models/SpendingLimit.d.ts +101 -0
  211. package/dist/models/SpendingLimit.js +93 -0
  212. package/dist/models/StreamOptions.d.ts +32 -0
  213. package/dist/models/StreamOptions.js +48 -0
  214. package/dist/models/Subscription.d.ts +78 -0
  215. package/dist/models/Subscription.js +75 -0
  216. package/dist/models/SubscriptionCheckoutRequest.d.ts +45 -0
  217. package/dist/models/SubscriptionCheckoutRequest.js +52 -0
  218. package/dist/models/SubscriptionCheckoutSession.d.ts +45 -0
  219. package/dist/models/SubscriptionCheckoutSession.js +59 -0
  220. package/dist/models/SubscriptionPlan.d.ts +46 -0
  221. package/dist/models/SubscriptionPlan.js +57 -0
  222. package/dist/models/SubscriptionPortalRequest.d.ts +32 -0
  223. package/dist/models/SubscriptionPortalRequest.js +48 -0
  224. package/dist/models/SubscriptionPortalSession.d.ts +32 -0
  225. package/dist/models/SubscriptionPortalSession.js +50 -0
  226. package/dist/models/SubscriptionPrice.d.ts +53 -0
  227. package/dist/models/SubscriptionPrice.js +62 -0
  228. package/dist/models/SubscriptionQuota.d.ts +60 -0
  229. package/dist/models/SubscriptionQuota.js +66 -0
  230. package/dist/models/SubscriptionUsage.d.ts +65 -0
  231. package/dist/models/SubscriptionUsage.js +70 -0
  232. package/dist/models/UpdateSpendingLimitRequest.d.ts +59 -0
  233. package/dist/models/UpdateSpendingLimitRequest.js +65 -0
  234. package/dist/models/Usage.d.ts +44 -0
  235. package/dist/models/Usage.js +58 -0
  236. package/dist/models/UsageBucket.d.ts +56 -0
  237. package/dist/models/UsageBucket.js +62 -0
  238. package/dist/models/UsagePage.d.ts +39 -0
  239. package/dist/models/UsagePage.js +55 -0
  240. package/dist/models/VideoCreateRequest.d.ts +50 -0
  241. package/dist/models/VideoCreateRequest.js +58 -0
  242. package/dist/models/VideoJob.d.ts +117 -0
  243. package/dist/models/VideoJob.js +102 -0
  244. package/dist/models/VideoList.d.ts +52 -0
  245. package/dist/models/VideoList.js +68 -0
  246. package/dist/models/WebhookEndpoint.d.ts +74 -0
  247. package/dist/models/WebhookEndpoint.js +80 -0
  248. package/dist/models/WebhookEndpointPage.d.ts +39 -0
  249. package/dist/models/WebhookEndpointPage.js +55 -0
  250. package/dist/models/index.d.ts +52 -0
  251. package/dist/models/index.js +70 -0
  252. package/dist/runtime.d.ts +185 -0
  253. package/dist/runtime.js +371 -0
  254. package/docs/Balance.md +45 -0
  255. package/docs/BillingApi.md +657 -0
  256. package/docs/ChatChoice.md +38 -0
  257. package/docs/ChatCompletionRequest.md +44 -0
  258. package/docs/ChatCompletionResponse.md +44 -0
  259. package/docs/ChatMessage.md +36 -0
  260. package/docs/CreateCryptoDepositRequest.md +38 -0
  261. package/docs/CreateWebhookEndpointRequest.md +36 -0
  262. package/docs/CryptoDeposit.md +55 -0
  263. package/docs/Embedding.md +38 -0
  264. package/docs/EmbeddingsRequest.md +42 -0
  265. package/docs/EmbeddingsRequestInput.md +33 -0
  266. package/docs/EmbeddingsResponse.md +40 -0
  267. package/docs/EmbeddingsUsage.md +37 -0
  268. package/docs/GetHealth200Response.md +34 -0
  269. package/docs/ImagesGenerationsRequest.md +42 -0
  270. package/docs/ImagesResponse.md +38 -0
  271. package/docs/ImagesResponseDataInner.md +34 -0
  272. package/docs/ImagesResponseUsage.md +34 -0
  273. package/docs/InferenceApi.md +861 -0
  274. package/docs/InferencePreflight.md +47 -0
  275. package/docs/ListDeposits200Response.md +36 -0
  276. package/docs/MetaApi.md +126 -0
  277. package/docs/Model.md +64 -0
  278. package/docs/ModelList.md +36 -0
  279. package/docs/ModelParametersInner.md +44 -0
  280. package/docs/ModelPricing.md +62 -0
  281. package/docs/ModelRate.md +45 -0
  282. package/docs/OpenAIErrorEnvelope.md +34 -0
  283. package/docs/OpenAIErrorEnvelopeError.md +40 -0
  284. package/docs/Operation.md +52 -0
  285. package/docs/OperationError.md +36 -0
  286. package/docs/OperationResult.md +39 -0
  287. package/docs/OperationsApi.md +80 -0
  288. package/docs/PeakWindow.md +37 -0
  289. package/docs/Problem.md +44 -0
  290. package/docs/SpendingLimit.md +54 -0
  291. package/docs/StreamOptions.md +34 -0
  292. package/docs/Subscription.md +49 -0
  293. package/docs/SubscriptionCheckoutRequest.md +39 -0
  294. package/docs/SubscriptionCheckoutSession.md +38 -0
  295. package/docs/SubscriptionPlan.md +39 -0
  296. package/docs/SubscriptionPortalRequest.md +35 -0
  297. package/docs/SubscriptionPortalSession.md +34 -0
  298. package/docs/SubscriptionPrice.md +41 -0
  299. package/docs/SubscriptionQuota.md +43 -0
  300. package/docs/SubscriptionUsage.md +45 -0
  301. package/docs/UpdateSpendingLimitRequest.md +40 -0
  302. package/docs/Usage.md +38 -0
  303. package/docs/UsageApi.md +95 -0
  304. package/docs/UsageBucket.md +42 -0
  305. package/docs/UsagePage.md +36 -0
  306. package/docs/VideoCreateRequest.md +40 -0
  307. package/docs/VideoJob.md +56 -0
  308. package/docs/VideoList.md +38 -0
  309. package/docs/WebhookEndpoint.md +44 -0
  310. package/docs/WebhookEndpointPage.md +36 -0
  311. package/docs/WebhooksApi.md +302 -0
  312. package/package.json +16 -7
  313. package/src/apis/BillingApi.ts +559 -0
  314. package/src/apis/InferenceApi.ts +753 -0
  315. package/src/apis/MetaApi.ts +103 -0
  316. package/src/apis/OperationsApi.ts +89 -0
  317. package/src/apis/UsageApi.ts +129 -0
  318. package/src/apis/WebhooksApi.ts +277 -0
  319. package/src/apis/index.ts +8 -0
  320. package/src/index.ts +5 -0
  321. package/src/models/Balance.ts +114 -0
  322. package/src/models/ChatChoice.ts +102 -0
  323. package/src/models/ChatCompletionRequest.ts +122 -0
  324. package/src/models/ChatCompletionResponse.ts +138 -0
  325. package/src/models/ChatMessage.ts +87 -0
  326. package/src/models/CreateCryptoDepositRequest.ts +108 -0
  327. package/src/models/CreateWebhookEndpointRequest.ts +90 -0
  328. package/src/models/CryptoDeposit.ts +177 -0
  329. package/src/models/Embedding.ts +96 -0
  330. package/src/models/EmbeddingsRequest.ts +117 -0
  331. package/src/models/EmbeddingsRequestInput.ts +59 -0
  332. package/src/models/EmbeddingsResponse.ts +120 -0
  333. package/src/models/EmbeddingsUsage.ts +75 -0
  334. package/src/models/GetHealth200Response.ts +75 -0
  335. package/src/models/ImagesGenerationsRequest.ts +109 -0
  336. package/src/models/ImagesResponse.ts +99 -0
  337. package/src/models/ImagesResponseDataInner.ts +66 -0
  338. package/src/models/ImagesResponseUsage.ts +66 -0
  339. package/src/models/InferencePreflight.ts +147 -0
  340. package/src/models/ListDeposits200Response.ts +83 -0
  341. package/src/models/Model.ts +241 -0
  342. package/src/models/ModelList.ts +95 -0
  343. package/src/models/ModelParametersInner.ts +120 -0
  344. package/src/models/ModelPricing.ts +203 -0
  345. package/src/models/ModelRate.ts +105 -0
  346. package/src/models/OpenAIErrorEnvelope.ts +74 -0
  347. package/src/models/OpenAIErrorEnvelopeError.ts +92 -0
  348. package/src/models/Operation.ts +179 -0
  349. package/src/models/OperationError.ts +73 -0
  350. package/src/models/OperationResult.ts +81 -0
  351. package/src/models/PeakWindow.ts +75 -0
  352. package/src/models/Problem.ts +139 -0
  353. package/src/models/SpendingLimit.ts +165 -0
  354. package/src/models/StreamOptions.ts +65 -0
  355. package/src/models/Subscription.ts +149 -0
  356. package/src/models/SubscriptionCheckoutRequest.ts +82 -0
  357. package/src/models/SubscriptionCheckoutSession.ts +92 -0
  358. package/src/models/SubscriptionPlan.ts +92 -0
  359. package/src/models/SubscriptionPortalRequest.ts +65 -0
  360. package/src/models/SubscriptionPortalSession.ts +66 -0
  361. package/src/models/SubscriptionPrice.ts +96 -0
  362. package/src/models/SubscriptionQuota.ts +106 -0
  363. package/src/models/SubscriptionUsage.ts +114 -0
  364. package/src/models/UpdateSpendingLimitRequest.ts +102 -0
  365. package/src/models/Usage.ts +84 -0
  366. package/src/models/UsageBucket.ts +100 -0
  367. package/src/models/UsagePage.ts +83 -0
  368. package/src/models/VideoCreateRequest.ts +91 -0
  369. package/src/models/VideoJob.ts +184 -0
  370. package/src/models/VideoList.ts +104 -0
  371. package/src/models/WebhookEndpoint.ts +125 -0
  372. package/src/models/WebhookEndpointPage.ts +83 -0
  373. package/src/models/index.ts +54 -0
  374. package/src/runtime.ts +454 -0
  375. package/tsconfig.esm.json +7 -0
  376. package/tsconfig.json +16 -0
@@ -0,0 +1,101 @@
1
+ /**
2
+ * deeprelay Public Developer API
3
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@deeprelay.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface SpendingLimit
16
+ */
17
+ export interface SpendingLimit {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof SpendingLimit
22
+ */
23
+ monthlyLimitCents: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof SpendingLimit
28
+ */
29
+ monthlyLimitDollars: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof SpendingLimit
34
+ */
35
+ currentMonthSpendCents: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof SpendingLimit
40
+ */
41
+ currentMonthSpendDollars: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof SpendingLimit
46
+ */
47
+ percentUsed: number;
48
+ /**
49
+ *
50
+ * @type {Date}
51
+ * @memberof SpendingLimit
52
+ */
53
+ billingCycleStart: Date;
54
+ /**
55
+ *
56
+ * @type {SpendingLimitEnforcementEnum}
57
+ * @memberof SpendingLimit
58
+ */
59
+ enforcement: SpendingLimitEnforcementEnum;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof SpendingLimit
64
+ */
65
+ autoTerminateHours?: number;
66
+ /**
67
+ *
68
+ * @type {number}
69
+ * @memberof SpendingLimit
70
+ */
71
+ dailyLimitCents?: number;
72
+ /**
73
+ *
74
+ * @type {number}
75
+ * @memberof SpendingLimit
76
+ */
77
+ dailyLimitDollars?: number;
78
+ /**
79
+ *
80
+ * @type {number}
81
+ * @memberof SpendingLimit
82
+ */
83
+ currentDaySpendCents: number;
84
+ }
85
+ /**
86
+ * @export
87
+ */
88
+ export declare const SpendingLimitEnforcementEnum: {
89
+ readonly StopRunning: "stop_running";
90
+ readonly BlockLaunch: "block_launch";
91
+ readonly NotifyOnly: "notify_only";
92
+ };
93
+ export type SpendingLimitEnforcementEnum = typeof SpendingLimitEnforcementEnum[keyof typeof SpendingLimitEnforcementEnum];
94
+ /**
95
+ * Check if a given object implements the SpendingLimit interface.
96
+ */
97
+ export declare function instanceOfSpendingLimit(value: object): value is SpendingLimit;
98
+ export declare function SpendingLimitFromJSON(json: any): SpendingLimit;
99
+ export declare function SpendingLimitFromJSONTyped(json: any, ignoreDiscriminator: boolean): SpendingLimit;
100
+ export declare function SpendingLimitToJSON(json: any): SpendingLimit;
101
+ export declare function SpendingLimitToJSONTyped(value?: SpendingLimit | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * deeprelay Public Developer API
6
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@deeprelay.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SpendingLimitEnforcementEnum = void 0;
17
+ exports.instanceOfSpendingLimit = instanceOfSpendingLimit;
18
+ exports.SpendingLimitFromJSON = SpendingLimitFromJSON;
19
+ exports.SpendingLimitFromJSONTyped = SpendingLimitFromJSONTyped;
20
+ exports.SpendingLimitToJSON = SpendingLimitToJSON;
21
+ exports.SpendingLimitToJSONTyped = SpendingLimitToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.SpendingLimitEnforcementEnum = {
26
+ StopRunning: 'stop_running',
27
+ BlockLaunch: 'block_launch',
28
+ NotifyOnly: 'notify_only'
29
+ };
30
+ /**
31
+ * Check if a given object implements the SpendingLimit interface.
32
+ */
33
+ function instanceOfSpendingLimit(value) {
34
+ if ((!('monthlyLimitCents' in value) && !('monthly_limit_cents' in value)) || (value['monthlyLimitCents'] === undefined && value['monthly_limit_cents'] === undefined))
35
+ return false;
36
+ if ((!('monthlyLimitDollars' in value) && !('monthly_limit_dollars' in value)) || (value['monthlyLimitDollars'] === undefined && value['monthly_limit_dollars'] === undefined))
37
+ return false;
38
+ if ((!('currentMonthSpendCents' in value) && !('current_month_spend_cents' in value)) || (value['currentMonthSpendCents'] === undefined && value['current_month_spend_cents'] === undefined))
39
+ return false;
40
+ if ((!('currentMonthSpendDollars' in value) && !('current_month_spend_dollars' in value)) || (value['currentMonthSpendDollars'] === undefined && value['current_month_spend_dollars'] === undefined))
41
+ return false;
42
+ if ((!('percentUsed' in value) && !('percent_used' in value)) || (value['percentUsed'] === undefined && value['percent_used'] === undefined))
43
+ return false;
44
+ if ((!('billingCycleStart' in value) && !('billing_cycle_start' in value)) || (value['billingCycleStart'] === undefined && value['billing_cycle_start'] === undefined))
45
+ return false;
46
+ if (!('enforcement' in value) || value['enforcement'] === undefined)
47
+ return false;
48
+ if ((!('currentDaySpendCents' in value) && !('current_day_spend_cents' in value)) || (value['currentDaySpendCents'] === undefined && value['current_day_spend_cents'] === undefined))
49
+ return false;
50
+ return true;
51
+ }
52
+ function SpendingLimitFromJSON(json) {
53
+ return SpendingLimitFromJSONTyped(json, false);
54
+ }
55
+ function SpendingLimitFromJSONTyped(json, ignoreDiscriminator) {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+ 'monthlyLimitCents': json['monthly_limit_cents'],
61
+ 'monthlyLimitDollars': json['monthly_limit_dollars'],
62
+ 'currentMonthSpendCents': json['current_month_spend_cents'],
63
+ 'currentMonthSpendDollars': json['current_month_spend_dollars'],
64
+ 'percentUsed': json['percent_used'],
65
+ 'billingCycleStart': (new Date(json['billing_cycle_start'])),
66
+ 'enforcement': json['enforcement'],
67
+ 'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
68
+ 'dailyLimitCents': json['daily_limit_cents'] == null ? undefined : json['daily_limit_cents'],
69
+ 'dailyLimitDollars': json['daily_limit_dollars'] == null ? undefined : json['daily_limit_dollars'],
70
+ 'currentDaySpendCents': json['current_day_spend_cents'],
71
+ };
72
+ }
73
+ function SpendingLimitToJSON(json) {
74
+ return SpendingLimitToJSONTyped(json, false);
75
+ }
76
+ function SpendingLimitToJSONTyped(value, ignoreDiscriminator = false) {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+ return {
81
+ 'monthly_limit_cents': value['monthlyLimitCents'],
82
+ 'monthly_limit_dollars': value['monthlyLimitDollars'],
83
+ 'current_month_spend_cents': value['currentMonthSpendCents'],
84
+ 'current_month_spend_dollars': value['currentMonthSpendDollars'],
85
+ 'percent_used': value['percentUsed'],
86
+ 'billing_cycle_start': value['billingCycleStart'].toISOString(),
87
+ 'enforcement': value['enforcement'],
88
+ 'auto_terminate_hours': value['autoTerminateHours'],
89
+ 'daily_limit_cents': value['dailyLimitCents'],
90
+ 'daily_limit_dollars': value['dailyLimitDollars'],
91
+ 'current_day_spend_cents': value['currentDaySpendCents'],
92
+ };
93
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * deeprelay Public Developer API
3
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@deeprelay.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface StreamOptions
16
+ */
17
+ export interface StreamOptions {
18
+ /**
19
+ * When true, the final stream chunk carries usage totals (CHAT-03).
20
+ * @type {boolean}
21
+ * @memberof StreamOptions
22
+ */
23
+ includeUsage?: boolean;
24
+ }
25
+ /**
26
+ * Check if a given object implements the StreamOptions interface.
27
+ */
28
+ export declare function instanceOfStreamOptions(value: object): value is StreamOptions;
29
+ export declare function StreamOptionsFromJSON(json: any): StreamOptions;
30
+ export declare function StreamOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamOptions;
31
+ export declare function StreamOptionsToJSON(json: any): StreamOptions;
32
+ export declare function StreamOptionsToJSONTyped(value?: StreamOptions | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * deeprelay Public Developer API
6
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@deeprelay.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfStreamOptions = instanceOfStreamOptions;
17
+ exports.StreamOptionsFromJSON = StreamOptionsFromJSON;
18
+ exports.StreamOptionsFromJSONTyped = StreamOptionsFromJSONTyped;
19
+ exports.StreamOptionsToJSON = StreamOptionsToJSON;
20
+ exports.StreamOptionsToJSONTyped = StreamOptionsToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the StreamOptions interface.
23
+ */
24
+ function instanceOfStreamOptions(value) {
25
+ return true;
26
+ }
27
+ function StreamOptionsFromJSON(json) {
28
+ return StreamOptionsFromJSONTyped(json, false);
29
+ }
30
+ function StreamOptionsFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'includeUsage': json['include_usage'] == null ? undefined : json['include_usage'],
36
+ };
37
+ }
38
+ function StreamOptionsToJSON(json) {
39
+ return StreamOptionsToJSONTyped(json, false);
40
+ }
41
+ function StreamOptionsToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'include_usage': value['includeUsage'],
47
+ };
48
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * deeprelay Public Developer API
3
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@deeprelay.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SubscriptionPlan } from './SubscriptionPlan';
13
+ import type { SubscriptionUsage } from './SubscriptionUsage';
14
+ import type { SubscriptionQuota } from './SubscriptionQuota';
15
+ /**
16
+ * The organization's flat subscription tier: entitlement, billing period, the configured quota, and consumption against it. The console and this endpoint assemble it from the same source, so the two surfaces cannot report different numbers.
17
+ *
18
+ * @export
19
+ * @interface Subscription
20
+ */
21
+ export interface Subscription {
22
+ /**
23
+ * Whether the organization is entitled to the plan right now. Only an `active` or `trialing` subscription entitles, including a short grace window past the period end that absorbs renewal webhook lag; a failed payment (`past_due`) cuts access immediately. Render from this; do not re-derive entitlement from `status` and the period bounds.
24
+ * @type {boolean}
25
+ * @memberof Subscription
26
+ */
27
+ subscribed: boolean;
28
+ /**
29
+ * Raw subscription status — "active", "trialing", "past_due", "canceled" and so on — or "none" when the organization never subscribed.
30
+ * @type {string}
31
+ * @memberof Subscription
32
+ */
33
+ status: string;
34
+ /**
35
+ * Whether the subscription stops at the end of the current period instead of renewing.
36
+ * @type {boolean}
37
+ * @memberof Subscription
38
+ */
39
+ cancelAtPeriodEnd: boolean;
40
+ /**
41
+ * Start of the current billing period. Absent until the billing provider has reported a period for this subscription.
42
+ * @type {Date}
43
+ * @memberof Subscription
44
+ */
45
+ currentPeriodStart?: Date;
46
+ /**
47
+ * End of the current billing period. Absent under the same condition as current_period_start.
48
+ * @type {Date}
49
+ * @memberof Subscription
50
+ */
51
+ currentPeriodEnd?: Date;
52
+ /**
53
+ *
54
+ * @type {SubscriptionPlan}
55
+ * @memberof Subscription
56
+ */
57
+ plan: SubscriptionPlan;
58
+ /**
59
+ *
60
+ * @type {SubscriptionQuota}
61
+ * @memberof Subscription
62
+ */
63
+ quota: SubscriptionQuota;
64
+ /**
65
+ *
66
+ * @type {SubscriptionUsage}
67
+ * @memberof Subscription
68
+ */
69
+ usage?: SubscriptionUsage;
70
+ }
71
+ /**
72
+ * Check if a given object implements the Subscription interface.
73
+ */
74
+ export declare function instanceOfSubscription(value: object): value is Subscription;
75
+ export declare function SubscriptionFromJSON(json: any): Subscription;
76
+ export declare function SubscriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Subscription;
77
+ export declare function SubscriptionToJSON(json: any): Subscription;
78
+ export declare function SubscriptionToJSONTyped(value?: Subscription | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * deeprelay Public Developer API
6
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@deeprelay.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSubscription = instanceOfSubscription;
17
+ exports.SubscriptionFromJSON = SubscriptionFromJSON;
18
+ exports.SubscriptionFromJSONTyped = SubscriptionFromJSONTyped;
19
+ exports.SubscriptionToJSON = SubscriptionToJSON;
20
+ exports.SubscriptionToJSONTyped = SubscriptionToJSONTyped;
21
+ const SubscriptionPlan_1 = require("./SubscriptionPlan");
22
+ const SubscriptionUsage_1 = require("./SubscriptionUsage");
23
+ const SubscriptionQuota_1 = require("./SubscriptionQuota");
24
+ /**
25
+ * Check if a given object implements the Subscription interface.
26
+ */
27
+ function instanceOfSubscription(value) {
28
+ if (!('subscribed' in value) || value['subscribed'] === undefined)
29
+ return false;
30
+ if (!('status' in value) || value['status'] === undefined)
31
+ return false;
32
+ if ((!('cancelAtPeriodEnd' in value) && !('cancel_at_period_end' in value)) || (value['cancelAtPeriodEnd'] === undefined && value['cancel_at_period_end'] === undefined))
33
+ return false;
34
+ if (!('plan' in value) || value['plan'] === undefined)
35
+ return false;
36
+ if (!('quota' in value) || value['quota'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ function SubscriptionFromJSON(json) {
41
+ return SubscriptionFromJSONTyped(json, false);
42
+ }
43
+ function SubscriptionFromJSONTyped(json, ignoreDiscriminator) {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+ 'subscribed': json['subscribed'],
49
+ 'status': json['status'],
50
+ 'cancelAtPeriodEnd': json['cancel_at_period_end'],
51
+ 'currentPeriodStart': json['current_period_start'] == null ? undefined : (new Date(json['current_period_start'])),
52
+ 'currentPeriodEnd': json['current_period_end'] == null ? undefined : (new Date(json['current_period_end'])),
53
+ 'plan': (0, SubscriptionPlan_1.SubscriptionPlanFromJSON)(json['plan']),
54
+ 'quota': (0, SubscriptionQuota_1.SubscriptionQuotaFromJSON)(json['quota']),
55
+ 'usage': json['usage'] == null ? undefined : (0, SubscriptionUsage_1.SubscriptionUsageFromJSON)(json['usage']),
56
+ };
57
+ }
58
+ function SubscriptionToJSON(json) {
59
+ return SubscriptionToJSONTyped(json, false);
60
+ }
61
+ function SubscriptionToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ 'subscribed': value['subscribed'],
67
+ 'status': value['status'],
68
+ 'cancel_at_period_end': value['cancelAtPeriodEnd'],
69
+ 'current_period_start': value['currentPeriodStart'] == null ? value['currentPeriodStart'] : value['currentPeriodStart'].toISOString(),
70
+ 'current_period_end': value['currentPeriodEnd'] == null ? value['currentPeriodEnd'] : value['currentPeriodEnd'].toISOString(),
71
+ 'plan': (0, SubscriptionPlan_1.SubscriptionPlanToJSON)(value['plan']),
72
+ 'quota': (0, SubscriptionQuota_1.SubscriptionQuotaToJSON)(value['quota']),
73
+ 'usage': (0, SubscriptionUsage_1.SubscriptionUsageToJSON)(value['usage']),
74
+ };
75
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * deeprelay Public Developer API
3
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@deeprelay.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Optional overrides for a checkout mint. Every field has a deployment default, so an empty body is the normal call.
14
+ *
15
+ * @export
16
+ * @interface SubscriptionCheckoutRequest
17
+ */
18
+ export interface SubscriptionCheckoutRequest {
19
+ /**
20
+ * Where the provider returns after a completed payment. Defaults to the deployment's configured URL.
21
+ * @type {string}
22
+ * @memberof SubscriptionCheckoutRequest
23
+ */
24
+ successUrl?: string;
25
+ /**
26
+ * Where the provider returns if checkout is abandoned. Defaults to the deployment's configured URL.
27
+ * @type {string}
28
+ * @memberof SubscriptionCheckoutRequest
29
+ */
30
+ cancelUrl?: string;
31
+ /**
32
+ * Pins the plan the client displayed. An unknown key is a 400 rather than a silent purchase of a different tier.
33
+ * @type {string}
34
+ * @memberof SubscriptionCheckoutRequest
35
+ */
36
+ planKey?: string;
37
+ }
38
+ /**
39
+ * Check if a given object implements the SubscriptionCheckoutRequest interface.
40
+ */
41
+ export declare function instanceOfSubscriptionCheckoutRequest(value: object): value is SubscriptionCheckoutRequest;
42
+ export declare function SubscriptionCheckoutRequestFromJSON(json: any): SubscriptionCheckoutRequest;
43
+ export declare function SubscriptionCheckoutRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCheckoutRequest;
44
+ export declare function SubscriptionCheckoutRequestToJSON(json: any): SubscriptionCheckoutRequest;
45
+ export declare function SubscriptionCheckoutRequestToJSONTyped(value?: SubscriptionCheckoutRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * deeprelay Public Developer API
6
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@deeprelay.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSubscriptionCheckoutRequest = instanceOfSubscriptionCheckoutRequest;
17
+ exports.SubscriptionCheckoutRequestFromJSON = SubscriptionCheckoutRequestFromJSON;
18
+ exports.SubscriptionCheckoutRequestFromJSONTyped = SubscriptionCheckoutRequestFromJSONTyped;
19
+ exports.SubscriptionCheckoutRequestToJSON = SubscriptionCheckoutRequestToJSON;
20
+ exports.SubscriptionCheckoutRequestToJSONTyped = SubscriptionCheckoutRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SubscriptionCheckoutRequest interface.
23
+ */
24
+ function instanceOfSubscriptionCheckoutRequest(value) {
25
+ return true;
26
+ }
27
+ function SubscriptionCheckoutRequestFromJSON(json) {
28
+ return SubscriptionCheckoutRequestFromJSONTyped(json, false);
29
+ }
30
+ function SubscriptionCheckoutRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'successUrl': json['success_url'] == null ? undefined : json['success_url'],
36
+ 'cancelUrl': json['cancel_url'] == null ? undefined : json['cancel_url'],
37
+ 'planKey': json['plan_key'] == null ? undefined : json['plan_key'],
38
+ };
39
+ }
40
+ function SubscriptionCheckoutRequestToJSON(json) {
41
+ return SubscriptionCheckoutRequestToJSONTyped(json, false);
42
+ }
43
+ function SubscriptionCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'success_url': value['successUrl'],
49
+ 'cancel_url': value['cancelUrl'],
50
+ 'plan_key': value['planKey'],
51
+ };
52
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * deeprelay Public Developer API
3
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@deeprelay.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SubscriptionPlan } from './SubscriptionPlan';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SubscriptionCheckoutSession
17
+ */
18
+ export interface SubscriptionCheckoutSession {
19
+ /**
20
+ * The hosted page the customer must open to pay.
21
+ * @type {string}
22
+ * @memberof SubscriptionCheckoutSession
23
+ */
24
+ checkoutUrl: string;
25
+ /**
26
+ * Checkout session id, for support correlation.
27
+ * @type {string}
28
+ * @memberof SubscriptionCheckoutSession
29
+ */
30
+ sessionId: string;
31
+ /**
32
+ *
33
+ * @type {SubscriptionPlan}
34
+ * @memberof SubscriptionCheckoutSession
35
+ */
36
+ plan: SubscriptionPlan;
37
+ }
38
+ /**
39
+ * Check if a given object implements the SubscriptionCheckoutSession interface.
40
+ */
41
+ export declare function instanceOfSubscriptionCheckoutSession(value: object): value is SubscriptionCheckoutSession;
42
+ export declare function SubscriptionCheckoutSessionFromJSON(json: any): SubscriptionCheckoutSession;
43
+ export declare function SubscriptionCheckoutSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCheckoutSession;
44
+ export declare function SubscriptionCheckoutSessionToJSON(json: any): SubscriptionCheckoutSession;
45
+ export declare function SubscriptionCheckoutSessionToJSONTyped(value?: SubscriptionCheckoutSession | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * deeprelay Public Developer API
6
+ * Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@deeprelay.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSubscriptionCheckoutSession = instanceOfSubscriptionCheckoutSession;
17
+ exports.SubscriptionCheckoutSessionFromJSON = SubscriptionCheckoutSessionFromJSON;
18
+ exports.SubscriptionCheckoutSessionFromJSONTyped = SubscriptionCheckoutSessionFromJSONTyped;
19
+ exports.SubscriptionCheckoutSessionToJSON = SubscriptionCheckoutSessionToJSON;
20
+ exports.SubscriptionCheckoutSessionToJSONTyped = SubscriptionCheckoutSessionToJSONTyped;
21
+ const SubscriptionPlan_1 = require("./SubscriptionPlan");
22
+ /**
23
+ * Check if a given object implements the SubscriptionCheckoutSession interface.
24
+ */
25
+ function instanceOfSubscriptionCheckoutSession(value) {
26
+ if ((!('checkoutUrl' in value) && !('checkout_url' in value)) || (value['checkoutUrl'] === undefined && value['checkout_url'] === undefined))
27
+ return false;
28
+ if ((!('sessionId' in value) && !('session_id' in value)) || (value['sessionId'] === undefined && value['session_id'] === undefined))
29
+ return false;
30
+ if (!('plan' in value) || value['plan'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function SubscriptionCheckoutSessionFromJSON(json) {
35
+ return SubscriptionCheckoutSessionFromJSONTyped(json, false);
36
+ }
37
+ function SubscriptionCheckoutSessionFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'checkoutUrl': json['checkout_url'],
43
+ 'sessionId': json['session_id'],
44
+ 'plan': (0, SubscriptionPlan_1.SubscriptionPlanFromJSON)(json['plan']),
45
+ };
46
+ }
47
+ function SubscriptionCheckoutSessionToJSON(json) {
48
+ return SubscriptionCheckoutSessionToJSONTyped(json, false);
49
+ }
50
+ function SubscriptionCheckoutSessionToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'checkout_url': value['checkoutUrl'],
56
+ 'session_id': value['sessionId'],
57
+ 'plan': (0, SubscriptionPlan_1.SubscriptionPlanToJSON)(value['plan']),
58
+ };
59
+ }