@spscommerce/asst-api 4.5.0 → 4.6.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.
@@ -14,7 +14,6 @@ import {
14
14
  itemErrorSummaryResultV2Schema,
15
15
  itemHierarchyResponseSchema,
16
16
  itemSearchViewSchema,
17
- itemStatusResponseSchema,
18
17
  itemStatusV2ResponseSchema,
19
18
  localeSchema,
20
19
  spreadsheetTemplateSchema,
@@ -441,13 +440,6 @@ function createItemsApi(client, companyType) {
441
440
  const data = await client.get(`${BASE_URL12}/${itemInfoId}/spsItemId`, { signal }).json();
442
441
  return spsItemIdResponseSchema.parse(data);
443
442
  }
444
- async function getItemStatus(itemIds) {
445
- const data = await client.post(`${BASE_URL12}/status`, {
446
- json: { itemIds },
447
- searchParams: getCompanyTypeSearchParams({ companyType })
448
- }).json();
449
- return itemStatusResponseSchema.parse(data);
450
- }
451
443
  return {
452
444
  searchItems,
453
445
  getItem,
@@ -455,15 +447,14 @@ function createItemsApi(client, companyType) {
455
447
  deleteItem,
456
448
  deleteItems,
457
449
  getItemInfoId,
458
- getSpsItemId,
459
- getItemStatus
450
+ getSpsItemId
460
451
  };
461
452
  }
462
453
 
463
454
  // lib/items/v2/index.ts
464
455
  var BASE_URL13 = "v2/items";
465
- function createItemsApiV2(client, companyType) {
466
- async function getItemStatus(itemIds) {
456
+ function createItemsApiV2(client) {
457
+ async function getItemStatus(companyType, itemIds) {
467
458
  const data = await client.post(`${BASE_URL13}/status`, {
468
459
  json: { itemIds },
469
460
  searchParams: getCompanyTypeSearchParams({ companyType })
package/dist/index.cjs CHANGED
@@ -5220,13 +5220,6 @@ function createItemsApi(client, companyType) {
5220
5220
  const data = await client.get(`${BASE_URL12}/${itemInfoId}/spsItemId`, { signal }).json();
5221
5221
  return spsItemIdResponseSchema.parse(data);
5222
5222
  }
5223
- async function getItemStatus(itemIds) {
5224
- const data = await client.post(`${BASE_URL12}/status`, {
5225
- json: { itemIds },
5226
- searchParams: getCompanyTypeSearchParams({ companyType })
5227
- }).json();
5228
- return itemStatusResponseSchema.parse(data);
5229
- }
5230
5223
  return {
5231
5224
  searchItems,
5232
5225
  getItem,
@@ -5234,8 +5227,7 @@ function createItemsApi(client, companyType) {
5234
5227
  deleteItem,
5235
5228
  deleteItems,
5236
5229
  getItemInfoId,
5237
- getSpsItemId,
5238
- getItemStatus
5230
+ getSpsItemId
5239
5231
  };
5240
5232
  }
5241
5233
 
@@ -5303,8 +5295,8 @@ var itemStatusV2ResponseSchema = external_exports.object({
5303
5295
 
5304
5296
  // lib/items/v2/index.ts
5305
5297
  var BASE_URL13 = "v2/items";
5306
- function createItemsApiV2(client, companyType) {
5307
- async function getItemStatus(itemIds) {
5298
+ function createItemsApiV2(client) {
5299
+ async function getItemStatus(companyType, itemIds) {
5308
5300
  const data = await client.post(`${BASE_URL13}/status`, {
5309
5301
  json: { itemIds },
5310
5302
  searchParams: getCompanyTypeSearchParams({ companyType })
package/dist/index.d.cts CHANGED
@@ -467,7 +467,6 @@ type ItemsApi = {
467
467
  deleteItems: (itemIds: string[]) => Promise<void>;
468
468
  getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
469
469
  getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
470
- getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
471
470
  };
472
471
  /**
473
472
  * Initialize Items Api functions
@@ -776,8 +775,8 @@ type Stage = z.infer<typeof stageSchema>;
776
775
  * @param companyType Company type for perspective
777
776
  * @returns An object containing Items API functions
778
777
  */
779
- declare function createItemsApiV2(client: AsstClient, companyType?: CompanyType): {
780
- getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
778
+ declare function createItemsApiV2(client: AsstClient): {
779
+ getItemStatus: (companyType: CompanyType, itemIds: string[]) => Promise<ItemStatusV2Response>;
781
780
  };
782
781
 
783
782
  /**
package/dist/index.d.ts CHANGED
@@ -467,7 +467,6 @@ type ItemsApi = {
467
467
  deleteItems: (itemIds: string[]) => Promise<void>;
468
468
  getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
469
469
  getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
470
- getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
471
470
  };
472
471
  /**
473
472
  * Initialize Items Api functions
@@ -776,8 +775,8 @@ type Stage = z.infer<typeof stageSchema>;
776
775
  * @param companyType Company type for perspective
777
776
  * @returns An object containing Items API functions
778
777
  */
779
- declare function createItemsApiV2(client: AsstClient, companyType?: CompanyType): {
780
- getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
778
+ declare function createItemsApiV2(client: AsstClient): {
779
+ getItemStatus: (companyType: CompanyType, itemIds: string[]) => Promise<ItemStatusV2Response>;
781
780
  };
782
781
 
783
782
  /**
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  createTradingPartnerSettingsApi,
17
17
  createUniqueCriteriaApi,
18
18
  createWhoAmIApi
19
- } from "./chunk-VS3QNXZF.js";
19
+ } from "./chunk-U7UJOT4D.js";
20
20
  import {
21
21
  AsstClient,
22
22
  BASE_URLS,
package/dist/msw.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  BASE_URL_V2,
20
20
  FlattenedItemIdentifierKeysSchema,
21
21
  retailerTradingPartnerStages
22
- } from "./chunk-VS3QNXZF.js";
22
+ } from "./chunk-U7UJOT4D.js";
23
23
  import {
24
24
  attrProdTypeSchema,
25
25
  catalogBriefResponseSchema,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Assortment Api is a collection of HTTP functions to use Assortment endpoints",
4
4
  "author": "Assortment",
5
5
  "repository": "https://github.com/SPSCommerce/assortment-main/tree/main/ui/packages/asst-api",
6
- "version": "4.5.0",
6
+ "version": "4.6.0",
7
7
  "files": [
8
8
  "dist"
9
9
  ],