@djust-b2b/djust-front-sdk 3.0.0-beta.9 → 3.0.0
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/README.md +34 -30
- package/dist/.tsbuildinfo +1 -1
- package/dist/.tsbuildinfo-esm +1 -1
- package/dist/client/create-client.d.ts +18 -0
- package/dist/client/create-client.d.ts.map +1 -1
- package/dist/client/transport.d.ts +5 -0
- package/dist/client/transport.d.ts.map +1 -1
- package/dist/errors/classes/not-found.error.d.ts +1 -1
- package/dist/errors/classes/not-found.error.d.ts.map +1 -1
- package/dist/errors/factory.d.ts.map +1 -1
- package/dist/errors/helpers/djust-api-error.d.ts +29 -0
- package/dist/errors/helpers/djust-api-error.d.ts.map +1 -0
- package/dist/errors/types.d.ts +4 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/index.d.ts +42 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +269 -63
- package/dist/interfaces/index.d.ts +15 -3
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/services/base.service.d.ts +2 -0
- package/dist/services/base.service.d.ts.map +1 -1
- package/dist/services/commercial-order/commercial-order.service.d.ts +8 -5
- package/dist/services/commercial-order/commercial-order.service.d.ts.map +1 -1
- package/dist/services/commercial-order/definitions.d.ts +13 -0
- package/dist/services/commercial-order/definitions.d.ts.map +1 -1
- package/dist/services/commercial-order/index.d.ts +30 -19
- package/dist/services/commercial-order/index.d.ts.map +1 -1
- package/dist/services/commercial-order/module.d.ts +1 -1
- package/dist/services/commercial-order/module.d.ts.map +1 -1
- package/dist/services/commercial-order/types.d.ts +1 -0
- package/dist/services/commercial-order/types.d.ts.map +1 -1
- package/dist/services/logistic-order/definitions.d.ts +23 -1
- package/dist/services/logistic-order/definitions.d.ts.map +1 -1
- package/dist/services/logistic-order/endpoints.d.ts +1 -0
- package/dist/services/logistic-order/endpoints.d.ts.map +1 -1
- package/dist/services/logistic-order/index.d.ts +77 -1
- package/dist/services/logistic-order/index.d.ts.map +1 -1
- package/dist/services/logistic-order/logistic-order.service.d.ts +6 -1
- package/dist/services/logistic-order/logistic-order.service.d.ts.map +1 -1
- package/dist/services/logistic-order/module.d.ts +1 -1
- package/dist/services/logistic-order/module.d.ts.map +1 -1
- package/dist/services/logistic-order/types.d.ts +9 -0
- package/dist/services/logistic-order/types.d.ts.map +1 -1
- package/dist/services/operation/definitions.d.ts +1 -18
- package/dist/services/operation/definitions.d.ts.map +1 -1
- package/dist/services/payment/definitions.d.ts +0 -10
- package/dist/services/payment/definitions.d.ts.map +1 -1
- package/dist/services/product/definitions.d.ts +1 -0
- package/dist/services/product/definitions.d.ts.map +1 -1
- package/dist/services/product/index.d.ts +6 -5
- package/dist/services/product/index.d.ts.map +1 -1
- package/dist/services/product-variant/definitions.d.ts +3 -142
- package/dist/services/product-variant/definitions.d.ts.map +1 -1
- package/dist/services/quote/index.d.ts +1 -1
- package/dist/settings/fetch-instance.d.ts.map +1 -1
- package/dist/settings/sdk-version.d.ts +3 -0
- package/dist/settings/sdk-version.d.ts.map +1 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/client/create-client.d.ts +251 -0
- package/lib/client/create-client.d.ts.map +1 -0
- package/lib/client/create-client.js +233 -0
- package/lib/client/create-client.js.map +1 -0
- package/lib/client/index.d.ts +14 -0
- package/lib/client/index.d.ts.map +1 -0
- package/lib/client/index.js +91 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/performance.d.ts +203 -0
- package/lib/client/performance.d.ts.map +1 -0
- package/lib/client/performance.js +409 -0
- package/lib/client/performance.js.map +1 -0
- package/lib/client/transport.d.ts +372 -0
- package/lib/client/transport.d.ts.map +1 -0
- package/lib/client/transport.js +735 -0
- package/lib/client/transport.js.map +1 -0
- package/lib/errors/base.d.ts +101 -0
- package/lib/errors/base.d.ts.map +1 -0
- package/lib/errors/base.js +145 -0
- package/lib/errors/base.js.map +1 -0
- package/lib/errors/classes/auth.error.d.ts +64 -0
- package/lib/errors/classes/auth.error.d.ts.map +1 -0
- package/lib/errors/classes/auth.error.js +116 -0
- package/lib/errors/classes/auth.error.js.map +1 -0
- package/lib/errors/classes/forbidden.error.d.ts +52 -0
- package/lib/errors/classes/forbidden.error.d.ts.map +1 -0
- package/lib/errors/classes/forbidden.error.js +90 -0
- package/lib/errors/classes/forbidden.error.js.map +1 -0
- package/lib/errors/classes/index.d.ts +17 -0
- package/lib/errors/classes/index.d.ts.map +1 -0
- package/lib/errors/classes/index.js +29 -0
- package/lib/errors/classes/index.js.map +1 -0
- package/lib/errors/classes/network.error.d.ts +63 -0
- package/lib/errors/classes/network.error.d.ts.map +1 -0
- package/lib/errors/classes/network.error.js +122 -0
- package/lib/errors/classes/network.error.js.map +1 -0
- package/lib/errors/classes/not-found.error.d.ts +58 -0
- package/lib/errors/classes/not-found.error.d.ts.map +1 -0
- package/lib/errors/classes/not-found.error.js +120 -0
- package/lib/errors/classes/not-found.error.js.map +1 -0
- package/lib/errors/classes/rate-limit.error.d.ts +49 -0
- package/lib/errors/classes/rate-limit.error.d.ts.map +1 -0
- package/lib/errors/classes/rate-limit.error.js +107 -0
- package/lib/errors/classes/rate-limit.error.js.map +1 -0
- package/lib/errors/classes/server.error.d.ts +63 -0
- package/lib/errors/classes/server.error.d.ts.map +1 -0
- package/lib/errors/classes/server.error.js +156 -0
- package/lib/errors/classes/server.error.js.map +1 -0
- package/lib/errors/classes/timeout.error.d.ts +64 -0
- package/lib/errors/classes/timeout.error.d.ts.map +1 -0
- package/lib/errors/classes/timeout.error.js +90 -0
- package/lib/errors/classes/timeout.error.js.map +1 -0
- package/lib/errors/classes/unexpected.error.d.ts +70 -0
- package/lib/errors/classes/unexpected.error.d.ts.map +1 -0
- package/lib/errors/classes/unexpected.error.js +105 -0
- package/lib/errors/classes/unexpected.error.js.map +1 -0
- package/lib/errors/classes/validation.error.d.ts +68 -0
- package/lib/errors/classes/validation.error.d.ts.map +1 -0
- package/lib/errors/classes/validation.error.js +103 -0
- package/lib/errors/classes/validation.error.js.map +1 -0
- package/lib/errors/codes.d.ts +111 -0
- package/lib/errors/codes.d.ts.map +1 -0
- package/lib/errors/codes.js +143 -0
- package/lib/errors/codes.js.map +1 -0
- package/lib/errors/compat.d.ts +99 -0
- package/lib/errors/compat.d.ts.map +1 -0
- package/lib/errors/compat.js +280 -0
- package/lib/errors/compat.js.map +1 -0
- package/lib/errors/factory.d.ts +33 -0
- package/lib/errors/factory.d.ts.map +1 -0
- package/lib/errors/factory.js +298 -0
- package/lib/errors/factory.js.map +1 -0
- package/lib/errors/guards.d.ts +142 -0
- package/lib/errors/guards.d.ts.map +1 -0
- package/lib/errors/guards.js +281 -0
- package/lib/errors/guards.js.map +1 -0
- package/lib/errors/helpers/djust-api-error.d.ts +29 -0
- package/lib/errors/helpers/djust-api-error.d.ts.map +1 -0
- package/lib/errors/helpers/djust-api-error.js +49 -0
- package/lib/errors/helpers/djust-api-error.js.map +1 -0
- package/lib/errors/index.d.ts +25 -0
- package/lib/errors/index.d.ts.map +1 -0
- package/lib/errors/index.js +89 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/errors/types.d.ts +104 -0
- package/lib/errors/types.d.ts.map +1 -0
- package/lib/errors/types.js +10 -0
- package/lib/errors/types.js.map +1 -0
- package/lib/helpers/index.d.ts +42 -0
- package/lib/helpers/index.d.ts.map +1 -0
- package/lib/helpers/index.js +102 -0
- package/lib/helpers/index.js.map +1 -0
- package/lib/helpers/parameters-validation.d.ts +3 -0
- package/lib/helpers/parameters-validation.d.ts.map +1 -0
- package/lib/helpers/parameters-validation.js +22 -0
- package/lib/helpers/parameters-validation.js.map +1 -0
- package/lib/helpers/utils.d.ts +5 -0
- package/lib/helpers/utils.d.ts.map +1 -0
- package/lib/helpers/utils.js +30 -0
- package/lib/helpers/utils.js.map +1 -0
- package/lib/index.d.ts +267 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +182 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/index.d.ts +43 -0
- package/lib/interfaces/index.d.ts.map +1 -0
- package/lib/interfaces/index.js +36 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/models/address.d.ts +61 -0
- package/lib/interfaces/models/address.d.ts.map +1 -0
- package/lib/interfaces/models/address.js +3 -0
- package/lib/interfaces/models/address.js.map +1 -0
- package/lib/interfaces/models/attribute.d.ts +31 -0
- package/lib/interfaces/models/attribute.d.ts.map +1 -0
- package/lib/interfaces/models/attribute.js +3 -0
- package/lib/interfaces/models/attribute.js.map +1 -0
- package/lib/interfaces/models/auth.d.ts +37 -0
- package/lib/interfaces/models/auth.d.ts.map +1 -0
- package/lib/interfaces/models/auth.js +3 -0
- package/lib/interfaces/models/auth.js.map +1 -0
- package/lib/interfaces/models/cart.d.ts +64 -0
- package/lib/interfaces/models/cart.d.ts.map +1 -0
- package/lib/interfaces/models/cart.js +3 -0
- package/lib/interfaces/models/cart.js.map +1 -0
- package/lib/interfaces/models/common.d.ts +68 -0
- package/lib/interfaces/models/common.d.ts.map +1 -0
- package/lib/interfaces/models/common.js +3 -0
- package/lib/interfaces/models/common.js.map +1 -0
- package/lib/interfaces/models/custom-field.d.ts +57 -0
- package/lib/interfaces/models/custom-field.d.ts.map +1 -0
- package/lib/interfaces/models/custom-field.js +3 -0
- package/lib/interfaces/models/custom-field.js.map +1 -0
- package/lib/interfaces/models/customer-account.d.ts +52 -0
- package/lib/interfaces/models/customer-account.d.ts.map +1 -0
- package/lib/interfaces/models/customer-account.js +3 -0
- package/lib/interfaces/models/customer-account.js.map +1 -0
- package/lib/interfaces/models/customer-organisation.d.ts +14 -0
- package/lib/interfaces/models/customer-organisation.d.ts.map +1 -0
- package/lib/interfaces/models/customer-organisation.js +3 -0
- package/lib/interfaces/models/customer-organisation.js.map +1 -0
- package/lib/interfaces/models/customer-user.d.ts +114 -0
- package/lib/interfaces/models/customer-user.d.ts.map +1 -0
- package/lib/interfaces/models/customer-user.js +3 -0
- package/lib/interfaces/models/customer-user.js.map +1 -0
- package/lib/interfaces/models/incident.d.ts +37 -0
- package/lib/interfaces/models/incident.d.ts.map +1 -0
- package/lib/interfaces/models/incident.js +3 -0
- package/lib/interfaces/models/incident.js.map +1 -0
- package/lib/interfaces/models/navigation-category.d.ts +22 -0
- package/lib/interfaces/models/navigation-category.d.ts.map +1 -0
- package/lib/interfaces/models/navigation-category.js +3 -0
- package/lib/interfaces/models/navigation-category.js.map +1 -0
- package/lib/interfaces/models/offer.d.ts +151 -0
- package/lib/interfaces/models/offer.d.ts.map +1 -0
- package/lib/interfaces/models/offer.js +3 -0
- package/lib/interfaces/models/offer.js.map +1 -0
- package/lib/interfaces/models/order.d.ts +701 -0
- package/lib/interfaces/models/order.d.ts.map +1 -0
- package/lib/interfaces/models/order.js +3 -0
- package/lib/interfaces/models/order.js.map +1 -0
- package/lib/interfaces/models/payment.d.ts +20 -0
- package/lib/interfaces/models/payment.d.ts.map +1 -0
- package/lib/interfaces/models/payment.js +3 -0
- package/lib/interfaces/models/payment.js.map +1 -0
- package/lib/interfaces/models/price.d.ts +6 -0
- package/lib/interfaces/models/price.d.ts.map +1 -0
- package/lib/interfaces/models/price.js +3 -0
- package/lib/interfaces/models/price.js.map +1 -0
- package/lib/interfaces/models/product.d.ts +243 -0
- package/lib/interfaces/models/product.d.ts.map +1 -0
- package/lib/interfaces/models/product.js +3 -0
- package/lib/interfaces/models/product.js.map +1 -0
- package/lib/interfaces/models/quote.d.ts +77 -0
- package/lib/interfaces/models/quote.d.ts.map +1 -0
- package/lib/interfaces/models/quote.js +3 -0
- package/lib/interfaces/models/quote.js.map +1 -0
- package/lib/interfaces/models/searchProduct.d.ts +128 -0
- package/lib/interfaces/models/searchProduct.d.ts.map +1 -0
- package/lib/interfaces/models/searchProduct.js +3 -0
- package/lib/interfaces/models/searchProduct.js.map +1 -0
- package/lib/interfaces/models/supplier.d.ts +72 -0
- package/lib/interfaces/models/supplier.d.ts.map +1 -0
- package/lib/interfaces/models/supplier.js +3 -0
- package/lib/interfaces/models/supplier.js.map +1 -0
- package/lib/services/attributes/attributes.service.d.ts +18 -0
- package/lib/services/attributes/attributes.service.d.ts.map +1 -0
- package/lib/services/attributes/attributes.service.js +37 -0
- package/lib/services/attributes/attributes.service.js.map +1 -0
- package/lib/services/attributes/definitions.d.ts +28 -0
- package/lib/services/attributes/definitions.d.ts.map +1 -0
- package/lib/services/attributes/definitions.js +3 -0
- package/lib/services/attributes/definitions.js.map +1 -0
- package/lib/services/attributes/endpoints.d.ts +12 -0
- package/lib/services/attributes/endpoints.d.ts.map +1 -0
- package/lib/services/attributes/endpoints.js +14 -0
- package/lib/services/attributes/endpoints.js.map +1 -0
- package/lib/services/attributes/index.d.ts +33 -0
- package/lib/services/attributes/index.d.ts.map +1 -0
- package/lib/services/attributes/index.js +50 -0
- package/lib/services/attributes/index.js.map +1 -0
- package/lib/services/attributes/module.d.ts +11 -0
- package/lib/services/attributes/module.d.ts.map +1 -0
- package/lib/services/attributes/module.js +15 -0
- package/lib/services/attributes/module.js.map +1 -0
- package/lib/services/attributes/types.d.ts +35 -0
- package/lib/services/attributes/types.d.ts.map +1 -0
- package/lib/services/attributes/types.js +10 -0
- package/lib/services/attributes/types.js.map +1 -0
- package/lib/services/auth/__mocks__/auth.mocks.d.ts +249 -0
- package/lib/services/auth/__mocks__/auth.mocks.d.ts.map +1 -0
- package/lib/services/auth/__mocks__/auth.mocks.js +221 -0
- package/lib/services/auth/__mocks__/auth.mocks.js.map +1 -0
- package/lib/services/auth/auth.service.d.ts +286 -0
- package/lib/services/auth/auth.service.d.ts.map +1 -0
- package/lib/services/auth/auth.service.js +423 -0
- package/lib/services/auth/auth.service.js.map +1 -0
- package/lib/services/auth/definitions.d.ts +69 -0
- package/lib/services/auth/definitions.d.ts.map +1 -0
- package/lib/services/auth/definitions.js +3 -0
- package/lib/services/auth/definitions.js.map +1 -0
- package/lib/services/auth/definitions.requests.d.ts +25 -0
- package/lib/services/auth/definitions.requests.d.ts.map +1 -0
- package/lib/services/auth/definitions.requests.js +6 -0
- package/lib/services/auth/definitions.requests.js.map +1 -0
- package/lib/services/auth/endpoints.d.ts +30 -0
- package/lib/services/auth/endpoints.d.ts.map +1 -0
- package/lib/services/auth/endpoints.js +32 -0
- package/lib/services/auth/endpoints.js.map +1 -0
- package/lib/services/auth/index.d.ts +232 -0
- package/lib/services/auth/index.d.ts.map +1 -0
- package/lib/services/auth/index.js +310 -0
- package/lib/services/auth/index.js.map +1 -0
- package/lib/services/auth/module.d.ts +11 -0
- package/lib/services/auth/module.d.ts.map +1 -0
- package/lib/services/auth/module.js +17 -0
- package/lib/services/auth/module.js.map +1 -0
- package/lib/services/auth/types.d.ts +124 -0
- package/lib/services/auth/types.d.ts.map +1 -0
- package/lib/services/auth/types.js +10 -0
- package/lib/services/auth/types.js.map +1 -0
- package/lib/services/base.service.d.ts +83 -0
- package/lib/services/base.service.d.ts.map +1 -0
- package/lib/services/base.service.js +121 -0
- package/lib/services/base.service.js.map +1 -0
- package/lib/services/cart/cart.service.d.ts +443 -0
- package/lib/services/cart/cart.service.d.ts.map +1 -0
- package/lib/services/cart/cart.service.js +551 -0
- package/lib/services/cart/cart.service.js.map +1 -0
- package/lib/services/cart/definitions.d.ts +84 -0
- package/lib/services/cart/definitions.d.ts.map +1 -0
- package/lib/services/cart/definitions.js +3 -0
- package/lib/services/cart/definitions.js.map +1 -0
- package/lib/services/cart/endpoints.d.ts +24 -0
- package/lib/services/cart/endpoints.d.ts.map +1 -0
- package/lib/services/cart/endpoints.js +26 -0
- package/lib/services/cart/endpoints.js.map +1 -0
- package/lib/services/cart/index.d.ts +330 -0
- package/lib/services/cart/index.d.ts.map +1 -0
- package/lib/services/cart/index.js +464 -0
- package/lib/services/cart/index.js.map +1 -0
- package/lib/services/cart/module.d.ts +11 -0
- package/lib/services/cart/module.d.ts.map +1 -0
- package/lib/services/cart/module.js +17 -0
- package/lib/services/cart/module.js.map +1 -0
- package/lib/services/cart/types.d.ts +236 -0
- package/lib/services/cart/types.d.ts.map +1 -0
- package/lib/services/cart/types.js +10 -0
- package/lib/services/cart/types.js.map +1 -0
- package/lib/services/commercial-order/commercial-order.service.d.ts +435 -0
- package/lib/services/commercial-order/commercial-order.service.d.ts.map +1 -0
- package/lib/services/commercial-order/commercial-order.service.js +690 -0
- package/lib/services/commercial-order/commercial-order.service.js.map +1 -0
- package/lib/services/commercial-order/definitions.d.ts +182 -0
- package/lib/services/commercial-order/definitions.d.ts.map +1 -0
- package/lib/services/commercial-order/definitions.js +3 -0
- package/lib/services/commercial-order/definitions.js.map +1 -0
- package/lib/services/commercial-order/endpoints.d.ts +28 -0
- package/lib/services/commercial-order/endpoints.d.ts.map +1 -0
- package/lib/services/commercial-order/endpoints.js +33 -0
- package/lib/services/commercial-order/endpoints.js.map +1 -0
- package/lib/services/commercial-order/index.d.ts +721 -0
- package/lib/services/commercial-order/index.d.ts.map +1 -0
- package/lib/services/commercial-order/index.js +986 -0
- package/lib/services/commercial-order/index.js.map +1 -0
- package/lib/services/commercial-order/module.d.ts +11 -0
- package/lib/services/commercial-order/module.d.ts.map +1 -0
- package/lib/services/commercial-order/module.js +15 -0
- package/lib/services/commercial-order/module.js.map +1 -0
- package/lib/services/commercial-order/types.d.ts +244 -0
- package/lib/services/commercial-order/types.d.ts.map +1 -0
- package/lib/services/commercial-order/types.js +10 -0
- package/lib/services/commercial-order/types.js.map +1 -0
- package/lib/services/custom-field/custom-field.service.d.ts +23 -0
- package/lib/services/custom-field/custom-field.service.d.ts.map +1 -0
- package/lib/services/custom-field/custom-field.service.js +64 -0
- package/lib/services/custom-field/custom-field.service.js.map +1 -0
- package/lib/services/custom-field/definitions.d.ts +107 -0
- package/lib/services/custom-field/definitions.d.ts.map +1 -0
- package/lib/services/custom-field/definitions.js +61 -0
- package/lib/services/custom-field/definitions.js.map +1 -0
- package/lib/services/custom-field/endpoints.d.ts +13 -0
- package/lib/services/custom-field/endpoints.d.ts.map +1 -0
- package/lib/services/custom-field/endpoints.js +15 -0
- package/lib/services/custom-field/endpoints.js.map +1 -0
- package/lib/services/custom-field/index.d.ts +115 -0
- package/lib/services/custom-field/index.d.ts.map +1 -0
- package/lib/services/custom-field/index.js +144 -0
- package/lib/services/custom-field/index.js.map +1 -0
- package/lib/services/custom-field/module.d.ts +11 -0
- package/lib/services/custom-field/module.d.ts.map +1 -0
- package/lib/services/custom-field/module.js +15 -0
- package/lib/services/custom-field/module.js.map +1 -0
- package/lib/services/custom-field/types.d.ts +51 -0
- package/lib/services/custom-field/types.d.ts.map +1 -0
- package/lib/services/custom-field/types.js +10 -0
- package/lib/services/custom-field/types.js.map +1 -0
- package/lib/services/customer-account/customer-account.service.d.ts +387 -0
- package/lib/services/customer-account/customer-account.service.d.ts.map +1 -0
- package/lib/services/customer-account/customer-account.service.js +579 -0
- package/lib/services/customer-account/customer-account.service.js.map +1 -0
- package/lib/services/customer-account/definitions.d.ts +164 -0
- package/lib/services/customer-account/definitions.d.ts.map +1 -0
- package/lib/services/customer-account/definitions.js +3 -0
- package/lib/services/customer-account/definitions.js.map +1 -0
- package/lib/services/customer-account/endpoints.d.ts +25 -0
- package/lib/services/customer-account/endpoints.d.ts.map +1 -0
- package/lib/services/customer-account/endpoints.js +33 -0
- package/lib/services/customer-account/endpoints.js.map +1 -0
- package/lib/services/customer-account/index.d.ts +656 -0
- package/lib/services/customer-account/index.d.ts.map +1 -0
- package/lib/services/customer-account/index.js +929 -0
- package/lib/services/customer-account/index.js.map +1 -0
- package/lib/services/customer-account/module.d.ts +11 -0
- package/lib/services/customer-account/module.d.ts.map +1 -0
- package/lib/services/customer-account/module.js +15 -0
- package/lib/services/customer-account/module.js.map +1 -0
- package/lib/services/customer-account/types.d.ts +253 -0
- package/lib/services/customer-account/types.d.ts.map +1 -0
- package/lib/services/customer-account/types.js +10 -0
- package/lib/services/customer-account/types.js.map +1 -0
- package/lib/services/customer-user/customer-user.service.d.ts +280 -0
- package/lib/services/customer-user/customer-user.service.d.ts.map +1 -0
- package/lib/services/customer-user/customer-user.service.js +402 -0
- package/lib/services/customer-user/customer-user.service.js.map +1 -0
- package/lib/services/customer-user/definitions.d.ts +84 -0
- package/lib/services/customer-user/definitions.d.ts.map +1 -0
- package/lib/services/customer-user/definitions.js +3 -0
- package/lib/services/customer-user/definitions.js.map +1 -0
- package/lib/services/customer-user/endpoints.d.ts +19 -0
- package/lib/services/customer-user/endpoints.d.ts.map +1 -0
- package/lib/services/customer-user/endpoints.js +21 -0
- package/lib/services/customer-user/endpoints.js.map +1 -0
- package/lib/services/customer-user/index.d.ts +394 -0
- package/lib/services/customer-user/index.d.ts.map +1 -0
- package/lib/services/customer-user/index.js +528 -0
- package/lib/services/customer-user/index.js.map +1 -0
- package/lib/services/customer-user/module.d.ts +11 -0
- package/lib/services/customer-user/module.d.ts.map +1 -0
- package/lib/services/customer-user/module.js +15 -0
- package/lib/services/customer-user/module.js.map +1 -0
- package/lib/services/customer-user/types.d.ts +118 -0
- package/lib/services/customer-user/types.d.ts.map +1 -0
- package/lib/services/customer-user/types.js +10 -0
- package/lib/services/customer-user/types.js.map +1 -0
- package/lib/services/factory.d.ts +104 -0
- package/lib/services/factory.d.ts.map +1 -0
- package/lib/services/factory.js +89 -0
- package/lib/services/factory.js.map +1 -0
- package/lib/services/incident/definitions.d.ts +85 -0
- package/lib/services/incident/definitions.d.ts.map +1 -0
- package/lib/services/incident/definitions.js +3 -0
- package/lib/services/incident/definitions.js.map +1 -0
- package/lib/services/incident/endpoints.d.ts +17 -0
- package/lib/services/incident/endpoints.d.ts.map +1 -0
- package/lib/services/incident/endpoints.js +19 -0
- package/lib/services/incident/endpoints.js.map +1 -0
- package/lib/services/incident/incident.service.d.ts +24 -0
- package/lib/services/incident/incident.service.d.ts.map +1 -0
- package/lib/services/incident/incident.service.js +141 -0
- package/lib/services/incident/incident.service.js.map +1 -0
- package/lib/services/incident/index.d.ts +270 -0
- package/lib/services/incident/index.d.ts.map +1 -0
- package/lib/services/incident/index.js +389 -0
- package/lib/services/incident/index.js.map +1 -0
- package/lib/services/incident/module.d.ts +11 -0
- package/lib/services/incident/module.d.ts.map +1 -0
- package/lib/services/incident/module.js +15 -0
- package/lib/services/incident/module.js.map +1 -0
- package/lib/services/incident/types.d.ts +116 -0
- package/lib/services/incident/types.d.ts.map +1 -0
- package/lib/services/incident/types.js +10 -0
- package/lib/services/incident/types.js.map +1 -0
- package/lib/services/logistic-order/definitions.d.ts +315 -0
- package/lib/services/logistic-order/definitions.d.ts.map +1 -0
- package/lib/services/logistic-order/definitions.js +3 -0
- package/lib/services/logistic-order/definitions.js.map +1 -0
- package/lib/services/logistic-order/endpoints.d.ts +44 -0
- package/lib/services/logistic-order/endpoints.d.ts.map +1 -0
- package/lib/services/logistic-order/endpoints.js +57 -0
- package/lib/services/logistic-order/endpoints.js.map +1 -0
- package/lib/services/logistic-order/index.d.ts +1376 -0
- package/lib/services/logistic-order/index.d.ts.map +1 -0
- package/lib/services/logistic-order/index.js +1823 -0
- package/lib/services/logistic-order/index.js.map +1 -0
- package/lib/services/logistic-order/logistic-order.service.d.ts +62 -0
- package/lib/services/logistic-order/logistic-order.service.d.ts.map +1 -0
- package/lib/services/logistic-order/logistic-order.service.js +499 -0
- package/lib/services/logistic-order/logistic-order.service.js.map +1 -0
- package/lib/services/logistic-order/module.d.ts +11 -0
- package/lib/services/logistic-order/module.d.ts.map +1 -0
- package/lib/services/logistic-order/module.js +15 -0
- package/lib/services/logistic-order/module.js.map +1 -0
- package/lib/services/logistic-order/types.d.ts +411 -0
- package/lib/services/logistic-order/types.d.ts.map +1 -0
- package/lib/services/logistic-order/types.js +10 -0
- package/lib/services/logistic-order/types.js.map +1 -0
- package/lib/services/module.d.ts +64 -0
- package/lib/services/module.d.ts.map +1 -0
- package/lib/services/module.js +147 -0
- package/lib/services/module.js.map +1 -0
- package/lib/services/navigation-category/definitions.d.ts +31 -0
- package/lib/services/navigation-category/definitions.d.ts.map +1 -0
- package/lib/services/navigation-category/definitions.js +3 -0
- package/lib/services/navigation-category/definitions.js.map +1 -0
- package/lib/services/navigation-category/endpoints.d.ts +15 -0
- package/lib/services/navigation-category/endpoints.d.ts.map +1 -0
- package/lib/services/navigation-category/endpoints.js +17 -0
- package/lib/services/navigation-category/endpoints.js.map +1 -0
- package/lib/services/navigation-category/index.d.ts +114 -0
- package/lib/services/navigation-category/index.d.ts.map +1 -0
- package/lib/services/navigation-category/index.js +160 -0
- package/lib/services/navigation-category/index.js.map +1 -0
- package/lib/services/navigation-category/module.d.ts +11 -0
- package/lib/services/navigation-category/module.d.ts.map +1 -0
- package/lib/services/navigation-category/module.js +15 -0
- package/lib/services/navigation-category/module.js.map +1 -0
- package/lib/services/navigation-category/navigation-category.service.d.ts +148 -0
- package/lib/services/navigation-category/navigation-category.service.d.ts.map +1 -0
- package/lib/services/navigation-category/navigation-category.service.js +191 -0
- package/lib/services/navigation-category/navigation-category.service.js.map +1 -0
- package/lib/services/navigation-category/types.d.ts +51 -0
- package/lib/services/navigation-category/types.d.ts.map +1 -0
- package/lib/services/navigation-category/types.js +10 -0
- package/lib/services/navigation-category/types.js.map +1 -0
- package/lib/services/offer-inventories/definitions.d.ts +73 -0
- package/lib/services/offer-inventories/definitions.d.ts.map +1 -0
- package/lib/services/offer-inventories/definitions.js +3 -0
- package/lib/services/offer-inventories/definitions.js.map +1 -0
- package/lib/services/offer-inventories/endpoints.d.ts +16 -0
- package/lib/services/offer-inventories/endpoints.d.ts.map +1 -0
- package/lib/services/offer-inventories/endpoints.js +18 -0
- package/lib/services/offer-inventories/endpoints.js.map +1 -0
- package/lib/services/offer-inventories/index.d.ts +120 -0
- package/lib/services/offer-inventories/index.d.ts.map +1 -0
- package/lib/services/offer-inventories/index.js +175 -0
- package/lib/services/offer-inventories/index.js.map +1 -0
- package/lib/services/offer-inventories/module.d.ts +11 -0
- package/lib/services/offer-inventories/module.d.ts.map +1 -0
- package/lib/services/offer-inventories/module.js +15 -0
- package/lib/services/offer-inventories/module.js.map +1 -0
- package/lib/services/offer-inventories/offer-inventories.service.d.ts +26 -0
- package/lib/services/offer-inventories/offer-inventories.service.d.ts.map +1 -0
- package/lib/services/offer-inventories/offer-inventories.service.js +80 -0
- package/lib/services/offer-inventories/offer-inventories.service.js.map +1 -0
- package/lib/services/offer-inventories/types.d.ts +85 -0
- package/lib/services/offer-inventories/types.d.ts.map +1 -0
- package/lib/services/offer-inventories/types.js +10 -0
- package/lib/services/offer-inventories/types.js.map +1 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts +109 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts.map +1 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js +201 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js.map +1 -0
- package/lib/services/offer-prices/definitions.d.ts +24 -0
- package/lib/services/offer-prices/definitions.d.ts.map +1 -0
- package/lib/services/offer-prices/definitions.js +3 -0
- package/lib/services/offer-prices/definitions.js.map +1 -0
- package/lib/services/offer-prices/endpoints.d.ts +12 -0
- package/lib/services/offer-prices/endpoints.d.ts.map +1 -0
- package/lib/services/offer-prices/endpoints.js +14 -0
- package/lib/services/offer-prices/endpoints.js.map +1 -0
- package/lib/services/offer-prices/index.d.ts +36 -0
- package/lib/services/offer-prices/index.d.ts.map +1 -0
- package/lib/services/offer-prices/index.js +53 -0
- package/lib/services/offer-prices/index.js.map +1 -0
- package/lib/services/offer-prices/module.d.ts +11 -0
- package/lib/services/offer-prices/module.d.ts.map +1 -0
- package/lib/services/offer-prices/module.js +15 -0
- package/lib/services/offer-prices/module.js.map +1 -0
- package/lib/services/offer-prices/offer-prices.service.d.ts +18 -0
- package/lib/services/offer-prices/offer-prices.service.d.ts.map +1 -0
- package/lib/services/offer-prices/offer-prices.service.js +36 -0
- package/lib/services/offer-prices/offer-prices.service.js.map +1 -0
- package/lib/services/offer-prices/types.d.ts +33 -0
- package/lib/services/offer-prices/types.d.ts.map +1 -0
- package/lib/services/offer-prices/types.js +10 -0
- package/lib/services/offer-prices/types.js.map +1 -0
- package/lib/services/operation/definitions.d.ts +263 -0
- package/lib/services/operation/definitions.d.ts.map +1 -0
- package/lib/services/operation/definitions.js +18 -0
- package/lib/services/operation/definitions.js.map +1 -0
- package/lib/services/operation/endpoints.d.ts +18 -0
- package/lib/services/operation/endpoints.d.ts.map +1 -0
- package/lib/services/operation/endpoints.js +22 -0
- package/lib/services/operation/endpoints.js.map +1 -0
- package/lib/services/operation/index.d.ts +520 -0
- package/lib/services/operation/index.d.ts.map +1 -0
- package/lib/services/operation/index.js +704 -0
- package/lib/services/operation/index.js.map +1 -0
- package/lib/services/operation/module.d.ts +11 -0
- package/lib/services/operation/module.d.ts.map +1 -0
- package/lib/services/operation/module.js +15 -0
- package/lib/services/operation/module.js.map +1 -0
- package/lib/services/operation/operation.service.d.ts +32 -0
- package/lib/services/operation/operation.service.d.ts.map +1 -0
- package/lib/services/operation/operation.service.js +206 -0
- package/lib/services/operation/operation.service.js.map +1 -0
- package/lib/services/operation/types.d.ts +174 -0
- package/lib/services/operation/types.d.ts.map +1 -0
- package/lib/services/operation/types.js +10 -0
- package/lib/services/operation/types.js.map +1 -0
- package/lib/services/payment/definitions.d.ts +69 -0
- package/lib/services/payment/definitions.d.ts.map +1 -0
- package/lib/services/payment/definitions.js +3 -0
- package/lib/services/payment/definitions.js.map +1 -0
- package/lib/services/payment/endpoints.d.ts +16 -0
- package/lib/services/payment/endpoints.d.ts.map +1 -0
- package/lib/services/payment/endpoints.js +18 -0
- package/lib/services/payment/endpoints.js.map +1 -0
- package/lib/services/payment/index.d.ts +150 -0
- package/lib/services/payment/index.d.ts.map +1 -0
- package/lib/services/payment/index.js +220 -0
- package/lib/services/payment/index.js.map +1 -0
- package/lib/services/payment/module.d.ts +11 -0
- package/lib/services/payment/module.d.ts.map +1 -0
- package/lib/services/payment/module.js +15 -0
- package/lib/services/payment/module.js.map +1 -0
- package/lib/services/payment/payment.service.d.ts +224 -0
- package/lib/services/payment/payment.service.d.ts.map +1 -0
- package/lib/services/payment/payment.service.js +288 -0
- package/lib/services/payment/payment.service.js.map +1 -0
- package/lib/services/payment/types.d.ts +93 -0
- package/lib/services/payment/types.d.ts.map +1 -0
- package/lib/services/payment/types.js +10 -0
- package/lib/services/payment/types.js.map +1 -0
- package/lib/services/product/definitions.d.ts +150 -0
- package/lib/services/product/definitions.d.ts.map +1 -0
- package/lib/services/product/definitions.js +9 -0
- package/lib/services/product/definitions.js.map +1 -0
- package/lib/services/product/endpoints.d.ts +40 -0
- package/lib/services/product/endpoints.d.ts.map +1 -0
- package/lib/services/product/endpoints.js +42 -0
- package/lib/services/product/endpoints.js.map +1 -0
- package/lib/services/product/index.d.ts +388 -0
- package/lib/services/product/index.d.ts.map +1 -0
- package/lib/services/product/index.js +564 -0
- package/lib/services/product/index.js.map +1 -0
- package/lib/services/product/module.d.ts +11 -0
- package/lib/services/product/module.d.ts.map +1 -0
- package/lib/services/product/module.js +17 -0
- package/lib/services/product/module.js.map +1 -0
- package/lib/services/product/product.service.d.ts +452 -0
- package/lib/services/product/product.service.d.ts.map +1 -0
- package/lib/services/product/product.service.js +624 -0
- package/lib/services/product/product.service.js.map +1 -0
- package/lib/services/product/types.d.ts +344 -0
- package/lib/services/product/types.d.ts.map +1 -0
- package/lib/services/product/types.js +10 -0
- package/lib/services/product/types.js.map +1 -0
- package/lib/services/product-variant/definitions.d.ts +33 -0
- package/lib/services/product-variant/definitions.d.ts.map +1 -0
- package/lib/services/product-variant/definitions.js +7 -0
- package/lib/services/product-variant/definitions.js.map +1 -0
- package/lib/services/product-variant/endpoints.d.ts +15 -0
- package/lib/services/product-variant/endpoints.d.ts.map +1 -0
- package/lib/services/product-variant/endpoints.js +17 -0
- package/lib/services/product-variant/endpoints.js.map +1 -0
- package/lib/services/product-variant/index.d.ts +123 -0
- package/lib/services/product-variant/index.d.ts.map +1 -0
- package/lib/services/product-variant/index.js +172 -0
- package/lib/services/product-variant/index.js.map +1 -0
- package/lib/services/product-variant/module.d.ts +11 -0
- package/lib/services/product-variant/module.d.ts.map +1 -0
- package/lib/services/product-variant/module.js +15 -0
- package/lib/services/product-variant/module.js.map +1 -0
- package/lib/services/product-variant/product-variant.service.d.ts +21 -0
- package/lib/services/product-variant/product-variant.service.d.ts.map +1 -0
- package/lib/services/product-variant/product-variant.service.js +69 -0
- package/lib/services/product-variant/product-variant.service.js.map +1 -0
- package/lib/services/product-variant/types.d.ts +73 -0
- package/lib/services/product-variant/types.d.ts.map +1 -0
- package/lib/services/product-variant/types.js +10 -0
- package/lib/services/product-variant/types.js.map +1 -0
- package/lib/services/quote/definitions.d.ts +102 -0
- package/lib/services/quote/definitions.d.ts.map +1 -0
- package/lib/services/quote/definitions.js +3 -0
- package/lib/services/quote/definitions.js.map +1 -0
- package/lib/services/quote/endpoints.d.ts +20 -0
- package/lib/services/quote/endpoints.d.ts.map +1 -0
- package/lib/services/quote/endpoints.js +24 -0
- package/lib/services/quote/endpoints.js.map +1 -0
- package/lib/services/quote/index.d.ts +378 -0
- package/lib/services/quote/index.d.ts.map +1 -0
- package/lib/services/quote/index.js +506 -0
- package/lib/services/quote/index.js.map +1 -0
- package/lib/services/quote/module.d.ts +11 -0
- package/lib/services/quote/module.d.ts.map +1 -0
- package/lib/services/quote/module.js +15 -0
- package/lib/services/quote/module.js.map +1 -0
- package/lib/services/quote/quote.service.d.ts +346 -0
- package/lib/services/quote/quote.service.d.ts.map +1 -0
- package/lib/services/quote/quote.service.js +479 -0
- package/lib/services/quote/quote.service.js.map +1 -0
- package/lib/services/quote/types.d.ts +160 -0
- package/lib/services/quote/types.d.ts.map +1 -0
- package/lib/services/quote/types.js +10 -0
- package/lib/services/quote/types.js.map +1 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.d.ts +49 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.d.ts.map +1 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.js +168 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.js.map +1 -0
- package/lib/services/supplier/definitions.d.ts +30 -0
- package/lib/services/supplier/definitions.d.ts.map +1 -0
- package/lib/services/supplier/definitions.js +3 -0
- package/lib/services/supplier/definitions.js.map +1 -0
- package/lib/services/supplier/endpoints.d.ts +14 -0
- package/lib/services/supplier/endpoints.d.ts.map +1 -0
- package/lib/services/supplier/endpoints.js +16 -0
- package/lib/services/supplier/endpoints.js.map +1 -0
- package/lib/services/supplier/index.d.ts +102 -0
- package/lib/services/supplier/index.d.ts.map +1 -0
- package/lib/services/supplier/index.js +146 -0
- package/lib/services/supplier/index.js.map +1 -0
- package/lib/services/supplier/module.d.ts +11 -0
- package/lib/services/supplier/module.d.ts.map +1 -0
- package/lib/services/supplier/module.js +15 -0
- package/lib/services/supplier/module.js.map +1 -0
- package/lib/services/supplier/supplier.service.d.ts +20 -0
- package/lib/services/supplier/supplier.service.d.ts.map +1 -0
- package/lib/services/supplier/supplier.service.js +63 -0
- package/lib/services/supplier/supplier.service.js.map +1 -0
- package/lib/services/supplier/types.d.ts +58 -0
- package/lib/services/supplier/types.d.ts.map +1 -0
- package/lib/services/supplier/types.js +10 -0
- package/lib/services/supplier/types.js.map +1 -0
- package/lib/services/types.d.ts +81 -0
- package/lib/services/types.d.ts.map +1 -0
- package/lib/services/types.js +10 -0
- package/lib/services/types.js.map +1 -0
- package/lib/settings/fetch-instance.d.ts +30 -0
- package/lib/settings/fetch-instance.d.ts.map +1 -0
- package/lib/settings/fetch-instance.js +223 -0
- package/lib/settings/fetch-instance.js.map +1 -0
- package/lib/settings/sdk-version.d.ts +3 -0
- package/lib/settings/sdk-version.d.ts.map +1 -0
- package/lib/settings/sdk-version.js +6 -0
- package/lib/settings/sdk-version.js.map +1 -0
- package/package.json +27 -8
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* # Customer User Service
|
|
4
|
+
*
|
|
5
|
+
* User profile and account management for B2B customers.
|
|
6
|
+
*
|
|
7
|
+
* ## Features
|
|
8
|
+
* - User registration and activation
|
|
9
|
+
* - Profile management
|
|
10
|
+
* - Address book access
|
|
11
|
+
* - Organisation membership
|
|
12
|
+
* - Multi-account management
|
|
13
|
+
*
|
|
14
|
+
* @module services/customer-user
|
|
15
|
+
* @since 2.17.0
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CustomerUserService = void 0;
|
|
19
|
+
const base_service_1 = require("../base.service");
|
|
20
|
+
const endpoints_1 = require("./endpoints");
|
|
21
|
+
/**
|
|
22
|
+
* Service for customer user management.
|
|
23
|
+
*
|
|
24
|
+
* Handles individual user operations:
|
|
25
|
+
* - Profile creation and updates
|
|
26
|
+
* - Account activation
|
|
27
|
+
* - Address management
|
|
28
|
+
* - Multi-account access
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* import { createDjustClient } from '@djust-b2b/djust-front-sdk';
|
|
33
|
+
*
|
|
34
|
+
* const client = createDjustClient({ baseUrl, clientId, apiKey });
|
|
35
|
+
*
|
|
36
|
+
* // Get current user
|
|
37
|
+
* const user = await client.customerUser.getAuthenticatedUser();
|
|
38
|
+
* console.log(`Hello, ${user.firstName}!`);
|
|
39
|
+
*
|
|
40
|
+
* // Update profile
|
|
41
|
+
* await client.customerUser.updateCustomerUser({
|
|
42
|
+
* civility: 'Mr',
|
|
43
|
+
* firstName: 'John',
|
|
44
|
+
* lastName: 'Doe',
|
|
45
|
+
* phone: '+1-555-123-4567',
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
class CustomerUserService extends base_service_1.BaseService {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments);
|
|
52
|
+
this.serviceName = "customer-user";
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get the currently authenticated user's profile.
|
|
56
|
+
*
|
|
57
|
+
* Returns full user details including permissions and organisations.
|
|
58
|
+
*
|
|
59
|
+
* **Endpoint**: `GET /v1/shop/customer-users/authenticated-user [USR-100]`
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const user = await client.customerUser.getAuthenticatedUser();
|
|
64
|
+
*
|
|
65
|
+
* console.log(`${user.firstName} ${user.lastName}`);
|
|
66
|
+
* console.log(`Email: ${user.email}`);
|
|
67
|
+
* console.log(`Groups: ${user.groups.join(', ')}`);
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @param context - Optional SSR request context
|
|
71
|
+
* @returns Authenticated user profile
|
|
72
|
+
*/
|
|
73
|
+
async getAuthenticatedUser(context) {
|
|
74
|
+
return this.request({
|
|
75
|
+
method: "GET",
|
|
76
|
+
path: endpoints_1.CustomerUserEndpoints.AUTHENTICATED_USER,
|
|
77
|
+
}, context);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Create a new customer user (registration).
|
|
81
|
+
*
|
|
82
|
+
* Creates a user account with the specified details. An activation
|
|
83
|
+
* email will be sent if activationUrl is provided.
|
|
84
|
+
*
|
|
85
|
+
* **Endpoint**: `POST /v1/shop/customer-users [USR-101]`
|
|
86
|
+
*
|
|
87
|
+
* | Parameter | Type | Required | Description |
|
|
88
|
+
* |--------------------|----------|----------|--------------------------|
|
|
89
|
+
* | `civility` | `string` | Yes | Mr, Mrs, Ms, etc. |
|
|
90
|
+
* | `firstName` | `string` | Yes | First name |
|
|
91
|
+
* | `lastName` | `string` | Yes | Last name |
|
|
92
|
+
* | `email` | `string` | Yes | Email address |
|
|
93
|
+
* | `password` | `string` | Yes | Password |
|
|
94
|
+
* | `groups` | `array` | Yes | User groups/roles |
|
|
95
|
+
* | `activationUrl` | `string` | No | URL for activation email |
|
|
96
|
+
* | `phone` | `string` | No | Phone number |
|
|
97
|
+
* | `externalId` | `string` | No | External system ID |
|
|
98
|
+
* | `organisations` | `array` | No | Organisation assignments |
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const user = await client.customerUser.createCustomerUser({
|
|
103
|
+
* civility: 'Mr',
|
|
104
|
+
* firstName: 'John',
|
|
105
|
+
* lastName: 'Doe',
|
|
106
|
+
* email: 'john.doe@company.com',
|
|
107
|
+
* password: 'SecurePass123!',
|
|
108
|
+
* groups: ['BUYER'],
|
|
109
|
+
* activationUrl: 'https://myapp.com/activate',
|
|
110
|
+
* });
|
|
111
|
+
*
|
|
112
|
+
* console.log(`User created: ${user.id}`);
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* @param params - User registration data
|
|
116
|
+
* @param context - Optional SSR request context
|
|
117
|
+
* @throws {ValidationError} If required parameters are missing
|
|
118
|
+
* @returns Created user details
|
|
119
|
+
*/
|
|
120
|
+
async createCustomerUser(params, context) {
|
|
121
|
+
this.required(params, [
|
|
122
|
+
"civility",
|
|
123
|
+
"firstName",
|
|
124
|
+
"lastName",
|
|
125
|
+
"email",
|
|
126
|
+
"password",
|
|
127
|
+
"groups",
|
|
128
|
+
]);
|
|
129
|
+
return this.request({
|
|
130
|
+
method: "POST",
|
|
131
|
+
path: endpoints_1.CustomerUserEndpoints.USERS,
|
|
132
|
+
body: {
|
|
133
|
+
activationUrl: params.activationUrl,
|
|
134
|
+
civility: params.civility,
|
|
135
|
+
customFieldValues: params.customFieldValues,
|
|
136
|
+
email: params.email,
|
|
137
|
+
externalId: params.externalId,
|
|
138
|
+
firstName: params.firstName,
|
|
139
|
+
lastName: params.lastName,
|
|
140
|
+
password: params.password,
|
|
141
|
+
groups: params.groups,
|
|
142
|
+
status: params.status,
|
|
143
|
+
mainOrganisationId: params.mainOrganisationId,
|
|
144
|
+
organisations: params.organisations,
|
|
145
|
+
phone: params.phone,
|
|
146
|
+
},
|
|
147
|
+
}, context);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Update the current user's profile.
|
|
151
|
+
*
|
|
152
|
+
* **Endpoint**: `PUT /v1/shop/customer-users [USR-102]`
|
|
153
|
+
*
|
|
154
|
+
* | Parameter | Type | Required | Description |
|
|
155
|
+
* |--------------------|----------|----------|--------------------------|
|
|
156
|
+
* | `civility` | `string` | Yes | Mr, Mrs, Ms, etc. |
|
|
157
|
+
* | `firstName` | `string` | Yes | First name |
|
|
158
|
+
* | `lastName` | `string` | Yes | Last name |
|
|
159
|
+
* | `phone` | `string` | No | Phone number |
|
|
160
|
+
* | `customFieldValues`| `object` | No | Custom field updates |
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* await client.customerUser.updateCustomerUser({
|
|
165
|
+
* civility: 'Mr',
|
|
166
|
+
* firstName: 'John',
|
|
167
|
+
* lastName: 'Smith',
|
|
168
|
+
* phone: '+1-555-987-6543',
|
|
169
|
+
* });
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @param params - Profile update data
|
|
173
|
+
* @param context - Optional SSR request context
|
|
174
|
+
* @throws {ValidationError} If required parameters are missing
|
|
175
|
+
* @returns Updated user profile
|
|
176
|
+
*/
|
|
177
|
+
async updateCustomerUser(params, context) {
|
|
178
|
+
this.required(params, ["civility", "firstName", "lastName"]);
|
|
179
|
+
return this.request({
|
|
180
|
+
method: "PUT",
|
|
181
|
+
path: endpoints_1.CustomerUserEndpoints.USERS,
|
|
182
|
+
body: {
|
|
183
|
+
civility: params.civility,
|
|
184
|
+
firstName: params.firstName,
|
|
185
|
+
lastName: params.lastName,
|
|
186
|
+
phone: params.phone,
|
|
187
|
+
customFieldValues: params.customFieldValues,
|
|
188
|
+
},
|
|
189
|
+
}, context);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Activate a user account with activation token.
|
|
193
|
+
*
|
|
194
|
+
* Completes the registration process after email verification.
|
|
195
|
+
*
|
|
196
|
+
* **Endpoint**: `POST /v1/shop/customer-users/activate [USR-103]`
|
|
197
|
+
*
|
|
198
|
+
* | Parameter | Type | Required | Description |
|
|
199
|
+
* |-----------|----------|----------|--------------------------|
|
|
200
|
+
* | `token` | `string` | Yes | Activation token from email |
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* // Token from URL: /activate?token=abc123
|
|
205
|
+
* await client.customerUser.activateCustomerUser({
|
|
206
|
+
* token: 'abc123',
|
|
207
|
+
* });
|
|
208
|
+
*
|
|
209
|
+
* console.log('Account activated!');
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* @param params - Activation token
|
|
213
|
+
* @param context - Optional SSR request context
|
|
214
|
+
* @throws {ValidationError} If token is missing
|
|
215
|
+
* @throws {SDKError} If token is invalid or expired
|
|
216
|
+
*/
|
|
217
|
+
async activateCustomerUser(params, context) {
|
|
218
|
+
this.required(params, ["token"]);
|
|
219
|
+
await this.request({
|
|
220
|
+
method: "POST",
|
|
221
|
+
path: endpoints_1.CustomerUserEndpoints.ACTIVATE,
|
|
222
|
+
body: { token: params.token },
|
|
223
|
+
}, context);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Get addresses accessible to the current user.
|
|
227
|
+
*
|
|
228
|
+
* **Endpoint**: `GET /v1/shop/customer-users/addresses [USR-104]`
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```typescript
|
|
232
|
+
* const addresses = await client.customerUser.getCustomerUserAddresses();
|
|
233
|
+
*
|
|
234
|
+
* addresses.forEach(addr => {
|
|
235
|
+
* console.log(`${addr.label}: ${addr.city}, ${addr.country}`);
|
|
236
|
+
* });
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* @param params - Optional query parameters
|
|
240
|
+
* @param context - Optional SSR request context
|
|
241
|
+
* @returns List of accessible addresses
|
|
242
|
+
*/
|
|
243
|
+
async getCustomerUserAddresses(params = {}, context) {
|
|
244
|
+
return this.request({
|
|
245
|
+
method: "GET",
|
|
246
|
+
path: endpoints_1.CustomerUserEndpoints.ADDRESSES,
|
|
247
|
+
params: this.buildParams(params),
|
|
248
|
+
}, context);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Get organisations the user belongs to.
|
|
252
|
+
*
|
|
253
|
+
* **Endpoint**: `GET /v1/shop/customer-users/organisations [USR-105]`
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* ```typescript
|
|
257
|
+
* const organisations = await client.customerUser.getCustomerUserOrganisations();
|
|
258
|
+
*
|
|
259
|
+
* organisations.forEach(org => {
|
|
260
|
+
* console.log(`${org.name} (${org.externalId})`);
|
|
261
|
+
* });
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
264
|
+
* @param context - Optional SSR request context
|
|
265
|
+
* @returns List of user's organisations
|
|
266
|
+
*/
|
|
267
|
+
async getCustomerUserOrganisations(context) {
|
|
268
|
+
return this.request({
|
|
269
|
+
method: "GET",
|
|
270
|
+
path: endpoints_1.CustomerUserEndpoints.ORGANISATIONS,
|
|
271
|
+
}, context);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Resend activation email to a user.
|
|
275
|
+
*
|
|
276
|
+
* **Endpoint**: `POST /v1/shop/customer-users/resend-activation [USR-106]`
|
|
277
|
+
*
|
|
278
|
+
* | Parameter | Type | Required | Description |
|
|
279
|
+
* |---------------|----------|----------|--------------------------|
|
|
280
|
+
* | `token` | `string` | Yes | User's registration token|
|
|
281
|
+
* | `redirectUrl` | `string` | No | Custom activation URL |
|
|
282
|
+
*
|
|
283
|
+
* @param params - Resend request data
|
|
284
|
+
* @param context - Optional SSR request context
|
|
285
|
+
* @throws {ValidationError} If token is missing
|
|
286
|
+
*/
|
|
287
|
+
async sendCustomerUserActivationRequest(params, context) {
|
|
288
|
+
this.required(params, ["token"]);
|
|
289
|
+
await this.request({
|
|
290
|
+
method: "POST",
|
|
291
|
+
path: endpoints_1.CustomerUserEndpoints.RESEND_ACTIVATION,
|
|
292
|
+
body: {
|
|
293
|
+
redirectUrl: params.redirectUrl,
|
|
294
|
+
token: params.token,
|
|
295
|
+
},
|
|
296
|
+
}, context);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Update another user's profile (admin function).
|
|
300
|
+
*
|
|
301
|
+
* **Endpoint**: `PUT /v1/shop/customer-users/{userId} [USR-107]`
|
|
302
|
+
*
|
|
303
|
+
* | Parameter | Type | Required | Description |
|
|
304
|
+
* |------------------|----------|----------|--------------------------|
|
|
305
|
+
* | `userToUpdateId` | `string` | Yes | User ID to update |
|
|
306
|
+
* | `civility` | `string` | Yes | Mr, Mrs, Ms, etc. |
|
|
307
|
+
* | `firstName` | `string` | Yes | First name |
|
|
308
|
+
* | `lastName` | `string` | Yes | Last name |
|
|
309
|
+
* | `idType` | `string` | No | ID type (id, externalId) |
|
|
310
|
+
* | `groups` | `array` | No | Updated groups/roles |
|
|
311
|
+
*
|
|
312
|
+
* @param params - User update data
|
|
313
|
+
* @param context - Optional SSR request context
|
|
314
|
+
* @throws {ValidationError} If required parameters are missing
|
|
315
|
+
* @throws {AuthError} If user lacks permission
|
|
316
|
+
*/
|
|
317
|
+
async updateSpecificCustomerUser(params, context) {
|
|
318
|
+
this.required(params, [
|
|
319
|
+
"userToUpdateId",
|
|
320
|
+
"civility",
|
|
321
|
+
"firstName",
|
|
322
|
+
"lastName",
|
|
323
|
+
]);
|
|
324
|
+
await this.request({
|
|
325
|
+
method: "PUT",
|
|
326
|
+
path: this.buildPath(endpoints_1.CustomerUserEndpoints.USER, {
|
|
327
|
+
userToUpdateId: params.userToUpdateId,
|
|
328
|
+
}),
|
|
329
|
+
params: this.buildParams({ idType: params.idType }),
|
|
330
|
+
body: {
|
|
331
|
+
civility: params.civility,
|
|
332
|
+
firstName: params.firstName,
|
|
333
|
+
lastName: params.lastName,
|
|
334
|
+
phone: params.phone,
|
|
335
|
+
groups: params.groups,
|
|
336
|
+
customFieldValues: params.customFieldValues,
|
|
337
|
+
},
|
|
338
|
+
}, context);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Remove a user from customer accounts.
|
|
342
|
+
*
|
|
343
|
+
* **Endpoint**: `DELETE /v1/shop/customer-users/{userId}/accounts [USR-108]`
|
|
344
|
+
*
|
|
345
|
+
* | Parameter | Type | Required | Description |
|
|
346
|
+
* |------------------|----------|----------|--------------------------|
|
|
347
|
+
* | `userToUpdateId` | `string` | Yes | User ID |
|
|
348
|
+
* | `accountIds` | `array` | Yes | Account IDs to remove |
|
|
349
|
+
* | `idType` | `string` | No | ID type |
|
|
350
|
+
*
|
|
351
|
+
* @param params - Removal data
|
|
352
|
+
* @param context - Optional SSR request context
|
|
353
|
+
* @throws {ValidationError} If required parameters are missing
|
|
354
|
+
*/
|
|
355
|
+
async removeAccountsFromCustomerUser(params, context) {
|
|
356
|
+
this.required(params, ["userToUpdateId", "accountIds"]);
|
|
357
|
+
await this.request({
|
|
358
|
+
method: "DELETE",
|
|
359
|
+
path: this.buildPath(endpoints_1.CustomerUserEndpoints.USER_ACCOUNTS, {
|
|
360
|
+
userToUpdateId: params.userToUpdateId,
|
|
361
|
+
}),
|
|
362
|
+
params: this.buildParams({ idType: params.idType }),
|
|
363
|
+
body: params.accountIds,
|
|
364
|
+
}, context);
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Add a user to customer accounts.
|
|
368
|
+
*
|
|
369
|
+
* **Endpoint**: `PATCH /v1/shop/customer-users/{userId}/accounts [USR-109]`
|
|
370
|
+
*
|
|
371
|
+
* | Parameter | Type | Required | Description |
|
|
372
|
+
* |------------------|----------|----------|--------------------------|
|
|
373
|
+
* | `userToUpdateId` | `string` | Yes | User ID |
|
|
374
|
+
* | `accountIds` | `array` | Yes | Account IDs to add |
|
|
375
|
+
* | `idType` | `string` | No | ID type |
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* ```typescript
|
|
379
|
+
* await client.customerUser.addCustomerUserToAccounts({
|
|
380
|
+
* userToUpdateId: 'user-123',
|
|
381
|
+
* accountIds: ['account-456', 'account-789'],
|
|
382
|
+
* });
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
* @param params - Addition data
|
|
386
|
+
* @param context - Optional SSR request context
|
|
387
|
+
* @throws {ValidationError} If required parameters are missing
|
|
388
|
+
*/
|
|
389
|
+
async addCustomerUserToAccounts(params, context) {
|
|
390
|
+
this.required(params, ["userToUpdateId", "accountIds"]);
|
|
391
|
+
await this.request({
|
|
392
|
+
method: "PATCH",
|
|
393
|
+
path: this.buildPath(endpoints_1.CustomerUserEndpoints.USER_ACCOUNTS, {
|
|
394
|
+
userToUpdateId: params.userToUpdateId,
|
|
395
|
+
}),
|
|
396
|
+
params: this.buildParams({ idType: params.idType }),
|
|
397
|
+
body: params.accountIds,
|
|
398
|
+
}, context);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
exports.CustomerUserService = CustomerUserService;
|
|
402
|
+
//# sourceMappingURL=customer-user.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-user.service.js","sourceRoot":"","sources":["../../../src/services/customer-user/customer-user.service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,kDAA8C;AAE9C,2CAAoD;AAiBpD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,mBAAoB,SAAQ,0BAAW;IAApD;;QACW,gBAAW,GAAG,eAAe,CAAC;IAsazC,CAAC;IApaC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iCAAqB,CAAC,kBAAkB;SAC/C,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,KAAK,CAAC,kBAAkB,CACtB,MAAgC,EAChC,OAAwB;QAExB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACpB,UAAU;YACV,WAAW;YACX,UAAU;YACV,OAAO;YACP,UAAU;YACV,QAAQ;SACT,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,M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;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,yBAAyB,CAC7B,MAA+B,EAC/B,OAAwB;QAExB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;QAExD,MAAM,IAAI,CAAC,OAAO,CAChB;YACE,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,iCAAqB,CAAC,aAAa,EAAE;gBACxD,cAAc,EAAE,MAAM,CAAC,cAAc;aACtC,CAAC;YACF,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;YACnD,IAAI,EAAE,MAAM,CAAC,UAAU;SACxB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAvaD,kDAuaC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { CustomFieldValueRequest } from "../../interfaces/models/custom-field";
|
|
2
|
+
import { CivilityType, UserInfoDto, UserStatus } from "../../interfaces/models/customer-user";
|
|
3
|
+
import { CustomerOrganisationDto } from "../../interfaces/models/customer-organisation";
|
|
4
|
+
import { AddressDto } from "../../interfaces/models/address";
|
|
5
|
+
import { AccountIdType } from "../../interfaces/models/customer-account";
|
|
6
|
+
import { IdType } from "../../interfaces/models/common";
|
|
7
|
+
/**
|
|
8
|
+
* Requests parameters type definitions
|
|
9
|
+
*/
|
|
10
|
+
export interface CreateCustomerUserParameters {
|
|
11
|
+
activationUrl?: string;
|
|
12
|
+
civility: CivilityType;
|
|
13
|
+
customFieldValues?: CustomFieldValueRequest[];
|
|
14
|
+
email?: string;
|
|
15
|
+
externalId?: string;
|
|
16
|
+
firstName: string;
|
|
17
|
+
groups?: string[];
|
|
18
|
+
lastName: string;
|
|
19
|
+
mainOrganisationId?: string;
|
|
20
|
+
organisations?: string[];
|
|
21
|
+
password: string;
|
|
22
|
+
phone?: string;
|
|
23
|
+
status?: UserStatus;
|
|
24
|
+
}
|
|
25
|
+
export interface UpdateCustomerUserParameters {
|
|
26
|
+
civility: CivilityType;
|
|
27
|
+
customFieldValues?: CustomFieldValueRequest[];
|
|
28
|
+
firstName: string;
|
|
29
|
+
lastName: string;
|
|
30
|
+
phone?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ActivateCustomerUserParameters {
|
|
33
|
+
token: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GetCustomerUserAddressesParameters {
|
|
36
|
+
shipping?: boolean;
|
|
37
|
+
billing?: boolean;
|
|
38
|
+
account?: boolean;
|
|
39
|
+
organisationIds?: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface SendCustomerUserActivationRequestParameters {
|
|
42
|
+
redirectUrl?: string;
|
|
43
|
+
token: string;
|
|
44
|
+
}
|
|
45
|
+
export interface UpdateSpecificCustomerUserParameters {
|
|
46
|
+
userToUpdateId: string;
|
|
47
|
+
idType?: IdType;
|
|
48
|
+
civility: CivilityType;
|
|
49
|
+
customFieldValues?: CustomFieldValueRequest[];
|
|
50
|
+
firstName: string;
|
|
51
|
+
lastName: string;
|
|
52
|
+
phone?: string;
|
|
53
|
+
groups?: string[];
|
|
54
|
+
}
|
|
55
|
+
export interface RemoveAccountsFromCustomerUserParameters {
|
|
56
|
+
userToUpdateId: string;
|
|
57
|
+
idType?: AccountIdType;
|
|
58
|
+
accountIds: string[];
|
|
59
|
+
}
|
|
60
|
+
export interface AddCustomerUserToAccountsParameters {
|
|
61
|
+
userToUpdateId: string;
|
|
62
|
+
idType?: AccountIdType;
|
|
63
|
+
accountIds: string[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Responses type definitions
|
|
67
|
+
*/
|
|
68
|
+
export interface CreateCustomerUserResponse {
|
|
69
|
+
createdAt: string;
|
|
70
|
+
id: string;
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
}
|
|
73
|
+
export interface UpdateCustomerUserResponse {
|
|
74
|
+
createdAt: string;
|
|
75
|
+
id: string;
|
|
76
|
+
updatedAt: string;
|
|
77
|
+
}
|
|
78
|
+
export interface GetCustomerUserAddressesResponse extends Array<AddressDto> {
|
|
79
|
+
}
|
|
80
|
+
export interface GetAuthenticatedUserResponse extends UserInfoDto {
|
|
81
|
+
}
|
|
82
|
+
export interface GetCustomerUserOrganisationsResponse extends Array<CustomerOrganisationDto> {
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/services/customer-user/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD;;GAEG;AAEH,MAAM,WAAW,4BAA4B;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;CAC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AAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gCAAiC,SAAQ,KAAK,CAAC,UAAU,CAAC;CAAG;AAE9E,MAAM,WAAW,4BAA6B,SAAQ,WAAW;CAAG;AAEpE,MAAM,WAAW,oCACf,SAAQ,KAAK,CAAC,uBAAuB,CAAC;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../src/services/customer-user/definitions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DJUST SDK Customer User Service - Endpoints
|
|
3
|
+
* API endpoint constants for customer user operations.
|
|
4
|
+
*
|
|
5
|
+
* @module services/customer-user/endpoints
|
|
6
|
+
* @since 2.17.0
|
|
7
|
+
*/
|
|
8
|
+
export declare const CustomerUserEndpoints: {
|
|
9
|
+
readonly AUTHENTICATED_USER: "/v1/authenticated-user";
|
|
10
|
+
readonly USERS: "/v1/shop/customer-users";
|
|
11
|
+
readonly USER: "/v1/shop/customer-users/{userToUpdateId}";
|
|
12
|
+
readonly ACTIVATE: "/v1/shop/customer-users/activate";
|
|
13
|
+
readonly ADDRESSES: "/v1/shop/customer-users/addresses";
|
|
14
|
+
readonly ORGANISATIONS: "/v1/shop/customer-users/organisations";
|
|
15
|
+
readonly RESEND_ACTIVATION: "/v1/shop/customer-users/resend-activation-request";
|
|
16
|
+
readonly USER_ACCOUNTS: "/v1/shop/customer-users/{userToUpdateId}/customer-accounts";
|
|
17
|
+
};
|
|
18
|
+
export type CustomerUserEndpoint = (typeof CustomerUserEndpoints)[keyof typeof CustomerUserEndpoints];
|
|
19
|
+
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../src/services/customer-user/endpoints.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;CASxB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DJUST SDK Customer User Service - Endpoints
|
|
4
|
+
* API endpoint constants for customer user operations.
|
|
5
|
+
*
|
|
6
|
+
* @module services/customer-user/endpoints
|
|
7
|
+
* @since 2.17.0
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CustomerUserEndpoints = void 0;
|
|
11
|
+
exports.CustomerUserEndpoints = {
|
|
12
|
+
AUTHENTICATED_USER: "/v1/authenticated-user",
|
|
13
|
+
USERS: "/v1/shop/customer-users",
|
|
14
|
+
USER: "/v1/shop/customer-users/{userToUpdateId}",
|
|
15
|
+
ACTIVATE: "/v1/shop/customer-users/activate",
|
|
16
|
+
ADDRESSES: "/v1/shop/customer-users/addresses",
|
|
17
|
+
ORGANISATIONS: "/v1/shop/customer-users/organisations",
|
|
18
|
+
RESEND_ACTIVATION: "/v1/shop/customer-users/resend-activation-request",
|
|
19
|
+
USER_ACCOUNTS: "/v1/shop/customer-users/{userToUpdateId}/customer-accounts",
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../src/services/customer-user/endpoints.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEU,QAAA,qBAAqB,GAAG;IACnC,kBAAkB,EAAE,wBAAwB;IAC5C,KAAK,EAAE,yBAAyB;IAChC,IAAI,EAAE,0CAA0C;IAChD,QAAQ,EAAE,kCAAkC;IAC5C,SAAS,EAAE,mCAAmC;IAC9C,aAAa,EAAE,uCAAuC;IACtD,iBAAiB,EAAE,mDAAmD;IACtE,aAAa,EAAE,4DAA4D;CACnE,CAAC"}
|