@use-stall/types 0.2.0 → 0.2.1
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/package.json +1 -1
- package/src/fulfillment.d.ts +29 -10
- package/src/payments.d.ts +1 -0
package/package.json
CHANGED
package/src/fulfillment.d.ts
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
import type { UnifiedCustomerAddressType } from "./customers";
|
|
2
|
+
export type FulfillmentMethodType =
|
|
3
|
+
| "shipment" // via carrier / courier to an address
|
|
4
|
+
| "local_delivery" // delivered by merchant or local fleet
|
|
5
|
+
| "pickup" // customer picks up at a physical location / collection
|
|
6
|
+
| "curbside" // pickup outside/curbside
|
|
7
|
+
| "digital" // purely digital delivery (email, download, etc.)
|
|
8
|
+
| "service"; // in-person or remote service fulfillment
|
|
2
9
|
|
|
3
10
|
export interface FulfillmentProvider {
|
|
4
11
|
id: string;
|
|
5
|
-
|
|
12
|
+
title: string;
|
|
6
13
|
description: string;
|
|
7
14
|
logo: string;
|
|
15
|
+
supported_methods: FulfillmentMethodType[];
|
|
16
|
+
supported_countries: string[];
|
|
17
|
+
integration_url: string;
|
|
18
|
+
integration_docs: string;
|
|
19
|
+
active: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface FulfillmentMethodType {
|
|
23
|
+
type: FulfillmentMethodType;
|
|
24
|
+
offline_support: boolean;
|
|
25
|
+
instant: boolean; // whether the fulfillment is done instantly like collection/pickup
|
|
8
26
|
}
|
|
9
27
|
|
|
10
|
-
export interface
|
|
28
|
+
export interface FulfillmentProviderConfigType {
|
|
11
29
|
id: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
customer: boolean;
|
|
16
|
-
address: boolean;
|
|
30
|
+
provider: string; // provider id
|
|
31
|
+
config: {
|
|
32
|
+
[key: string]: any;
|
|
17
33
|
};
|
|
34
|
+
created_at: string;
|
|
35
|
+
updated_at: string;
|
|
18
36
|
}
|
|
19
37
|
|
|
20
38
|
export type FulFillmentStatus =
|
|
@@ -44,8 +62,8 @@ export interface OrderFulfillment {
|
|
|
44
62
|
id: string;
|
|
45
63
|
order_id: string;
|
|
46
64
|
tracking_number: string;
|
|
47
|
-
|
|
48
|
-
|
|
65
|
+
method: string;
|
|
66
|
+
provider: string;
|
|
49
67
|
status: FulFillmentStatus;
|
|
50
68
|
created_at: string;
|
|
51
69
|
updated_at: string;
|
|
@@ -60,4 +78,5 @@ export interface OrderFulfillment {
|
|
|
60
78
|
destination: UnifiedCustomerAddressType;
|
|
61
79
|
departure: UnifiedCustomerAddressType;
|
|
62
80
|
};
|
|
63
|
-
|
|
81
|
+
metadata: Record<string, any>;
|
|
82
|
+
}
|