@gradientedge/commercetools-utils 4.12.1 → 4.13.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.
@@ -4,6 +4,7 @@ import { CustomerGroupReference, CustomerGroupResourceIdentifier } from './custo
4
4
  import { StoreKeyReference, StoreResourceIdentifier } from './store';
5
5
  import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
6
6
  export declare type AnonymousCartSignInMode = 'MergeWithExistingCustomerCart' | 'UseAsNewActiveCustomerCart';
7
+ export declare type AuthenticationMode = 'ExternalAuth' | 'Password';
7
8
  export interface Customer extends BaseResource {
8
9
  readonly id: string;
9
10
  readonly version: number;
@@ -13,7 +14,7 @@ export interface Customer extends BaseResource {
13
14
  readonly createdBy?: CreatedBy;
14
15
  readonly customerNumber?: string;
15
16
  readonly email: string;
16
- readonly password: string;
17
+ readonly password?: string;
17
18
  readonly firstName?: string;
18
19
  readonly lastName?: string;
19
20
  readonly middleName?: string;
@@ -34,6 +35,7 @@ export interface Customer extends BaseResource {
34
35
  readonly salutation?: string;
35
36
  readonly key?: string;
36
37
  readonly stores?: StoreKeyReference[];
38
+ readonly authenticationMode?: AuthenticationMode;
37
39
  }
38
40
  export interface CustomerChangePassword {
39
41
  readonly id: string;
@@ -53,7 +55,7 @@ export interface CustomerCreatePasswordResetToken {
53
55
  export interface CustomerDraft {
54
56
  readonly customerNumber?: string;
55
57
  readonly email: string;
56
- readonly password: string;
58
+ readonly password?: string;
57
59
  readonly firstName?: string;
58
60
  readonly lastName?: string;
59
61
  readonly middleName?: string;
@@ -77,6 +79,7 @@ export interface CustomerDraft {
77
79
  readonly salutation?: string;
78
80
  readonly key?: string;
79
81
  readonly stores?: StoreResourceIdentifier[];
82
+ readonly authenticationMode?: AuthenticationMode;
80
83
  }
81
84
  export interface CustomerEmailVerify {
82
85
  readonly version?: number;
@@ -129,7 +132,7 @@ export interface CustomerUpdate {
129
132
  readonly version: number;
130
133
  readonly actions: CustomerUpdateAction[];
131
134
  }
132
- export declare type CustomerUpdateAction = CustomerAddAddressAction | CustomerAddBillingAddressIdAction | CustomerAddShippingAddressIdAction | CustomerAddStoreAction | CustomerChangeAddressAction | CustomerChangeEmailAction | CustomerRemoveAddressAction | CustomerRemoveBillingAddressIdAction | CustomerRemoveShippingAddressIdAction | CustomerRemoveStoreAction | CustomerSetAddressCustomFieldAction | CustomerSetAddressCustomTypeAction | CustomerSetCompanyNameAction | CustomerSetCustomFieldAction | CustomerSetCustomTypeAction | CustomerSetCustomerGroupAction | CustomerSetCustomerNumberAction | CustomerSetDateOfBirthAction | CustomerSetDefaultBillingAddressAction | CustomerSetDefaultShippingAddressAction | CustomerSetExternalIdAction | CustomerSetFirstNameAction | CustomerSetKeyAction | CustomerSetLastNameAction | CustomerSetLocaleAction | CustomerSetMiddleNameAction | CustomerSetSalutationAction | CustomerSetStoresAction | CustomerSetTitleAction | CustomerSetVatIdAction;
135
+ export declare type CustomerUpdateAction = CustomerAddAddressAction | CustomerAddBillingAddressIdAction | CustomerAddShippingAddressIdAction | CustomerAddStoreAction | CustomerChangeAddressAction | CustomerChangeEmailAction | CustomerRemoveAddressAction | CustomerRemoveBillingAddressIdAction | CustomerRemoveShippingAddressIdAction | CustomerRemoveStoreAction | CustomerSetAddressCustomFieldAction | CustomerSetAddressCustomTypeAction | CustomerSetAuthenticationModeAction | CustomerSetCompanyNameAction | CustomerSetCustomFieldAction | CustomerSetCustomTypeAction | CustomerSetCustomerGroupAction | CustomerSetCustomerNumberAction | CustomerSetDateOfBirthAction | CustomerSetDefaultBillingAddressAction | CustomerSetDefaultShippingAddressAction | CustomerSetExternalIdAction | CustomerSetFirstNameAction | CustomerSetKeyAction | CustomerSetLastNameAction | CustomerSetLocaleAction | CustomerSetMiddleNameAction | CustomerSetSalutationAction | CustomerSetStoresAction | CustomerSetTitleAction | CustomerSetVatIdAction;
133
136
  export interface MyCustomerChangePassword {
134
137
  readonly version: number;
135
138
  readonly currentPassword: string;
@@ -198,6 +201,11 @@ export interface CustomerSetAddressCustomTypeAction {
198
201
  readonly fields?: FieldContainer;
199
202
  readonly addressId: string;
200
203
  }
204
+ export interface CustomerSetAuthenticationModeAction {
205
+ readonly action: 'setAuthenticationMode';
206
+ readonly authMode: AuthenticationMode;
207
+ readonly password?: string;
208
+ }
201
209
  export interface CustomerSetCompanyNameAction {
202
210
  readonly action: 'setCompanyName';
203
211
  readonly companyName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/commercetools-utils",
3
- "version": "4.12.1",
3
+ "version": "4.13.0",
4
4
  "description": "Provide utility classes and functions for interacting with the commercetools API",
5
5
  "main": "./dist/ge-commercetools-utils-node.cjs.js",
6
6
  "module": "./dist/ge-commercetools-utils-node.esm.js",