@thunkier/thunkmetrc-client 0.3.1 → 0.3.3

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.d.ts CHANGED
@@ -634,6 +634,14 @@ export declare class MetrcClient {
634
634
  * PUT UpdatePackagesLocation
635
635
  */
636
636
  updatePackagesLocation<TResponse = any, TBody = any>(body?: TBody, licenseNumber?: string): Promise<TResponse>;
637
+ /**
638
+ * Updates a list of Product pre-treatments for packages at a specific Facility.
639
+ * Permissions Required:
640
+ * - View Packages
641
+ * - Manage Packages Inventory
642
+ * PUT UpdatePretreat
643
+ */
644
+ updatePackagesPretreat<TResponse = any, TBody = any>(body?: TBody, licenseNumber?: string): Promise<TResponse>;
637
645
  /**
638
646
  * Updates a list of Product remediations for packages at a specific Facility.
639
647
  * Permissions Required:
@@ -1379,7 +1387,7 @@ export declare class MetrcClient {
1379
1387
  */
1380
1388
  createSalesReceipts<TResponse = any, TBody = any>(body?: TBody, licenseNumber?: string): Promise<TResponse>;
1381
1389
  /**
1382
- * Records retailer delivery data for a given License Number, including delivery destinations. Please note: The DateTime field must be the actual date and time of the transaction without the time zone. This date/time must already be in the same time zone as the Facility recording the sales. For example, if the Facility is in Pacific Time, then this time must be in Pacific Standard (or Daylight Savings) Time and not in UTC.
1390
+ * Records sales deliveries originating from a retailer delivery for a given License Number. Please note: The SalesDateTime field must be the actual date and time of the transaction without the time zone. This date/time must already be in the same time zone as the Facility recording the sales. For example, if the Facility is in Pacific Time, then this time must be in Pacific Standard (or Daylight Savings) Time and not in UTC.
1383
1391
  * Permissions Required:
1384
1392
  * - External Sources(ThirdPartyVendorV2)/Sales Deliveries(Write)
1385
1393
  * - Industry/Facility Type/Retailer Delivery
@@ -1387,7 +1395,6 @@ export declare class MetrcClient {
1387
1395
  * - WebApi Sales Deliveries Read Write State (All or WriteOnly)
1388
1396
  * - WebApi Retail ID Read Write State (All or WriteOnly) - Required for RID only.
1389
1397
  * - External Sources(ThirdPartyVendorV2)/Retail ID(Write) - Required for RID only.
1390
- * - Manage Retailer Delivery
1391
1398
  * POST CreateSalesDeliveriesRetailer
1392
1399
  */
1393
1400
  createSalesDeliveriesRetailer<TResponse = any, TBody = any>(body?: TBody, licenseNumber?: string): Promise<TResponse>;
package/dist/index.js CHANGED
@@ -1475,6 +1475,22 @@ class MetrcClient {
1475
1475
  const { data } = await this.client.put(fullUrl, body);
1476
1476
  return data;
1477
1477
  }
1478
+ /**
1479
+ * Updates a list of Product pre-treatments for packages at a specific Facility.
1480
+ * Permissions Required:
1481
+ * - View Packages
1482
+ * - Manage Packages Inventory
1483
+ * PUT UpdatePretreat
1484
+ */
1485
+ async updatePackagesPretreat(body, licenseNumber) {
1486
+ const query = new URLSearchParams();
1487
+ if (licenseNumber !== undefined)
1488
+ query.append('licenseNumber', String(licenseNumber));
1489
+ const queryStr = query.toString();
1490
+ const fullUrl = queryStr ? `/packages/v2/pretreat?${queryStr}` : `/packages/v2/pretreat`;
1491
+ const { data } = await this.client.put(fullUrl, body);
1492
+ return data;
1493
+ }
1478
1494
  /**
1479
1495
  * Updates a list of Product remediations for packages at a specific Facility.
1480
1496
  * Permissions Required:
@@ -3136,7 +3152,7 @@ class MetrcClient {
3136
3152
  return data;
3137
3153
  }
3138
3154
  /**
3139
- * Records retailer delivery data for a given License Number, including delivery destinations. Please note: The DateTime field must be the actual date and time of the transaction without the time zone. This date/time must already be in the same time zone as the Facility recording the sales. For example, if the Facility is in Pacific Time, then this time must be in Pacific Standard (or Daylight Savings) Time and not in UTC.
3155
+ * Records sales deliveries originating from a retailer delivery for a given License Number. Please note: The SalesDateTime field must be the actual date and time of the transaction without the time zone. This date/time must already be in the same time zone as the Facility recording the sales. For example, if the Facility is in Pacific Time, then this time must be in Pacific Standard (or Daylight Savings) Time and not in UTC.
3140
3156
  * Permissions Required:
3141
3157
  * - External Sources(ThirdPartyVendorV2)/Sales Deliveries(Write)
3142
3158
  * - Industry/Facility Type/Retailer Delivery
@@ -3144,7 +3160,6 @@ class MetrcClient {
3144
3160
  * - WebApi Sales Deliveries Read Write State (All or WriteOnly)
3145
3161
  * - WebApi Retail ID Read Write State (All or WriteOnly) - Required for RID only.
3146
3162
  * - External Sources(ThirdPartyVendorV2)/Retail ID(Write) - Required for RID only.
3147
- * - Manage Retailer Delivery
3148
3163
  * POST CreateSalesDeliveriesRetailer
3149
3164
  */
3150
3165
  async createSalesDeliveriesRetailer(body, licenseNumber) {
@@ -3152,7 +3167,7 @@ class MetrcClient {
3152
3167
  if (licenseNumber !== undefined)
3153
3168
  query.append('licenseNumber', String(licenseNumber));
3154
3169
  const queryStr = query.toString();
3155
- const fullUrl = queryStr ? `/sales/v2/deliveries/retailer?${queryStr}` : `/sales/v2/deliveries/retailer`;
3170
+ const fullUrl = queryStr ? `/sales/v2/deliveries/retailer/sale?${queryStr}` : `/sales/v2/deliveries/retailer/sale`;
3156
3171
  const { data } = await this.client.post(fullUrl, body);
3157
3172
  return data;
3158
3173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunkier/thunkmetrc-client",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Auto-generated TypeScript client for ThunkMetrc",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",