@secondcloset/types 2.5.8-beta-epic29357-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.
Files changed (76) hide show
  1. package/.vscode/settings.json +5 -0
  2. package/README.md +13 -0
  3. package/package.json +24 -0
  4. package/src/_common/address.ts +19 -0
  5. package/src/_common/credential.ts +12 -0
  6. package/src/_common/facility.ts +38 -0
  7. package/src/_common/file.ts +7 -0
  8. package/src/_common/image.ts +7 -0
  9. package/src/_common/index.ts +9 -0
  10. package/src/_common/note.ts +9 -0
  11. package/src/_common/organization.ts +63 -0
  12. package/src/_common/serviceArea.ts +1 -0
  13. package/src/_common/user.ts +26 -0
  14. package/src/fulfillment/appointment/appointment.ts +77 -0
  15. package/src/fulfillment/appointment/appointmentStatus.ts +21 -0
  16. package/src/fulfillment/appointment/appointmentType.ts +7 -0
  17. package/src/fulfillment/appointment/index.ts +3 -0
  18. package/src/fulfillment/asn/asn.ts +68 -0
  19. package/src/fulfillment/asn/asnItem.ts +15 -0
  20. package/src/fulfillment/asn/index.ts +2 -0
  21. package/src/fulfillment/index.ts +6 -0
  22. package/src/fulfillment/order/customer.ts +23 -0
  23. package/src/fulfillment/order/index.ts +3 -0
  24. package/src/fulfillment/order/order.ts +79 -0
  25. package/src/fulfillment/order/orderItem.ts +16 -0
  26. package/src/fulfillment/product/index.ts +2 -0
  27. package/src/fulfillment/product/product.ts +86 -0
  28. package/src/fulfillment/product/stock.ts +21 -0
  29. package/src/fulfillment/shipment/carrier.ts +17 -0
  30. package/src/fulfillment/shipment/index.ts +7 -0
  31. package/src/fulfillment/shipment/package.ts +32 -0
  32. package/src/fulfillment/shipment/packageIssue.ts +11 -0
  33. package/src/fulfillment/shipment/shipment.ts +56 -0
  34. package/src/fulfillment/shipment/shipmentItem.ts +42 -0
  35. package/src/fulfillment/shipment/shippingMethod.ts +136 -0
  36. package/src/fulfillment/warehouseReceivingOrder/incomingShipment.ts +35 -0
  37. package/src/fulfillment/warehouseReceivingOrder/index.ts +2 -0
  38. package/src/fulfillment/warehouseReceivingOrder/warehouseReceivingOrder.ts +34 -0
  39. package/src/index.ts +5 -0
  40. package/src/logistics/availability.ts +18 -0
  41. package/src/logistics/index.ts +2 -0
  42. package/src/logistics/shippingRate.ts +19 -0
  43. package/src/storage/address.ts +9 -0
  44. package/src/storage/appointment/appointment.ts +100 -0
  45. package/src/storage/appointment/appointmentItem.ts +34 -0
  46. package/src/storage/appointment/appointmentStatus.ts +21 -0
  47. package/src/storage/appointment/appointmentType.ts +8 -0
  48. package/src/storage/appointment/index.ts +4 -0
  49. package/src/storage/availability.ts +19 -0
  50. package/src/storage/categoryItem.ts +12 -0
  51. package/src/storage/closet.ts +16 -0
  52. package/src/storage/index.ts +8 -0
  53. package/src/storage/inventoryItem.ts +41 -0
  54. package/src/storage/order/index.ts +2 -0
  55. package/src/storage/order/order.ts +29 -0
  56. package/src/storage/order/orderItem.ts +26 -0
  57. package/src/storage/product.ts +26 -0
  58. package/src/warehouse/asnProcessLog.ts +15 -0
  59. package/src/warehouse/bin.ts +7 -0
  60. package/src/warehouse/index.ts +17 -0
  61. package/src/warehouse/location.ts +20 -0
  62. package/src/warehouse/locationItem.ts +23 -0
  63. package/src/warehouse/locationTemplate.ts +8 -0
  64. package/src/warehouse/manualItem.ts +20 -0
  65. package/src/warehouse/organization.ts +31 -0
  66. package/src/warehouse/pallet.ts +11 -0
  67. package/src/warehouse/palletRequestLog.ts +15 -0
  68. package/src/warehouse/product.ts +14 -0
  69. package/src/warehouse/return.ts +78 -0
  70. package/src/warehouse/shipmentProductsTracking.ts +18 -0
  71. package/src/warehouse/stock.ts +7 -0
  72. package/src/warehouse/supply.ts +41 -0
  73. package/src/warehouse/supplyStock.ts +10 -0
  74. package/src/warehouse/supplyTransaction.ts +14 -0
  75. package/src/warehouse/transaction.ts +25 -0
  76. package/tsconfig.json +17 -0
@@ -0,0 +1,21 @@
1
+ import { FacilityCode } from "../../_common";
2
+
3
+ interface StockOrder {
4
+ id: string;
5
+ order_id: string;
6
+ item_quantity: number;
7
+ }
8
+
9
+ export interface Stock {
10
+ id: string;
11
+ product_id: string;
12
+ facility: FacilityCode;
13
+ quantity: number;
14
+ deleted_at: string;
15
+ created_at: string;
16
+ updated_at: string;
17
+ quantity_to_be_reserved: number;
18
+ orders_to_be_reserved: StockOrder[];
19
+ reserved_quantity: number;
20
+ reserved_orders: StockOrder[];
21
+ }
@@ -0,0 +1,17 @@
1
+ export interface CarrierLogo {
2
+ id: string;
3
+ url: string;
4
+ created_at: string;
5
+ updated_at: string;
6
+ access: string;
7
+ }
8
+
9
+ export interface Carrier {
10
+ id: string;
11
+ carrier_code: string;
12
+ name: string;
13
+ external_platform: string | null;
14
+ external_id: string | null;
15
+ logo: CarrierLogo;
16
+ enabled_service_codes: string[];
17
+ }
@@ -0,0 +1,7 @@
1
+ export * from "./shipmentItem";
2
+ export * from "./shipment";
3
+ export * from "./shipmentItem";
4
+ export * from "./shippingMethod";
5
+ export * from "./carrier";
6
+ export * from "./package";
7
+ export * from "./packageIssue";
@@ -0,0 +1,32 @@
1
+ import { PackageIssue } from "./packageIssue";
2
+
3
+ export type PackageStatus =
4
+ | "unattempted"
5
+ | "failed"
6
+ | "completed"
7
+ | "cancelled"
8
+ | "not_delivered"
9
+ | "redelivered";
10
+ export type PackageType = "box" | "standard_pallet" | "double_pallet";
11
+
12
+ export interface Package {
13
+ id: string;
14
+ package_id: null | string;
15
+ logistics_shipment_id: string;
16
+ weight_value: string;
17
+ weight_unit: string;
18
+ length_value: string;
19
+ length_unit: string;
20
+ height_value: string;
21
+ height_unit: string;
22
+ width_value: string;
23
+ width_unit: string;
24
+ logistics_external_carrier_shipping_label_id: string;
25
+ shipment_item_ids: string[];
26
+ status: PackageStatus;
27
+ tracking_number: null | string;
28
+ failed_reason: null | string;
29
+ failed_notes: null | string;
30
+ package_type?: PackageType;
31
+ package_issues?: PackageIssue[];
32
+ }
@@ -0,0 +1,11 @@
1
+ import { BaseImage } from "../../_common";
2
+
3
+ export type PackageIssueFailedReason = 'damaged_package' | 'missing_package' | 'extra_package' | 'change_mind' | 'other'
4
+ export interface PackageIssue {
5
+ id: string;
6
+ logistics_shipment_id: string;
7
+ logistics_shipment_package_id: string;
8
+ failed_notes?: string | null;
9
+ failed_reason?: PackageIssueFailedReason | null;
10
+ images?: BaseImage[];
11
+ }
@@ -0,0 +1,56 @@
1
+ import { ShipmentItem } from "./shipmentItem";
2
+ import { BaseUser, BaseNote, BaseOrganization } from "../../_common";
3
+ import { Package } from "./package";
4
+ import {
5
+ SecondClosetShippingMethod,
6
+ ExternalCarrierShippingMethod,
7
+ } from "./shippingMethod";
8
+ import { Carrier } from "./carrier";
9
+ import { AppointmentType as FulfillmentAppointmentType } from "../appointment/appointmentType";
10
+ import { AppointmentType as StorageAppointmentType } from "../../storage/appointment/appointmentType";
11
+
12
+ export type ShipmentActionType =
13
+ | "setup"
14
+ | StorageAppointmentType
15
+ | FulfillmentAppointmentType;
16
+
17
+ export type ScServiceCode =
18
+ | "second_closet_standard"
19
+ | "second_closet_white_glove"
20
+ | "second_closet_to_the_door"
21
+ | "second_closet_room_of_choice"
22
+ | "second_closet_standard_1_person"
23
+ | "second_closet_room_of_choice_1_person"
24
+ | "second_closet_to_the_door_1_person";
25
+
26
+ export interface Shipment {
27
+ id: string;
28
+ organization_id: string;
29
+ organization?: BaseOrganization;
30
+ billed: boolean;
31
+ user: BaseUser;
32
+ notes: BaseNote[] | string;
33
+ shipment_items: ShipmentItem[];
34
+ shipment_number: string;
35
+ packages: Package[];
36
+ external_order_id: string | null;
37
+ external_order_type: string;
38
+ external_shipment_id: string | null;
39
+ carrier: Carrier | null;
40
+ created_at: string;
41
+ updated_at: string;
42
+ action_summary: ShipmentActionType[];
43
+ freight: boolean;
44
+ shipping_method: SecondClosetShippingMethod | ExternalCarrierShippingMethod;
45
+ shipping_method_type:
46
+ | "external_carrier_shipment"
47
+ | "appointment"
48
+ | "untracked_shipment";
49
+ external_order?: {
50
+ id: string;
51
+ external_order_number: string;
52
+ external_order_id: string | null;
53
+ created_at: string;
54
+ updated_at: string;
55
+ };
56
+ }
@@ -0,0 +1,42 @@
1
+ import { ShipmentActionType } from "./shipment";
2
+ export interface ShipmentItem {
3
+ id: string;
4
+ order_item_id: string;
5
+ description: string;
6
+ item_identifier: string;
7
+ item_identifier_type: string;
8
+ item_identifier_value: string;
9
+ product_id?: string;
10
+ weight_value: string;
11
+ weight_unit: string;
12
+ length_value: string;
13
+ length_unit: string;
14
+ height_value: string;
15
+ height_unit: string;
16
+ width_value: string;
17
+ width_unit: string;
18
+ shipment_actions: ShipmentActionType[];
19
+ shipment_actions_completion: Partial<
20
+ {
21
+ [key in ShipmentActionType]: boolean;
22
+ }
23
+ >;
24
+ shipment_actions_status?: {
25
+ [key in ShipmentActionType]: {
26
+ completed: boolean;
27
+ failed: boolean;
28
+ failed_reason: string | null;
29
+ };
30
+ };
31
+ shipment_item_group: {
32
+ id: string;
33
+ name: string;
34
+ description: string;
35
+ external_group_id: string;
36
+ group_identifier_type: string;
37
+ group_identifier_value: string;
38
+ created_at: string;
39
+ updated_at: string;
40
+ group_identifier: string;
41
+ } | null;
42
+ }
@@ -0,0 +1,136 @@
1
+ import { ShipmentItem } from "./shipmentItem";
2
+ import {
3
+ AppointmentStatus,
4
+ AppointmentType,
5
+ } from "../../fulfillment/appointment";
6
+ import { CustomerAddress, Customer, ShipmentTag } from "../order";
7
+ import { BaseUser, BaseImage, BaseNote } from "../../_common";
8
+ import { Package } from "./package";
9
+ import { Carrier } from "./carrier";
10
+ import { ScServiceCode } from "../shipment";
11
+
12
+ type ExternalCarrierShipmentStatus =
13
+ | "shipment_created"
14
+ | "label_generated"
15
+ | "label_printed"
16
+ | "label_required"
17
+ | "apply_label"
18
+ | "with_carrier"
19
+ | "shipment_cancelled"
20
+ | "returned";
21
+
22
+ export type ShippingMethodStatus =
23
+ | AppointmentStatus
24
+ | ExternalCarrierShipmentStatus;
25
+
26
+ export type ShippingMethodType =
27
+ | "appointment"
28
+ | "fulfillment"
29
+ | "external_carrier_shipment";
30
+
31
+ export interface SecondClosetShippingMethod {
32
+ id: string;
33
+ user_id?: string;
34
+ user_code?: string;
35
+ user_email?: string;
36
+ user_firstname?: string;
37
+ user_lastname?: string;
38
+ number?: string;
39
+ status: AppointmentStatus;
40
+ cancelled_at?: string | null;
41
+ failed_reason?: string | null;
42
+ failed_notes?: string | null;
43
+ claim_number?: string;
44
+ issue_images?: BaseImage[];
45
+ incomplete_at?: string;
46
+ job_type?: AppointmentType;
47
+ date?: string | null;
48
+ timerange?: string | null;
49
+ formatted_timeslot?: string | null;
50
+ customer_segment?: string;
51
+ start_time?: string | null;
52
+ end_time?: string | null;
53
+ arrived_time?: string | null;
54
+ rescheduled?: boolean;
55
+ rescheduled_appointment_id?: string | null;
56
+ range_of_days_assigned_dates?: {
57
+ assigned_start_datetime: string;
58
+ assigned_end_datetime: string;
59
+ } | null;
60
+ range_of_days_start_date?: string | null;
61
+ range_of_days_end_date?: string | null;
62
+ created_at: string;
63
+ updated_at?: string;
64
+ num_movers?: number | null;
65
+ estimated_time?: number;
66
+ movers?: string[] | null;
67
+ driver_id?: string | null;
68
+ signature_url?: string | null;
69
+ signed_at?: string | null;
70
+ signature_image?: BaseImage | null;
71
+ location?: CustomerAddress;
72
+ delivery_service_level?: ScServiceCode;
73
+ field_ops_notes?: BaseNote[];
74
+ verification_images?: BaseImage[];
75
+ source?: {
76
+ id: string;
77
+ type: string;
78
+ shipment_tags: ShipmentTag[];
79
+ customer: Customer;
80
+ notes: string;
81
+ platform: "manual" | "shopify" | string;
82
+ external_platform_version: number | null;
83
+ };
84
+ type?: ShippingMethodType;
85
+ shipment?: {
86
+ id: string;
87
+ organization_id: string;
88
+ billed: false;
89
+ user: BaseUser;
90
+ notes: BaseNote[];
91
+ shipment_items: ShipmentItem[];
92
+ shipment_number: string;
93
+ packages: Package[];
94
+ external_order_id: string;
95
+ external_order_type: string;
96
+ external_shipment_id: string | null;
97
+ carrier: Carrier | null;
98
+ created_at: string;
99
+ updated_at: string;
100
+ action_summary: string[];
101
+ };
102
+ }
103
+
104
+ interface CarrierShippingAddress {
105
+ id: string;
106
+ contact_name: string;
107
+ phone_number: string;
108
+ address: string;
109
+ city: string;
110
+ country: string;
111
+ province: string;
112
+ postal_code: string;
113
+ }
114
+
115
+ export interface ExternalCarrierShippingLabel {
116
+ id: string;
117
+ label_id: string;
118
+ tracking_number: string;
119
+ tracking_url: string;
120
+ label_download: string;
121
+ voided: boolean;
122
+ voided_at: string | null;
123
+ }
124
+
125
+ export interface ExternalCarrierShippingMethod {
126
+ id: string;
127
+ status: ExternalCarrierShipmentStatus;
128
+ shipped_at: string | null;
129
+ shipment_status: string | null;
130
+ shipment_id: string | null;
131
+ carrier_id: string | null;
132
+ service_code: string | null;
133
+ ship_from_address: CarrierShippingAddress;
134
+ ship_to_address: CarrierShippingAddress;
135
+ shipping_labels: ExternalCarrierShippingLabel[];
136
+ }
@@ -0,0 +1,35 @@
1
+ export interface IncomingShipment {
2
+ id: string;
3
+ parcel_type: string;
4
+ status: string;
5
+ tracking_info: string;
6
+ shipment_contents: ShipmentContents[];
7
+ arrival_date: string;
8
+ completed_date: string;
9
+ created_at: string;
10
+ updated_at: string;
11
+ warehouse_receiving_order_id: string;
12
+ deleted_at: string | null;
13
+ parcel_id: string;
14
+ carrier_name: string;
15
+ container_number: string;
16
+ }
17
+
18
+ export interface ShipmentContents {
19
+ id: string;
20
+ lot_number: string | null;
21
+ quantity_of_packages: number;
22
+ product_packaging_level: {
23
+ id: string;
24
+ name: string;
25
+ sku: string;
26
+ level: string;
27
+ products_per_package: number;
28
+ };
29
+ product: {
30
+ id: string;
31
+ scid: string;
32
+ sku: string;
33
+ name: string;
34
+ };
35
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./warehouseReceivingOrder";
2
+ export * from "./incomingShipment";
@@ -0,0 +1,34 @@
1
+ import { IncomingShipment } from "./incomingShipment";
2
+
3
+ export interface WarehouseReceivingOrder {
4
+ id: string;
5
+ draft: boolean;
6
+ wro_id: string;
7
+ organization_id: string;
8
+ destination_warehouse: string;
9
+ shipment_size: string;
10
+ packaging_option: string;
11
+ have_shipping_label: boolean;
12
+ status: string;
13
+ arrival_date: string;
14
+ created_at: string;
15
+ updated_at: string;
16
+ incoming_shipments: IncomingShipment[];
17
+ bill_of_lading_images: BillOfLadingImage[];
18
+ from_address: any | null; // TODO: type this
19
+ organization_name: string;
20
+ created_by: {
21
+ id: string;
22
+ first_name: string;
23
+ last_name: string;
24
+ user_code: string;
25
+ };
26
+ }
27
+
28
+ export interface BillOfLadingImage {
29
+ access: string;
30
+ created_at: string;
31
+ id: string;
32
+ updated_at: string;
33
+ url: string;
34
+ }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * as Common from "./_common";
2
+ export * as Fulfillment from "./fulfillment";
3
+ export * as Storage from "./storage";
4
+ export * as Warehouse from "./warehouse";
5
+ export * as Logistics from "./logistics";
@@ -0,0 +1,18 @@
1
+ export interface AvailabilityTimeSlot {
2
+ timeslot: string;
3
+ service_area: string;
4
+ customer_segment: string;
5
+ holiday: boolean;
6
+ total_milliseconds: number;
7
+ total_booked_milliseconds: number;
8
+ remaining_milliseconds: number;
9
+ vehicles_required: number;
10
+ duration_in_milliseconds: number;
11
+ available: boolean;
12
+ [index: string]: any;
13
+ }
14
+
15
+ export interface Availability {
16
+ date: string;
17
+ timeslots: AvailabilityTimeSlot[];
18
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./shippingRate";
2
+ export * from "./availability"
@@ -0,0 +1,19 @@
1
+ import { Carrier } from "../fulfillment/shipment/carrier";
2
+
3
+ export interface ShippingRate {
4
+ carrier: Carrier;
5
+ carrier_delivery_days: number;
6
+ currency: string;
7
+ delivery_days: number;
8
+ estimated_delivery_date: string;
9
+ external_platform: string;
10
+ guaranteed_service: boolean;
11
+ price: number;
12
+ rate_id: string;
13
+ service_code: string;
14
+ service_type: string;
15
+ shipment_id: string | null;
16
+ trackable: boolean;
17
+ client_account: boolean;
18
+ signature_rate?: boolean;
19
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseAddress } from "../_common/address";
2
+
3
+ export interface Address extends BaseAddress {
4
+ is_primary: boolean;
5
+ building_type: string;
6
+ elevator_access: boolean;
7
+ status: string;
8
+ full_name: string;
9
+ }
@@ -0,0 +1,100 @@
1
+ import { AppointmentItem } from "./appointmentItem";
2
+ import { AppointmentType } from "./appointmentType";
3
+ import { AppointmentStatus } from "./appointmentStatus";
4
+ import { Address } from "../address";
5
+ import { BaseImage, BaseNote } from "../../_common";
6
+ import { ScServiceCode } from "../../fulfillment";
7
+
8
+ export interface Appointment {
9
+ address: Address;
10
+ arrived_time?: string;
11
+ bulky_order_only: boolean;
12
+ claim_number?: string;
13
+ created_at: string;
14
+ customer_segment: string;
15
+ date: string;
16
+ delivery_service_level?: ScServiceCode;
17
+ driver_id?: string;
18
+ end_time?: string;
19
+ estimated_time: number;
20
+ failed_notes?: string;
21
+ failed_reason?: string;
22
+ field_ops_notes?: BaseNote[];
23
+ formatted_timeslot: string;
24
+ id: string;
25
+ immediate: true;
26
+ incomplete_at?: string;
27
+ issue_images?: BaseImage[];
28
+ job_type: AppointmentType;
29
+ location?: Location;
30
+ movers?: any;
31
+ notes?: string;
32
+ num_movers?: number;
33
+ number: string;
34
+ order_id: string;
35
+ rescheduled: boolean;
36
+ rescheduled_appointment_id?: string | null;
37
+ signature_image?: string;
38
+ signature_url?: string;
39
+ signed_at?: string;
40
+ space_order: boolean;
41
+ start_time?: string;
42
+ status: AppointmentStatus;
43
+ temporary: boolean;
44
+ timerange: AppointmentSlot;
45
+ type: string;
46
+ updated_at: string;
47
+ user_code: string;
48
+ user_email: string;
49
+ user_firstname: string;
50
+ user_id: string;
51
+ user_lastname: string;
52
+ items: AppointmentItem[];
53
+ verification_images?: BaseImage[];
54
+ }
55
+
56
+ export type AppointmentSlot =
57
+ | "07-10"
58
+ | "10-13"
59
+ | "13-16"
60
+ | "16-19"
61
+ | "19-22"
62
+ | "10-22"
63
+ | "09-13"
64
+ | "13-17"
65
+ | "17-21";
66
+
67
+ export interface AppointmentNote {
68
+ id: string;
69
+ text: string;
70
+ created_at: string;
71
+ updated_at: string;
72
+ }
73
+
74
+ export interface AppointmentTask {
75
+ id: string;
76
+ task_type: string;
77
+ status: string;
78
+ appointment_id: string;
79
+ notes: string;
80
+ assignee: string | null;
81
+ }
82
+
83
+ export interface Location {
84
+ address: string;
85
+ cell_phone_number: string | null;
86
+ city: string;
87
+ contact_name: string;
88
+ coordinates: { lat: number; lng: number };
89
+ country: string;
90
+ created_at: string;
91
+ customer_id: string;
92
+ customer_phone_number: string;
93
+ evening_phone_number: string | null;
94
+ id: string;
95
+ phone_number: string;
96
+ postal_code: string;
97
+ province: string;
98
+ service_area: "yyz" | "yvr" | "yow" | "yul" | null;
99
+ updated_at: string;
100
+ }
@@ -0,0 +1,34 @@
1
+ import { BaseImage } from "../../_common";
2
+
3
+ interface Image extends BaseImage {
4
+ resource_type: string;
5
+ resource_id: string;
6
+ deleted_at: string | null;
7
+ }
8
+
9
+ export interface AppointmentItem {
10
+ name: string;
11
+ stripe_id: string;
12
+ quantity: number;
13
+ price: number;
14
+ recurring: true;
15
+ type: string;
16
+ item_type: string;
17
+ item_id: string;
18
+ description: string;
19
+ barcode: string;
20
+ category_id: string | null;
21
+ category_name: string | null;
22
+ category_description: string | null;
23
+ category_volume: string | null;
24
+ qr_code: string | null;
25
+ status: string;
26
+ internal_status: string;
27
+ nickname: string | null;
28
+ material: string | null;
29
+ color: string | null;
30
+ size: string;
31
+ brand: string | null;
32
+ images: Image[];
33
+ metadata: {};
34
+ }
@@ -0,0 +1,21 @@
1
+ export type AppointmentStatus =
2
+ | "request_received"
3
+ | "confirmed"
4
+ | "shipment_created"
5
+ | "fulfillment"
6
+ | "ready"
7
+ | "loaded"
8
+ | "cancelled"
9
+ | "scheduled"
10
+ | "fulfilled"
11
+ | "on_the_way"
12
+ | "active"
13
+ | "done"
14
+ | "signed"
15
+ | "staging"
16
+ | "completed"
17
+ | "started"
18
+ | "arrived"
19
+ | "incomplete"
20
+ | "failed"
21
+ | "no_show";
@@ -0,0 +1,8 @@
1
+ export type AppointmentType =
2
+ | "pick_up"
3
+ | "drop_off"
4
+ | "immediate_pick_up"
5
+ | "retrieve"
6
+ | "return"
7
+ | "immediate_retrieve"
8
+ | "custom";
@@ -0,0 +1,4 @@
1
+ export * from "./appointment";
2
+ export * from "./appointmentItem";
3
+ export * from "./appointmentType";
4
+ export * from "./appointmentStatus";
@@ -0,0 +1,19 @@
1
+ export type Slot = "10-13" | "13-16" | "16-19" | "19-22" | string;
2
+
3
+ export interface TimeSlot {
4
+ timeslot: Slot;
5
+ service_area: string;
6
+ customer_segment: string;
7
+ holiday: boolean;
8
+ total_milliseconds: number;
9
+ total_booked_milliseconds: number;
10
+ remaining_milliseconds: number;
11
+ vehicles_required: number;
12
+ duration_in_milliseconds: number;
13
+ available: boolean;
14
+ }
15
+
16
+ export interface Availability {
17
+ date: string;
18
+ timeslots: TimeSlot[];
19
+ }
@@ -0,0 +1,12 @@
1
+ import { BaseImage } from "../_common";
2
+
3
+ export interface CategoryItem {
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ stripe_plan_id: string;
8
+ synonyms: string[];
9
+ volume: number;
10
+ default_image: BaseImage;
11
+ public: boolean;
12
+ }
@@ -0,0 +1,16 @@
1
+ import { InventoryItem } from "./inventoryItem";
2
+
3
+ export interface Closet {
4
+ id: string;
5
+ user_id: string;
6
+ order_id?: string;
7
+ name: string;
8
+ closet_name: string;
9
+ quantity: number;
10
+ stripe_plan_id: string;
11
+ stripe_subscription_id?: string;
12
+ is_full: boolean;
13
+ created_at: string;
14
+ updated_at: string;
15
+ items: InventoryItem[];
16
+ }