@ominity/api-typescript 1.3.0 → 1.4.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 (430) hide show
  1. package/dist/commonjs/funcs/admins/adminsGet.js +1 -1
  2. package/dist/commonjs/funcs/admins/adminsGet.js.map +1 -1
  3. package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.d.ts +10 -0
  4. package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.js +121 -0
  6. package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.js.map +1 -0
  7. package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.d.ts +10 -0
  8. package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.js +123 -0
  10. package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.js.map +1 -0
  11. package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.d.ts +10 -0
  12. package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.js +114 -0
  14. package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.js.map +1 -0
  15. package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.d.ts +10 -0
  16. package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.d.ts.map +1 -0
  17. package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.js +115 -0
  18. package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.js.map +1 -0
  19. package/dist/commonjs/funcs/commerce/customerUserInvitationsList.d.ts +10 -0
  20. package/dist/commonjs/funcs/commerce/customerUserInvitationsList.d.ts.map +1 -0
  21. package/dist/commonjs/funcs/commerce/customerUserInvitationsList.js +131 -0
  22. package/dist/commonjs/funcs/commerce/customerUserInvitationsList.js.map +1 -0
  23. package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.d.ts +10 -0
  24. package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.js +112 -0
  26. package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.js.map +1 -0
  27. package/dist/commonjs/funcs/commerce/customerUserPermissionsList.d.ts +10 -0
  28. package/dist/commonjs/funcs/commerce/customerUserPermissionsList.d.ts.map +1 -0
  29. package/dist/commonjs/funcs/commerce/customerUserPermissionsList.js +118 -0
  30. package/dist/commonjs/funcs/commerce/customerUserPermissionsList.js.map +1 -0
  31. package/dist/commonjs/funcs/commerce/customerUserRolesCreate.d.ts +10 -0
  32. package/dist/commonjs/funcs/commerce/customerUserRolesCreate.d.ts.map +1 -0
  33. package/dist/commonjs/funcs/commerce/customerUserRolesCreate.js +123 -0
  34. package/dist/commonjs/funcs/commerce/customerUserRolesCreate.js.map +1 -0
  35. package/dist/commonjs/funcs/commerce/customerUserRolesDelete.d.ts +10 -0
  36. package/dist/commonjs/funcs/commerce/customerUserRolesDelete.d.ts.map +1 -0
  37. package/dist/commonjs/funcs/commerce/customerUserRolesDelete.js +117 -0
  38. package/dist/commonjs/funcs/commerce/customerUserRolesDelete.js.map +1 -0
  39. package/dist/commonjs/funcs/commerce/customerUserRolesGet.d.ts +10 -0
  40. package/dist/commonjs/funcs/commerce/customerUserRolesGet.d.ts.map +1 -0
  41. package/dist/commonjs/funcs/commerce/customerUserRolesGet.js +119 -0
  42. package/dist/commonjs/funcs/commerce/customerUserRolesGet.js.map +1 -0
  43. package/dist/commonjs/funcs/commerce/customerUserRolesList.d.ts +10 -0
  44. package/dist/commonjs/funcs/commerce/customerUserRolesList.d.ts.map +1 -0
  45. package/dist/commonjs/funcs/commerce/customerUserRolesList.js +127 -0
  46. package/dist/commonjs/funcs/commerce/customerUserRolesList.js.map +1 -0
  47. package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.d.ts +10 -0
  48. package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.d.ts.map +1 -0
  49. package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.js +123 -0
  50. package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.js.map +1 -0
  51. package/dist/commonjs/funcs/commerce/customerUsersDelete.d.ts +10 -0
  52. package/dist/commonjs/funcs/commerce/customerUsersDelete.d.ts.map +1 -0
  53. package/dist/commonjs/funcs/commerce/customerUsersDelete.js +117 -0
  54. package/dist/commonjs/funcs/commerce/customerUsersDelete.js.map +1 -0
  55. package/dist/commonjs/funcs/commerce/customerUsersGet.d.ts +10 -0
  56. package/dist/commonjs/funcs/commerce/customerUsersGet.d.ts.map +1 -0
  57. package/dist/commonjs/funcs/commerce/customerUsersGet.js +119 -0
  58. package/dist/commonjs/funcs/commerce/customerUsersGet.js.map +1 -0
  59. package/dist/commonjs/funcs/commerce/customerUsersList.d.ts +10 -0
  60. package/dist/commonjs/funcs/commerce/customerUsersList.d.ts.map +1 -0
  61. package/dist/commonjs/funcs/commerce/customerUsersList.js +132 -0
  62. package/dist/commonjs/funcs/commerce/customerUsersList.js.map +1 -0
  63. package/dist/commonjs/funcs/commerce/customerUsersUpdate.d.ts +10 -0
  64. package/dist/commonjs/funcs/commerce/customerUsersUpdate.d.ts.map +1 -0
  65. package/dist/commonjs/funcs/commerce/customerUsersUpdate.js +123 -0
  66. package/dist/commonjs/funcs/commerce/customerUsersUpdate.js.map +1 -0
  67. package/dist/commonjs/funcs/commerce/index.d.ts +16 -0
  68. package/dist/commonjs/funcs/commerce/index.d.ts.map +1 -1
  69. package/dist/commonjs/funcs/commerce/index.js +16 -0
  70. package/dist/commonjs/funcs/commerce/index.js.map +1 -1
  71. package/dist/commonjs/funcs/oauth2/index.js +4 -4
  72. package/dist/commonjs/funcs/oauth2/index.js.map +1 -1
  73. package/dist/commonjs/funcs/users/index.d.ts +1 -0
  74. package/dist/commonjs/funcs/users/index.d.ts.map +1 -1
  75. package/dist/commonjs/funcs/users/index.js +1 -0
  76. package/dist/commonjs/funcs/users/index.js.map +1 -1
  77. package/dist/commonjs/funcs/users/usersDisableMfa.js +1 -1
  78. package/dist/commonjs/funcs/users/usersDisableMfa.js.map +1 -1
  79. package/dist/commonjs/funcs/users/usersEnableMfa.js +1 -1
  80. package/dist/commonjs/funcs/users/usersEnableMfa.js.map +1 -1
  81. package/dist/commonjs/funcs/users/usersGetCustomer.d.ts +10 -0
  82. package/dist/commonjs/funcs/users/usersGetCustomer.d.ts.map +1 -0
  83. package/dist/commonjs/funcs/users/usersGetCustomer.js +122 -0
  84. package/dist/commonjs/funcs/users/usersGetCustomer.js.map +1 -0
  85. package/dist/commonjs/funcs/users/usersGetMfaMethod.js +1 -1
  86. package/dist/commonjs/funcs/users/usersGetMfaMethod.js.map +1 -1
  87. package/dist/commonjs/funcs/users/usersIssueToken.js +1 -1
  88. package/dist/commonjs/funcs/users/usersIssueToken.js.map +1 -1
  89. package/dist/commonjs/funcs/users/usersListCustomers.d.ts.map +1 -1
  90. package/dist/commonjs/funcs/users/usersListCustomers.js +7 -2
  91. package/dist/commonjs/funcs/users/usersListCustomers.js.map +1 -1
  92. package/dist/commonjs/funcs/users/usersListMfaMethods.js +1 -1
  93. package/dist/commonjs/funcs/users/usersListMfaMethods.js.map +1 -1
  94. package/dist/commonjs/funcs/users/usersListOAuthAccounts.js +1 -1
  95. package/dist/commonjs/funcs/users/usersListOAuthAccounts.js.map +1 -1
  96. package/dist/commonjs/funcs/users/usersListRecoveryCodes.js +1 -1
  97. package/dist/commonjs/funcs/users/usersListRecoveryCodes.js.map +1 -1
  98. package/dist/commonjs/funcs/users/usersRegenerateRecoveryCodes.js +1 -1
  99. package/dist/commonjs/funcs/users/usersRegenerateRecoveryCodes.js.map +1 -1
  100. package/dist/commonjs/funcs/users/usersSendMfa.js +1 -1
  101. package/dist/commonjs/funcs/users/usersSendMfa.js.map +1 -1
  102. package/dist/commonjs/funcs/users/usersValidateMfa.js +1 -1
  103. package/dist/commonjs/funcs/users/usersValidateMfa.js.map +1 -1
  104. package/dist/commonjs/funcs/users/usersValidateRecoveryCode.js +1 -1
  105. package/dist/commonjs/funcs/users/usersValidateRecoveryCode.js.map +1 -1
  106. package/dist/commonjs/lib/config.d.ts +3 -3
  107. package/dist/commonjs/lib/config.js +1 -1
  108. package/dist/commonjs/lib/encodings.d.ts +11 -0
  109. package/dist/commonjs/lib/encodings.d.ts.map +1 -1
  110. package/dist/commonjs/lib/encodings.js +23 -0
  111. package/dist/commonjs/lib/encodings.js.map +1 -1
  112. package/dist/commonjs/lib/sdks.d.ts +1 -0
  113. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  114. package/dist/commonjs/lib/sdks.js +16 -2
  115. package/dist/commonjs/lib/sdks.js.map +1 -1
  116. package/dist/commonjs/models/commerce/customer-user-invitation.d.ts +38 -0
  117. package/dist/commonjs/models/commerce/customer-user-invitation.d.ts.map +1 -0
  118. package/dist/commonjs/models/commerce/customer-user-invitation.js +89 -0
  119. package/dist/commonjs/models/commerce/customer-user-invitation.js.map +1 -0
  120. package/dist/commonjs/models/commerce/customer-user-permission.d.ts +27 -0
  121. package/dist/commonjs/models/commerce/customer-user-permission.d.ts.map +1 -0
  122. package/dist/commonjs/models/commerce/customer-user-permission.js +63 -0
  123. package/dist/commonjs/models/commerce/customer-user-permission.js.map +1 -0
  124. package/dist/commonjs/models/commerce/customer-user-role.d.ts +20 -0
  125. package/dist/commonjs/models/commerce/customer-user-role.d.ts.map +1 -0
  126. package/dist/commonjs/models/commerce/customer-user-role.js +61 -0
  127. package/dist/commonjs/models/commerce/customer-user-role.js.map +1 -0
  128. package/dist/commonjs/models/commerce/customer-user.d.ts +6 -0
  129. package/dist/commonjs/models/commerce/customer-user.d.ts.map +1 -1
  130. package/dist/commonjs/models/commerce/customer-user.js +18 -1
  131. package/dist/commonjs/models/commerce/customer-user.js.map +1 -1
  132. package/dist/commonjs/models/commerce/customer.d.ts +17 -0
  133. package/dist/commonjs/models/commerce/customer.d.ts.map +1 -0
  134. package/dist/commonjs/models/commerce/customer.js +58 -0
  135. package/dist/commonjs/models/commerce/customer.js.map +1 -0
  136. package/dist/commonjs/models/commerce/index.d.ts +5 -0
  137. package/dist/commonjs/models/commerce/index.d.ts.map +1 -1
  138. package/dist/commonjs/models/commerce/index.js +5 -0
  139. package/dist/commonjs/models/commerce/index.js.map +1 -1
  140. package/dist/commonjs/models/operations/commerce-customer-user-invitations.d.ts +70 -0
  141. package/dist/commonjs/models/operations/commerce-customer-user-invitations.d.ts.map +1 -0
  142. package/dist/commonjs/models/operations/commerce-customer-user-invitations.js +113 -0
  143. package/dist/commonjs/models/operations/commerce-customer-user-invitations.js.map +1 -0
  144. package/dist/commonjs/models/operations/commerce-customer-user-permissions.d.ts +9 -0
  145. package/dist/commonjs/models/operations/commerce-customer-user-permissions.d.ts.map +1 -0
  146. package/dist/commonjs/models/operations/commerce-customer-user-permissions.js +46 -0
  147. package/dist/commonjs/models/operations/commerce-customer-user-permissions.js.map +1 -0
  148. package/dist/commonjs/models/operations/commerce-customer-user-roles.d.ts +57 -0
  149. package/dist/commonjs/models/operations/commerce-customer-user-roles.d.ts.map +1 -0
  150. package/dist/commonjs/models/operations/commerce-customer-user-roles.js +92 -0
  151. package/dist/commonjs/models/operations/commerce-customer-user-roles.js.map +1 -0
  152. package/dist/commonjs/models/operations/commerce-customer-users.d.ts +48 -0
  153. package/dist/commonjs/models/operations/commerce-customer-users.d.ts.map +1 -0
  154. package/dist/commonjs/models/operations/commerce-customer-users.js +86 -0
  155. package/dist/commonjs/models/operations/commerce-customer-users.js.map +1 -0
  156. package/dist/commonjs/models/operations/index.d.ts +4 -0
  157. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  158. package/dist/commonjs/models/operations/index.js +4 -0
  159. package/dist/commonjs/models/operations/index.js.map +1 -1
  160. package/dist/commonjs/models/operations/users-customers.d.ts +26 -0
  161. package/dist/commonjs/models/operations/users-customers.d.ts.map +1 -1
  162. package/dist/commonjs/models/operations/users-customers.js +16 -1
  163. package/dist/commonjs/models/operations/users-customers.js.map +1 -1
  164. package/dist/commonjs/sdk/commerce/customer-user-invitations.d.ts +11 -0
  165. package/dist/commonjs/sdk/commerce/customer-user-invitations.d.ts.map +1 -0
  166. package/dist/commonjs/sdk/commerce/customer-user-invitations.js +31 -0
  167. package/dist/commonjs/sdk/commerce/customer-user-invitations.js.map +1 -0
  168. package/dist/commonjs/sdk/commerce/customer-user-permissions.d.ts +6 -0
  169. package/dist/commonjs/sdk/commerce/customer-user-permissions.d.ts.map +1 -0
  170. package/dist/commonjs/sdk/commerce/customer-user-permissions.js +16 -0
  171. package/dist/commonjs/sdk/commerce/customer-user-permissions.js.map +1 -0
  172. package/dist/commonjs/sdk/commerce/customer-user-roles.d.ts +10 -0
  173. package/dist/commonjs/sdk/commerce/customer-user-roles.d.ts.map +1 -0
  174. package/dist/commonjs/sdk/commerce/customer-user-roles.js +28 -0
  175. package/dist/commonjs/sdk/commerce/customer-user-roles.js.map +1 -0
  176. package/dist/commonjs/sdk/commerce/customer-users.d.ts +9 -0
  177. package/dist/commonjs/sdk/commerce/customer-users.d.ts.map +1 -0
  178. package/dist/commonjs/sdk/commerce/customer-users.js +25 -0
  179. package/dist/commonjs/sdk/commerce/customer-users.js.map +1 -0
  180. package/dist/commonjs/sdk/commerce/index.d.ts +16 -0
  181. package/dist/commonjs/sdk/commerce/index.d.ts.map +1 -1
  182. package/dist/commonjs/sdk/commerce/index.js +29 -1
  183. package/dist/commonjs/sdk/commerce/index.js.map +1 -1
  184. package/dist/commonjs/sdk/users/customers.d.ts +1 -0
  185. package/dist/commonjs/sdk/users/customers.d.ts.map +1 -1
  186. package/dist/commonjs/sdk/users/customers.js +4 -0
  187. package/dist/commonjs/sdk/users/customers.js.map +1 -1
  188. package/dist/esm/funcs/admins/adminsGet.js +2 -2
  189. package/dist/esm/funcs/admins/adminsGet.js.map +1 -1
  190. package/dist/esm/funcs/commerce/customerUserInvitationsAccept.d.ts +10 -0
  191. package/dist/esm/funcs/commerce/customerUserInvitationsAccept.d.ts.map +1 -0
  192. package/dist/esm/funcs/commerce/customerUserInvitationsAccept.js +85 -0
  193. package/dist/esm/funcs/commerce/customerUserInvitationsAccept.js.map +1 -0
  194. package/dist/esm/funcs/commerce/customerUserInvitationsCreate.d.ts +10 -0
  195. package/dist/esm/funcs/commerce/customerUserInvitationsCreate.d.ts.map +1 -0
  196. package/dist/esm/funcs/commerce/customerUserInvitationsCreate.js +87 -0
  197. package/dist/esm/funcs/commerce/customerUserInvitationsCreate.js.map +1 -0
  198. package/dist/esm/funcs/commerce/customerUserInvitationsGet.d.ts +10 -0
  199. package/dist/esm/funcs/commerce/customerUserInvitationsGet.d.ts.map +1 -0
  200. package/dist/esm/funcs/commerce/customerUserInvitationsGet.js +78 -0
  201. package/dist/esm/funcs/commerce/customerUserInvitationsGet.js.map +1 -0
  202. package/dist/esm/funcs/commerce/customerUserInvitationsInspect.d.ts +10 -0
  203. package/dist/esm/funcs/commerce/customerUserInvitationsInspect.d.ts.map +1 -0
  204. package/dist/esm/funcs/commerce/customerUserInvitationsInspect.js +79 -0
  205. package/dist/esm/funcs/commerce/customerUserInvitationsInspect.js.map +1 -0
  206. package/dist/esm/funcs/commerce/customerUserInvitationsList.d.ts +10 -0
  207. package/dist/esm/funcs/commerce/customerUserInvitationsList.d.ts.map +1 -0
  208. package/dist/esm/funcs/commerce/customerUserInvitationsList.js +95 -0
  209. package/dist/esm/funcs/commerce/customerUserInvitationsList.js.map +1 -0
  210. package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.d.ts +10 -0
  211. package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.d.ts.map +1 -0
  212. package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.js +76 -0
  213. package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.js.map +1 -0
  214. package/dist/esm/funcs/commerce/customerUserPermissionsList.d.ts +10 -0
  215. package/dist/esm/funcs/commerce/customerUserPermissionsList.d.ts.map +1 -0
  216. package/dist/esm/funcs/commerce/customerUserPermissionsList.js +82 -0
  217. package/dist/esm/funcs/commerce/customerUserPermissionsList.js.map +1 -0
  218. package/dist/esm/funcs/commerce/customerUserRolesCreate.d.ts +10 -0
  219. package/dist/esm/funcs/commerce/customerUserRolesCreate.d.ts.map +1 -0
  220. package/dist/esm/funcs/commerce/customerUserRolesCreate.js +87 -0
  221. package/dist/esm/funcs/commerce/customerUserRolesCreate.js.map +1 -0
  222. package/dist/esm/funcs/commerce/customerUserRolesDelete.d.ts +10 -0
  223. package/dist/esm/funcs/commerce/customerUserRolesDelete.d.ts.map +1 -0
  224. package/dist/esm/funcs/commerce/customerUserRolesDelete.js +81 -0
  225. package/dist/esm/funcs/commerce/customerUserRolesDelete.js.map +1 -0
  226. package/dist/esm/funcs/commerce/customerUserRolesGet.d.ts +10 -0
  227. package/dist/esm/funcs/commerce/customerUserRolesGet.d.ts.map +1 -0
  228. package/dist/esm/funcs/commerce/customerUserRolesGet.js +83 -0
  229. package/dist/esm/funcs/commerce/customerUserRolesGet.js.map +1 -0
  230. package/dist/esm/funcs/commerce/customerUserRolesList.d.ts +10 -0
  231. package/dist/esm/funcs/commerce/customerUserRolesList.d.ts.map +1 -0
  232. package/dist/esm/funcs/commerce/customerUserRolesList.js +91 -0
  233. package/dist/esm/funcs/commerce/customerUserRolesList.js.map +1 -0
  234. package/dist/esm/funcs/commerce/customerUserRolesUpdate.d.ts +10 -0
  235. package/dist/esm/funcs/commerce/customerUserRolesUpdate.d.ts.map +1 -0
  236. package/dist/esm/funcs/commerce/customerUserRolesUpdate.js +87 -0
  237. package/dist/esm/funcs/commerce/customerUserRolesUpdate.js.map +1 -0
  238. package/dist/esm/funcs/commerce/customerUsersDelete.d.ts +10 -0
  239. package/dist/esm/funcs/commerce/customerUsersDelete.d.ts.map +1 -0
  240. package/dist/esm/funcs/commerce/customerUsersDelete.js +81 -0
  241. package/dist/esm/funcs/commerce/customerUsersDelete.js.map +1 -0
  242. package/dist/esm/funcs/commerce/customerUsersGet.d.ts +10 -0
  243. package/dist/esm/funcs/commerce/customerUsersGet.d.ts.map +1 -0
  244. package/dist/esm/funcs/commerce/customerUsersGet.js +83 -0
  245. package/dist/esm/funcs/commerce/customerUsersGet.js.map +1 -0
  246. package/dist/esm/funcs/commerce/customerUsersList.d.ts +10 -0
  247. package/dist/esm/funcs/commerce/customerUsersList.d.ts.map +1 -0
  248. package/dist/esm/funcs/commerce/customerUsersList.js +96 -0
  249. package/dist/esm/funcs/commerce/customerUsersList.js.map +1 -0
  250. package/dist/esm/funcs/commerce/customerUsersUpdate.d.ts +10 -0
  251. package/dist/esm/funcs/commerce/customerUsersUpdate.d.ts.map +1 -0
  252. package/dist/esm/funcs/commerce/customerUsersUpdate.js +87 -0
  253. package/dist/esm/funcs/commerce/customerUsersUpdate.js.map +1 -0
  254. package/dist/esm/funcs/commerce/index.d.ts +16 -0
  255. package/dist/esm/funcs/commerce/index.d.ts.map +1 -1
  256. package/dist/esm/funcs/commerce/index.js +16 -0
  257. package/dist/esm/funcs/commerce/index.js.map +1 -1
  258. package/dist/esm/funcs/oauth2/index.js +5 -5
  259. package/dist/esm/funcs/oauth2/index.js.map +1 -1
  260. package/dist/esm/funcs/users/index.d.ts +1 -0
  261. package/dist/esm/funcs/users/index.d.ts.map +1 -1
  262. package/dist/esm/funcs/users/index.js +1 -0
  263. package/dist/esm/funcs/users/index.js.map +1 -1
  264. package/dist/esm/funcs/users/usersDisableMfa.js +2 -2
  265. package/dist/esm/funcs/users/usersDisableMfa.js.map +1 -1
  266. package/dist/esm/funcs/users/usersEnableMfa.js +2 -2
  267. package/dist/esm/funcs/users/usersEnableMfa.js.map +1 -1
  268. package/dist/esm/funcs/users/usersGetCustomer.d.ts +10 -0
  269. package/dist/esm/funcs/users/usersGetCustomer.d.ts.map +1 -0
  270. package/dist/esm/funcs/users/usersGetCustomer.js +86 -0
  271. package/dist/esm/funcs/users/usersGetCustomer.js.map +1 -0
  272. package/dist/esm/funcs/users/usersGetMfaMethod.js +2 -2
  273. package/dist/esm/funcs/users/usersGetMfaMethod.js.map +1 -1
  274. package/dist/esm/funcs/users/usersIssueToken.js +2 -2
  275. package/dist/esm/funcs/users/usersIssueToken.js.map +1 -1
  276. package/dist/esm/funcs/users/usersListCustomers.d.ts.map +1 -1
  277. package/dist/esm/funcs/users/usersListCustomers.js +8 -3
  278. package/dist/esm/funcs/users/usersListCustomers.js.map +1 -1
  279. package/dist/esm/funcs/users/usersListMfaMethods.js +2 -2
  280. package/dist/esm/funcs/users/usersListMfaMethods.js.map +1 -1
  281. package/dist/esm/funcs/users/usersListOAuthAccounts.js +2 -2
  282. package/dist/esm/funcs/users/usersListOAuthAccounts.js.map +1 -1
  283. package/dist/esm/funcs/users/usersListRecoveryCodes.js +2 -2
  284. package/dist/esm/funcs/users/usersListRecoveryCodes.js.map +1 -1
  285. package/dist/esm/funcs/users/usersRegenerateRecoveryCodes.js +2 -2
  286. package/dist/esm/funcs/users/usersRegenerateRecoveryCodes.js.map +1 -1
  287. package/dist/esm/funcs/users/usersSendMfa.js +2 -2
  288. package/dist/esm/funcs/users/usersSendMfa.js.map +1 -1
  289. package/dist/esm/funcs/users/usersValidateMfa.js +2 -2
  290. package/dist/esm/funcs/users/usersValidateMfa.js.map +1 -1
  291. package/dist/esm/funcs/users/usersValidateRecoveryCode.js +2 -2
  292. package/dist/esm/funcs/users/usersValidateRecoveryCode.js.map +1 -1
  293. package/dist/esm/lib/config.d.ts +3 -3
  294. package/dist/esm/lib/config.js +1 -1
  295. package/dist/esm/lib/encodings.d.ts +11 -0
  296. package/dist/esm/lib/encodings.d.ts.map +1 -1
  297. package/dist/esm/lib/encodings.js +22 -0
  298. package/dist/esm/lib/encodings.js.map +1 -1
  299. package/dist/esm/lib/sdks.d.ts +1 -0
  300. package/dist/esm/lib/sdks.d.ts.map +1 -1
  301. package/dist/esm/lib/sdks.js +16 -2
  302. package/dist/esm/lib/sdks.js.map +1 -1
  303. package/dist/esm/models/commerce/customer-user-invitation.d.ts +38 -0
  304. package/dist/esm/models/commerce/customer-user-invitation.d.ts.map +1 -0
  305. package/dist/esm/models/commerce/customer-user-invitation.js +53 -0
  306. package/dist/esm/models/commerce/customer-user-invitation.js.map +1 -0
  307. package/dist/esm/models/commerce/customer-user-permission.d.ts +27 -0
  308. package/dist/esm/models/commerce/customer-user-permission.d.ts.map +1 -0
  309. package/dist/esm/models/commerce/customer-user-permission.js +27 -0
  310. package/dist/esm/models/commerce/customer-user-permission.js.map +1 -0
  311. package/dist/esm/models/commerce/customer-user-role.d.ts +20 -0
  312. package/dist/esm/models/commerce/customer-user-role.d.ts.map +1 -0
  313. package/dist/esm/models/commerce/customer-user-role.js +25 -0
  314. package/dist/esm/models/commerce/customer-user-role.js.map +1 -0
  315. package/dist/esm/models/commerce/customer-user.d.ts +6 -0
  316. package/dist/esm/models/commerce/customer-user.d.ts.map +1 -1
  317. package/dist/esm/models/commerce/customer-user.js +18 -1
  318. package/dist/esm/models/commerce/customer-user.js.map +1 -1
  319. package/dist/esm/models/commerce/customer.d.ts +17 -0
  320. package/dist/esm/models/commerce/customer.d.ts.map +1 -0
  321. package/dist/esm/models/commerce/customer.js +22 -0
  322. package/dist/esm/models/commerce/customer.js.map +1 -0
  323. package/dist/esm/models/commerce/index.d.ts +5 -0
  324. package/dist/esm/models/commerce/index.d.ts.map +1 -1
  325. package/dist/esm/models/commerce/index.js +5 -0
  326. package/dist/esm/models/commerce/index.js.map +1 -1
  327. package/dist/esm/models/operations/commerce-customer-user-invitations.d.ts +70 -0
  328. package/dist/esm/models/operations/commerce-customer-user-invitations.d.ts.map +1 -0
  329. package/dist/esm/models/operations/commerce-customer-user-invitations.js +77 -0
  330. package/dist/esm/models/operations/commerce-customer-user-invitations.js.map +1 -0
  331. package/dist/esm/models/operations/commerce-customer-user-permissions.d.ts +9 -0
  332. package/dist/esm/models/operations/commerce-customer-user-permissions.d.ts.map +1 -0
  333. package/dist/esm/models/operations/commerce-customer-user-permissions.js +10 -0
  334. package/dist/esm/models/operations/commerce-customer-user-permissions.js.map +1 -0
  335. package/dist/esm/models/operations/commerce-customer-user-roles.d.ts +57 -0
  336. package/dist/esm/models/operations/commerce-customer-user-roles.d.ts.map +1 -0
  337. package/dist/esm/models/operations/commerce-customer-user-roles.js +56 -0
  338. package/dist/esm/models/operations/commerce-customer-user-roles.js.map +1 -0
  339. package/dist/esm/models/operations/commerce-customer-users.d.ts +48 -0
  340. package/dist/esm/models/operations/commerce-customer-users.d.ts.map +1 -0
  341. package/dist/esm/models/operations/commerce-customer-users.js +50 -0
  342. package/dist/esm/models/operations/commerce-customer-users.js.map +1 -0
  343. package/dist/esm/models/operations/index.d.ts +4 -0
  344. package/dist/esm/models/operations/index.d.ts.map +1 -1
  345. package/dist/esm/models/operations/index.js +4 -0
  346. package/dist/esm/models/operations/index.js.map +1 -1
  347. package/dist/esm/models/operations/users-customers.d.ts +26 -0
  348. package/dist/esm/models/operations/users-customers.d.ts.map +1 -1
  349. package/dist/esm/models/operations/users-customers.js +15 -0
  350. package/dist/esm/models/operations/users-customers.js.map +1 -1
  351. package/dist/esm/sdk/commerce/customer-user-invitations.d.ts +11 -0
  352. package/dist/esm/sdk/commerce/customer-user-invitations.d.ts.map +1 -0
  353. package/dist/esm/sdk/commerce/customer-user-invitations.js +27 -0
  354. package/dist/esm/sdk/commerce/customer-user-invitations.js.map +1 -0
  355. package/dist/esm/sdk/commerce/customer-user-permissions.d.ts +6 -0
  356. package/dist/esm/sdk/commerce/customer-user-permissions.d.ts.map +1 -0
  357. package/dist/esm/sdk/commerce/customer-user-permissions.js +12 -0
  358. package/dist/esm/sdk/commerce/customer-user-permissions.js.map +1 -0
  359. package/dist/esm/sdk/commerce/customer-user-roles.d.ts +10 -0
  360. package/dist/esm/sdk/commerce/customer-user-roles.d.ts.map +1 -0
  361. package/dist/esm/sdk/commerce/customer-user-roles.js +24 -0
  362. package/dist/esm/sdk/commerce/customer-user-roles.js.map +1 -0
  363. package/dist/esm/sdk/commerce/customer-users.d.ts +9 -0
  364. package/dist/esm/sdk/commerce/customer-users.d.ts.map +1 -0
  365. package/dist/esm/sdk/commerce/customer-users.js +21 -0
  366. package/dist/esm/sdk/commerce/customer-users.js.map +1 -0
  367. package/dist/esm/sdk/commerce/index.d.ts +16 -0
  368. package/dist/esm/sdk/commerce/index.d.ts.map +1 -1
  369. package/dist/esm/sdk/commerce/index.js +24 -0
  370. package/dist/esm/sdk/commerce/index.js.map +1 -1
  371. package/dist/esm/sdk/users/customers.d.ts +1 -0
  372. package/dist/esm/sdk/users/customers.d.ts.map +1 -1
  373. package/dist/esm/sdk/users/customers.js +4 -0
  374. package/dist/esm/sdk/users/customers.js.map +1 -1
  375. package/jsr.json +1 -1
  376. package/package.json +1 -1
  377. package/src/funcs/admins/adminsGet.ts +2 -2
  378. package/src/funcs/commerce/customerUserInvitationsAccept.ts +154 -0
  379. package/src/funcs/commerce/customerUserInvitationsCreate.ts +164 -0
  380. package/src/funcs/commerce/customerUserInvitationsGet.ts +147 -0
  381. package/src/funcs/commerce/customerUserInvitationsInspect.ts +152 -0
  382. package/src/funcs/commerce/customerUserInvitationsList.ts +163 -0
  383. package/src/funcs/commerce/customerUserInvitationsRevoke.ts +145 -0
  384. package/src/funcs/commerce/customerUserPermissionsList.ts +160 -0
  385. package/src/funcs/commerce/customerUserRolesCreate.ts +164 -0
  386. package/src/funcs/commerce/customerUserRolesDelete.ts +158 -0
  387. package/src/funcs/commerce/customerUserRolesGet.ts +160 -0
  388. package/src/funcs/commerce/customerUserRolesList.ts +169 -0
  389. package/src/funcs/commerce/customerUserRolesUpdate.ts +164 -0
  390. package/src/funcs/commerce/customerUsersDelete.ts +158 -0
  391. package/src/funcs/commerce/customerUsersGet.ts +160 -0
  392. package/src/funcs/commerce/customerUsersList.ts +174 -0
  393. package/src/funcs/commerce/customerUsersUpdate.ts +164 -0
  394. package/src/funcs/commerce/index.ts +16 -1
  395. package/src/funcs/oauth2/index.ts +5 -5
  396. package/src/funcs/users/index.ts +1 -0
  397. package/src/funcs/users/usersDisableMfa.ts +2 -2
  398. package/src/funcs/users/usersEnableMfa.ts +2 -2
  399. package/src/funcs/users/usersGetCustomer.ts +164 -0
  400. package/src/funcs/users/usersGetMfaMethod.ts +2 -2
  401. package/src/funcs/users/usersIssueToken.ts +2 -2
  402. package/src/funcs/users/usersListCustomers.ts +10 -3
  403. package/src/funcs/users/usersListMfaMethods.ts +2 -2
  404. package/src/funcs/users/usersListOAuthAccounts.ts +2 -2
  405. package/src/funcs/users/usersListRecoveryCodes.ts +2 -2
  406. package/src/funcs/users/usersRegenerateRecoveryCodes.ts +2 -2
  407. package/src/funcs/users/usersSendMfa.ts +2 -2
  408. package/src/funcs/users/usersValidateMfa.ts +2 -2
  409. package/src/funcs/users/usersValidateRecoveryCode.ts +2 -2
  410. package/src/lib/config.ts +1 -1
  411. package/src/lib/encodings.ts +29 -0
  412. package/src/lib/sdks.ts +18 -2
  413. package/src/models/commerce/customer-user-invitation.ts +94 -0
  414. package/src/models/commerce/customer-user-permission.ts +52 -0
  415. package/src/models/commerce/customer-user-role.ts +42 -0
  416. package/src/models/commerce/customer-user.ts +26 -2
  417. package/src/models/commerce/customer.ts +36 -0
  418. package/src/models/commerce/index.ts +5 -0
  419. package/src/models/operations/commerce-customer-user-invitations.ts +139 -0
  420. package/src/models/operations/commerce-customer-user-permissions.ts +17 -0
  421. package/src/models/operations/commerce-customer-user-roles.ts +96 -0
  422. package/src/models/operations/commerce-customer-users.ts +88 -0
  423. package/src/models/operations/index.ts +4 -0
  424. package/src/models/operations/users-customers.ts +41 -0
  425. package/src/sdk/commerce/customer-user-invitations.ts +59 -0
  426. package/src/sdk/commerce/customer-user-permissions.ts +16 -0
  427. package/src/sdk/commerce/customer-user-roles.ts +51 -0
  428. package/src/sdk/commerce/customer-users.ts +43 -0
  429. package/src/sdk/commerce/index.ts +32 -0
  430. package/src/sdk/users/customers.ts +12 -0
@@ -343,6 +343,35 @@ export const encodeSimple = (
343
343
  return out.slice(1);
344
344
  };
345
345
 
346
+ /**
347
+ * Replaces named placeholders in an API path with URL-encoded values.
348
+ *
349
+ * OpenAPI's `simple` encoder serializes one parameter value; it does not
350
+ * expand a complete path template. Generated operations should use this
351
+ * helper for paths such as `/users/{id}/customers`.
352
+ */
353
+ export function encodePath(
354
+ template: string,
355
+ parameters: Readonly<Record<string, unknown>>,
356
+ options?: { explode?: boolean; charEncoding?: "percent" | "none" },
357
+ ): string {
358
+ const encodeString = (value: string) => {
359
+ return options?.charEncoding === "none" ? value : encodeURIComponent(value);
360
+ };
361
+
362
+ return template.replace(/\{([^{}]+)\}/g, (_placeholder, name: string) => {
363
+ const value = parameters[name];
364
+ if (value == null) {
365
+ throw new EncodingError(`Missing value for path parameter '${name}'.`);
366
+ }
367
+ if (Array.isArray(value) || isPlainObject(value)) {
368
+ throw new EncodingError(`Path parameter '${name}' must be a scalar value.`);
369
+ }
370
+
371
+ return encodeString(serializeValue(value));
372
+ });
373
+ }
374
+
346
375
  function explode(key: string, value: unknown): [string, unknown][] {
347
376
  if (Array.isArray(value)) {
348
377
  return value.map((v) => [key, v]);
package/src/lib/sdks.ts CHANGED
@@ -121,6 +121,21 @@ export class ClientSDK {
121
121
 
122
122
  protected _propagateLanguage(_language: string | undefined): void {}
123
123
 
124
+ private hookContext(context: HookContext): HookContext {
125
+ const operationOptions = typeof context.options === "object"
126
+ && context.options !== null
127
+ ? context.options
128
+ : {};
129
+
130
+ return {
131
+ ...context,
132
+ options: {
133
+ ...this._options,
134
+ ...operationOptions,
135
+ },
136
+ };
137
+ }
138
+
124
139
  public _createRequest(
125
140
  context: HookContext,
126
141
  conf: RequestConfig,
@@ -212,7 +227,7 @@ export class ClientSDK {
212
227
 
213
228
  let input;
214
229
  try {
215
- input = this.#hooks.beforeCreateRequest(context, {
230
+ input = this.#hooks.beforeCreateRequest(this.hookContext(context), {
216
231
  url: reqURL,
217
232
  options: {
218
233
  ...fetchOptions,
@@ -249,7 +264,8 @@ export class ClientSDK {
249
264
  | UnexpectedClientError
250
265
  >
251
266
  > {
252
- const { context, errorCodes } = options;
267
+ const { errorCodes } = options;
268
+ const context = this.hookContext(options.context);
253
269
 
254
270
  return retry(
255
271
  async () => {
@@ -0,0 +1,94 @@
1
+ /*
2
+ * Customer user invitation model.
3
+ */
4
+
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { HalLinks, HalLinks$inboundSchema } from "../hal.js";
8
+
9
+ export type CustomerUserInvitationStatus = "pending" | "accepted" | "revoked" | "expired";
10
+
11
+ export type CustomerUserInvitationCustomer = {
12
+ resource: "customer";
13
+ id: number;
14
+ name: string;
15
+ };
16
+
17
+ export type CustomerUserInvitationRole = {
18
+ resource: "customer_user_role";
19
+ id: number;
20
+ key: string;
21
+ name: string;
22
+ description: string;
23
+ };
24
+
25
+ export type CustomerUserInvitation = {
26
+ resource: "customer_user_invitation";
27
+ id: number;
28
+ customerId: number;
29
+ roleId: number;
30
+ channelId: number | null;
31
+ userId: number | null;
32
+ email: string;
33
+ existingUser: boolean;
34
+ requiresAccountCreation: boolean;
35
+ status: CustomerUserInvitationStatus;
36
+ expiresAt: string;
37
+ acceptedAt: string | null;
38
+ revokedAt: string | null;
39
+ customer?: CustomerUserInvitationCustomer;
40
+ role?: CustomerUserInvitationRole;
41
+ updatedAt: string;
42
+ createdAt: string;
43
+ links?: HalLinks;
44
+ };
45
+
46
+ /** @internal */
47
+ export const CustomerUserInvitation$inboundSchema: z.ZodType<CustomerUserInvitation> = z.object({
48
+ resource: z.literal("customer_user_invitation"),
49
+ id: z.number().int(),
50
+ customerId: z.number().int(),
51
+ roleId: z.number().int(),
52
+ channelId: z.number().int().nullable(),
53
+ userId: z.number().int().nullable(),
54
+ email: z.string(),
55
+ existingUser: z.boolean(),
56
+ requiresAccountCreation: z.boolean(),
57
+ status: z.enum(["pending", "accepted", "revoked", "expired"]),
58
+ expiresAt: z.string(),
59
+ acceptedAt: z.string().nullable(),
60
+ revokedAt: z.string().nullable(),
61
+ updatedAt: z.string(),
62
+ createdAt: z.string(),
63
+ _links: HalLinks$inboundSchema.optional(),
64
+ _embedded: z.object({
65
+ customer: z.object({
66
+ resource: z.literal("customer"),
67
+ id: z.number().int(),
68
+ name: z.string(),
69
+ }).loose().optional(),
70
+ role: z.object({
71
+ resource: z.literal("customer_user_role"),
72
+ id: z.number().int(),
73
+ key: z.string(),
74
+ name: z.string(),
75
+ description: z.string(),
76
+ }).loose().optional(),
77
+ }).loose().optional(),
78
+ }).loose().transform((value) => {
79
+ const embedded = value._embedded;
80
+ const invitation = remap$(value, {
81
+ "_links": "links",
82
+ "_embedded": null,
83
+ }) as CustomerUserInvitation;
84
+
85
+ if (embedded?.customer) {
86
+ invitation.customer = embedded.customer;
87
+ }
88
+
89
+ if (embedded?.role) {
90
+ invitation.role = embedded.role;
91
+ }
92
+
93
+ return invitation;
94
+ }) as unknown as z.ZodType<CustomerUserInvitation>;
@@ -0,0 +1,52 @@
1
+ /*
2
+ * Customer user permission catalogue models.
3
+ */
4
+
5
+ import * as z from "zod/v4";
6
+
7
+ export type CustomerUserPermissionGroup = {
8
+ key: string;
9
+ label: string;
10
+ description: string | null;
11
+ icon: string | null;
12
+ order: number;
13
+ };
14
+
15
+ export type CustomerUserPermission = {
16
+ key: string;
17
+ label: string;
18
+ description: string | null;
19
+ group: string | null;
20
+ icon: string | null;
21
+ };
22
+
23
+ export type CustomerUserPermissionCatalog = {
24
+ resource: "customer_user_permission_catalog";
25
+ groups: Array<CustomerUserPermissionGroup>;
26
+ permissions: Array<CustomerUserPermission>;
27
+ };
28
+
29
+ /** @internal */
30
+ export const CustomerUserPermissionGroup$inboundSchema: z.ZodType<CustomerUserPermissionGroup> = z.object({
31
+ key: z.string(),
32
+ label: z.string(),
33
+ description: z.string().nullable(),
34
+ icon: z.string().nullable(),
35
+ order: z.number().int(),
36
+ });
37
+
38
+ /** @internal */
39
+ export const CustomerUserPermission$inboundSchema: z.ZodType<CustomerUserPermission> = z.object({
40
+ key: z.string(),
41
+ label: z.string(),
42
+ description: z.string().nullable(),
43
+ group: z.string().nullable(),
44
+ icon: z.string().nullable(),
45
+ });
46
+
47
+ /** @internal */
48
+ export const CustomerUserPermissionCatalog$inboundSchema: z.ZodType<CustomerUserPermissionCatalog> = z.object({
49
+ resource: z.literal("customer_user_permission_catalog"),
50
+ groups: z.array(CustomerUserPermissionGroup$inboundSchema),
51
+ permissions: z.array(CustomerUserPermission$inboundSchema),
52
+ });
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Customer user role model.
3
+ */
4
+
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { HalLinks, HalLinks$inboundSchema } from "../hal.js";
8
+
9
+ export type CustomerUserRole = {
10
+ resource: "customer_user_role";
11
+ id: number;
12
+ key: string;
13
+ name: string;
14
+ description: string;
15
+ nameTranslations: Record<string, string>;
16
+ descriptionTranslations: Record<string, string | null>;
17
+ permissions: Array<string>;
18
+ isSystem: boolean;
19
+ isAssignable: boolean;
20
+ updatedAt: string;
21
+ createdAt: string;
22
+ links?: HalLinks;
23
+ };
24
+
25
+ /** @internal */
26
+ export const CustomerUserRole$inboundSchema: z.ZodType<CustomerUserRole> = z.object({
27
+ resource: z.literal("customer_user_role"),
28
+ id: z.number().int(),
29
+ key: z.string(),
30
+ name: z.string(),
31
+ description: z.string(),
32
+ nameTranslations: z.record(z.string(), z.string()),
33
+ descriptionTranslations: z.record(z.string(), z.string().nullable()),
34
+ permissions: z.array(z.string()),
35
+ isSystem: z.boolean(),
36
+ isAssignable: z.boolean(),
37
+ updatedAt: z.string(),
38
+ createdAt: z.string(),
39
+ _links: HalLinks$inboundSchema.optional(),
40
+ }).loose().transform((v) => remap$(v, {
41
+ "_links": "links",
42
+ }) as CustomerUserRole);
@@ -5,16 +5,22 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { HalLinks, HalLinks$inboundSchema } from "../hal.js";
8
+ import { Customer, Customer$inboundSchema } from "./customer.js";
9
+ import { CustomerUserRole, CustomerUserRole$inboundSchema } from "./customer-user-role.js";
8
10
 
9
11
  export type CustomerUser = {
10
12
  resource: "customer_user";
11
13
  userId: number;
12
14
  customerId: number;
13
15
  roleId: number;
16
+ isOwner: boolean;
17
+ permissions: Array<string>;
14
18
  firstName: string;
15
19
  lastName: string;
16
20
  email: string;
17
21
  avatar?: string | null;
22
+ customer?: Customer;
23
+ role?: CustomerUserRole;
18
24
  updatedAt: string;
19
25
  createdAt: string;
20
26
  links?: HalLinks;
@@ -26,6 +32,8 @@ export const CustomerUser$inboundSchema: z.ZodType<CustomerUser> = z.object({
26
32
  userId: z.number().int(),
27
33
  customerId: z.number().int(),
28
34
  roleId: z.number().int(),
35
+ isOwner: z.boolean(),
36
+ permissions: z.array(z.string()),
29
37
  firstName: z.string(),
30
38
  lastName: z.string(),
31
39
  email: z.string(),
@@ -33,8 +41,24 @@ export const CustomerUser$inboundSchema: z.ZodType<CustomerUser> = z.object({
33
41
  updatedAt: z.string(),
34
42
  createdAt: z.string(),
35
43
  _links: HalLinks$inboundSchema.optional(),
44
+ _embedded: z.object({
45
+ customer: Customer$inboundSchema.optional(),
46
+ role: CustomerUserRole$inboundSchema.optional(),
47
+ }).loose().optional(),
36
48
  }).loose().transform((v) => {
37
- return remap$(v, {
49
+ const embedded = v._embedded;
50
+ const customerUser = remap$(v, {
38
51
  "_links": "links",
52
+ "_embedded": null,
39
53
  }) as CustomerUser;
40
- });
54
+
55
+ if (embedded?.role) {
56
+ customerUser.role = embedded.role;
57
+ }
58
+
59
+ if (embedded?.customer) {
60
+ customerUser.customer = embedded.customer;
61
+ }
62
+
63
+ return customerUser;
64
+ }) as unknown as z.ZodType<CustomerUser>;
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Commerce customer model.
3
+ */
4
+
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { HalLinks, HalLinks$inboundSchema } from "../hal.js";
8
+
9
+ export type Customer = {
10
+ resource: "customer";
11
+ id: number;
12
+ type: string;
13
+ name: string;
14
+ email: string;
15
+ isGuest: boolean;
16
+ ownerId: number | null;
17
+ updatedAt: string;
18
+ createdAt: string;
19
+ links?: HalLinks;
20
+ };
21
+
22
+ /** @internal */
23
+ export const Customer$inboundSchema: z.ZodType<Customer> = z.object({
24
+ resource: z.literal("customer"),
25
+ id: z.number().int(),
26
+ type: z.string(),
27
+ name: z.string(),
28
+ email: z.string(),
29
+ isGuest: z.boolean(),
30
+ ownerId: z.number().int().nullable(),
31
+ updatedAt: z.string(),
32
+ createdAt: z.string(),
33
+ _links: HalLinks$inboundSchema.optional(),
34
+ }).loose().transform((v) => remap$(v, {
35
+ "_links": "links",
36
+ }) as Customer);
@@ -21,3 +21,8 @@ export * from "./shipping-method.js";
21
21
  export * from "./shipping-zone.js";
22
22
  export * from "./review.js";
23
23
  export * from "./currency.js";
24
+ export * from "./customer-user.js";
25
+ export * from "./customer-user-invitation.js";
26
+ export * from "./customer.js";
27
+ export * from "./customer-user-role.js";
28
+ export * from "./customer-user-permission.js";
@@ -0,0 +1,139 @@
1
+ /*
2
+ * Commerce customer user invitation operations.
3
+ */
4
+
5
+ import * as z from "zod/v4";
6
+ import {
7
+ CustomerUserInvitation,
8
+ CustomerUserInvitation$inboundSchema,
9
+ } from "../commerce/customer-user-invitation.js";
10
+ import { CustomerUser, CustomerUser$inboundSchema } from "../commerce/customer-user.js";
11
+ import { HalLinks$inboundSchema } from "../hal.js";
12
+ import { buildPaginated, Paginated } from "../pagination.js";
13
+
14
+ const invitationAcceptUrlSchema = z.string().refine((value) => {
15
+ try {
16
+ const url = new URL(value.replaceAll("{token}", "invitation-token"));
17
+
18
+ return url.protocol === "http:" || url.protocol === "https:";
19
+ } catch {
20
+ return false;
21
+ }
22
+ }, "Invalid invitation acceptance URL");
23
+
24
+ export type CreateCustomerUserInvitationRequest = {
25
+ customerId: number;
26
+ data: {
27
+ email: string;
28
+ roleId: number;
29
+ acceptUrl: string;
30
+ language?: string | null | undefined;
31
+ };
32
+ };
33
+ export type CreateCustomerUserInvitationResponse = CustomerUserInvitation;
34
+
35
+ /** @internal */
36
+ export const CreateCustomerUserInvitationRequest$outboundSchema: z.ZodType<CreateCustomerUserInvitationRequest> = z.object({
37
+ customerId: z.number().int(),
38
+ data: z.object({
39
+ email: z.string().email(),
40
+ roleId: z.number().int(),
41
+ acceptUrl: invitationAcceptUrlSchema,
42
+ language: z.string().nullable().optional(),
43
+ }),
44
+ });
45
+ /** @internal */
46
+ export const CreateCustomerUserInvitationResponse$inboundSchema: z.ZodType<CreateCustomerUserInvitationResponse> = CustomerUserInvitation$inboundSchema;
47
+
48
+ export type ListCustomerUserInvitationsRequest = {
49
+ customerId: number;
50
+ filter?: {
51
+ id?: number | undefined;
52
+ email?: string | undefined;
53
+ role?: number | undefined;
54
+ } | undefined;
55
+ sort?: string | undefined;
56
+ page?: number | undefined;
57
+ limit?: number | undefined;
58
+ };
59
+ export type ListCustomerUserInvitationsResponse = Paginated<CustomerUserInvitation>;
60
+
61
+ /** @internal */
62
+ export const ListCustomerUserInvitationsRequest$outboundSchema: z.ZodType<ListCustomerUserInvitationsRequest> = z.object({
63
+ customerId: z.number().int(),
64
+ filter: z.object({
65
+ id: z.number().int().optional(),
66
+ email: z.string().optional(),
67
+ role: z.number().int().optional(),
68
+ }).optional(),
69
+ sort: z.string().optional(),
70
+ page: z.number().optional(),
71
+ limit: z.number().optional(),
72
+ });
73
+
74
+ /** @internal */
75
+ export const ListCustomerUserInvitationsResponse$inboundSchema: z.ZodType<ListCustomerUserInvitationsResponse> = z.object({
76
+ _embedded: z.object({
77
+ customer_user_invitations: z.array(CustomerUserInvitation$inboundSchema),
78
+ }),
79
+ count: z.number(),
80
+ _links: HalLinks$inboundSchema.optional(),
81
+ }).transform((value) => buildPaginated(
82
+ value._embedded.customer_user_invitations,
83
+ value.count,
84
+ value._links,
85
+ ));
86
+
87
+ export type GetCustomerUserInvitationRequest = {
88
+ customerId: number;
89
+ id: number;
90
+ };
91
+ export type GetCustomerUserInvitationResponse = CustomerUserInvitation;
92
+
93
+ /** @internal */
94
+ export const GetCustomerUserInvitationRequest$outboundSchema: z.ZodType<GetCustomerUserInvitationRequest> = z.object({
95
+ customerId: z.number().int(),
96
+ id: z.number().int(),
97
+ });
98
+ /** @internal */
99
+ export const GetCustomerUserInvitationResponse$inboundSchema: z.ZodType<GetCustomerUserInvitationResponse> = CustomerUserInvitation$inboundSchema;
100
+
101
+ export type RevokeCustomerUserInvitationRequest = {
102
+ customerId: number;
103
+ id: number;
104
+ };
105
+ export type RevokeCustomerUserInvitationResponse = void;
106
+
107
+ /** @internal */
108
+ export const RevokeCustomerUserInvitationRequest$outboundSchema: z.ZodType<RevokeCustomerUserInvitationRequest> = z.object({
109
+ customerId: z.number().int(),
110
+ id: z.number().int(),
111
+ });
112
+ /** @internal */
113
+ export const RevokeCustomerUserInvitationResponse$inboundSchema: z.ZodType<RevokeCustomerUserInvitationResponse> = z.void();
114
+
115
+ export type InspectCustomerUserInvitationRequest = {
116
+ token: string;
117
+ };
118
+ export type InspectCustomerUserInvitationResponse = CustomerUserInvitation;
119
+
120
+ /** @internal */
121
+ export const InspectCustomerUserInvitationRequest$outboundSchema: z.ZodType<InspectCustomerUserInvitationRequest> = z.object({
122
+ token: z.string().min(1),
123
+ });
124
+ /** @internal */
125
+ export const InspectCustomerUserInvitationResponse$inboundSchema: z.ZodType<InspectCustomerUserInvitationResponse> = CustomerUserInvitation$inboundSchema;
126
+
127
+ export type AcceptCustomerUserInvitationRequest = {
128
+ token: string;
129
+ userId?: number | undefined;
130
+ };
131
+ export type AcceptCustomerUserInvitationResponse = CustomerUser;
132
+
133
+ /** @internal */
134
+ export const AcceptCustomerUserInvitationRequest$outboundSchema: z.ZodType<AcceptCustomerUserInvitationRequest> = z.object({
135
+ token: z.string().length(64),
136
+ userId: z.number().int().optional(),
137
+ });
138
+ /** @internal */
139
+ export const AcceptCustomerUserInvitationResponse$inboundSchema: z.ZodType<AcceptCustomerUserInvitationResponse> = CustomerUser$inboundSchema;
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Commerce customer user permission operations.
3
+ */
4
+
5
+ import * as z from "zod/v4";
6
+ import {
7
+ CustomerUserPermissionCatalog,
8
+ CustomerUserPermissionCatalog$inboundSchema,
9
+ } from "../commerce/customer-user-permission.js";
10
+
11
+ export type ListCustomerUserPermissionsRequest = Record<string, never>;
12
+ export type ListCustomerUserPermissionsResponse = CustomerUserPermissionCatalog;
13
+
14
+ /** @internal */
15
+ export const ListCustomerUserPermissionsRequest$outboundSchema: z.ZodType<ListCustomerUserPermissionsRequest> = z.object({});
16
+ /** @internal */
17
+ export const ListCustomerUserPermissionsResponse$inboundSchema: z.ZodType<ListCustomerUserPermissionsResponse> = CustomerUserPermissionCatalog$inboundSchema;
@@ -0,0 +1,96 @@
1
+ /*
2
+ * Commerce customer user role operations.
3
+ */
4
+
5
+ import * as z from "zod/v4";
6
+ import { CustomerUserRole, CustomerUserRole$inboundSchema } from "../commerce/customer-user-role.js";
7
+ import { HalLinks$inboundSchema } from "../hal.js";
8
+ import { buildPaginated, Paginated } from "../pagination.js";
9
+
10
+ export type CustomerUserRoleData = {
11
+ key: string;
12
+ name: Record<string, string>;
13
+ description?: Record<string, string | null> | undefined;
14
+ permissions: Array<string>;
15
+ isAssignable?: boolean | undefined;
16
+ };
17
+
18
+ export type ListCustomerUserRolesRequest = {
19
+ page?: number | undefined;
20
+ limit?: number | undefined;
21
+ };
22
+ export type ListCustomerUserRolesResponse = Paginated<CustomerUserRole>;
23
+
24
+ /** @internal */
25
+ export const ListCustomerUserRolesRequest$outboundSchema: z.ZodType<ListCustomerUserRolesRequest> = z.object({
26
+ page: z.number().optional(),
27
+ limit: z.number().optional(),
28
+ });
29
+ /** @internal */
30
+ export const ListCustomerUserRolesResponse$inboundSchema: z.ZodType<ListCustomerUserRolesResponse> = z.object({
31
+ _embedded: z.object({
32
+ customer_user_roles: z.array(CustomerUserRole$inboundSchema),
33
+ }),
34
+ count: z.number(),
35
+ _links: HalLinks$inboundSchema.optional(),
36
+ }).transform((v) => buildPaginated(v._embedded.customer_user_roles, v.count, v._links));
37
+
38
+ export type GetCustomerUserRoleRequest = { id: number };
39
+ export type GetCustomerUserRoleResponse = CustomerUserRole;
40
+
41
+ /** @internal */
42
+ export const GetCustomerUserRoleRequest$outboundSchema: z.ZodType<GetCustomerUserRoleRequest> = z.object({
43
+ id: z.number().int(),
44
+ });
45
+ /** @internal */
46
+ export const GetCustomerUserRoleResponse$inboundSchema: z.ZodType<GetCustomerUserRoleResponse> = CustomerUserRole$inboundSchema;
47
+
48
+ export type CreateCustomerUserRoleRequest = CustomerUserRoleData;
49
+ export type CreateCustomerUserRoleResponse = CustomerUserRole;
50
+
51
+ /** @internal */
52
+ export const CreateCustomerUserRoleRequest$outboundSchema: z.ZodType<CreateCustomerUserRoleRequest> = z.object({
53
+ key: z.string(),
54
+ name: z.record(z.string(), z.string()),
55
+ description: z.record(z.string(), z.string().nullable()).optional(),
56
+ permissions: z.array(z.string()),
57
+ isAssignable: z.boolean().optional(),
58
+ });
59
+ /** @internal */
60
+ export const CreateCustomerUserRoleResponse$inboundSchema: z.ZodType<CreateCustomerUserRoleResponse> = CustomerUserRole$inboundSchema;
61
+
62
+ export type UpdateCustomerUserRoleRequest = {
63
+ id: number;
64
+ data: {
65
+ key?: string | undefined;
66
+ name?: Record<string, string> | undefined;
67
+ description?: Record<string, string | null> | undefined;
68
+ permissions?: Array<string> | undefined;
69
+ isAssignable?: boolean | undefined;
70
+ };
71
+ };
72
+ export type UpdateCustomerUserRoleResponse = CustomerUserRole;
73
+
74
+ /** @internal */
75
+ export const UpdateCustomerUserRoleRequest$outboundSchema: z.ZodType<UpdateCustomerUserRoleRequest> = z.object({
76
+ id: z.number().int(),
77
+ data: z.object({
78
+ key: z.string().optional(),
79
+ name: z.record(z.string(), z.string()).optional(),
80
+ description: z.record(z.string(), z.string().nullable()).optional(),
81
+ permissions: z.array(z.string()).optional(),
82
+ isAssignable: z.boolean().optional(),
83
+ }),
84
+ });
85
+ /** @internal */
86
+ export const UpdateCustomerUserRoleResponse$inboundSchema: z.ZodType<UpdateCustomerUserRoleResponse> = CustomerUserRole$inboundSchema;
87
+
88
+ export type DeleteCustomerUserRoleRequest = { id: number };
89
+ export type DeleteCustomerUserRoleResponse = void;
90
+
91
+ /** @internal */
92
+ export const DeleteCustomerUserRoleRequest$outboundSchema: z.ZodType<DeleteCustomerUserRoleRequest> = z.object({
93
+ id: z.number().int(),
94
+ });
95
+ /** @internal */
96
+ export const DeleteCustomerUserRoleResponse$inboundSchema: z.ZodType<DeleteCustomerUserRoleResponse> = z.void();