@restorecommerce/facade 1.13.24 → 2.0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@2.0.0...@restorecommerce/facade@2.0.1) (2024-07-24)
7
+
8
+ **Note:** Version bump only for package @restorecommerce/facade
9
+
10
+
11
+
12
+
13
+
14
+ # [2.0.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@1.13.24...@restorecommerce/facade@2.0.0) (2024-06-27)
15
+
16
+
17
+ ### Features
18
+
19
+ * remove apiKey and sync mechanism as seed accounts are used for importing data ([02733fa](https://github.com/restorecommerce/libs/commit/02733faf070a072039f2ee59e78a6bb134931363))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * seed accounts are used for data import
25
+
26
+
27
+
28
+
29
+
6
30
  ## [1.13.24](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@1.13.23...@restorecommerce/facade@1.13.24) (2024-06-26)
7
31
 
8
32
  **Note:** Version bump only for package @restorecommerce/facade
package/debug-run.ts CHANGED
@@ -52,8 +52,7 @@ const createTestFacade = () => {
52
52
  ],
53
53
  jwks,
54
54
  },
55
- oauth: true,
56
- apiKey: 'api_key'
55
+ oauth: true
57
56
  }))
58
57
  .useModule(resourceModule({config: serviceConfig.get('master_data')}))
59
58
  .useModule(accessControlModule({config: serviceConfig.get('access_control')}))
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/identity/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,iBAAiB,CAAC;AAM3E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvF,eAAO,MAAM,cAAc,8GAiDzB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/identity/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,iBAAiB,CAAC;AAK3E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvF,eAAO,MAAM,cAAc,8GAqCzB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { createFacadeModuleFactory } from '../../utils.js';
2
2
  import { FederatedResourceSchema } from './gql/federation.js';
3
3
  import { createOIDC } from './oidc/index.js';
4
- import { setupApiKey } from './api-key/api-key.js';
5
4
  import { IdentitySrvGrpcClient } from './grpc/index.js';
6
5
  import { createOAuth } from './oauth/oauth.js';
7
6
  import mount from 'koa-mount';
@@ -10,16 +9,6 @@ export const identityModule = createFacadeModuleFactory('identity', (facade, con
10
9
  ...config.config.client,
11
10
  logger: facade.logger,
12
11
  });
13
- if (!!config.apiKey) {
14
- const apiKey = setupApiKey({
15
- logger: facade.logger,
16
- apiKey: config.apiKey
17
- });
18
- if (apiKey) {
19
- facade.koa.use(apiKey.router.routes());
20
- facade.koa.use(apiKey.app);
21
- }
22
- }
23
12
  if (config.oidc) {
24
13
  const { provider, router } = createOIDC({
25
14
  identitySrvClient,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/identity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,WAA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DCConfig;
13
- apiKey?: boolean | string;
14
13
  oauth?: boolean;
15
14
  }
16
15
  export interface IdentityContext extends FacadeContext {
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/modules/identity/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,uBAAuB,EAAE,gBAAgB,CAAC;IAC1C,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,QAAQ,EAAE;QACR,MAAM,EAAE,qBAAqB,CAAC;KAC/B,CAAC;CACH;AAED,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAE3D,eAAO,MAAM,SAAS,aAAa,CAAC"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/modules/identity/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,uBAAuB,EAAE,gBAAgB,CAAC;IAC1C,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,QAAQ,EAAE;QACR,MAAM,EAAE,qBAAqB,CAAC;KAC/B,CAAC;CACH;AAED,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAE3D,eAAO,MAAM,SAAS,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/modules/identity/interfaces.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC"}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/modules/identity/interfaces.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC"}
@@ -107,7 +107,10 @@ export type IoRestorecommerceOrderOrder = {
107
107
  notificationEmail?: Maybe<Scalars['String']['output']>;
108
108
  customerOrderNr?: Maybe<Scalars['String']['output']>;
109
109
  customerRemark?: Maybe<Scalars['String']['output']>;
110
+ customerType?: Maybe<IoRestorecommerceCustomerCustomerType>;
111
+ customerVatId?: Maybe<Scalars['String']['output']>;
110
112
  packagingPreferences?: Maybe<IoRestorecommerceFulfillmentProductPreferences>;
113
+ paymentMethodId?: Maybe<Scalars['String']['output']>;
111
114
  };
112
115
  export type IoRestorecommerceMetaMeta = {
113
116
  __typename?: 'IoRestorecommerceMetaMeta';
@@ -657,6 +660,11 @@ export type IoRestorecommerceAddressBillingAddress = {
657
660
  contact?: Maybe<IoRestorecommerceAddressContact>;
658
661
  comments?: Maybe<Scalars['String']['output']>;
659
662
  };
663
+ export declare enum IoRestorecommerceCustomerCustomerType {
664
+ Private = 0,
665
+ Commercial = 1,
666
+ PublicSector = 2
667
+ }
660
668
  export type IoRestorecommerceFulfillmentProductPreferences = {
661
669
  __typename?: 'IoRestorecommerceFulfillmentProductPreferences';
662
670
  couriers?: Maybe<Array<IoRestorecommerceAttributeAttribute>>;
@@ -850,7 +858,10 @@ export type IIoRestorecommerceOrderOrder = {
850
858
  notificationEmail?: InputMaybe<Scalars['String']['input']>;
851
859
  customerOrderNr?: InputMaybe<Scalars['String']['input']>;
852
860
  customerRemark?: InputMaybe<Scalars['String']['input']>;
861
+ customerType?: InputMaybe<IoRestorecommerceCustomerCustomerType>;
862
+ customerVatId?: InputMaybe<Scalars['String']['input']>;
853
863
  packagingPreferences?: InputMaybe<IIoRestorecommerceFulfillmentProductPreferences>;
864
+ paymentMethodId?: InputMaybe<Scalars['String']['input']>;
854
865
  };
855
866
  export type IIoRestorecommerceMetaMeta = {
856
867
  created?: InputMaybe<Scalars['IDateTime']['input']>;
@@ -1392,6 +1403,7 @@ export type ResolversTypes = ResolversObject<{
1392
1403
  IoRestorecommerceAddressShippingAddress: ResolverTypeWrapper<IoRestorecommerceAddressShippingAddress>;
1393
1404
  IoRestorecommerceAddressContact: ResolverTypeWrapper<IoRestorecommerceAddressContact>;
1394
1405
  IoRestorecommerceAddressBillingAddress: ResolverTypeWrapper<IoRestorecommerceAddressBillingAddress>;
1406
+ IoRestorecommerceCustomerCustomerType: IoRestorecommerceCustomerCustomerType;
1395
1407
  IoRestorecommerceFulfillmentProductPreferences: ResolverTypeWrapper<IoRestorecommerceFulfillmentProductPreferences>;
1396
1408
  IoRestorecommerceStatusStatus: ResolverTypeWrapper<IoRestorecommerceStatusStatus>;
1397
1409
  IoRestorecommerceStatusOperationStatus: ResolverTypeWrapper<IoRestorecommerceStatusOperationStatus>;
@@ -1675,7 +1687,10 @@ export type IoRestorecommerceOrderOrderResolvers<ContextType = OrderingContext,
1675
1687
  notificationEmail?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
1676
1688
  customerOrderNr?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
1677
1689
  customerRemark?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
1690
+ customerType?: Resolver<Maybe<ResolversTypes['IoRestorecommerceCustomerCustomerType']>, ParentType, ContextType>;
1691
+ customerVatId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
1678
1692
  packagingPreferences?: Resolver<Maybe<ResolversTypes['IoRestorecommerceFulfillmentProductPreferences']>, ParentType, ContextType>;
1693
+ paymentMethodId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
1679
1694
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
1680
1695
  }>;
1681
1696
  export type IoRestorecommerceMetaMetaResolvers<ContextType = OrderingContext, ParentType extends ResolversParentTypes['IoRestorecommerceMetaMeta'] = ResolversParentTypes['IoRestorecommerceMetaMeta']> = ResolversObject<{
@@ -2232,6 +2247,11 @@ export type IoRestorecommerceAddressBillingAddressResolvers<ContextType = Orderi
2232
2247
  comments?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2233
2248
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
2234
2249
  }>;
2250
+ export type IoRestorecommerceCustomerCustomerTypeResolvers = {
2251
+ PRIVATE: 0;
2252
+ COMMERCIAL: 1;
2253
+ PUBLIC_SECTOR: 2;
2254
+ };
2235
2255
  export type IoRestorecommerceFulfillmentProductPreferencesResolvers<ContextType = OrderingContext, ParentType extends ResolversParentTypes['IoRestorecommerceFulfillmentProductPreferences'] = ResolversParentTypes['IoRestorecommerceFulfillmentProductPreferences']> = ResolversObject<{
2236
2256
  couriers?: Resolver<Maybe<Array<ResolversTypes['IoRestorecommerceAttributeAttribute']>>, ParentType, ContextType>;
2237
2257
  options?: Resolver<Maybe<Array<ResolversTypes['IoRestorecommerceAttributeAttribute']>>, ParentType, ContextType>;
@@ -2676,6 +2696,7 @@ export type Resolvers<ContextType = OrderingContext> = ResolversObject<{
2676
2696
  IoRestorecommerceAddressShippingAddress?: IoRestorecommerceAddressShippingAddressResolvers<ContextType>;
2677
2697
  IoRestorecommerceAddressContact?: IoRestorecommerceAddressContactResolvers<ContextType>;
2678
2698
  IoRestorecommerceAddressBillingAddress?: IoRestorecommerceAddressBillingAddressResolvers<ContextType>;
2699
+ IoRestorecommerceCustomerCustomerType?: IoRestorecommerceCustomerCustomerTypeResolvers;
2679
2700
  IoRestorecommerceFulfillmentProductPreferences?: IoRestorecommerceFulfillmentProductPreferencesResolvers<ContextType>;
2680
2701
  IoRestorecommerceStatusStatus?: IoRestorecommerceStatusStatusResolvers<ContextType>;
2681
2702
  IoRestorecommerceStatusOperationStatus?: IoRestorecommerceStatusOperationStatusResolvers<ContextType>;