@flowselections/logistiek-engine 1.0.14 → 1.0.15
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/README.md +24 -24
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +53 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +1516 -159
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +53 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/moduleClient.d.ts +53 -0
- package/dist-lib/integrations/supabase/moduleClient.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +53 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/bulkLoadCarrierPlanning.server.d.ts +2 -0
- package/dist-lib/lib/bulkLoadCarrierPlanning.server.d.ts.map +1 -1
- package/dist-lib/lib/bulkLoadCarrierPlanning.server.js +11 -0
- package/dist-lib/lib/floridayDocuments.functions.d.ts +159 -0
- package/dist-lib/lib/floridayDocuments.functions.d.ts.map +1 -1
- package/dist-lib/lib/floridayPush.functions.d.ts +53 -0
- package/dist-lib/lib/floridayPush.functions.d.ts.map +1 -1
- package/dist-lib/lib/loadCarrierPlanning.functions.d.ts +270 -30
- package/dist-lib/lib/loadCarrierPlanning.functions.d.ts.map +1 -1
- package/dist-lib/lib/loadCarrierPlanning.server.d.ts +27 -2
- package/dist-lib/lib/loadCarrierPlanning.server.d.ts.map +1 -1
- package/dist-lib/lib/loadCarrierPlanning.server.js +162 -30
- package/dist-lib/lib/loadCarrierTaskSync.server.js +1 -1
- package/dist-lib/lib/logisticsRecalcJob.functions.d.ts +106 -0
- package/dist-lib/lib/logisticsRecalcJob.functions.d.ts.map +1 -1
- package/dist-lib/lib/logisticsRecalculate.functions.d.ts +53 -0
- package/dist-lib/lib/logisticsRecalculate.functions.d.ts.map +1 -1
- package/dist-lib/lib/modulePrompts.js +1002 -1002
- package/dist-lib/lib/planQueue.server.d.ts +2 -0
- package/dist-lib/lib/planQueue.server.d.ts.map +1 -1
- package/dist-lib/lib/planQueue.server.js +22 -4
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ export interface BulkPlanBatchResult {
|
|
|
4
4
|
processed: number;
|
|
5
5
|
cartsCreated: number;
|
|
6
6
|
skippedLocked: number;
|
|
7
|
+
/** Buffers/orders die niet zijn ingedeeld omdat de belading onbekend of onrealistisch is. */
|
|
8
|
+
blocked: number;
|
|
7
9
|
failed: number;
|
|
8
10
|
tasksUpdated: number;
|
|
9
11
|
nextCursor: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkLoadCarrierPlanning.server.d.ts","sourceRoot":"","sources":["../../src/lib/bulkLoadCarrierPlanning.server.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAK5D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"bulkLoadCarrierPlanning.server.d.ts","sourceRoot":"","sources":["../../src/lib/bulkLoadCarrierPlanning.server.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAK5D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,6FAA6F;IAC7F,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAcD,uCAAuC;AACvC,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,SAAK,GACT,OAAO,CAAC,mBAAmB,CAAC,CAkC9B;AAED,sEAAsE;AACtE,wBAAsB,oBAAoB,CACxC,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,SAAK,GACT,OAAO,CAAC,mBAAmB,CAAC,CAyC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,2DAA2D;AAC3D,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,cAAc,EAAE,KAAK,SAAK,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA0BzG"}
|
|
@@ -12,6 +12,7 @@ const EMPTY = {
|
|
|
12
12
|
processed: 0,
|
|
13
13
|
cartsCreated: 0,
|
|
14
14
|
skippedLocked: 0,
|
|
15
|
+
blocked: 0,
|
|
15
16
|
failed: 0,
|
|
16
17
|
tasksUpdated: 0,
|
|
17
18
|
nextCursor: null,
|
|
@@ -37,6 +38,11 @@ export async function planBuffersBatch(sb, cursor, limit = 20) {
|
|
|
37
38
|
if (plan.skipped === "locked") {
|
|
38
39
|
result.skippedLocked++;
|
|
39
40
|
}
|
|
41
|
+
else if (plan.skipped === "blocked") {
|
|
42
|
+
result.blocked++;
|
|
43
|
+
if (result.errors.length < 5 && plan.blockedReason)
|
|
44
|
+
result.errors.push(plan.blockedReason);
|
|
45
|
+
}
|
|
40
46
|
else {
|
|
41
47
|
result.processed++;
|
|
42
48
|
result.cartsCreated += Number(plan.cartsCreated ?? 0);
|
|
@@ -79,6 +85,11 @@ export async function planLooseOrdersBatch(sb, cursor, limit = 20) {
|
|
|
79
85
|
if (plan.skipped === "locked") {
|
|
80
86
|
result.skippedLocked++;
|
|
81
87
|
}
|
|
88
|
+
else if (plan.skipped === "blocked") {
|
|
89
|
+
result.blocked++;
|
|
90
|
+
if (result.errors.length < 5 && plan.blockedReason)
|
|
91
|
+
result.errors.push(plan.blockedReason);
|
|
92
|
+
}
|
|
82
93
|
else {
|
|
83
94
|
result.processed++;
|
|
84
95
|
result.cartsCreated += Number(plan.cartsCreated ?? 0);
|
|
@@ -15728,6 +15728,45 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
|
|
|
15728
15728
|
};
|
|
15729
15729
|
Relationships: [];
|
|
15730
15730
|
};
|
|
15731
|
+
stock_consumption_alerts: {
|
|
15732
|
+
Row: {
|
|
15733
|
+
alert_type: string;
|
|
15734
|
+
created_at: string;
|
|
15735
|
+
id: string;
|
|
15736
|
+
mutation_log_id: string | null;
|
|
15737
|
+
order_id: string | null;
|
|
15738
|
+
order_item_id: string | null;
|
|
15739
|
+
qty: number;
|
|
15740
|
+
reason: string | null;
|
|
15741
|
+
resolved_at: string | null;
|
|
15742
|
+
updated_at: string;
|
|
15743
|
+
};
|
|
15744
|
+
Insert: {
|
|
15745
|
+
alert_type: string;
|
|
15746
|
+
created_at?: string;
|
|
15747
|
+
id?: string;
|
|
15748
|
+
mutation_log_id?: string | null;
|
|
15749
|
+
order_id?: string | null;
|
|
15750
|
+
order_item_id?: string | null;
|
|
15751
|
+
qty?: number;
|
|
15752
|
+
reason?: string | null;
|
|
15753
|
+
resolved_at?: string | null;
|
|
15754
|
+
updated_at?: string;
|
|
15755
|
+
};
|
|
15756
|
+
Update: {
|
|
15757
|
+
alert_type?: string;
|
|
15758
|
+
created_at?: string;
|
|
15759
|
+
id?: string;
|
|
15760
|
+
mutation_log_id?: string | null;
|
|
15761
|
+
order_id?: string | null;
|
|
15762
|
+
order_item_id?: string | null;
|
|
15763
|
+
qty?: number;
|
|
15764
|
+
reason?: string | null;
|
|
15765
|
+
resolved_at?: string | null;
|
|
15766
|
+
updated_at?: string;
|
|
15767
|
+
};
|
|
15768
|
+
Relationships: [];
|
|
15769
|
+
};
|
|
15731
15770
|
stock_import_runs: {
|
|
15732
15771
|
Row: {
|
|
15733
15772
|
connection_id: string | null;
|
|
@@ -21400,6 +21439,14 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
|
|
|
21400
21439
|
};
|
|
21401
21440
|
Returns: import("../integrations/supabase/types").Json;
|
|
21402
21441
|
};
|
|
21442
|
+
logistics_plan_block: {
|
|
21443
|
+
Args: {
|
|
21444
|
+
p_details?: import("../integrations/supabase/types").Json;
|
|
21445
|
+
p_order_ids: string[];
|
|
21446
|
+
p_reason: string;
|
|
21447
|
+
};
|
|
21448
|
+
Returns: number;
|
|
21449
|
+
};
|
|
21403
21450
|
logistics_plan_buffer_sql: {
|
|
21404
21451
|
Args: {
|
|
21405
21452
|
p_buffer_id: string;
|
|
@@ -21768,6 +21815,12 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
|
|
|
21768
21815
|
verwijderd: number;
|
|
21769
21816
|
}[];
|
|
21770
21817
|
};
|
|
21818
|
+
order_departure_proof: {
|
|
21819
|
+
Args: {
|
|
21820
|
+
p_order_id: string;
|
|
21821
|
+
};
|
|
21822
|
+
Returns: import("../integrations/supabase/types").Json;
|
|
21823
|
+
};
|
|
21771
21824
|
order_number_prefix: {
|
|
21772
21825
|
Args: {
|
|
21773
21826
|
p_custom_fields?: import("../integrations/supabase/types").Json;
|
|
@@ -38598,6 +38651,45 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
|
|
|
38598
38651
|
};
|
|
38599
38652
|
Relationships: [];
|
|
38600
38653
|
};
|
|
38654
|
+
stock_consumption_alerts: {
|
|
38655
|
+
Row: {
|
|
38656
|
+
alert_type: string;
|
|
38657
|
+
created_at: string;
|
|
38658
|
+
id: string;
|
|
38659
|
+
mutation_log_id: string | null;
|
|
38660
|
+
order_id: string | null;
|
|
38661
|
+
order_item_id: string | null;
|
|
38662
|
+
qty: number;
|
|
38663
|
+
reason: string | null;
|
|
38664
|
+
resolved_at: string | null;
|
|
38665
|
+
updated_at: string;
|
|
38666
|
+
};
|
|
38667
|
+
Insert: {
|
|
38668
|
+
alert_type: string;
|
|
38669
|
+
created_at?: string;
|
|
38670
|
+
id?: string;
|
|
38671
|
+
mutation_log_id?: string | null;
|
|
38672
|
+
order_id?: string | null;
|
|
38673
|
+
order_item_id?: string | null;
|
|
38674
|
+
qty?: number;
|
|
38675
|
+
reason?: string | null;
|
|
38676
|
+
resolved_at?: string | null;
|
|
38677
|
+
updated_at?: string;
|
|
38678
|
+
};
|
|
38679
|
+
Update: {
|
|
38680
|
+
alert_type?: string;
|
|
38681
|
+
created_at?: string;
|
|
38682
|
+
id?: string;
|
|
38683
|
+
mutation_log_id?: string | null;
|
|
38684
|
+
order_id?: string | null;
|
|
38685
|
+
order_item_id?: string | null;
|
|
38686
|
+
qty?: number;
|
|
38687
|
+
reason?: string | null;
|
|
38688
|
+
resolved_at?: string | null;
|
|
38689
|
+
updated_at?: string;
|
|
38690
|
+
};
|
|
38691
|
+
Relationships: [];
|
|
38692
|
+
};
|
|
38601
38693
|
stock_import_runs: {
|
|
38602
38694
|
Row: {
|
|
38603
38695
|
connection_id: string | null;
|
|
@@ -44270,6 +44362,14 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
|
|
|
44270
44362
|
};
|
|
44271
44363
|
Returns: import("../integrations/supabase/types").Json;
|
|
44272
44364
|
};
|
|
44365
|
+
logistics_plan_block: {
|
|
44366
|
+
Args: {
|
|
44367
|
+
p_details?: import("../integrations/supabase/types").Json;
|
|
44368
|
+
p_order_ids: string[];
|
|
44369
|
+
p_reason: string;
|
|
44370
|
+
};
|
|
44371
|
+
Returns: number;
|
|
44372
|
+
};
|
|
44273
44373
|
logistics_plan_buffer_sql: {
|
|
44274
44374
|
Args: {
|
|
44275
44375
|
p_buffer_id: string;
|
|
@@ -44638,6 +44738,12 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
|
|
|
44638
44738
|
verwijderd: number;
|
|
44639
44739
|
}[];
|
|
44640
44740
|
};
|
|
44741
|
+
order_departure_proof: {
|
|
44742
|
+
Args: {
|
|
44743
|
+
p_order_id: string;
|
|
44744
|
+
};
|
|
44745
|
+
Returns: import("../integrations/supabase/types").Json;
|
|
44746
|
+
};
|
|
44641
44747
|
order_number_prefix: {
|
|
44642
44748
|
Args: {
|
|
44643
44749
|
p_custom_fields?: import("../integrations/supabase/types").Json;
|
|
@@ -61501,6 +61607,45 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
|
|
|
61501
61607
|
};
|
|
61502
61608
|
Relationships: [];
|
|
61503
61609
|
};
|
|
61610
|
+
stock_consumption_alerts: {
|
|
61611
|
+
Row: {
|
|
61612
|
+
alert_type: string;
|
|
61613
|
+
created_at: string;
|
|
61614
|
+
id: string;
|
|
61615
|
+
mutation_log_id: string | null;
|
|
61616
|
+
order_id: string | null;
|
|
61617
|
+
order_item_id: string | null;
|
|
61618
|
+
qty: number;
|
|
61619
|
+
reason: string | null;
|
|
61620
|
+
resolved_at: string | null;
|
|
61621
|
+
updated_at: string;
|
|
61622
|
+
};
|
|
61623
|
+
Insert: {
|
|
61624
|
+
alert_type: string;
|
|
61625
|
+
created_at?: string;
|
|
61626
|
+
id?: string;
|
|
61627
|
+
mutation_log_id?: string | null;
|
|
61628
|
+
order_id?: string | null;
|
|
61629
|
+
order_item_id?: string | null;
|
|
61630
|
+
qty?: number;
|
|
61631
|
+
reason?: string | null;
|
|
61632
|
+
resolved_at?: string | null;
|
|
61633
|
+
updated_at?: string;
|
|
61634
|
+
};
|
|
61635
|
+
Update: {
|
|
61636
|
+
alert_type?: string;
|
|
61637
|
+
created_at?: string;
|
|
61638
|
+
id?: string;
|
|
61639
|
+
mutation_log_id?: string | null;
|
|
61640
|
+
order_id?: string | null;
|
|
61641
|
+
order_item_id?: string | null;
|
|
61642
|
+
qty?: number;
|
|
61643
|
+
reason?: string | null;
|
|
61644
|
+
resolved_at?: string | null;
|
|
61645
|
+
updated_at?: string;
|
|
61646
|
+
};
|
|
61647
|
+
Relationships: [];
|
|
61648
|
+
};
|
|
61504
61649
|
stock_import_runs: {
|
|
61505
61650
|
Row: {
|
|
61506
61651
|
connection_id: string | null;
|
|
@@ -67173,6 +67318,14 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
|
|
|
67173
67318
|
};
|
|
67174
67319
|
Returns: import("../integrations/supabase/types").Json;
|
|
67175
67320
|
};
|
|
67321
|
+
logistics_plan_block: {
|
|
67322
|
+
Args: {
|
|
67323
|
+
p_details?: import("../integrations/supabase/types").Json;
|
|
67324
|
+
p_order_ids: string[];
|
|
67325
|
+
p_reason: string;
|
|
67326
|
+
};
|
|
67327
|
+
Returns: number;
|
|
67328
|
+
};
|
|
67176
67329
|
logistics_plan_buffer_sql: {
|
|
67177
67330
|
Args: {
|
|
67178
67331
|
p_buffer_id: string;
|
|
@@ -67541,6 +67694,12 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
|
|
|
67541
67694
|
verwijderd: number;
|
|
67542
67695
|
}[];
|
|
67543
67696
|
};
|
|
67697
|
+
order_departure_proof: {
|
|
67698
|
+
Args: {
|
|
67699
|
+
p_order_id: string;
|
|
67700
|
+
};
|
|
67701
|
+
Returns: import("../integrations/supabase/types").Json;
|
|
67702
|
+
};
|
|
67544
67703
|
order_number_prefix: {
|
|
67545
67704
|
Args: {
|
|
67546
67705
|
p_custom_fields?: import("../integrations/supabase/types").Json;
|