@daffodil/customer 0.92.3 → 0.93.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/daffodil-customer-driver-in-memory.mjs +16 -16
- package/fesm2022/daffodil-customer-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver-magento-testing.mjs +6 -6
- package/fesm2022/daffodil-customer-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver-magento.mjs +13 -13
- package/fesm2022/daffodil-customer-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver-testing.mjs +10 -10
- package/fesm2022/daffodil-customer-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-routing.mjs +6 -6
- package/fesm2022/daffodil-customer-routing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-state-testing.mjs +13 -13
- package/fesm2022/daffodil-customer-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-state.mjs +16 -16
- package/fesm2022/daffodil-customer-state.mjs.map +1 -1
- package/fesm2022/daffodil-customer-testing.mjs +6 -6
- package/fesm2022/daffodil-customer-testing.mjs.map +1 -1
- package/package.json +1 -1
- package/{driver/magento/index.d.ts → types/daffodil-customer-driver-magento.d.ts} +8 -9
- package/{state/index.d.ts → types/daffodil-customer-state.d.ts} +3 -3
- /package/{driver/in-memory/index.d.ts → types/daffodil-customer-driver-in-memory.d.ts} +0 -0
- /package/{driver/magento/testing/index.d.ts → types/daffodil-customer-driver-magento-testing.d.ts} +0 -0
- /package/{driver/testing/index.d.ts → types/daffodil-customer-driver-testing.d.ts} +0 -0
- /package/{driver/index.d.ts → types/daffodil-customer-driver.d.ts} +0 -0
- /package/{routing/index.d.ts → types/daffodil-customer-routing.d.ts} +0 -0
- /package/{state/testing/index.d.ts → types/daffodil-customer-state-testing.d.ts} +0 -0
- /package/{testing/index.d.ts → types/daffodil-customer-testing.d.ts} +0 -0
- /package/{index.d.ts → types/daffodil-customer.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-customer-testing.mjs","sources":["../../../libs/customer/testing/src/factories/customer-address.factory.ts","../../../libs/customer/testing/src/factories/customer.factory.ts","../../../libs/customer/testing/src/daffodil-customer-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffCustomerAddress } from '@daffodil/customer';\nimport { MockDaffPersonalAddress } from '@daffodil/geography/testing';\n\n/**\n * Mock class for {@link DaffCustomerAddress}.\n */\nexport class MockDaffCustomerAddress extends MockDaffPersonalAddress implements DaffCustomerAddress {\n id = faker.string.uuid();\n defaultBilling = faker.datatype.boolean();\n defaultShipping = faker.datatype.boolean();\n};\n\n/**\n * Model factory for {@link DaffCustomerAddress}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerAddressFactory extends DaffModelFactory<DaffCustomerAddress>{\n constructor() {\n super(MockDaffCustomerAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffCustomer,\n DaffCustomerAddress,\n} from '@daffodil/customer';\n\nimport { DaffCustomerAddressFactory } from './customer-address.factory';\n\n/**\n * Mock class for {@link DaffCustomer}.\n */\nexport class MockDaffCustomer implements DaffCustomer {\n id = faker.string.uuid();\n email = faker.internet.email();\n firstName = faker.person.firstName();\n lastName = faker.person.lastName();\n isSubscribed = faker.datatype.boolean();\n addresses = this.createAddresses();\n\n constructor(\n private addressFactory: DaffCustomerAddressFactory,\n ) {}\n\n private createAddresses(): DaffCustomerAddress[] {\n return this.addressFactory.createMany(faker.number.int({ min: 1, max: 4 }));\n }\n};\n\n/**\n * Model factory for {@link DaffCustomer}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerFactory extends DaffModelFactory<DaffCustomer>{\n constructor(\n addressFactory: DaffCustomerAddressFactory,\n ) {\n super(MockDaffCustomer, addressFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffCustomerAddressFactory"],"mappings":";;;;;;AAOA;;AAEG;AACG,MAAO,uBAAwB,SAAQ,uBAAuB,CAAA;AAApE,IAAA,WAAA,GAAA;;AACE,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;AACxB,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;AACzC,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;IAC5C;AAAC;AAAA;AAED;;AAEG;AAIG,MAAO,0BAA2B,SAAQ,gBAAqC,CAAA;AACnF,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,uBAAuB,CAAC;IAChC;
|
|
1
|
+
{"version":3,"file":"daffodil-customer-testing.mjs","sources":["../../../libs/customer/testing/src/factories/customer-address.factory.ts","../../../libs/customer/testing/src/factories/customer.factory.ts","../../../libs/customer/testing/src/daffodil-customer-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffCustomerAddress } from '@daffodil/customer';\nimport { MockDaffPersonalAddress } from '@daffodil/geography/testing';\n\n/**\n * Mock class for {@link DaffCustomerAddress}.\n */\nexport class MockDaffCustomerAddress extends MockDaffPersonalAddress implements DaffCustomerAddress {\n id = faker.string.uuid();\n defaultBilling = faker.datatype.boolean();\n defaultShipping = faker.datatype.boolean();\n};\n\n/**\n * Model factory for {@link DaffCustomerAddress}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerAddressFactory extends DaffModelFactory<DaffCustomerAddress>{\n constructor() {\n super(MockDaffCustomerAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n DaffCustomer,\n DaffCustomerAddress,\n} from '@daffodil/customer';\n\nimport { DaffCustomerAddressFactory } from './customer-address.factory';\n\n/**\n * Mock class for {@link DaffCustomer}.\n */\nexport class MockDaffCustomer implements DaffCustomer {\n id = faker.string.uuid();\n email = faker.internet.email();\n firstName = faker.person.firstName();\n lastName = faker.person.lastName();\n isSubscribed = faker.datatype.boolean();\n addresses = this.createAddresses();\n\n constructor(\n private addressFactory: DaffCustomerAddressFactory,\n ) {}\n\n private createAddresses(): DaffCustomerAddress[] {\n return this.addressFactory.createMany(faker.number.int({ min: 1, max: 4 }));\n }\n};\n\n/**\n * Model factory for {@link DaffCustomer}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerFactory extends DaffModelFactory<DaffCustomer>{\n constructor(\n addressFactory: DaffCustomerAddressFactory,\n ) {\n super(MockDaffCustomer, addressFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffCustomerAddressFactory"],"mappings":";;;;;;AAOA;;AAEG;AACG,MAAO,uBAAwB,SAAQ,uBAAuB,CAAA;AAApE,IAAA,WAAA,GAAA;;AACE,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;AACxB,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;AACzC,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;IAC5C;AAAC;AAAA;AAED;;AAEG;AAIG,MAAO,0BAA2B,SAAQ,gBAAqC,CAAA;AACnF,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,uBAAuB,CAAC;IAChC;iIAHW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAA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W,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,0BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA,CAAA;;2FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACpCD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/customer","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/customer"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/customer","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/customer"]}}},"version":"0.93.1","description":"Platform-agnostic models, state management, and drivers for customer account data. Part of the Daffodil ecommerce framework.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"^21","@angular/core":"^21","@daffodil/geography":"0.93.1","@daffodil/core":"0.93.1","@ngrx/effects":"^21","@ngrx/store":"^21","rxjs":"^7.0.0"},"optionalDependencies":{"@apollo/client":"^4.0.13","@daffodil/driver":"0.93.1","apollo-angular":"^13.0.0","@faker-js/faker":"^10.3.0"},"module":"fesm2022/daffodil-customer.mjs","typings":"types/daffodil-customer.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./types/daffodil-customer.d.ts","default":"./fesm2022/daffodil-customer.mjs"},"./driver":{"types":"./types/daffodil-customer-driver.d.ts","default":"./fesm2022/daffodil-customer-driver.mjs"},"./driver/in-memory":{"types":"./types/daffodil-customer-driver-in-memory.d.ts","default":"./fesm2022/daffodil-customer-driver-in-memory.mjs"},"./driver/magento":{"types":"./types/daffodil-customer-driver-magento.d.ts","default":"./fesm2022/daffodil-customer-driver-magento.mjs"},"./driver/magento/testing":{"types":"./types/daffodil-customer-driver-magento-testing.d.ts","default":"./fesm2022/daffodil-customer-driver-magento-testing.mjs"},"./driver/testing":{"types":"./types/daffodil-customer-driver-testing.d.ts","default":"./fesm2022/daffodil-customer-driver-testing.mjs"},"./routing":{"types":"./types/daffodil-customer-routing.d.ts","default":"./fesm2022/daffodil-customer-routing.mjs"},"./state":{"types":"./types/daffodil-customer-state.d.ts","default":"./fesm2022/daffodil-customer-state.mjs"},"./state/testing":{"types":"./types/daffodil-customer-state-testing.d.ts","default":"./fesm2022/daffodil-customer-state-testing.mjs"},"./testing":{"types":"./types/daffodil-customer-testing.d.ts","default":"./fesm2022/daffodil-customer-testing.mjs"}},"sideEffects":false,"type":"module","dependencies":{"tslib":"^2.6.2"}}
|
|
@@ -3,7 +3,6 @@ import * as apollo_angular from 'apollo-angular';
|
|
|
3
3
|
import { Apollo } from 'apollo-angular';
|
|
4
4
|
import { DaffError } from '@daffodil/core';
|
|
5
5
|
import { DaffCustomerInvalidAPIResponseError, DaffCustomerDriverInterface } from '@daffodil/customer/driver';
|
|
6
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
7
6
|
import { Observable } from 'rxjs';
|
|
8
7
|
import * as i0 from '@angular/core';
|
|
9
8
|
import { ModuleWithProviders } from '@angular/core';
|
|
@@ -163,21 +162,21 @@ declare const changePassword: apollo_angular.TypedDocumentNode<unknown, unknown>
|
|
|
163
162
|
|
|
164
163
|
declare function transformMagentoReviewsError(error: any, requestPayload?: unknown): DaffError | DaffCustomerInvalidAPIResponseError;
|
|
165
164
|
|
|
166
|
-
declare const validateGetCustomerResponse: (response:
|
|
165
|
+
declare const validateGetCustomerResponse: (response: Apollo.QueryResult<MagentoGetCustomerResponse>) => Apollo.QueryResult<MagentoGetCustomerResponse>;
|
|
167
166
|
|
|
168
|
-
declare const validateChangeEmailResponse: (response:
|
|
167
|
+
declare const validateChangeEmailResponse: (response: Apollo.QueryResult<MagentoChangeEmailResponse>) => Apollo.QueryResult<MagentoChangeEmailResponse>;
|
|
169
168
|
|
|
170
|
-
declare const validateChangePasswordResponse: (response:
|
|
169
|
+
declare const validateChangePasswordResponse: (response: Apollo.QueryResult<MagentoChangePasswordResponse>) => Apollo.QueryResult<MagentoChangePasswordResponse>;
|
|
171
170
|
|
|
172
|
-
declare const validateGetCustomerAddressesResponse: (response:
|
|
171
|
+
declare const validateGetCustomerAddressesResponse: (response: Apollo.QueryResult<MagentoGetCustomerAddressesResponse>) => Apollo.QueryResult<MagentoGetCustomerAddressesResponse>;
|
|
173
172
|
|
|
174
|
-
declare const validateCreateCustomerAddressResponse: (response:
|
|
173
|
+
declare const validateCreateCustomerAddressResponse: (response: Apollo.QueryResult<MagentoCreateCustomerAddressResponse>) => Apollo.QueryResult<MagentoCreateCustomerAddressResponse>;
|
|
175
174
|
|
|
176
|
-
declare const validateUpdateCustomerAddressResponse: (response:
|
|
175
|
+
declare const validateUpdateCustomerAddressResponse: (response: Apollo.QueryResult<MagentoUpdateCustomerAddressResponse>) => Apollo.QueryResult<MagentoUpdateCustomerAddressResponse>;
|
|
177
176
|
|
|
178
|
-
declare const validateDeleteCustomerAddressResponse: (response:
|
|
177
|
+
declare const validateDeleteCustomerAddressResponse: (response: Apollo.QueryResult<MagentoDeleteCustomerAddressResponse>) => Apollo.QueryResult<MagentoDeleteCustomerAddressResponse>;
|
|
179
178
|
|
|
180
|
-
declare const validateUpdateCustomerResponse: (response:
|
|
179
|
+
declare const validateUpdateCustomerResponse: (response: Apollo.QueryResult<MagentoUpdateCustomerResponse>) => Apollo.QueryResult<MagentoUpdateCustomerResponse>;
|
|
181
180
|
|
|
182
181
|
/**
|
|
183
182
|
* A service for making Magento GraphQL queries for customers.
|
|
@@ -3,9 +3,9 @@ import { Action, ActionReducer, MemoizedSelector, Store } from '@ngrx/store';
|
|
|
3
3
|
import { DaffIdentifiable } from '@daffodil/core';
|
|
4
4
|
import * as _daffodil_core_state from '@daffodil/core/state';
|
|
5
5
|
import { DaffStateError, DaffOperationState, DaffOperationEntityState, DaffOperationEntityStateAdapter, DaffOperationStateSelectors, DaffOperationStateFacadeInterface, DaffOperationEntity, daffTransformErrorToStateError } from '@daffodil/core/state';
|
|
6
|
-
import * as _daffodil_customer from '@daffodil/customer';
|
|
7
6
|
import { DaffCustomerAddress, DaffCustomer } from '@daffodil/customer';
|
|
8
7
|
import * as i0 from '@angular/core';
|
|
8
|
+
import * as _daffodil_customer_types_daffodil_customer from '@daffodil/customer/types/daffodil-customer';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
10
|
import * as i2 from '@ngrx/effects';
|
|
11
11
|
|
|
@@ -352,8 +352,8 @@ interface DaffCustomerStateRootSlice<TCustomer extends DaffCustomer = DaffCustom
|
|
|
352
352
|
[DAFF_CUSTOMER_STORE_FEATURE_KEY]: DaffCustomerReducersState<TCustomer, TAddress>;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
declare const DAFF_CUSTOMER_EXTRA_REDUCERS: i0.InjectionToken<ActionReducer<DaffCustomerReducersState<
|
|
356
|
-
declare const daffCustomerProvideExtraReducers: <R extends ActionReducer<DaffCustomerReducersState<
|
|
355
|
+
declare const DAFF_CUSTOMER_EXTRA_REDUCERS: i0.InjectionToken<ActionReducer<DaffCustomerReducersState<_daffodil_customer_types_daffodil_customer.DaffCustomer, _daffodil_customer_types_daffodil_customer.DaffCustomerAddress>, _ngrx_store.Action<string>>[]>;
|
|
356
|
+
declare const daffCustomerProvideExtraReducers: <R extends ActionReducer<DaffCustomerReducersState<_daffodil_customer_types_daffodil_customer.DaffCustomer, _daffodil_customer_types_daffodil_customer.DaffCustomerAddress>, _ngrx_store.Action<string>> = ActionReducer<DaffCustomerReducersState<_daffodil_customer_types_daffodil_customer.DaffCustomer, _daffodil_customer_types_daffodil_customer.DaffCustomerAddress>, _ngrx_store.Action<string>>>(...values: R[]) => Array<i0.ValueProvider>;
|
|
357
357
|
|
|
358
358
|
/**
|
|
359
359
|
* The initial state for the main customer state, see {@link DaffCustomerAddressReducerState}.
|
|
File without changes
|
/package/{driver/magento/testing/index.d.ts → types/daffodil-customer-driver-magento-testing.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|