@spscommerce/asst-api 1.0.0 → 1.1.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.
@@ -1,4 +1,4 @@
1
- import * as ky_universal from 'ky-universal';
1
+ import * as ky from 'ky';
2
2
  import { Options } from 'ky';
3
3
  import { z } from 'zod';
4
4
 
@@ -36,12 +36,12 @@ declare class AsstClient {
36
36
  * @returns Function to unsubscribe to config changes
37
37
  */
38
38
  subscribeToConfigChange(listener: Listener): () => boolean;
39
- get(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
40
- post(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
41
- put(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
42
- patch(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
43
- head(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
44
- delete(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
39
+ get(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
40
+ post(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
41
+ put(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
42
+ patch(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
43
+ head(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
44
+ delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
45
45
  }
46
46
 
47
47
  declare const importSchema: z.ZodObject<{
@@ -3120,6 +3120,271 @@ declare const itemErrorDetailsResultSchema: z.ZodObject<{
3120
3120
  }>;
3121
3121
  type ItemErrorDetailsResult = z.infer<typeof itemErrorDetailsResultSchema>;
3122
3122
 
3123
+ declare const itemErrorSummaryResultV2Schema: z.ZodObject<{
3124
+ hasNext: z.ZodBoolean;
3125
+ errors: z.ZodArray<z.ZodObject<{
3126
+ itemInfoId: z.ZodNumber;
3127
+ upc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3128
+ isbn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3129
+ gtin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3130
+ ean: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3131
+ partnumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3132
+ colorfamily: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3133
+ fit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3134
+ productcolordescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3135
+ distributioncentercode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3136
+ accountnumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3137
+ erpid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3138
+ totalErrors: z.ZodNumber;
3139
+ tradingPartners: z.ZodArray<z.ZodString, "many">;
3140
+ tradingPartnerIds: z.ZodArray<z.ZodNumber, "many">;
3141
+ phases: z.ZodArray<z.ZodString, "many">;
3142
+ tradingPartnerStages: z.ZodArray<z.ZodObject<{
3143
+ companyId: z.ZodNumber;
3144
+ companyName: z.ZodString;
3145
+ stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
3146
+ isValid: z.ZodBoolean;
3147
+ }, "strip", z.ZodTypeAny, {
3148
+ companyId: number;
3149
+ companyName: string;
3150
+ isValid: boolean;
3151
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3152
+ }, {
3153
+ companyId: number;
3154
+ companyName: string;
3155
+ isValid: boolean;
3156
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3157
+ }>, "many">;
3158
+ validatedDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodNumber, z.ZodDate>>>;
3159
+ }, "strip", z.ZodTypeAny, {
3160
+ itemInfoId: number;
3161
+ tradingPartnerStages: {
3162
+ companyId: number;
3163
+ companyName: string;
3164
+ isValid: boolean;
3165
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3166
+ }[];
3167
+ phases: string[];
3168
+ totalErrors: number;
3169
+ tradingPartners: string[];
3170
+ tradingPartnerIds: number[];
3171
+ gtin?: string | null | undefined;
3172
+ upc?: string | null | undefined;
3173
+ ean?: string | null | undefined;
3174
+ isbn?: string | null | undefined;
3175
+ partnumber?: string | null | undefined;
3176
+ productcolordescription?: string | null | undefined;
3177
+ colorfamily?: string | null | undefined;
3178
+ fit?: string | null | undefined;
3179
+ distributioncentercode?: string | null | undefined;
3180
+ accountnumber?: string | null | undefined;
3181
+ erpid?: string | null | undefined;
3182
+ validatedDate?: Date | null | undefined;
3183
+ }, {
3184
+ itemInfoId: number;
3185
+ tradingPartnerStages: {
3186
+ companyId: number;
3187
+ companyName: string;
3188
+ isValid: boolean;
3189
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3190
+ }[];
3191
+ phases: string[];
3192
+ totalErrors: number;
3193
+ tradingPartners: string[];
3194
+ tradingPartnerIds: number[];
3195
+ gtin?: string | null | undefined;
3196
+ upc?: string | null | undefined;
3197
+ ean?: string | null | undefined;
3198
+ isbn?: string | null | undefined;
3199
+ partnumber?: string | null | undefined;
3200
+ productcolordescription?: string | null | undefined;
3201
+ colorfamily?: string | null | undefined;
3202
+ fit?: string | null | undefined;
3203
+ distributioncentercode?: string | null | undefined;
3204
+ accountnumber?: string | null | undefined;
3205
+ erpid?: string | null | undefined;
3206
+ validatedDate?: number | null | undefined;
3207
+ }>, "many">;
3208
+ }, "strip", z.ZodTypeAny, {
3209
+ errors: {
3210
+ itemInfoId: number;
3211
+ tradingPartnerStages: {
3212
+ companyId: number;
3213
+ companyName: string;
3214
+ isValid: boolean;
3215
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3216
+ }[];
3217
+ phases: string[];
3218
+ totalErrors: number;
3219
+ tradingPartners: string[];
3220
+ tradingPartnerIds: number[];
3221
+ gtin?: string | null | undefined;
3222
+ upc?: string | null | undefined;
3223
+ ean?: string | null | undefined;
3224
+ isbn?: string | null | undefined;
3225
+ partnumber?: string | null | undefined;
3226
+ productcolordescription?: string | null | undefined;
3227
+ colorfamily?: string | null | undefined;
3228
+ fit?: string | null | undefined;
3229
+ distributioncentercode?: string | null | undefined;
3230
+ accountnumber?: string | null | undefined;
3231
+ erpid?: string | null | undefined;
3232
+ validatedDate?: Date | null | undefined;
3233
+ }[];
3234
+ hasNext: boolean;
3235
+ }, {
3236
+ errors: {
3237
+ itemInfoId: number;
3238
+ tradingPartnerStages: {
3239
+ companyId: number;
3240
+ companyName: string;
3241
+ isValid: boolean;
3242
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3243
+ }[];
3244
+ phases: string[];
3245
+ totalErrors: number;
3246
+ tradingPartners: string[];
3247
+ tradingPartnerIds: number[];
3248
+ gtin?: string | null | undefined;
3249
+ upc?: string | null | undefined;
3250
+ ean?: string | null | undefined;
3251
+ isbn?: string | null | undefined;
3252
+ partnumber?: string | null | undefined;
3253
+ productcolordescription?: string | null | undefined;
3254
+ colorfamily?: string | null | undefined;
3255
+ fit?: string | null | undefined;
3256
+ distributioncentercode?: string | null | undefined;
3257
+ accountnumber?: string | null | undefined;
3258
+ erpid?: string | null | undefined;
3259
+ validatedDate?: number | null | undefined;
3260
+ }[];
3261
+ hasNext: boolean;
3262
+ }>;
3263
+ type ItemErrorSummaryResultV2 = z.infer<typeof itemErrorSummaryResultV2Schema>;
3264
+
3265
+ declare const itemErrorDetailsResultV2Schema: z.ZodObject<{
3266
+ itemInfoId: z.ZodNumber;
3267
+ upc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3268
+ isbn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3269
+ gtin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3270
+ partnumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3271
+ ean: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3272
+ colorfamily: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3273
+ fit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3274
+ productcolordescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3275
+ distributioncentercode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3276
+ accountnumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3277
+ erpid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3278
+ itemName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3279
+ itemErrorDetails: z.ZodArray<z.ZodObject<{
3280
+ errorMessage: z.ZodString;
3281
+ attributeName: z.ZodString;
3282
+ attributeDbNames: z.ZodArray<z.ZodString, "many">;
3283
+ tradingPartnerNames: z.ZodArray<z.ZodString, "many">;
3284
+ phases: z.ZodSet<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>;
3285
+ tradingPartnerStages: z.ZodArray<z.ZodObject<{
3286
+ companyId: z.ZodNumber;
3287
+ companyName: z.ZodString;
3288
+ stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
3289
+ isValid: z.ZodBoolean;
3290
+ }, "strip", z.ZodTypeAny, {
3291
+ companyId: number;
3292
+ companyName: string;
3293
+ isValid: boolean;
3294
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3295
+ }, {
3296
+ companyId: number;
3297
+ companyName: string;
3298
+ isValid: boolean;
3299
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3300
+ }>, "many">;
3301
+ repeatableGroupId: z.ZodString;
3302
+ }, "strip", z.ZodTypeAny, {
3303
+ attributeName: string;
3304
+ tradingPartnerStages: {
3305
+ companyId: number;
3306
+ companyName: string;
3307
+ isValid: boolean;
3308
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3309
+ }[];
3310
+ errorMessage: string;
3311
+ tradingPartnerNames: string[];
3312
+ phases: Set<"CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED">;
3313
+ attributeDbNames: string[];
3314
+ repeatableGroupId: string;
3315
+ }, {
3316
+ attributeName: string;
3317
+ tradingPartnerStages: {
3318
+ companyId: number;
3319
+ companyName: string;
3320
+ isValid: boolean;
3321
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3322
+ }[];
3323
+ errorMessage: string;
3324
+ tradingPartnerNames: string[];
3325
+ phases: Set<"CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED">;
3326
+ attributeDbNames: string[];
3327
+ repeatableGroupId: string;
3328
+ }>, "many">;
3329
+ }, "strip", z.ZodTypeAny, {
3330
+ itemInfoId: number;
3331
+ itemErrorDetails: {
3332
+ attributeName: string;
3333
+ tradingPartnerStages: {
3334
+ companyId: number;
3335
+ companyName: string;
3336
+ isValid: boolean;
3337
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3338
+ }[];
3339
+ errorMessage: string;
3340
+ tradingPartnerNames: string[];
3341
+ phases: Set<"CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED">;
3342
+ attributeDbNames: string[];
3343
+ repeatableGroupId: string;
3344
+ }[];
3345
+ gtin?: string | null | undefined;
3346
+ upc?: string | null | undefined;
3347
+ ean?: string | null | undefined;
3348
+ isbn?: string | null | undefined;
3349
+ partnumber?: string | null | undefined;
3350
+ productcolordescription?: string | null | undefined;
3351
+ itemName?: string | null | undefined;
3352
+ colorfamily?: string | null | undefined;
3353
+ fit?: string | null | undefined;
3354
+ distributioncentercode?: string | null | undefined;
3355
+ accountnumber?: string | null | undefined;
3356
+ erpid?: string | null | undefined;
3357
+ }, {
3358
+ itemInfoId: number;
3359
+ itemErrorDetails: {
3360
+ attributeName: string;
3361
+ tradingPartnerStages: {
3362
+ companyId: number;
3363
+ companyName: string;
3364
+ isValid: boolean;
3365
+ stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
3366
+ }[];
3367
+ errorMessage: string;
3368
+ tradingPartnerNames: string[];
3369
+ phases: Set<"CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED">;
3370
+ attributeDbNames: string[];
3371
+ repeatableGroupId: string;
3372
+ }[];
3373
+ gtin?: string | null | undefined;
3374
+ upc?: string | null | undefined;
3375
+ ean?: string | null | undefined;
3376
+ isbn?: string | null | undefined;
3377
+ partnumber?: string | null | undefined;
3378
+ productcolordescription?: string | null | undefined;
3379
+ itemName?: string | null | undefined;
3380
+ colorfamily?: string | null | undefined;
3381
+ fit?: string | null | undefined;
3382
+ distributioncentercode?: string | null | undefined;
3383
+ accountnumber?: string | null | undefined;
3384
+ erpid?: string | null | undefined;
3385
+ }>;
3386
+ type ItemErrorDetailsResultV2 = z.infer<typeof itemErrorDetailsResultV2Schema>;
3387
+
3123
3388
  declare const companyBriefByOrgSchema: z.ZodObject<{
3124
3389
  companyId: z.ZodNumber;
3125
3390
  name: z.ZodString;
@@ -3156,4 +3421,4 @@ declare const companyBriefByOrgSchema: z.ZodObject<{
3156
3421
  }>;
3157
3422
  type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
3158
3423
 
3159
- export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, attributeValidValuesSchema as D, type Export as E, itemSearchViewSchema as F, itemDetailViewSchema as G, localeSchema as H, type ImportErrors as I, spreadsheetTemplateSchema as J, tradingPartnerAccessByCompanyIdSchema as K, type Locale as L, companyRelationshipUpsertBodySchema as M, userAccountSchema as N, itemErrorDetailsResultSchema as O, companyBriefByOrgSchema as P, type SpreadsheetTemplate as S, type TradingPartnerAccessByCompanyId as T, type UserAccount as U, type VendorPartnerAttGroups as V, type Import as a, type ImportsStatus as b, type ItemCategoriesSearch as c, attrProdTypeSchema as d, type CompanyRelationshipUpsertBody as e, type ItemErrorDetailsResult as f, type ItemSearchView as g, type ItemDetailView as h, type AttributeMetaData as i, type AttributesByCompany as j, type AttributeDefinition as k, type AttributeValidValues as l, type AttrProdType as m, envSchema as n, type AsstClientOptions as o, type AsstUrl as p, type Env as q, importErrorsSchema as r, importSchema as s, importsStatusSchema as t, exportSchema as u, vendorPartnerAttGroupsSchema as v, itemCategoriesSearchSchema as w, attributeDefinitionSchema as x, attributeMetaDataSchema as y, attributesByCompanySchema as z };
3424
+ export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, attributeMetaDataSchema as D, type Export as E, attributesByCompanySchema as F, attributeValidValuesSchema as G, itemSearchViewSchema as H, type ImportErrors as I, itemDetailViewSchema as J, localeSchema as K, type Locale as L, spreadsheetTemplateSchema as M, tradingPartnerAccessByCompanyIdSchema as N, companyRelationshipUpsertBodySchema as O, userAccountSchema as P, itemErrorDetailsResultSchema as Q, itemErrorDetailsResultV2Schema as R, type SpreadsheetTemplate as S, type TradingPartnerAccessByCompanyId as T, type UserAccount as U, type VendorPartnerAttGroups as V, itemErrorSummaryResultV2Schema as W, companyBriefByOrgSchema as X, type Import as a, type ImportsStatus as b, type ItemCategoriesSearch as c, attrProdTypeSchema as d, type CompanyRelationshipUpsertBody as e, type ItemErrorDetailsResult as f, type ItemErrorSummaryResultV2 as g, type ItemErrorDetailsResultV2 as h, type ItemSearchView as i, type ItemDetailView as j, type AttributeMetaData as k, type AttributesByCompany as l, type AttributeDefinition as m, type AttributeValidValues as n, type AttrProdType as o, envSchema as p, type AsstClientOptions as q, type AsstUrl as r, type Env as s, importErrorsSchema as t, importSchema as u, importsStatusSchema as v, vendorPartnerAttGroupsSchema as w, exportSchema as x, itemCategoriesSearchSchema as y, attributeDefinitionSchema as z };
@@ -4794,7 +4794,7 @@ var userAccountSchema = z.object({
4794
4794
  attributeRegistryViewer: z.boolean()
4795
4795
  });
4796
4796
 
4797
- // lib/errors/models/ItemErrorDetails.ts
4797
+ // lib/errors/v1/models/ItemErrorDetails.ts
4798
4798
  var itemErrorDetailsSchema = z.object({
4799
4799
  errorMessage: z.string(),
4800
4800
  attributeName: z.string().nullable(),
@@ -4805,7 +4805,7 @@ var itemErrorDetailsSchema = z.object({
4805
4805
  repeatableGroupId: z.string().nullish()
4806
4806
  });
4807
4807
 
4808
- // lib/errors/models/ItemErrorDetailsResult.ts
4808
+ // lib/errors/v1/models/ItemErrorDetailsResult.ts
4809
4809
  var itemErrorDetailsResultSchema = z.object({
4810
4810
  itemInfoId: z.number(),
4811
4811
  upc: z.string().nullish(),
@@ -4817,6 +4817,135 @@ var itemErrorDetailsResultSchema = z.object({
4817
4817
  itemErrorDetails: z.array(itemErrorDetailsSchema)
4818
4818
  });
4819
4819
 
4820
+ // lib/items/v2/models/Stage.ts
4821
+ var stageSchema = z.enum([
4822
+ "CORE",
4823
+ "CORE_PLUS",
4824
+ "CORE_ADVANCED",
4825
+ "ENRICHED"
4826
+ ]);
4827
+
4828
+ // lib/items/v2/models/OrgSummary.ts
4829
+ var orgSummarySchema = z.object({
4830
+ ref: z.string(),
4831
+ id: z.string(),
4832
+ name: z.string()
4833
+ });
4834
+
4835
+ // lib/items/v2/models/ItemOrgStageDetails.ts
4836
+ var itemOrgStageDetailsSchema = z.object({
4837
+ /**
4838
+ * When called as retailer, the vendor, else when vendor, the retailer.
4839
+ * */
4840
+ orgSummary: orgSummarySchema,
4841
+ /**
4842
+ * The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
4843
+ */
4844
+ companyId: z.number().nullish(),
4845
+ /**
4846
+ * "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
4847
+ * OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
4848
+ * OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
4849
+ * OTHERWISE the item level override */
4850
+ stage: stageSchema.nullish(),
4851
+ /**
4852
+ * If the item is valid for the active stage. Note that for "Standard Requirements" or
4853
+ * "Enriched" this cam come directly from the item_doc table, but anything else requires validation
4854
+ */
4855
+ isValid: z.boolean(),
4856
+ /**
4857
+ * Not null if there's an item level policy override for this trading partnership
4858
+ */
4859
+ itemPolicyId: z.string().nullish(),
4860
+ /**
4861
+ * Start date for the Item level Stage if applicable
4862
+ */
4863
+ startDate: z.number().transform((num) => new Date(num * 1e3)).nullish(),
4864
+ /**
4865
+ * End date for the Item level Stage if applicable
4866
+ */
4867
+ endDate: z.number().transform((num) => new Date(num * 1e3)).nullish()
4868
+ });
4869
+
4870
+ // lib/items/v2/models/ItemStatusV2.ts
4871
+ var itemStatusV2Schema = z.object({
4872
+ itemId: z.string(),
4873
+ mostRestrictiveRetailerStage: stageSchema.nullable(),
4874
+ itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
4875
+ });
4876
+
4877
+ // lib/items/v2/models/ItemStatusV2Response.ts
4878
+ var itemStatusV2ResponseSchema = z.object({
4879
+ itemStatuses: z.array(itemStatusV2Schema)
4880
+ });
4881
+
4882
+ // lib/errors/v2/models/TradingPartnerStage.ts
4883
+ var tradingPartnerStageV2Schema = z.object({
4884
+ companyId: z.number(),
4885
+ companyName: z.string(),
4886
+ stage: stageSchema.nullish(),
4887
+ isValid: z.boolean()
4888
+ });
4889
+
4890
+ // lib/errors/v2/models/ItemErrorSummary.ts
4891
+ var itemErrorSummaryV2Schema = z.object({
4892
+ itemInfoId: z.number(),
4893
+ upc: z.string().nullish(),
4894
+ isbn: z.string().nullish(),
4895
+ gtin: z.string().nullish(),
4896
+ ean: z.string().nullish(),
4897
+ partnumber: z.string().nullish(),
4898
+ colorfamily: z.string().nullish(),
4899
+ fit: z.string().nullish(),
4900
+ productcolordescription: z.string().nullish(),
4901
+ distributioncentercode: z.string().nullish(),
4902
+ accountnumber: z.string().nullish(),
4903
+ erpid: z.string().nullish(),
4904
+ totalErrors: z.number(),
4905
+ tradingPartners: z.array(z.string()),
4906
+ tradingPartnerIds: z.array(z.number()),
4907
+ // These are the stages assigned to the TradingPartners, not the stages of the errors
4908
+ phases: z.array(z.string()),
4909
+ // Same thing for the stage property in here: it's the stage of the Item & TradingPartner, not the stage of the error
4910
+ tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4911
+ validatedDate: z.number().pipe(z.coerce.date()).nullish()
4912
+ });
4913
+
4914
+ // lib/errors/v2/models/ItemErrorSummaryResult.ts
4915
+ var itemErrorSummaryResultV2Schema = z.object({
4916
+ hasNext: z.boolean(),
4917
+ errors: z.array(itemErrorSummaryV2Schema)
4918
+ });
4919
+
4920
+ // lib/errors/v2/models/ItemErrorDetails.ts
4921
+ var itemErrorDetailsV2Schema = z.object({
4922
+ errorMessage: z.string(),
4923
+ attributeName: z.string(),
4924
+ attributeDbNames: z.array(z.string()),
4925
+ tradingPartnerNames: z.array(z.string()),
4926
+ phases: z.set(stageSchema),
4927
+ tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4928
+ repeatableGroupId: z.string()
4929
+ });
4930
+
4931
+ // lib/errors/v2/models/ItemErrorDetailsResult.ts
4932
+ var itemErrorDetailsResultV2Schema = z.object({
4933
+ itemInfoId: z.number(),
4934
+ upc: z.string().nullish(),
4935
+ isbn: z.string().nullish(),
4936
+ gtin: z.string().nullish(),
4937
+ partnumber: z.string().nullish(),
4938
+ ean: z.string().nullish(),
4939
+ colorfamily: z.string().nullish(),
4940
+ fit: z.string().nullish(),
4941
+ productcolordescription: z.string().nullish(),
4942
+ distributioncentercode: z.string().nullish(),
4943
+ accountnumber: z.string().nullish(),
4944
+ erpid: z.string().nullish(),
4945
+ itemName: z.string().nullish(),
4946
+ itemErrorDetails: z.array(itemErrorDetailsV2Schema)
4947
+ });
4948
+
4820
4949
  // lib/companies/models/CompanyBriefByOrg.ts
4821
4950
  var companyBriefByOrgSchema = z.object({
4822
4951
  companyId: z.number(),
@@ -4881,6 +5010,12 @@ export {
4881
5010
  downLoadItemsParamsSchema,
4882
5011
  itemErrorDetailsSchema,
4883
5012
  itemErrorDetailsResultSchema,
5013
+ itemStatusV2ResponseSchema,
5014
+ tradingPartnerStageV2Schema,
5015
+ itemErrorSummaryV2Schema,
5016
+ itemErrorSummaryResultV2Schema,
5017
+ itemErrorDetailsV2Schema,
5018
+ itemErrorDetailsResultV2Schema,
4884
5019
  companyBriefByOrgSchema,
4885
5020
  attributeDetailSchema,
4886
5021
  categoryEnumSchema,
@@ -11,6 +11,8 @@ import {
11
11
  itemCategoriesSearchSchema,
12
12
  itemDetailViewSchema,
13
13
  itemErrorDetailsResultSchema,
14
+ itemErrorDetailsResultV2Schema,
15
+ itemErrorSummaryResultV2Schema,
14
16
  itemHierarchyResponseSchema,
15
17
  itemSearchViewSchema,
16
18
  itemStatusResponseSchema,
@@ -21,7 +23,7 @@ import {
21
23
  userAccountSchema,
22
24
  vendorPartnerAttGroupsSchema,
23
25
  z
24
- } from "./chunk-6FFDMMN5.js";
26
+ } from "./chunk-3EK6JHC5.js";
25
27
 
26
28
  // lib/imports/index.ts
27
29
  var BASE_URL = "imports";
@@ -336,12 +338,6 @@ function createCompanyFeaturesApi(client) {
336
338
  // lib/featureFlags/index.ts
337
339
  var BASE_URL12 = "feature-flag";
338
340
  function createFeatureFlagsApi(client) {
339
- async function checkEnableItemsApiEndpointsForImports(signal) {
340
- const data = await client.get(`${BASE_URL12}/enable-items-api-endpoints-for-imports/`, {
341
- signal
342
- }).json();
343
- return z.boolean().parse(data);
344
- }
345
341
  async function checkEnableItemsLevelMSIS(signal) {
346
342
  const data = await client.get(`${BASE_URL12}/enable-item-level-msis/`, {
347
343
  signal
@@ -349,7 +345,6 @@ function createFeatureFlagsApi(client) {
349
345
  return z.boolean().parse(data);
350
346
  }
351
347
  return {
352
- checkEnableItemsApiEndpointsForImports,
353
348
  checkEnableItemsLevelMSIS
354
349
  };
355
350
  }
@@ -415,7 +410,7 @@ function createItemsApi(client) {
415
410
  };
416
411
  }
417
412
 
418
- // lib/errors/index.ts
413
+ // lib/errors/v1/index.ts
419
414
  var BASE_URL14 = "errors";
420
415
  function createErrorsApi(client) {
421
416
  async function getInvalidItemErrorDetails(itemInfoId, signal) {
@@ -429,11 +424,44 @@ function createErrorsApi(client) {
429
424
  };
430
425
  }
431
426
 
427
+ // lib/errors/v2/index.ts
428
+ var BASE_URL15 = "errors/v2";
429
+ function createErrorsApiV2(client) {
430
+ async function getItemErrorSummary(params, signal) {
431
+ const searchParams = new URLSearchParams();
432
+ if (params.searchField)
433
+ searchParams.append("searchField", params.searchField);
434
+ if (params.searchText)
435
+ searchParams.append("searchText", params.searchText);
436
+ if (params.tradingPartnerIds) {
437
+ params.tradingPartnerIds.forEach((id) => searchParams.append("tradingPartnerIds", id.toString()));
438
+ }
439
+ if (params.offset)
440
+ searchParams.append("offset", params.offset.toString());
441
+ if (params.limit)
442
+ searchParams.append("limit", params.limit.toString());
443
+ if (params.docInEventId)
444
+ searchParams.append("docInEventId", params.docInEventId);
445
+ if (params.importId)
446
+ searchParams.append("importId", params.importId);
447
+ const data = await client.get(`${BASE_URL15}/summary`, { signal, searchParams }).json();
448
+ return itemErrorSummaryResultV2Schema.parse(data);
449
+ }
450
+ async function getItemErrorDetails(itemInfoId, signal) {
451
+ const data = await client.get(`${BASE_URL15}/items/${itemInfoId}`, { signal }).json();
452
+ return itemErrorDetailsResultV2Schema.parse(data);
453
+ }
454
+ return {
455
+ getItemErrorSummary,
456
+ getItemErrorDetails
457
+ };
458
+ }
459
+
432
460
  // lib/uniqueCriteria/index.ts
433
- var BASE_URL15 = "uniquecriteria";
461
+ var BASE_URL16 = "uniquecriteria";
434
462
  function createUniqueCriteriaApi(client) {
435
463
  async function getUniqueCriteriaByOrg(params, signal) {
436
- const data = await client.get(`${BASE_URL15}/org`, {
464
+ const data = await client.get(`${BASE_URL16}/org`, {
437
465
  searchParams: params,
438
466
  signal
439
467
  }).json();
@@ -443,10 +471,10 @@ function createUniqueCriteriaApi(client) {
443
471
  }
444
472
 
445
473
  // lib/companies/index.ts
446
- var BASE_URL16 = "companys";
474
+ var BASE_URL17 = "companys";
447
475
  function createCompaniesApi(client) {
448
476
  async function getCompanyBriefInfoByOrg(params, signal) {
449
- const data = await client.get(`${BASE_URL16}/brief`, {
477
+ const data = await client.get(`${BASE_URL17}/brief`, {
450
478
  searchParams: params,
451
479
  signal
452
480
  }).json();
@@ -487,6 +515,8 @@ export {
487
515
  BASE_URL14,
488
516
  createErrorsApi,
489
517
  BASE_URL15,
518
+ createErrorsApiV2,
519
+ BASE_URL16,
490
520
  createUniqueCriteriaApi,
491
521
  createCompaniesApi
492
522
  };
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { A as AsstClient, C as CompanyBriefByOrg } from './CompanyBriefByOrg-HsKxilwl.js';
2
+ import { A as AsstClient, C as CompanyBriefByOrg } from './CompanyBriefByOrg-QIqfCtA_.js';
3
3
 
4
4
  declare const retailerTradingPartnerStages: z.ZodArray<z.ZodEnum<["Core", "Core Plus", "Core Advanced", "Enriched", "Standard Requirements"]>, "many">;
5
5
  type RetailerTradingPartnerStages = z.infer<typeof retailerTradingPartnerStages>;