@daffodil/customer 0.63.1 → 0.64.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/driver/magento/errors/transform.d.ts +2 -1
- package/esm2020/driver/in-memory/backend/address.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/customer.service.mjs +3 -3
- package/esm2020/driver/in-memory/driver/address.service.mjs +3 -3
- package/esm2020/driver/in-memory/driver/customer-driver.module.mjs +5 -7
- package/esm2020/driver/in-memory/driver/customer.service.mjs +3 -3
- package/esm2020/driver/magento/address.service.mjs +3 -3
- package/esm2020/driver/magento/customer-driver.module.mjs +5 -7
- package/esm2020/driver/magento/customer.service.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/address.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/customer.factory.mjs +3 -3
- package/esm2020/driver/magento/transforms/responses/customer.mjs +1 -1
- package/esm2020/driver/testing/drivers/address.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/customer-driver.module.mjs +5 -7
- package/esm2020/driver/testing/drivers/customer.service.mjs +3 -3
- package/esm2020/routing/guards/clear-errors.guard.mjs +3 -3
- package/esm2020/routing/resolvers/customer.resolver.mjs +3 -3
- package/esm2020/state/customer.module.mjs +9 -11
- package/esm2020/state/effects/address.effects.mjs +3 -3
- package/esm2020/state/effects/customer.effects.mjs +3 -3
- package/esm2020/state/facades/address/facade.mjs +4 -4
- package/esm2020/state/facades/customer/facade.mjs +4 -4
- package/esm2020/state/reducers/address/reducer.mjs +2 -2
- package/esm2020/state/reducers/address-entities/reducer.mjs +2 -2
- package/esm2020/state/reducers/customer/reducer.mjs +2 -2
- package/esm2020/state/reducers/token/reducers.token.mjs +3 -3
- package/esm2020/state/testing/customer-testing.module.mjs +4 -4
- package/esm2020/state/testing/factories/customer-address.factory.mjs +5 -5
- package/esm2020/state/testing/mock-address-facade.mjs +3 -3
- package/esm2020/state/testing/mock-customer-facade.mjs +3 -3
- package/esm2020/testing/factories/customer-address.factory.mjs +3 -3
- package/esm2020/testing/factories/customer.factory.mjs +3 -3
- package/fesm2015/daffodil-customer-driver-in-memory.mjs +16 -18
- package/fesm2015/daffodil-customer-driver-in-memory.mjs.map +1 -1
- package/fesm2015/daffodil-customer-driver-magento-testing.mjs +6 -6
- package/fesm2015/daffodil-customer-driver-magento.mjs +10 -12
- package/fesm2015/daffodil-customer-driver-magento.mjs.map +1 -1
- package/fesm2015/daffodil-customer-driver-testing.mjs +10 -12
- package/fesm2015/daffodil-customer-driver-testing.mjs.map +1 -1
- package/fesm2015/daffodil-customer-routing.mjs +6 -6
- package/fesm2015/daffodil-customer-state-testing.mjs +14 -14
- package/fesm2015/daffodil-customer-state-testing.mjs.map +1 -1
- package/fesm2015/daffodil-customer-state.mjs +20 -22
- package/fesm2015/daffodil-customer-state.mjs.map +1 -1
- package/fesm2015/daffodil-customer-testing.mjs +6 -6
- package/fesm2020/daffodil-customer-driver-in-memory.mjs +16 -18
- package/fesm2020/daffodil-customer-driver-in-memory.mjs.map +1 -1
- package/fesm2020/daffodil-customer-driver-magento-testing.mjs +6 -6
- package/fesm2020/daffodil-customer-driver-magento.mjs +10 -12
- package/fesm2020/daffodil-customer-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-customer-driver-testing.mjs +10 -12
- package/fesm2020/daffodil-customer-driver-testing.mjs.map +1 -1
- package/fesm2020/daffodil-customer-routing.mjs +6 -6
- package/fesm2020/daffodil-customer-state-testing.mjs +14 -14
- package/fesm2020/daffodil-customer-state-testing.mjs.map +1 -1
- package/fesm2020/daffodil-customer-state.mjs +20 -22
- package/fesm2020/daffodil-customer-state.mjs.map +1 -1
- package/fesm2020/daffodil-customer-testing.mjs +6 -6
- package/package.json +1 -1
- package/state/facades/address/facade.d.ts +1 -1
- package/state/facades/customer/facade.d.ts +1 -1
- package/state/reducers/address/reducer.d.ts +1 -1
- package/state/reducers/customer/reducer.d.ts +1 -1
- package/daffodil-customer.d.ts +0 -5
- package/driver/daffodil-customer-driver.d.ts +0 -5
- package/driver/in-memory/daffodil-customer-driver-in-memory.d.ts +0 -5
- package/driver/in-memory/package.json +0 -1
- package/driver/magento/daffodil-customer-driver-magento.d.ts +0 -5
- package/driver/magento/package.json +0 -1
- package/driver/magento/testing/daffodil-customer-driver-magento-testing.d.ts +0 -5
- package/driver/magento/testing/package.json +0 -1
- package/driver/package.json +0 -1
- package/driver/testing/daffodil-customer-driver-testing.d.ts +0 -5
- package/driver/testing/package.json +0 -1
- package/routing/daffodil-customer-routing.d.ts +0 -5
- package/routing/package.json +0 -1
- package/state/daffodil-customer-state.d.ts +0 -5
- package/state/package.json +0 -1
- package/state/testing/daffodil-customer-state-testing.d.ts +0 -5
- package/state/testing/package.json +0 -1
- package/testing/daffodil-customer-testing.d.ts +0 -5
- package/testing/package.json +0 -1
|
@@ -330,9 +330,9 @@ class DaffCustomerMagentoService {
|
|
|
330
330
|
}).pipe(map(validateUpdateCustomerResponse), map(result => magentoCustomerTransform(result.data.updateCustomerV2.customer)), catchError(err => throwError(() => transformMagentoReviewsError(err))));
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
/** @nocollapse */ DaffCustomerMagentoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
334
|
-
/** @nocollapse */ DaffCustomerMagentoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
335
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
333
|
+
/** @nocollapse */ DaffCustomerMagentoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoService, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
334
|
+
/** @nocollapse */ DaffCustomerMagentoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoService, providedIn: 'root' });
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoService, decorators: [{
|
|
336
336
|
type: Injectable,
|
|
337
337
|
args: [{
|
|
338
338
|
providedIn: 'root',
|
|
@@ -408,9 +408,9 @@ class DaffCustomerMagentoAddressService {
|
|
|
408
408
|
}).pipe(map(validateGetCustomerAddressesResponse), catchError(err => throwError(() => transformMagentoReviewsError(err))));
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
/** @nocollapse */ DaffCustomerMagentoAddressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
412
|
-
/** @nocollapse */ DaffCustomerMagentoAddressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
411
|
+
/** @nocollapse */ DaffCustomerMagentoAddressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoAddressService, deps: [{ token: i1.Apollo }, { token: i2.DaffQueuedApollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
412
|
+
/** @nocollapse */ DaffCustomerMagentoAddressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoAddressService, providedIn: 'root' });
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoAddressService, decorators: [{
|
|
414
414
|
type: Injectable,
|
|
415
415
|
args: [{
|
|
416
416
|
providedIn: 'root',
|
|
@@ -434,12 +434,10 @@ class DaffCustomerMagentoDriverModule {
|
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
/** @nocollapse */ DaffCustomerMagentoDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
438
|
-
/** @nocollapse */ DaffCustomerMagentoDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
439
|
-
/** @nocollapse */ DaffCustomerMagentoDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
440
|
-
|
|
441
|
-
]] });
|
|
442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerMagentoDriverModule, decorators: [{
|
|
437
|
+
/** @nocollapse */ DaffCustomerMagentoDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
438
|
+
/** @nocollapse */ DaffCustomerMagentoDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoDriverModule, imports: [CommonModule] });
|
|
439
|
+
/** @nocollapse */ DaffCustomerMagentoDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoDriverModule, imports: [CommonModule] });
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerMagentoDriverModule, decorators: [{
|
|
443
441
|
type: NgModule,
|
|
444
442
|
args: [{
|
|
445
443
|
imports: [
|
|
@@ -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/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: address.id ? String(address.id) : null,\n street: address.street[0],\n street2: address.street[1],\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 };\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,Q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-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: address.id ? String(address.id) : null,\n street: address.street[0],\n street2: address.street[1],\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 { magentoCustomerAddressTransform } from './customer-address';\nimport { MagentoCustomer } from '../../models/public_api';\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: DaffCustomerAddressDri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,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAL3C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -31,9 +31,9 @@ class DaffCustomerAddressTestingDriver {
|
|
|
31
31
|
return of(this.factory.createMany(3));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
/** @nocollapse */ DaffCustomerAddressTestingDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
35
|
-
/** @nocollapse */ DaffCustomerAddressTestingDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
34
|
+
/** @nocollapse */ DaffCustomerAddressTestingDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressTestingDriver, deps: [{ token: i1.DaffCustomerAddressFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
35
|
+
/** @nocollapse */ DaffCustomerAddressTestingDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressTestingDriver, providedIn: 'root' });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressTestingDriver, decorators: [{
|
|
37
37
|
type: Injectable,
|
|
38
38
|
args: [{
|
|
39
39
|
providedIn: 'root',
|
|
@@ -63,9 +63,9 @@ class DaffCustomerTestingDriver {
|
|
|
63
63
|
return of(this.customerFactory.create(customer));
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
/** @nocollapse */ DaffCustomerTestingDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
67
|
-
/** @nocollapse */ DaffCustomerTestingDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
66
|
+
/** @nocollapse */ DaffCustomerTestingDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerTestingDriver, deps: [{ token: i1.DaffCustomerFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
67
|
+
/** @nocollapse */ DaffCustomerTestingDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerTestingDriver, providedIn: 'root' });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerTestingDriver, decorators: [{
|
|
69
69
|
type: Injectable,
|
|
70
70
|
args: [{
|
|
71
71
|
providedIn: 'root',
|
|
@@ -92,12 +92,10 @@ class DaffCustomerTestingDriverModule {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
/** @nocollapse */ DaffCustomerTestingDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
/** @nocollapse */ DaffCustomerTestingDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
97
|
-
/** @nocollapse */ DaffCustomerTestingDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
98
|
-
|
|
99
|
-
]] });
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerTestingDriverModule, decorators: [{
|
|
95
|
+
/** @nocollapse */ DaffCustomerTestingDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
96
|
+
/** @nocollapse */ DaffCustomerTestingDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerTestingDriverModule, imports: [CommonModule] });
|
|
97
|
+
/** @nocollapse */ DaffCustomerTestingDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerTestingDriverModule, imports: [CommonModule] });
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerTestingDriverModule, decorators: [{
|
|
101
99
|
type: NgModule,
|
|
102
100
|
args: [{
|
|
103
101
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
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;;;;;AAKG;MAIU,gCAAgC,CAAA;AAC3C,IAAA,WAAA,CACU,OAAmC,EAAA;QAAnC,IAAO,CAAA,OAAA,GAAP,OAAO,CAA4B;KACzC;IAEJ,IAAI,GAAA;QACF,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;AAED,IAAA,GAAG,CAAC,SAAiB,EAAA;AACnB,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;KACnD;AAED,IAAA,MAAM,CAAC,OAAwD,EAAA;QAC7D,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;AAED,IAAA,GAAG,CAAC,OAA4B,EAAA;QAC9B,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;AAED,IAAA,MAAM,CAAC,SAAiB,EAAA;QACtB,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;;gJAvBU,gCAAgC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhC,mBAAA,gCAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cAF/B,MAAM,EAAA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;;ACJD;;AAEG;MAMU,+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,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,
|
|
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;;;;;AAKG;MAIU,gCAAgC,CAAA;AAC3C,IAAA,WAAA,CACU,OAAmC,EAAA;QAAnC,IAAO,CAAA,OAAA,GAAP,OAAO,CAA4B;KACzC;IAEJ,IAAI,GAAA;QACF,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;AAED,IAAA,GAAG,CAAC,SAAiB,EAAA;AACnB,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;KACnD;AAED,IAAA,MAAM,CAAC,OAAwD,EAAA;QAC7D,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;AAED,IAAA,GAAG,CAAC,OAA4B,EAAA;QAC9B,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;AAED,IAAA,MAAM,CAAC,SAAiB,EAAA;QACtB,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;;gJAvBU,gCAAgC,EAAA,IA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AA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -17,9 +17,9 @@ class DaffCustomerClearErrorsGuard {
|
|
|
17
17
|
return true;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
/** @nocollapse */ DaffCustomerClearErrorsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
/** @nocollapse */ DaffCustomerClearErrorsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
/** @nocollapse */ DaffCustomerClearErrorsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerClearErrorsGuard, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
/** @nocollapse */ DaffCustomerClearErrorsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerClearErrorsGuard, providedIn: 'root' });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerClearErrorsGuard, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{ providedIn: 'root' }]
|
|
25
25
|
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
@@ -36,9 +36,9 @@ class DaffCustomerResolver {
|
|
|
36
36
|
return of(true);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
/** @nocollapse */ DaffCustomerResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
40
|
-
/** @nocollapse */ DaffCustomerResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
/** @nocollapse */ DaffCustomerResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerResolver, deps: [{ token: i1$1.DaffCustomerPageFacade }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
40
|
+
/** @nocollapse */ DaffCustomerResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerResolver, providedIn: 'root' });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerResolver, decorators: [{
|
|
42
42
|
type: Injectable,
|
|
43
43
|
args: [{
|
|
44
44
|
providedIn: 'root',
|
|
@@ -21,9 +21,9 @@ class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade {
|
|
|
21
21
|
dispatch(action) { }
|
|
22
22
|
;
|
|
23
23
|
}
|
|
24
|
-
/** @nocollapse */ MockDaffCustomerPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
/** @nocollapse */ MockDaffCustomerPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
/** @nocollapse */ MockDaffCustomerPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffCustomerPageFacade, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
+
/** @nocollapse */ MockDaffCustomerPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffCustomerPageFacade, providedIn: 'root' });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffCustomerPageFacade, decorators: [{
|
|
27
27
|
type: Injectable,
|
|
28
28
|
args: [{ providedIn: 'root' }]
|
|
29
29
|
}] });
|
|
@@ -45,9 +45,9 @@ class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade {
|
|
|
45
45
|
dispatch(action) { }
|
|
46
46
|
;
|
|
47
47
|
}
|
|
48
|
-
/** @nocollapse */ MockDaffCustomerAddressPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
/** @nocollapse */ MockDaffCustomerAddressPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
+
/** @nocollapse */ MockDaffCustomerAddressPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffCustomerAddressPageFacade, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
/** @nocollapse */ MockDaffCustomerAddressPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffCustomerAddressPageFacade, providedIn: 'root' });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffCustomerAddressPageFacade, decorators: [{
|
|
51
51
|
type: Injectable,
|
|
52
52
|
args: [{ providedIn: 'root' }]
|
|
53
53
|
}] });
|
|
@@ -57,13 +57,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
57
57
|
*/
|
|
58
58
|
class DaffCustomerStateTestingModule {
|
|
59
59
|
}
|
|
60
|
-
/** @nocollapse */ DaffCustomerStateTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
/** @nocollapse */ DaffCustomerStateTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
62
|
-
/** @nocollapse */ DaffCustomerStateTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
60
|
+
/** @nocollapse */ DaffCustomerStateTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
61
|
+
/** @nocollapse */ DaffCustomerStateTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateTestingModule });
|
|
62
|
+
/** @nocollapse */ DaffCustomerStateTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateTestingModule, providers: [
|
|
63
63
|
{ provide: DaffCustomerPageFacade, useExisting: MockDaffCustomerPageFacade },
|
|
64
64
|
{ provide: DaffCustomerAddressPageFacade, useExisting: MockDaffCustomerAddressPageFacade },
|
|
65
65
|
] });
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateTestingModule, decorators: [{
|
|
67
67
|
type: NgModule,
|
|
68
68
|
args: [{
|
|
69
69
|
providers: [
|
|
@@ -79,7 +79,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
79
79
|
class MockDaffCustomerAddressEntity extends MockDaffCustomerAddress {
|
|
80
80
|
constructor() {
|
|
81
81
|
super(...arguments);
|
|
82
|
-
this.daffState = "Stable" /* Stable */;
|
|
82
|
+
this.daffState = "Stable" /* DaffState.Stable */;
|
|
83
83
|
this.daffErrors = [];
|
|
84
84
|
this.daffTemp = false;
|
|
85
85
|
}
|
|
@@ -92,9 +92,9 @@ class DaffCustomerAddressEntityFactory extends DaffModelFactory {
|
|
|
92
92
|
super(MockDaffCustomerAddressEntity);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
/** @nocollapse */ DaffCustomerAddressEntityFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
/** @nocollapse */ DaffCustomerAddressEntityFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
95
|
+
/** @nocollapse */ DaffCustomerAddressEntityFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressEntityFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
96
|
+
/** @nocollapse */ DaffCustomerAddressEntityFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressEntityFactory, providedIn: 'root' });
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressEntityFactory, decorators: [{
|
|
98
98
|
type: Injectable,
|
|
99
99
|
args: [{
|
|
100
100
|
providedIn: 'root',
|
|
@@ -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/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 { 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;;AAEE,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,eAAe,CAAe,IAAI,CAAC,CAAC;AACpD,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;AAC9C,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAmB,EAAE,CAAC,CAAC;AAGrD,KAAA;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,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,C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AA,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,0BAA0B,EAAE;AAC5E,QAAA,EAAE,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,iCAAiC,EAAE;AAC3F,KAAA,EAAA,CAAA,CAAA;2FAEU,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAN1C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,0BAA0B,EAAE;AAC5E,wBAAA,EAAE,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,iCAAiC,EAAE;AAC3F,qBAAA;AACF,iBAAA,CAAA;;;ACVD;;AAEG;AACG,MAAO,6BAA8B,SAAQ,uBAAuB,CAAA;AAA1E,IAAA,WAAA,GAAA;;AACE,QAAA,IAAA,CAAA,SAAS,GAAoB,QAAA,
|
|
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 { 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;;AAEE,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,eAAe,CAAe,IAAI,CAAC,CAAC;AACpD,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;AAC9C,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAmB,EAAE,CAAC,CAAC;AAGrD,KAAA;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,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACAlC;;;;AAIG;AAEG,MAAO,iCAAkC,SAAQ,4BAA4B,CAAA;AADnF,IAAA,WAAA,GAAA;;AAEE,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,eAAe,CAA8B,EAAE,CAAC,CAAC;AAClE,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAm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WAAW,EAAE,0BAA0B,EAAE;AAC5E,wBAAA,EAAE,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,iCAAiC,EAAE;AAC3F,qBAAA;AACF,iBAAA,CAAA;;;ACVD;;AAEG;AACG,MAAO,6BAA8B,SAAQ,uBAAuB,CAAA;AAA1E,IAAA,WAAA,GAAA;;AACE,QAAA,IAAA,CAAA,SAAS,GAAoB,QAAA,wBAAA;QAC7B,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;QAChB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAClB;AAAA,CAAA;AAED;;AAEG;AAIG,MAAO,gCAAiC,SAAQ,gBAA2C,CAAA;AAC/F,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,6BAA6B,CAAC,CAAC;KACtC;;gJAHU,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhC,mBAAA,gCAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cAF/B,MAAM,EAAA,CAAA,CAAA;2FAEP,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAH5C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -577,9 +577,9 @@ class DaffCustomerPageFacade {
|
|
|
577
577
|
this.store.dispatch(action);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
/** @nocollapse */ DaffCustomerPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
581
|
-
/** @nocollapse */ DaffCustomerPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
580
|
+
/** @nocollapse */ DaffCustomerPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerPageFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
581
|
+
/** @nocollapse */ DaffCustomerPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerPageFacade, providedIn: 'root' });
|
|
582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerPageFacade, decorators: [{
|
|
583
583
|
type: Injectable,
|
|
584
584
|
args: [{
|
|
585
585
|
providedIn: 'root',
|
|
@@ -613,9 +613,9 @@ class DaffCustomerAddressPageFacade {
|
|
|
613
613
|
this.store.dispatch(action);
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
/** @nocollapse */ DaffCustomerAddressPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
617
|
-
/** @nocollapse */ DaffCustomerAddressPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
616
|
+
/** @nocollapse */ DaffCustomerAddressPageFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressPageFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
617
|
+
/** @nocollapse */ DaffCustomerAddressPageFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressPageFacade, providedIn: 'root' });
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressPageFacade, decorators: [{
|
|
619
619
|
type: Injectable,
|
|
620
620
|
args: [{
|
|
621
621
|
providedIn: 'root',
|
|
@@ -646,9 +646,9 @@ class DaffCustomerAddressEffects {
|
|
|
646
646
|
this.delete$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressDeleteAction), switchMap((action) => this.driver.delete(action.addressId).pipe(map(resp => new DaffCustomerAddressDeleteSuccess(resp)), catchError((error) => of(new DaffCustomerAddressDeleteFailure(this.errorMatcher(error), action.addressId)))))));
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
/** @nocollapse */ DaffCustomerAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
650
|
-
/** @nocollapse */ DaffCustomerAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
649
|
+
/** @nocollapse */ DaffCustomerAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressEffects, deps: [{ token: i1$1.Actions }, { token: DaffCustomerAddressDriver }, { token: DAFF_CUSTOMER_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
650
|
+
/** @nocollapse */ DaffCustomerAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressEffects });
|
|
651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerAddressEffects, decorators: [{
|
|
652
652
|
type: Injectable
|
|
653
653
|
}], ctorParameters: function () { return [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
|
654
654
|
type: Inject,
|
|
@@ -681,9 +681,9 @@ class DaffCustomerEffects {
|
|
|
681
681
|
this.changePassword$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerChangePasswordAction), switchMap((action) => this.driver.changePassword(action.oldPassword, action.newPassword).pipe(map(() => new DaffCustomerChangePasswordSuccess()), catchError((error) => of(new DaffCustomerChangePasswordFailure(this.errorMatcher(error))))))));
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
/** @nocollapse */ DaffCustomerEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
685
|
-
/** @nocollapse */ DaffCustomerEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
684
|
+
/** @nocollapse */ DaffCustomerEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerEffects, deps: [{ token: i1$1.Actions }, { token: DaffCustomerDriver }, { token: DAFF_CUSTOMER_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
685
|
+
/** @nocollapse */ DaffCustomerEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerEffects });
|
|
686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerEffects, decorators: [{
|
|
687
687
|
type: Injectable
|
|
688
688
|
}], ctorParameters: function () { return [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
|
689
689
|
type: Inject,
|
|
@@ -716,16 +716,14 @@ const DAFF_CUSTOMER_REDUCERS = new InjectionToken('DAFF_CUSTOMER_REDUCERS', {
|
|
|
716
716
|
*/
|
|
717
717
|
class DaffCustomerStateModule {
|
|
718
718
|
}
|
|
719
|
-
/** @nocollapse */ DaffCustomerStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
720
|
-
/** @nocollapse */ DaffCustomerStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
721
|
-
/** @nocollapse */ DaffCustomerStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
]] });
|
|
728
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCustomerStateModule, decorators: [{
|
|
719
|
+
/** @nocollapse */ DaffCustomerStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
720
|
+
/** @nocollapse */ DaffCustomerStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule] });
|
|
721
|
+
/** @nocollapse */ DaffCustomerStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateModule, imports: [StoreModule.forFeature(DAFF_CUSTOMER_STORE_FEATURE_KEY, DAFF_CUSTOMER_REDUCERS),
|
|
722
|
+
EffectsModule.forFeature([
|
|
723
|
+
DaffCustomerEffects,
|
|
724
|
+
DaffCustomerAddressEffects,
|
|
725
|
+
])] });
|
|
726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCustomerStateModule, decorators: [{
|
|
729
727
|
type: NgModule,
|
|
730
728
|
args: [{
|
|
731
729
|
imports: [
|