@labdigital/commercetools-mock 2.17.1 → 2.18.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/dist/index.cjs +4186 -3974
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +266 -413
- package/dist/index.d.ts +266 -413
- package/dist/index.js +4186 -3974
- package/dist/index.js.map +1 -1
- package/package.json +44 -46
- package/src/constants.ts +2 -2
- package/src/ctMock.test.ts +11 -11
- package/src/ctMock.ts +141 -127
- package/src/deprecation.ts +8 -0
- package/src/exceptions.ts +17 -15
- package/src/helpers.ts +32 -32
- package/src/index.test.ts +128 -128
- package/src/index.ts +3 -3
- package/src/lib/expandParser.ts +13 -13
- package/src/lib/haversine.test.ts +9 -9
- package/src/lib/haversine.ts +11 -11
- package/src/lib/masking.ts +11 -11
- package/src/lib/parser.ts +2 -2
- package/src/lib/password.ts +23 -3
- package/src/lib/predicateParser.test.ts +185 -183
- package/src/lib/predicateParser.ts +234 -234
- package/src/lib/projectionSearchFilter.test.ts +103 -101
- package/src/lib/projectionSearchFilter.ts +152 -150
- package/src/lib/proxy.ts +5 -5
- package/src/oauth/errors.ts +4 -4
- package/src/oauth/helpers.ts +6 -6
- package/src/oauth/server.test.ts +86 -86
- package/src/oauth/server.ts +158 -144
- package/src/oauth/store.ts +44 -43
- package/src/priceSelector.test.ts +35 -35
- package/src/priceSelector.ts +30 -30
- package/src/product-projection-search.ts +136 -134
- package/src/projectAPI.test.ts +7 -7
- package/src/projectAPI.ts +24 -22
- package/src/repositories/abstract.ts +168 -116
- package/src/repositories/associate-role.ts +90 -77
- package/src/repositories/attribute-group.ts +51 -40
- package/src/repositories/business-unit.ts +168 -148
- package/src/repositories/cart/actions.ts +489 -0
- package/src/repositories/cart/helpers.ts +30 -0
- package/src/repositories/cart/index.ts +180 -0
- package/src/repositories/cart-discount/actions.ts +148 -0
- package/src/repositories/cart-discount/index.ts +86 -0
- package/src/repositories/category/actions.ts +231 -0
- package/src/repositories/category/index.ts +52 -0
- package/src/repositories/channel.ts +88 -90
- package/src/repositories/custom-object.ts +46 -45
- package/src/repositories/customer/actions.ts +165 -0
- package/src/repositories/customer/index.ts +79 -0
- package/src/repositories/customer-group.ts +66 -55
- package/src/repositories/discount-code/actions.ts +149 -0
- package/src/repositories/discount-code/index.ts +50 -0
- package/src/repositories/errors.ts +10 -10
- package/src/repositories/extension.ts +64 -62
- package/src/repositories/helpers.ts +117 -118
- package/src/repositories/index.ts +80 -79
- package/src/repositories/inventory-entry/actions.ts +84 -0
- package/src/repositories/inventory-entry/index.ts +44 -0
- package/src/repositories/my-customer.ts +114 -0
- package/src/repositories/my-order.ts +8 -8
- package/src/repositories/order/actions.ts +281 -0
- package/src/repositories/{order.test.ts → order/index.test.ts} +77 -77
- package/src/repositories/order/index.ts +260 -0
- package/src/repositories/order-edit.ts +10 -23
- package/src/repositories/payment/actions.ts +305 -0
- package/src/repositories/payment/helpers.ts +17 -0
- package/src/repositories/payment/index.ts +56 -0
- package/src/repositories/product/actions.ts +943 -0
- package/src/repositories/product/helpers.ts +98 -0
- package/src/repositories/product/index.ts +130 -0
- package/src/repositories/product-discount.ts +127 -117
- package/src/repositories/product-projection.ts +56 -62
- package/src/repositories/product-selection.ts +31 -28
- package/src/repositories/product-type.ts +136 -134
- package/src/repositories/project.ts +133 -118
- package/src/repositories/quote-request.ts +7 -19
- package/src/repositories/quote.ts +7 -22
- package/src/repositories/review.ts +13 -26
- package/src/repositories/shipping-method/actions.ts +198 -0
- package/src/repositories/shipping-method/helpers.ts +10 -0
- package/src/repositories/shipping-method/index.ts +138 -0
- package/src/repositories/shopping-list/actions.ts +295 -0
- package/src/repositories/shopping-list/index.ts +122 -0
- package/src/repositories/staged-quote.ts +7 -20
- package/src/repositories/standalone-price.ts +57 -44
- package/src/repositories/state.ts +113 -68
- package/src/repositories/store.ts +106 -94
- package/src/repositories/subscription.ts +46 -22
- package/src/repositories/tax-category/actions.ts +94 -0
- package/src/repositories/tax-category/helpers.ts +8 -0
- package/src/repositories/tax-category/index.ts +25 -0
- package/src/repositories/type/actions.ts +162 -0
- package/src/repositories/type/index.ts +24 -0
- package/src/repositories/zone.ts +62 -58
- package/src/server.ts +9 -9
- package/src/services/abstract.ts +75 -72
- package/src/services/associate-roles.test.ts +27 -27
- package/src/services/associate-roles.ts +7 -7
- package/src/services/attribute-group.ts +7 -7
- package/src/services/business-units.test.ts +28 -28
- package/src/services/business-units.ts +7 -7
- package/src/services/cart-discount.test.ts +199 -199
- package/src/services/cart-discount.ts +7 -7
- package/src/services/cart.test.ts +261 -261
- package/src/services/cart.ts +22 -21
- package/src/services/category.test.ts +121 -121
- package/src/services/category.ts +7 -7
- package/src/services/channel.ts +7 -7
- package/src/services/custom-object.test.ts +130 -130
- package/src/services/custom-object.ts +34 -31
- package/src/services/customer-group.ts +7 -7
- package/src/services/customer.test.ts +205 -205
- package/src/services/customer.ts +23 -36
- package/src/services/discount-code.ts +7 -7
- package/src/services/extension.ts +7 -7
- package/src/services/index.ts +85 -81
- package/src/services/inventory-entry.test.ts +106 -106
- package/src/services/inventory-entry.ts +7 -7
- package/src/services/my-cart.test.ts +56 -56
- package/src/services/my-cart.ts +20 -20
- package/src/services/my-customer.test.ts +155 -104
- package/src/services/my-customer.ts +61 -75
- package/src/services/my-order.ts +16 -16
- package/src/services/my-payment.test.ts +40 -40
- package/src/services/my-payment.ts +7 -7
- package/src/services/my-shopping-list.ts +7 -7
- package/src/services/order.test.ts +243 -243
- package/src/services/order.ts +23 -18
- package/src/services/payment.test.ts +40 -40
- package/src/services/payment.ts +7 -7
- package/src/services/product-discount.ts +7 -7
- package/src/services/product-projection.test.ts +190 -190
- package/src/services/product-projection.ts +34 -32
- package/src/services/product-selection.test.ts +19 -19
- package/src/services/product-selection.ts +7 -7
- package/src/services/product-type.test.ts +38 -38
- package/src/services/product-type.ts +7 -7
- package/src/services/product.test.ts +658 -656
- package/src/services/product.ts +7 -7
- package/src/services/project.test.ts +24 -24
- package/src/services/project.ts +17 -17
- package/src/services/reviews.ts +7 -7
- package/src/services/shipping-method.test.ts +78 -78
- package/src/services/shipping-method.ts +16 -16
- package/src/services/shopping-list.test.ts +170 -170
- package/src/services/shopping-list.ts +7 -7
- package/src/services/standalone-price.test.ts +112 -112
- package/src/services/standalone-price.ts +7 -7
- package/src/services/state.test.ts +30 -30
- package/src/services/state.ts +7 -7
- package/src/services/store.test.ts +40 -40
- package/src/services/store.ts +7 -7
- package/src/services/subscription.ts +7 -7
- package/src/services/tax-category.test.ts +43 -43
- package/src/services/tax-category.ts +7 -7
- package/src/services/type.ts +7 -7
- package/src/services/zone.ts +7 -7
- package/src/shippingCalculator.test.ts +43 -43
- package/src/shippingCalculator.ts +23 -23
- package/src/storage/abstract.ts +36 -34
- package/src/storage/in-memory.ts +237 -233
- package/src/storage/index.ts +2 -2
- package/src/types.ts +91 -91
- package/src/repositories/cart-discount.ts +0 -219
- package/src/repositories/cart.ts +0 -659
- package/src/repositories/category.ts +0 -256
- package/src/repositories/customer.ts +0 -228
- package/src/repositories/discount-code.ts +0 -181
- package/src/repositories/inventory-entry.ts +0 -109
- package/src/repositories/order.ts +0 -514
- package/src/repositories/payment.ts +0 -342
- package/src/repositories/product.ts +0 -1106
- package/src/repositories/shipping-method.ts +0 -312
- package/src/repositories/shopping-list.ts +0 -392
- package/src/repositories/tax-category.ts +0 -111
- package/src/repositories/type.ts +0 -172
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BusinessUnitChangeAssociateModeAction,
|
|
3
|
+
BusinessUnitChangeStatusAction,
|
|
4
|
+
BusinessUnitUpdateAction,
|
|
5
|
+
CompanyDraft,
|
|
6
|
+
DivisionDraft,
|
|
2
7
|
type Associate,
|
|
3
8
|
type BusinessUnit,
|
|
4
9
|
type BusinessUnitAddAddressAction,
|
|
@@ -13,35 +18,28 @@ import {
|
|
|
13
18
|
type BusinessUnitSetStoreModeAction,
|
|
14
19
|
type Company,
|
|
15
20
|
type Division,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from
|
|
21
|
+
} from "@commercetools/platform-sdk";
|
|
22
|
+
import { getBaseResourceProperties } from "../helpers";
|
|
23
|
+
import { AbstractStorage } from "../storage/abstract";
|
|
24
|
+
import { Writable } from "../types";
|
|
20
25
|
import {
|
|
21
26
|
AbstractResourceRepository,
|
|
27
|
+
AbstractUpdateHandler,
|
|
28
|
+
UpdateHandlerInterface,
|
|
22
29
|
type RepositoryContext,
|
|
23
|
-
} from
|
|
24
|
-
import { getBaseResourceProperties } from '../helpers.js'
|
|
30
|
+
} from "./abstract";
|
|
25
31
|
import {
|
|
26
32
|
createAddress,
|
|
27
33
|
createAssociate,
|
|
28
34
|
createCustomFields,
|
|
29
35
|
getBusinessUnitKeyReference,
|
|
30
36
|
getStoreKeyReference,
|
|
31
|
-
} from
|
|
32
|
-
import { Writable } from '../types.js'
|
|
33
|
-
|
|
34
|
-
export class BusinessUnitRepository extends AbstractResourceRepository<'business-unit'> {
|
|
35
|
-
getTypeId() {
|
|
36
|
-
return 'business-unit' as const
|
|
37
|
-
}
|
|
37
|
+
} from "./helpers";
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
private _isDivisionDraft(draft: BusinessUnitDraft): draft is DivisionDraft {
|
|
44
|
-
return draft.unitType === 'Division'
|
|
39
|
+
export class BusinessUnitRepository extends AbstractResourceRepository<"business-unit"> {
|
|
40
|
+
constructor(storage: AbstractStorage) {
|
|
41
|
+
super("business-unit", storage);
|
|
42
|
+
this.actions = new BusinessUnitUpdateHandler(this._storage);
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
create(context: RepositoryContext, draft: BusinessUnitDraft): BusinessUnit {
|
|
@@ -50,27 +48,27 @@ export class BusinessUnitRepository extends AbstractResourceRepository<'business
|
|
|
50
48
|
key: draft.key,
|
|
51
49
|
status: draft.status,
|
|
52
50
|
stores: draft.stores?.map((s) =>
|
|
53
|
-
getStoreKeyReference(s, context.projectKey, this._storage)
|
|
51
|
+
getStoreKeyReference(s, context.projectKey, this._storage),
|
|
54
52
|
),
|
|
55
53
|
storeMode: draft.storeMode,
|
|
56
54
|
name: draft.name,
|
|
57
55
|
contactEmail: draft.contactEmail,
|
|
58
56
|
addresses: draft.addresses?.map((a) =>
|
|
59
|
-
createAddress(a, context.projectKey, this._storage)
|
|
57
|
+
createAddress(a, context.projectKey, this._storage),
|
|
60
58
|
),
|
|
61
59
|
custom: createCustomFields(
|
|
62
60
|
draft.custom,
|
|
63
61
|
context.projectKey,
|
|
64
|
-
this._storage
|
|
62
|
+
this._storage,
|
|
65
63
|
),
|
|
66
64
|
shippingAddressIds: draft.shippingAddresses,
|
|
67
65
|
defaultShippingAddressId: draft.defaultShippingAddress,
|
|
68
66
|
billingAddressIds: draft.billingAddresses,
|
|
69
67
|
associateMode: draft.associateMode,
|
|
70
68
|
associates: draft.associates?.map((a) =>
|
|
71
|
-
createAssociate(a, context.projectKey, this._storage)
|
|
69
|
+
createAssociate(a, context.projectKey, this._storage),
|
|
72
70
|
),
|
|
73
|
-
}
|
|
71
|
+
};
|
|
74
72
|
|
|
75
73
|
if (this._isDivisionDraft(draft)) {
|
|
76
74
|
const division = {
|
|
@@ -78,138 +76,160 @@ export class BusinessUnitRepository extends AbstractResourceRepository<'business
|
|
|
78
76
|
parentUnit: getBusinessUnitKeyReference(
|
|
79
77
|
draft.parentUnit,
|
|
80
78
|
context.projectKey,
|
|
81
|
-
this._storage
|
|
79
|
+
this._storage,
|
|
82
80
|
),
|
|
83
|
-
} as Division
|
|
81
|
+
} as Division;
|
|
84
82
|
|
|
85
|
-
this.saveNew(context, division)
|
|
86
|
-
return division
|
|
83
|
+
this.saveNew(context, division);
|
|
84
|
+
return division;
|
|
87
85
|
} else if (this._isCompanyDraft(draft)) {
|
|
88
|
-
const company = resource as Company
|
|
86
|
+
const company = resource as Company;
|
|
89
87
|
|
|
90
|
-
this.saveNew(context, company)
|
|
91
|
-
return company
|
|
88
|
+
this.saveNew(context, company);
|
|
89
|
+
return company;
|
|
92
90
|
}
|
|
93
91
|
|
|
94
|
-
throw new Error(
|
|
92
|
+
throw new Error("Invalid business unit type");
|
|
95
93
|
}
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
resource
|
|
153
|
-
|
|
154
|
-
) => {
|
|
155
|
-
resource.associateMode = storeMode
|
|
156
|
-
},
|
|
157
|
-
changeName: (
|
|
158
|
-
context: RepositoryContext,
|
|
159
|
-
resource: Writable<BusinessUnit>,
|
|
160
|
-
{ name }: BusinessUnitChangeNameAction
|
|
161
|
-
) => {
|
|
162
|
-
resource.name = name
|
|
163
|
-
},
|
|
164
|
-
changeAddress: (
|
|
165
|
-
context: RepositoryContext,
|
|
166
|
-
resource: Writable<BusinessUnit>,
|
|
167
|
-
{ address }: BusinessUnitChangeAddressAction
|
|
168
|
-
) => {
|
|
169
|
-
const newAddress = createAddress(
|
|
170
|
-
address,
|
|
171
|
-
context.projectKey,
|
|
172
|
-
this._storage
|
|
173
|
-
)
|
|
174
|
-
if (newAddress) {
|
|
175
|
-
resource.addresses.push(newAddress)
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
addStore: (
|
|
179
|
-
context: RepositoryContext,
|
|
180
|
-
resource: Writable<BusinessUnit>,
|
|
181
|
-
{ store }: BusinessUnitAddStoreAction
|
|
182
|
-
) => {
|
|
183
|
-
const newStore = getStoreKeyReference(
|
|
184
|
-
store,
|
|
185
|
-
context.projectKey,
|
|
186
|
-
this._storage
|
|
187
|
-
)
|
|
188
|
-
if (newStore) {
|
|
189
|
-
if (!resource.stores) {
|
|
190
|
-
resource.stores = []
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
resource.stores.push(newStore)
|
|
95
|
+
private _isCompanyDraft(draft: BusinessUnitDraft): draft is CompanyDraft {
|
|
96
|
+
return draft.unitType === "Company";
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
private _isDivisionDraft(draft: BusinessUnitDraft): draft is DivisionDraft {
|
|
100
|
+
return draft.unitType === "Division";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
class BusinessUnitUpdateHandler
|
|
105
|
+
extends AbstractUpdateHandler
|
|
106
|
+
implements
|
|
107
|
+
Partial<UpdateHandlerInterface<BusinessUnit, BusinessUnitUpdateAction>>
|
|
108
|
+
{
|
|
109
|
+
addAddress(
|
|
110
|
+
context: RepositoryContext,
|
|
111
|
+
resource: Writable<BusinessUnit>,
|
|
112
|
+
{ address }: BusinessUnitAddAddressAction,
|
|
113
|
+
) {
|
|
114
|
+
const newAddress = createAddress(
|
|
115
|
+
address,
|
|
116
|
+
context.projectKey,
|
|
117
|
+
this._storage,
|
|
118
|
+
);
|
|
119
|
+
if (newAddress) {
|
|
120
|
+
resource.addresses.push(newAddress);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
addAssociate(
|
|
125
|
+
context: RepositoryContext,
|
|
126
|
+
resource: Writable<BusinessUnit>,
|
|
127
|
+
{ associate }: BusinessUnitAddAssociateAction,
|
|
128
|
+
) {
|
|
129
|
+
const newAssociate = createAssociate(
|
|
130
|
+
associate,
|
|
131
|
+
context.projectKey,
|
|
132
|
+
this._storage,
|
|
133
|
+
);
|
|
134
|
+
if (newAssociate) {
|
|
135
|
+
resource.associates.push(newAssociate);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
addStore(
|
|
140
|
+
context: RepositoryContext,
|
|
141
|
+
resource: Writable<BusinessUnit>,
|
|
142
|
+
{ store }: BusinessUnitAddStoreAction,
|
|
143
|
+
) {
|
|
144
|
+
const newStore = getStoreKeyReference(
|
|
145
|
+
store,
|
|
146
|
+
context.projectKey,
|
|
147
|
+
this._storage,
|
|
148
|
+
);
|
|
149
|
+
if (newStore) {
|
|
150
|
+
if (!resource.stores) {
|
|
151
|
+
resource.stores = [];
|
|
194
152
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
153
|
+
|
|
154
|
+
resource.stores.push(newStore);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
changeAddress(
|
|
159
|
+
context: RepositoryContext,
|
|
160
|
+
resource: Writable<BusinessUnit>,
|
|
161
|
+
{ address }: BusinessUnitChangeAddressAction,
|
|
162
|
+
) {
|
|
163
|
+
const newAddress = createAddress(
|
|
164
|
+
address,
|
|
165
|
+
context.projectKey,
|
|
166
|
+
this._storage,
|
|
167
|
+
);
|
|
168
|
+
if (newAddress) {
|
|
169
|
+
resource.addresses.push(newAddress);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
changeAssociateMode(
|
|
174
|
+
context: RepositoryContext,
|
|
175
|
+
resource: Writable<BusinessUnit>,
|
|
176
|
+
{ associateMode }: BusinessUnitChangeAssociateModeAction,
|
|
177
|
+
) {
|
|
178
|
+
resource.associateMode = associateMode;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
changeName(
|
|
182
|
+
context: RepositoryContext,
|
|
183
|
+
resource: Writable<BusinessUnit>,
|
|
184
|
+
{ name }: BusinessUnitChangeNameAction,
|
|
185
|
+
) {
|
|
186
|
+
resource.name = name;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
changeParentUnit(
|
|
190
|
+
context: RepositoryContext,
|
|
191
|
+
resource: Writable<BusinessUnit>,
|
|
192
|
+
{ parentUnit }: BusinessUnitChangeParentUnitAction,
|
|
193
|
+
) {
|
|
194
|
+
resource.parentUnit = getBusinessUnitKeyReference(
|
|
195
|
+
parentUnit,
|
|
196
|
+
context.projectKey,
|
|
197
|
+
this._storage,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
changeStatus(
|
|
202
|
+
context: RepositoryContext,
|
|
203
|
+
resource: Writable<BusinessUnit>,
|
|
204
|
+
{ status }: BusinessUnitChangeStatusAction,
|
|
205
|
+
) {
|
|
206
|
+
resource.status = status;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
setAssociates(
|
|
210
|
+
context: RepositoryContext,
|
|
211
|
+
resource: Writable<BusinessUnit>,
|
|
212
|
+
{ associates }: BusinessUnitSetAssociatesAction,
|
|
213
|
+
) {
|
|
214
|
+
const newAssociates = associates
|
|
215
|
+
.map((a) => createAssociate(a, context.projectKey, this._storage))
|
|
216
|
+
.filter((a): a is Writable<Associate> => a !== undefined);
|
|
217
|
+
resource.associates = newAssociates || undefined;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
setContactEmail(
|
|
221
|
+
context: RepositoryContext,
|
|
222
|
+
resource: Writable<BusinessUnit>,
|
|
223
|
+
{ contactEmail }: BusinessUnitSetContactEmailAction,
|
|
224
|
+
) {
|
|
225
|
+
resource.contactEmail = contactEmail;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
setStoreMode(
|
|
229
|
+
context: RepositoryContext,
|
|
230
|
+
resource: Writable<BusinessUnit>,
|
|
231
|
+
{ storeMode }: BusinessUnitSetStoreModeAction,
|
|
232
|
+
) {
|
|
233
|
+
resource.storeMode = storeMode;
|
|
214
234
|
}
|
|
215
235
|
}
|