@use-stall/types 0.1.9 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-stall/types",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "description": "Type declarations for Stall SDKs",
5
5
  "types": "index.d.ts",
6
6
  "type": "module",
@@ -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
- name: string;
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 FulfillmentType {
28
+ export interface FulfillmentProviderConfigType {
11
29
  id: string;
12
- name: string;
13
- description: string;
14
- configurations: {
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
- type_id: string;
48
- provider_id: string;
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
+ }
package/src/payments.d.ts CHANGED
@@ -31,7 +31,10 @@ export interface PaymentProviderConfigType {
31
31
  provider: string; // provider id
32
32
  config: {
33
33
  [key: string]: any;
34
+ manual_methods?: string[];
34
35
  };
36
+ created_at: string;
37
+ updated_at: string;
35
38
  }
36
39
 
37
40
  export type PaymentCollectionStatus =
@@ -57,4 +60,5 @@ export interface PaymentCollectionType {
57
60
  provider_id: string;
58
61
  payment_method: PaymentMethodType;
59
62
  note: string;
63
+ metadata: Record<string, any>;
60
64
  }