@factify/sdk 0.3.9 → 0.3.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 (369) hide show
  1. package/FUNCTIONS.md +4 -4
  2. package/README.md +37 -32
  3. package/dist/commonjs/funcs/apiKeysCreate.d.ts +19 -0
  4. package/dist/commonjs/funcs/apiKeysCreate.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/apiKeysCreate.js +122 -0
  6. package/dist/commonjs/funcs/apiKeysCreate.js.map +1 -0
  7. package/dist/commonjs/funcs/apiKeysList.d.ts +21 -0
  8. package/dist/commonjs/funcs/apiKeysList.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/apiKeysList.js +152 -0
  10. package/dist/commonjs/funcs/apiKeysList.js.map +1 -0
  11. package/dist/commonjs/funcs/apiKeysRevoke.d.ts +18 -0
  12. package/dist/commonjs/funcs/apiKeysRevoke.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/apiKeysRevoke.js +127 -0
  14. package/dist/commonjs/funcs/apiKeysRevoke.js.map +1 -0
  15. package/dist/commonjs/funcs/organizationsCreate.d.ts +19 -0
  16. package/dist/commonjs/funcs/organizationsCreate.d.ts.map +1 -0
  17. package/dist/commonjs/funcs/organizationsCreate.js +122 -0
  18. package/dist/commonjs/funcs/organizationsCreate.js.map +1 -0
  19. package/dist/commonjs/funcs/organizationsGet.d.ts +18 -0
  20. package/dist/commonjs/funcs/organizationsGet.d.ts.map +1 -0
  21. package/dist/commonjs/funcs/organizationsGet.js +126 -0
  22. package/dist/commonjs/funcs/organizationsGet.js.map +1 -0
  23. package/dist/commonjs/funcs/organizationsList.d.ts +21 -0
  24. package/dist/commonjs/funcs/organizationsList.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/organizationsList.js +150 -0
  26. package/dist/commonjs/funcs/organizationsList.js.map +1 -0
  27. package/dist/commonjs/funcs/versionsGet.d.ts +1 -1
  28. package/dist/commonjs/funcs/versionsGet.d.ts.map +1 -1
  29. package/dist/commonjs/funcs/versionsGet.js +4 -8
  30. package/dist/commonjs/funcs/versionsGet.js.map +1 -1
  31. package/dist/commonjs/funcs/versionsUpdate.d.ts +1 -1
  32. package/dist/commonjs/funcs/versionsUpdate.d.ts.map +1 -1
  33. package/dist/commonjs/funcs/versionsUpdate.js +4 -8
  34. package/dist/commonjs/funcs/versionsUpdate.js.map +1 -1
  35. package/dist/commonjs/lib/config.d.ts +3 -3
  36. package/dist/commonjs/lib/config.js +3 -3
  37. package/dist/commonjs/lib/config.js.map +1 -1
  38. package/dist/commonjs/lib/sdks.js +2 -2
  39. package/dist/commonjs/lib/sdks.js.map +1 -1
  40. package/dist/commonjs/models/components/apikey.d.ts +56 -0
  41. package/dist/commonjs/models/components/apikey.d.ts.map +1 -0
  42. package/dist/commonjs/models/components/apikey.js +68 -0
  43. package/dist/commonjs/models/components/apikey.js.map +1 -0
  44. package/dist/commonjs/models/components/createapikeyrequest.d.ts +37 -0
  45. package/dist/commonjs/models/components/createapikeyrequest.d.ts.map +1 -0
  46. package/dist/commonjs/models/components/createapikeyrequest.js +57 -0
  47. package/dist/commonjs/models/components/createapikeyrequest.js.map +1 -0
  48. package/dist/commonjs/models/components/createapikeyresponse.d.ts +29 -0
  49. package/dist/commonjs/models/components/createapikeyresponse.d.ts.map +1 -0
  50. package/dist/commonjs/models/components/createapikeyresponse.js +58 -0
  51. package/dist/commonjs/models/components/createapikeyresponse.js.map +1 -0
  52. package/dist/commonjs/models/components/createdocumentresponse.d.ts +1 -1
  53. package/dist/commonjs/models/components/createdocumentresponse.d.ts.map +1 -1
  54. package/dist/commonjs/models/components/createdocumentresponse.js +1 -2
  55. package/dist/commonjs/models/components/createdocumentresponse.js.map +1 -1
  56. package/dist/commonjs/models/components/createorganizationrequest.d.ts +28 -0
  57. package/dist/commonjs/models/components/createorganizationrequest.d.ts.map +1 -0
  58. package/dist/commonjs/models/components/createorganizationrequest.js +55 -0
  59. package/dist/commonjs/models/components/createorganizationrequest.js.map +1 -0
  60. package/dist/commonjs/models/components/createorganizationresponse.d.ts +17 -0
  61. package/dist/commonjs/models/components/createorganizationresponse.d.ts.map +1 -0
  62. package/dist/commonjs/models/components/createorganizationresponse.js +51 -0
  63. package/dist/commonjs/models/components/createorganizationresponse.js.map +1 -0
  64. package/dist/commonjs/models/components/getdocumentresponse.d.ts +1 -1
  65. package/dist/commonjs/models/components/getdocumentresponse.d.ts.map +1 -1
  66. package/dist/commonjs/models/components/getdocumentresponse.js +1 -2
  67. package/dist/commonjs/models/components/getdocumentresponse.js.map +1 -1
  68. package/dist/commonjs/models/components/getorganizationresponse.d.ts +17 -0
  69. package/dist/commonjs/models/components/getorganizationresponse.d.ts.map +1 -0
  70. package/dist/commonjs/models/components/getorganizationresponse.js +51 -0
  71. package/dist/commonjs/models/components/getorganizationresponse.js.map +1 -0
  72. package/dist/commonjs/models/components/index.d.ts +10 -0
  73. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  74. package/dist/commonjs/models/components/index.js +10 -0
  75. package/dist/commonjs/models/components/index.js.map +1 -1
  76. package/dist/commonjs/models/components/listapikeysresponse.d.ts +25 -0
  77. package/dist/commonjs/models/components/listapikeysresponse.d.ts.map +1 -0
  78. package/dist/commonjs/models/components/listapikeysresponse.js +54 -0
  79. package/dist/commonjs/models/components/listapikeysresponse.js.map +1 -0
  80. package/dist/commonjs/models/components/listdocumentpoliciesresponse.d.ts +1 -1
  81. package/dist/commonjs/models/components/listdocumentpoliciesresponse.d.ts.map +1 -1
  82. package/dist/commonjs/models/components/listdocumentpoliciesresponse.js +1 -1
  83. package/dist/commonjs/models/components/listdocumentpoliciesresponse.js.map +1 -1
  84. package/dist/commonjs/models/components/listdocumentsresponse.d.ts +1 -1
  85. package/dist/commonjs/models/components/listdocumentsresponse.d.ts.map +1 -1
  86. package/dist/commonjs/models/components/listdocumentsresponse.js +1 -1
  87. package/dist/commonjs/models/components/listdocumentsresponse.js.map +1 -1
  88. package/dist/commonjs/models/components/listorganizationsresponse.d.ts +25 -0
  89. package/dist/commonjs/models/components/listorganizationsresponse.d.ts.map +1 -0
  90. package/dist/commonjs/models/components/listorganizationsresponse.js +54 -0
  91. package/dist/commonjs/models/components/listorganizationsresponse.js.map +1 -0
  92. package/dist/commonjs/models/components/listversionsresponse.d.ts +1 -1
  93. package/dist/commonjs/models/components/listversionsresponse.d.ts.map +1 -1
  94. package/dist/commonjs/models/components/listversionsresponse.js +1 -1
  95. package/dist/commonjs/models/components/listversionsresponse.js.map +1 -1
  96. package/dist/commonjs/models/components/organization.d.ts +27 -0
  97. package/dist/commonjs/models/components/organization.d.ts.map +1 -0
  98. package/dist/commonjs/models/components/organization.js +58 -0
  99. package/dist/commonjs/models/components/organization.js.map +1 -0
  100. package/dist/commonjs/models/components/revokeapikeyresponse.d.ts +17 -0
  101. package/dist/commonjs/models/components/revokeapikeyresponse.d.ts.map +1 -0
  102. package/dist/commonjs/models/components/revokeapikeyresponse.js +56 -0
  103. package/dist/commonjs/models/components/revokeapikeyresponse.js.map +1 -0
  104. package/dist/commonjs/models/components/updatedocumentresponse.d.ts +1 -1
  105. package/dist/commonjs/models/components/updatedocumentresponse.d.ts.map +1 -1
  106. package/dist/commonjs/models/components/updatedocumentresponse.js +1 -2
  107. package/dist/commonjs/models/components/updatedocumentresponse.js.map +1 -1
  108. package/dist/commonjs/models/operations/createapikey.d.ts +18 -0
  109. package/dist/commonjs/models/operations/createapikey.d.ts.map +1 -0
  110. package/dist/commonjs/models/operations/createapikey.js +61 -0
  111. package/dist/commonjs/models/operations/createapikey.js.map +1 -0
  112. package/dist/commonjs/models/operations/createorganization.d.ts +18 -0
  113. package/dist/commonjs/models/operations/createorganization.d.ts.map +1 -0
  114. package/dist/commonjs/models/operations/createorganization.js +61 -0
  115. package/dist/commonjs/models/operations/createorganization.js.map +1 -0
  116. package/dist/commonjs/models/operations/getorganization.d.ts +34 -0
  117. package/dist/commonjs/models/operations/getorganization.d.ts.map +1 -0
  118. package/dist/commonjs/models/operations/getorganization.js +73 -0
  119. package/dist/commonjs/models/operations/getorganization.js.map +1 -0
  120. package/dist/commonjs/models/operations/getversion.d.ts +34 -0
  121. package/dist/commonjs/models/operations/getversion.d.ts.map +1 -0
  122. package/dist/commonjs/models/operations/{getdocumentversion.js → getversion.js} +10 -12
  123. package/dist/commonjs/models/operations/getversion.js.map +1 -0
  124. package/dist/commonjs/models/operations/index.d.ts +8 -2
  125. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  126. package/dist/commonjs/models/operations/index.js +8 -2
  127. package/dist/commonjs/models/operations/index.js.map +1 -1
  128. package/dist/commonjs/models/operations/listapikeys.d.ts +54 -0
  129. package/dist/commonjs/models/operations/listapikeys.d.ts.map +1 -0
  130. package/dist/commonjs/models/operations/listapikeys.js +79 -0
  131. package/dist/commonjs/models/operations/listapikeys.js.map +1 -0
  132. package/dist/commonjs/models/operations/listorganizations.d.ts +36 -0
  133. package/dist/commonjs/models/operations/listorganizations.d.ts.map +1 -0
  134. package/dist/commonjs/models/operations/listorganizations.js +75 -0
  135. package/dist/commonjs/models/operations/listorganizations.js.map +1 -0
  136. package/dist/commonjs/models/operations/revokeapikey.d.ts +55 -0
  137. package/dist/commonjs/models/operations/revokeapikey.d.ts.map +1 -0
  138. package/dist/commonjs/models/operations/revokeapikey.js +82 -0
  139. package/dist/commonjs/models/operations/revokeapikey.js.map +1 -0
  140. package/dist/commonjs/models/operations/{updatedocumentversion.d.ts → updateversion.d.ts} +14 -22
  141. package/dist/commonjs/models/operations/updateversion.d.ts.map +1 -0
  142. package/dist/commonjs/models/operations/{updatedocumentversion.js → updateversion.js} +14 -16
  143. package/dist/commonjs/models/operations/updateversion.js.map +1 -0
  144. package/dist/commonjs/sdk/apikeys.d.ts +30 -0
  145. package/dist/commonjs/sdk/apikeys.d.ts.map +1 -0
  146. package/dist/commonjs/sdk/apikeys.js +43 -0
  147. package/dist/commonjs/sdk/apikeys.js.map +1 -0
  148. package/dist/commonjs/sdk/organizations.d.ts +30 -0
  149. package/dist/commonjs/sdk/organizations.d.ts.map +1 -0
  150. package/dist/commonjs/sdk/organizations.js +43 -0
  151. package/dist/commonjs/sdk/organizations.js.map +1 -0
  152. package/dist/commonjs/sdk/sdk.d.ts +6 -0
  153. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  154. package/dist/commonjs/sdk/sdk.js +8 -0
  155. package/dist/commonjs/sdk/sdk.js.map +1 -1
  156. package/dist/commonjs/sdk/versions.d.ts +2 -2
  157. package/dist/commonjs/sdk/versions.d.ts.map +1 -1
  158. package/dist/commonjs/sdk/versions.js.map +1 -1
  159. package/dist/esm/funcs/apiKeysCreate.d.ts +19 -0
  160. package/dist/esm/funcs/apiKeysCreate.d.ts.map +1 -0
  161. package/dist/esm/funcs/apiKeysCreate.js +86 -0
  162. package/dist/esm/funcs/apiKeysCreate.js.map +1 -0
  163. package/dist/esm/funcs/apiKeysList.d.ts +21 -0
  164. package/dist/esm/funcs/apiKeysList.d.ts.map +1 -0
  165. package/dist/esm/funcs/apiKeysList.js +116 -0
  166. package/dist/esm/funcs/apiKeysList.js.map +1 -0
  167. package/dist/esm/funcs/apiKeysRevoke.d.ts +18 -0
  168. package/dist/esm/funcs/apiKeysRevoke.d.ts.map +1 -0
  169. package/dist/esm/funcs/apiKeysRevoke.js +91 -0
  170. package/dist/esm/funcs/apiKeysRevoke.js.map +1 -0
  171. package/dist/esm/funcs/organizationsCreate.d.ts +19 -0
  172. package/dist/esm/funcs/organizationsCreate.d.ts.map +1 -0
  173. package/dist/esm/funcs/organizationsCreate.js +86 -0
  174. package/dist/esm/funcs/organizationsCreate.js.map +1 -0
  175. package/dist/esm/funcs/organizationsGet.d.ts +18 -0
  176. package/dist/esm/funcs/organizationsGet.d.ts.map +1 -0
  177. package/dist/esm/funcs/organizationsGet.js +90 -0
  178. package/dist/esm/funcs/organizationsGet.js.map +1 -0
  179. package/dist/esm/funcs/organizationsList.d.ts +21 -0
  180. package/dist/esm/funcs/organizationsList.d.ts.map +1 -0
  181. package/dist/esm/funcs/organizationsList.js +114 -0
  182. package/dist/esm/funcs/organizationsList.js.map +1 -0
  183. package/dist/esm/funcs/versionsGet.d.ts +1 -1
  184. package/dist/esm/funcs/versionsGet.d.ts.map +1 -1
  185. package/dist/esm/funcs/versionsGet.js +4 -8
  186. package/dist/esm/funcs/versionsGet.js.map +1 -1
  187. package/dist/esm/funcs/versionsUpdate.d.ts +1 -1
  188. package/dist/esm/funcs/versionsUpdate.d.ts.map +1 -1
  189. package/dist/esm/funcs/versionsUpdate.js +4 -8
  190. package/dist/esm/funcs/versionsUpdate.js.map +1 -1
  191. package/dist/esm/lib/config.d.ts +3 -3
  192. package/dist/esm/lib/config.js +3 -3
  193. package/dist/esm/lib/config.js.map +1 -1
  194. package/dist/esm/lib/sdks.js +2 -2
  195. package/dist/esm/lib/sdks.js.map +1 -1
  196. package/dist/esm/models/components/apikey.d.ts +56 -0
  197. package/dist/esm/models/components/apikey.d.ts.map +1 -0
  198. package/dist/esm/models/components/apikey.js +31 -0
  199. package/dist/esm/models/components/apikey.js.map +1 -0
  200. package/dist/esm/models/components/createapikeyrequest.d.ts +37 -0
  201. package/dist/esm/models/components/createapikeyrequest.d.ts.map +1 -0
  202. package/dist/esm/models/components/createapikeyrequest.js +20 -0
  203. package/dist/esm/models/components/createapikeyrequest.js.map +1 -0
  204. package/dist/esm/models/components/createapikeyresponse.d.ts +29 -0
  205. package/dist/esm/models/components/createapikeyresponse.d.ts.map +1 -0
  206. package/dist/esm/models/components/createapikeyresponse.js +21 -0
  207. package/dist/esm/models/components/createapikeyresponse.js.map +1 -0
  208. package/dist/esm/models/components/createdocumentresponse.d.ts +1 -1
  209. package/dist/esm/models/components/createdocumentresponse.d.ts.map +1 -1
  210. package/dist/esm/models/components/createdocumentresponse.js +1 -2
  211. package/dist/esm/models/components/createdocumentresponse.js.map +1 -1
  212. package/dist/esm/models/components/createorganizationrequest.d.ts +28 -0
  213. package/dist/esm/models/components/createorganizationrequest.d.ts.map +1 -0
  214. package/dist/esm/models/components/createorganizationrequest.js +18 -0
  215. package/dist/esm/models/components/createorganizationrequest.js.map +1 -0
  216. package/dist/esm/models/components/createorganizationresponse.d.ts +17 -0
  217. package/dist/esm/models/components/createorganizationresponse.d.ts.map +1 -0
  218. package/dist/esm/models/components/createorganizationresponse.js +14 -0
  219. package/dist/esm/models/components/createorganizationresponse.js.map +1 -0
  220. package/dist/esm/models/components/getdocumentresponse.d.ts +1 -1
  221. package/dist/esm/models/components/getdocumentresponse.d.ts.map +1 -1
  222. package/dist/esm/models/components/getdocumentresponse.js +1 -2
  223. package/dist/esm/models/components/getdocumentresponse.js.map +1 -1
  224. package/dist/esm/models/components/getorganizationresponse.d.ts +17 -0
  225. package/dist/esm/models/components/getorganizationresponse.d.ts.map +1 -0
  226. package/dist/esm/models/components/getorganizationresponse.js +14 -0
  227. package/dist/esm/models/components/getorganizationresponse.js.map +1 -0
  228. package/dist/esm/models/components/index.d.ts +10 -0
  229. package/dist/esm/models/components/index.d.ts.map +1 -1
  230. package/dist/esm/models/components/index.js +10 -0
  231. package/dist/esm/models/components/index.js.map +1 -1
  232. package/dist/esm/models/components/listapikeysresponse.d.ts +25 -0
  233. package/dist/esm/models/components/listapikeysresponse.d.ts.map +1 -0
  234. package/dist/esm/models/components/listapikeysresponse.js +17 -0
  235. package/dist/esm/models/components/listapikeysresponse.js.map +1 -0
  236. package/dist/esm/models/components/listdocumentpoliciesresponse.d.ts +1 -1
  237. package/dist/esm/models/components/listdocumentpoliciesresponse.d.ts.map +1 -1
  238. package/dist/esm/models/components/listdocumentpoliciesresponse.js +1 -1
  239. package/dist/esm/models/components/listdocumentpoliciesresponse.js.map +1 -1
  240. package/dist/esm/models/components/listdocumentsresponse.d.ts +1 -1
  241. package/dist/esm/models/components/listdocumentsresponse.d.ts.map +1 -1
  242. package/dist/esm/models/components/listdocumentsresponse.js +1 -1
  243. package/dist/esm/models/components/listdocumentsresponse.js.map +1 -1
  244. package/dist/esm/models/components/listorganizationsresponse.d.ts +25 -0
  245. package/dist/esm/models/components/listorganizationsresponse.d.ts.map +1 -0
  246. package/dist/esm/models/components/listorganizationsresponse.js +17 -0
  247. package/dist/esm/models/components/listorganizationsresponse.js.map +1 -0
  248. package/dist/esm/models/components/listversionsresponse.d.ts +1 -1
  249. package/dist/esm/models/components/listversionsresponse.d.ts.map +1 -1
  250. package/dist/esm/models/components/listversionsresponse.js +1 -1
  251. package/dist/esm/models/components/listversionsresponse.js.map +1 -1
  252. package/dist/esm/models/components/organization.d.ts +27 -0
  253. package/dist/esm/models/components/organization.d.ts.map +1 -0
  254. package/dist/esm/models/components/organization.js +21 -0
  255. package/dist/esm/models/components/organization.js.map +1 -0
  256. package/dist/esm/models/components/revokeapikeyresponse.d.ts +17 -0
  257. package/dist/esm/models/components/revokeapikeyresponse.d.ts.map +1 -0
  258. package/dist/esm/models/components/revokeapikeyresponse.js +19 -0
  259. package/dist/esm/models/components/revokeapikeyresponse.js.map +1 -0
  260. package/dist/esm/models/components/updatedocumentresponse.d.ts +1 -1
  261. package/dist/esm/models/components/updatedocumentresponse.d.ts.map +1 -1
  262. package/dist/esm/models/components/updatedocumentresponse.js +1 -2
  263. package/dist/esm/models/components/updatedocumentresponse.js.map +1 -1
  264. package/dist/esm/models/operations/createapikey.d.ts +18 -0
  265. package/dist/esm/models/operations/createapikey.d.ts.map +1 -0
  266. package/dist/esm/models/operations/createapikey.js +24 -0
  267. package/dist/esm/models/operations/createapikey.js.map +1 -0
  268. package/dist/esm/models/operations/createorganization.d.ts +18 -0
  269. package/dist/esm/models/operations/createorganization.d.ts.map +1 -0
  270. package/dist/esm/models/operations/createorganization.js +24 -0
  271. package/dist/esm/models/operations/createorganization.js.map +1 -0
  272. package/dist/esm/models/operations/getorganization.d.ts +34 -0
  273. package/dist/esm/models/operations/getorganization.d.ts.map +1 -0
  274. package/dist/esm/models/operations/getorganization.js +35 -0
  275. package/dist/esm/models/operations/getorganization.js.map +1 -0
  276. package/dist/esm/models/operations/getversion.d.ts +34 -0
  277. package/dist/esm/models/operations/getversion.d.ts.map +1 -0
  278. package/dist/esm/models/operations/{getdocumentversion.js → getversion.js} +7 -9
  279. package/dist/esm/models/operations/getversion.js.map +1 -0
  280. package/dist/esm/models/operations/index.d.ts +8 -2
  281. package/dist/esm/models/operations/index.d.ts.map +1 -1
  282. package/dist/esm/models/operations/index.js +8 -2
  283. package/dist/esm/models/operations/index.js.map +1 -1
  284. package/dist/esm/models/operations/listapikeys.d.ts +54 -0
  285. package/dist/esm/models/operations/listapikeys.d.ts.map +1 -0
  286. package/dist/esm/models/operations/listapikeys.js +41 -0
  287. package/dist/esm/models/operations/listapikeys.js.map +1 -0
  288. package/dist/esm/models/operations/listorganizations.d.ts +36 -0
  289. package/dist/esm/models/operations/listorganizations.d.ts.map +1 -0
  290. package/dist/esm/models/operations/listorganizations.js +37 -0
  291. package/dist/esm/models/operations/listorganizations.js.map +1 -0
  292. package/dist/esm/models/operations/revokeapikey.d.ts +55 -0
  293. package/dist/esm/models/operations/revokeapikey.d.ts.map +1 -0
  294. package/dist/esm/models/operations/revokeapikey.js +43 -0
  295. package/dist/esm/models/operations/revokeapikey.js.map +1 -0
  296. package/dist/esm/models/operations/{updatedocumentversion.d.ts → updateversion.d.ts} +14 -22
  297. package/dist/esm/models/operations/updateversion.d.ts.map +1 -0
  298. package/dist/esm/models/operations/{updatedocumentversion.js → updateversion.js} +11 -13
  299. package/dist/esm/models/operations/updateversion.js.map +1 -0
  300. package/dist/esm/sdk/apikeys.d.ts +30 -0
  301. package/dist/esm/sdk/apikeys.d.ts.map +1 -0
  302. package/dist/esm/sdk/apikeys.js +39 -0
  303. package/dist/esm/sdk/apikeys.js.map +1 -0
  304. package/dist/esm/sdk/organizations.d.ts +30 -0
  305. package/dist/esm/sdk/organizations.d.ts.map +1 -0
  306. package/dist/esm/sdk/organizations.js +39 -0
  307. package/dist/esm/sdk/organizations.js.map +1 -0
  308. package/dist/esm/sdk/sdk.d.ts +6 -0
  309. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  310. package/dist/esm/sdk/sdk.js +8 -0
  311. package/dist/esm/sdk/sdk.js.map +1 -1
  312. package/dist/esm/sdk/versions.d.ts +2 -2
  313. package/dist/esm/sdk/versions.d.ts.map +1 -1
  314. package/dist/esm/sdk/versions.js.map +1 -1
  315. package/examples/{documentsList.example.ts → apiKeysList.example.ts} +3 -4
  316. package/examples/package-lock.json +1 -1
  317. package/jsr.json +1 -1
  318. package/openapi.json +869 -170
  319. package/package.json +1 -1
  320. package/src/funcs/apiKeysCreate.ts +175 -0
  321. package/src/funcs/apiKeysList.ts +243 -0
  322. package/src/funcs/apiKeysRevoke.ts +181 -0
  323. package/src/funcs/organizationsCreate.ts +176 -0
  324. package/src/funcs/organizationsGet.ts +182 -0
  325. package/src/funcs/organizationsList.ts +245 -0
  326. package/src/funcs/versionsGet.ts +9 -16
  327. package/src/funcs/versionsUpdate.ts +9 -16
  328. package/src/lib/config.ts +3 -3
  329. package/src/lib/sdks.ts +2 -2
  330. package/src/models/components/apikey.ts +94 -0
  331. package/src/models/components/createapikeyrequest.ts +66 -0
  332. package/src/models/components/createapikeyresponse.ts +59 -0
  333. package/src/models/components/createdocumentresponse.ts +2 -3
  334. package/src/models/components/createorganizationrequest.ts +55 -0
  335. package/src/models/components/createorganizationresponse.ts +37 -0
  336. package/src/models/components/getdocumentresponse.ts +2 -3
  337. package/src/models/components/getorganizationresponse.ts +37 -0
  338. package/src/models/components/index.ts +10 -0
  339. package/src/models/components/listapikeysresponse.ts +47 -0
  340. package/src/models/components/listdocumentpoliciesresponse.ts +2 -2
  341. package/src/models/components/listdocumentsresponse.ts +2 -2
  342. package/src/models/components/listorganizationsresponse.ts +47 -0
  343. package/src/models/components/listversionsresponse.ts +2 -2
  344. package/src/models/components/organization.ts +56 -0
  345. package/src/models/components/revokeapikeyresponse.ts +45 -0
  346. package/src/models/components/updatedocumentresponse.ts +2 -3
  347. package/src/models/operations/createapikey.ts +51 -0
  348. package/src/models/operations/createorganization.ts +53 -0
  349. package/src/models/operations/getorganization.ts +89 -0
  350. package/src/models/operations/{getdocumentversion.ts → getversion.ts} +16 -26
  351. package/src/models/operations/index.ts +8 -2
  352. package/src/models/operations/listapikeys.ts +115 -0
  353. package/src/models/operations/listorganizations.ts +93 -0
  354. package/src/models/operations/revokeapikey.ts +128 -0
  355. package/src/models/operations/{updatedocumentversion.ts → updateversion.ts} +28 -38
  356. package/src/sdk/apikeys.ts +65 -0
  357. package/src/sdk/organizations.ts +67 -0
  358. package/src/sdk/sdk.ts +12 -0
  359. package/src/sdk/versions.ts +4 -4
  360. package/dist/commonjs/models/operations/getdocumentversion.d.ts +0 -42
  361. package/dist/commonjs/models/operations/getdocumentversion.d.ts.map +0 -1
  362. package/dist/commonjs/models/operations/getdocumentversion.js.map +0 -1
  363. package/dist/commonjs/models/operations/updatedocumentversion.d.ts.map +0 -1
  364. package/dist/commonjs/models/operations/updatedocumentversion.js.map +0 -1
  365. package/dist/esm/models/operations/getdocumentversion.d.ts +0 -42
  366. package/dist/esm/models/operations/getdocumentversion.d.ts.map +0 -1
  367. package/dist/esm/models/operations/getdocumentversion.js.map +0 -1
  368. package/dist/esm/models/operations/updatedocumentversion.d.ts.map +0 -1
  369. package/dist/esm/models/operations/updatedocumentversion.js.map +0 -1
package/openapi.json CHANGED
@@ -168,6 +168,77 @@
168
168
  "public"
169
169
  ]
170
170
  },
171
+ "ApiKey": {
172
+ "additionalProperties": false,
173
+ "description": "ApiKey represents an authentication credential for programmatic API access.",
174
+ "properties": {
175
+ "created_at": {
176
+ "description": "Timestamp when the key was created.",
177
+ "format": "date-time",
178
+ "title": "created_at",
179
+ "type": "string"
180
+ },
181
+ "expires_at": {
182
+ "description": "Expiration timestamp. If set, the key becomes invalid after this time.",
183
+ "format": "date-time",
184
+ "title": "expires_at",
185
+ "type": "string"
186
+ },
187
+ "id": {
188
+ "description": "Unique ID for the API key.\n Pattern: key_[0-9a-hjkmnp-tv-z]{26}",
189
+ "example": "key_01jd4h5mck9gq6zrp8bn2t4w3x",
190
+ "pattern": "^key_[0-9a-hjkmnp-tv-z]{26}$",
191
+ "title": "id",
192
+ "type": "string"
193
+ },
194
+ "is_active": {
195
+ "description": "Whether the key is currently active (not revoked and not expired).\n Computed: is_active = (revoked_at == null) \u0026\u0026 (expires_at == null || expires_at \u003e now())",
196
+ "readOnly": true,
197
+ "title": "is_active",
198
+ "type": "boolean"
199
+ },
200
+ "key_prefix": {
201
+ "description": "Truncated key prefix for identification in UI (e.g., \"ffy_prod_01jd4h5...\").\n Shows the first 16 characters for better uniqueness while maintaining security.",
202
+ "example": "ffy_prod_01jd4h5...",
203
+ "maxLength": 20,
204
+ "minLength": 16,
205
+ "title": "key_prefix",
206
+ "type": "string"
207
+ },
208
+ "name": {
209
+ "description": "Human-readable name for the key (e.g., \"Production\", \"Staging\").",
210
+ "example": "Production",
211
+ "maxLength": 63,
212
+ "minLength": 1,
213
+ "title": "name",
214
+ "type": "string"
215
+ },
216
+ "organization_id": {
217
+ "description": "ID of the organization this key belongs to.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
218
+ "example": "org_01h2xcejqtf2nbrexx3vqjhp41",
219
+ "pattern": "^org_[0-9a-hjkmnp-tv-z]{26}$",
220
+ "title": "organization_id",
221
+ "type": "string"
222
+ },
223
+ "revoked_at": {
224
+ "description": "Timestamp when the key was revoked. Null if the key has not been revoked.",
225
+ "format": "date-time",
226
+ "readOnly": true,
227
+ "title": "revoked_at",
228
+ "type": "string"
229
+ }
230
+ },
231
+ "required": [
232
+ "id",
233
+ "name",
234
+ "organization_id",
235
+ "created_at",
236
+ "is_active",
237
+ "key_prefix"
238
+ ],
239
+ "title": "ApiKey",
240
+ "type": "object"
241
+ },
171
242
  "AttachPolicyRequest": {
172
243
  "additionalProperties": false,
173
244
  "description": "AttachPolicyRequest specifies a policy to attach to a document.",
@@ -191,6 +262,62 @@
191
262
  "title": "AttachPolicyRequest",
192
263
  "type": "object"
193
264
  },
265
+ "CreateApiKeyRequest": {
266
+ "additionalProperties": false,
267
+ "description": "CreateApiKeyRequest contains the data needed to create a new API key.",
268
+ "properties": {
269
+ "expires_at": {
270
+ "description": "Expiration timestamp. If not set, the key does not expire.\n When set, must be in the future and within 1 year.\n Security note: Keys without expiration should be rotated periodically.\ntimestamp.gt_now = true\ntimestamp.within = 8760h0m0s\n",
271
+ "format": "date-time",
272
+ "title": "expires_at",
273
+ "type": "string"
274
+ },
275
+ "name": {
276
+ "description": "Human-readable name for the key (e.g., \"Production\", \"Staging\").",
277
+ "maxLength": 63,
278
+ "minLength": 1,
279
+ "title": "name",
280
+ "type": "string"
281
+ },
282
+ "organization_id": {
283
+ "description": "Organization ID to create the key for.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
284
+ "pattern": "^org_[0-9a-hjkmnp-tv-z]{26}$",
285
+ "title": "organization_id",
286
+ "type": "string"
287
+ }
288
+ },
289
+ "required": [
290
+ "organization_id",
291
+ "name"
292
+ ],
293
+ "title": "CreateApiKeyRequest",
294
+ "type": "object"
295
+ },
296
+ "CreateApiKeyResponse": {
297
+ "additionalProperties": false,
298
+ "description": "CreateApiKeyResponse contains the newly created API key and its secret.",
299
+ "properties": {
300
+ "api_key": {
301
+ "$ref": "#/components/schemas/ApiKey",
302
+ "description": "The created API key metadata.",
303
+ "title": "api_key"
304
+ },
305
+ "secret": {
306
+ "description": "The API key secret. This is only returned once and cannot be retrieved later.\n Format: ffy_{env}_{base32_uuid7}{base62_random}\n - env: \"prod\" or \"test\"\n - base32_uuid7: 26 chars (TypeID base32 alphabet: 0-9a-hjkmnp-tv-z)\n - base62_random: 43 chars (0-9A-Za-z)\n Store this value securely - it will not be shown again.\n SECURITY WARNING: This field must NEVER be logged. Handlers must redact secrets from all logs.",
307
+ "example": "ffy_prod_01h2xcejqtf2nbrexx3vqjhp41KJ8f3mNpQrStUvWxYz0123456789ABCDEFGHIJKLmNo",
308
+ "minLength": 78,
309
+ "pattern": "^ffy_(prod|test)_[A-Za-z0-9]+$",
310
+ "title": "secret",
311
+ "type": "string"
312
+ }
313
+ },
314
+ "required": [
315
+ "api_key",
316
+ "secret"
317
+ ],
318
+ "title": "CreateApiKeyResponse",
319
+ "type": "object"
320
+ },
194
321
  "CreateDocumentRequest": {
195
322
  "additionalProperties": false,
196
323
  "description": "CreateDocumentRequest contains the file and metadata for creating a document.",
@@ -257,9 +384,52 @@
257
384
  "title": "document"
258
385
  }
259
386
  },
387
+ "required": [
388
+ "document"
389
+ ],
260
390
  "title": "CreateDocumentResponse",
261
391
  "type": "object"
262
392
  },
393
+ "CreateOrganizationRequest": {
394
+ "additionalProperties": false,
395
+ "description": "CreateOrganizationRequest contains the data needed to create a new organization.",
396
+ "properties": {
397
+ "name": {
398
+ "description": "Human-readable organization name.",
399
+ "maxLength": 255,
400
+ "minLength": 1,
401
+ "title": "name",
402
+ "type": "string"
403
+ },
404
+ "owner_user_id": {
405
+ "description": "Owner user ID. If not provided, the authenticated user becomes the owner.\n Authorization: Specifying a different user requires system maintainer role.\n Required when the caller is a service account (service accounts cannot own organizations).\n Pattern: user_[0-9a-hjkmnp-tv-z]{26}",
406
+ "pattern": "^user_[0-9a-hjkmnp-tv-z]{26}$",
407
+ "title": "owner_user_id",
408
+ "type": "string"
409
+ }
410
+ },
411
+ "required": [
412
+ "name"
413
+ ],
414
+ "title": "CreateOrganizationRequest",
415
+ "type": "object"
416
+ },
417
+ "CreateOrganizationResponse": {
418
+ "additionalProperties": false,
419
+ "description": "CreateOrganizationResponse contains the newly created organization.",
420
+ "properties": {
421
+ "organization": {
422
+ "$ref": "#/components/schemas/Organization",
423
+ "description": "The created organization.",
424
+ "title": "organization"
425
+ }
426
+ },
427
+ "required": [
428
+ "organization"
429
+ ],
430
+ "title": "CreateOrganizationResponse",
431
+ "type": "object"
432
+ },
263
433
  "CreateVersionRequest": {
264
434
  "additionalProperties": false,
265
435
  "description": "CreateVersionRequest contains the file and metadata for creating a version.",
@@ -553,21 +723,51 @@
553
723
  "title": "document"
554
724
  }
555
725
  },
726
+ "required": [
727
+ "document"
728
+ ],
556
729
  "title": "GetDocumentResponse",
557
730
  "type": "object"
558
731
  },
732
+ "GetOrganizationRequest": {
733
+ "additionalProperties": false,
734
+ "description": "GetOrganizationRequest identifies an organization to retrieve.",
735
+ "properties": {
736
+ "organization_id": {
737
+ "description": "Organization ID.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
738
+ "pattern": "^org_[0-9a-hjkmnp-tv-z]{26}$",
739
+ "title": "organization_id",
740
+ "type": "string"
741
+ }
742
+ },
743
+ "required": [
744
+ "organization_id"
745
+ ],
746
+ "title": "GetOrganizationRequest",
747
+ "type": "object"
748
+ },
749
+ "GetOrganizationResponse": {
750
+ "additionalProperties": false,
751
+ "description": "GetOrganizationResponse contains the requested organization.",
752
+ "properties": {
753
+ "organization": {
754
+ "$ref": "#/components/schemas/Organization",
755
+ "description": "The requested organization.",
756
+ "title": "organization"
757
+ }
758
+ },
759
+ "required": [
760
+ "organization"
761
+ ],
762
+ "title": "GetOrganizationResponse",
763
+ "type": "object"
764
+ },
559
765
  "GetVersionRequest": {
560
766
  "additionalProperties": false,
561
767
  "description": "GetVersionRequest identifies a specific version to retrieve.",
562
768
  "properties": {
563
- "document_id": {
564
- "description": "Document ID.\n Pattern: doc_[0-9a-hjkmnp-tv-z]{26}",
565
- "pattern": "^doc_[0-9a-hjkmnp-tv-z]{26}$",
566
- "title": "document_id",
567
- "type": "string"
568
- },
569
769
  "version_id": {
570
- "description": "Version ID.\n Pattern: ver_[0-9a-hjkmnp-tv-z]{26}",
770
+ "description": "Version ID to retrieve.\n Pattern: ver_[0-9a-hjkmnp-tv-z]{26}",
571
771
  "pattern": "^ver_[0-9a-hjkmnp-tv-z]{26}$",
572
772
  "title": "version_id",
573
773
  "type": "string"
@@ -576,6 +776,66 @@
576
776
  "title": "GetVersionRequest",
577
777
  "type": "object"
578
778
  },
779
+ "ListApiKeysRequest": {
780
+ "additionalProperties": false,
781
+ "description": "ListApiKeysRequest specifies filters and pagination for listing API keys.",
782
+ "properties": {
783
+ "include_revoked": {
784
+ "description": "Whether to include revoked keys in the response.\n Default: false (only active and expired-but-not-revoked keys are returned).\n When true, all keys including revoked ones are returned.\n Note: Expired keys are always included unless also revoked; use is_active to filter.",
785
+ "title": "include_revoked",
786
+ "type": "boolean"
787
+ },
788
+ "organization_id": {
789
+ "description": "Organization ID to list keys for.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
790
+ "pattern": "^org_[0-9a-hjkmnp-tv-z]{26}$",
791
+ "title": "organization_id",
792
+ "type": "string"
793
+ },
794
+ "page_size": {
795
+ "description": "Maximum number of items to return per page (1-100). Default: 50.",
796
+ "format": "int32",
797
+ "maximum": 100,
798
+ "minimum": 1,
799
+ "nullable": true,
800
+ "title": "page_size",
801
+ "type": "integer"
802
+ },
803
+ "page_token": {
804
+ "description": "Opaque pagination token from a previous response.",
805
+ "title": "page_token",
806
+ "type": "string"
807
+ }
808
+ },
809
+ "required": [
810
+ "organization_id"
811
+ ],
812
+ "title": "ListApiKeysRequest",
813
+ "type": "object"
814
+ },
815
+ "ListApiKeysResponse": {
816
+ "additionalProperties": false,
817
+ "description": "ListApiKeysResponse contains a page of API keys.",
818
+ "properties": {
819
+ "items": {
820
+ "description": "List of API keys (secrets are never included).",
821
+ "items": {
822
+ "$ref": "#/components/schemas/ApiKey"
823
+ },
824
+ "title": "items",
825
+ "type": "array"
826
+ },
827
+ "pagination": {
828
+ "$ref": "#/components/schemas/Pagination",
829
+ "description": "Pagination metadata.",
830
+ "title": "pagination"
831
+ }
832
+ },
833
+ "required": [
834
+ "pagination"
835
+ ],
836
+ "title": "ListApiKeysResponse",
837
+ "type": "object"
838
+ },
579
839
  "ListDocumentPoliciesRequest": {
580
840
  "additionalProperties": false,
581
841
  "description": "ListDocumentPoliciesRequest specifies pagination for listing document policies.\n Follows Google AIP-158 for pagination field naming.",
@@ -623,6 +883,9 @@
623
883
  "title": "pagination"
624
884
  }
625
885
  },
886
+ "required": [
887
+ "pagination"
888
+ ],
626
889
  "title": "ListDocumentPoliciesResponse",
627
890
  "type": "object"
628
891
  },
@@ -692,9 +955,58 @@
692
955
  "title": "pagination"
693
956
  }
694
957
  },
958
+ "required": [
959
+ "pagination"
960
+ ],
695
961
  "title": "ListDocumentsResponse",
696
962
  "type": "object"
697
963
  },
964
+ "ListOrganizationsRequest": {
965
+ "additionalProperties": false,
966
+ "description": "ListOrganizationsRequest specifies pagination for listing organizations.",
967
+ "properties": {
968
+ "page_size": {
969
+ "description": "Maximum number of items to return per page (1-100). Default: 50.",
970
+ "format": "int32",
971
+ "maximum": 100,
972
+ "minimum": 1,
973
+ "nullable": true,
974
+ "title": "page_size",
975
+ "type": "integer"
976
+ },
977
+ "page_token": {
978
+ "description": "Opaque pagination token from a previous response.",
979
+ "title": "page_token",
980
+ "type": "string"
981
+ }
982
+ },
983
+ "title": "ListOrganizationsRequest",
984
+ "type": "object"
985
+ },
986
+ "ListOrganizationsResponse": {
987
+ "additionalProperties": false,
988
+ "description": "ListOrganizationsResponse contains a page of organizations.",
989
+ "properties": {
990
+ "items": {
991
+ "description": "List of organizations.",
992
+ "items": {
993
+ "$ref": "#/components/schemas/Organization"
994
+ },
995
+ "title": "items",
996
+ "type": "array"
997
+ },
998
+ "pagination": {
999
+ "$ref": "#/components/schemas/Pagination",
1000
+ "description": "Pagination metadata.",
1001
+ "title": "pagination"
1002
+ }
1003
+ },
1004
+ "required": [
1005
+ "pagination"
1006
+ ],
1007
+ "title": "ListOrganizationsResponse",
1008
+ "type": "object"
1009
+ },
698
1010
  "ListVersionsRequest": {
699
1011
  "additionalProperties": false,
700
1012
  "description": "ListVersionsRequest specifies filters and pagination for listing versions.\n Follows Google AIP-158 for pagination field naming.",
@@ -742,9 +1054,46 @@
742
1054
  "title": "pagination"
743
1055
  }
744
1056
  },
1057
+ "required": [
1058
+ "pagination"
1059
+ ],
745
1060
  "title": "ListVersionsResponse",
746
1061
  "type": "object"
747
1062
  },
1063
+ "Organization": {
1064
+ "additionalProperties": false,
1065
+ "description": "Organization represents a Factify organization.",
1066
+ "properties": {
1067
+ "created_at": {
1068
+ "description": "Timestamp when the organization was created.",
1069
+ "format": "date-time",
1070
+ "title": "created_at",
1071
+ "type": "string"
1072
+ },
1073
+ "id": {
1074
+ "description": "Unique ID for the organization.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
1075
+ "example": "org_01h2xcejqtf2nbrexx3vqjhp41",
1076
+ "pattern": "^org_[0-9a-hjkmnp-tv-z]{26}$",
1077
+ "title": "id",
1078
+ "type": "string"
1079
+ },
1080
+ "name": {
1081
+ "description": "Human-readable organization name.",
1082
+ "example": "Acme Corporation",
1083
+ "maxLength": 255,
1084
+ "minLength": 1,
1085
+ "title": "name",
1086
+ "type": "string"
1087
+ }
1088
+ },
1089
+ "required": [
1090
+ "id",
1091
+ "name",
1092
+ "created_at"
1093
+ ],
1094
+ "title": "Organization",
1095
+ "type": "object"
1096
+ },
748
1097
  "Pagination": {
749
1098
  "additionalProperties": false,
750
1099
  "description": "Pagination contains cursor-based pagination metadata.\n Follows Google AIP-158 for pagination field naming.",
@@ -810,6 +1159,47 @@
810
1159
  "failed"
811
1160
  ]
812
1161
  },
1162
+ "RevokeApiKeyRequest": {
1163
+ "additionalProperties": false,
1164
+ "description": "RevokeApiKeyRequest identifies an API key to revoke.",
1165
+ "properties": {
1166
+ "api_key_id": {
1167
+ "description": "API key ID to revoke.\n Pattern: key_[0-9a-hjkmnp-tv-z]{26}",
1168
+ "pattern": "^key_[0-9a-hjkmnp-tv-z]{26}$",
1169
+ "title": "api_key_id",
1170
+ "type": "string"
1171
+ },
1172
+ "reason": {
1173
+ "description": "Optional reason for revocation (for audit purposes).\n The revoking user's identity and timestamp are captured in audit logs separately.",
1174
+ "maxLength": 500,
1175
+ "minLength": 1,
1176
+ "nullable": true,
1177
+ "title": "reason",
1178
+ "type": "string"
1179
+ }
1180
+ },
1181
+ "required": [
1182
+ "api_key_id"
1183
+ ],
1184
+ "title": "RevokeApiKeyRequest",
1185
+ "type": "object"
1186
+ },
1187
+ "RevokeApiKeyResponse": {
1188
+ "additionalProperties": false,
1189
+ "description": "RevokeApiKeyResponse contains the revoked API key.",
1190
+ "properties": {
1191
+ "api_key": {
1192
+ "$ref": "#/components/schemas/ApiKey",
1193
+ "description": "The revoked API key with updated revoked_at timestamp.",
1194
+ "title": "api_key"
1195
+ }
1196
+ },
1197
+ "required": [
1198
+ "api_key"
1199
+ ],
1200
+ "title": "RevokeApiKeyResponse",
1201
+ "type": "object"
1202
+ },
813
1203
  "TimestampFilter": {
814
1204
  "additionalProperties": false,
815
1205
  "description": "TimestampFilter specifies a time range for filtering.\n Used with Vanguard dot notation: ?created.after=...\u0026created.before=...",
@@ -871,6 +1261,9 @@
871
1261
  "title": "document"
872
1262
  }
873
1263
  },
1264
+ "required": [
1265
+ "document"
1266
+ ],
874
1267
  "title": "UpdateDocumentResponse",
875
1268
  "type": "object"
876
1269
  },
@@ -884,12 +1277,6 @@
884
1277
  "title": "description",
885
1278
  "type": "string"
886
1279
  },
887
- "document_id": {
888
- "description": "Document ID.\n Pattern: doc_[0-9a-hjkmnp-tv-z]{26}",
889
- "pattern": "^doc_[0-9a-hjkmnp-tv-z]{26}$",
890
- "title": "document_id",
891
- "type": "string"
892
- },
893
1280
  "title": {
894
1281
  "description": "New title (max 255 characters).",
895
1282
  "maxLength": 255,
@@ -1024,38 +1411,267 @@
1024
1411
  "type": "string"
1025
1412
  }
1026
1413
  },
1027
- "required": [
1028
- "id"
1414
+ "required": [
1415
+ "id"
1416
+ ],
1417
+ "title": "VersionRef",
1418
+ "type": "object"
1419
+ }
1420
+ },
1421
+ "securitySchemes": {
1422
+ "bearerAuth": {
1423
+ "bearerFormat": "API Key",
1424
+ "description": "Bearer authentication header of the form Bearer \u003ctoken\u003e, where \u003ctoken\u003e is your auth token.",
1425
+ "scheme": "bearer",
1426
+ "type": "http"
1427
+ }
1428
+ }
1429
+ },
1430
+ "info": {
1431
+ "contact": {
1432
+ "email": "api@factify.com",
1433
+ "name": "Factify API Support",
1434
+ "url": "https://factify.com/support"
1435
+ },
1436
+ "description": "Factify API enables you to create, manage, and control access to legally-binding documents that replace PDFs.\n\n## Authentication\n\nBearer authentication header of the form Bearer \u003ctoken\u003e, where \u003ctoken\u003e is your auth token.\n\n```\nAuthorization: Bearer ffy...\n```\n\n## Rate Limiting\n\n- 1000 requests per minute per API key\n- 100 requests per minute for resource creation (POST)\n\n## Errors\n\nFactify uses conventional HTTP status codes and returns structured error responses:\n\n```json\n{\n \"error\": {\n \"type\": \"invalid_request_error\",\n \"message\": \"Document title cannot be empty\",\n \"param\": \"title\",\n \"code\": \"missing_required_field\"\n }\n}\n```\n",
1437
+ "license": {
1438
+ "name": "Proprietary",
1439
+ "url": "https://factify.com/terms"
1440
+ },
1441
+ "title": "Factify API",
1442
+ "version": "1.0.0"
1443
+ },
1444
+ "openapi": "3.1.0",
1445
+ "paths": {
1446
+ "/v1beta/api-keys": {
1447
+ "get": {
1448
+ "description": "Lists API keys for an organization.",
1449
+ "operationId": "listApiKeys",
1450
+ "parameters": [
1451
+ {
1452
+ "description": "Organization ID to list keys for.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
1453
+ "in": "query",
1454
+ "name": "organization_id",
1455
+ "required": true,
1456
+ "schema": {
1457
+ "description": "Organization ID to list keys for.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
1458
+ "pattern": "^org_[0-9a-hjkmnp-tv-z]{26}$",
1459
+ "title": "organization_id",
1460
+ "type": "string"
1461
+ }
1462
+ },
1463
+ {
1464
+ "description": "Whether to include revoked keys in the response.\n Default: false (only active and expired-but-not-revoked keys are returned).\n When true, all keys including revoked ones are returned.\n Note: Expired keys are always included unless also revoked; use is_active to filter.",
1465
+ "in": "query",
1466
+ "name": "include_revoked",
1467
+ "schema": {
1468
+ "description": "Whether to include revoked keys in the response.\n Default: false (only active and expired-but-not-revoked keys are returned).\n When true, all keys including revoked ones are returned.\n Note: Expired keys are always included unless also revoked; use is_active to filter.",
1469
+ "title": "include_revoked",
1470
+ "type": "boolean"
1471
+ }
1472
+ },
1473
+ {
1474
+ "description": "Opaque pagination token from a previous response.",
1475
+ "in": "query",
1476
+ "name": "page_token",
1477
+ "schema": {
1478
+ "description": "Opaque pagination token from a previous response.",
1479
+ "title": "page_token",
1480
+ "type": "string"
1481
+ }
1482
+ },
1483
+ {
1484
+ "description": "Maximum number of items to return per page (1-100). Default: 50.",
1485
+ "in": "query",
1486
+ "name": "page_size",
1487
+ "schema": {
1488
+ "description": "Maximum number of items to return per page (1-100). Default: 50.",
1489
+ "format": "int32",
1490
+ "maximum": 100,
1491
+ "minimum": 1,
1492
+ "title": "page_size",
1493
+ "type": "integer"
1494
+ }
1495
+ }
1496
+ ],
1497
+ "responses": {
1498
+ "200": {
1499
+ "content": {
1500
+ "application/json": {
1501
+ "schema": {
1502
+ "$ref": "#/components/schemas/ListApiKeysResponse"
1503
+ }
1504
+ }
1505
+ },
1506
+ "description": "Success"
1507
+ },
1508
+ "400": {
1509
+ "$ref": "#/components/responses/BadRequest"
1510
+ },
1511
+ "401": {
1512
+ "$ref": "#/components/responses/Unauthorized"
1513
+ },
1514
+ "403": {
1515
+ "$ref": "#/components/responses/Forbidden"
1516
+ },
1517
+ "404": {
1518
+ "$ref": "#/components/responses/NotFound"
1519
+ },
1520
+ "429": {
1521
+ "$ref": "#/components/responses/RateLimitExceeded"
1522
+ },
1523
+ "500": {
1524
+ "$ref": "#/components/responses/InternalServerError"
1525
+ }
1526
+ },
1527
+ "summary": "List API keys",
1528
+ "tags": [
1529
+ "API Keys"
1530
+ ],
1531
+ "x-speakeasy-pagination": {
1532
+ "inputs": [
1533
+ {
1534
+ "in": "parameters",
1535
+ "name": "page_token",
1536
+ "type": "cursor"
1537
+ }
1538
+ ],
1539
+ "outputs": {
1540
+ "nextCursor": "$.pagination.next_page_token"
1541
+ },
1542
+ "type": "cursor"
1543
+ },
1544
+ "x-speakeasy-name-override": "list"
1545
+ },
1546
+ "post": {
1547
+ "description": "Creates a new API key for the specified organization. The secret is only returned once in the response and cannot be retrieved later.",
1548
+ "operationId": "createApiKey",
1549
+ "requestBody": {
1550
+ "content": {
1551
+ "application/json": {
1552
+ "schema": {
1553
+ "$ref": "#/components/schemas/CreateApiKeyRequest"
1554
+ }
1555
+ }
1556
+ },
1557
+ "required": true
1558
+ },
1559
+ "responses": {
1560
+ "200": {
1561
+ "content": {
1562
+ "application/json": {
1563
+ "schema": {
1564
+ "$ref": "#/components/schemas/CreateApiKeyResponse"
1565
+ }
1566
+ }
1567
+ },
1568
+ "description": "Success"
1569
+ },
1570
+ "400": {
1571
+ "$ref": "#/components/responses/BadRequest"
1572
+ },
1573
+ "401": {
1574
+ "$ref": "#/components/responses/Unauthorized"
1575
+ },
1576
+ "403": {
1577
+ "$ref": "#/components/responses/Forbidden"
1578
+ },
1579
+ "404": {
1580
+ "$ref": "#/components/responses/NotFound"
1581
+ },
1582
+ "429": {
1583
+ "$ref": "#/components/responses/RateLimitExceeded"
1584
+ },
1585
+ "500": {
1586
+ "$ref": "#/components/responses/InternalServerError"
1587
+ }
1588
+ },
1589
+ "summary": "Create an API key",
1590
+ "tags": [
1591
+ "API Keys"
1592
+ ],
1593
+ "x-speakeasy-name-override": "create"
1594
+ }
1595
+ },
1596
+ "/v1beta/api-keys/{api_key_id}/revoke": {
1597
+ "post": {
1598
+ "description": "Revokes an API key, immediately preventing it from being used for authentication.",
1599
+ "operationId": "revokeApiKey",
1600
+ "parameters": [
1601
+ {
1602
+ "description": "API key ID to revoke.\n Pattern: key_[0-9a-hjkmnp-tv-z]{26}",
1603
+ "in": "path",
1604
+ "name": "api_key_id",
1605
+ "required": true,
1606
+ "schema": {
1607
+ "description": "API key ID to revoke.\n Pattern: key_[0-9a-hjkmnp-tv-z]{26}",
1608
+ "pattern": "^key_[0-9a-hjkmnp-tv-z]{26}$",
1609
+ "title": "api_key_id",
1610
+ "type": "string"
1611
+ }
1612
+ }
1613
+ ],
1614
+ "requestBody": {
1615
+ "content": {
1616
+ "application/json": {
1617
+ "schema": {
1618
+ "additionalProperties": false,
1619
+ "description": "RevokeApiKeyRequest identifies an API key to revoke.",
1620
+ "properties": {
1621
+ "reason": {
1622
+ "description": "Optional reason for revocation (for audit purposes).\n The revoking user's identity and timestamp are captured in audit logs separately.",
1623
+ "maxLength": 500,
1624
+ "minLength": 1,
1625
+ "nullable": true,
1626
+ "title": "reason",
1627
+ "type": "string"
1628
+ }
1629
+ },
1630
+ "required": [],
1631
+ "title": "RevokeApiKeyRequest",
1632
+ "type": "object"
1633
+ }
1634
+ }
1635
+ },
1636
+ "required": true
1637
+ },
1638
+ "responses": {
1639
+ "200": {
1640
+ "content": {
1641
+ "application/json": {
1642
+ "schema": {
1643
+ "$ref": "#/components/schemas/RevokeApiKeyResponse"
1644
+ }
1645
+ }
1646
+ },
1647
+ "description": "Success"
1648
+ },
1649
+ "400": {
1650
+ "$ref": "#/components/responses/BadRequest"
1651
+ },
1652
+ "401": {
1653
+ "$ref": "#/components/responses/Unauthorized"
1654
+ },
1655
+ "403": {
1656
+ "$ref": "#/components/responses/Forbidden"
1657
+ },
1658
+ "404": {
1659
+ "$ref": "#/components/responses/NotFound"
1660
+ },
1661
+ "429": {
1662
+ "$ref": "#/components/responses/RateLimitExceeded"
1663
+ },
1664
+ "500": {
1665
+ "$ref": "#/components/responses/InternalServerError"
1666
+ }
1667
+ },
1668
+ "summary": "Revoke an API key",
1669
+ "tags": [
1670
+ "API Keys"
1029
1671
  ],
1030
- "title": "VersionRef",
1031
- "type": "object"
1672
+ "x-speakeasy-name-override": "revoke"
1032
1673
  }
1033
1674
  },
1034
- "securitySchemes": {
1035
- "bearerAuth": {
1036
- "bearerFormat": "API Key",
1037
- "description": "Bearer authentication header of the form Bearer \u003ctoken\u003e, where \u003ctoken\u003e is your auth token.",
1038
- "scheme": "bearer",
1039
- "type": "http"
1040
- }
1041
- }
1042
- },
1043
- "info": {
1044
- "contact": {
1045
- "email": "api@factify.com",
1046
- "name": "Factify API Support",
1047
- "url": "https://factify.com/support"
1048
- },
1049
- "description": "Factify API enables you to create, manage, and control access to legally-binding documents that replace PDFs.\n\n## Authentication\n\nBearer authentication header of the form Bearer \u003ctoken\u003e, where \u003ctoken\u003e is your auth token.\n\n```\nAuthorization: Bearer ffy...\n```\n\n## Rate Limiting\n\n- 1000 requests per minute per API key\n- 100 requests per minute for resource creation (POST)\n\n## Errors\n\nFactify uses conventional HTTP status codes and returns structured error responses:\n\n```json\n{\n \"error\": {\n \"type\": \"invalid_request_error\",\n \"message\": \"Document title cannot be empty\",\n \"param\": \"title\",\n \"code\": \"missing_required_field\"\n }\n}\n```\n",
1050
- "license": {
1051
- "name": "Proprietary",
1052
- "url": "https://factify.com/terms"
1053
- },
1054
- "title": "Factify API",
1055
- "version": "1.0.0"
1056
- },
1057
- "openapi": "3.1.0",
1058
- "paths": {
1059
1675
  "/v1beta/documents": {
1060
1676
  "get": {
1061
1677
  "description": "List documents with cursor-based pagination.",
@@ -1184,27 +1800,20 @@
1184
1800
  "tags": [
1185
1801
  "Documents"
1186
1802
  ],
1187
- "x-speakeasy-name-override": "list",
1188
1803
  "x-speakeasy-pagination": {
1189
- "type": "cursor",
1190
1804
  "inputs": [
1191
1805
  {
1192
- "name": "page_token",
1193
1806
  "in": "parameters",
1807
+ "name": "page_token",
1194
1808
  "type": "cursor"
1195
1809
  }
1196
1810
  ],
1197
1811
  "outputs": {
1198
1812
  "nextCursor": "$.pagination.next_page_token"
1199
- }
1813
+ },
1814
+ "type": "cursor"
1200
1815
  },
1201
- "x-codeSamples": [
1202
- {
1203
- "lang": "typescript",
1204
- "label": "listDocuments",
1205
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.list({\n pageToken: \"eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
1206
- }
1207
- ]
1816
+ "x-speakeasy-name-override": "list"
1208
1817
  },
1209
1818
  "post": {
1210
1819
  "description": "Creates a new document by uploading a PDF file.",
@@ -1253,14 +1862,7 @@
1253
1862
  "tags": [
1254
1863
  "Documents"
1255
1864
  ],
1256
- "x-speakeasy-name-override": "create",
1257
- "x-codeSamples": [
1258
- {
1259
- "lang": "typescript",
1260
- "label": "createDocument",
1261
- "source": "import { Factify } from \"@factify/sdk\";\nimport { openAsBlob } from \"node:fs\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.create({\n payload: await openAsBlob(\"example.file\"),\n title: \"\u003cvalue\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
1262
- }
1263
- ]
1865
+ "x-speakeasy-name-override": "create"
1264
1866
  }
1265
1867
  },
1266
1868
  "/v1beta/documents/{document_id}": {
@@ -1315,14 +1917,7 @@
1315
1917
  "tags": [
1316
1918
  "Documents"
1317
1919
  ],
1318
- "x-speakeasy-name-override": "get",
1319
- "x-codeSamples": [
1320
- {
1321
- "lang": "typescript",
1322
- "label": "getDocument",
1323
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.get({\n documentId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
1324
- }
1325
- ]
1920
+ "x-speakeasy-name-override": "get"
1326
1921
  },
1327
1922
  "patch": {
1328
1923
  "description": "Update document title and description.",
@@ -1405,14 +2000,7 @@
1405
2000
  "tags": [
1406
2001
  "Documents"
1407
2002
  ],
1408
- "x-speakeasy-name-override": "update",
1409
- "x-codeSamples": [
1410
- {
1411
- "lang": "typescript",
1412
- "label": "updateDocument",
1413
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.update({\n documentId: \"\u003cid\u003e\",\n body: {},\n });\n\n console.log(result);\n}\n\nrun();"
1414
- }
1415
- ]
2003
+ "x-speakeasy-name-override": "update"
1416
2004
  }
1417
2005
  },
1418
2006
  "/v1beta/documents/{document_id}/entry_page": {
@@ -1465,17 +2053,10 @@
1465
2053
  },
1466
2054
  "summary": "Generate entry page",
1467
2055
  "tags": [
1468
- "Entry Pages"
2056
+ "Sharing \u0026 Distribution"
1469
2057
  ],
1470
2058
  "x-speakeasy-group": "entryPages",
1471
- "x-speakeasy-name-override": "generate",
1472
- "x-codeSamples": [
1473
- {
1474
- "lang": "typescript",
1475
- "label": "generateDocumentEntryPage",
1476
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.entryPages.generate({\n documentId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
1477
- }
1478
- ]
2059
+ "x-speakeasy-name-override": "generate"
1479
2060
  }
1480
2061
  },
1481
2062
  "/v1beta/documents/{document_id}/policies": {
@@ -1554,27 +2135,20 @@
1554
2135
  "tags": [
1555
2136
  "Policies"
1556
2137
  ],
1557
- "x-speakeasy-name-override": "list",
1558
2138
  "x-speakeasy-pagination": {
1559
- "type": "cursor",
1560
2139
  "inputs": [
1561
2140
  {
1562
- "name": "page_token",
1563
2141
  "in": "parameters",
2142
+ "name": "page_token",
1564
2143
  "type": "cursor"
1565
2144
  }
1566
2145
  ],
1567
2146
  "outputs": {
1568
2147
  "nextCursor": "$.pagination.next_page_token"
1569
- }
2148
+ },
2149
+ "type": "cursor"
1570
2150
  },
1571
- "x-codeSamples": [
1572
- {
1573
- "lang": "typescript",
1574
- "label": "listDocumentPolicies",
1575
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.policies.list({\n documentId: \"\u003cid\u003e\",\n pageToken: \"eyJpZCI6InBvbF8wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
1576
- }
1577
- ]
2151
+ "x-speakeasy-name-override": "list"
1578
2152
  },
1579
2153
  "post": {
1580
2154
  "description": "Attach a policy to a document.",
@@ -1651,14 +2225,7 @@
1651
2225
  "tags": [
1652
2226
  "Policies"
1653
2227
  ],
1654
- "x-speakeasy-name-override": "attach",
1655
- "x-codeSamples": [
1656
- {
1657
- "lang": "typescript",
1658
- "label": "attachDocumentPolicy",
1659
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.policies.attach({\n documentId: \"\u003cid\u003e\",\n body: {\n policyId: \"\u003cid\u003e\",\n },\n });\n\n console.log(result);\n}\n\nrun();"
1660
- }
1661
- ]
2228
+ "x-speakeasy-name-override": "attach"
1662
2229
  }
1663
2230
  },
1664
2231
  "/v1beta/documents/{document_id}/policies/{policy_id}": {
@@ -1725,14 +2292,7 @@
1725
2292
  "tags": [
1726
2293
  "Policies"
1727
2294
  ],
1728
- "x-speakeasy-name-override": "detach",
1729
- "x-codeSamples": [
1730
- {
1731
- "lang": "typescript",
1732
- "label": "detachDocumentPolicy",
1733
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.policies.detach({\n documentId: \"\u003cid\u003e\",\n policyId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
1734
- }
1735
- ]
2295
+ "x-speakeasy-name-override": "detach"
1736
2296
  }
1737
2297
  },
1738
2298
  "/v1beta/documents/{document_id}/versions": {
@@ -1811,27 +2371,20 @@
1811
2371
  "tags": [
1812
2372
  "Versions"
1813
2373
  ],
1814
- "x-speakeasy-name-override": "list",
1815
2374
  "x-speakeasy-pagination": {
1816
- "type": "cursor",
1817
2375
  "inputs": [
1818
2376
  {
1819
- "name": "page_token",
1820
2377
  "in": "parameters",
2378
+ "name": "page_token",
1821
2379
  "type": "cursor"
1822
2380
  }
1823
2381
  ],
1824
2382
  "outputs": {
1825
2383
  "nextCursor": "$.pagination.next_page_token"
1826
- }
2384
+ },
2385
+ "type": "cursor"
1827
2386
  },
1828
- "x-codeSamples": [
1829
- {
1830
- "lang": "typescript",
1831
- "label": "listDocumentVersions",
1832
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.list({\n documentId: \"\u003cid\u003e\",\n pageToken: \"eyJpZCI6InZlcl8wMWgyYWJjZDEyMzRlZmdoNTY3OGprbW5wdCIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
1833
- }
1834
- ]
2387
+ "x-speakeasy-name-override": "list"
1835
2388
  },
1836
2389
  "post": {
1837
2390
  "description": "Creates a new version by uploading a PDF file.",
@@ -1894,40 +2447,204 @@
1894
2447
  "tags": [
1895
2448
  "Versions"
1896
2449
  ],
1897
- "x-speakeasy-name-override": "create",
1898
- "x-codeSamples": [
2450
+ "x-speakeasy-name-override": "create"
2451
+ }
2452
+ },
2453
+ "/v1beta/organizations": {
2454
+ "get": {
2455
+ "description": "List organizations the caller has access to.",
2456
+ "operationId": "listOrganizations",
2457
+ "parameters": [
2458
+ {
2459
+ "description": "Opaque pagination token from a previous response.",
2460
+ "in": "query",
2461
+ "name": "page_token",
2462
+ "schema": {
2463
+ "description": "Opaque pagination token from a previous response.",
2464
+ "title": "page_token",
2465
+ "type": "string"
2466
+ }
2467
+ },
1899
2468
  {
1900
- "lang": "typescript",
1901
- "label": "createDocumentVersion",
1902
- "source": "import { Factify } from \"@factify/sdk\";\nimport { openAsBlob } from \"node:fs\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.create({\n documentId: \"\u003cid\u003e\",\n body: {\n payload: await openAsBlob(\"example.file\"),\n },\n });\n\n console.log(result);\n}\n\nrun();"
2469
+ "description": "Maximum number of items to return per page (1-100). Default: 50.",
2470
+ "in": "query",
2471
+ "name": "page_size",
2472
+ "schema": {
2473
+ "description": "Maximum number of items to return per page (1-100). Default: 50.",
2474
+ "format": "int32",
2475
+ "maximum": 100,
2476
+ "minimum": 1,
2477
+ "title": "page_size",
2478
+ "type": "integer"
2479
+ }
1903
2480
  }
1904
- ]
2481
+ ],
2482
+ "responses": {
2483
+ "200": {
2484
+ "content": {
2485
+ "application/json": {
2486
+ "schema": {
2487
+ "$ref": "#/components/schemas/ListOrganizationsResponse"
2488
+ }
2489
+ }
2490
+ },
2491
+ "description": "Success"
2492
+ },
2493
+ "400": {
2494
+ "$ref": "#/components/responses/BadRequest"
2495
+ },
2496
+ "401": {
2497
+ "$ref": "#/components/responses/Unauthorized"
2498
+ },
2499
+ "403": {
2500
+ "$ref": "#/components/responses/Forbidden"
2501
+ },
2502
+ "404": {
2503
+ "$ref": "#/components/responses/NotFound"
2504
+ },
2505
+ "429": {
2506
+ "$ref": "#/components/responses/RateLimitExceeded"
2507
+ },
2508
+ "500": {
2509
+ "$ref": "#/components/responses/InternalServerError"
2510
+ }
2511
+ },
2512
+ "summary": "List organizations",
2513
+ "tags": [
2514
+ "Organizations"
2515
+ ],
2516
+ "x-speakeasy-pagination": {
2517
+ "inputs": [
2518
+ {
2519
+ "in": "parameters",
2520
+ "name": "page_token",
2521
+ "type": "cursor"
2522
+ }
2523
+ ],
2524
+ "outputs": {
2525
+ "nextCursor": "$.pagination.next_page_token"
2526
+ },
2527
+ "type": "cursor"
2528
+ },
2529
+ "x-speakeasy-name-override": "list"
2530
+ },
2531
+ "post": {
2532
+ "description": "Creates a new organization. The authenticated user becomes the organization owner.",
2533
+ "operationId": "createOrganization",
2534
+ "requestBody": {
2535
+ "content": {
2536
+ "application/json": {
2537
+ "schema": {
2538
+ "$ref": "#/components/schemas/CreateOrganizationRequest"
2539
+ }
2540
+ }
2541
+ },
2542
+ "required": true
2543
+ },
2544
+ "responses": {
2545
+ "200": {
2546
+ "content": {
2547
+ "application/json": {
2548
+ "schema": {
2549
+ "$ref": "#/components/schemas/CreateOrganizationResponse"
2550
+ }
2551
+ }
2552
+ },
2553
+ "description": "Success"
2554
+ },
2555
+ "400": {
2556
+ "$ref": "#/components/responses/BadRequest"
2557
+ },
2558
+ "401": {
2559
+ "$ref": "#/components/responses/Unauthorized"
2560
+ },
2561
+ "403": {
2562
+ "$ref": "#/components/responses/Forbidden"
2563
+ },
2564
+ "404": {
2565
+ "$ref": "#/components/responses/NotFound"
2566
+ },
2567
+ "429": {
2568
+ "$ref": "#/components/responses/RateLimitExceeded"
2569
+ },
2570
+ "500": {
2571
+ "$ref": "#/components/responses/InternalServerError"
2572
+ }
2573
+ },
2574
+ "summary": "Create an organization",
2575
+ "tags": [
2576
+ "Organizations"
2577
+ ],
2578
+ "x-speakeasy-name-override": "create"
1905
2579
  }
1906
2580
  },
1907
- "/v1beta/documents/{document_id}/versions/{version_id}": {
2581
+ "/v1beta/organizations/{organization_id}": {
1908
2582
  "get": {
1909
- "description": "Retrieve a specific version by ID.",
1910
- "operationId": "getDocumentVersion",
2583
+ "description": "Retrieve an organization by ID.",
2584
+ "operationId": "getOrganization",
1911
2585
  "parameters": [
1912
2586
  {
1913
- "description": "Document ID.\n Pattern: doc_[0-9a-hjkmnp-tv-z]{26}",
2587
+ "description": "Organization ID.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
1914
2588
  "in": "path",
1915
- "name": "document_id",
2589
+ "name": "organization_id",
1916
2590
  "required": true,
1917
2591
  "schema": {
1918
- "description": "Document ID.\n Pattern: doc_[0-9a-hjkmnp-tv-z]{26}",
1919
- "pattern": "^doc_[0-9a-hjkmnp-tv-z]{26}$",
1920
- "title": "document_id",
2592
+ "description": "Organization ID.\n Pattern: org_[0-9a-hjkmnp-tv-z]{26}",
2593
+ "pattern": "^org_[0-9a-hjkmnp-tv-z]{26}$",
2594
+ "title": "organization_id",
1921
2595
  "type": "string"
1922
2596
  }
2597
+ }
2598
+ ],
2599
+ "responses": {
2600
+ "200": {
2601
+ "content": {
2602
+ "application/json": {
2603
+ "schema": {
2604
+ "$ref": "#/components/schemas/GetOrganizationResponse"
2605
+ }
2606
+ }
2607
+ },
2608
+ "description": "Success"
2609
+ },
2610
+ "400": {
2611
+ "$ref": "#/components/responses/BadRequest"
2612
+ },
2613
+ "401": {
2614
+ "$ref": "#/components/responses/Unauthorized"
2615
+ },
2616
+ "403": {
2617
+ "$ref": "#/components/responses/Forbidden"
1923
2618
  },
2619
+ "404": {
2620
+ "$ref": "#/components/responses/NotFound"
2621
+ },
2622
+ "429": {
2623
+ "$ref": "#/components/responses/RateLimitExceeded"
2624
+ },
2625
+ "500": {
2626
+ "$ref": "#/components/responses/InternalServerError"
2627
+ }
2628
+ },
2629
+ "summary": "Retrieve an organization",
2630
+ "tags": [
2631
+ "Organizations"
2632
+ ],
2633
+ "x-speakeasy-name-override": "get"
2634
+ }
2635
+ },
2636
+ "/v1beta/versions/{version_id}": {
2637
+ "get": {
2638
+ "description": "Retrieve a specific version by ID.",
2639
+ "operationId": "getVersion",
2640
+ "parameters": [
1924
2641
  {
1925
- "description": "Version ID.\n Pattern: ver_[0-9a-hjkmnp-tv-z]{26}",
2642
+ "description": "Version ID to retrieve.\n Pattern: ver_[0-9a-hjkmnp-tv-z]{26}",
1926
2643
  "in": "path",
1927
2644
  "name": "version_id",
1928
2645
  "required": true,
1929
2646
  "schema": {
1930
- "description": "Version ID.\n Pattern: ver_[0-9a-hjkmnp-tv-z]{26}",
2647
+ "description": "Version ID to retrieve.\n Pattern: ver_[0-9a-hjkmnp-tv-z]{26}",
1931
2648
  "pattern": "^ver_[0-9a-hjkmnp-tv-z]{26}$",
1932
2649
  "title": "version_id",
1933
2650
  "type": "string"
@@ -1968,31 +2685,12 @@
1968
2685
  "tags": [
1969
2686
  "Versions"
1970
2687
  ],
1971
- "x-speakeasy-name-override": "get",
1972
- "x-codeSamples": [
1973
- {
1974
- "lang": "typescript",
1975
- "label": "getDocumentVersion",
1976
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.get({\n documentId: \"\u003cid\u003e\",\n versionId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
1977
- }
1978
- ]
2688
+ "x-speakeasy-name-override": "get"
1979
2689
  },
1980
2690
  "patch": {
1981
2691
  "description": "Update version title and description.",
1982
- "operationId": "updateDocumentVersion",
2692
+ "operationId": "updateVersion",
1983
2693
  "parameters": [
1984
- {
1985
- "description": "Document ID.\n Pattern: doc_[0-9a-hjkmnp-tv-z]{26}",
1986
- "in": "path",
1987
- "name": "document_id",
1988
- "required": true,
1989
- "schema": {
1990
- "description": "Document ID.\n Pattern: doc_[0-9a-hjkmnp-tv-z]{26}",
1991
- "pattern": "^doc_[0-9a-hjkmnp-tv-z]{26}$",
1992
- "title": "document_id",
1993
- "type": "string"
1994
- }
1995
- },
1996
2694
  {
1997
2695
  "description": "Version ID to update.\n Pattern: ver_[0-9a-hjkmnp-tv-z]{26}",
1998
2696
  "in": "path",
@@ -2068,14 +2766,7 @@
2068
2766
  "tags": [
2069
2767
  "Versions"
2070
2768
  ],
2071
- "x-speakeasy-name-override": "update",
2072
- "x-codeSamples": [
2073
- {
2074
- "lang": "typescript",
2075
- "label": "updateDocumentVersion",
2076
- "source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.update({\n documentId: \"\u003cid\u003e\",\n versionId: \"\u003cid\u003e\",\n body: {},\n });\n\n console.log(result);\n}\n\nrun();"
2077
- }
2078
- ]
2769
+ "x-speakeasy-name-override": "update"
2079
2770
  }
2080
2771
  }
2081
2772
  },
@@ -2103,13 +2794,21 @@
2103
2794
  "description": "Manage document versions and version history.",
2104
2795
  "name": "Versions"
2105
2796
  },
2797
+ {
2798
+ "description": "Create and manage organizations.",
2799
+ "name": "Organizations"
2800
+ },
2801
+ {
2802
+ "description": "Generate and manage API keys for authentication.",
2803
+ "name": "API Keys"
2804
+ },
2106
2805
  {
2107
2806
  "description": "Attach and manage access policies for documents.",
2108
2807
  "name": "Policies"
2109
2808
  },
2110
2809
  {
2111
2810
  "description": "Generate shareable entry pages for documents.",
2112
- "name": "Entry Pages"
2811
+ "name": "Sharing \u0026 Distribution"
2113
2812
  }
2114
2813
  ]
2115
2814
  }