@compassdigital/sdk.typescript 3.55.0 → 3.57.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.
@@ -190,10 +190,10 @@ export interface Order {
190
190
  loading_code?: string;
191
191
  [index: string]: any;
192
192
  };
193
- past_issues?: Issue[];
194
193
  [index: string]: any;
195
194
  };
196
195
  issue?: Issue;
196
+ past_issues?: Issue[];
197
197
  // Delivery user
198
198
  runner?: string;
199
199
  [index: string]: any;
@@ -37,13 +37,7 @@ export interface Task {
37
37
  location_id?: string;
38
38
  // type of location id
39
39
  location_type?: string;
40
- order?: {
41
- order_id?: string;
42
- customer_id?: string;
43
- customer?: any;
44
- order_details?: any;
45
- delivery_instructions?: string;
46
- };
40
+ order?: TaskOrder;
47
41
  pickup_details?: TaskLocation;
48
42
  dropoff_details?: TaskLocation;
49
43
  // Task Status
@@ -85,13 +79,7 @@ export interface TaskCreate {
85
79
  location_id: string;
86
80
  // type of location id
87
81
  location_type: string;
88
- order: {
89
- order_id?: string;
90
- customer_id?: string;
91
- customer?: any;
92
- order_details?: any;
93
- delivery_instructions?: string;
94
- };
82
+ order: TaskOrder;
95
83
  pickup_details: TaskLocation;
96
84
  dropoff_details: TaskLocation;
97
85
  // Task Status
@@ -114,12 +102,7 @@ export interface TaskUpdate {
114
102
  unit_id?: string;
115
103
  // type of location id
116
104
  location_type?: string;
117
- order?: {
118
- customer_id?: string;
119
- customer?: any;
120
- order_details?: any;
121
- delivery_instructions?: string;
122
- };
105
+ order?: TaskOrder;
123
106
  pickup_details?: TaskLocation;
124
107
  dropoff_details?: TaskLocation;
125
108
  // Task Status
@@ -139,6 +122,33 @@ export interface ActionResponse {
139
122
  success?: boolean;
140
123
  }
141
124
 
125
+ export interface TaskOrder {
126
+ order_id?: string;
127
+ customer_id?: string;
128
+ customer?: any;
129
+ order_details?: any;
130
+ delivery_instructions?: string;
131
+ issue?: OrderIssue;
132
+ past_issues?: OrderIssue[];
133
+ }
134
+
135
+ export interface OrderIssue {
136
+ // issue
137
+ id?: string;
138
+ type?: string;
139
+ item?: {
140
+ [index: string]: any;
141
+ };
142
+ // Array of Items with issues
143
+ items?: any[];
144
+ // Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
145
+ reason?: string;
146
+ meta?: {
147
+ created_at?: string;
148
+ [index: string]: any;
149
+ };
150
+ }
151
+
142
152
  // POST /task/ - Create new Task
143
153
 
144
154
  export type PostTaskBody = TaskCreate;