@daffodil/customer 0.50.0 → 0.51.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/README.md +1 -1
- package/driver/errors/address-not-found.d.ts +10 -0
- package/driver/errors/codes.d.ts +6 -0
- package/driver/errors/default-billing-address-deletion.d.ts +10 -0
- package/driver/errors/default-shipping-address-deletion.d.ts +10 -0
- package/driver/errors/map.d.ts +6 -0
- package/driver/errors/public_api.d.ts +4 -0
- package/driver/in-memory/backend/address.service.d.ts +37 -0
- package/driver/in-memory/driver/address.service.d.ts +26 -0
- package/driver/in-memory/public_api.d.ts +2 -0
- package/driver/interfaces/address-service.interface.d.ts +33 -0
- package/driver/magento/address.service.d.ts +27 -0
- package/driver/magento/errors/map.d.ts +3 -0
- package/driver/magento/errors/transform.d.ts +9 -1
- package/driver/magento/models/requests/address-attribute-input.type.d.ts +4 -0
- package/driver/magento/models/requests/address-input.type.d.ts +22 -0
- package/driver/magento/models/requests/address-region-input.type.d.ts +8 -0
- package/driver/magento/models/requests/public_api.d.ts +3 -0
- package/driver/magento/models/responses/create-customer-address.type.d.ts +4 -0
- package/driver/magento/models/responses/customer-address.type.d.ts +4 -2
- package/driver/magento/models/responses/delete-customer-address.type.d.ts +3 -0
- package/driver/magento/models/responses/get-customer-addresses.type.d.ts +4 -0
- package/driver/magento/models/responses/public_api.d.ts +4 -0
- package/driver/magento/models/responses/update-customer-address.type.d.ts +4 -0
- package/driver/magento/queries/create-customer-address.d.ts +1 -0
- package/driver/magento/queries/delete-customer-address.d.ts +1 -0
- package/driver/magento/queries/get-customer-addresses.d.ts +2 -0
- package/driver/magento/queries/public_api.d.ts +4 -0
- package/driver/magento/queries/update-customer-address.d.ts +1 -0
- package/driver/magento/testing/factories/address.factory.d.ts +3 -1
- package/driver/magento/transforms/requests/address-input.d.ts +3 -0
- package/driver/magento/transforms/requests/public_api.d.ts +1 -0
- package/driver/magento/validators/create-customer-address.d.ts +3 -0
- package/driver/magento/validators/delete-customer-address.d.ts +3 -0
- package/driver/magento/validators/get-customer-addresses.d.ts +3 -0
- package/driver/magento/validators/public_api.d.ts +7 -0
- package/driver/magento/validators/update-customer-address.d.ts +3 -0
- package/driver/public_api.d.ts +1 -0
- package/driver/testing/drivers/address.service.d.ts +23 -0
- package/driver/testing/drivers/public_api.d.ts +1 -0
- package/esm2020/driver/errors/address-not-found.mjs +13 -0
- package/esm2020/driver/errors/codes.mjs +11 -0
- package/esm2020/driver/errors/default-billing-address-deletion.mjs +13 -0
- package/esm2020/driver/errors/default-shipping-address-deletion.mjs +13 -0
- package/esm2020/driver/errors/map.mjs +7 -1
- package/esm2020/driver/errors/public_api.mjs +5 -1
- package/esm2020/driver/in-memory/backend/address.service.mjs +110 -0
- package/esm2020/driver/in-memory/driver/address.service.mjs +42 -0
- package/esm2020/driver/in-memory/driver/customer-driver.module.mjs +6 -2
- package/esm2020/driver/in-memory/public_api.mjs +3 -1
- package/esm2020/driver/interfaces/address-service.interface.mjs +6 -0
- package/esm2020/driver/magento/address.service.mjs +91 -0
- package/esm2020/driver/magento/customer-driver.module.mjs +13 -3
- package/esm2020/driver/magento/errors/map.mjs +6 -0
- package/esm2020/driver/magento/errors/transform.mjs +28 -4
- package/esm2020/driver/magento/models/requests/address-attribute-input.type.mjs +2 -0
- package/esm2020/driver/magento/models/requests/address-input.type.mjs +2 -0
- package/esm2020/driver/magento/models/requests/address-region-input.type.mjs +2 -0
- package/esm2020/driver/magento/models/requests/public_api.mjs +1 -1
- package/esm2020/driver/magento/models/responses/create-customer-address.type.mjs +2 -0
- package/esm2020/driver/magento/models/responses/customer-address.type.mjs +1 -1
- package/esm2020/driver/magento/models/responses/delete-customer-address.type.mjs +2 -0
- package/esm2020/driver/magento/models/responses/get-customer-addresses.type.mjs +2 -0
- package/esm2020/driver/magento/models/responses/public_api.mjs +1 -1
- package/esm2020/driver/magento/models/responses/update-customer-address.type.mjs +2 -0
- package/esm2020/driver/magento/queries/create-customer-address.mjs +11 -0
- package/esm2020/driver/magento/queries/delete-customer-address.mjs +7 -0
- package/esm2020/driver/magento/queries/fragments/customer-address.mjs +4 -2
- package/esm2020/driver/magento/queries/get-customer-addresses.mjs +14 -0
- package/esm2020/driver/magento/queries/public_api.mjs +5 -1
- package/esm2020/driver/magento/queries/update-customer-address.mjs +11 -0
- package/esm2020/driver/magento/testing/factories/address.factory.mjs +4 -2
- package/esm2020/driver/magento/transforms/requests/address-input.mjs +22 -0
- package/esm2020/driver/magento/transforms/requests/public_api.mjs +2 -1
- package/esm2020/driver/magento/transforms/responses/customer-address.mjs +6 -3
- package/esm2020/driver/magento/validators/create-customer-address.mjs +10 -0
- package/esm2020/driver/magento/validators/delete-customer-address.mjs +10 -0
- package/esm2020/driver/magento/validators/get-customer-addresses.mjs +10 -0
- package/esm2020/driver/magento/validators/public_api.mjs +8 -1
- package/esm2020/driver/magento/validators/update-customer-address.mjs +10 -0
- package/esm2020/driver/public_api.mjs +2 -1
- package/esm2020/driver/testing/drivers/address.service.mjs +40 -0
- package/esm2020/driver/testing/drivers/customer-driver.module.mjs +7 -2
- package/esm2020/driver/testing/drivers/public_api.mjs +2 -1
- package/esm2020/models/address.type.mjs +1 -1
- package/esm2020/state/actions/address.actions.mjs +175 -0
- package/esm2020/state/actions/public_api.mjs +3 -0
- package/esm2020/state/customer.module.mjs +4 -1
- package/esm2020/state/effects/address.effects.mjs +45 -0
- package/esm2020/state/facades/address/facade.mjs +41 -0
- package/esm2020/state/facades/address/interface.mjs +2 -0
- package/esm2020/state/facades/public_api.mjs +2 -1
- package/esm2020/state/models/address.type.mjs +2 -0
- package/esm2020/state/models/public_api.mjs +2 -0
- package/esm2020/state/public_api.mjs +3 -2
- package/esm2020/state/reducers/address/initial-state.mjs +6 -0
- package/esm2020/state/reducers/address/public_api.mjs +3 -0
- package/esm2020/state/reducers/address/reducer.mjs +32 -0
- package/esm2020/state/reducers/address/type.mjs +2 -0
- package/esm2020/state/reducers/address-entities/adapter.mjs +10 -0
- package/esm2020/state/reducers/address-entities/public_api.mjs +3 -0
- package/esm2020/state/reducers/address-entities/reducer.mjs +43 -0
- package/esm2020/state/reducers/customer/adapter.mjs +15 -1
- package/esm2020/state/reducers/customer/reducer.mjs +20 -17
- package/esm2020/state/reducers/public_api.mjs +3 -1
- package/esm2020/state/reducers/reducers.interface.mjs +1 -1
- package/esm2020/state/reducers/token/reducers.token.mjs +5 -1
- package/esm2020/state/selectors/address/selector.mjs +23 -0
- package/esm2020/state/selectors/customer/selector.mjs +20 -0
- package/esm2020/state/selectors/feature.selector.mjs +1 -1
- package/esm2020/state/selectors/public_api.mjs +4 -2
- package/esm2020/state/testing/customer-testing.module.mjs +5 -2
- package/esm2020/state/testing/factories/customer-address.factory.mjs +32 -0
- package/esm2020/state/testing/factories/public_api.mjs +2 -0
- package/esm2020/state/testing/mock-address-facade.mjs +28 -0
- package/esm2020/state/testing/public_api.mjs +3 -1
- package/esm2020/testing/factories/customer-address.factory.mjs +3 -1
- package/fesm2015/daffodil-customer-driver-in-memory.mjs +145 -2
- package/fesm2015/daffodil-customer-driver-in-memory.mjs.map +1 -1
- package/fesm2015/daffodil-customer-driver-magento-testing.mjs +3 -1
- package/fesm2015/daffodil-customer-driver-magento-testing.mjs.map +1 -1
- package/fesm2015/daffodil-customer-driver-magento.mjs +227 -8
- package/fesm2015/daffodil-customer-driver-magento.mjs.map +1 -1
- package/fesm2015/daffodil-customer-driver-testing.mjs +41 -2
- package/fesm2015/daffodil-customer-driver-testing.mjs.map +1 -1
- package/fesm2015/daffodil-customer-driver.mjs +52 -1
- package/fesm2015/daffodil-customer-driver.mjs.map +1 -1
- package/fesm2015/daffodil-customer-state-testing.mjs +59 -3
- package/fesm2015/daffodil-customer-state-testing.mjs.map +1 -1
- package/fesm2015/daffodil-customer-state.mjs +378 -17
- package/fesm2015/daffodil-customer-state.mjs.map +1 -1
- package/fesm2015/daffodil-customer-testing.mjs +2 -0
- package/fesm2015/daffodil-customer-testing.mjs.map +1 -1
- package/fesm2020/daffodil-customer-driver-in-memory.mjs +148 -2
- package/fesm2020/daffodil-customer-driver-in-memory.mjs.map +1 -1
- package/fesm2020/daffodil-customer-driver-magento-testing.mjs +3 -1
- package/fesm2020/daffodil-customer-driver-magento-testing.mjs.map +1 -1
- package/fesm2020/daffodil-customer-driver-magento.mjs +223 -8
- package/fesm2020/daffodil-customer-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-customer-driver-testing.mjs +41 -2
- package/fesm2020/daffodil-customer-driver-testing.mjs.map +1 -1
- package/fesm2020/daffodil-customer-driver.mjs +52 -1
- package/fesm2020/daffodil-customer-driver.mjs.map +1 -1
- package/fesm2020/daffodil-customer-state-testing.mjs +59 -3
- package/fesm2020/daffodil-customer-state-testing.mjs.map +1 -1
- package/fesm2020/daffodil-customer-state.mjs +387 -17
- package/fesm2020/daffodil-customer-state.mjs.map +1 -1
- package/fesm2020/daffodil-customer-testing.mjs +2 -0
- package/fesm2020/daffodil-customer-testing.mjs.map +1 -1
- package/models/address.type.d.ts +8 -0
- package/package.json +4 -4
- package/state/actions/address.actions.d.ts +166 -0
- package/state/actions/public_api.d.ts +2 -0
- package/state/effects/address.effects.d.ts +31 -0
- package/state/facades/address/facade.d.ts +28 -0
- package/state/facades/address/interface.d.ts +14 -0
- package/state/facades/public_api.d.ts +2 -0
- package/state/models/address.type.d.ts +3 -0
- package/state/models/public_api.d.ts +1 -0
- package/state/public_api.d.ts +2 -1
- package/state/reducers/address/initial-state.d.ts +5 -0
- package/state/reducers/address/public_api.d.ts +3 -0
- package/state/reducers/address/reducer.d.ts +7 -0
- package/state/reducers/address/type.d.ts +5 -0
- package/state/reducers/address-entities/adapter.d.ts +6 -0
- package/state/reducers/address-entities/public_api.d.ts +2 -0
- package/state/reducers/address-entities/reducer.d.ts +12 -0
- package/state/reducers/customer/adapter.d.ts +5 -0
- package/state/reducers/customer/reducer.d.ts +2 -2
- package/state/reducers/public_api.d.ts +2 -0
- package/state/reducers/reducers.interface.d.ts +9 -5
- package/state/reducers/token/extra.token.d.ts +1 -1
- package/state/reducers/token/reducers.token.d.ts +1 -1
- package/state/selectors/address/selector.d.ts +15 -0
- package/state/selectors/{customer.selector.d.ts → customer/selector.d.ts} +1 -1
- package/state/selectors/feature.selector.d.ts +4 -4
- package/state/selectors/public_api.d.ts +3 -1
- package/state/testing/factories/customer-address.factory.d.ts +21 -0
- package/state/testing/factories/public_api.d.ts +1 -0
- package/state/testing/mock-address-facade.d.ts +19 -0
- package/state/testing/public_api.d.ts +2 -0
- package/testing/factories/customer-address.factory.d.ts +2 -0
- package/esm2020/state/selectors/customer.selector.mjs +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-customer-driver-magento.mjs","sources":["../../../libs/customer/driver/magento/src/transforms/requests/customer-input.ts","../../../libs/customer/driver/magento/src/transforms/responses/customer-address.ts","../../../libs/customer/driver/magento/src/transforms/responses/customer.ts","../../../libs/customer/driver/magento/src/models/gender.enum.ts","../../../libs/customer/driver/magento/src/queries/fragments/customer-address.ts","../../../libs/customer/driver/magento/src/queries/fragments/customer.ts","../../../libs/customer/driver/magento/src/queries/get-customer.ts","../../../libs/customer/driver/magento/src/queries/update-customer.ts","../../../libs/customer/driver/magento/src/queries/update-email.ts","../../../libs/customer/driver/magento/src/queries/change-password.ts","../../../libs/customer/driver/magento/src/errors/transform.ts","../../../libs/customer/driver/magento/src/validators/get-customer.ts","../../../libs/customer/driver/magento/src/validators/change-email.ts","../../../libs/customer/driver/magento/src/validators/change-password.ts","../../../libs/customer/driver/magento/src/validators/update-customer.ts","../../../libs/customer/driver/magento/src/customer.service.ts","../../../libs/customer/driver/magento/src/customer-driver.module.ts","../../../libs/customer/driver/magento/src/daffodil-customer-driver-magento.ts"],"sourcesContent":["import { DaffCustomer } from '@daffodil/customer';\n\nimport { MagentoCustomerInput } from '../../models/public_api';\n\nexport const magentoCustomerInputTransform = (customer: Partial<DaffCustomer>): MagentoCustomerInput => ({\n firstname: customer.firstName,\n lastname: customer.lastName,\n is_subscribed: customer.isSubscribed,\n});\n","import { DaffCustomerAddress } from '@daffodil/customer';\n\nimport { MagentoCustomerAddress } from '../../models/public_api';\n\nexport const magentoCustomerAddressTransform = (address: MagentoCustomerAddress): DaffCustomerAddress => ({\n id: address.id,\n street: address.street[0],\n city: address.city,\n region: address.region.region_code,\n country: address.country_code,\n country_id: address.country_code,\n postcode: address.postcode,\n firstname: address.firstname,\n lastname: address.lastname,\n telephone: address.telephone,\n email: address.email,\n});\n","import { DaffCustomer } from '@daffodil/customer';\n\nimport { MagentoCustomer } from '../../models/public_api';\nimport { magentoCustomerAddressTransform } from './customer-address';\n\nexport const magentoCustomerTransform = (customer: MagentoCustomer): DaffCustomer => ({\n id: customer.email,\n email: customer.email,\n firstName: customer.firstname,\n lastName: customer.lastname,\n isSubscribed: customer.is_subscribed,\n addresses: customer.addresses.map(magentoCustomerAddressTransform),\n});\n","export enum MagentoCustomerGender {\n MALE = 1,\n FEMALE = 2\n}\n","import { gql } from 'apollo-angular';\n\nexport const magentoCustomerAddressFragment = gql`\n fragment magentoCustomerAddress on CustomerAddress {\n id\n city\n country_code\n firstname\n lastname\n postcode\n region {\n region_code\n region\n }\n street\n telephone\n company\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerAddressFragment } from './customer-address';\n\nexport const magentoCustomerFragment = gql`\n fragment magentoCustomer on Customer {\n email\n firstname\n lastname\n is_subscribed\n addresses {\n ...magentoCustomerAddress\n }\n }\n ${magentoCustomerAddressFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_CUSTOMER_QUERY_NAME = 'MagentoGetCustomer';\n\nexport const getCustomer = gql`\n query ${MAGENTO_GET_CUSTOMER_QUERY_NAME} {\n customer {\n ...magentoCustomer\n }\n }\n ${magentoCustomerFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerFragment } from './fragments/public_api';\n\nexport const MAGENTO_UPDATE_CUSTOMER_QUERY_NAME = 'MagentoUpdateCustomer';\n\nexport const updateCustomer = gql`\n mutation ${MAGENTO_UPDATE_CUSTOMER_QUERY_NAME}($customer: CustomerUpdateInput!) {\n updateCustomerV2(input: $customer) {\n customer {\n ...magentoCustomer\n }\n }\n }\n ${magentoCustomerFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerFragment } from './fragments/public_api';\n\nexport const MAGENTO_UPDATE_EMAIL_QUERY_NAME = 'MagentoUpdateEmail';\n\nexport const updateEmail = gql`\n mutation ${MAGENTO_UPDATE_EMAIL_QUERY_NAME}($email: String!, $password: String!) {\n updateCustomerEmail(email: $email, password: $password) {\n customer {\n ...magentoCustomer\n }\n }\n }\n ${magentoCustomerFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nexport const MAGENTO_CHANGE_PASSWORD_QUERY_NAME = 'MagentoChangePassword';\n\nexport const changePassword = gql`\n mutation ${MAGENTO_CHANGE_PASSWORD_QUERY_NAME}($old: String!, $new: String!) {\n changeCustomerPassword(\n currentPassword: $old\n newPassword: $new\n ) {\n email\n }\n }\n`;\n","import { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nexport function transformMagentoReviewsError(error: any) {\n return daffTransformMagentoError(error, {}) || new DaffCustomerInvalidAPIResponseError(error.message);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoGetCustomerResponse } from '../models/public_api';\n\nexport const validateGetCustomerResponse = (response: ApolloQueryResult<MagentoGetCustomerResponse>) => {\n if (response.data.customer?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Get customer response does not contain a valid customer.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoChangeEmailResponse } from '../models/public_api';\n\nexport const validateChangeEmailResponse = (response: ApolloQueryResult<MagentoChangeEmailResponse>) => {\n if (response.data.updateCustomerEmail.customer?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Update email response does not contain a valid customer.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoChangePasswordResponse } from '../models/public_api';\n\nexport const validateChangePasswordResponse = (response: ApolloQueryResult<MagentoChangePasswordResponse>) => {\n if (response.data.changeCustomerPassword?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Change password response does not contain a valid customer.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoUpdateCustomerResponse } from '../models/public_api';\n\nexport const validateUpdateCustomerResponse = (response: ApolloQueryResult<MagentoUpdateCustomerResponse>) => {\n if (response.data.updateCustomerV2.customer?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Update customer response does not contain a valid customer.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCustomer } from '@daffodil/customer';\nimport { DaffCustomerDriverInterface } from '@daffodil/customer/driver';\n\nimport { transformMagentoReviewsError } from './errors/transform';\nimport {\n MagentoChangeEmailResponse,\n MagentoChangePasswordResponse,\n MagentoGetCustomerResponse,\n MagentoUpdateCustomerResponse,\n} from './models/public_api';\nimport {\n changePassword,\n getCustomer,\n updateCustomer,\n updateEmail,\n} from './queries/public_api';\nimport {\n magentoCustomerInputTransform,\n magentoCustomerTransform,\n} from './transforms/public_api';\nimport { validateChangeEmailResponse } from './validators/change-email';\nimport { validateChangePasswordResponse } from './validators/change-password';\nimport { validateGetCustomerResponse } from './validators/public_api';\nimport { validateUpdateCustomerResponse } from './validators/update-customer';\n\n/**\n * A service for making Magento GraphQL queries for customers.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerMagentoService implements DaffCustomerDriverInterface {\n constructor(\n private apollo: Apollo,\n ) {}\n\n changeEmail(email: string, password: string): Observable<DaffCustomer> {\n return this.apollo.mutate<MagentoChangeEmailResponse>({\n mutation: updateEmail,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateChangeEmailResponse),\n map(result => magentoCustomerTransform(result.data.updateCustomerEmail.customer)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n changePassword(oldPassword: string, newPassword: string): Observable<void> {\n return this.apollo.mutate<MagentoChangePasswordResponse>({\n mutation: changePassword,\n variables: {\n old: oldPassword,\n new: newPassword,\n },\n }).pipe(\n map(validateChangePasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n get(): Observable<DaffCustomer> {\n return this.apollo.query<MagentoGetCustomerResponse>({\n query: getCustomer,\n }).pipe(\n map(validateGetCustomerResponse),\n map(result => magentoCustomerTransform(result.data.customer)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n update(customer: Partial<DaffCustomer>): Observable<DaffCustomer> {\n return this.apollo.mutate<MagentoUpdateCustomerResponse>({\n mutation: updateCustomer,\n variables: {\n customer: magentoCustomerInputTransform(customer),\n },\n }).pipe(\n map(validateUpdateCustomerResponse),\n map(result => magentoCustomerTransform(result.data.updateCustomerV2.customer)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffCustomerDriver } from '@daffodil/customer/driver';\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from '@daffodil/driver/magento';\n\nimport { DaffCustomerMagentoService } from './customer.service';\nimport { MAGENTO_GET_CUSTOMER_QUERY_NAME } from './queries/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerMagentoDriverModule> {\n return {\n ngModule: DaffCustomerMagentoDriverModule,\n providers: [\n {\n provide: DaffCustomerDriver,\n useExisting: DaffCustomerMagentoService,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_CUSTOMER_QUERY_NAME,\n multi: true,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAIa,6BAA6B,GAAG,CAAC,QAA+B,MAA4B;IACvG,SAAS,EAAE,QAAQ,CAAC,SAAS;IAC7B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;IAC3B,aAAa,EAAE,QAAQ,CAAC,YAAY;AACrC,CAAA;;MCJY,+BAA+B,GAAG,CAAC,OAA+B,MAA2B;IACxG,EAAE,EAAE,OAAO,CAAC,EAAE;AACd,IAAA,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC,IAAI;AAClB,IAAA,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW;IAClC,OAAO,EAAE,OAAO,CAAC,YAAY;IAC7B,UAAU,EAAE,OAAO,CAAC,YAAY;IAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;IAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;IAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;AACrB,CAAA;;MCXY,wBAAwB,GAAG,CAAC,QAAyB,MAAoB;IACpF,EAAE,EAAE,QAAQ,CAAC,KAAK;IAClB,KAAK,EAAE,QAAQ,CAAC,KAAK;IACrB,SAAS,EAAE,QAAQ,CAAC,SAAS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AM;iBACnB,CAAA;;;MC1BY,+BAA+B,CAAA;AAC1C,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,+BAA+B;AACzC,YAAA,SAAS,EAAE;AACT,gBAAA;AACE,oBAAA,OAAO,EAAE,kBAAkB;AAC3B,oBAAA,WAAW,EAAE,0BAA0B;AACxC,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,iCAAiC;AAC1C,oBAAA,QAAQ,EAAE,+BAA+B;AACzC,oBAAA,KAAK,EAAE,IAAI;AACZ,iBAAA;AACF,aAAA;SACF,CAAC;KACH;;+IAhBU,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA/B,mBAAA,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,YAHxC,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,mBAAA,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,EAJjC,OAAA,EAAA,CAAA;YACP,YAAY;SACb,CAAA,EAAA,CAAA,CAAA;2FAEU,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAL3C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;iBACF,CAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-customer-driver-magento.mjs","sources":["../../../libs/customer/driver/magento/src/transforms/requests/customer-input.ts","../../../libs/customer/driver/magento/src/transforms/requests/address-input.ts","../../../libs/customer/driver/magento/src/transforms/responses/customer-address.ts","../../../libs/customer/driver/magento/src/transforms/responses/customer.ts","../../../libs/customer/driver/magento/src/models/gender.enum.ts","../../../libs/customer/driver/magento/src/queries/fragments/customer-address.ts","../../../libs/customer/driver/magento/src/queries/fragments/customer.ts","../../../libs/customer/driver/magento/src/queries/get-customer.ts","../../../libs/customer/driver/magento/src/queries/get-customer-addresses.ts","../../../libs/customer/driver/magento/src/queries/create-customer-address.ts","../../../libs/customer/driver/magento/src/queries/update-customer-address.ts","../../../libs/customer/driver/magento/src/queries/delete-customer-address.ts","../../../libs/customer/driver/magento/src/queries/update-customer.ts","../../../libs/customer/driver/magento/src/queries/update-email.ts","../../../libs/customer/driver/magento/src/queries/change-password.ts","../../../libs/customer/driver/magento/src/errors/map.ts","../../../libs/customer/driver/magento/src/errors/transform.ts","../../../libs/customer/driver/magento/src/validators/get-customer.ts","../../../libs/customer/driver/magento/src/validators/change-email.ts","../../../libs/customer/driver/magento/src/validators/change-password.ts","../../../libs/customer/driver/magento/src/validators/get-customer-addresses.ts","../../../libs/customer/driver/magento/src/validators/create-customer-address.ts","../../../libs/customer/driver/magento/src/validators/update-customer-address.ts","../../../libs/customer/driver/magento/src/validators/delete-customer-address.ts","../../../libs/customer/driver/magento/src/validators/update-customer.ts","../../../libs/customer/driver/magento/src/customer.service.ts","../../../libs/customer/driver/magento/src/address.service.ts","../../../libs/customer/driver/magento/src/customer-driver.module.ts","../../../libs/customer/driver/magento/src/daffodil-customer-driver-magento.ts"],"sourcesContent":["import { DaffCustomer } from '@daffodil/customer';\n\nimport { MagentoCustomerInput } from '../../models/public_api';\n\nexport const magentoCustomerInputTransform = (customer: Partial<DaffCustomer>): MagentoCustomerInput => ({\n firstname: customer.firstName,\n lastname: customer.lastName,\n is_subscribed: customer.isSubscribed,\n});\n","import { DaffCustomerAddress } from '@daffodil/customer';\n\nimport { MagentoCustomerAddressInput } from '../../models/public_api';\n\nexport const magentoCustomerAddressInputTransform = (address: Partial<DaffCustomerAddress>): MagentoCustomerAddressInput => ({\n city: address.city,\n country_code: address.country,\n country_id: address.country,\n default_billing: address.defaultBilling,\n default_shipping: address.defaultShipping,\n firstname: address.firstname,\n lastname: address.lastname,\n middlename: address.middlename,\n postcode: address.postcode,\n prefix: address.prefix,\n region: {\n region_id: Number(address.region),\n },\n street: [\n address.street,\n ...(address.street2 ? [address.street2] : []),\n ],\n suffix: address.suffix,\n telephone: address.telephone,\n});\n","import { DaffCustomerAddress } from '@daffodil/customer';\n\nimport { MagentoCustomerAddress } from '../../models/public_api';\n\nexport const magentoCustomerAddressTransform = (address: MagentoCustomerAddress): DaffCustomerAddress => ({\n id: String(address.id),\n street: address.street[0],\n city: address.city,\n region: String(address.region.region_id),\n region_code: address.region.region_code,\n country: address.country_code,\n country_id: address.country_code,\n postcode: address.postcode,\n firstname: address.firstname,\n lastname: address.lastname,\n telephone: address.telephone,\n email: address.email,\n defaultBilling: address.default_billing,\n defaultShipping: address.default_shipping,\n});\n","import { DaffCustomer } from '@daffodil/customer';\n\nimport { MagentoCustomer } from '../../models/public_api';\nimport { magentoCustomerAddressTransform } from './customer-address';\n\nexport const magentoCustomerTransform = (customer: MagentoCustomer): DaffCustomer => ({\n id: customer.email,\n email: customer.email,\n firstName: customer.firstname,\n lastName: customer.lastname,\n isSubscribed: customer.is_subscribed,\n addresses: customer.addresses.map(magentoCustomerAddressTransform),\n});\n","export enum MagentoCustomerGender {\n MALE = 1,\n FEMALE = 2\n}\n","import { gql } from 'apollo-angular';\n\nexport const magentoCustomerAddressFragment = gql`\n fragment magentoCustomerAddress on CustomerAddress {\n id\n city\n country_code\n firstname\n lastname\n postcode\n region {\n region_code\n region_id\n }\n street\n telephone\n company\n default_billing\n default_shipping\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerAddressFragment } from './customer-address';\n\nexport const magentoCustomerFragment = gql`\n fragment magentoCustomer on Customer {\n email\n firstname\n lastname\n is_subscribed\n addresses {\n ...magentoCustomerAddress\n }\n }\n ${magentoCustomerAddressFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_CUSTOMER_QUERY_NAME = 'MagentoGetCustomer';\n\nexport const getCustomer = gql`\n query ${MAGENTO_GET_CUSTOMER_QUERY_NAME} {\n customer {\n ...magentoCustomer\n }\n }\n ${magentoCustomerFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerAddressFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_CUSTOMER_ADDRESSES_QUERY_NAME = 'MagentoGetCustomerAddresses';\n\nexport const getCustomerAddresses = gql`\n query ${MAGENTO_GET_CUSTOMER_ADDRESSES_QUERY_NAME} {\n customer {\n addresses {\n ...magentoCustomerAddress\n }\n }\n }\n ${magentoCustomerAddressFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerAddressFragment } from './fragments/public_api';\n\nexport const createCustomerAddress = gql`\n mutation MagentoCreateCustomerAddress($input: CustomerAddressInput!) {\n createCustomerAddress(input: $input) {\n ...magentoCustomerAddress\n }\n }\n ${magentoCustomerAddressFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerAddressFragment } from './fragments/public_api';\n\nexport const updateCustomerAddress = gql`\n mutation MagentoUpdateCustomerAddress($id: Int!, $input: CustomerAddressInput!) {\n updateCustomerAddress(id: $id, input: $input) {\n ...magentoCustomerAddress\n }\n }\n ${magentoCustomerAddressFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nexport const deleteCustomerAddress = gql`\n mutation MagentoDeleteCustomerAddress($id: Int!) {\n deleteCustomerAddress(id: $id)\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerFragment } from './fragments/public_api';\n\nexport const MAGENTO_UPDATE_CUSTOMER_QUERY_NAME = 'MagentoUpdateCustomer';\n\nexport const updateCustomer = gql`\n mutation ${MAGENTO_UPDATE_CUSTOMER_QUERY_NAME}($customer: CustomerUpdateInput!) {\n updateCustomerV2(input: $customer) {\n customer {\n ...magentoCustomer\n }\n }\n }\n ${magentoCustomerFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerFragment } from './fragments/public_api';\n\nexport const MAGENTO_UPDATE_EMAIL_QUERY_NAME = 'MagentoUpdateEmail';\n\nexport const updateEmail = gql`\n mutation ${MAGENTO_UPDATE_EMAIL_QUERY_NAME}($email: String!, $password: String!) {\n updateCustomerEmail(email: $email, password: $password) {\n customer {\n ...magentoCustomer\n }\n }\n }\n ${magentoCustomerFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nexport const MAGENTO_CHANGE_PASSWORD_QUERY_NAME = 'MagentoChangePassword';\n\nexport const changePassword = gql`\n mutation ${MAGENTO_CHANGE_PASSWORD_QUERY_NAME}($old: String!, $new: String!) {\n changeCustomerPassword(\n currentPassword: $old\n newPassword: $new\n ) {\n email\n }\n }\n`;\n","import { DaffCustomerDriverErrorCodes } from '@daffodil/customer/driver';\n\nexport const DaffCustomerMagentoErrorMessageRegexMap = {\n [DaffCustomerDriverErrorCodes.DEFAULT_SHIPPING_ADDRESS_DELETION]: /is set as default shipping address and can not be deleted/,\n [DaffCustomerDriverErrorCodes.DEFAULT_BILLING_ADDRESS_DELETION]: /is set as default billing address and can not be deleted/,\n};\n","import { ApolloError } from '@apollo/client/core';\nimport { GraphQLError } from 'graphql';\n\nimport { DaffError } from '@daffodil/core';\nimport {\n DaffCustomerDriverErrorMap,\n DaffCustomerInvalidAPIResponseError,\n} from '@daffodil/customer/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffCustomerMagentoErrorMessageRegexMap } from './map';\n\n/**\n * Transforms a single GraphQL error.\n * Optionally accepts a request payload which can be used in certain cases\n * to add supplemental info to the error.\n */\nexport function transformMagentoCartGraphQlError(error: GraphQLError, requestPayload?: unknown): DaffError {\n // TODO: readdress this when we move to eslint\n // eslint-disable-next-line\n for (const code in DaffCustomerMagentoErrorMessageRegexMap) {\n const matchIndex = error.message.search(DaffCustomerMagentoErrorMessageRegexMap[code]);\n\n if (matchIndex > -1 && DaffCustomerDriverErrorMap[code]) {\n const errObj = new DaffCustomerDriverErrorMap[code](error.message);\n\n return errObj;\n }\n }\n\n return daffTransformMagentoError(error, {});\n};\n\nexport function transformMagentoReviewsError(error: any, requestPayload?: unknown) {\n if (error.graphQLErrors?.length) {\n return transformMagentoCartGraphQlError((<ApolloError>error).graphQLErrors[0], requestPayload);\n } else {\n return daffTransformMagentoError(error, {}) || new DaffCustomerInvalidAPIResponseError(error.message);\n }\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoGetCustomerResponse } from '../models/public_api';\n\nexport const validateGetCustomerResponse = (response: ApolloQueryResult<MagentoGetCustomerResponse>) => {\n if (response.data.customer?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Get customer response does not contain a valid customer.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoChangeEmailResponse } from '../models/public_api';\n\nexport const validateChangeEmailResponse = (response: ApolloQueryResult<MagentoChangeEmailResponse>) => {\n if (response.data.updateCustomerEmail.customer?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Update email response does not contain a valid customer.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoChangePasswordResponse } from '../models/public_api';\n\nexport const validateChangePasswordResponse = (response: ApolloQueryResult<MagentoChangePasswordResponse>) => {\n if (response.data.changeCustomerPassword?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Change password response does not contain a valid customer.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoGetCustomerAddressesResponse } from '../models/public_api';\n\nexport const validateGetCustomerAddressesResponse = (response: ApolloQueryResult<MagentoGetCustomerAddressesResponse>) => {\n if (response.data.customer?.addresses) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Get customer address response does not contain addresses.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoCreateCustomerAddressResponse } from '../models/public_api';\n\nexport const validateCreateCustomerAddressResponse = (response: ApolloQueryResult<MagentoCreateCustomerAddressResponse>) => {\n if (response.data.createCustomerAddress?.id) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Create customer address response does not contain an address.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoUpdateCustomerAddressResponse } from '../models/public_api';\n\nexport const validateUpdateCustomerAddressResponse = (response: ApolloQueryResult<MagentoUpdateCustomerAddressResponse>) => {\n if (response.data.updateCustomerAddress?.id) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Update customer address response does not contain an address.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoDeleteCustomerAddressResponse } from '../models/public_api';\n\nexport const validateDeleteCustomerAddressResponse = (response: ApolloQueryResult<MagentoDeleteCustomerAddressResponse>) => {\n if (response.data.deleteCustomerAddress) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Delete customer address did not complete successfully.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';\n\nimport { MagentoUpdateCustomerResponse } from '../models/public_api';\n\nexport const validateUpdateCustomerResponse = (response: ApolloQueryResult<MagentoUpdateCustomerResponse>) => {\n if (response.data.updateCustomerV2.customer?.email) {\n return response;\n } else {\n throw new DaffCustomerInvalidAPIResponseError('Update customer response does not contain a valid customer.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCustomer } from '@daffodil/customer';\nimport { DaffCustomerDriverInterface } from '@daffodil/customer/driver';\n\nimport { transformMagentoReviewsError } from './errors/transform';\nimport {\n MagentoChangeEmailResponse,\n MagentoChangePasswordResponse,\n MagentoGetCustomerResponse,\n MagentoUpdateCustomerResponse,\n} from './models/public_api';\nimport {\n changePassword,\n getCustomer,\n updateCustomer,\n updateEmail,\n} from './queries/public_api';\nimport {\n magentoCustomerInputTransform,\n magentoCustomerTransform,\n} from './transforms/public_api';\nimport { validateChangeEmailResponse } from './validators/change-email';\nimport { validateChangePasswordResponse } from './validators/change-password';\nimport { validateGetCustomerResponse } from './validators/public_api';\nimport { validateUpdateCustomerResponse } from './validators/update-customer';\n\n/**\n * A service for making Magento GraphQL queries for customers.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerMagentoService implements DaffCustomerDriverInterface {\n constructor(\n private apollo: Apollo,\n ) {}\n\n changeEmail(email: string, password: string): Observable<DaffCustomer> {\n return this.apollo.mutate<MagentoChangeEmailResponse>({\n mutation: updateEmail,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateChangeEmailResponse),\n map(result => magentoCustomerTransform(result.data.updateCustomerEmail.customer)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n changePassword(oldPassword: string, newPassword: string): Observable<void> {\n return this.apollo.mutate<MagentoChangePasswordResponse>({\n mutation: changePassword,\n variables: {\n old: oldPassword,\n new: newPassword,\n },\n }).pipe(\n map(validateChangePasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n get(): Observable<DaffCustomer> {\n return this.apollo.query<MagentoGetCustomerResponse>({\n query: getCustomer,\n }).pipe(\n map(validateGetCustomerResponse),\n map(result => magentoCustomerTransform(result.data.customer)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n update(customer: Partial<DaffCustomer>): Observable<DaffCustomer> {\n return this.apollo.mutate<MagentoUpdateCustomerResponse>({\n mutation: updateCustomer,\n variables: {\n customer: magentoCustomerInputTransform(customer),\n },\n }).pipe(\n map(validateUpdateCustomerResponse),\n map(result => magentoCustomerTransform(result.data.updateCustomerV2.customer)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { ApolloQueryResult } from '@apollo/client/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n Subject,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffIdentifiable } from '@daffodil/core';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\nimport { DaffCustomerAddress } from '@daffodil/customer';\nimport {\n DaffCustomerAddressDriverInterface,\n DaffCustomerAddressNotFoundError,\n} from '@daffodil/customer/driver';\n\nimport { transformMagentoReviewsError } from './errors/transform';\nimport {\n MagentoCreateCustomerAddressResponse,\n MagentoDeleteCustomerAddressResponse,\n MagentoGetCustomerAddressesResponse,\n MagentoUpdateCustomerAddressResponse,\n} from './models/public_api';\nimport {\n createCustomerAddress,\n deleteCustomerAddress,\n getCustomerAddresses,\n updateCustomerAddress,\n} from './queries/public_api';\nimport {\n magentoCustomerAddressInputTransform,\n magentoCustomerAddressTransform,\n} from './transforms/public_api';\nimport {\n validateCreateCustomerAddressResponse,\n validateDeleteCustomerAddressResponse,\n validateGetCustomerAddressesResponse,\n validateUpdateCustomerAddressResponse,\n} from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for customers.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerMagentoAddressService implements DaffCustomerAddressDriverInterface {\n constructor(\n private apollo: Apollo,\n private mutationQueue: DaffQueuedApollo,\n ) {}\n\n add(address: DaffCustomerAddress): Observable<DaffCustomerAddress[]> {\n return this.mutationQueue.mutate<MagentoCreateCustomerAddressResponse>({\n mutation: createCustomerAddress,\n variables: {\n input: magentoCustomerAddressInputTransform(address),\n },\n refetchQueries: [{\n query: getCustomerAddresses,\n }],\n onQueryUpdated: () => true,\n }).pipe(\n map(validateCreateCustomerAddressResponse),\n // magento doesn't return address collection so make an additional request >:(\n switchMap(() => this.listAddresses()),\n map(({ data }) => data.customer.addresses.map(magentoCustomerAddressTransform)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n delete(addressId: DaffCustomerAddress['id']): Observable<DaffCustomerAddress[]> {\n return this.mutationQueue.mutate<MagentoDeleteCustomerAddressResponse>({\n mutation: deleteCustomerAddress,\n variables: {\n id: Number(addressId),\n },\n refetchQueries: [{\n query: getCustomerAddresses,\n }],\n onQueryUpdated: (query) => true,\n }).pipe(\n map(validateDeleteCustomerAddressResponse),\n // magento doesn't return address collection so make an additional request >:(\n switchMap(() => this.listAddresses()),\n map(({ data }) => data.customer.addresses.map(magentoCustomerAddressTransform)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n list(): Observable<DaffCustomerAddress[]> {\n return this.listAddresses().pipe(\n map((response) => response.data.customer.addresses.map(magentoCustomerAddressTransform)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n get(addressId: DaffCustomerAddress['id']): Observable<DaffCustomerAddress> {\n return this.listAddresses().pipe(\n map(({ data }) => {\n const address = data.customer.addresses.find(({ id }) => String(id) === addressId);\n if (!address) {\n throw new DaffCustomerAddressNotFoundError(`Could not find an address with ID: ${addressId}`);\n }\n return address;\n }),\n map(address => magentoCustomerAddressTransform(address)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n update(address: Partial<DaffCustomerAddress> & DaffIdentifiable): Observable<DaffCustomerAddress[]> {\n return this.mutationQueue.mutate<MagentoUpdateCustomerAddressResponse>({\n mutation: updateCustomerAddress,\n variables: {\n id: Number(address.id),\n input: magentoCustomerAddressInputTransform(address),\n },\n refetchQueries: [{\n query: getCustomerAddresses,\n }],\n onQueryUpdated: (query) => true,\n }).pipe(\n map(validateUpdateCustomerAddressResponse),\n switchMap(() => this.listAddresses()),\n map(({ data }) => data.customer.addresses.map(magentoCustomerAddressTransform)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n\n protected listAddresses(): Observable<ApolloQueryResult<MagentoGetCustomerAddressesResponse>> {\n return this.apollo.query<MagentoGetCustomerAddressesResponse>({\n query: getCustomerAddresses,\n }).pipe(\n map(validateGetCustomerAddressesResponse),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n DaffCustomerAddressDriver,\n DaffCustomerDriver,\n} from '@daffodil/customer/driver';\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from '@daffodil/driver/magento';\n\nimport { DaffCustomerMagentoAddressService } from './address.service';\nimport { DaffCustomerMagentoService } from './customer.service';\nimport {\n MAGENTO_GET_CUSTOMER_ADDRESSES_QUERY_NAME,\n MAGENTO_GET_CUSTOMER_QUERY_NAME,\n} from './queries/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerMagentoDriverModule> {\n return {\n ngModule: DaffCustomerMagentoDriverModule,\n providers: [\n {\n provide: DaffCustomerDriver,\n useExisting: DaffCustomerMagentoService,\n },\n {\n provide: DaffCustomerAddressDriver,\n useExisting: DaffCustomerMagentoAddressService,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_CUSTOMER_QUERY_NAME,\n multi: true,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_CUSTOMER_ADDRESSES_QUERY_NAME,\n multi: true,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAIa,6BAA6B,GAAG,CAAC,QAA+B,MAA4B;IACvG,SAAS,EAAE,QAAQ,CAAC,SAAS;IAC7B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;IAC3B,aAAa,EAAE,QAAQ,CAAC,YAAY;AACrC,CAAA;;MCJY,oCAAoC,GAAG,CAAC,OAAqC,MAAmC;IAC3H,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,YAAY,EAAE,OAAO,CAAC,OAAO;IAC7B,UAAU,EAAE,OAAO,CAAC,OAAO;IAC3B,eAAe,EAAE,OAAO,CAAC,cAAc;IACvC,gBAAgB,EAAE,OAAO,CAAC,eAAe;IACzC,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;IAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;IAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;IAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;AACtB,IAAA,MAAM,EAAE;AACN,QAAA,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;AAClC,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,CAAC,MAAM;AACd,QAAA,IAAI,OAAO,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;AAC9C,KAAA;IACD,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,SAAS,EAAE,OAAO,CAAC,SAAS;AAC7B,CAAA;;MCpBY,+BAA+B,GAAG,CAAC,OAA+B,MAA2B;AACxG,IAAA,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;AACtB,IAAA,MAAM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AE,0BAA0B;AACxC,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,yBAAyB;AAClC,oBAAA,WAAW,EAAE,iCAAiC;AAC/C,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,iCAAiC;AAC1C,oBAAA,QAAQ,EAAE,+BAA+B;AACzC,oBAAA,KAAK,EAAE,IAAI;AACZ,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,iCAAiC;AAC1C,oBAAA,QAAQ,EAAE,yCAAyC;AACnD,oBAAA,KAAK,EAAE,IAAI;AACZ,iBAAA;AACF,aAAA;SACF,CAAC;KACH;;+IAzBU,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA/B,mBAAA,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,YAHxC,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,mBAAA,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,EAJjC,OAAA,EAAA,CAAA;YACP,YAAY;SACb,CAAA,EAAA,CAAA,CAAA;2FAEU,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAL3C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;iBACF,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Injectable, NgModule } from '@angular/core';
|
|
4
|
-
import { DaffCustomerDriver } from '@daffodil/customer/driver';
|
|
4
|
+
import { DaffCustomerDriver, DaffCustomerAddressDriver } from '@daffodil/customer/driver';
|
|
5
5
|
import { of } from 'rxjs';
|
|
6
6
|
import * as i1 from '@daffodil/customer/testing';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* A basic customer driver that creates mock customer results of different kinds.
|
|
10
|
+
* For testing purposes.
|
|
11
|
+
*
|
|
12
|
+
* @inheritdoc
|
|
13
|
+
*/
|
|
14
|
+
class DaffCustomerAddressTestingDriver {
|
|
15
|
+
constructor(factory) {
|
|
16
|
+
this.factory = factory;
|
|
17
|
+
}
|
|
18
|
+
list() {
|
|
19
|
+
return of(this.factory.createMany(3));
|
|
20
|
+
}
|
|
21
|
+
get(addressId) {
|
|
22
|
+
return of(this.factory.create({ id: addressId }));
|
|
23
|
+
}
|
|
24
|
+
update(address) {
|
|
25
|
+
return of(this.factory.createMany(3));
|
|
26
|
+
}
|
|
27
|
+
add(address) {
|
|
28
|
+
return of(this.factory.createMany(3));
|
|
29
|
+
}
|
|
30
|
+
delete(addressId) {
|
|
31
|
+
return of(this.factory.createMany(3));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** @nocollapse */ DaffCustomerAddressTestingDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerAddressTestingDriver, deps: [{ token: i1.DaffCustomerAddressFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
35
|
+
/** @nocollapse */ DaffCustomerAddressTestingDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerAddressTestingDriver, providedIn: 'root' });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerAddressTestingDriver, decorators: [{
|
|
37
|
+
type: Injectable,
|
|
38
|
+
args: [{
|
|
39
|
+
providedIn: 'root',
|
|
40
|
+
}]
|
|
41
|
+
}], ctorParameters: function () { return [{ type: i1.DaffCustomerAddressFactory }]; } });
|
|
42
|
+
|
|
8
43
|
/**
|
|
9
44
|
* A basic customer driver that creates mock customer results of different kinds.
|
|
10
45
|
* For testing purposes.
|
|
@@ -49,6 +84,10 @@ class DaffCustomerTestingDriverModule {
|
|
|
49
84
|
provide: DaffCustomerDriver,
|
|
50
85
|
useExisting: DaffCustomerTestingDriver,
|
|
51
86
|
},
|
|
87
|
+
{
|
|
88
|
+
provide: DaffCustomerAddressDriver,
|
|
89
|
+
useExisting: DaffCustomerAddressTestingDriver,
|
|
90
|
+
},
|
|
52
91
|
],
|
|
53
92
|
};
|
|
54
93
|
}
|
|
@@ -71,5 +110,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
71
110
|
* Generated bundle index. Do not edit.
|
|
72
111
|
*/
|
|
73
112
|
|
|
74
|
-
export { DaffCustomerTestingDriver, DaffCustomerTestingDriverModule };
|
|
113
|
+
export { DaffCustomerAddressTestingDriver, DaffCustomerTestingDriver, DaffCustomerTestingDriverModule };
|
|
75
114
|
//# sourceMappingURL=daffodil-customer-driver-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-customer-driver-testing.mjs","sources":["../../../libs/customer/driver/testing/src/drivers/customer.service.ts","../../../libs/customer/driver/testing/src/drivers/customer-driver.module.ts","../../../libs/customer/driver/testing/src/daffodil-customer-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffCustomer } from '@daffodil/customer';\nimport { DaffCustomerDriverInterface } from '@daffodil/customer/driver';\nimport { DaffCustomerFactory } from '@daffodil/customer/testing';\n\n/**\n * A basic customer driver that creates mock customer results of different kinds.\n * For testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerTestingDriver implements DaffCustomerDriverInterface {\n constructor(\n private customerFactory: DaffCustomerFactory,\n ) {}\n\n changeEmail(email: string, password: string): Observable<DaffCustomer> {\n return of(this.customerFactory.create({ email }));\n }\n\n changePassword(oldPassword: string, newPassword: string): Observable<void> {\n return of(undefined);\n }\n\n get(): Observable<DaffCustomer> {\n return of(this.customerFactory.create());\n }\n\n update(customer: Partial<DaffCustomer>): Observable<DaffCustomer> {\n return of(this.customerFactory.create(customer));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {
|
|
1
|
+
{"version":3,"file":"daffodil-customer-driver-testing.mjs","sources":["../../../libs/customer/driver/testing/src/drivers/address.service.ts","../../../libs/customer/driver/testing/src/drivers/customer.service.ts","../../../libs/customer/driver/testing/src/drivers/customer-driver.module.ts","../../../libs/customer/driver/testing/src/daffodil-customer-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffIdentifiable } from '@daffodil/core';\nimport { DaffCustomerAddress } from '@daffodil/customer';\nimport { DaffCustomerAddressDriverInterface } from '@daffodil/customer/driver';\nimport { DaffCustomerAddressFactory } from '@daffodil/customer/testing';\n\n/**\n * A basic customer driver that creates mock customer results of different kinds.\n * For testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerAddressTestingDriver implements DaffCustomerAddressDriverInterface {\n constructor(\n private factory: DaffCustomerAddressFactory,\n ) {}\n\n list(): Observable<DaffCustomerAddress[]> {\n return of(this.factory.createMany(3));\n }\n\n get(addressId: string): Observable<DaffCustomerAddress> {\n return of(this.factory.create({ id: addressId }));\n }\n\n update(address: Partial<DaffCustomerAddress> & DaffIdentifiable): Observable<DaffCustomerAddress[]> {\n return of(this.factory.createMany(3));\n }\n\n add(address: DaffCustomerAddress): Observable<DaffCustomerAddress[]> {\n return of(this.factory.createMany(3));\n }\n\n delete(addressId: string): Observable<DaffCustomerAddress[]> {\n return of(this.factory.createMany(3));\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffCustomer } from '@daffodil/customer';\nimport { DaffCustomerDriverInterface } from '@daffodil/customer/driver';\nimport { DaffCustomerFactory } from '@daffodil/customer/testing';\n\n/**\n * A basic customer driver that creates mock customer results of different kinds.\n * For testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerTestingDriver implements DaffCustomerDriverInterface {\n constructor(\n private customerFactory: DaffCustomerFactory,\n ) {}\n\n changeEmail(email: string, password: string): Observable<DaffCustomer> {\n return of(this.customerFactory.create({ email }));\n }\n\n changePassword(oldPassword: string, newPassword: string): Observable<void> {\n return of(undefined);\n }\n\n get(): Observable<DaffCustomer> {\n return of(this.customerFactory.create());\n }\n\n update(customer: Partial<DaffCustomer>): Observable<DaffCustomer> {\n return of(this.customerFactory.create(customer));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n DaffCustomerAddressDriver,\n DaffCustomerDriver,\n} from '@daffodil/customer/driver';\n\nimport { DaffCustomerAddressTestingDriver } from './address.service';\nimport { DaffCustomerTestingDriver } from './customer.service';\n\n/**\n * Provides the {@link DaffCustomerTestingDriver} as the {@link DaffCustomerDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerTestingDriverModule> {\n return {\n ngModule: DaffCustomerTestingDriverModule,\n providers: [\n {\n provide: DaffCustomerDriver,\n useExisting: DaffCustomerTestingDriver,\n },\n {\n provide: DaffCustomerAddressDriver,\n useExisting: DaffCustomerAddressTestingDriver,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAWA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AS,EAAE;AACT,gBAAA;AACE,oBAAA,OAAO,EAAE,kBAAkB;AAC3B,oBAAA,WAAW,EAAE,yBAAyB;AACvC,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,yBAAyB;AAClC,oBAAA,WAAW,EAAE,gCAAgC;AAC9C,iBAAA;AACF,aAAA;SACF,CAAC;KACH;;+IAfU,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA/B,mBAAA,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,YAHxC,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,mBAAA,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,EAJjC,OAAA,EAAA,CAAA;YACP,YAAY;SACb,CAAA,EAAA,CAAA,CAAA;2FAEU,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAL3C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;iBACF,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -6,6 +6,11 @@ import { DaffInheritableError } from '@daffodil/core';
|
|
|
6
6
|
*/
|
|
7
7
|
const DaffCustomerDriver = new InjectionToken('DaffCustomerDriver');
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* An injection token for the customer driver.
|
|
11
|
+
*/
|
|
12
|
+
const DaffCustomerAddressDriver = new InjectionToken('DaffCustomerAddressDriver');
|
|
13
|
+
|
|
9
14
|
const DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE = 'DAFF_CUSTOMER_INVALID_API_RESPONSE';
|
|
10
15
|
/**
|
|
11
16
|
* A general error indicating that the platform returned a response which cannot be processed.
|
|
@@ -18,16 +23,62 @@ class DaffCustomerInvalidAPIResponseError extends DaffInheritableError {
|
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
|
|
26
|
+
const DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE = 'DAFF_CUSTOMER_ADDRESS_NOT_FOUND';
|
|
27
|
+
/**
|
|
28
|
+
* An error indicating that the requested address cannot be found.
|
|
29
|
+
*/
|
|
30
|
+
class DaffCustomerAddressNotFoundError extends DaffInheritableError {
|
|
31
|
+
constructor(message) {
|
|
32
|
+
super(message);
|
|
33
|
+
this.message = message;
|
|
34
|
+
this.code = DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE = 'DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION';
|
|
39
|
+
/**
|
|
40
|
+
* An error indicating that a deletion of the customer's default billing address was attempted and failed.
|
|
41
|
+
*/
|
|
42
|
+
class DaffCustomerDefaultBillingAddressDeletionError extends DaffInheritableError {
|
|
43
|
+
constructor(message) {
|
|
44
|
+
super(message);
|
|
45
|
+
this.message = message;
|
|
46
|
+
this.code = DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE = 'DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION';
|
|
51
|
+
/**
|
|
52
|
+
* An error indicating that a deletion of the customer's default shipping address was attempted and failed.
|
|
53
|
+
*/
|
|
54
|
+
class DaffCustomerDefaultShippingAddressDeletionError extends DaffInheritableError {
|
|
55
|
+
constructor(message) {
|
|
56
|
+
super(message);
|
|
57
|
+
this.message = message;
|
|
58
|
+
this.code = DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
21
62
|
/**
|
|
22
63
|
* A mapping from error codes to error class constructors.
|
|
23
64
|
*/
|
|
24
65
|
const DaffCustomerDriverErrorMap = {
|
|
25
66
|
[DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE]: DaffCustomerInvalidAPIResponseError,
|
|
67
|
+
[DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE]: DaffCustomerAddressNotFoundError,
|
|
68
|
+
[DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE]: DaffCustomerDefaultBillingAddressDeletionError,
|
|
69
|
+
[DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE]: DaffCustomerDefaultShippingAddressDeletionError,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const DaffCustomerDriverErrorCodes = {
|
|
73
|
+
ADDRESS_NOT_FOUND: DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE,
|
|
74
|
+
DEFAULT_BILLING_ADDRESS_DELETION: DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE,
|
|
75
|
+
DEFAULT_SHIPPING_ADDRESS_DELETION: DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE,
|
|
76
|
+
INVALID_API_RESPONSE: DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE,
|
|
26
77
|
};
|
|
27
78
|
|
|
28
79
|
/**
|
|
29
80
|
* Generated bundle index. Do not edit.
|
|
30
81
|
*/
|
|
31
82
|
|
|
32
|
-
export { DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE, DaffCustomerDriver, DaffCustomerDriverErrorMap, DaffCustomerInvalidAPIResponseError };
|
|
83
|
+
export { DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE, DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE, DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE, DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE, DaffCustomerAddressDriver, DaffCustomerAddressNotFoundError, DaffCustomerDefaultBillingAddressDeletionError, DaffCustomerDefaultShippingAddressDeletionError, DaffCustomerDriver, DaffCustomerDriverErrorCodes, DaffCustomerDriverErrorMap, DaffCustomerInvalidAPIResponseError };
|
|
33
84
|
//# sourceMappingURL=daffodil-customer-driver.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-customer-driver.mjs","sources":["../../../libs/customer/driver/src/interfaces/customer-service.interface.ts","../../../libs/customer/driver/src/errors/invalid-api-response.ts","../../../libs/customer/driver/src/errors/map.ts","../../../libs/customer/driver/src/daffodil-customer-driver.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffCustomer } from '@daffodil/customer';\n\n/**\n * An injection token for the customer driver.\n */\nexport const DaffCustomerDriver = new InjectionToken<DaffCustomerDriverInterface>('DaffCustomerDriver');\n\n/**\n * The customer driver is responsible for loading customers.\n */\nexport interface DaffCustomerDriverInterface<\n T extends DaffCustomer = DaffCustomer,\n> {\n /**\n * Get the currently logged-in customer.\n */\n get(): Observable<T>;\n\n /**\n * Update the currently logged-in customer.\n *\n * @param customer The customer info to update.\n */\n update(customer: Partial<T>): Observable<T>;\n\n /**\n * Change the currently logged-in customer's email.\n */\n changeEmail(email: string, password: string): Observable<T>;\n\n /**\n * Change the currently logged-in customer's password.\n */\n changePassword(oldPassword: string, newPassword: string): Observable<void>;\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE = 'DAFF_CUSTOMER_INVALID_API_RESPONSE';\n\n/**\n * A general error indicating that the platform returned a response which cannot be processed.\n */\nexport class DaffCustomerInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffCustomerInvalidAPIResponseError,\n DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE,\n} from './invalid-api-response';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffCustomerDriverErrorMap = {\n [DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE]: DaffCustomerInvalidAPIResponseError,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAKA;;AAEG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAA8B,oBAAoB;;
|
|
1
|
+
{"version":3,"file":"daffodil-customer-driver.mjs","sources":["../../../libs/customer/driver/src/interfaces/customer-service.interface.ts","../../../libs/customer/driver/src/interfaces/address-service.interface.ts","../../../libs/customer/driver/src/errors/invalid-api-response.ts","../../../libs/customer/driver/src/errors/address-not-found.ts","../../../libs/customer/driver/src/errors/default-billing-address-deletion.ts","../../../libs/customer/driver/src/errors/default-shipping-address-deletion.ts","../../../libs/customer/driver/src/errors/map.ts","../../../libs/customer/driver/src/errors/codes.ts","../../../libs/customer/driver/src/daffodil-customer-driver.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffCustomer } from '@daffodil/customer';\n\n/**\n * An injection token for the customer driver.\n */\nexport const DaffCustomerDriver = new InjectionToken<DaffCustomerDriverInterface>('DaffCustomerDriver');\n\n/**\n * The customer driver is responsible for loading customers.\n */\nexport interface DaffCustomerDriverInterface<\n T extends DaffCustomer = DaffCustomer,\n> {\n /**\n * Get the currently logged-in customer.\n */\n get(): Observable<T>;\n\n /**\n * Update the currently logged-in customer.\n *\n * @param customer The customer info to update.\n */\n update(customer: Partial<T>): Observable<T>;\n\n /**\n * Change the currently logged-in customer's email.\n */\n changeEmail(email: string, password: string): Observable<T>;\n\n /**\n * Change the currently logged-in customer's password.\n */\n changePassword(oldPassword: string, newPassword: string): Observable<void>;\n}\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffIdentifiable } from '@daffodil/core';\nimport { DaffCustomerAddress } from '@daffodil/customer';\n\n/**\n * An injection token for the customer driver.\n */\nexport const DaffCustomerAddressDriver = new InjectionToken<DaffCustomerAddressDriverInterface>('DaffCustomerAddressDriver');\n\n/**\n * The customer driver is responsible for loading customers.\n */\nexport interface DaffCustomerAddressDriverInterface<\n T extends DaffCustomerAddress = DaffCustomerAddress,\n> {\n /**\n * Lists the customer's addresses.\n */\n list(): Observable<T[]>;\n\n /**\n * Get the specified address.\n */\n get(addressId: DaffCustomerAddress['id']): Observable<T>;\n\n /**\n * Update the passed address.\n */\n update(address: Partial<T> & DaffIdentifiable): Observable<T[]>;\n\n /**\n * Adds the passed address.\n */\n add(address: T): Observable<T[]>;\n\n /**\n * Deletes the specified address.\n */\n delete(addressId: DaffCustomerAddress['id']): Observable<T[]>;\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE = 'DAFF_CUSTOMER_INVALID_API_RESPONSE';\n\n/**\n * A general error indicating that the platform returned a response which cannot be processed.\n */\nexport class DaffCustomerInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE = 'DAFF_CUSTOMER_ADDRESS_NOT_FOUND';\n\n/**\n * An error indicating that the requested address cannot be found.\n */\nexport class DaffCustomerAddressNotFoundError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE = 'DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION';\n\n/**\n * An error indicating that a deletion of the customer's default billing address was attempted and failed.\n */\nexport class DaffCustomerDefaultBillingAddressDeletionError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE = 'DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION';\n\n/**\n * An error indicating that a deletion of the customer's default shipping address was attempted and failed.\n */\nexport class DaffCustomerDefaultShippingAddressDeletionError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE,\n DaffCustomerAddressNotFoundError,\n} from './address-not-found';\nimport {\n DaffCustomerDefaultBillingAddressDeletionError,\n DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE,\n} from './default-billing-address-deletion';\nimport {\n DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE,\n DaffCustomerDefaultShippingAddressDeletionError,\n} from './default-shipping-address-deletion';\nimport {\n DaffCustomerInvalidAPIResponseError,\n DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE,\n} from './invalid-api-response';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffCustomerDriverErrorMap = {\n [DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE]: DaffCustomerInvalidAPIResponseError,\n [DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE]: DaffCustomerAddressNotFoundError,\n [DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE]: DaffCustomerDefaultBillingAddressDeletionError,\n [DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE]: DaffCustomerDefaultShippingAddressDeletionError,\n};\n","import { DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE } from './address-not-found';\nimport { DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE } from './default-billing-address-deletion';\nimport { DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE } from './default-shipping-address-deletion';\nimport { DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE } from './invalid-api-response';\n\nexport const DaffCustomerDriverErrorCodes = {\n ADDRESS_NOT_FOUND: DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE,\n DEFAULT_BILLING_ADDRESS_DELETION: DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE,\n DEFAULT_SHIPPING_ADDRESS_DELETION: DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE,\n INVALID_API_RESPONSE: DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAKA;;AAEG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAA8B,oBAAoB;;ACFtG;;AA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AmC;IACpF,CAAC,0CAA0C,GAAG,gCAAgC;IAC9E,CAAC,yDAAyD,GAAG,8CAA8C;IAC3G,CAAC,0DAA0D,GAAG,+CAA+C;;;ACnBlG,MAAA,4BAA4B,GAAG;AAC1C,IAAA,iBAAiB,EAAE,0CAA0C;AAC7D,IAAA,gCAAgC,EAAE,yDAAyD;AAC3F,IAAA,iCAAiC,EAAE,0DAA0D;AAC7F,IAAA,oBAAoB,EAAE,6CAA6C;;;ACTrE;;AAEG;;;;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, NgModule } from '@angular/core';
|
|
3
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { BehaviorSubject, of } from 'rxjs';
|
|
4
4
|
import { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';
|
|
5
|
-
import { DaffCustomerPageFacade } from '@daffodil/customer/state';
|
|
5
|
+
import { DaffCustomerPageFacade, DaffCustomerAddressPageFacade } from '@daffodil/customer/state';
|
|
6
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
7
|
+
import { MockDaffCustomerAddress } from '@daffodil/customer/testing';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Mocks out facade fields and methods for testing purposes.
|
|
@@ -26,6 +28,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
26
28
|
args: [{ providedIn: 'root' }]
|
|
27
29
|
}] });
|
|
28
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Mocks out facade fields and methods for testing purposes.
|
|
33
|
+
*
|
|
34
|
+
* @inheritdoc
|
|
35
|
+
*/
|
|
36
|
+
class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments);
|
|
39
|
+
this.addresses$ = new BehaviorSubject([]);
|
|
40
|
+
this.errors$ = new BehaviorSubject([]);
|
|
41
|
+
}
|
|
42
|
+
getAddress() {
|
|
43
|
+
return of(null);
|
|
44
|
+
}
|
|
45
|
+
dispatch(action) { }
|
|
46
|
+
;
|
|
47
|
+
}
|
|
48
|
+
/** @nocollapse */ MockDaffCustomerAddressPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCustomerAddressPageFacade, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
/** @nocollapse */ MockDaffCustomerAddressPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCustomerAddressPageFacade, providedIn: 'root' });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCustomerAddressPageFacade, decorators: [{
|
|
51
|
+
type: Injectable,
|
|
52
|
+
args: [{ providedIn: 'root' }]
|
|
53
|
+
}] });
|
|
54
|
+
|
|
29
55
|
/**
|
|
30
56
|
* Provides the {@link MockDaffCustomerPageFacade} for {@link DaffCustomerPageFacade}.
|
|
31
57
|
*/
|
|
@@ -35,19 +61,49 @@ class DaffCustomerStateTestingModule {
|
|
|
35
61
|
/** @nocollapse */ DaffCustomerStateTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerStateTestingModule });
|
|
36
62
|
/** @nocollapse */ DaffCustomerStateTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerStateTestingModule, providers: [
|
|
37
63
|
{ provide: DaffCustomerPageFacade, useExisting: MockDaffCustomerPageFacade },
|
|
64
|
+
{ provide: DaffCustomerAddressPageFacade, useExisting: MockDaffCustomerAddressPageFacade },
|
|
38
65
|
] });
|
|
39
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerStateTestingModule, decorators: [{
|
|
40
67
|
type: NgModule,
|
|
41
68
|
args: [{
|
|
42
69
|
providers: [
|
|
43
70
|
{ provide: DaffCustomerPageFacade, useExisting: MockDaffCustomerPageFacade },
|
|
71
|
+
{ provide: DaffCustomerAddressPageFacade, useExisting: MockDaffCustomerAddressPageFacade },
|
|
44
72
|
],
|
|
45
73
|
}]
|
|
46
74
|
}] });
|
|
47
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Mock class for {@link DaffCustomerAddressEntity}.
|
|
78
|
+
*/
|
|
79
|
+
class MockDaffCustomerAddressEntity extends MockDaffCustomerAddress {
|
|
80
|
+
constructor() {
|
|
81
|
+
super(...arguments);
|
|
82
|
+
this.daffState = "Stable" /* Stable */;
|
|
83
|
+
this.daffErrors = [];
|
|
84
|
+
this.daffTemp = false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Model factory for {@link DaffCustomerAddressEntity}.
|
|
89
|
+
*/
|
|
90
|
+
class DaffCustomerAddressEntityFactory extends DaffModelFactory {
|
|
91
|
+
constructor() {
|
|
92
|
+
super(MockDaffCustomerAddressEntity);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/** @nocollapse */ DaffCustomerAddressEntityFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerAddressEntityFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
96
|
+
/** @nocollapse */ DaffCustomerAddressEntityFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerAddressEntityFactory, providedIn: 'root' });
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerAddressEntityFactory, decorators: [{
|
|
98
|
+
type: Injectable,
|
|
99
|
+
args: [{
|
|
100
|
+
providedIn: 'root',
|
|
101
|
+
}]
|
|
102
|
+
}], ctorParameters: function () { return []; } });
|
|
103
|
+
|
|
48
104
|
/**
|
|
49
105
|
* Generated bundle index. Do not edit.
|
|
50
106
|
*/
|
|
51
107
|
|
|
52
|
-
export { DaffCustomerStateTestingModule, MockDaffCustomerPageFacade };
|
|
108
|
+
export { DaffCustomerAddressEntityFactory, DaffCustomerStateTestingModule, MockDaffCustomerAddressEntity, MockDaffCustomerAddressPageFacade, MockDaffCustomerPageFacade };
|
|
53
109
|
//# sourceMappingURL=daffodil-customer-state-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-customer-state-testing.mjs","sources":["../../../libs/customer/state/testing/src/mock-customer-facade.ts","../../../libs/customer/state/testing/src/customer-testing.module.ts","../../../libs/customer/state/testing/src/daffodil-customer-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';\nimport { DaffCustomer } from '@daffodil/customer';\nimport { DaffCustomerPageFacadeInterface } from '@daffodil/customer/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade implements DaffCustomerPageFacadeInterface {\n customer$ = new BehaviorSubject<DaffCustomer>(null);\n loading$ = new BehaviorSubject<boolean>(null);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import {
|
|
1
|
+
{"version":3,"file":"daffodil-customer-state-testing.mjs","sources":["../../../libs/customer/state/testing/src/mock-customer-facade.ts","../../../libs/customer/state/testing/src/mock-address-facade.ts","../../../libs/customer/state/testing/src/customer-testing.module.ts","../../../libs/customer/state/testing/src/factories/customer-address.factory.ts","../../../libs/customer/state/testing/src/daffodil-customer-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';\nimport { DaffCustomer } from '@daffodil/customer';\nimport { DaffCustomerPageFacadeInterface } from '@daffodil/customer/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade implements DaffCustomerPageFacadeInterface {\n customer$ = new BehaviorSubject<DaffCustomer>(null);\n loading$ = new BehaviorSubject<boolean>(null);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport {\n BehaviorSubject,\n of,\n} from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';\nimport {\n DaffCustomerAddressEntity,\n DaffCustomerAddressPageFacadeInterface,\n} from '@daffodil/customer/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade implements DaffCustomerAddressPageFacadeInterface {\n addresses$ = new BehaviorSubject<DaffCustomerAddressEntity[]>([]);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n getAddress() {\n return of(null);\n }\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffCustomerAddressPageFacade,\n DaffCustomerPageFacade,\n} from '@daffodil/customer/state';\n\nimport { MockDaffCustomerAddressPageFacade } from './mock-address-facade';\nimport { MockDaffCustomerPageFacade } from './mock-customer-facade';\n\n/**\n * Provides the {@link MockDaffCustomerPageFacade} for {@link DaffCustomerPageFacade}.\n */\n@NgModule({\n providers: [\n { provide: DaffCustomerPageFacade, useExisting: MockDaffCustomerPageFacade },\n { provide: DaffCustomerAddressPageFacade, useExisting: MockDaffCustomerAddressPageFacade },\n ],\n})\nexport class DaffCustomerStateTestingModule {}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffState } from '@daffodil/core/state';\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffCustomerAddressEntity } from '@daffodil/customer/state';\nimport { MockDaffCustomerAddress } from '@daffodil/customer/testing';\n\n/**\n * Mock class for {@link DaffCustomerAddressEntity}.\n */\nexport class MockDaffCustomerAddressEntity extends MockDaffCustomerAddress implements DaffCustomerAddressEntity {\n daffState = DaffState.Stable;\n daffErrors = [];\n daffTemp = false;\n}\n\n/**\n * Model factory for {@link DaffCustomerAddressEntity}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerAddressEntityFactory extends DaffModelFactory<DaffCustomerAddressEntity>{\n constructor() {\n super(MockDaffCustomerAddressEntity);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AASA;;;;AAIG;AAEG,MAAO,0BAA2B,SAAQ,4BAA4B,CAAA;AAD5E,IAAA,WAAA,GAAA;;QAEE,IAAA,CAAA,SAAS,GAAG,IAAI,eAAe,CAAe,IAAI,CAAC,CAAC;QACpD,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;QAC9C,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAmB,EAAE,CAAC,CAAC;KAGrD;IADC,QAAQ,CAAC,MAAc,EAAA,GAAI;;;0IALhB,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,mBAAA,0BAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,O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