@23blocks/block-sales 3.1.1 → 3.1.2

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/dist/index.esm.js CHANGED
@@ -114,10 +114,10 @@ const orderMapper = {
114
114
  type: 'Order',
115
115
  map: (resource)=>({
116
116
  id: resource.id,
117
- uniqueId: parseString(resource.attributes['unique_id']) || resource.id,
117
+ uniqueId: parseString(resource.attributes['unique_id']),
118
118
  createdAt: parseDate(resource.attributes['created_at']) || new Date(),
119
119
  updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
120
- displayId: parseString(resource.attributes['display_id']) || resource.id,
120
+ displayId: parseString(resource.attributes['display_id']),
121
121
  userUniqueId: parseString(resource.attributes['user_unique_id']) || '',
122
122
  status: parseOrderStatus(resource.attributes['status']),
123
123
  subtotal: parseNumber(resource.attributes['subtotal']),
@@ -225,7 +225,7 @@ const orderDetailMapper = {
225
225
  type: 'OrderDetail',
226
226
  map: (resource)=>({
227
227
  id: resource.id,
228
- uniqueId: parseString(resource.attributes['unique_id']) || resource.id,
228
+ uniqueId: parseString(resource.attributes['unique_id']),
229
229
  createdAt: parseDate(resource.attributes['created_at']) || new Date(),
230
230
  updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
231
231
  orderUniqueId: parseString(resource.attributes['order_unique_id']) || '',
@@ -278,7 +278,7 @@ const orderTaxMapper = {
278
278
  type: 'OrderTax',
279
279
  map: (resource)=>({
280
280
  id: resource.id,
281
- uniqueId: parseString(resource.attributes['unique_id']) || resource.id,
281
+ uniqueId: parseString(resource.attributes['unique_id']),
282
282
  createdAt: parseDate(resource.attributes['created_at']) || new Date(),
283
283
  updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
284
284
  orderUniqueId: parseString(resource.attributes['order_unique_id']) || '',
@@ -334,7 +334,7 @@ const paymentMapper = {
334
334
  type: 'Payment',
335
335
  map: (resource)=>({
336
336
  id: resource.id,
337
- uniqueId: parseString(resource.attributes['unique_id']) || resource.id,
337
+ uniqueId: parseString(resource.attributes['unique_id']),
338
338
  createdAt: parseDate(resource.attributes['created_at']) || new Date(),
339
339
  updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
340
340
  orderUniqueId: parseString(resource.attributes['order_unique_id']) || '',
@@ -403,7 +403,7 @@ const subscriptionMapper = {
403
403
  type: 'Subscription',
404
404
  map: (resource)=>({
405
405
  id: resource.id,
406
- uniqueId: parseString(resource.attributes['unique_id']) || resource.id,
406
+ uniqueId: parseString(resource.attributes['unique_id']),
407
407
  createdAt: parseDate(resource.attributes['created_at']) || new Date(),
408
408
  updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
409
409
  userUniqueId: parseString(resource.attributes['user_unique_id']) || '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@23blocks/block-sales",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Sales block for 23blocks SDK - orders, payments, subscriptions, transactions",
5
5
  "license": "MIT",
6
6
  "author": "23blocks <hello@23blocks.com>",