export type JTLDataContractsKeysArtikelKey = string; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction = 0 | 1; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateAttributesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateDescriptionsCopyOptions = {isActive?: boolean | undefined, considerItemName?: boolean | undefined, considerItemDescription?: boolean | undefined, considerItemMetadata?: boolean | undefined, considerItemUrlPath?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateImagesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateCrossSellingCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateDownloadFilesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateCustomFieldsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreatePurchasePricesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateIdentifiersCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateConfigurationsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateSuppliersCopyOptions = {isActive?: boolean | undefined, keepItemNumber?: boolean | undefined, keepItemName?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateDeliveryOptionsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateMeasurementsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateMediaFilesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateCharacteristicsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateOnlineShopsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateOversalesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateScxCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateSpecialPricesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateMasterDataCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateBomComponentsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateUploadFilesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateVariationsCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateSalesPricesCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreatePackagingCopyOptions = {isActive?: boolean | undefined, copyAction?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsItemSettingCopyAction | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateItemdetailsCopyOptions = {attributesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateAttributesCopyOptions | undefined, descriptionsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateDescriptionsCopyOptions | undefined, imagesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateImagesCopyOptions | undefined, crossSellingCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateCrossSellingCopyOptions | undefined, downloadFilesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateDownloadFilesCopyOptions | undefined, customFieldsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateCustomFieldsCopyOptions | undefined, purchasePricesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreatePurchasePricesCopyOptions | undefined, identifiersCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateIdentifiersCopyOptions | undefined, configurationsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateConfigurationsCopyOptions | undefined, suppliersCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateSuppliersCopyOptions | undefined, deliveryOptionsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateDeliveryOptionsCopyOptions | undefined, measurementsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateMeasurementsCopyOptions | undefined, mediaFilesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateMediaFilesCopyOptions | undefined, characteristicsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateCharacteristicsCopyOptions | undefined, onlineShopsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateOnlineShopsCopyOptions | undefined, oversalesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateOversalesCopyOptions | undefined, scxCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateScxCopyOptions | undefined, specialPricesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateSpecialPricesCopyOptions | undefined, masterDataCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateMasterDataCopyOptions | undefined, bomComponentsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateBomComponentsCopyOptions | undefined, uploadFilesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateUploadFilesCopyOptions | undefined, variationsCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateVariationsCopyOptions | undefined, salesPricesCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateSalesPricesCopyOptions | undefined, packagingCopyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreatePackagingCopyOptions | undefined}; export type JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCopyItemdetailsCommandRequest = {copyDetailsFromItemId?: JTLDataContractsKeysArtikelKey | undefined, copyDetailsIntoItemIds?: Array | undefined, copyOptions?: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCreateItemdetailsCopyOptions | undefined}; export type CreateApiV2CopyItemdetailsArgs = {'x-tenant-id': string, 'x-runas'?: string | undefined, 'x-companyid'?: string | undefined, body: JTLWawiItemPublicApiDataTransferObjectsV2CopyItemdetailsCopyItemdetailsCommandRequest}; export type CreateApiV2CopyItemdetailsOptions = {baseUrl?: string | undefined, oauth2AuthorizationCode?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /v2/CopyItemdetails * * Also accepts auth: oauth2-client-credentials */ export const createApiV2CopyItemdetails = async (args: CreateApiV2CopyItemdetailsArgs, options?: CreateApiV2CopyItemdetailsOptions) => { const {baseUrl = "https://scx-sbx.api.jtl-software.com", fetch: fetchFn = fetch, oauth2AuthorizationCode} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args['x-tenant-id'] != null) headers.set("x-tenant-id", String(args['x-tenant-id'])) if (args['x-runas'] != null) headers.set("x-runas", String(args['x-runas'])) if (args['x-companyid'] != null) headers.set("x-companyid", String(args['x-companyid'])) if (oauth2AuthorizationCode !== undefined) headers.set('authorization', `Bearer ${oauth2AuthorizationCode}`) const url = `${baseUrl.replace(/\/+$/, '')}/v2/CopyItemdetails${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return (await res.json()) as unknown };