create-mercato-app 0.6.5-develop.4516.1.88e6ab71a9 → 0.6.5-develop.4534.1.b459babe6d

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": "create-mercato-app",
3
- "version": "0.6.5-develop.4516.1.88e6ab71a9",
3
+ "version": "0.6.5-develop.4534.1.b459babe6d",
4
4
  "type": "module",
5
5
  "description": "Create a new Open Mercato application",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,8 @@ import type {
9
9
  TrackingResult,
10
10
  ShippingWebhookEvent,
11
11
  UnifiedShipmentStatus,
12
+ DropOffPoint,
13
+ SearchDropOffPointsInput,
12
14
  } from '@open-mercato/core/modules/shipping_carriers/lib/adapter'
13
15
 
14
16
  /**
@@ -210,4 +212,35 @@ export const mockShippingAdapter: ShippingAdapter = {
210
212
  }
211
213
  return map[carrierStatus] ?? 'unknown'
212
214
  },
215
+
216
+ async searchDropOffPoints(input: SearchDropOffPointsInput): Promise<DropOffPoint[]> {
217
+ const postalCode = typeof input.postCode === 'string' && input.postCode.trim().length > 0
218
+ ? input.postCode.trim()
219
+ : '10001'
220
+ const pointType = typeof input.type === 'string' && input.type.trim().length > 0
221
+ ? input.type.trim()
222
+ : 'locker'
223
+ return [
224
+ {
225
+ id: 'MOCK-POP-001',
226
+ name: 'Mock Locker - Main Street',
227
+ type: pointType,
228
+ city: 'New York',
229
+ postalCode,
230
+ street: '100 Main Street',
231
+ latitude: 40.7128,
232
+ longitude: -74.006,
233
+ },
234
+ {
235
+ id: 'MOCK-POP-002',
236
+ name: 'Mock Pickup Point - Market Square',
237
+ type: pointType,
238
+ city: 'New York',
239
+ postalCode,
240
+ street: '250 Market Square',
241
+ latitude: 40.7138,
242
+ longitude: -74.001,
243
+ },
244
+ ]
245
+ },
213
246
  }