@spscommerce/asst-api 0.0.1-beta.8 → 0.0.1

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.cjs CHANGED
@@ -37,6 +37,7 @@ __export(lib_exports, {
37
37
  createCompanyFeaturesApi: () => createCompanyFeaturesApi,
38
38
  createErrorsApi: () => createErrorsApi,
39
39
  createExportsApi: () => createExportsApi,
40
+ createFeatureFlagsApi: () => createFeatureFlagsApi,
40
41
  createImportsApi: () => createImportsApi,
41
42
  createItemsApi: () => createItemsApi,
42
43
  createLocaleApi: () => createLocaleApi,
@@ -3901,7 +3902,8 @@ function createImportsApi(client) {
3901
3902
  searchParams: params,
3902
3903
  headers: {
3903
3904
  Accept: "application/octet-stream"
3904
- }
3905
+ },
3906
+ timeout: false
3905
3907
  });
3906
3908
  const disposition = response.headers.get("content-disposition") || "";
3907
3909
  const filename = disposition.match(/filename="(.+)"/)?.[1];
@@ -3940,7 +3942,8 @@ function createExportsApi(client) {
3940
3942
  searchParams,
3941
3943
  headers: {
3942
3944
  Accept: "application/octet-stream"
3943
- }
3945
+ },
3946
+ timeout: false
3944
3947
  });
3945
3948
  const disposition = response.headers.get("content-disposition") || "";
3946
3949
  const filename = disposition.match(/filename="(.+)"/)?.[1];
@@ -3993,9 +3996,10 @@ function createProductTypesApi(client) {
3993
3996
  // lib/tradingPartners/models/Connection.ts
3994
3997
  var connectionSchema = z.object({
3995
3998
  catalog_id: z.number(),
3996
- catalog_name: z.string(),
3999
+ catalog_name: z.string().nullable(),
3997
4000
  partner_company_name: z.string(),
3998
- partner_company_id: z.number()
4001
+ partner_company_id: z.number(),
4002
+ partner_org_id: z.string()
3999
4003
  });
4000
4004
 
4001
4005
  // lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
@@ -4025,6 +4029,7 @@ function createTradingPartnerAccessApi(client) {
4025
4029
  // lib/categories/models/ItemCategory.ts
4026
4030
  var itemCategorySchema = z.object({
4027
4031
  categoryid: z.number(),
4032
+ encodedCategoryId: z.string(),
4028
4033
  companyId: z.number(),
4029
4034
  name: z.string(),
4030
4035
  isActive: z.number(),
@@ -4043,6 +4048,30 @@ var itemCategoriesSearchSchema = z.object({
4043
4048
  data: z.array(itemCategorySchema)
4044
4049
  });
4045
4050
 
4051
+ // lib/categories/models/Hierarchy.ts
4052
+ var baseHierarchySchema = z.object({
4053
+ id: z.string(),
4054
+ name: z.string().nullish(),
4055
+ description: z.string().nullish(),
4056
+ type: z.string().nullish()
4057
+ });
4058
+ var hierarchySchema = baseHierarchySchema.extend(
4059
+ {
4060
+ child: z.lazy(() => hierarchySchema).nullable()
4061
+ }
4062
+ );
4063
+
4064
+ // lib/categories/models/ItemHierarchy.ts
4065
+ var itemHierarchySchema = z.object({
4066
+ itemId: z.string(),
4067
+ hierarchies: z.array(hierarchySchema)
4068
+ });
4069
+
4070
+ // lib/categories/models/ItemHierarchyResponse.ts
4071
+ var itemHierarchyResponseSchema = z.object({
4072
+ itemHierarchies: z.array(itemHierarchySchema)
4073
+ });
4074
+
4046
4075
  // lib/categories/index.ts
4047
4076
  var BASE_URL5 = "categories";
4048
4077
  function createCategoriesApi(client) {
@@ -4054,20 +4083,42 @@ function createCategoriesApi(client) {
4054
4083
  return itemCategoriesSearchSchema.parse(data);
4055
4084
  }
4056
4085
  async function getProductCodes(params, signal) {
4086
+ const searchParams = { type: "PRODUCT_CODE" };
4087
+ if (params?.categoryName) {
4088
+ searchParams.categoryName = params.categoryName;
4089
+ }
4090
+ if (params?.catalogId) {
4091
+ searchParams.catalogId = params.catalogId;
4092
+ }
4093
+ if (params?.selectionCodeId) {
4094
+ searchParams.selectionCodeId = params.selectionCodeId;
4095
+ }
4057
4096
  const data = await client.get(`${BASE_URL5}/search-category`, {
4058
- searchParams: { ...params, type: "PRODUCT_CODE" },
4059
- signal
4097
+ searchParams,
4098
+ signal,
4099
+ timeout: false
4060
4100
  }).json();
4061
4101
  return itemCategoriesSearchSchema.parse(data);
4062
4102
  }
4063
4103
  async function getSelectionCodes(params, signal) {
4104
+ const searchParams = { type: "SELECTION_CODE" };
4105
+ if (params?.categoryName) {
4106
+ searchParams.categoryName = params.categoryName;
4107
+ }
4108
+ if (params?.catalogId) {
4109
+ searchParams.catalogId = params.catalogId;
4110
+ }
4064
4111
  const data = await client.get(`${BASE_URL5}/search-category`, {
4065
- searchParams: { ...params, type: "SELECTION_CODE" },
4112
+ searchParams,
4066
4113
  signal
4067
4114
  }).json();
4068
4115
  return itemCategoriesSearchSchema.parse(data);
4069
4116
  }
4070
- return { getCatalogs, getProductCodes, getSelectionCodes };
4117
+ async function getItemHierarchy(itemIds) {
4118
+ const data = await client.post(`${BASE_URL5}/item-hierarchy`, { json: { itemIds } }).json();
4119
+ return itemHierarchyResponseSchema.parse(data);
4120
+ }
4121
+ return { getCatalogs, getProductCodes, getSelectionCodes, getItemHierarchy };
4071
4122
  }
4072
4123
 
4073
4124
  // lib/attributes/models/AttributeMetaData.ts
@@ -4248,11 +4299,16 @@ function createAttributesApi(client) {
4248
4299
  }).json();
4249
4300
  return z.array(attributeValidValuesSchema).parse(data);
4250
4301
  }
4302
+ async function getCompanyInterestedAttributes(signal) {
4303
+ const data = await client.get(`${BASE_URL6}/company/interested-attributes`, { signal }).json();
4304
+ return z.array(z.string()).parse(data);
4305
+ }
4251
4306
  return {
4252
4307
  getAllAttributes,
4253
4308
  getAllAttributesByCompany,
4254
4309
  getAttributesExtensiveInfo,
4255
- getAttributeValidValues
4310
+ getAttributeValidValues,
4311
+ getCompanyInterestedAttributes
4256
4312
  };
4257
4313
  }
4258
4314
 
@@ -4326,9 +4382,9 @@ var identityServiceOrganizationMetadataSchema = z.object({
4326
4382
 
4327
4383
  // lib/whoami/models/IdentityServiceOrganization.ts
4328
4384
  var identityServiceOrganizationSchema = z.object({
4329
- organization_name: z.string(),
4330
- organization_site: z.string(),
4331
- namespace: z.string(),
4385
+ organization_name: z.string().optional(),
4386
+ organization_site: z.string().optional(),
4387
+ namespace: z.string().optional(),
4332
4388
  id: z.string(),
4333
4389
  permissions: z.array(z.string()).optional(),
4334
4390
  metadata: identityServiceOrganizationMetadataSchema.optional()
@@ -4346,26 +4402,26 @@ var identityServicePreferencesSchema = z.object({
4346
4402
  // lib/whoami/models/IdentityServiceUser.ts
4347
4403
  var identityServiceUserSchema = z.object({
4348
4404
  id: z.string(),
4349
- email: z.string(),
4350
- first_name: z.string(),
4351
- last_name: z.string(),
4352
- job_title: z.string(),
4353
- externally_managed: z.boolean(),
4354
- city: z.string(),
4405
+ email: z.string().optional(),
4406
+ first_name: z.string().optional(),
4407
+ last_name: z.string().optional(),
4408
+ job_title: z.string().optional(),
4409
+ externally_managed: z.boolean().optional(),
4410
+ city: z.string().optional(),
4355
4411
  name: z.string(),
4356
- state: z.string(),
4357
- country: z.string(),
4358
- user_type: z.string(),
4359
- token_type: z.string(),
4360
- avatar_image_id: z.string(),
4361
- avatar_image_url: z.string(),
4362
- origin_avatar_image_id: z.string(),
4363
- bio: z.string(),
4364
- phone_number: z.string(),
4365
- twitter_handle: z.string(),
4366
- linkedin_url: z.string(),
4412
+ state: z.string().optional(),
4413
+ country: z.string().optional(),
4414
+ user_type: z.string().optional(),
4415
+ token_type: z.string().optional(),
4416
+ avatar_image_id: z.string().optional(),
4417
+ avatar_image_url: z.string().optional(),
4418
+ origin_avatar_image_id: z.string().optional(),
4419
+ bio: z.string().optional(),
4420
+ phone_number: z.string().optional(),
4421
+ twitter_handle: z.string().optional(),
4422
+ linkedin_url: z.string().optional(),
4367
4423
  description: z.string().optional(),
4368
- preferences: identityServicePreferencesSchema,
4424
+ preferences: identityServicePreferencesSchema.optional(),
4369
4425
  roles: z.array(z.string()),
4370
4426
  organization: identityServiceOrganizationSchema,
4371
4427
  password: z.string(),
@@ -4426,6 +4482,20 @@ function createCompanyFeaturesApi(client) {
4426
4482
  };
4427
4483
  }
4428
4484
 
4485
+ // lib/featureFlags/index.ts
4486
+ var BASE_URL11 = "feature-flag";
4487
+ function createFeatureFlagsApi(client) {
4488
+ async function checkEnableItemsApiEndpointsForImports(signal) {
4489
+ const data = await client.get(`${BASE_URL11}/enable-items-api-endpoints-for-imports/`, {
4490
+ signal
4491
+ }).json();
4492
+ return z.boolean().parse(data);
4493
+ }
4494
+ return {
4495
+ checkEnableItemsApiEndpointsForImports
4496
+ };
4497
+ }
4498
+
4429
4499
  // lib/items/models/ItemHeader.ts
4430
4500
  var itemHeaderSchema = z.object({
4431
4501
  status: z.string().optional(),
@@ -4477,10 +4547,10 @@ var itemMapSchema = z.object({
4477
4547
  consumeravailabledatestring: z.string().nullish(),
4478
4548
  status: z.string().nullish(),
4479
4549
  nrfcolorcode: z.array(z.string()).nullish(),
4480
- nrfsizecode: z.string().nullish(),
4550
+ nrfsizecode: z.array(z.string()).nullish(),
4481
4551
  productcolordescription: z.array(z.string()).nullish(),
4482
4552
  productsizedescription: z.array(z.string()).nullish()
4483
- });
4553
+ }).passthrough();
4484
4554
 
4485
4555
  // lib/items/models/ItemTable.ts
4486
4556
  var itemTableSchema = z.object({
@@ -4552,7 +4622,7 @@ var downLoadItemsParamsSchema = z.object({
4552
4622
  // lib/errors/models/ItemErrorDetails.ts
4553
4623
  var itemErrorDetailsSchema = z.object({
4554
4624
  errorMessage: z.string(),
4555
- attributeName: z.string(),
4625
+ attributeName: z.string().nullable(),
4556
4626
  tradingPartnerNames: z.array(z.string()),
4557
4627
  phases: z.array(phaseEnumSchema),
4558
4628
  attributeDbNames: z.array(z.string()),
@@ -4776,45 +4846,88 @@ var itemDetailSchema = z.object({
4776
4846
  packs: z.array(packComponentSchema)
4777
4847
  });
4778
4848
 
4849
+ // lib/items/models/SpsItemIdResponse.ts
4850
+ var spsItemIdResponseSchema = z.object({
4851
+ id: z.string(),
4852
+ ref: z.string()
4853
+ });
4854
+
4855
+ // lib/items/models/ItemOrgStatus.ts
4856
+ var itemOrgStatusSchema = z.object({
4857
+ org: z.object({
4858
+ ref: z.string(),
4859
+ id: z.string(),
4860
+ name: z.string()
4861
+ }),
4862
+ lowestInvalidStage: phaseEnumSchema.nullable(),
4863
+ validForRelationship: z.boolean()
4864
+ });
4865
+
4866
+ // lib/items/models/ItemStatus.ts
4867
+ var itemStatusSchema = z.object({
4868
+ itemId: z.string(),
4869
+ itemOrgStatuses: z.array(itemOrgStatusSchema)
4870
+ });
4871
+
4872
+ // lib/items/models/ItemStatusResponse.ts
4873
+ var itemStatusResponseSchema = z.object({
4874
+ itemStatuses: z.array(itemStatusSchema)
4875
+ });
4876
+
4779
4877
  // lib/items/index.ts
4780
- var BASE_URL11 = "items";
4878
+ var BASE_URL12 = "items";
4781
4879
  function createItemsApi(client) {
4782
4880
  async function searchItems(params, signal) {
4783
4881
  const searchParams = params ? `limit=${params.limit}&offset=${params.offset}` + (params.url ? `&${params.url}` : "") : void 0;
4784
- const data = await client.get(`${BASE_URL11}`, { searchParams, signal }).json();
4882
+ const data = await client.get(`${BASE_URL12}`, { searchParams, signal }).json();
4785
4883
  return itemSearchViewSchema.parse(data);
4786
4884
  }
4787
4885
  async function getItem(itemId, locale = "en-US", signal) {
4788
- const data = await client.get(`${BASE_URL11}/${itemId}`, { searchParams: { locale }, signal }).json();
4886
+ const data = await client.get(`${BASE_URL12}/${itemId}`, { searchParams: { locale }, signal }).json();
4789
4887
  return itemDetailViewSchema.parse(data);
4790
4888
  }
4791
4889
  async function updateItem(itemId, item) {
4792
- client.put(`${BASE_URL11}/details/${itemId}`, { json: { item } }).json();
4890
+ await client.put(`${BASE_URL12}/details/${itemId}`, { json: { ...item } }).json();
4793
4891
  }
4794
4892
  async function deleteItem(itemId) {
4795
- await client.delete(`${BASE_URL11}/${itemId}`);
4893
+ await client.delete(`${BASE_URL12}/${itemId}`);
4796
4894
  }
4797
4895
  async function deleteItems(itemIds) {
4798
4896
  const params = new URLSearchParams();
4799
4897
  itemIds.forEach((id) => {
4800
4898
  params.append("items", id);
4801
4899
  });
4802
- await client.delete(`${BASE_URL11}/items`, { searchParams: params });
4900
+ await client.delete(`${BASE_URL12}`, { searchParams: params });
4901
+ }
4902
+ async function getItemInfoId(spsItemId, signal) {
4903
+ const data = await client.get(`${BASE_URL12}/${spsItemId}/itemInfoId`, { signal }).json();
4904
+ return z.number().parse(data);
4905
+ }
4906
+ async function getSpsItemId(itemInfoId, signal) {
4907
+ const data = await client.get(`${BASE_URL12}/${itemInfoId}/spsItemId`, { signal }).json();
4908
+ return spsItemIdResponseSchema.parse(data);
4909
+ }
4910
+ async function getItemStatus(itemIds) {
4911
+ const data = await client.post(`${BASE_URL12}/status`, { json: { itemIds } }).json();
4912
+ return itemStatusResponseSchema.parse(data);
4803
4913
  }
4804
4914
  return {
4805
4915
  searchItems,
4806
4916
  getItem,
4807
4917
  updateItem,
4808
4918
  deleteItem,
4809
- deleteItems
4919
+ deleteItems,
4920
+ getItemInfoId,
4921
+ getSpsItemId,
4922
+ getItemStatus
4810
4923
  };
4811
4924
  }
4812
4925
 
4813
4926
  // lib/errors/index.ts
4814
- var BASE_URL12 = "errors";
4927
+ var BASE_URL13 = "errors";
4815
4928
  function createErrorsApi(client) {
4816
4929
  async function getInvalidItemErrorDetails(itemInfoId, signal) {
4817
- const data = await client.get(`${BASE_URL12}/items/${itemInfoId}`, {
4930
+ const data = await client.get(`${BASE_URL13}/items/${itemInfoId}`, {
4818
4931
  signal
4819
4932
  }).json();
4820
4933
  return itemErrorDetailsResultSchema.parse(data);
@@ -4832,6 +4945,7 @@ function createErrorsApi(client) {
4832
4945
  createCompanyFeaturesApi,
4833
4946
  createErrorsApi,
4834
4947
  createExportsApi,
4948
+ createFeatureFlagsApi,
4835
4949
  createImportsApi,
4836
4950
  createItemsApi,
4837
4951
  createLocaleApi,
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { A as AsstClient, I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, E as Export, b as AttrProdType, T as TradingPartnerAccessByCompanyId, c as ItemCategoriesSearch, d as AttributeMetaData, e as AttributesByCompany, f as AttributeDefinition, g as AttributeValidValues, L as Locale, S as SpreadsheetTemplate, U as UserAccount, h as ItemSearchView, i as ItemDetailView, j as ItemErrorDetailsResult } from './ItemErrorDetailsResult-c12c4eac.js';
2
- export { k as AsstClientOptions, l as AsstUrl, B as BASE_URLS, m as Env, n as ImportErrors } from './ItemErrorDetailsResult-c12c4eac.js';
3
- import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemDetail } from './ItemErrorDetails-1614b511.js';
4
- export { g as AttrDatatypeNameEnum, q as AttributeDetail, h as AttributeGroup, A as AttributeSummary, B as Bulb, r as CategoryEnum, s as ComponentDetails, C as Connection, E as ExportDayOfWeek, d as ExportFrequency, e as ExportType, t as GroupedAttributeList, u as GroupedAttributes, v as GroupedItem, H as HierarchyCategory, w as HierarchyDetails, j as IdentityServiceDatetimePreferences, k as IdentityServiceOrganization, i as IdentityServiceOrganizationMetadata, l as IdentityServicePreferences, m as IdentityServiceUser, a as ImportDetails, b as ImportError, c as ImportStatusEnum, f as ItemCategory, K as ItemErrorDetails, n as ItemHeader, o as ItemMap, x as ItemPrice, p as ItemTable, M as MediaItem, z as PackComponent, y as PackComponentDetails, J as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, F as RepeatableGroup, S as SpreadsheetTemplateCompany, T as TradingPartnerStage } from './ItemErrorDetails-1614b511.js';
1
+ import { A as AsstClient, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, E as Export, l as AttrProdType, T as TradingPartnerAccessByCompanyId, c as ItemCategoriesSearch, h as AttributeMetaData, i as AttributesByCompany, j as AttributeDefinition, k as AttributeValidValues, L as Locale, S as SpreadsheetTemplate, U as UserAccount, f as ItemSearchView, g as ItemDetailView, e as ItemErrorDetailsResult } from './ItemErrorDetailsResult-317fbe3e.js';
2
+ export { m as AsstClientOptions, n as AsstUrl, B as BASE_URLS, o as Env, I as ImportErrors } from './ItemErrorDetailsResult-317fbe3e.js';
3
+ import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemHierarchyResponse, a as ItemDetail, S as SpsItemIdResponse } from './zod-1c4396f8.js';
4
+ export { i as AttrDatatypeNameEnum, t as AttributeDetail, j as AttributeGroup, A as AttributeSummary, K as Bulb, u as CategoryEnum, v as ComponentDetails, C as Connection, E as ExportDayOfWeek, e as ExportFrequency, f as ExportType, w as GroupedAttributeList, x as GroupedAttributes, y as GroupedItem, H as Hierarchy, z as HierarchyCategory, B as HierarchyDetails, m as IdentityServiceDatetimePreferences, n as IdentityServiceOrganization, l as IdentityServiceOrganizationMetadata, o as IdentityServicePreferences, p as IdentityServiceUser, b as ImportDetails, c as ImportError, d as ImportStatusEnum, g as ItemCategory, Q as ItemErrorDetails, q as ItemHeader, h as ItemHierarchy, r as ItemMap, F as ItemPrice, s as ItemTable, M as MediaItem, L as PackComponent, J as PackComponentDetails, O as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, N as RepeatableGroup, k as SpreadsheetTemplateCompany, T as TradingPartnerStage } from './zod-1c4396f8.js';
5
+ import { I as ItemStatusResponse } from './ItemStatusResponse-7f871d5a.js';
6
+ import { z } from 'zod';
5
7
  import 'ky-universal';
6
8
  import 'ky';
7
- import 'zod';
8
9
 
9
10
  /**
10
11
  * Initialize Imports Api functions
@@ -77,10 +78,14 @@ declare function createCategoriesApi(client: AsstClient): {
77
78
  }, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
78
79
  getProductCodes: (params?: {
79
80
  categoryName?: string;
81
+ catalogId?: string;
82
+ selectionCodeId?: string;
80
83
  }, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
81
84
  getSelectionCodes: (params?: {
82
85
  categoryName?: string;
86
+ catalogId?: string;
83
87
  }, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
88
+ getItemHierarchy: (itemIds: string[]) => Promise<ItemHierarchyResponse>;
84
89
  };
85
90
 
86
91
  /**
@@ -96,6 +101,7 @@ declare function createAttributesApi(client: AsstClient): {
96
101
  }, signal?: AbortSignal) => Promise<AttributesByCompany>;
97
102
  getAttributesExtensiveInfo: (signal?: AbortSignal) => Promise<AttributeDefinition[]>;
98
103
  getAttributeValidValues: (attributeDbName: string, signal?: AbortSignal) => Promise<AttributeValidValues[]>;
104
+ getCompanyInterestedAttributes: (signal?: AbortSignal) => Promise<string[]>;
99
105
  };
100
106
 
101
107
  /**
@@ -134,6 +140,110 @@ declare function createCompanyFeaturesApi(client: AsstClient): {
134
140
  checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
135
141
  };
136
142
 
143
+ /**
144
+ * Initialize Feature Flags Api functions
145
+ * @param client Assortment Client instance
146
+ * @returns An object containing feature flags utility functions
147
+ */
148
+ declare function createFeatureFlagsApi(client: AsstClient): {
149
+ checkEnableItemsApiEndpointsForImports: (signal?: AbortSignal) => Promise<boolean>;
150
+ };
151
+
152
+ declare const itemStatusSchema: z.ZodObject<{
153
+ itemId: z.ZodString;
154
+ itemOrgStatuses: z.ZodArray<z.ZodObject<{
155
+ org: z.ZodObject<{
156
+ ref: z.ZodString;
157
+ id: z.ZodString;
158
+ name: z.ZodString;
159
+ }, "strip", z.ZodTypeAny, {
160
+ name: string;
161
+ id: string;
162
+ ref: string;
163
+ }, {
164
+ name: string;
165
+ id: string;
166
+ ref: string;
167
+ }>;
168
+ lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
169
+ validForRelationship: z.ZodBoolean;
170
+ }, "strip", z.ZodTypeAny, {
171
+ org: {
172
+ name: string;
173
+ id: string;
174
+ ref: string;
175
+ };
176
+ lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
177
+ validForRelationship: boolean;
178
+ }, {
179
+ org: {
180
+ name: string;
181
+ id: string;
182
+ ref: string;
183
+ };
184
+ lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
185
+ validForRelationship: boolean;
186
+ }>, "many">;
187
+ }, "strip", z.ZodTypeAny, {
188
+ itemId: string;
189
+ itemOrgStatuses: {
190
+ org: {
191
+ name: string;
192
+ id: string;
193
+ ref: string;
194
+ };
195
+ lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
196
+ validForRelationship: boolean;
197
+ }[];
198
+ }, {
199
+ itemId: string;
200
+ itemOrgStatuses: {
201
+ org: {
202
+ name: string;
203
+ id: string;
204
+ ref: string;
205
+ };
206
+ lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
207
+ validForRelationship: boolean;
208
+ }[];
209
+ }>;
210
+ type ItemStatus = z.infer<typeof itemStatusSchema>;
211
+
212
+ declare const itemOrgStatusSchema: z.ZodObject<{
213
+ org: z.ZodObject<{
214
+ ref: z.ZodString;
215
+ id: z.ZodString;
216
+ name: z.ZodString;
217
+ }, "strip", z.ZodTypeAny, {
218
+ name: string;
219
+ id: string;
220
+ ref: string;
221
+ }, {
222
+ name: string;
223
+ id: string;
224
+ ref: string;
225
+ }>;
226
+ lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
227
+ validForRelationship: z.ZodBoolean;
228
+ }, "strip", z.ZodTypeAny, {
229
+ org: {
230
+ name: string;
231
+ id: string;
232
+ ref: string;
233
+ };
234
+ lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
235
+ validForRelationship: boolean;
236
+ }, {
237
+ org: {
238
+ name: string;
239
+ id: string;
240
+ ref: string;
241
+ };
242
+ lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
243
+ validForRelationship: boolean;
244
+ }>;
245
+ type ItemOrgStatus = z.infer<typeof itemOrgStatusSchema>;
246
+
137
247
  /**
138
248
  * Initialize Items Api functions
139
249
  * @param client Assortment Client instance
@@ -149,6 +259,9 @@ declare function createItemsApi(client: AsstClient): {
149
259
  updateItem: (itemId: string, item: ItemDetail) => Promise<void>;
150
260
  deleteItem: (itemId: number) => Promise<void>;
151
261
  deleteItems: (itemIds: string[]) => Promise<void>;
262
+ getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
263
+ getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
264
+ getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
152
265
  };
153
266
 
154
267
  /**
@@ -160,4 +273,4 @@ declare function createErrorsApi(client: AsstClient): {
160
273
  getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
161
274
  };
162
275
 
163
- export { AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, DownLoadItemsParams, Export, GenerateImportTemplateParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemSearchView, Locale, SpreadsheetTemplate, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createExportsApi, createImportsApi, createItemsApi, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createWhoAmIApi };
276
+ export { AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, DownLoadItemsParams, Export, GenerateImportTemplateParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemHierarchyResponse, ItemOrgStatus, ItemSearchView, ItemStatus, ItemStatusResponse, Locale, SpreadsheetTemplate, SpsItemIdResponse, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createWhoAmIApi };
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  createCompanyFeaturesApi,
5
5
  createErrorsApi,
6
6
  createExportsApi,
7
+ createFeatureFlagsApi,
7
8
  createImportsApi,
8
9
  createItemsApi,
9
10
  createLocaleApi,
@@ -11,11 +12,11 @@ import {
11
12
  createSpreadsheetTemplateApi,
12
13
  createTradingPartnerAccessApi,
13
14
  createWhoAmIApi
14
- } from "./chunk-OVOZIZA2.js";
15
+ } from "./chunk-HG7MCO42.js";
15
16
  import {
16
17
  AsstClient,
17
18
  BASE_URLS
18
- } from "./chunk-3JRE7YYE.js";
19
+ } from "./chunk-HEFVXX2V.js";
19
20
  export {
20
21
  AsstClient,
21
22
  BASE_URLS,
@@ -24,6 +25,7 @@ export {
24
25
  createCompanyFeaturesApi,
25
26
  createErrorsApi,
26
27
  createExportsApi,
28
+ createFeatureFlagsApi,
27
29
  createImportsApi,
28
30
  createItemsApi,
29
31
  createLocaleApi,