@equipmyschool/emsweb3-models 1.0.49 → 1.0.52

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/enums.ts CHANGED
File without changes
package/index.d.ts CHANGED
@@ -66,8 +66,8 @@ export interface Campaign {
66
66
  Title: string;
67
67
  Introduction: string;
68
68
  TermsAndConditions: string;
69
- StartDate?: Date;
70
- EndDate?: Date;
69
+ StartDate: Date;
70
+ EndDate: Date;
71
71
  Status: CampaignStatus;
72
72
  Supplier: Supplier;
73
73
  }
@@ -93,8 +93,18 @@ export interface Company {
93
93
  Name: string;
94
94
  Type: CompanyType;
95
95
  }
96
+ export interface EMSProductImageSearchRequest {
97
+ Product: number;
98
+ Supplier: number;
99
+ Code: string;
100
+ }
101
+ export interface EMSProductImageSearchResponse {
102
+ ProductID: number;
103
+ CommonDetailID: number;
104
+ ImageUrl: string;
105
+ }
96
106
  export interface FolderInfoBase extends IActionable, FolderBase {
97
- ProjectID?: number;
107
+ ProjectID: number;
98
108
  FolderID: number;
99
109
  CurrencySymbol: string;
100
110
  TotalLines: number;
@@ -141,7 +151,7 @@ export interface Credential {
141
151
  RememberMe: boolean;
142
152
  }
143
153
  export interface Department {
144
- DepartmentID?: number;
154
+ DepartmentID: number;
145
155
  Name: string;
146
156
  }
147
157
  export interface EditPriorityRequest {
@@ -158,7 +168,7 @@ export interface EmailActionResponse {
158
168
  Message: string;
159
169
  }
160
170
  export interface ExtendedDepartment extends Department {
161
- ProductCount?: number;
171
+ ProductCount: number;
162
172
  Children: ExtendedDepartment[];
163
173
  }
164
174
  export interface FacetResponse {
@@ -193,9 +203,9 @@ export interface FacetsStringResponse extends FacetBase {
193
203
  Values: ValueCount[];
194
204
  }
195
205
  export interface Folder extends FolderBase {
196
- FolderID?: number;
206
+ FolderID: number;
197
207
  ParentFolderID: number;
198
- OwnerID?: number;
208
+ OwnerID: number;
199
209
  }
200
210
  export interface FolderBase {
201
211
  Name: string;
@@ -203,7 +213,7 @@ export interface FolderBase {
203
213
  }
204
214
  export interface FolderInfo extends IActionable, FolderInfoBase {
205
215
  /** The id of the parent folder. If the folder is actually a project, or if it is a root folder of a project, this field is null. */
206
- ParentFolderID?: number;
216
+ ParentFolderID: number;
207
217
  Owner: User;
208
218
  Unallocated: number;
209
219
  FolderCount: number;
@@ -251,8 +261,8 @@ export interface IProject {
251
261
  ProjectID: number;
252
262
  Name: string;
253
263
  Status: ProjectStatus;
254
- RequiredArrivalDate?: Date;
255
- RequiredClosureDate?: Date;
264
+ RequiredArrivalDate: Date;
265
+ RequiredClosureDate: Date;
256
266
  }
257
267
  export interface Item {
258
268
  ItemID: number;
@@ -265,6 +275,9 @@ export interface ItemActivity extends Activity {
265
275
  Quantity: number;
266
276
  Price: number;
267
277
  Currency: string;
278
+ Supplier: string;
279
+ ProductCode: string;
280
+ Url: string;
268
281
  }
269
282
  export interface ItemCopyRequest {
270
283
  SourceOrderID: number;
@@ -284,14 +297,14 @@ export interface ItemInfo {
284
297
  Title: string;
285
298
  Description: string;
286
299
  Status: string;
287
- ETA?: Date;
300
+ ETA: Date;
288
301
  Quantity: number;
289
302
  Unit: string;
290
303
  HasMessages: boolean;
291
304
  Priority: ItemPriority;
292
- UnitPrice?: number;
293
- Value?: number;
294
- Discount?: number;
305
+ UnitPrice: number;
306
+ Value: number;
307
+ Discount: number;
295
308
  CurrencySymbol: string;
296
309
  /** The ID of the group of variants. */
297
310
  CommonDetailID: number;
@@ -313,12 +326,17 @@ export interface JWTPayload {
313
326
  /** Discount structure */
314
327
  D: JWTDiscount[];
315
328
  /** School Group ID */
316
- G?: number;
329
+ G: number;
317
330
  /**
318
331
  * List of preferred vendor IDs
319
- * Empty List == no preferences
332
+ * Empty List == all suppliers shown
320
333
  */
321
334
  V: number[];
335
+ /**
336
+ * List of blacklisted vendor IDs
337
+ * Empty List == all suppliers allowed
338
+ */
339
+ B: number[];
322
340
  /** List of allowed supplier countries */
323
341
  C: number[];
324
342
  }
@@ -329,9 +347,9 @@ export interface Location {
329
347
  Country: string;
330
348
  }
331
349
  export interface NavDepartmentRequest {
332
- DepartmentID?: number;
333
- SearchID?: number;
334
- SimilarTo?: number;
350
+ DepartmentID: number;
351
+ SearchID: number;
352
+ SimilarTo: number;
335
353
  }
336
354
  export interface NotificationAction {
337
355
  ProjectID: number;
@@ -390,7 +408,7 @@ export interface OrderInfo extends IActionable, IApprovable, FolderInfoBase {
390
408
  CanApprove: boolean;
391
409
  }
392
410
  export interface OrderInfoCollection extends IProject, IActionable {
393
- FolderID?: number;
411
+ FolderID: number;
394
412
  FolderName: string;
395
413
  FolderBudget: number;
396
414
  Owner: User;
@@ -403,8 +421,8 @@ export interface OrderInfoCollection extends IProject, IActionable {
403
421
  ProjectID: number;
404
422
  ProjectName: string;
405
423
  Status: ProjectStatus;
406
- RequiredArrivalDate?: Date;
407
- RequiredClosureDate?: Date;
424
+ RequiredArrivalDate: Date;
425
+ RequiredClosureDate: Date;
408
426
  }
409
427
  export interface OrderRejectRequest {
410
428
  OrderID: number;
@@ -423,12 +441,12 @@ export interface ProblemType {
423
441
  ProblemType: string;
424
442
  }
425
443
  export interface ProductDetailRequest {
426
- CommonDetailID?: number;
427
- SearchID?: number;
428
- Position?: number;
444
+ CommonDetailID: number;
445
+ SearchID: number;
446
+ Position: number;
429
447
  }
430
448
  export interface ProductDetails extends ProductDetailsBase {
431
- CampaignID?: number;
449
+ CampaignID: number;
432
450
  Description: string;
433
451
  Products: ProductVariation[];
434
452
  Specifications: FacetBase[];
@@ -460,8 +478,8 @@ export interface ProductPageDetails {
460
478
  ProductPageID: number;
461
479
  Url: string;
462
480
  ErrorCount: number;
463
- LastChecked?: Date;
464
- NextCheck?: Date;
481
+ LastChecked: Date;
482
+ NextCheck: Date;
465
483
  }
466
484
  export interface ProductSearchDepartment {
467
485
  DepartmentID: number;
@@ -470,9 +488,9 @@ export interface ProductSearchDepartment {
470
488
  }
471
489
  export interface ProductSearchResult extends ProductDetailsBase {
472
490
  ImageUrl: string;
473
- OverlayID?: number;
491
+ OverlayID: number;
474
492
  /** The ID of one specific variant product. */
475
- ProductID?: number;
493
+ ProductID: number;
476
494
  Variations: number;
477
495
  }
478
496
  export interface ProductToOrder {
@@ -497,21 +515,21 @@ export interface ProductVariation {
497
515
  export interface ProductVariationEMS extends ProductVariation {
498
516
  EMSDiscount: number;
499
517
  EMSProductStatus: string;
500
- LastImported?: Date;
501
- LastUpdated?: Date;
502
- PricingExpiry?: Date;
518
+ LastImported: Date;
519
+ LastUpdated: Date;
520
+ PricingExpiry: Date;
503
521
  RRP: number;
504
522
  }
505
523
  export interface Project {
506
524
  /** The Id of the project. If 0, the project is a wishlist. */
507
525
  ProjectID: number;
508
526
  Name: string;
509
- Budget?: number;
527
+ Budget: number;
510
528
  DeliveryAddressID: number;
511
529
  InvoiceAddressID: number;
512
530
  CurrencyID: number;
513
531
  FreightContactID: number;
514
- RequiredArrivalDate?: Date;
532
+ RequiredArrivalDate: Date;
515
533
  SourceProjectID: number;
516
534
  RetainDepartments: boolean;
517
535
  RetainBudgets: boolean;
@@ -525,9 +543,9 @@ export interface ProjectClosureResponse {
525
543
  export interface ProjectInfo extends IActionable, IProject, FolderInfo {
526
544
  DeliveryAddressID: number;
527
545
  InvoiceAddressID: number;
528
- FreightContactID?: number;
546
+ FreightContactID: number;
529
547
  CurrencyID: number;
530
- ClosureYear?: number;
548
+ ClosureYear: number;
531
549
  TotalOrders: number;
532
550
  CompleteOrders: number;
533
551
  PartialOrders: number;
@@ -535,8 +553,20 @@ export interface ProjectInfo extends IActionable, IProject, FolderInfo {
535
553
  ProjectID: number;
536
554
  Name: string;
537
555
  Status: ProjectStatus;
538
- RequiredArrivalDate?: Date;
539
- RequiredClosureDate?: Date;
556
+ RequiredArrivalDate: Date;
557
+ RequiredClosureDate: Date;
558
+ }
559
+ export interface ProjectSummary {
560
+ ProjectID: number;
561
+ FolderID: number;
562
+ OrderID: number;
563
+ OrderReference: string;
564
+ LineCount: number;
565
+ BudgetAllocation: number;
566
+ Spent: number;
567
+ Submitted: boolean;
568
+ Reviewer: string;
569
+ OrderManager: User;
540
570
  }
541
571
  export interface ProjectTreeNode extends IActionable {
542
572
  ID: number;
@@ -568,11 +598,11 @@ export interface RequestForFunds {
568
598
  Reason: string;
569
599
  }
570
600
  export interface SearchRequest {
571
- Page?: number;
572
- Size?: number;
601
+ Page: number;
602
+ Size: number;
573
603
  Keywords: string;
574
- DepartmentID?: number;
575
- CampaignID?: number;
604
+ DepartmentID: number;
605
+ CampaignID: number;
576
606
  SupplierIDs: number[];
577
607
  StringFacets: FacetsStringRequest[];
578
608
  NumberFacets: FacetsNumberRequest[];
@@ -592,7 +622,7 @@ export interface ShopCampaign extends Campaign {
592
622
  CustomerDiscount: number;
593
623
  LargeBannerImageUrl: string;
594
624
  SmallBannerImageUrl: string;
595
- OverlayID?: number;
625
+ OverlayID: number;
596
626
  }
597
627
  export interface Summary {
598
628
  YearsExperience: number;
package/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equipmyschool/emsweb3-models",
3
- "version": "1.0.49",
3
+ "version": "1.0.52",
4
4
  "description": "Shared Models for EMS Web Projects",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"