@tolinax/ayoune-interfaces 2026.26.0 → 2026.28.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.
@@ -136,6 +136,7 @@ export declare enum aMN {
136
136
  aYOUneUsers = "aYOUneUsers",
137
137
  aYOUneVariables = "aYOUneVariables",
138
138
  aYOUneWidgets = "aYOUneWidgets",
139
+ Backorders = "Backorders",
139
140
  BankAccounts = "BankAccounts",
140
141
  BankTurnovers = "BankTurnovers",
141
142
  Beacons = "Beacons",
@@ -406,6 +407,7 @@ export declare enum aMN {
406
407
  IndustryKPIs = "IndustryKPIs",
407
408
  MarketResearches = "MarketResearches",
408
409
  Markets = "Markets",
410
+ MaterialCommissionings = "MaterialCommissionings",
409
411
  MeetingLocations = "MeetingLocations",
410
412
  MeetingMinutes = "MeetingMinutes",
411
413
  Meetings = "Meetings",
@@ -443,12 +445,14 @@ export declare enum aMN {
443
445
  OwnDatas = "OwnDatas",
444
446
  OwnDataTemplates = "OwnDataTemplates",
445
447
  OwnValues = "OwnValues",
448
+ PackConfirmations = "PackConfirmations",
446
449
  PackLists = "PackLists",
447
450
  PageStats = "PageStats",
448
451
  PATs = "PATs",
449
452
  PaymentGroups = "PaymentGroups",
450
453
  PaymentProviders = "PaymentProviders",
451
454
  PermissionRequests = "PermissionRequests",
455
+ PickLists = "PickLists",
452
456
  PimSelections = "PimSelections",
453
457
  Pipelines = "Pipelines",
454
458
  Polls = "Polls",
@@ -495,6 +499,7 @@ export declare enum aMN {
495
499
  PublicationRuns = "PublicationRuns",
496
500
  Publications = "Publications",
497
501
  PublisherAPIs = "PublisherAPIs",
502
+ PutAwayOrders = "PutAwayOrders",
498
503
  PushClicks = "PushClicks",
499
504
  PushDeliveries = "PushDeliveries",
500
505
  PushErrors = "PushErrors",
@@ -512,12 +517,14 @@ export declare enum aMN {
512
517
  Reminders = "Reminders",
513
518
  References = "References",
514
519
  CustomerLogos = "CustomerLogos",
520
+ ReplenishmentOrders = "ReplenishmentOrders",
515
521
  Reports = "Reports",
516
522
  ReportTemplates = "ReportTemplates",
517
523
  Repositories = "Repositories",
518
524
  Requirements = "Requirements",
519
525
  ResearchBudgets = "ResearchBudgets",
520
526
  Retrospectives = "Retrospectives",
527
+ ReturnOrders = "ReturnOrders",
521
528
  RewardLogs = "RewardLogs",
522
529
  RewardRules = "RewardRules",
523
530
  RunningPipelines = "RunningPipelines",
@@ -571,6 +578,7 @@ export declare enum aMN {
571
578
  StateLogs = "StateLogs",
572
579
  States = "States",
573
580
  StockLogs = "StockLogs",
581
+ StockReservations = "StockReservations",
574
582
  Stocks = "Stocks",
575
583
  StorageAreas = "StorageAreas",
576
584
  StoreAssets = "StoreAssets",
@@ -140,6 +140,7 @@ var aMN;
140
140
  aMN["aYOUneUsers"] = "aYOUneUsers";
141
141
  aMN["aYOUneVariables"] = "aYOUneVariables";
142
142
  aMN["aYOUneWidgets"] = "aYOUneWidgets";
143
+ aMN["Backorders"] = "Backorders";
143
144
  aMN["BankAccounts"] = "BankAccounts";
144
145
  aMN["BankTurnovers"] = "BankTurnovers";
145
146
  aMN["Beacons"] = "Beacons";
@@ -410,6 +411,7 @@ var aMN;
410
411
  aMN["IndustryKPIs"] = "IndustryKPIs";
411
412
  aMN["MarketResearches"] = "MarketResearches";
412
413
  aMN["Markets"] = "Markets";
414
+ aMN["MaterialCommissionings"] = "MaterialCommissionings";
413
415
  aMN["MeetingLocations"] = "MeetingLocations";
414
416
  aMN["MeetingMinutes"] = "MeetingMinutes";
415
417
  aMN["Meetings"] = "Meetings";
@@ -447,12 +449,14 @@ var aMN;
447
449
  aMN["OwnDatas"] = "OwnDatas";
448
450
  aMN["OwnDataTemplates"] = "OwnDataTemplates";
449
451
  aMN["OwnValues"] = "OwnValues";
452
+ aMN["PackConfirmations"] = "PackConfirmations";
450
453
  aMN["PackLists"] = "PackLists";
451
454
  aMN["PageStats"] = "PageStats";
452
455
  aMN["PATs"] = "PATs";
453
456
  aMN["PaymentGroups"] = "PaymentGroups";
454
457
  aMN["PaymentProviders"] = "PaymentProviders";
455
458
  aMN["PermissionRequests"] = "PermissionRequests";
459
+ aMN["PickLists"] = "PickLists";
456
460
  aMN["PimSelections"] = "PimSelections";
457
461
  aMN["Pipelines"] = "Pipelines";
458
462
  aMN["Polls"] = "Polls";
@@ -499,6 +503,7 @@ var aMN;
499
503
  aMN["PublicationRuns"] = "PublicationRuns";
500
504
  aMN["Publications"] = "Publications";
501
505
  aMN["PublisherAPIs"] = "PublisherAPIs";
506
+ aMN["PutAwayOrders"] = "PutAwayOrders";
502
507
  aMN["PushClicks"] = "PushClicks";
503
508
  aMN["PushDeliveries"] = "PushDeliveries";
504
509
  aMN["PushErrors"] = "PushErrors";
@@ -516,12 +521,14 @@ var aMN;
516
521
  aMN["Reminders"] = "Reminders";
517
522
  aMN["References"] = "References";
518
523
  aMN["CustomerLogos"] = "CustomerLogos";
524
+ aMN["ReplenishmentOrders"] = "ReplenishmentOrders";
519
525
  aMN["Reports"] = "Reports";
520
526
  aMN["ReportTemplates"] = "ReportTemplates";
521
527
  aMN["Repositories"] = "Repositories";
522
528
  aMN["Requirements"] = "Requirements";
523
529
  aMN["ResearchBudgets"] = "ResearchBudgets";
524
530
  aMN["Retrospectives"] = "Retrospectives";
531
+ aMN["ReturnOrders"] = "ReturnOrders";
525
532
  aMN["RewardLogs"] = "RewardLogs";
526
533
  aMN["RewardRules"] = "RewardRules";
527
534
  aMN["RunningPipelines"] = "RunningPipelines";
@@ -575,6 +582,7 @@ var aMN;
575
582
  aMN["StateLogs"] = "StateLogs";
576
583
  aMN["States"] = "States";
577
584
  aMN["StockLogs"] = "StockLogs";
585
+ aMN["StockReservations"] = "StockReservations";
578
586
  aMN["Stocks"] = "Stocks";
579
587
  aMN["StorageAreas"] = "StorageAreas";
580
588
  aMN["StoreAssets"] = "StoreAssets";
@@ -1691,6 +1691,16 @@ const modelsAndRights = [
1691
1691
  searchable: true,
1692
1692
  searchableFields: ['name', 'description'],
1693
1693
  },
1694
+ {
1695
+ plural: "Backorders",
1696
+ singular: "Backorder",
1697
+ module: "warehouse",
1698
+ right: "warehouse.backorders",
1699
+ readOnly: false,
1700
+ importable: false,
1701
+ allowDuplicate: false,
1702
+ updateBy: "_id",
1703
+ },
1694
1704
  {
1695
1705
  plural: "BankAccounts",
1696
1706
  singular: "BankAccount",
@@ -4266,6 +4276,16 @@ const modelsAndRights = [
4266
4276
  allowDuplicate: false,
4267
4277
  updateBy: "_id",
4268
4278
  },
4279
+ {
4280
+ plural: "MaterialCommissionings",
4281
+ singular: "MaterialCommissioning",
4282
+ module: "warehouse",
4283
+ right: "warehouse.materialcommissionings",
4284
+ readOnly: false,
4285
+ importable: false,
4286
+ allowDuplicate: false,
4287
+ updateBy: "_id",
4288
+ },
4269
4289
  {
4270
4290
  plural: "MeetingLocations",
4271
4291
  singular: "MeetingLocation",
@@ -4643,6 +4663,16 @@ const modelsAndRights = [
4643
4663
  allowDuplicate: false,
4644
4664
  updateBy: "_id",
4645
4665
  },
4666
+ {
4667
+ plural: "PackConfirmations",
4668
+ singular: "PackConfirmation",
4669
+ module: "warehouse",
4670
+ right: "warehouse.packconfirmations",
4671
+ readOnly: false,
4672
+ importable: false,
4673
+ allowDuplicate: false,
4674
+ updateBy: "_id",
4675
+ },
4646
4676
  {
4647
4677
  plural: "PackLists",
4648
4678
  singular: "PackList",
@@ -4693,6 +4723,16 @@ const modelsAndRights = [
4693
4723
  allowDuplicate: false,
4694
4724
  updateBy: "_id",
4695
4725
  },
4726
+ {
4727
+ plural: "PickLists",
4728
+ singular: "PickList",
4729
+ module: "warehouse",
4730
+ right: "warehouse.picklists",
4731
+ readOnly: false,
4732
+ importable: false,
4733
+ allowDuplicate: false,
4734
+ updateBy: "_id",
4735
+ },
4696
4736
  {
4697
4737
  plural: "PimSelections",
4698
4738
  singular: "PimSelection",
@@ -5151,6 +5191,16 @@ const modelsAndRights = [
5151
5191
  allowDuplicate: false,
5152
5192
  updateBy: "_id",
5153
5193
  },
5194
+ {
5195
+ plural: "PutAwayOrders",
5196
+ singular: "PutAwayOrder",
5197
+ module: "warehouse",
5198
+ right: "warehouse.putawayorders",
5199
+ readOnly: false,
5200
+ importable: false,
5201
+ allowDuplicate: false,
5202
+ updateBy: "_id",
5203
+ },
5154
5204
  {
5155
5205
  plural: "PushClicks",
5156
5206
  singular: "PushClick",
@@ -5301,6 +5351,16 @@ const modelsAndRights = [
5301
5351
  allowDuplicate: false,
5302
5352
  updateBy: "_id",
5303
5353
  },
5354
+ {
5355
+ plural: "ReplenishmentOrders",
5356
+ singular: "ReplenishmentOrder",
5357
+ module: "warehouse",
5358
+ right: "warehouse.replenishmentorders",
5359
+ readOnly: false,
5360
+ importable: false,
5361
+ allowDuplicate: false,
5362
+ updateBy: "_id",
5363
+ },
5304
5364
  {
5305
5365
  plural: "Reports",
5306
5366
  singular: "Report",
@@ -5363,6 +5423,16 @@ const modelsAndRights = [
5363
5423
  allowDuplicate: false,
5364
5424
  updateBy: "_id",
5365
5425
  },
5426
+ {
5427
+ plural: "ReturnOrders",
5428
+ singular: "ReturnOrder",
5429
+ module: "warehouse",
5430
+ right: "warehouse.returnorders",
5431
+ readOnly: false,
5432
+ importable: false,
5433
+ allowDuplicate: false,
5434
+ updateBy: "_id",
5435
+ },
5366
5436
  {
5367
5437
  plural: "RewardLogs",
5368
5438
  singular: "RewardLog",
@@ -5843,6 +5913,16 @@ const modelsAndRights = [
5843
5913
  allowDuplicate: false,
5844
5914
  updateBy: "_id",
5845
5915
  },
5916
+ {
5917
+ plural: "StockReservations",
5918
+ singular: "StockReservation",
5919
+ module: "warehouse",
5920
+ right: "warehouse.stockreservations",
5921
+ readOnly: false,
5922
+ importable: false,
5923
+ allowDuplicate: false,
5924
+ updateBy: "_id",
5925
+ },
5846
5926
  {
5847
5927
  plural: "Stocks",
5848
5928
  singular: "Stock",
@@ -0,0 +1,35 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Backorder — tracks unfilled portion of a sales order when stock is short.
4
+ *
5
+ * Solves the gap that IAssignment only has `overSupply`/`underSupply` boolean flags
6
+ * with no quantitative tracking and no auto-fulfillment when stock arrives.
7
+ *
8
+ * Lifecycle: open → partial → fulfilled | cancelled
9
+ */
10
+ export interface IBackorder extends IDefaultFields {
11
+ _customerID: ObjectId;
12
+ _clientID?: ObjectId[];
13
+ _subID?: ObjectId[];
14
+ nbr?: string;
15
+ assignment: ObjectId;
16
+ assignmentPosition?: number;
17
+ product: ObjectId;
18
+ productSKU?: string;
19
+ productTitle?: string;
20
+ unit?: string;
21
+ qtyOrdered: number;
22
+ qtyShipped: number;
23
+ qtyOpen: number;
24
+ expectedDate?: Date;
25
+ promisedDate?: Date;
26
+ priority: number;
27
+ autoFulfill: boolean;
28
+ status: "open" | "partial" | "fulfilled" | "cancelled";
29
+ fulfillmentReservations?: ObjectId[];
30
+ fulfilledShippings?: ObjectId[];
31
+ fulfilledAt?: Date;
32
+ cancelledAt?: Date;
33
+ cancelReason?: string;
34
+ note?: string;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,58 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Material Commissioning Position — single material line in a commissioning order.
4
+ */
5
+ export interface IMaterialCommissioningPosition {
6
+ pos: number;
7
+ product: ObjectId;
8
+ productSKU?: string;
9
+ productTitle?: string;
10
+ qtyRequired: number;
11
+ qtyReserved?: number;
12
+ qtyPicked?: number;
13
+ qtyDelivered?: number;
14
+ qtyConsumed?: number;
15
+ qtyReturned?: number;
16
+ unit?: string;
17
+ lot?: ObjectId;
18
+ storageArea?: ObjectId;
19
+ warehouse?: ObjectId;
20
+ stockReservation?: ObjectId;
21
+ status: "pending" | "reserved" | "picked" | "delivered" | "consumed" | "returned" | "short";
22
+ pickedAt?: Date;
23
+ deliveredAt?: Date;
24
+ consumedAt?: Date;
25
+ note?: string;
26
+ }
27
+ /**
28
+ * Material Commissioning — formal workflow for picking and delivering material to a production step.
29
+ *
30
+ * Solves the gap that material is currently embedded as a subdocument in IProductionOrder.material[]
31
+ * and IProductionOrdersPosition.material[] without standalone CRUD or audit trail.
32
+ *
33
+ * Lifecycle: planned → reserved → picking → delivered → consumed
34
+ */
35
+ export interface IMaterialCommissioning extends IDefaultFields {
36
+ _customerID: ObjectId;
37
+ _clientID?: ObjectId[];
38
+ _subID?: ObjectId[];
39
+ nbr?: string;
40
+ status: "planned" | "reserved" | "picking" | "delivered" | "consumed" | "cancelled";
41
+ productionOrder: ObjectId;
42
+ productionOrderPosition?: number;
43
+ productionOrderPositionStep?: number;
44
+ workCenter?: ObjectId;
45
+ machine?: ObjectId;
46
+ positions: IMaterialCommissioningPosition[];
47
+ totalLines?: number;
48
+ completedLines?: number;
49
+ progress?: number;
50
+ pickList?: ObjectId;
51
+ plannedFor?: Date;
52
+ reservedAt?: Date;
53
+ pickedAt?: Date;
54
+ deliveredAt?: Date;
55
+ consumedAt?: Date;
56
+ deliveredBy?: ObjectId;
57
+ note?: string;
58
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,64 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Single product entry inside a packed box.
4
+ */
5
+ export interface IPackedItem {
6
+ product: ObjectId;
7
+ productSKU?: string;
8
+ productTitle?: string;
9
+ qty: number;
10
+ unit?: string;
11
+ lot?: ObjectId;
12
+ lotNumber?: string;
13
+ serialNumbers?: string[];
14
+ }
15
+ /**
16
+ * One physical box that was packed during a pack confirmation.
17
+ */
18
+ export interface IPackedBox {
19
+ pos: number;
20
+ shippingBox?: ObjectId;
21
+ boxLabel?: string;
22
+ contents: IPackedItem[];
23
+ actualNetWeight?: number;
24
+ actualGrossWeight?: number;
25
+ actualLength?: number;
26
+ actualWidth?: number;
27
+ actualHeight?: number;
28
+ actualVolume?: number;
29
+ trackingNumber?: string;
30
+ carrierLabel?: string;
31
+ sealed?: boolean;
32
+ sealedAt?: Date;
33
+ }
34
+ /**
35
+ * Pack Confirmation — captures the actual outcome of a packing operation.
36
+ *
37
+ * Solves the gap that IPackList tracks what SHOULD be packed but never the actual
38
+ * boxes filled. Without this, "soll vs. ist" comparison and tracking-number capture
39
+ * are not possible.
40
+ *
41
+ * One-to-one with PackList (or PickList for direct pick-and-pack flows).
42
+ */
43
+ export interface IPackConfirmation extends IDefaultFields {
44
+ _customerID: ObjectId;
45
+ _clientID?: ObjectId[];
46
+ _subID?: ObjectId[];
47
+ nbr?: string;
48
+ status: "in_progress" | "completed" | "cancelled";
49
+ packList?: ObjectId;
50
+ pickList?: ObjectId;
51
+ shipping?: ObjectId;
52
+ assignment?: ObjectId;
53
+ productionOrder?: ObjectId;
54
+ warehouse?: ObjectId;
55
+ packedBy?: ObjectId;
56
+ startedAt?: Date;
57
+ packedAt?: Date;
58
+ boxes: IPackedBox[];
59
+ totalBoxes?: number;
60
+ totalItems?: number;
61
+ totalWeight?: number;
62
+ totalVolume?: number;
63
+ note?: string;
64
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,68 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Pick List Position — single line in a pick list.
4
+ */
5
+ export interface IPickListPosition {
6
+ pos: number;
7
+ product: ObjectId;
8
+ productSKU?: string;
9
+ productTitle?: string;
10
+ storageArea?: ObjectId;
11
+ warehouse?: ObjectId;
12
+ qtyRequested: number;
13
+ qtyPicked?: number;
14
+ qtyMissing?: number;
15
+ unit?: string;
16
+ lot?: ObjectId;
17
+ lotNumber?: string;
18
+ serialNumbers?: string[];
19
+ sourceType: "assignment" | "productionOrder" | "shipping" | "internalOrder" | "manual";
20
+ sourceId: ObjectId;
21
+ sourcePosition?: number;
22
+ sourceStep?: number;
23
+ stockReservation?: ObjectId;
24
+ status: "pending" | "picked" | "short" | "skipped" | "cancelled";
25
+ pickedAt?: Date;
26
+ pickedBy?: ObjectId;
27
+ note?: string;
28
+ skipReason?: string;
29
+ }
30
+ /**
31
+ * Pick List — formal picking instruction for warehouse workers.
32
+ *
33
+ * Replaces the gap where IPackList was used loosely for both picking and packing.
34
+ * IPickList is strictly for picking; IPackList stays for packing.
35
+ *
36
+ * Picking strategies:
37
+ * - single_order: one assignment / production order per pick
38
+ * - wave: multiple orders grouped, picker walks once
39
+ * - batch: same product across many orders, then sort
40
+ * - cluster: multiple bins on a cart, sorted in real-time
41
+ */
42
+ export interface IPickList extends IDefaultFields {
43
+ _customerID: ObjectId;
44
+ _clientID?: ObjectId[];
45
+ _subID?: ObjectId[];
46
+ nbr?: string;
47
+ name?: string;
48
+ status: "open" | "in_progress" | "completed" | "cancelled";
49
+ type: "single_order" | "wave" | "batch" | "cluster";
50
+ warehouse: ObjectId;
51
+ assignedTo?: ObjectId;
52
+ assignments?: ObjectId[];
53
+ productionOrders?: ObjectId[];
54
+ shippings?: ObjectId[];
55
+ internalOrders?: ObjectId[];
56
+ pickWave?: ObjectId;
57
+ positions: IPickListPosition[];
58
+ totalLines?: number;
59
+ pickedLines?: number;
60
+ progress?: number;
61
+ pickingStrategy?: "fifo" | "lifo" | "fefo" | "random" | "shortest_path";
62
+ walkingPath?: ObjectId[];
63
+ startedAt?: Date;
64
+ completedAt?: Date;
65
+ deadline?: Date;
66
+ pickConfirmation?: ObjectId;
67
+ note?: string;
68
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,58 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Put-Away Position — single line in a put-away order.
4
+ */
5
+ export interface IPutAwayPosition {
6
+ pos: number;
7
+ product: ObjectId;
8
+ productSKU?: string;
9
+ productTitle?: string;
10
+ qty: number;
11
+ unit?: string;
12
+ lot?: ObjectId;
13
+ lotNumber?: string;
14
+ serialNumbers?: string[];
15
+ sourceArea?: ObjectId;
16
+ suggestedArea?: ObjectId;
17
+ suggestedReason?: "empty_bin" | "same_product" | "abc_class" | "fefo" | "fifo" | "manual";
18
+ actualArea?: ObjectId;
19
+ placedAt?: Date;
20
+ placedBy?: ObjectId;
21
+ status: "pending" | "placed" | "skipped";
22
+ note?: string;
23
+ }
24
+ /**
25
+ * Put-Away Order — instruction for warehouse workers to place received goods in storage.
26
+ *
27
+ * Solves the gap that after a GoodsReceipt is approved, there is no formal instruction
28
+ * where to put the items. Receiving area accumulates without systematic placement.
29
+ *
30
+ * Strategies:
31
+ * - empty_bin: prefer empty storage areas first
32
+ * - same_product: consolidate with existing stock of same product
33
+ * - abc_class: place high-velocity items in close locations
34
+ * - fefo: first-expiry-first-out (for perishables)
35
+ * - fifo: first-in-first-out
36
+ * - manual: warehouse worker decides
37
+ */
38
+ export interface IPutAwayOrder extends IDefaultFields {
39
+ _customerID: ObjectId;
40
+ _clientID?: ObjectId[];
41
+ _subID?: ObjectId[];
42
+ nbr?: string;
43
+ status: "pending" | "in_progress" | "completed" | "cancelled";
44
+ warehouse: ObjectId;
45
+ assignedTo?: ObjectId;
46
+ goodsReceipt?: ObjectId;
47
+ productionOrder?: ObjectId;
48
+ internalOrder?: ObjectId;
49
+ returnOrder?: ObjectId;
50
+ strategy?: "empty_bin" | "same_product" | "abc_class" | "fefo" | "fifo" | "manual";
51
+ positions: IPutAwayPosition[];
52
+ totalLines?: number;
53
+ completedLines?: number;
54
+ progress?: number;
55
+ startedAt?: Date;
56
+ completedAt?: Date;
57
+ note?: string;
58
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,54 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Replenishment Position — single line in a replenishment order.
4
+ */
5
+ export interface IReplenishmentPosition {
6
+ pos: number;
7
+ product: ObjectId;
8
+ productSKU?: string;
9
+ productTitle?: string;
10
+ sourceArea: ObjectId;
11
+ targetArea: ObjectId;
12
+ qtyRequested: number;
13
+ qtyMoved: number;
14
+ unit?: string;
15
+ lot?: ObjectId;
16
+ status: "pending" | "in_progress" | "moved" | "skipped";
17
+ movedAt?: Date;
18
+ movedBy?: ObjectId;
19
+ skipReason?: string;
20
+ note?: string;
21
+ }
22
+ /**
23
+ * Replenishment Order — moves stock from bulk storage to pick faces.
24
+ *
25
+ * Solves the gap that there is no mechanism to refill pick locations from
26
+ * reserve/bulk storage when min levels are reached. Critical for multi-tier
27
+ * warehouses with fast-moving items.
28
+ *
29
+ * Triggers:
30
+ * - min_level: storage area dropped below configured min qty
31
+ * - manual: warehouse worker requested
32
+ * - forecast: predictive based on demand patterns
33
+ * - wave: triggered by upcoming pick wave
34
+ */
35
+ export interface IReplenishmentOrder extends IDefaultFields {
36
+ _customerID: ObjectId;
37
+ _clientID?: ObjectId[];
38
+ _subID?: ObjectId[];
39
+ nbr?: string;
40
+ warehouse: ObjectId;
41
+ trigger: "min_level" | "manual" | "forecast" | "wave";
42
+ status: "pending" | "in_progress" | "completed" | "cancelled";
43
+ priority: number;
44
+ assignedTo?: ObjectId;
45
+ pickWave?: ObjectId;
46
+ positions: IReplenishmentPosition[];
47
+ totalLines?: number;
48
+ movedLines?: number;
49
+ progress?: number;
50
+ triggeredAt?: Date;
51
+ startedAt?: Date;
52
+ completedAt?: Date;
53
+ note?: string;
54
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,68 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Return Order Position — single line in an RMA.
4
+ */
5
+ export interface IReturnPosition {
6
+ pos: number;
7
+ product: ObjectId;
8
+ productSKU?: string;
9
+ productTitle?: string;
10
+ unit?: string;
11
+ originalInvoicePosition?: number;
12
+ originalShippingPosition?: number;
13
+ qtyReturned: number;
14
+ qtyReceived: number;
15
+ qtyRestockable: number;
16
+ qtyRepairable: number;
17
+ qtyDisposed: number;
18
+ qtyReturnedToSupplier: number;
19
+ conditionOnReceipt?: "new" | "used" | "damaged" | "unsellable";
20
+ inspectionResult?: "restock" | "repair" | "dispose" | "return_to_supplier";
21
+ inspectionNote?: string;
22
+ targetStorageArea?: ObjectId;
23
+ targetWarehouse?: ObjectId;
24
+ creditNote?: ObjectId;
25
+ replacementShipping?: ObjectId;
26
+ status: "pending" | "received" | "inspected" | "restocked" | "disposed" | "rejected";
27
+ }
28
+ /**
29
+ * Return Order (RMA) — formal returns workflow.
30
+ *
31
+ * Solves the gap that the platform only has a `retour: boolean` flag on IStorageArea
32
+ * and no formal return process linking original orders to refunds/replacements.
33
+ *
34
+ * Lifecycle: requested → approved → received → inspected → completed | rejected
35
+ */
36
+ export interface IReturnOrder extends IDefaultFields {
37
+ _customerID: ObjectId;
38
+ _clientID?: ObjectId[];
39
+ _subID?: ObjectId[];
40
+ rmaNumber: string;
41
+ consumer?: ObjectId;
42
+ user?: ObjectId;
43
+ status: "requested" | "approved" | "received" | "inspected" | "completed" | "rejected";
44
+ originalInvoice?: ObjectId;
45
+ originalShipping?: ObjectId;
46
+ originalAssignment?: ObjectId;
47
+ customerReason: string;
48
+ customerNote?: string;
49
+ approvedBy?: ObjectId;
50
+ approvedAt?: Date;
51
+ rejectedReason?: string;
52
+ rejectedAt?: Date;
53
+ receivedAt?: Date;
54
+ receivedBy?: ObjectId;
55
+ receivedAtWarehouse?: ObjectId;
56
+ inspectedAt?: Date;
57
+ inspectedBy?: ObjectId;
58
+ completedAt?: Date;
59
+ resolutionType?: "refund" | "replacement" | "repair" | "store_credit" | "reject";
60
+ creditNote?: ObjectId;
61
+ replacementShipping?: ObjectId;
62
+ refundAmount?: number;
63
+ positions: IReturnPosition[];
64
+ totalLines?: number;
65
+ inspectedLines?: number;
66
+ progress?: number;
67
+ note?: string;
68
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,14 @@ export interface IStock extends IDefaultFields {
8
8
  warehouse?: ObjectId;
9
9
  storageArea?: ObjectId;
10
10
  amount?: number;
11
+ /** Sum of active stock reservations against this stock record (computed). */
12
+ amountReserved?: number;
13
+ /** amount - amountReserved (computed). Authoritative for available-to-promise. */
14
+ amountAvailable?: number;
15
+ /** Quantity currently in quality control. */
16
+ amountInQC?: number;
17
+ /** Quantity currently in quarantine. */
18
+ amountInQuarantine?: number;
11
19
  unit?: string;
12
20
  serialNumber?: string;
13
21
  lotNumber?: string;
@@ -1,4 +1,32 @@
1
1
  import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Canonical movement types for stock log entries.
4
+ *
5
+ * Use these constants instead of free-form strings to prevent typos.
6
+ * The `kindofmovement` field on IStockLog stays a `string` for backward compat —
7
+ * but new code should use values from this enum.
8
+ */
9
+ export declare enum StockMovementKind {
10
+ Incoming = "incoming",
11
+ Outgoing = "outgoing",
12
+ Transfer = "transfer",
13
+ Reservation = "reservation",
14
+ ReservationRelease = "reservation_release",
15
+ Production = "production",
16
+ Consumption = "consumption",
17
+ PutAway = "putaway",
18
+ Picking = "picking",
19
+ Pack = "pack",
20
+ Ship = "ship",
21
+ Return = "return",
22
+ Adjustment = "adjustment",
23
+ QuarantineIn = "quarantine_in",
24
+ QuarantineOut = "quarantine_out",
25
+ QcIn = "qc_in",
26
+ QcOut = "qc_out",
27
+ Replenishment = "replenishment",
28
+ InventoryCount = "inventory_count"
29
+ }
2
30
  export interface IStockLog extends IDefaultFields {
3
31
  _customerID: ObjectId;
4
32
  _clientID?: ObjectId[];
@@ -1,2 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StockMovementKind = void 0;
4
+ /**
5
+ * Canonical movement types for stock log entries.
6
+ *
7
+ * Use these constants instead of free-form strings to prevent typos.
8
+ * The `kindofmovement` field on IStockLog stays a `string` for backward compat —
9
+ * but new code should use values from this enum.
10
+ */
11
+ var StockMovementKind;
12
+ (function (StockMovementKind) {
13
+ StockMovementKind["Incoming"] = "incoming";
14
+ StockMovementKind["Outgoing"] = "outgoing";
15
+ StockMovementKind["Transfer"] = "transfer";
16
+ StockMovementKind["Reservation"] = "reservation";
17
+ StockMovementKind["ReservationRelease"] = "reservation_release";
18
+ StockMovementKind["Production"] = "production";
19
+ StockMovementKind["Consumption"] = "consumption";
20
+ StockMovementKind["PutAway"] = "putaway";
21
+ StockMovementKind["Picking"] = "picking";
22
+ StockMovementKind["Pack"] = "pack";
23
+ StockMovementKind["Ship"] = "ship";
24
+ StockMovementKind["Return"] = "return";
25
+ StockMovementKind["Adjustment"] = "adjustment";
26
+ StockMovementKind["QuarantineIn"] = "quarantine_in";
27
+ StockMovementKind["QuarantineOut"] = "quarantine_out";
28
+ StockMovementKind["QcIn"] = "qc_in";
29
+ StockMovementKind["QcOut"] = "qc_out";
30
+ StockMovementKind["Replenishment"] = "replenishment";
31
+ StockMovementKind["InventoryCount"] = "inventory_count";
32
+ })(StockMovementKind || (exports.StockMovementKind = StockMovementKind = {}));
@@ -0,0 +1,35 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Stock Reservation — quantitative reservation of stock for a specific source document.
4
+ *
5
+ * Solves the gap that IStock only knows `amount` (no available vs. reserved distinction)
6
+ * and IAssignment.stock_booked is just a boolean flag.
7
+ *
8
+ * Lifecycle: active → fulfilled (when picked) | released (manual cancel) | expired (TTL).
9
+ */
10
+ export interface IStockReservation extends IDefaultFields {
11
+ _customerID: ObjectId;
12
+ _clientID?: ObjectId[];
13
+ _subID?: ObjectId[];
14
+ product: ObjectId;
15
+ warehouse: ObjectId;
16
+ storageArea?: ObjectId;
17
+ lot?: ObjectId;
18
+ serialNumbers?: string[];
19
+ qtyReserved: number;
20
+ qtyFulfilled?: number;
21
+ unit?: string;
22
+ sourceType: "assignment" | "productionOrder" | "internalOrder" | "shipping" | "manual";
23
+ sourceId: ObjectId;
24
+ sourcePosition?: number;
25
+ sourceStep?: number;
26
+ status: "active" | "released" | "fulfilled" | "expired";
27
+ reservedAt?: Date;
28
+ expiresAt?: Date;
29
+ releasedAt?: Date;
30
+ fulfilledAt?: Date;
31
+ priority?: number;
32
+ pickList?: ObjectId;
33
+ reservedBy?: ObjectId;
34
+ note?: string;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -143,6 +143,7 @@ export * from "./IaYOUneUserAgent";
143
143
  export * from "./IaYOUneUserRight";
144
144
  export * from "./IaYOUneVariable";
145
145
  export * from "./IaYOUneWidget";
146
+ export * from "./IBackorder";
146
147
  export * from "./IBankAccount";
147
148
  export * from "./IBankTurnover";
148
149
  export * from "./IBeacon";
@@ -429,6 +430,7 @@ export * from "./IMarketBudgetByIndustry";
429
430
  export * from "./IIndustryKPI";
430
431
  export * from "./IMarketResearch";
431
432
  export * from "./IMaterial";
433
+ export * from "./IMaterialCommissioning";
432
434
  export * from "./IMeeting";
433
435
  export * from "./IMeetingGroup";
434
436
  export * from "./IEventRegisterView";
@@ -470,12 +472,14 @@ export * from "./IOverride";
470
472
  export * from "./IOwnData";
471
473
  export * from "./IOwnDataTemplate";
472
474
  export * from "./IOwnValue";
475
+ export * from "./IPackConfirmation";
473
476
  export * from "./IPackList";
474
477
  export * from "./IPageStat";
475
478
  export * from "./IPAT";
476
479
  export * from "./IPaymentGroup";
477
480
  export * from "./IPaymentProvider";
478
481
  export * from "./IPermissionRequest";
482
+ export * from "./IPickList";
479
483
  export * from "./IPimSelection";
480
484
  export * from "./IPipeline";
481
485
  export * from "./IPoints";
@@ -527,6 +531,7 @@ export * from "./IPublication";
527
531
  export * from "./IPublicationOptions";
528
532
  export * from "./IPublicationRun";
529
533
  export * from "./IPublisherAPI";
534
+ export * from "./IPutAwayOrder";
530
535
  export * from "./IPushClick";
531
536
  export * from "./IPushDelivery";
532
537
  export * from "./IPushError";
@@ -543,6 +548,7 @@ export * from "./IReaction";
543
548
  export * from "./IRecommendation";
544
549
  export * from "./IRecommendationTemplate";
545
550
  export * from "./IReminder";
551
+ export * from "./IReplenishmentOrder";
546
552
  export * from "./IReport";
547
553
  export * from "./IReportTemplate";
548
554
  export * from "./IRepository";
@@ -550,6 +556,7 @@ export * from "./IRequirement";
550
556
  export * from "./IRequirementSchema";
551
557
  export * from "./IResearchBudget";
552
558
  export * from "./IRetrospective";
559
+ export * from "./IReturnOrder";
553
560
  export * from "./IRewardLog";
554
561
  export * from "./IRewardRule";
555
562
  export * from "./IRolloutEnvironment";
@@ -609,6 +616,7 @@ export * from "./IState";
609
616
  export * from "./IStateLog";
610
617
  export * from "./IStock";
611
618
  export * from "./IStockLog";
619
+ export * from "./IStockReservation";
612
620
  export * from "./IStorageArea";
613
621
  export * from "./IStore";
614
622
  export * from "./IStoreAsset";
@@ -159,6 +159,7 @@ __exportStar(require("./IaYOUneUserAgent"), exports);
159
159
  __exportStar(require("./IaYOUneUserRight"), exports);
160
160
  __exportStar(require("./IaYOUneVariable"), exports);
161
161
  __exportStar(require("./IaYOUneWidget"), exports);
162
+ __exportStar(require("./IBackorder"), exports);
162
163
  __exportStar(require("./IBankAccount"), exports);
163
164
  __exportStar(require("./IBankTurnover"), exports);
164
165
  __exportStar(require("./IBeacon"), exports);
@@ -445,6 +446,7 @@ __exportStar(require("./IMarketBudgetByIndustry"), exports);
445
446
  __exportStar(require("./IIndustryKPI"), exports);
446
447
  __exportStar(require("./IMarketResearch"), exports);
447
448
  __exportStar(require("./IMaterial"), exports);
449
+ __exportStar(require("./IMaterialCommissioning"), exports);
448
450
  __exportStar(require("./IMeeting"), exports);
449
451
  __exportStar(require("./IMeetingGroup"), exports);
450
452
  __exportStar(require("./IEventRegisterView"), exports);
@@ -486,12 +488,14 @@ __exportStar(require("./IOverride"), exports);
486
488
  __exportStar(require("./IOwnData"), exports);
487
489
  __exportStar(require("./IOwnDataTemplate"), exports);
488
490
  __exportStar(require("./IOwnValue"), exports);
491
+ __exportStar(require("./IPackConfirmation"), exports);
489
492
  __exportStar(require("./IPackList"), exports);
490
493
  __exportStar(require("./IPageStat"), exports);
491
494
  __exportStar(require("./IPAT"), exports);
492
495
  __exportStar(require("./IPaymentGroup"), exports);
493
496
  __exportStar(require("./IPaymentProvider"), exports);
494
497
  __exportStar(require("./IPermissionRequest"), exports);
498
+ __exportStar(require("./IPickList"), exports);
495
499
  __exportStar(require("./IPimSelection"), exports);
496
500
  __exportStar(require("./IPipeline"), exports);
497
501
  __exportStar(require("./IPoints"), exports);
@@ -543,6 +547,7 @@ __exportStar(require("./IPublication"), exports);
543
547
  __exportStar(require("./IPublicationOptions"), exports);
544
548
  __exportStar(require("./IPublicationRun"), exports);
545
549
  __exportStar(require("./IPublisherAPI"), exports);
550
+ __exportStar(require("./IPutAwayOrder"), exports);
546
551
  __exportStar(require("./IPushClick"), exports);
547
552
  __exportStar(require("./IPushDelivery"), exports);
548
553
  __exportStar(require("./IPushError"), exports);
@@ -559,6 +564,7 @@ __exportStar(require("./IReaction"), exports);
559
564
  __exportStar(require("./IRecommendation"), exports);
560
565
  __exportStar(require("./IRecommendationTemplate"), exports);
561
566
  __exportStar(require("./IReminder"), exports);
567
+ __exportStar(require("./IReplenishmentOrder"), exports);
562
568
  __exportStar(require("./IReport"), exports);
563
569
  __exportStar(require("./IReportTemplate"), exports);
564
570
  __exportStar(require("./IRepository"), exports);
@@ -566,6 +572,7 @@ __exportStar(require("./IRequirement"), exports);
566
572
  __exportStar(require("./IRequirementSchema"), exports);
567
573
  __exportStar(require("./IResearchBudget"), exports);
568
574
  __exportStar(require("./IRetrospective"), exports);
575
+ __exportStar(require("./IReturnOrder"), exports);
569
576
  __exportStar(require("./IRewardLog"), exports);
570
577
  __exportStar(require("./IRewardRule"), exports);
571
578
  __exportStar(require("./IRolloutEnvironment"), exports);
@@ -625,6 +632,7 @@ __exportStar(require("./IState"), exports);
625
632
  __exportStar(require("./IStateLog"), exports);
626
633
  __exportStar(require("./IStock"), exports);
627
634
  __exportStar(require("./IStockLog"), exports);
635
+ __exportStar(require("./IStockReservation"), exports);
628
636
  __exportStar(require("./IStorageArea"), exports);
629
637
  __exportStar(require("./IStore"), exports);
630
638
  __exportStar(require("./IStoreAsset"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.26.0",
3
+ "version": "2026.28.0",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",