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

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.
Files changed (47) hide show
  1. package/dist/ItemErrorDetails-1614b511.d.ts +3137 -0
  2. package/dist/ItemErrorDetailsResult-c12c4eac.d.ts +3032 -0
  3. package/dist/{chunk-D3ML6E4G.js → chunk-3JRE7YYE.js} +805 -16
  4. package/dist/chunk-OVOZIZA2.js +326 -0
  5. package/dist/index.cjs +814 -28
  6. package/dist/index.d.ts +86 -46
  7. package/dist/index.js +18 -5
  8. package/dist/msw.cjs +926 -63
  9. package/dist/msw.d.ts +582 -75
  10. package/dist/msw.js +246 -54
  11. package/dist/zod.cjs +719 -17
  12. package/dist/zod.d.ts +3 -2
  13. package/dist/zod.js +103 -55
  14. package/package.json +3 -4
  15. package/dist/ImportsStatus-52d26b01.d.ts +0 -134
  16. package/dist/ImportsStatusEnum-22c03a0b.d.ts +0 -51
  17. package/dist/ItemCategoriesSearch-1bb945de.d.ts +0 -275
  18. package/dist/ItemCategoriesSearch-44b87663.d.ts +0 -318
  19. package/dist/ItemCategoriesSearch-e0870a34.d.ts +0 -318
  20. package/dist/ItemCategoriesSearch-e3298650.d.ts +0 -319
  21. package/dist/ItemCategoriesSearch-ec43591f.d.ts +0 -319
  22. package/dist/ItemCategory-14816deb.d.ts +0 -99
  23. package/dist/ItemCategory-768179bd.d.ts +0 -99
  24. package/dist/TradingPartnerAccessByCompanyId-29866586.d.ts +0 -97
  25. package/dist/TradingPartnerAccessByCompanyId-43f83fb6.d.ts +0 -130
  26. package/dist/TradingPartnerAccessByCompanyId-479e3e57.d.ts +0 -124
  27. package/dist/TradingPartnerAccessByCompanyId-53b868a8.d.ts +0 -125
  28. package/dist/TradingPartnerAccessByCompanyId-b227f0c5.d.ts +0 -125
  29. package/dist/TradingPartnerAccessByCompanyId-e7a1d443.d.ts +0 -129
  30. package/dist/asstClient-f6a1693a.d.ts +0 -29
  31. package/dist/chunk-3FMMM7IS.js +0 -80
  32. package/dist/chunk-6ZNFOWTV.js +0 -78
  33. package/dist/chunk-7HCJJATJ.js +0 -40
  34. package/dist/chunk-B7B2ACF4.js +0 -3794
  35. package/dist/chunk-F3KCLICG.js +0 -77
  36. package/dist/chunk-FS6LHGAR.js +0 -87
  37. package/dist/chunk-GDFX3WTX.js +0 -78
  38. package/dist/chunk-LGP22FRF.js +0 -0
  39. package/dist/chunk-LYMGZWSR.js +0 -80
  40. package/dist/chunk-N2OYWNHF.js +0 -80
  41. package/dist/chunk-OA6PO3QG.js +0 -78
  42. package/dist/chunk-OBXZRDPY.js +0 -77
  43. package/dist/chunk-OI47EFQH.js +0 -82
  44. package/dist/chunk-RNUSCCKB.js +0 -183
  45. package/dist/chunk-T3UCSW2B.js +0 -81
  46. package/dist/chunk-XMNYZGXF.js +0 -84
  47. package/dist/chunk-YCQUK6KV.js +0 -85
@@ -1,3 +1,6 @@
1
+ // lib/asstClient.ts
2
+ import ky from "ky-universal";
3
+
1
4
  // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/index.mjs
2
5
  var util;
3
6
  (function(util2) {
@@ -3680,13 +3683,80 @@ var z = /* @__PURE__ */ Object.freeze({
3680
3683
  ZodError
3681
3684
  });
3682
3685
 
3686
+ // lib/asstClient.ts
3687
+ var baseUrlsSchema = z.object({
3688
+ local: z.literal("https://localhost:8443"),
3689
+ test: z.literal("https://integration.api.spscommerce.com/assortment/gateway"),
3690
+ prod: z.literal("https://api.spscommerce.com/assortment/gateway")
3691
+ });
3692
+ var BASE_URLS = {
3693
+ local: "https://localhost:8443",
3694
+ test: "https://integration.api.spscommerce.com/assortment/gateway",
3695
+ prod: "https://api.spscommerce.com/assortment/gateway"
3696
+ };
3697
+ var envSchema = baseUrlsSchema.keyof();
3698
+ var initialConfig = {
3699
+ prefixUrl: BASE_URLS["test"],
3700
+ retry: 0
3701
+ };
3702
+ var AsstClient = class {
3703
+ #client = ky.create(initialConfig);
3704
+ #baseUrl = BASE_URLS["test"];
3705
+ #listeners = /* @__PURE__ */ new Set();
3706
+ #currentConfig = initialConfig;
3707
+ constructor(options) {
3708
+ if (options) {
3709
+ this.updateConfig(options);
3710
+ }
3711
+ }
3712
+ updateConfig(options) {
3713
+ this.#client = this.#client.extend(options);
3714
+ this.#currentConfig = options;
3715
+ if (options.prefixUrl) {
3716
+ this.#baseUrl = options.prefixUrl;
3717
+ }
3718
+ this.#listeners.forEach((listener) => listener(options));
3719
+ }
3720
+ getBaseUrl() {
3721
+ return this.#baseUrl;
3722
+ }
3723
+ /**
3724
+ * Subscribe to config changes. The callback will be immediately invoked with the current config.
3725
+ * @param subscriptionCallback Function that will be called with the new config every time it is changed
3726
+ * @returns Function to unsubscribe to config changes
3727
+ */
3728
+ subscribeToConfigChange(listener) {
3729
+ this.#listeners.add(listener);
3730
+ listener(this.#currentConfig);
3731
+ return () => this.#listeners.delete(listener);
3732
+ }
3733
+ get(url, options) {
3734
+ return this.#client.get(url, options);
3735
+ }
3736
+ post(url, options) {
3737
+ return this.#client.post(url, options);
3738
+ }
3739
+ put(url, options) {
3740
+ return this.#client.put(url, options);
3741
+ }
3742
+ patch(url, options) {
3743
+ return this.#client.patch(url, options);
3744
+ }
3745
+ head(url, options) {
3746
+ return this.#client.head(url, options);
3747
+ }
3748
+ delete(url, options) {
3749
+ return this.#client.delete(url, options);
3750
+ }
3751
+ };
3752
+
3683
3753
  // lib/imports/models/ImportDetail.ts
3684
3754
  var importDetailSchema = z.object({
3685
- completedAt: z.nullable(z.number()),
3755
+ completedAt: z.number().nullish(),
3686
3756
  errorCount: z.number(),
3687
3757
  importId: z.number(),
3688
3758
  name: z.string(),
3689
- startedAt: z.nullable(z.string()),
3759
+ startedAt: z.string().nullish(),
3690
3760
  status: z.string(),
3691
3761
  uploadedAt: z.string()
3692
3762
  });
@@ -3699,7 +3769,7 @@ var importSchema = z.object({
3699
3769
 
3700
3770
  // lib/imports/models/ImportError.ts
3701
3771
  var importErrorSchema = z.object({
3702
- attribute: z.string(),
3772
+ attribute: z.string().nullish(),
3703
3773
  description: z.string(),
3704
3774
  importErrorId: z.number(),
3705
3775
  row: z.number()
@@ -3725,15 +3795,15 @@ var importStatusEnumSchema = z.enum([
3725
3795
 
3726
3796
  // lib/imports/models/ImportsStatus.ts
3727
3797
  var importsStatusSchema = z.object({
3728
- completedAt: z.nullable(z.string()).optional(),
3729
- docInEventId: z.nullable(z.string()).optional(),
3730
- errorCount: z.nullable(z.number()).optional(),
3798
+ completedAt: z.string().nullish(),
3799
+ docInEventId: z.string().nullish(),
3800
+ errorCount: z.number().nullish(),
3731
3801
  importId: z.number(),
3732
- invalidItemCount: z.nullable(z.number()).optional(),
3733
- name: z.string(),
3802
+ invalidItemCount: z.number().nullish(),
3803
+ name: z.string().nullish(),
3734
3804
  status: importStatusEnumSchema,
3735
- totalItemCount: z.nullable(z.number()).optional(),
3736
- validItemCount: z.nullable(z.number()).optional()
3805
+ totalItemCount: z.number().nullish(),
3806
+ validItemCount: z.number().nullish()
3737
3807
  });
3738
3808
 
3739
3809
  // lib/imports/models/VendorPartnerAttGroups.ts
@@ -3752,19 +3822,73 @@ var generateImportTemplateParamsSchema = z.object({
3752
3822
  includeGuides: z.boolean().optional()
3753
3823
  });
3754
3824
 
3825
+ // lib/exports/models/ExportType.ts
3826
+ var exportTypeEnum = z.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
3827
+
3828
+ // lib/exports/models/ExportFrequency.ts
3829
+ var exportFrequencyEnum = z.enum([
3830
+ "IMMEDIATE",
3831
+ "ONETIME",
3832
+ "DAILY",
3833
+ "WEEKLY",
3834
+ "MONTHLY"
3835
+ ]);
3836
+
3837
+ // lib/exports/models/ExportDayOfWeek.ts
3838
+ var exportDayOfWeekEnum = z.enum([
3839
+ "MON",
3840
+ "TUE",
3841
+ "WED",
3842
+ "THU",
3843
+ "FRI",
3844
+ "SAT",
3845
+ "SUN"
3846
+ ]);
3847
+
3848
+ // lib/exports/models/Export.ts
3849
+ var exportSchema = z.object({
3850
+ exportName: z.string(),
3851
+ exportDescription: z.string(),
3852
+ isActive: z.boolean(),
3853
+ exportType: exportTypeEnum,
3854
+ exportFrequency: exportFrequencyEnum,
3855
+ includeValidAttributes: z.optional(z.boolean()),
3856
+ dayOfMonth: z.optional(z.number()),
3857
+ dayOfWeek: z.optional(exportDayOfWeekEnum),
3858
+ hourOfDay: z.optional(z.number()),
3859
+ date: z.optional(z.string()),
3860
+ catalogIds: z.optional(z.array(z.number())),
3861
+ itemInfoIds: z.optional(z.array(z.number())),
3862
+ excludeItemInfoIds: z.optional(z.array(z.number())),
3863
+ selectionCodeIds: z.optional(z.array(z.number())),
3864
+ productCodeIds: z.optional(z.array(z.number())),
3865
+ productTypes: z.optional(z.array(z.string())),
3866
+ deliveryType: z.optional(z.string()),
3867
+ spreadsheetTemplateId: z.optional(z.number()),
3868
+ emailAddresses: z.optional(z.array(z.string())),
3869
+ subjectLine: z.optional(z.string()),
3870
+ additionalLocales: z.optional(z.array(z.string()))
3871
+ });
3872
+
3873
+ // lib/exports/models/DownloadItemsParams.ts
3874
+ var downLoadItemsParamsSchema = z.object({
3875
+ "multi-sheet": z.boolean(),
3876
+ ids: z.array(z.string())
3877
+ });
3878
+
3755
3879
  // lib/categories/models/ItemCategory.ts
3756
3880
  var itemCategorySchema = z.object({
3757
3881
  categoryid: z.number(),
3758
3882
  companyId: z.number(),
3759
3883
  name: z.string(),
3760
3884
  isActive: z.number(),
3761
- createdDate: z.nullable(z.number()),
3762
- categorytimestamp: z.nullable(z.number()),
3885
+ createdDate: z.number().nullish(),
3886
+ categorytimestamp: z.number().nullish(),
3763
3887
  typeId: z.number(),
3764
3888
  type: z.string(),
3765
- categorykey: z.optional(z.string()),
3766
- description: z.nullable(z.string()).optional(),
3767
- categoryCatalogName: z.nullable(z.string()).optional()
3889
+ categorykey: z.string().nullish(),
3890
+ description: z.string().nullish(),
3891
+ categoryCatalogName: z.string().nullish()
3768
3892
  });
3769
3893
 
3770
3894
  // lib/categories/models/ItemCategoriesSearch.ts
@@ -3773,8 +3897,621 @@ var itemCategoriesSearchSchema = z.object({
3773
3897
  data: z.array(itemCategorySchema)
3774
3898
  });
3775
3899
 
3900
+ // lib/attributes/models/AttributeMetaData.ts
3901
+ var attributeMetaDataSchema = z.object({
3902
+ dbName: z.string(),
3903
+ label: z.string(),
3904
+ group: z.string(),
3905
+ aliases: z.array(z.string()),
3906
+ orderBy: z.string().or(z.number()),
3907
+ type: z.string(),
3908
+ storageType: z.string(),
3909
+ rsxPath: z.string(),
3910
+ indexed: z.boolean(),
3911
+ repeatable: z.boolean(),
3912
+ extended: z.boolean(),
3913
+ hybrid: z.boolean(),
3914
+ userVisible: z.boolean(),
3915
+ retailerOwnedId: z.number().nullish()
3916
+ });
3917
+
3918
+ // lib/attributes/models/AttributeSummary.ts
3919
+ var attributeSummarySchema = z.object({
3920
+ attributeId: z.number(),
3921
+ attributeName: z.string(),
3922
+ displayName: z.string(),
3923
+ modifiedBy: z.string(),
3924
+ modifiedDate: z.number(),
3925
+ retailerOwnedId: z.number().nullish(),
3926
+ clusterAttrGroupId: z.number().nullish(),
3927
+ attributeType: z.string()
3928
+ });
3929
+
3930
+ // lib/attributes/models/AttributesByCompany.ts
3931
+ var attributesByCompanySchema = z.object({
3932
+ next: z.string().nullish(),
3933
+ previous: z.string().nullish(),
3934
+ count: z.number(),
3935
+ results: z.array(attributeSummarySchema)
3936
+ });
3937
+
3938
+ // lib/attributes/models/AttrDatatypeNameEnum.ts
3939
+ var attrDatatypeNameEnumSchema = z.enum([
3940
+ "TEXT",
3941
+ "SET",
3942
+ "INTEGER",
3943
+ "FLOAT",
3944
+ "BOOLEAN",
3945
+ "DATE",
3946
+ "KEYVALUE",
3947
+ "STRING",
3948
+ "REAL"
3949
+ ]);
3950
+
3951
+ // lib/attributes/models/AttributeGroup.ts
3952
+ var attributeGroupSchema = z.object({
3953
+ attrGroupId: z.number(),
3954
+ attrGroupType: z.object({
3955
+ attrGroupTypeId: z.number(),
3956
+ groupTypeName: z.string(),
3957
+ primary: z.boolean(),
3958
+ restricted: z.boolean()
3959
+ }),
3960
+ attrGroupTypeId: z.number(),
3961
+ groupName: z.string(),
3962
+ isDefault: z.boolean(),
3963
+ orderWeight: z.number(),
3964
+ primary: z.boolean()
3965
+ });
3966
+
3967
+ // lib/attributes/models/AttributeDefinition.ts
3968
+ var parentAttributeSchema = z.object({
3969
+ attrDataTypeId: z.number(),
3970
+ attrDatatype: z.object({
3971
+ attrDatatypeId: z.number(),
3972
+ datatypeName: attrDatatypeNameEnumSchema,
3973
+ displayOnly: z.boolean()
3974
+ }),
3975
+ attrGroupId: z.number(),
3976
+ attrGroups: z.array(attributeGroupSchema),
3977
+ attrRoundId: z.number(),
3978
+ attrStorageId: z.number(),
3979
+ attributeId: z.number(),
3980
+ attributeName: z.string(),
3981
+ createdBy: z.string(),
3982
+ createdDate: z.number(),
3983
+ description: z.string().optional(),
3984
+ displayName: z.string(),
3985
+ modifiedDate: z.number(),
3986
+ orderWeight: z.number(),
3987
+ parentAttributeId: z.number().optional(),
3988
+ primaryAttrGroup: attributeGroupSchema
3989
+ });
3990
+ var attributeDefinitionSchema = z.object({
3991
+ attrDataTypeId: z.number(),
3992
+ attrDatatype: z.object({
3993
+ attrDatatypeId: z.number(),
3994
+ datatypeName: attrDatatypeNameEnumSchema,
3995
+ displayOnly: z.boolean()
3996
+ }),
3997
+ attrGroupId: z.number(),
3998
+ attrGroups: z.array(attributeGroupSchema),
3999
+ attrRestrictions: z.array(
4000
+ z.object({
4001
+ attrRestrictId: z.number(),
4002
+ ignoreGlobal: z.boolean().optional(),
4003
+ isDefault: z.boolean(),
4004
+ isEssential: z.boolean(),
4005
+ locale: z.string(),
4006
+ mandatory: z.boolean(),
4007
+ repeatable: z.boolean(),
4008
+ minLength: z.number().optional(),
4009
+ maxLength: z.number().optional()
4010
+ })
4011
+ ).optional(),
4012
+ attrRoundId: z.number(),
4013
+ attrStorage: z.object({
4014
+ attrStorageId: z.number(),
4015
+ storageName: z.string()
4016
+ }),
4017
+ attrStorageId: z.number(),
4018
+ attrValues: z.array(
4019
+ z.object({
4020
+ attrKeyPair: z.string(),
4021
+ attrValueId: z.number().optional(),
4022
+ isDefault: z.boolean(),
4023
+ locale: z.string(),
4024
+ value: z.string()
4025
+ })
4026
+ ).optional(),
4027
+ attributeId: z.number(),
4028
+ attributeName: z.string(),
4029
+ createdBy: z.string(),
4030
+ createdDate: z.number(),
4031
+ description: z.string().optional(),
4032
+ displayName: z.string(),
4033
+ modifiedDate: z.number(),
4034
+ orderWeight: z.number().optional(),
4035
+ parentAttribute: parentAttributeSchema.optional(),
4036
+ parentAttributeId: z.number().optional(),
4037
+ primaryAttrGroup: attributeGroupSchema
4038
+ });
4039
+
4040
+ // lib/attributes/models/AttributeValidValues.ts
4041
+ var attributeValidValuesSchema = z.object({
4042
+ value: z.string(),
4043
+ isDefault: z.boolean(),
4044
+ locale: z.string(),
4045
+ createdBy: z.string(),
4046
+ createdDate: z.number(),
4047
+ modifiedDate: z.number(),
4048
+ modifiedBy: z.string(),
4049
+ attributeId: z.number(),
4050
+ attrValueId: z.number(),
4051
+ attrKeyPair: z.string()
4052
+ });
4053
+
4054
+ // lib/items/models/ItemHeader.ts
4055
+ var itemHeaderSchema = z.object({
4056
+ status: z.string().optional(),
4057
+ catalogName: z.string(),
4058
+ productCodeName: z.string(),
4059
+ selectionCodeName: z.string(),
4060
+ gtin: z.string(),
4061
+ upc: z.string(),
4062
+ ean: z.string(),
4063
+ isbn: z.string(),
4064
+ partNumber: z.string(),
4065
+ lastUpdatedDateString: z.string(),
4066
+ companyId: z.string(),
4067
+ itemInfoId: z.string()
4068
+ });
4069
+
4070
+ // lib/items/models/PhaseEnum.ts
4071
+ var phaseEnumSchema = z.enum([
4072
+ "CORE",
4073
+ "CORE_PLUS",
4074
+ "CORE_ADVANCED",
4075
+ "ENRICHED",
4076
+ "STANDARD_REQUIREMENTS"
4077
+ ]);
4078
+
4079
+ // lib/items/models/TradingPartnerStage.ts
4080
+ var tradingPartnerStageSchema = z.object({
4081
+ companyId: z.number(),
4082
+ companyName: z.string(),
4083
+ stage: z.nullable(phaseEnumSchema),
4084
+ isValid: z.boolean()
4085
+ });
4086
+
4087
+ // lib/items/models/ItemMap.ts
4088
+ var itemMapSchema = z.object({
4089
+ rn: z.number().optional(),
4090
+ iteminfoid: z.string(),
4091
+ tradingPartnerStages: z.array(tradingPartnerStageSchema).optional(),
4092
+ gtin: z.string().nullish(),
4093
+ catalogname: z.string().nullish(),
4094
+ isbn: z.string().nullish(),
4095
+ lastupdateddatestring: z.string().nullish(),
4096
+ upc: z.string().nullish(),
4097
+ productcodename: z.string().nullish(),
4098
+ ean: z.string().nullish(),
4099
+ selectioncodename: z.string().nullish(),
4100
+ createddatestring: z.string().nullish(),
4101
+ partnumber: z.string().nullish(),
4102
+ consumeravailabledatestring: z.string().nullish(),
4103
+ status: z.string().nullish(),
4104
+ nrfcolorcode: z.array(z.string()).nullish(),
4105
+ nrfsizecode: z.string().nullish(),
4106
+ productcolordescription: z.array(z.string()).nullish(),
4107
+ productsizedescription: z.array(z.string()).nullish()
4108
+ });
4109
+
4110
+ // lib/items/models/ItemTable.ts
4111
+ var itemTableSchema = z.object({
4112
+ headers: itemHeaderSchema,
4113
+ itemMaps: z.array(itemMapSchema)
4114
+ });
4115
+
4116
+ // lib/items/models/ItemSearchView.ts
4117
+ var itemSearchViewSchema = z.object({
4118
+ itemTable: itemTableSchema,
4119
+ hasNext: z.boolean(),
4120
+ count: z.number()
4121
+ });
4122
+
4123
+ // lib/items/models/AttributeDetail.ts
4124
+ var attributeDetailSchema = z.object({
4125
+ type: attrDatatypeNameEnumSchema,
4126
+ name: z.string(),
4127
+ value: z.string().or(z.number()).or(z.array(z.string())).or(z.array(z.number())).nullable(),
4128
+ label: z.string(),
4129
+ group: z.string(),
4130
+ orderBy: z.number().or(z.string()).nullish()
4131
+ });
4132
+
4133
+ // lib/items/models/CategoryEnum.ts
4134
+ var categoryEnumSchema = z.enum([
4135
+ "AKA",
4136
+ "CATALOG",
4137
+ "EXPORT",
4138
+ "LABEL",
4139
+ "LEGACY_PRODUCT_TYPE",
4140
+ "PRODUCT_CLASSIFICATION",
4141
+ "PRODUCT_CODE",
4142
+ "SELECTION_CODE",
4143
+ "TAXONOMY_ROOT"
4144
+ ]);
4145
+
4146
+ // lib/items/models/ComponentDetails.ts
4147
+ var componentDetailsSchema = z.object({
4148
+ itemInfoId: z.number(),
4149
+ description: z.string(),
4150
+ saleable: z.boolean(),
4151
+ valid: z.boolean(),
4152
+ uniqueCriteria: z.array(
4153
+ z.object({
4154
+ name: z.string(),
4155
+ value: z.string()
4156
+ })
4157
+ )
4158
+ });
4159
+
4160
+ // lib/items/models/RepeatableGroup.ts
4161
+ var repeatableGroupSchema = z.object({
4162
+ repeatableGroupId: z.string(),
4163
+ repeatableNumber: z.number()
4164
+ });
4165
+
4166
+ // lib/items/models/GroupedAttributeList.ts
4167
+ var groupedAttributeListSchema = z.object({
4168
+ type: z.string(),
4169
+ rows: z.array(z.array(attributeDetailSchema)),
4170
+ repeatableGroups: z.array(repeatableGroupSchema)
4171
+ });
4172
+
4173
+ // lib/items/models/GroupedAttributes.ts
4174
+ var groupedAttributesSchema = z.object({
4175
+ type: z.string(),
4176
+ attributes: z.array(attributeDetailSchema),
4177
+ attributeGroups: z.array(groupedAttributeListSchema)
4178
+ });
4179
+
4180
+ // lib/items/models/HierarchyCategory.ts
4181
+ var hierarchyCategorySchema = z.object({
4182
+ name: z.string(),
4183
+ description: z.string().nullish(),
4184
+ id: z.number(),
4185
+ companyId: z.number(),
4186
+ type: categoryEnumSchema
4187
+ });
4188
+
4189
+ // lib/items/models/HierarchyDetails.ts
4190
+ var hierarchyDetailsSchema = z.object({
4191
+ catalogs: z.array(hierarchyCategorySchema),
4192
+ selectionCodes: z.array(hierarchyCategorySchema),
4193
+ productCodes: z.array(hierarchyCategorySchema)
4194
+ });
4195
+
4196
+ // lib/items/models/PackComponentItemInfo.ts
4197
+ var packComponentItemInfoSchema = z.object({
4198
+ companyid: z.number(),
4199
+ createddate: z.number(),
4200
+ isServiceApi: z.boolean(),
4201
+ isactive: z.number(),
4202
+ isvalid: z.number(),
4203
+ itemType: z.string(),
4204
+ iteminfoid: z.number(),
4205
+ itemtimestamp: z.number(),
4206
+ serviceId: z.number(),
4207
+ attributes: z.record(z.string(), z.string().or(z.array(z.string())))
4208
+ });
4209
+
4210
+ // lib/items/models/ItemPrice.ts
4211
+ var itemPriceSchema = z.object({
4212
+ amount: z.number(),
4213
+ currency: z.string(),
4214
+ id: z.number().nullish(),
4215
+ priceDivision: z.string().nullish(),
4216
+ iteminfoid: z.number().nullish(),
4217
+ startdate: z.string().nullish(),
4218
+ enddate: z.string().nullish(),
4219
+ qualifier: z.string(),
4220
+ region: z.string().nullish(),
4221
+ regionqualifier: z.string().nullish(),
4222
+ regiondescription: z.string().nullish(),
4223
+ partnercompanyid: z.string().nullish(),
4224
+ itempricetimestamp: z.number().nullish(),
4225
+ range_type: z.string().nullish(),
4226
+ date_range_type: z.string().nullish(),
4227
+ min_range: z.number().nullish(),
4228
+ gtin: z.string().nullish(),
4229
+ priceConditionDescription: z.string().nullish(),
4230
+ priceUnitQuantity: z.number().nullish(),
4231
+ priceUnitQuantityUOM: z.string().nullish()
4232
+ });
4233
+
4234
+ // lib/items/models/PackComponentDetails.ts
4235
+ var packComponentDetailsSchema = z.object({
4236
+ itemInfo: packComponentItemInfoSchema,
4237
+ itemPrices: z.array(itemPriceSchema)
4238
+ });
4239
+
4240
+ // lib/items/models/GroupedItem.ts
4241
+ var groupedItemSchema = z.object({
4242
+ iteminfoid: z.number(),
4243
+ companyid: z.number(),
4244
+ status: z.string(),
4245
+ createdDate: z.string(),
4246
+ lastUpdatedDate: z.string(),
4247
+ identifiers: z.record(z.string(), z.any()),
4248
+ hierarchyDetails: hierarchyDetailsSchema,
4249
+ groupedAttributes: z.array(groupedAttributesSchema),
4250
+ packComponentDetails: z.array(packComponentDetailsSchema),
4251
+ childComponentDetails: z.array(componentDetailsSchema),
4252
+ parentComponentDetails: z.array(componentDetailsSchema),
4253
+ locales: z.array(z.string())
4254
+ });
4255
+
4256
+ // lib/items/models/ItemDetailView.ts
4257
+ var itemDetailViewSchema = z.object({
4258
+ item: groupedItemSchema
4259
+ });
4260
+
4261
+ // lib/items/models/Bulb.ts
4262
+ var bulbSchema = z.object({
4263
+ iteminfoid: z.number(),
4264
+ id: z.number(),
4265
+ shape: z.string(),
4266
+ position: z.number(),
4267
+ quantity: z.number(),
4268
+ basetype: z.string(),
4269
+ maxwatt: z.number(),
4270
+ createdat: z.string(),
4271
+ modifiedat: z.string(),
4272
+ bulbtype: z.string(),
4273
+ bulbincluded: z.string(),
4274
+ bulbsize: z.string(),
4275
+ replacementbulb: z.string(),
4276
+ threewaybulb: z.string()
4277
+ });
4278
+
4279
+ // lib/items/models/PackComponent.ts
4280
+ var packComponentSchema = z.object({
4281
+ itemInfoId: z.number().nullish(),
4282
+ attributes: z.record(z.string(), z.string().or(z.array(z.string()))),
4283
+ prices: z.array(itemPriceSchema)
4284
+ });
4285
+
4286
+ // lib/items/models/MediaItem.ts
4287
+ var mediaItemSchema = z.object({
4288
+ id: z.number(),
4289
+ iteminfoid: z.number(),
4290
+ medianame: z.string(),
4291
+ height: z.number().nullish(),
4292
+ filename: z.string(),
4293
+ mediafilename: z.string().nullish(),
4294
+ description: z.string().nullish(),
4295
+ filesize: z.number().nullish(),
4296
+ format: z.string().nullish(),
4297
+ orientation: z.string().nullish(),
4298
+ pixeldensity: z.string().nullish(),
4299
+ purpose: z.string().nullish(),
4300
+ width: z.number().nullish(),
4301
+ mediatype: z.string(),
4302
+ mediaviewtype: z.string().nullish(),
4303
+ compressionquality: z.string().nullish(),
4304
+ thumbnailflag: z.string().nullish()
4305
+ });
4306
+
4307
+ // lib/items/models/ItemDetail.ts
4308
+ var itemDetailSchema = z.object({
4309
+ attributes: z.record(z.string(), z.any()),
4310
+ clusters: z.record(
4311
+ z.string(),
4312
+ z.array(
4313
+ z.object({
4314
+ itemInfoAttributes: z.record(
4315
+ z.string(),
4316
+ z.string().or(z.number()).or(z.boolean())
4317
+ )
4318
+ })
4319
+ )
4320
+ ),
4321
+ prices: z.array(itemPriceSchema),
4322
+ bulbs: z.array(bulbSchema),
4323
+ media: z.array(mediaItemSchema),
4324
+ packs: z.array(packComponentSchema)
4325
+ });
4326
+
4327
+ // lib/locale/models/Locale.ts
4328
+ var localeSchema = z.object({
4329
+ localeCode: z.string(),
4330
+ localeDescription: z.string()
4331
+ });
4332
+
4333
+ // lib/productTypes/models/AttrProdType.ts
4334
+ var attrProdTypeSchema = z.object({
4335
+ attrProdTypeId: z.number(),
4336
+ productType: z.string(),
4337
+ description: z.string(),
4338
+ createdDate: z.number(),
4339
+ createdBy: z.string(),
4340
+ modifiedDate: z.number().optional(),
4341
+ modifiedBy: z.string().optional(),
4342
+ retailerId: z.number().optional()
4343
+ });
4344
+
4345
+ // lib/productTypes/models/PagedResults.ts
4346
+ function pagedResultsSchema(resultsType) {
4347
+ return z.object({
4348
+ next: z.string(),
4349
+ previous: z.string(),
4350
+ count: z.number(),
4351
+ results: z.array(resultsType)
4352
+ });
4353
+ }
4354
+
4355
+ // lib/spreadsheetTemplate/models/SpreadsheetTemplateCompany.ts
4356
+ var spreadsheetTemplateCompanySchema = z.object({
4357
+ companyName: z.string(),
4358
+ companyId: z.number(),
4359
+ createdAt: z.number()
4360
+ });
4361
+
4362
+ // lib/spreadsheetTemplate/models/SpreadsheetTemplate.ts
4363
+ var spreadsheetTemplateSchema = z.object({
4364
+ id: z.number(),
4365
+ fileLocation: z.string(),
4366
+ name: z.string(),
4367
+ templateType: z.string(),
4368
+ maxItemsPerDoc: z.number(),
4369
+ companies: z.array(spreadsheetTemplateCompanySchema),
4370
+ createdBy: z.string().nullish(),
4371
+ createdAt: z.number().nullish(),
4372
+ modifiedBy: z.string().nullish(),
4373
+ modifiedAt: z.number().nullish()
4374
+ });
4375
+
4376
+ // lib/tradingPartners/models/Connection.ts
4377
+ var connectionSchema = z.object({
4378
+ catalog_id: z.number(),
4379
+ catalog_name: z.string(),
4380
+ partner_company_name: z.string(),
4381
+ partner_company_id: z.number()
4382
+ });
4383
+
4384
+ // lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
4385
+ var tradingPartnerAccessByCompanyIdSchema = z.object({
4386
+ companyId: z.number(),
4387
+ companyType: z.string(),
4388
+ identityOrgId: z.string(),
4389
+ companyName: z.string(),
4390
+ count: z.number(),
4391
+ connections: z.array(connectionSchema)
4392
+ });
4393
+
4394
+ // lib/whoami/models/IdentityServiceDatetimePreferences.ts
4395
+ var identityServiceDatetimePreferencesSchema = z.object({
4396
+ DATE_TIME: z.string(),
4397
+ TIME: z.string(),
4398
+ SHORT_DATE: z.string(),
4399
+ LONG_DATETIME: z.string(),
4400
+ LONG_TIME: z.string(),
4401
+ DATE: z.string()
4402
+ });
4403
+
4404
+ // lib/whoami/models/IdentityServiceOrganizationMetadata.ts
4405
+ var identityServiceOrganizationMetadataSchema = z.object({
4406
+ namespace: z.string(),
4407
+ key: z.string(),
4408
+ value: z.string()
4409
+ });
4410
+
4411
+ // lib/whoami/models/IdentityServiceOrganization.ts
4412
+ var identityServiceOrganizationSchema = z.object({
4413
+ organization_name: z.string(),
4414
+ organization_site: z.string(),
4415
+ namespace: z.string(),
4416
+ id: z.string(),
4417
+ permissions: z.array(z.string()).optional(),
4418
+ metadata: identityServiceOrganizationMetadataSchema.optional()
4419
+ });
4420
+
4421
+ // lib/whoami/models/IdentityServicePreferences.ts
4422
+ var identityServicePreferencesSchema = z.object({
4423
+ locale: z.string(),
4424
+ timezone: z.string(),
4425
+ cpUpgrade: z.string().optional(),
4426
+ language: z.array(z.string()),
4427
+ datetime: identityServiceDatetimePreferencesSchema
4428
+ });
4429
+
4430
+ // lib/whoami/models/IdentityServiceUser.ts
4431
+ var identityServiceUserSchema = z.object({
4432
+ id: z.string(),
4433
+ email: z.string(),
4434
+ first_name: z.string(),
4435
+ last_name: z.string(),
4436
+ job_title: z.string(),
4437
+ externally_managed: z.boolean(),
4438
+ city: z.string(),
4439
+ name: z.string(),
4440
+ state: z.string(),
4441
+ country: z.string(),
4442
+ user_type: z.string(),
4443
+ token_type: z.string(),
4444
+ avatar_image_id: z.string(),
4445
+ avatar_image_url: z.string(),
4446
+ origin_avatar_image_id: z.string(),
4447
+ bio: z.string(),
4448
+ phone_number: z.string(),
4449
+ twitter_handle: z.string(),
4450
+ linkedin_url: z.string(),
4451
+ description: z.string().optional(),
4452
+ preferences: identityServicePreferencesSchema,
4453
+ roles: z.array(z.string()),
4454
+ organization: identityServiceOrganizationSchema,
4455
+ password: z.string(),
4456
+ verified: z.boolean()
4457
+ });
4458
+
4459
+ // lib/whoami/models/RegisteredService.ts
4460
+ var registeredServiceSchema = z.object({
4461
+ serviceId: z.number(),
4462
+ identityServiceId: z.number(),
4463
+ name: z.string(),
4464
+ isActive: z.boolean()
4465
+ });
4466
+
4467
+ // lib/whoami/models/UserAccount.ts
4468
+ var userAccountSchema = z.object({
4469
+ identityUser: identityServiceUserSchema,
4470
+ companyId: z.number(),
4471
+ companyName: z.string(),
4472
+ name: z.string(),
4473
+ assortmentPartnerCompanyId: z.number().nullish(),
4474
+ retailer: z.boolean(),
4475
+ supplier: z.boolean(),
4476
+ registeredService: registeredServiceSchema,
4477
+ uniqueAttributes: z.array(z.string()),
4478
+ admin: z.boolean(),
4479
+ adminToolUser: z.boolean(),
4480
+ attributeRegistryAdmin: z.boolean(),
4481
+ attributeRegistryDev: z.boolean(),
4482
+ attributeRegistryRsx: z.boolean(),
4483
+ attributeRegistryUser: z.boolean(),
4484
+ attributeRegistryViewer: z.boolean()
4485
+ });
4486
+
4487
+ // lib/errors/models/ItemErrorDetails.ts
4488
+ var itemErrorDetailsSchema = z.object({
4489
+ errorMessage: z.string(),
4490
+ attributeName: z.string(),
4491
+ tradingPartnerNames: z.array(z.string()),
4492
+ phases: z.array(phaseEnumSchema),
4493
+ attributeDbNames: z.array(z.string()),
4494
+ tradingPartnerStages: z.array(tradingPartnerStageSchema),
4495
+ repeatableGroupId: z.string().nullish()
4496
+ });
4497
+
4498
+ // lib/errors/models/ItemErrorDetailsResult.ts
4499
+ var itemErrorDetailsResultSchema = z.object({
4500
+ itemInfoId: z.number(),
4501
+ upc: z.string().nullish(),
4502
+ isbn: z.string().nullish(),
4503
+ gtin: z.string().nullish(),
4504
+ partnumber: z.string().nullish(),
4505
+ ean: z.string().nullish(),
4506
+ itemName: z.string().nullable(),
4507
+ itemErrorDetails: z.array(itemErrorDetailsSchema)
4508
+ });
4509
+
3776
4510
  export {
3777
4511
  z,
4512
+ BASE_URLS,
4513
+ envSchema,
4514
+ AsstClient,
3778
4515
  importDetailSchema,
3779
4516
  importSchema,
3780
4517
  importErrorSchema,
@@ -3782,6 +4519,58 @@ export {
3782
4519
  importStatusEnumSchema,
3783
4520
  importsStatusSchema,
3784
4521
  vendorPartnerAttGroupsSchema,
4522
+ generateImportTemplateParamsSchema,
4523
+ attrProdTypeSchema,
4524
+ pagedResultsSchema,
4525
+ connectionSchema,
4526
+ tradingPartnerAccessByCompanyIdSchema,
3785
4527
  itemCategorySchema,
3786
- itemCategoriesSearchSchema
4528
+ itemCategoriesSearchSchema,
4529
+ attributeMetaDataSchema,
4530
+ attributeSummarySchema,
4531
+ attributesByCompanySchema,
4532
+ attrDatatypeNameEnumSchema,
4533
+ attributeGroupSchema,
4534
+ attributeDefinitionSchema,
4535
+ attributeValidValuesSchema,
4536
+ localeSchema,
4537
+ spreadsheetTemplateCompanySchema,
4538
+ spreadsheetTemplateSchema,
4539
+ identityServiceDatetimePreferencesSchema,
4540
+ identityServiceOrganizationMetadataSchema,
4541
+ identityServiceOrganizationSchema,
4542
+ identityServicePreferencesSchema,
4543
+ identityServiceUserSchema,
4544
+ registeredServiceSchema,
4545
+ userAccountSchema,
4546
+ itemHeaderSchema,
4547
+ phaseEnumSchema,
4548
+ tradingPartnerStageSchema,
4549
+ itemMapSchema,
4550
+ itemTableSchema,
4551
+ itemSearchViewSchema,
4552
+ exportTypeEnum,
4553
+ exportFrequencyEnum,
4554
+ exportDayOfWeekEnum,
4555
+ exportSchema,
4556
+ downLoadItemsParamsSchema,
4557
+ itemErrorDetailsSchema,
4558
+ itemErrorDetailsResultSchema,
4559
+ attributeDetailSchema,
4560
+ categoryEnumSchema,
4561
+ componentDetailsSchema,
4562
+ repeatableGroupSchema,
4563
+ groupedAttributeListSchema,
4564
+ groupedAttributesSchema,
4565
+ hierarchyCategorySchema,
4566
+ hierarchyDetailsSchema,
4567
+ packComponentItemInfoSchema,
4568
+ itemPriceSchema,
4569
+ packComponentDetailsSchema,
4570
+ groupedItemSchema,
4571
+ itemDetailViewSchema,
4572
+ bulbSchema,
4573
+ packComponentSchema,
4574
+ mediaItemSchema,
4575
+ itemDetailSchema
3787
4576
  };