@dropins/storefront-checkout 2.2.0-alpha3 → 2.2.0-alpha4

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.
@@ -18,6 +18,9 @@ export type RenderAPI = {
18
18
  remove: () => void;
19
19
  setProps: (cb: (prev: any) => any) => void;
20
20
  };
21
+ export type EventSubscription = {
22
+ off: () => void;
23
+ } | undefined;
21
24
  export type FormRef = {
22
25
  handleValidationSubmit: (disableShowError: boolean) => boolean;
23
26
  isDataValid: boolean;
@@ -115,51 +118,245 @@ interface ItemLinks {
115
118
  count: number;
116
119
  result: string;
117
120
  }
121
+ export interface ShippingAddress {
122
+ uid?: string;
123
+ firstname: string;
124
+ lastname: string;
125
+ company?: string;
126
+ street: string[];
127
+ city: string;
128
+ region?: {
129
+ code: string;
130
+ label: string;
131
+ regionId: number;
132
+ };
133
+ postcode: string;
134
+ country: {
135
+ code: string;
136
+ label: string;
137
+ };
138
+ telephone: string;
139
+ }
118
140
  export interface NegotiableQuoteModel {
119
141
  uid: string;
142
+ name: string;
120
143
  createdAt: string;
121
- status: string;
144
+ salesRepName: string;
145
+ expirationDate: string;
146
+ updatedAt: string;
147
+ status: NegotiableQuoteStatus;
122
148
  buyer: {
123
149
  firstname: string;
124
150
  lastname: string;
125
151
  };
126
- comments: {
152
+ templateName?: string;
153
+ comments?: {
127
154
  uid: string;
128
155
  createdAt: string;
129
156
  author: {
130
157
  firstname: string;
131
158
  lastname: string;
132
159
  };
133
- }[];
134
- items: {
135
- product: {
136
- uid: string;
137
- sku: string;
160
+ text: string;
161
+ attachments?: {
138
162
  name: string;
139
- priceRange: {
140
- maximumPrice: {
141
- regularPrice: {
142
- value: number;
143
- };
163
+ url: string;
164
+ }[];
165
+ }[];
166
+ history?: NegotiableQuoteHistoryEntry[];
167
+ prices: {
168
+ appliedDiscounts?: Discount[];
169
+ appliedTaxes?: Tax[];
170
+ discount?: Currency;
171
+ grandTotal?: Currency;
172
+ grandTotalExcludingTax?: Currency;
173
+ shippingExcludingTax?: Currency;
174
+ shippingIncludingTax?: Currency;
175
+ subtotalExcludingTax?: Currency;
176
+ subtotalIncludingTax?: Currency;
177
+ subtotalWithDiscountExcludingTax?: Currency;
178
+ totalTax?: Currency;
179
+ };
180
+ items: NegotiableQuoteCartItem[];
181
+ shippingAddresses?: ShippingAddress[];
182
+ canCheckout: boolean;
183
+ canSendForReview: boolean;
184
+ }
185
+ export interface NegotiableQuoteCartItem {
186
+ product: {
187
+ uid: string;
188
+ sku: string;
189
+ name: string;
190
+ templateId?: string;
191
+ templateName?: string;
192
+ priceRange: {
193
+ maximumPrice: {
194
+ regularPrice: {
195
+ value: number;
144
196
  };
145
197
  };
146
198
  };
147
- quantity: number;
148
- prices: {
149
- subtotalExcludingTax: {
150
- value: number;
151
- };
152
- subtotalIncludingTax: {
153
- value: number;
154
- };
155
- subtotalWithDiscountExcludingTax: {
156
- value: number;
157
- };
158
- grandTotal: {
159
- value: number;
160
- };
161
- };
199
+ };
200
+ catalogDiscount: {
201
+ amountOff: number;
202
+ percentOff: number;
203
+ };
204
+ discounts: {
205
+ label: string;
206
+ value: string;
207
+ amount: Currency;
208
+ }[];
209
+ stockStatus: string;
210
+ quantity: number;
211
+ prices: {
212
+ originalItemPrice: Currency;
213
+ rowTotal: Currency;
214
+ };
215
+ configurableOptions?: {
216
+ optionLabel: string;
217
+ valueLabel: string;
162
218
  }[];
219
+ bundleOptions?: {
220
+ label: string;
221
+ values: {
222
+ label: string;
223
+ quantity: number;
224
+ originalPrice: Currency;
225
+ price: Currency;
226
+ }[];
227
+ }[];
228
+ noteFromBuyer?: ItemNote[];
229
+ noteFromSeller?: ItemNote[];
230
+ }
231
+ export interface ItemNote {
232
+ createdAt: string;
233
+ creatorId: number;
234
+ creatorType: number;
235
+ negotiableQuoteItemUid: string;
236
+ note: string;
237
+ noteUid: string;
238
+ }
239
+ export interface Currency {
240
+ value: number;
241
+ currency: string;
242
+ }
243
+ export interface Tax {
244
+ amount: Currency;
245
+ label: string;
246
+ }
247
+ export interface Discount {
248
+ amount: Currency;
249
+ label: string;
250
+ coupon?: Coupon;
251
+ }
252
+ export interface Coupon {
253
+ code: string;
254
+ }
255
+ export interface NegotiableQuoteListEntry {
256
+ uid: string;
257
+ name: string;
258
+ createdAt: string;
259
+ updatedAt: string;
260
+ status: NegotiableQuoteStatus;
261
+ buyer: {
262
+ firstname: string;
263
+ lastname: string;
264
+ };
265
+ templateName: string;
266
+ prices: {
267
+ grandTotal: Currency;
268
+ };
269
+ }
270
+ export interface NegotiableQuotesListModel {
271
+ items: NegotiableQuoteListEntry[];
272
+ pageInfo: {
273
+ currentPage: number;
274
+ pageSize: number;
275
+ totalPages: number;
276
+ };
277
+ totalCount: number;
278
+ paginationInfo?: PaginationInfo;
279
+ sortFields?: {
280
+ default: string;
281
+ options: Array<{
282
+ label: string;
283
+ value: string;
284
+ }>;
285
+ };
286
+ }
287
+ export interface NegotiableQuoteHistoryEntry {
288
+ author: {
289
+ firstname: string;
290
+ lastname: string;
291
+ };
292
+ changeType: NegotiableQuoteHistoryEntryChangeType;
293
+ changes: {
294
+ commentAdded?: {
295
+ comment: string;
296
+ };
297
+ customChanges?: {
298
+ new_value: string;
299
+ old_value: string;
300
+ title: string;
301
+ };
302
+ expiration?: {
303
+ newExpiration: string;
304
+ oldExpiration: string;
305
+ };
306
+ productsRemoved?: {
307
+ productsRemovedFromCatalog: string[];
308
+ productsRemovedFromQuote?: {
309
+ uid: string;
310
+ name: string;
311
+ sku: string;
312
+ quantity: number;
313
+ }[];
314
+ };
315
+ statuses?: {
316
+ changes: {
317
+ newStatus: string;
318
+ oldStatus: string;
319
+ }[];
320
+ };
321
+ total?: {
322
+ newPrice: Currency;
323
+ oldPrice: Currency;
324
+ };
325
+ };
326
+ createdAt: string;
327
+ uid: string;
328
+ }
329
+ export declare enum NegotiableQuoteHistoryEntryChangeType {
330
+ CREATED = "CREATED",
331
+ UPDATED = "UPDATED",
332
+ CLOSED = "CLOSED",
333
+ UPDATED_BY_SYSTEM = "UPDATED_BY_SYSTEM"
334
+ }
335
+ export declare enum NegotiableQuoteStatus {
336
+ NEW = "NEW",
337
+ SUBMITTED = "SUBMITTED",
338
+ PENDING = "PENDING",
339
+ UPDATED = "UPDATED",
340
+ OPEN = "OPEN",
341
+ ORDERED = "ORDERED",
342
+ CLOSED = "CLOSED",
343
+ DECLINED = "DECLINED",
344
+ EXPIRED = "EXPIRED",
345
+ DRAFT = "DRAFT"
346
+ }
347
+ export interface PaginationInfo {
348
+ currentPage: number;
349
+ totalCount: number;
350
+ pageSize: number;
351
+ startItem: number;
352
+ endItem: number;
353
+ totalPages: number;
354
+ pageSizeOptions?: number[];
355
+ }
356
+ export interface PermissionsModel {
357
+ all?: boolean;
358
+ admin?: boolean;
359
+ [key: string]: boolean | undefined;
163
360
  }
164
361
  export {};
165
362
  //# sourceMappingURL=storefront.d.ts.map