@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.
- package/dist/commonjs/funcs/admins/adminsGet.js +1 -1
- package/dist/commonjs/funcs/admins/adminsGet.js.map +1 -1
- package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.js +121 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsAccept.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.js +123 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsCreate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.js +114 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsGet.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.js +115 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsInspect.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsList.js +131 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsList.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.js +112 -0
- package/dist/commonjs/funcs/commerce/customerUserInvitationsRevoke.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserPermissionsList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserPermissionsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserPermissionsList.js +118 -0
- package/dist/commonjs/funcs/commerce/customerUserPermissionsList.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesCreate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesCreate.js +123 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesCreate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesDelete.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesDelete.js +117 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesDelete.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesGet.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesGet.js +119 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesGet.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesList.js +127 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesList.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.js +123 -0
- package/dist/commonjs/funcs/commerce/customerUserRolesUpdate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersDelete.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUsersDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersDelete.js +117 -0
- package/dist/commonjs/funcs/commerce/customerUsersDelete.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersGet.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUsersGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersGet.js +119 -0
- package/dist/commonjs/funcs/commerce/customerUsersGet.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUsersList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersList.js +132 -0
- package/dist/commonjs/funcs/commerce/customerUsersList.js.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersUpdate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/customerUsersUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/customerUsersUpdate.js +123 -0
- package/dist/commonjs/funcs/commerce/customerUsersUpdate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/index.d.ts +16 -0
- package/dist/commonjs/funcs/commerce/index.d.ts.map +1 -1
- package/dist/commonjs/funcs/commerce/index.js +16 -0
- package/dist/commonjs/funcs/commerce/index.js.map +1 -1
- package/dist/commonjs/funcs/oauth2/index.js +4 -4
- package/dist/commonjs/funcs/oauth2/index.js.map +1 -1
- package/dist/commonjs/funcs/users/index.d.ts +1 -0
- package/dist/commonjs/funcs/users/index.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/index.js +1 -0
- package/dist/commonjs/funcs/users/index.js.map +1 -1
- package/dist/commonjs/funcs/users/usersDisableMfa.js +1 -1
- package/dist/commonjs/funcs/users/usersDisableMfa.js.map +1 -1
- package/dist/commonjs/funcs/users/usersEnableMfa.js +1 -1
- package/dist/commonjs/funcs/users/usersEnableMfa.js.map +1 -1
- package/dist/commonjs/funcs/users/usersGetCustomer.d.ts +10 -0
- package/dist/commonjs/funcs/users/usersGetCustomer.d.ts.map +1 -0
- package/dist/commonjs/funcs/users/usersGetCustomer.js +122 -0
- package/dist/commonjs/funcs/users/usersGetCustomer.js.map +1 -0
- package/dist/commonjs/funcs/users/usersGetMfaMethod.js +1 -1
- package/dist/commonjs/funcs/users/usersGetMfaMethod.js.map +1 -1
- package/dist/commonjs/funcs/users/usersIssueToken.js +1 -1
- package/dist/commonjs/funcs/users/usersIssueToken.js.map +1 -1
- package/dist/commonjs/funcs/users/usersListCustomers.d.ts.map +1 -1
- package/dist/commonjs/funcs/users/usersListCustomers.js +7 -2
- package/dist/commonjs/funcs/users/usersListCustomers.js.map +1 -1
- package/dist/commonjs/funcs/users/usersListMfaMethods.js +1 -1
- package/dist/commonjs/funcs/users/usersListMfaMethods.js.map +1 -1
- package/dist/commonjs/funcs/users/usersListOAuthAccounts.js +1 -1
- package/dist/commonjs/funcs/users/usersListOAuthAccounts.js.map +1 -1
- package/dist/commonjs/funcs/users/usersListRecoveryCodes.js +1 -1
- package/dist/commonjs/funcs/users/usersListRecoveryCodes.js.map +1 -1
- package/dist/commonjs/funcs/users/usersRegenerateRecoveryCodes.js +1 -1
- package/dist/commonjs/funcs/users/usersRegenerateRecoveryCodes.js.map +1 -1
- package/dist/commonjs/funcs/users/usersSendMfa.js +1 -1
- package/dist/commonjs/funcs/users/usersSendMfa.js.map +1 -1
- package/dist/commonjs/funcs/users/usersValidateMfa.js +1 -1
- package/dist/commonjs/funcs/users/usersValidateMfa.js.map +1 -1
- package/dist/commonjs/funcs/users/usersValidateRecoveryCode.js +1 -1
- package/dist/commonjs/funcs/users/usersValidateRecoveryCode.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +1 -1
- package/dist/commonjs/lib/encodings.d.ts +11 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +23 -0
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts +1 -0
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +16 -2
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/models/commerce/customer-user-invitation.d.ts +38 -0
- package/dist/commonjs/models/commerce/customer-user-invitation.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/customer-user-invitation.js +89 -0
- package/dist/commonjs/models/commerce/customer-user-invitation.js.map +1 -0
- package/dist/commonjs/models/commerce/customer-user-permission.d.ts +27 -0
- package/dist/commonjs/models/commerce/customer-user-permission.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/customer-user-permission.js +63 -0
- package/dist/commonjs/models/commerce/customer-user-permission.js.map +1 -0
- package/dist/commonjs/models/commerce/customer-user-role.d.ts +20 -0
- package/dist/commonjs/models/commerce/customer-user-role.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/customer-user-role.js +61 -0
- package/dist/commonjs/models/commerce/customer-user-role.js.map +1 -0
- package/dist/commonjs/models/commerce/customer-user.d.ts +6 -0
- package/dist/commonjs/models/commerce/customer-user.d.ts.map +1 -1
- package/dist/commonjs/models/commerce/customer-user.js +18 -1
- package/dist/commonjs/models/commerce/customer-user.js.map +1 -1
- package/dist/commonjs/models/commerce/customer.d.ts +17 -0
- package/dist/commonjs/models/commerce/customer.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/customer.js +58 -0
- package/dist/commonjs/models/commerce/customer.js.map +1 -0
- package/dist/commonjs/models/commerce/index.d.ts +5 -0
- package/dist/commonjs/models/commerce/index.d.ts.map +1 -1
- package/dist/commonjs/models/commerce/index.js +5 -0
- package/dist/commonjs/models/commerce/index.js.map +1 -1
- package/dist/commonjs/models/operations/commerce-customer-user-invitations.d.ts +70 -0
- package/dist/commonjs/models/operations/commerce-customer-user-invitations.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-customer-user-invitations.js +113 -0
- package/dist/commonjs/models/operations/commerce-customer-user-invitations.js.map +1 -0
- package/dist/commonjs/models/operations/commerce-customer-user-permissions.d.ts +9 -0
- package/dist/commonjs/models/operations/commerce-customer-user-permissions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-customer-user-permissions.js +46 -0
- package/dist/commonjs/models/operations/commerce-customer-user-permissions.js.map +1 -0
- package/dist/commonjs/models/operations/commerce-customer-user-roles.d.ts +57 -0
- package/dist/commonjs/models/operations/commerce-customer-user-roles.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-customer-user-roles.js +92 -0
- package/dist/commonjs/models/operations/commerce-customer-user-roles.js.map +1 -0
- package/dist/commonjs/models/operations/commerce-customer-users.d.ts +48 -0
- package/dist/commonjs/models/operations/commerce-customer-users.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-customer-users.js +86 -0
- package/dist/commonjs/models/operations/commerce-customer-users.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/users-customers.d.ts +26 -0
- package/dist/commonjs/models/operations/users-customers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/users-customers.js +16 -1
- package/dist/commonjs/models/operations/users-customers.js.map +1 -1
- package/dist/commonjs/sdk/commerce/customer-user-invitations.d.ts +11 -0
- package/dist/commonjs/sdk/commerce/customer-user-invitations.d.ts.map +1 -0
- package/dist/commonjs/sdk/commerce/customer-user-invitations.js +31 -0
- package/dist/commonjs/sdk/commerce/customer-user-invitations.js.map +1 -0
- package/dist/commonjs/sdk/commerce/customer-user-permissions.d.ts +6 -0
- package/dist/commonjs/sdk/commerce/customer-user-permissions.d.ts.map +1 -0
- package/dist/commonjs/sdk/commerce/customer-user-permissions.js +16 -0
- package/dist/commonjs/sdk/commerce/customer-user-permissions.js.map +1 -0
- package/dist/commonjs/sdk/commerce/customer-user-roles.d.ts +10 -0
- package/dist/commonjs/sdk/commerce/customer-user-roles.d.ts.map +1 -0
- package/dist/commonjs/sdk/commerce/customer-user-roles.js +28 -0
- package/dist/commonjs/sdk/commerce/customer-user-roles.js.map +1 -0
- package/dist/commonjs/sdk/commerce/customer-users.d.ts +9 -0
- package/dist/commonjs/sdk/commerce/customer-users.d.ts.map +1 -0
- package/dist/commonjs/sdk/commerce/customer-users.js +25 -0
- package/dist/commonjs/sdk/commerce/customer-users.js.map +1 -0
- package/dist/commonjs/sdk/commerce/index.d.ts +16 -0
- package/dist/commonjs/sdk/commerce/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/commerce/index.js +29 -1
- package/dist/commonjs/sdk/commerce/index.js.map +1 -1
- package/dist/commonjs/sdk/users/customers.d.ts +1 -0
- package/dist/commonjs/sdk/users/customers.d.ts.map +1 -1
- package/dist/commonjs/sdk/users/customers.js +4 -0
- package/dist/commonjs/sdk/users/customers.js.map +1 -1
- package/dist/esm/funcs/admins/adminsGet.js +2 -2
- package/dist/esm/funcs/admins/adminsGet.js.map +1 -1
- package/dist/esm/funcs/commerce/customerUserInvitationsAccept.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsAccept.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsAccept.js +85 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsAccept.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsCreate.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsCreate.js +87 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsCreate.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsGet.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsGet.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsGet.js +78 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsGet.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsInspect.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsInspect.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsInspect.js +79 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsInspect.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsList.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsList.js +95 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsList.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.js +76 -0
- package/dist/esm/funcs/commerce/customerUserInvitationsRevoke.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserPermissionsList.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserPermissionsList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserPermissionsList.js +82 -0
- package/dist/esm/funcs/commerce/customerUserPermissionsList.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesCreate.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserRolesCreate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesCreate.js +87 -0
- package/dist/esm/funcs/commerce/customerUserRolesCreate.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesDelete.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserRolesDelete.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesDelete.js +81 -0
- package/dist/esm/funcs/commerce/customerUserRolesDelete.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesGet.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserRolesGet.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesGet.js +83 -0
- package/dist/esm/funcs/commerce/customerUserRolesGet.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesList.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserRolesList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesList.js +91 -0
- package/dist/esm/funcs/commerce/customerUserRolesList.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesUpdate.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUserRolesUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUserRolesUpdate.js +87 -0
- package/dist/esm/funcs/commerce/customerUserRolesUpdate.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersDelete.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUsersDelete.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersDelete.js +81 -0
- package/dist/esm/funcs/commerce/customerUsersDelete.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersGet.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUsersGet.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersGet.js +83 -0
- package/dist/esm/funcs/commerce/customerUsersGet.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersList.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUsersList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersList.js +96 -0
- package/dist/esm/funcs/commerce/customerUsersList.js.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersUpdate.d.ts +10 -0
- package/dist/esm/funcs/commerce/customerUsersUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/customerUsersUpdate.js +87 -0
- package/dist/esm/funcs/commerce/customerUsersUpdate.js.map +1 -0
- package/dist/esm/funcs/commerce/index.d.ts +16 -0
- package/dist/esm/funcs/commerce/index.d.ts.map +1 -1
- package/dist/esm/funcs/commerce/index.js +16 -0
- package/dist/esm/funcs/commerce/index.js.map +1 -1
- package/dist/esm/funcs/oauth2/index.js +5 -5
- package/dist/esm/funcs/oauth2/index.js.map +1 -1
- package/dist/esm/funcs/users/index.d.ts +1 -0
- package/dist/esm/funcs/users/index.d.ts.map +1 -1
- package/dist/esm/funcs/users/index.js +1 -0
- package/dist/esm/funcs/users/index.js.map +1 -1
- package/dist/esm/funcs/users/usersDisableMfa.js +2 -2
- package/dist/esm/funcs/users/usersDisableMfa.js.map +1 -1
- package/dist/esm/funcs/users/usersEnableMfa.js +2 -2
- package/dist/esm/funcs/users/usersEnableMfa.js.map +1 -1
- package/dist/esm/funcs/users/usersGetCustomer.d.ts +10 -0
- package/dist/esm/funcs/users/usersGetCustomer.d.ts.map +1 -0
- package/dist/esm/funcs/users/usersGetCustomer.js +86 -0
- package/dist/esm/funcs/users/usersGetCustomer.js.map +1 -0
- package/dist/esm/funcs/users/usersGetMfaMethod.js +2 -2
- package/dist/esm/funcs/users/usersGetMfaMethod.js.map +1 -1
- package/dist/esm/funcs/users/usersIssueToken.js +2 -2
- package/dist/esm/funcs/users/usersIssueToken.js.map +1 -1
- package/dist/esm/funcs/users/usersListCustomers.d.ts.map +1 -1
- package/dist/esm/funcs/users/usersListCustomers.js +8 -3
- package/dist/esm/funcs/users/usersListCustomers.js.map +1 -1
- package/dist/esm/funcs/users/usersListMfaMethods.js +2 -2
- package/dist/esm/funcs/users/usersListMfaMethods.js.map +1 -1
- package/dist/esm/funcs/users/usersListOAuthAccounts.js +2 -2
- package/dist/esm/funcs/users/usersListOAuthAccounts.js.map +1 -1
- package/dist/esm/funcs/users/usersListRecoveryCodes.js +2 -2
- package/dist/esm/funcs/users/usersListRecoveryCodes.js.map +1 -1
- package/dist/esm/funcs/users/usersRegenerateRecoveryCodes.js +2 -2
- package/dist/esm/funcs/users/usersRegenerateRecoveryCodes.js.map +1 -1
- package/dist/esm/funcs/users/usersSendMfa.js +2 -2
- package/dist/esm/funcs/users/usersSendMfa.js.map +1 -1
- package/dist/esm/funcs/users/usersValidateMfa.js +2 -2
- package/dist/esm/funcs/users/usersValidateMfa.js.map +1 -1
- package/dist/esm/funcs/users/usersValidateRecoveryCode.js +2 -2
- package/dist/esm/funcs/users/usersValidateRecoveryCode.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +1 -1
- package/dist/esm/lib/encodings.d.ts +11 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +22 -0
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts +1 -0
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +16 -2
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/models/commerce/customer-user-invitation.d.ts +38 -0
- package/dist/esm/models/commerce/customer-user-invitation.d.ts.map +1 -0
- package/dist/esm/models/commerce/customer-user-invitation.js +53 -0
- package/dist/esm/models/commerce/customer-user-invitation.js.map +1 -0
- package/dist/esm/models/commerce/customer-user-permission.d.ts +27 -0
- package/dist/esm/models/commerce/customer-user-permission.d.ts.map +1 -0
- package/dist/esm/models/commerce/customer-user-permission.js +27 -0
- package/dist/esm/models/commerce/customer-user-permission.js.map +1 -0
- package/dist/esm/models/commerce/customer-user-role.d.ts +20 -0
- package/dist/esm/models/commerce/customer-user-role.d.ts.map +1 -0
- package/dist/esm/models/commerce/customer-user-role.js +25 -0
- package/dist/esm/models/commerce/customer-user-role.js.map +1 -0
- package/dist/esm/models/commerce/customer-user.d.ts +6 -0
- package/dist/esm/models/commerce/customer-user.d.ts.map +1 -1
- package/dist/esm/models/commerce/customer-user.js +18 -1
- package/dist/esm/models/commerce/customer-user.js.map +1 -1
- package/dist/esm/models/commerce/customer.d.ts +17 -0
- package/dist/esm/models/commerce/customer.d.ts.map +1 -0
- package/dist/esm/models/commerce/customer.js +22 -0
- package/dist/esm/models/commerce/customer.js.map +1 -0
- package/dist/esm/models/commerce/index.d.ts +5 -0
- package/dist/esm/models/commerce/index.d.ts.map +1 -1
- package/dist/esm/models/commerce/index.js +5 -0
- package/dist/esm/models/commerce/index.js.map +1 -1
- package/dist/esm/models/operations/commerce-customer-user-invitations.d.ts +70 -0
- package/dist/esm/models/operations/commerce-customer-user-invitations.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-customer-user-invitations.js +77 -0
- package/dist/esm/models/operations/commerce-customer-user-invitations.js.map +1 -0
- package/dist/esm/models/operations/commerce-customer-user-permissions.d.ts +9 -0
- package/dist/esm/models/operations/commerce-customer-user-permissions.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-customer-user-permissions.js +10 -0
- package/dist/esm/models/operations/commerce-customer-user-permissions.js.map +1 -0
- package/dist/esm/models/operations/commerce-customer-user-roles.d.ts +57 -0
- package/dist/esm/models/operations/commerce-customer-user-roles.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-customer-user-roles.js +56 -0
- package/dist/esm/models/operations/commerce-customer-user-roles.js.map +1 -0
- package/dist/esm/models/operations/commerce-customer-users.d.ts +48 -0
- package/dist/esm/models/operations/commerce-customer-users.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-customer-users.js +50 -0
- package/dist/esm/models/operations/commerce-customer-users.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/users-customers.d.ts +26 -0
- package/dist/esm/models/operations/users-customers.d.ts.map +1 -1
- package/dist/esm/models/operations/users-customers.js +15 -0
- package/dist/esm/models/operations/users-customers.js.map +1 -1
- package/dist/esm/sdk/commerce/customer-user-invitations.d.ts +11 -0
- package/dist/esm/sdk/commerce/customer-user-invitations.d.ts.map +1 -0
- package/dist/esm/sdk/commerce/customer-user-invitations.js +27 -0
- package/dist/esm/sdk/commerce/customer-user-invitations.js.map +1 -0
- package/dist/esm/sdk/commerce/customer-user-permissions.d.ts +6 -0
- package/dist/esm/sdk/commerce/customer-user-permissions.d.ts.map +1 -0
- package/dist/esm/sdk/commerce/customer-user-permissions.js +12 -0
- package/dist/esm/sdk/commerce/customer-user-permissions.js.map +1 -0
- package/dist/esm/sdk/commerce/customer-user-roles.d.ts +10 -0
- package/dist/esm/sdk/commerce/customer-user-roles.d.ts.map +1 -0
- package/dist/esm/sdk/commerce/customer-user-roles.js +24 -0
- package/dist/esm/sdk/commerce/customer-user-roles.js.map +1 -0
- package/dist/esm/sdk/commerce/customer-users.d.ts +9 -0
- package/dist/esm/sdk/commerce/customer-users.d.ts.map +1 -0
- package/dist/esm/sdk/commerce/customer-users.js +21 -0
- package/dist/esm/sdk/commerce/customer-users.js.map +1 -0
- package/dist/esm/sdk/commerce/index.d.ts +16 -0
- package/dist/esm/sdk/commerce/index.d.ts.map +1 -1
- package/dist/esm/sdk/commerce/index.js +24 -0
- package/dist/esm/sdk/commerce/index.js.map +1 -1
- package/dist/esm/sdk/users/customers.d.ts +1 -0
- package/dist/esm/sdk/users/customers.d.ts.map +1 -1
- package/dist/esm/sdk/users/customers.js +4 -0
- package/dist/esm/sdk/users/customers.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/admins/adminsGet.ts +2 -2
- package/src/funcs/commerce/customerUserInvitationsAccept.ts +154 -0
- package/src/funcs/commerce/customerUserInvitationsCreate.ts +164 -0
- package/src/funcs/commerce/customerUserInvitationsGet.ts +147 -0
- package/src/funcs/commerce/customerUserInvitationsInspect.ts +152 -0
- package/src/funcs/commerce/customerUserInvitationsList.ts +163 -0
- package/src/funcs/commerce/customerUserInvitationsRevoke.ts +145 -0
- package/src/funcs/commerce/customerUserPermissionsList.ts +160 -0
- package/src/funcs/commerce/customerUserRolesCreate.ts +164 -0
- package/src/funcs/commerce/customerUserRolesDelete.ts +158 -0
- package/src/funcs/commerce/customerUserRolesGet.ts +160 -0
- package/src/funcs/commerce/customerUserRolesList.ts +169 -0
- package/src/funcs/commerce/customerUserRolesUpdate.ts +164 -0
- package/src/funcs/commerce/customerUsersDelete.ts +158 -0
- package/src/funcs/commerce/customerUsersGet.ts +160 -0
- package/src/funcs/commerce/customerUsersList.ts +174 -0
- package/src/funcs/commerce/customerUsersUpdate.ts +164 -0
- package/src/funcs/commerce/index.ts +16 -1
- package/src/funcs/oauth2/index.ts +5 -5
- package/src/funcs/users/index.ts +1 -0
- package/src/funcs/users/usersDisableMfa.ts +2 -2
- package/src/funcs/users/usersEnableMfa.ts +2 -2
- package/src/funcs/users/usersGetCustomer.ts +164 -0
- package/src/funcs/users/usersGetMfaMethod.ts +2 -2
- package/src/funcs/users/usersIssueToken.ts +2 -2
- package/src/funcs/users/usersListCustomers.ts +10 -3
- package/src/funcs/users/usersListMfaMethods.ts +2 -2
- package/src/funcs/users/usersListOAuthAccounts.ts +2 -2
- package/src/funcs/users/usersListRecoveryCodes.ts +2 -2
- package/src/funcs/users/usersRegenerateRecoveryCodes.ts +2 -2
- package/src/funcs/users/usersSendMfa.ts +2 -2
- package/src/funcs/users/usersValidateMfa.ts +2 -2
- package/src/funcs/users/usersValidateRecoveryCode.ts +2 -2
- package/src/lib/config.ts +1 -1
- package/src/lib/encodings.ts +29 -0
- package/src/lib/sdks.ts +18 -2
- package/src/models/commerce/customer-user-invitation.ts +94 -0
- package/src/models/commerce/customer-user-permission.ts +52 -0
- package/src/models/commerce/customer-user-role.ts +42 -0
- package/src/models/commerce/customer-user.ts +26 -2
- package/src/models/commerce/customer.ts +36 -0
- package/src/models/commerce/index.ts +5 -0
- package/src/models/operations/commerce-customer-user-invitations.ts +139 -0
- package/src/models/operations/commerce-customer-user-permissions.ts +17 -0
- package/src/models/operations/commerce-customer-user-roles.ts +96 -0
- package/src/models/operations/commerce-customer-users.ts +88 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/users-customers.ts +41 -0
- package/src/sdk/commerce/customer-user-invitations.ts +59 -0
- package/src/sdk/commerce/customer-user-permissions.ts +16 -0
- package/src/sdk/commerce/customer-user-roles.ts +51 -0
- package/src/sdk/commerce/customer-users.ts +43 -0
- package/src/sdk/commerce/index.ts +32 -0
- package/src/sdk/users/customers.ts +12 -0
package/src/lib/encodings.ts
CHANGED
|
@@ -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 {
|
|
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
|
-
|
|
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();
|