@transai/connector-runner-gpms 0.19.0 → 0.24.2

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 (25) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/index.cjs +518 -95
  3. package/index.cjs.map +4 -4
  4. package/integrations/connector-runner-gpms/src/actions/create-client.action.d.ts +9 -0
  5. package/integrations/connector-runner-gpms/src/actions/create-order.action.d.ts +9 -0
  6. package/integrations/connector-runner-gpms/src/extractors/capaciteit-extractor.service.d.ts +8 -0
  7. package/integrations/connector-runner-gpms/src/extractors/planning-extractor.service.d.ts +8 -0
  8. package/{libs → integrations}/connector-runner-gpms/src/types.d.ts +4 -1
  9. package/integrations/connector-runner-gpms/src/webhook-server.d.ts +29 -0
  10. package/libs/connector-runtime-sdk/src/lib/sdk/http-client.interface.d.ts +2 -0
  11. package/libs/connector-runtime-sdk/src/lib/types/action.d.ts +2 -2
  12. package/package.json +4 -3
  13. package/libs/connector-runner-gpms/src/actions/create-client.action.d.ts +0 -9
  14. package/libs/connector-runner-gpms/src/actions/create-order.action.d.ts +0 -8
  15. package/libs/connector-runner-gpms/src/webhook-server.d.ts +0 -9
  16. /package/{libs → integrations}/connector-runner-gpms/src/actions/action.interface.d.ts +0 -0
  17. /package/{libs → integrations}/connector-runner-gpms/src/actions/actions-service.d.ts +0 -0
  18. /package/{libs → integrations}/connector-runner-gpms/src/actions/create-order-file.action.d.ts +0 -0
  19. /package/{libs → integrations}/connector-runner-gpms/src/actions/create-quote-file.action.d.ts +0 -0
  20. /package/{libs → integrations}/connector-runner-gpms/src/actions/create-quote.action.d.ts +0 -0
  21. /package/{libs → integrations}/connector-runner-gpms/src/actions/order-ready.action.d.ts +0 -0
  22. /package/{libs → integrations}/connector-runner-gpms/src/actions/quote-ready.action.d.ts +0 -0
  23. /package/{libs → integrations}/connector-runner-gpms/src/connector-runner-gpms.d.ts +0 -0
  24. /package/{libs → integrations}/connector-runner-gpms/src/error/bad-request.error.d.ts +0 -0
  25. /package/{libs → integrations}/connector-runner-gpms/src/index.d.ts +0 -0
@@ -0,0 +1,9 @@
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
+ import { GpmsActionInterface } from './action.interface';
3
+ export declare class CreateClientAction implements GpmsActionInterface {
4
+ #private;
5
+ readonly identifier = "create_client";
6
+ readonly clientTemplate = "<Client>\n <ClientId>{{ inputs.id }}</ClientId>\n <CustomerNo>{{ inputs.number }}</CustomerNo>\n <Name>{{ inputs.name }}</Name>\n <ShortName>{{ inputs.name }}</ShortName>\n <BillingEmail>{{ inputs.email }}</BillingEmail>\n <DiscountValue>{{ inputs.discountValue }}</DiscountValue>\n <MarkupValue>{{ inputs.markupValue }}</MarkupValue>\n <Vatnumber>{{ inputs.vatNumber }}</Vatnumber>\n <IsVatException></IsVatException>\n <IsPrivate>false</IsPrivate>\n <IsActive>true</IsActive>\n <Blocked>false</Blocked>\n <NumberOfEmployees></NumberOfEmployees>\n <Industry>{{ inputs.industry }}</Industry>\n <TimeZone></TimeZone>\n <AnnualRevenue></AnnualRevenue>\n <PurchaseLimitPerOrder></PurchaseLimitPerOrder>\n <Website>{{ inputs.website }}</Website>\n <ExternalId>{{ inputs.externalId }}</ExternalId>\n <RegisterDate></RegisterDate>\n <ChangedAt></ChangedAt>\n\n {{#if inputs.customerPaymentMethods}}\n <CustomerPaymentMethods>\n {{#each inputs.customerPaymentMethods}}\n <CustomerPaymentMethod>{{ this }}</CustomerPaymentMethod>\n {{/each}}\n </CustomerPaymentMethods>\n {{/if}}\n\n {{#if inputs.customerAddresses}}\n <CustomerAddresses>\n {{#each inputs.customerAddresses}}\n <CustomerAddress>\n <Id>{{ this.id }}</Id>\n <Name>{{ this.name }}</Name>\n <Street>{{ this.street }}</Street>\n <City>{{ this.city }}</City>\n <ZipCode>{{ this.zip }}</ZipCode>\n <Country>{{ this.country }}</Country>\n <BuildingNumber>{{ this.buildingNumber }}</BuildingNumber>\n {{#if this.addressLine1}}\n <AddressLine1>{{ this.addressLine1 }}</AddressLine1>\n {{/if}}\n {{#if this.addressLine2}}\n <AddressLine2>{{ this.addressLine2 }}</AddressLine2>\n {{/if}}\n {{#if this.addressLine3}}\n <AddressLine3>{{ this.addressLine3 }}</AddressLine3>\n {{/if}}\n {{#if this.phoneNumber}}\n <PhonePrefix>{{ this.phonePrefix }}</PhonePrefix>\n <PhoneNumber>{{ this.phoneNumber }}</PhoneNumber>\n {{/if}}\n <Email>{{ this.email }}</Email>\n <IsActive>true</IsActive>\n <IsDefault>true</IsDefault>\n </CustomerAddress>\n {{~/each}}\n </CustomerAddresses>\n {{/if}}\n\n {{#if inputs.users}}\n <Users>\n {{#each inputs.users}}\n <User>\n <UserId>{{ this.id }}</UserId>\n <FirstName>{{ this.firstName }}</FirstName>\n <LastName>{{ this.lastName }}</LastName>\n <FullName>{{ this.firstName }} {{ this.lastName }}</FullName>\n <Email>{{ this.email }}</Email>\n <UserTitle>{{ this.title }}</UserTitle>\n <Blocked>false</Blocked>\n <IsPrimaryContact>true</IsPrimaryContact>\n <IsActive>true</IsActive>\n <CreatedAt></CreatedAt>\n <ChangedAt></ChangedAt>\n <JobPosition>{{ this.jobPosition }}</JobPosition>\n {{#if this.phoneNumber}}\n <UserPhoneNumbers>\n <UserPhoneNumber>\n <PhoneType>{{ this.phoneType }}</PhoneType>\n <PhoneNumber>{{ this.phoneNumber }}</PhoneNumber>\n <PhonePrefix>{{ this.phonePrefix }}</PhonePrefix>\n </UserPhoneNumber>\n </UserPhoneNumbers>\n {{/if}}\n </User>\n {{~/each}}\n </Users>\n {{/if}}\n</Client>\n";
7
+ constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
8
+ execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
+ import { GpmsActionInterface } from './action.interface';
3
+ export declare class CreateOrderAction implements GpmsActionInterface {
4
+ #private;
5
+ readonly identifier = "create_order";
6
+ readonly orderTemplate = "<CustomerOrder>\n <OrderId>{{inputs.OrderId}}</OrderId>\n <OrderGuid>{{inputs.OrderGuid}}</OrderGuid>\n <DuplicatedFrom>{{inputs.DuplicatedFrom}}</DuplicatedFrom>\n <RevisedQuote>{{inputs.RevisedQuote}}</RevisedQuote>\n <Version>{{inputs.Version}}</Version>\n <OrderStatus>{{inputs.OrderStatus}}</OrderStatus>\n <CustomerId>{{inputs.CustomerId}}</CustomerId>\n <CompanyName>{{inputs.CompanyName}}</CompanyName>\n <CustomerNumber>{{inputs.CustomerNumber}}</CustomerNumber>\n <CustomerExternalId>{{inputs.CustomerExternalId}}</CustomerExternalId>\n <CustomerDunsNumber>{{inputs.CustomerDunsNumber}}</CustomerDunsNumber>\n <CustomerPhonePrefix>{{inputs.CustomerPhonePrefix}}</CustomerPhonePrefix>\n <CustomerPhone>{{inputs.CustomerPhone}}</CustomerPhone>{{#if inputs.BusinessPhonePrefix}}\n <BusinessPhonePrefix>{{inputs.BusinessPhonePrefix}}</BusinessPhonePrefix>{{/if}}{{#if inputs.BusinessPhone}}\n <BusinessPhone>{{inputs.BusinessPhone}}</BusinessPhone>{{/if}}\n <Email>{{inputs.Email}}</Email>\n <InvoiceAddress>{{#if inputs.InvoiceAddress.Id}}\n <Id>{{inputs.InvoiceAddress.Id}}</Id>{{/if}}{{#if inputs.InvoiceAddress.AddressName}}\n <AddressName>{{inputs.InvoiceAddress.AddressName}}</AddressName>{{/if}}{{#if inputs.InvoiceAddress.Street}}\n <Street>{{inputs.InvoiceAddress.Street}}</Street>{{/if}}{{#if inputs.InvoiceAddress.BuildingNumber}}\n <BuildingNumber>{{inputs.InvoiceAddress.BuildingNumber}}</BuildingNumber>{{/if}}{{#if inputs.InvoiceAddress.AddressLine1}}\n <AddressLine1>{{inputs.InvoiceAddress.AddressLine1}}</AddressLine1>{{/if}}{{#if inputs.InvoiceAddress.AddressLine2}}\n <AddressLine2>{{inputs.InvoiceAddress.AddressLine2}}</AddressLine2>{{/if}}{{#if inputs.InvoiceAddress.AddressLine3}}\n <AddressLine3>{{inputs.InvoiceAddress.AddressLine3}}</AddressLine3>{{/if}}{{#if inputs.InvoiceAddress.ZipCode}}\n <ZipCode>{{inputs.InvoiceAddress.ZipCode}}</ZipCode>{{/if}}{{#if inputs.InvoiceAddress.City}}\n <City>{{inputs.InvoiceAddress.City}}</City>{{/if}}{{#if inputs.InvoiceAddress.Country}}\n <Country>{{inputs.InvoiceAddress.Country}}</Country>{{/if}}{{#if inputs.InvoiceAddress.Email}}\n <Email>{{inputs.InvoiceAddress.Email}}</Email>{{/if}}{{#if inputs.InvoiceAddress.PhoneNo}}\n <PhoneNo>{{inputs.InvoiceAddress.PhoneNo}}</PhoneNo>{{/if}}{{#if inputs.InvoiceAddress.PhonePrefix}}\n <PhonePrefix>{{inputs.InvoiceAddress.PhonePrefix}}</PhonePrefix>{{/if}}\n </InvoiceAddress>\n <DeliveryAddress>{{#if inputs.DeliveryAddress.Id}}\n <Id>{{inputs.DeliveryAddress.Id}}</Id>{{/if}}{{#if inputs.DeliveryAddress.AddressName}}\n <AddressName>{{inputs.DeliveryAddress.AddressName}}</AddressName>{{/if}}{{#if inputs.DeliveryAddress.Street}}\n <Street>{{inputs.DeliveryAddress.Street}}</Street>{{/if}}{{#if inputs.DeliveryAddress.BuildingNumber}}\n <BuildingNumber>{{inputs.DeliveryAddress.BuildingNumber}}</BuildingNumber>{{/if}}{{#if inputs.DeliveryAddress.AddressLine1}}\n <AddressLine1>{{inputs.DeliveryAddress.AddressLine1}}</AddressLine1>{{/if}}{{#if inputs.DeliveryAddress.AddressLine2}}\n <AddressLine2>{{inputs.DeliveryAddress.AddressLine2}}</AddressLine2>{{/if}}{{#if inputs.DeliveryAddress.AddressLine3}}\n <AddressLine3>{{inputs.DeliveryAddress.AddressLine3}}</AddressLine3>{{/if}}{{#if inputs.DeliveryAddress.ZipCode}}\n <ZipCode>{{inputs.DeliveryAddress.ZipCode}}</ZipCode>{{/if}}{{#if inputs.DeliveryAddress.City}}\n <City>{{inputs.DeliveryAddress.City}}</City>{{/if}}{{#if inputs.DeliveryAddress.Country}}\n <Country>{{inputs.DeliveryAddress.Country}}</Country>{{/if}}{{#if inputs.PickupAddress.Email}}\n <Email>{{inputs.DeliveryAddress.Email}}</Email>{{/if}}{{#if inputs.DeliveryAddress.PhoneNo}}\n <PhoneNo>{{inputs.DeliveryAddress.PhoneNo}}</PhoneNo>{{/if}}{{#if inputs.DeliveryAddress.PhonePrefix}}\n <PhonePrefix>{{inputs.DeliveryAddress.PhonePrefix}}</PhonePrefix>{{/if}}\n </DeliveryAddress>\n <PickupAddress>{{~#if inputs.PickupAddress.Id}}\n <Id>{{inputs.PickupAddress.Id}}</Id>{{/if}}{{#if inputs.PickupAddress.AddressName}}\n <AddressName>{{inputs.PickupAddress.AddressName}}</AddressName>{{/if}}{{#if inputs.PickupAddress.Street}}\n <Street>{{inputs.PickupAddress.Street}}</Street>{{/if}}{{#if inputs.PickupAddress.BuildingNumber}}\n <BuildingNumber>{{inputs.PickupAddress.BuildingNumber}}</BuildingNumber>{{/if}}{{#if inputs.PickupAddress.AddressLine1}}\n <AddressLine1>{{inputs.PickupAddress.AddressLine1}}</AddressLine1>{{/if}}{{#if inputs.PickupAddress.AddressLine2}}\n <AddressLine2>{{inputs.PickupAddress.AddressLine2}}</AddressLine2>{{/if}}{{#if inputs.PickupAddress.AddressLine3}}\n <AddressLine3>{{inputs.PickupAddress.AddressLine3}}</AddressLine3>{{/if}}{{#if inputs.PickupAddress.ZipCode}}\n <ZipCode>{{inputs.PickupAddress.ZipCode}}</ZipCode>{{/if}}{{#if inputs.PickupAddress.City}}\n <City>{{inputs.PickupAddress.City}}</City>{{/if}}{{#if inputs.PickupAddress.Country}}\n <Country>{{inputs.PickupAddress.Country}}</Country>{{/if}}{{#if inputs.PickupAddress.Email}}\n <Email>{{inputs.PickupAddress.Email}}</Email>{{/if}}{{#if inputs.PickupAddress.PhoneNo}}\n <PhoneNo>{{inputs.PickupAddress.PhoneNo}}</PhoneNo>{{/if}}{{#if inputs.PickupAddress.PhonePrefix}}\n <PhonePrefix>{{inputs.PickupAddress.PhonePrefix}}</PhonePrefix>{{/if}}\n </PickupAddress>\n <CustomerContact>\n <UserId>{{inputs.CustomerContact.UserId}}</UserId>\n <FirstName>{{inputs.CustomerContact.FirstName}}</FirstName>\n <LastName>{{inputs.CustomerContact.LastName}}</LastName>\n <MobilePhonePrefix>{{inputs.CustomerContact.MobilePhonePrefix}}</MobilePhonePrefix>\n <MobilePhone>{{inputs.CustomerContact.MobilePhone}}</MobilePhone>{{#if inputs.CustomerContact.BusinessPhonePrefix}}\n <BusinessPhonePrefix>{{inputs.CustomerContact.BusinessPhonePrefix}}</BusinessPhonePrefix>{{/if}}{{#if inputs.CustomerContact.BusinessPhone}}\n <BusinessPhone>{{inputs.CustomerContact.BusinessPhone}}</BusinessPhone>{{/if}}\n <Email>{{inputs.CustomerContact.Email}}</Email>\n </CustomerContact>\n <OrderInfo>{{#if inputs.StandardPrice}}\n <StandardPrice>{{toFixed inputs.StandardPrice 2}}</StandardPrice>{{/if}}\n <MarginProfile>{{inputs.MarginProfile}}</MarginProfile>{{#if inputs.SpecialCondition}}\n <SpecialCondition>{{inputs.SpecialCondition}}</SpecialCondition>{{/if}}{{#if inputs.ClientMarkup}}\n <ClientMarkup>{{toFixed inputs.ClientMarkup 2}}</ClientMarkup>{{/if}}{{#if inputs.SmallOrderMarkup}}\n <SmallOrderMarkup>{{toFixed inputs.SmallOrderMarkup 2}}</SmallOrderMarkup>{{/if}}{{#if inputs.ClientPrice}}\n <ClientPrice>{{toFixed inputs.ClientPrice 2}}</ClientPrice>{{/if}}{{#if inputs.DeliveryAdjustment}}\n <DeliveryAdjustment>{{toFixed inputs.DeliveryAdjustment 2}}</DeliveryAdjustment>{{/if}}{{#if inputs.DiscountedPercentage}}\n <DiscountedPercentage>{{toFixed inputs.DiscountedPercentage 2}}</DiscountedPercentage>{{/if}}{{#if inputs.ClientDiscount}}\n <ClientDiscount>{{toFixed inputs.ClientDiscount 2}}</ClientDiscount>{{/if}}\n <ShippingCostAllocationEnabled>{{inputs.ShippingCostAllocationEnabled}}</ShippingCostAllocationEnabled>{{#if inputs.PackagingCost}}\n <PackagingCost>{{toFixed inputs.PackagingCost 2}}</PackagingCost>{{/if}}{{#if inputs.ShippingCost}}\n <ShippingCost>{{toFixed inputs.ShippingCost 2}}</ShippingCost>{{/if}}{{#if inputs.TotalExcludingVatPrice}}\n <TotalExcludingVatPrice>{{toFixed inputs.TotalExcludingVatPrice 2}}</TotalExcludingVatPrice>{{/if}}{{#if inputs.VatPercentage}}\n <VatPercentage>{{toFixed inputs.VatPercentage 2}}</VatPercentage>{{/if}}{{#if inputs.VatPrice}}\n <VatPrice>{{toFixed inputs.VatPrice 2}}</VatPrice>{{/if}}{{#if inputs.TotalAmount}}\n <TotalAmount>{{toFixed inputs.TotalAmount 2}}</TotalAmount>{{/if}}{{#if inputs.PaymentMethod}}\n <PaymentMethod>{{inputs.PaymentMethod}}</PaymentMethod>{{/if}}\n <DeliveryOption>{{inputs.DeliveryOption}}</DeliveryOption>{{#if inputs.DeliveryType}}\n <DeliveryType>{{inputs.DeliveryType}}</DeliveryType>{{/if}}{{#if inputs.CouponRate}}\n <CouponRate>{{inputs.CouponRate}}</CouponRate>{{/if}}{{#if inputs.CouponPrice}}\n <CouponPrice>{{inputs.CouponPrice}}</CouponPrice>{{/if}}{{#if inputs.PaymentStatus}}\n <PaymentStatus>{{inputs.PaymentStatus}}</PaymentStatus>{{/if}}\n <SpecialNote>{{inputs.SpecialNote}}</SpecialNote>\n <OrderDate>{{inputs.OrderDate}}</OrderDate>\n <ValidUntil>{{inputs.ValidUntil}}</ValidUntil>\n </OrderInfo>\n <CustomerOrderPositions>\n {{#each inputs.CustomerOrderPositions~}}\n <CustomerOrderPosition>\n <ProjectId>{{this.ProjectId}}</ProjectId>\n <ProjectName>{{this.ProjectName}}</ProjectName>\n <DeliveryDate>{{this.DeliveryDate}}</DeliveryDate>\n <Quotes>\n <PackageInformation>\n <PackageName>{{this.Quotes.PackageInformation.PackageName}}</PackageName>\n <NumberOfUniqueParts>{{toFixed this.Quotes.PackageInformation.NumberOfUniqueParts 2}}</NumberOfUniqueParts>\n <AvailableWeight>{{toFixed this.Quotes.PackageInformation.AvailableWeight 2}}</AvailableWeight>\n <UsedWeight>{{toFixed this.Quotes.PackageInformation.UsedWeight 2}}</UsedWeight>\n <QuantityOfAllParts>{{toFixed this.Quotes.PackageInformation.QuantityOfAllParts 2}}</QuantityOfAllParts>\n <PackageQuantity>{{toFixed this.Quotes.PackageInformation.PackageQuantity 2}}</PackageQuantity>\n </PackageInformation>\n {{#each this.Quotes.Assembly~}}\n <Assembly>\n <QuoteId>{{this.QuoteId}}</QuoteId>\n <FileName>{{this.FileName}}</FileName>\n <OriginalFileName>{{this.OriginalFileName}}</OriginalFileName>\n <AssemblyQuantity>{{toFixed this.AssemblyQuantity 2}}</AssemblyQuantity>\n <Sales>{{#unless (eq this.Sales.TotalPriceCuttingWorkPreparation null)}}\n <TotalPriceCuttingWorkPreparation>{{toFixed this.Sales.TotalPriceCuttingWorkPreparation 2}}</TotalPriceCuttingWorkPreparation>{{/unless}}{{#unless (eq this.Sales.TotalPriceCuttingProcessing null)}}\n <TotalPriceCuttingProcessing>{{toFixed this.Sales.TotalPriceCuttingProcessing 2}}</TotalPriceCuttingProcessing>{{/unless}}{{#unless (eq this.Sales.TotalPriceCuttingSorting null)}}\n <TotalPriceCuttingSorting>{{toFixed this.Sales.TotalPriceCuttingSorting 2}}</TotalPriceCuttingSorting>{{/unless}}{{#unless (eq this.Sales.TotalPriceCuttingProgramming null)}}\n <TotalPriceCuttingProgramming>{{toFixed this.Sales.TotalPriceCuttingProgramming 2}}</TotalPriceCuttingProgramming>{{/unless}}{{#unless (eq this.Sales.TotalPriceCuttingSheetLoading null)}}\n <TotalPriceCuttingSheetLoading>{{toFixed this.Sales.TotalPriceCuttingSheetLoading 2}}</TotalPriceCuttingSheetLoading>{{/unless}}{{#unless (eq this.Sales.TotalPriceCuttingOperating null)}}\n <TotalPriceCuttingOperating>{{toFixed this.Sales.TotalPriceCuttingOperating 2}}</TotalPriceCuttingOperating>{{/unless}}{{#unless (eq this.Sales.MarkupCuttingSorting null)}}\n <MarkupCuttingSorting>{{toFixed this.Sales.MarkupCuttingSorting 2}}</MarkupCuttingSorting>{{/unless}}{{#unless (eq this.Sales.MarkupCuttingProcessing null)}}\n <MarkupCuttingProcessing>{{toFixed this.Sales.MarkupCuttingProcessing 2}}</MarkupCuttingProcessing>{{/unless}}{{#unless (eq this.Sales.MarkupCuttingWorkPreparation null)}}\n <MarkupCuttingWorkPreparation>{{toFixed this.Sales.MarkupCuttingWorkPreparation 2}}</MarkupCuttingWorkPreparation>{{/unless}}{{#unless (eq this.Sales.MarkupCuttingSheetLoading null)}}\n <MarkupCuttingSheetLoading>{{toFixed this.Sales.MarkupCuttingSheetLoading 2}}</MarkupCuttingSheetLoading>{{/unless}}{{#unless (eq this.Sales.MarkupCuttingOperator null)}}\n <MarkupCuttingOperator>{{toFixed this.Sales.MarkupCuttingOperator 2}}</MarkupCuttingOperator>{{/unless}}{{#unless (eq this.Sales.MarkupCuttingProgramming null)}}\n <MarkupCuttingProgramming>{{toFixed this.Sales.MarkupCuttingProgramming 2}}</MarkupCuttingProgramming>{{/unless}}{{#unless (eq this.Sales.TotalPriceBendingOperation null)}}\n <TotalPriceBendingOperation>{{toFixed this.Sales.TotalPriceBendingOperation 2}}</TotalPriceBendingOperation>{{/unless}}{{#unless (eq this.Sales.MarkupBendingOperation null)}}\n <MarkupBendingOperation>{{toFixed this.Sales.MarkupBendingOperation 2}}</MarkupBendingOperation>{{/unless}}{{#unless (eq this.Sales.TotalPriceMaterial null)}}\n <TotalPriceMaterial>{{toFixed this.Sales.TotalPriceMaterial 2}}</TotalPriceMaterial>{{/unless}}{{#unless (eq this.Sales.TotalPriceMaterialCertification null)}}\n <TotalPriceMaterialCertification>{{toFixed this.Sales.TotalPriceMaterialCertification 2}}</TotalPriceMaterialCertification>{{/unless}}{{#unless (eq this.Sales.TotalMaterialCosts null)}}\n <TotalMaterialCosts>{{toFixed this.Sales.TotalMaterialCosts 2}}</TotalMaterialCosts>{{/unless}}{{#unless (eq this.Sales.TotalMaterialCertificateCosts null)}}\n <TotalMaterialCertificateCosts>{{toFixed this.Sales.TotalMaterialCertificateCosts 2}}</TotalMaterialCertificateCosts>{{/unless}}{{#unless (eq this.Sales.MarkupMaterial null)}}\n <MarkupMaterial>{{toFixed this.Sales.MarkupMaterial 2}}</MarkupMaterial>{{/unless}}{{#unless (eq this.Sales.MarkupMaterialCertification null)}}\n <MarkupMaterialCertification>{{toFixed this.Sales.MarkupMaterialCertification 2}}</MarkupMaterialCertification>{{/unless}}{{#unless (eq this.Sales.TotalPriceBrushingOperation null)}}\n <TotalPriceBrushingOperation>{{toFixed this.Sales.TotalPriceBrushingOperation 2}}</TotalPriceBrushingOperation>{{/unless}}{{#unless (eq this.Sales.TotalSalesPriceOriginal null)}}\n <TotalSalesPriceOriginal>{{toFixed this.Sales.TotalSalesPriceOriginal 2}}</TotalSalesPriceOriginal>{{/unless}}{{#unless (eq this.Sales.TotalSalesPriceFinal null)}}\n <TotalSalesPriceFinal>{{toFixed this.Sales.TotalSalesPriceFinal 2}}</TotalSalesPriceFinal>{{/unless}}{{#unless (eq this.Sales.MarkupDiscountFinal null)}}\n <MarkupDiscountFinal>{{toFixed this.Sales.MarkupDiscountFinal 2}}</MarkupDiscountFinal>{{/unless}}{{#unless (eq this.Sales.StandardPrice null)}}\n <StandardPrice>{{toFixed this.Sales.StandardPrice 2}}</StandardPrice>{{/unless}}{{#unless (eq this.Sales.SpecialCondition null)}}\n <SpecialCondition>{{toFixed this.Sales.SpecialCondition 2}}</SpecialCondition>{{/unless}}{{#unless (eq this.Sales.ClientMarkup null)}}\n <ClientMarkup>{{toFixed this.Sales.ClientMarkup 2}}</ClientMarkup>{{/unless}}{{#unless (eq this.Sales.SmallOrderMarkup null)}}\n <SmallOrderMarkup>{{toFixed this.Sales.SmallOrderMarkup 2}}</SmallOrderMarkup>{{/unless}}{{#unless (eq this.Sales.ClientPrice null)}}\n <ClientPrice>{{toFixed this.Sales.ClientPrice 2}}</ClientPrice>{{/unless}}{{#unless (eq this.Sales.ClientPriceInSystemCurrency null)}}\n <ClientPriceInSystemCurrency>{{toFixed this.Sales.ClientPriceInSystemCurrency 2}}</ClientPriceInSystemCurrency>{{/unless}}{{#unless (eq this.Sales.DeliveryAdjustment null)}}\n <DeliveryAdjustment>{{toFixed this.Sales.DeliveryAdjustment 2}}</DeliveryAdjustment>{{/unless}}{{#unless (eq this.Sales.FinalPrice null)}}\n <FinalPrice>{{toFixed this.Sales.FinalPrice 2}}</FinalPrice>{{/unless}}{{#unless (eq this.Sales.RedesignPriceForPart null)}}\n <RedesignPriceForPart>{{toFixed this.Sales.RedesignPriceForPart 2}}</RedesignPriceForPart>{{/unless}}\n </Sales>\n <Parts>{{#each this.Parts.Part}}\n <Part>\n <Warnings>\n {{~#each this.Part.Warnings.Warning~}}\n <Warning>\n <Code>{{this.Code}}</Code>\n <Description>{{this.Description}}</Description>\n </Warning>\n {{~/each~}}\n </Warnings>\n <PartDetails>\n <PartType>{{this.Part.PartInformation.PartType}}</PartType>\n <PartQuantity>{{toFixed this.Part.PartInformation.PartQuantity 2}}</PartQuantity>\n <DimensionSizeX>{{toFixed this.Part.PartInformation.DimensionSizeX 2}}</DimensionSizeX>\n <DimensionSizeY>{{toFixed this.Part.PartInformation.DimensionSizeY 2}}</DimensionSizeY>\n <DimensionSizeZ>{{toFixed this.Part.PartInformation.DimensionSizeZ 2}}</DimensionSizeZ>\n <VolumePerPart>{{toFixed this.Part.PartInformation.VolumePerPart 2}}</VolumePerPart>\n <WeightPerPart>{{toFixed this.Part.PartInformation.WeightPerPart 2}}</WeightPerPart>\n <TotalPartWeight>{{toFixed this.Part.PartInformation.TotalPartWeight 2}}</TotalPartWeight>\n <AreaNetPerPart>{{toFixed this.Part.PartInformation.AreaNetPerPart 2}}</AreaNetPerPart>\n <GenerateFileName>{{this.Part.PartInformation.GenerateFileName}}</GenerateFileName>\n </PartDetails>\n <Material>\n <MaterialFormat>{{this.Part.Material.SheetFormat}}</MaterialFormat>\n <MaterialType>{{this.Part.Material.MaterialType}}</MaterialType>\n <GrindedMaterial>{{this.Part.Material.GrindedMaterial}}</GrindedMaterial>\n <MaterialThickness>{{toFixed this.Part.Material.MaterialThickness 2}}</MaterialThickness>\n <ArticleCode>{{this.Part.Material.ExternalMaterialId}}</ArticleCode>\n <ExternalMaterialId>{{this.Part.Material.ExternalMaterialId}}</ExternalMaterialId>\n <MaterialCertificate>{{this.Part.Material.MaterialCertificate}}</MaterialCertificate>\n <MaterialCostPerUnit>{{toFixed this.Part.Material.MaterialCostPerUnit 2}}</MaterialCostPerUnit>{{#if this.Part.Material.MaterialCostPerUnitM}}\n <MaterialCostPerUnitM>{{this.Part.Material.MaterialCostPerUnitM}}</MaterialCostPerUnitM>{{/if}}\n <MaterialPriceUnit>{{this.Part.Material.MaterialPriceUnit}}</MaterialPriceUnit>\n </Material>\n <Sales>{{#unless (eq this.Part.Sales.TotalPriceCuttingWorkPreparation null)}}\n <TotalPriceCuttingWorkPreparation>{{toFixed this.Part.Sales.TotalPriceCuttingWorkPreparation 2}}</TotalPriceCuttingWorkPreparation>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceCuttingProcessing null)}}\n <TotalPriceCuttingProcessing>{{toFixed this.Part.Sales.TotalPriceCuttingProcessing 2}}</TotalPriceCuttingProcessing>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceCuttingSorting null)}}\n <TotalPriceCuttingSorting>{{toFixed this.Part.Sales.TotalPriceCuttingSorting 2}}</TotalPriceCuttingSorting>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceCuttingProgramming null)}}\n <TotalPriceCuttingProgramming>{{toFixed this.Part.Sales.TotalPriceCuttingProgramming 2}}</TotalPriceCuttingProgramming>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceCuttingSheetLoading null)}}\n <TotalPriceCuttingSheetLoading>{{toFixed this.Part.Sales.TotalPriceCuttingSheetLoading 2}}</TotalPriceCuttingSheetLoading>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceCuttingOperating null)}}\n <TotalPriceCuttingOperating>{{toFixed this.Part.Sales.TotalPriceCuttingOperating 2}}</TotalPriceCuttingOperating>{{/unless}}{{#unless (eq this.Part.Sales.MarkupCuttingSorting null)}}\n <MarkupCuttingSorting>{{toFixed this.Part.Sales.MarkupCuttingSorting 2}}</MarkupCuttingSorting>{{/unless}}{{#unless (eq this.Part.Sales.MarkupCuttingProcessing null)}}\n <MarkupCuttingProcessing>{{toFixed this.Part.Sales.MarkupCuttingProcessing 2}}</MarkupCuttingProcessing>{{/unless}}{{#unless (eq this.Part.Sales.MarkupCuttingWorkPreparation null)}}\n <MarkupCuttingWorkPreparation>{{toFixed this.Part.Sales.MarkupCuttingWorkPreparation 2}}</MarkupCuttingWorkPreparation>{{/unless}}{{#unless (eq this.Part.Sales.MarkupCuttingSheetLoading null)}}\n <MarkupCuttingSheetLoading>{{toFixed this.Part.Sales.MarkupCuttingSheetLoading 2}}</MarkupCuttingSheetLoading>{{/unless}}{{#unless (eq this.Part.Sales.MarkupCuttingOperator null)}}\n <MarkupCuttingOperator>{{toFixed this.Part.Sales.MarkupCuttingOperator 2}}</MarkupCuttingOperator>{{/unless}}{{#unless (eq this.Part.Sales.MarkupCuttingProgramming null)}}\n <MarkupCuttingProgramming>{{toFixed this.Part.Sales.MarkupCuttingProgramming 2}}</MarkupCuttingProgramming>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceBendingOperation null)}}\n <TotalPriceBendingOperation>{{toFixed this.Part.Sales.TotalPriceBendingOperation 2}}</TotalPriceBendingOperation>{{/unless}}{{#unless (eq this.Part.Sales.MarkupBendingOperation null)}}\n <MarkupBendingOperation>{{toFixed this.Part.Sales.MarkupBendingOperation 2}}</MarkupBendingOperation>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceMaterial null)}}\n <TotalPriceMaterial>{{toFixed this.Part.Sales.TotalPriceMaterial 2}}</TotalPriceMaterial>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceMaterialCertification null)}}\n <TotalPriceMaterialCertification>{{toFixed this.Part.Sales.TotalPriceMaterialCertification 2}}</TotalPriceMaterialCertification>{{/unless}}{{#unless (eq this.Part.Sales.TotalMaterialCosts null)}}\n <TotalMaterialCosts>{{toFixed this.Part.Sales.TotalMaterialCosts 2}}</TotalMaterialCosts>{{/unless}}{{#unless (eq this.Part.Sales.TotalMaterialCertificateCosts null)}}\n <TotalMaterialCertificateCosts>{{toFixed this.Part.Sales.TotalMaterialCertificateCosts 2}}</TotalMaterialCertificateCosts>{{/unless}}{{#unless (eq this.Part.Sales.MarkupMaterial null)}}\n <MarkupMaterial>{{toFixed this.Part.Sales.MarkupMaterial 2}}</MarkupMaterial>{{/unless}}{{#unless (eq this.Part.Sales.MarkupMaterialCertification null)}}\n <MarkupMaterialCertification>{{toFixed this.Part.Sales.MarkupMaterialCertification 2}}</MarkupMaterialCertification>{{/unless}}{{#unless (eq this.Part.Sales.TotalPriceBrushingOperation null)}}\n <TotalPriceBrushingOperation>{{toFixed this.Part.Sales.TotalPriceBrushingOperation 2}}</TotalPriceBrushingOperation>{{/unless}}{{#unless (eq this.Part.Sales.TotalSalesPriceOriginal null)}}\n <TotalSalesPriceOriginal>{{toFixed this.Part.Sales.TotalSalesPriceOriginal 2}}</TotalSalesPriceOriginal>{{/unless}}{{#unless (eq this.Part.Sales.TotalSalesPriceFinal null)}}\n <TotalSalesPriceFinal>{{toFixed this.Part.Sales.TotalSalesPriceFinal 2}}</TotalSalesPriceFinal>{{/unless}}{{#unless (eq this.Part.Sales.MarkupDiscountFinal null)}}\n <MarkupDiscountFinal>{{toFixed this.Part.Sales.MarkupDiscountFinal 2}}</MarkupDiscountFinal>{{/unless}}{{#unless (eq this.Part.Sales.StandardPrice null)}}\n <StandardPrice>{{toFixed this.Part.Sales.StandardPrice 2}}</StandardPrice>{{/unless}}{{#unless (eq this.Part.Sales.SpecialCondition null)}}\n <SpecialCondition>{{toFixed this.Part.Sales.SpecialCondition 2}}</SpecialCondition>{{/unless}}{{#unless (eq this.Part.Sales.ClientMarkup null)}}\n <ClientMarkup>{{toFixed this.Part.Sales.ClientMarkup 2}}</ClientMarkup>{{/unless}}{{#unless (eq this.Part.Sales.SmallOrderMarkup null)}}\n <SmallOrderMarkup>{{toFixed this.Part.Sales.SmallOrderMarkup 2}}</SmallOrderMarkup>{{/unless}}{{#unless (eq this.Part.Sales.ClientPrice null)}}\n <ClientPrice>{{toFixed this.Part.Sales.ClientPrice 2}}</ClientPrice>{{/unless}}{{#unless (eq this.Part.Sales.ClientPriceInSystemCurrency null)}}\n <ClientPriceInSystemCurrency>{{toFixed this.Part.Sales.ClientPriceInSystemCurrency 2}}</ClientPriceInSystemCurrency>{{/unless}}{{#unless (eq this.Part.Sales.DeliveryAdjustment null)}}\n <DeliveryAdjustment>{{toFixed this.Part.Sales.DeliveryAdjustment 2}}</DeliveryAdjustment>{{/unless}}{{#unless (eq this.Part.Sales.FinalPrice null)}}\n <FinalPrice>{{toFixed this.Part.Sales.FinalPrice 2}}</FinalPrice>{{/unless}}{{#unless (eq this.Part.Sales.RedesignPriceForPart null)}}\n <RedesignPriceForPart>{{toFixed this.Part.Sales.RedesignPriceForPart 2}}</RedesignPriceForPart>{{/unless}}\n </Sales>{{#if this.Part.LaserCutting}}\n <LaserCutting>{{#if this.Part.LaserCutting.OperationCode}}\n <OperationCode>{{this.Part.LaserCutting.OperationCode}}</OperationCode>{{/if}}{{#if this.Part.LaserCutting.OperationName}}\n <OperationName>{{this.Part.LaserCutting.OperationName}}</OperationName>{{/if}}\n <CuttingQuality>{{this.Part.LaserCutting.CuttingQuality}}</CuttingQuality>\n <CostPerHour>{{toFixed this.Part.LaserCutting.CostPerHour 2}}</CostPerHour>\n <TotalTimeOperator>{{toFixed this.Part.LaserCutting.TotalTimeOperator 2}}</TotalTimeOperator>\n <TotalTimeWorkPreparation>{{toFixed this.Part.LaserCutting.TotalTimeWorkPreparation 2}}</TotalTimeWorkPreparation>\n <TotalTimeProgramming>{{toFixed this.Part.LaserCutting.TotalTimeProgramming 2}}</TotalTimeProgramming>\n <TotalTimeCuttingProcessing>{{toFixed this.Part.LaserCutting.TotalTimeCuttingProcessing 2}}</TotalTimeCuttingProcessing>\n <TotalTimeSorting>{{toFixed this.Part.LaserCutting.TotalTimeSorting 2}}</TotalTimeSorting>\n <TotalTimePiercing>{{toFixed this.Part.LaserCutting.TotalTimePiercing 2}}</TotalTimePiercing>\n <TotalTimeSheetLoading>{{toFixed this.Part.LaserCutting.TotalTimeSheetLoading 2}}</TotalTimeSheetLoading>\n <TotalTimeCutting>{{toFixed this.Part.LaserCutting.TotalTimeCutting 2}}</TotalTimeCutting>\n <TotalCostOperator>{{toFixed this.Part.LaserCutting.TotalCostOperator 2}}</TotalCostOperator>\n <TotalWorkPreparationCost>{{toFixed this.Part.LaserCutting.TotalWorkPreparationCost 2}}</TotalWorkPreparationCost>\n <TotalCostProgramming>{{toFixed this.Part.LaserCutting.TotalCostProgramming 2}}</TotalCostProgramming>\n <TotalCostProcessing>{{toFixed this.Part.LaserCutting.TotalCostProcessing 2}}</TotalCostProcessing>\n <TotalCostSheetLoading>{{toFixed this.Part.LaserCutting.TotalCostSheetLoading 2}}</TotalCostSheetLoading>\n <TotalCostSorting>{{toFixed this.Part.LaserCutting.TotalCostSorting 2}}</TotalCostSorting>\n <TotalCostCuttingOperation>{{toFixed this.Part.LaserCutting.TotalCostCuttingOperation 2}}</TotalCostCuttingOperation>\n </LaserCutting>{{/if}}{{#if this.Part.LaserCuttingTube}}\n <LaserCuttingTube>{{#if this.Part.LaserCuttingTube.OperationCode}}\n <OperationCode>{{this.Part.LaserCuttingTube.OperationCode}}</OperationCode>{{/if}}{{#if this.Part.LaserCuttingTube.OperationName}}\n <OperationName>{{this.Part.LaserCuttingTube.OperationName}}</OperationName>{{/if}}\n <CuttingQuality>{{this.Part.LaserCuttingTube.CuttingQuality}}</CuttingQuality>\n <CostPerHour>{{toFixed this.Part.LaserCuttingTube.CostPerHour 2}}</CostPerHour>\n <TotalTimeSetup>{{toFixed this.Part.LaserCuttingTube.TotalTimeSetup 2}}</TotalTimeSetup>\n <TotalTimeCuttingProcessing>{{toFixed this.Part.LaserCuttingTube.TotalTimeCuttingProcessing 2}}</TotalTimeCuttingProcessing>\n <TotalTimePiercing>{{toFixed this.Part.LaserCuttingTube.TotalTimePiercing 2}}</TotalTimePiercing>\n <TotalTimeTubeLoading>{{toFixed this.Part.LaserCuttingTube.TotalTimeTubeLoading 2}}</TotalTimeTubeLoading>\n <TotalTimeTubeUnloading>{{toFixed this.Part.LaserCuttingTube.TotalTimeTubeUnloading 2}}</TotalTimeTubeUnloading>\n <TotalTimeTubeMeasurement>{{toFixed this.Part.LaserCuttingTube.TotalTimeTubeMeasurement 2}}</TotalTimeTubeMeasurement>\n <TotalTimeTubeTransporting>{{toFixed this.Part.LaserCuttingTube.TotalTimeTubeTransporting 2}}</TotalTimeTubeTransporting>\n <TotalTimeCutting>{{toFixed this.Part.LaserCuttingTube.TotalTimeCutting 2}}</TotalTimeCutting>\n <TotalCostSetup>{{toFixed this.Part.LaserCuttingTube.TotalCostSetup 2}}</TotalCostSetup>\n <TotalCostProcessing>{{toFixed this.Part.LaserCuttingTube.TotalCostProcessing 2}}</TotalCostProcessing>\n <TotalCostTubeLoading>{{toFixed this.Part.LaserCuttingTube.TotalCostTubeLoading 2}}</TotalCostTubeLoading>\n <TotalCostCuttingOperation>{{toFixed this.Part.LaserCuttingTube.TotalCostCuttingOperation 2}}</TotalCostCuttingOperation>\n </LaserCuttingTube>{{/if}}{{#if this.Part.Brushing}}\n <Brushing>\n <OperationCode>{{this.Part.Brushing.OperationCode}}</OperationCode>\n <OperationName>{{this.Part.Brushing.OperationName}}</OperationName>\n <TotalTimeBrushingOperation>{{this.Part.Brushing.TotalTimeBrushingOperation}}</TotalTimeBrushingOperation>\n <CostPerHour>{{this.Part.Brushing.CostPerHour}}</CostPerHour>\n <TotalPriceBrushingOperation>{{this.Part.Brushing.TotalPriceBrushingOperation}}</TotalPriceBrushingOperation>\n </Brushing>{{/if}}{{#if this.Part.Bending}}\n <Bending>\n <OperationCode>{{this.Part.Bending.OperationCode}}</OperationCode>\n <OperationName>{{this.Part.Bending.OperationName}}</OperationName>\n <CostPerBendingHour>{{this.Part.Bending.CostPerBendingHour}}</CostPerBendingHour>\n <CostPerHelpingBendingHour>{{this.Part.Bending.CostPerHelpingBendingHour}}</CostPerHelpingBendingHour>\n <HasHelpingBending>{{this.Part.Bending.HasHelpingBending}}</HasHelpingBending>\n <TotalTimeBendingRotating>{{this.Part.Bending.TotalTimeBendingRotating}}</TotalTimeBendingRotating>\n <TotalTimeBendingFlipping>{{this.Part.Bending.TotalTimeBendingFlipping}}</TotalTimeBendingFlipping>\n <HelpingTime>{{this.Part.Bending.HelpingTime}}</HelpingTime>\n <TotalTimeBending>{{this.Part.Bending.TotalTimeBending}}</TotalTimeBending>\n <BendingSetupTimePerPart>{{this.Part.Bending.BendingSetupTimePerPart}}</BendingSetupTimePerPart>\n <TotalTimeBendingOperation>{{this.Part.Bending.TotalTimeBendingOperation}}</TotalTimeBendingOperation>\n <TotalCostBendingSetup>{{this.Part.Bending.TotalCostBendingSetup}}</TotalCostBendingSetup>\n <TotalCostBendingRotating>{{this.Part.Bending.TotalCostBendingRotating}}</TotalCostBendingRotating>\n <TotalCostBendingFlipping>{{this.Part.Bending.TotalCostBendingFlipping}}</TotalCostBendingFlipping>\n <TotalCostBendingProcess>{{this.Part.Bending.TotalCostBendingProcess}}</TotalCostBendingProcess>\n <TotalCostBendingHelping>{{this.Part.Bending.TotalCostBendingHelping}}</TotalCostBendingHelping>\n <TotalCostBendingOperation>{{this.Part.Bending.TotalCostBendingOperation}}</TotalCostBendingOperation>\n </Bending>{{/if}}{{#if this.Part.Rolling}}\n <Rolling>\n <OperationCode>{{this.Part.Rolling.OperationCode}}</OperationCode>\n <OperationName>{{this.Part.Rolling.OperationName}}</OperationName>\n <RollNumber>{{this.Part.Rolling.RollNumber}}</RollNumber>\n <RollingTime>{{this.Part.Rolling.RollingTime}}</RollingTime>\n <RollingTime1>{{this.Part.Rolling.RollingTime1}}</RollingTime1>\n <RollingTime2>{{this.Part.Rolling.RollingTime2}}</RollingTime2>\n <NeutralAxisLength>{{this.Part.Rolling.NeutralAxisLength}}</NeutralAxisLength>\n <TotalRollingTime>{{this.Part.Rolling.TotalRollingTime}}</TotalRollingTime>\n <SumOfRollingTime1>{{this.Part.Rolling.SumOfRollingTime1}}</SumOfRollingTime1>\n <SumOfRollingTime2>{{this.Part.Rolling.SumOfRollingTime2}}</SumOfRollingTime2>\n <MatFactor>{{this.Part.Rolling.MatFactor}}</MatFactor>\n <HelpingTime>{{this.Part.Rolling.HelpingTime}}</HelpingTime>\n <SetupTimePerPart>{{this.Part.Rolling.SetupTimePerPart}}</SetupTimePerPart>\n <TotalCostRollingOperation>{{this.Part.Rolling.TotalCostRollingOperation}}</TotalCostRollingOperation>\n </Rolling>{{/if}}{{#if this.Part.Countersink}}\n <Countersink>\n <OperationCode>{{this.Part.Countersink.OperationCode}}</OperationCode>\n <OperationName>{{this.Part.Countersink.OperationName}}</OperationName>\n <HoleNumberCountersinkPerPart>{{this.Part.Countersink.HoleNumberCountersinkPerPart}}</HoleNumberCountersinkPerPart>\n <HoleTotalNumberCountersinks>{{this.Part.Countersink.HoleTotalNumberCountersinks}}</HoleTotalNumberCountersinks>\n <HoleCountersinksCostPerHour>{{this.Part.Countersink.HoleCountersinksCostPerHour}}</HoleCountersinksCostPerHour>\n <HoleTotalTimeCountersinksToolSetup>{{this.Part.Countersink.HoleTotalTimeCountersinksToolSetup}}</HoleTotalTimeCountersinksToolSetup>\n <HoleTotalTimeCountersinksPreparation>{{this.Part.Countersink.HoleTotalTimeCountersinksPreparation}}</HoleTotalTimeCountersinksPreparation>\n <HoleTotalTimeCountersinksHandling>{{this.Part.Countersink.HoleTotalTimeCountersinksHandling}}</HoleTotalTimeCountersinksHandling>\n <HoleTotalTimeCountersinksProcessing>{{this.Part.Countersink.HoleTotalTimeCountersinksProcessing}}</HoleTotalTimeCountersinksProcessing>\n <TotalTimeToolCountersinkOperationHole>{{this.Part.Countersink.TotalTimeToolCountersinkOperationHole}}</TotalTimeToolCountersinkOperationHole>\n <HoleTotalCostsCountersinkToolSetup>{{this.Part.Countersink.HoleTotalCostsCountersinkToolSetup}}</HoleTotalCostsCountersinkToolSetup>\n <HoleTotalCostsCountersinkPreparation>{{this.Part.Countersink.HoleTotalCostsCountersinkPreparation}}</HoleTotalCostsCountersinkPreparation>\n <HoleTotalCostsCountersinkHandling>{{this.Part.Countersink.HoleTotalCostsCountersinkHandling}}</HoleTotalCostsCountersinkHandling>\n <HoleTotalCostsCountersinkProcessing>{{this.Part.Countersink.HoleTotalCostsCountersinkProcessing}}</HoleTotalCostsCountersinkProcessing>\n <HoleTotalCostCountersinkOperation>{{this.Part.Countersink.HoleTotalCostCountersinkOperation}}</HoleTotalCostCountersinkOperation>\n </Countersink>{{/if}}{{#if this.Part.Drilling}}\n <Drilling>\n <OperationCode>{{this.Part.Drilling.OperationCode}}</OperationCode>\n <OperationName>{{this.Part.Drilling.OperationName}}</OperationName>\n <NumberDrillingPerPart>{{this.Part.Drilling.NumberDrillingPerPart}}</NumberDrillingPerPart>\n <TotalNumberDrilling>{{this.Part.Drilling.TotalNumberDrilling}}</TotalNumberDrilling>\n <HoleDrillingCostPerHour>{{this.Part.Drilling.HoleDrillingCostPerHour}}</HoleDrillingCostPerHour>\n <TotalTimeToolSetupHole>{{this.Part.Drilling.TotalTimeToolSetupHole}}</TotalTimeToolSetupHole>\n <TotalTimeToolHandlingHole>{{this.Part.Drilling.TotalTimeToolHandlingHole}}</TotalTimeToolHandlingHole>\n <TotalTimeToolProcessingHole>{{this.Part.Drilling.TotalTimeToolProcessingHole}}</TotalTimeToolProcessingHole>\n <TotalTimeToolDrillingOperationHole>{{this.Part.Drilling.TotalTimeToolDrillingOperationHole}}</TotalTimeToolDrillingOperationHole>\n <TotalCostToolSetup>{{this.Part.Drilling.TotalCostToolSetup}}</TotalCostToolSetup>\n <TotalCostToolHandling>{{this.Part.Drilling.TotalCostToolHandling}}</TotalCostToolHandling>\n <TotalCostToolProcessing>{{this.Part.Drilling.TotalCostToolProcessing}}</TotalCostToolProcessing>\n <TotalCostToolDrillingOperation>{{this.Part.Drilling.TotalCostToolDrillingOperation}}</TotalCostToolDrillingOperation>\n </Drilling>{{/if}}{{#if this.Part.Tap}}\n <Tap>\n <OperationCode>{{this.Part.Tap.OperationCode}}</OperationCode>\n <OperationName>{{this.Part.Tap.OperationName}}</OperationName>\n <HoleNumberTappingPerPart>{{this.Part.Tap.HoleNumberTappingPerPart}}</HoleNumberTappingPerPart>\n <HoleTotalNumberTapping>{{this.Part.Tap.HoleTotalNumberTapping}}</HoleTotalNumberTapping>\n <HoleTappingCostPerHour>{{this.Part.Tap.HoleTappingCostPerHour}}</HoleTappingCostPerHour>\n <HoleTotalTimeTappingToolSetup>{{this.Part.Tap.HoleTotalTimeTappingToolSetup}}</HoleTotalTimeTappingToolSetup>\n <HoleTotalTimeTappingHandling>{{this.Part.Tap.HoleTotalTimeTappingHandling}}</HoleTotalTimeTappingHandling>\n <HoleTotalTimeTappingProcessing>{{this.Part.Tap.HoleTotalTimeTappingProcessing}}</HoleTotalTimeTappingProcessing>\n <TotalTimeToolTappingOperationHole>{{this.Part.Tap.TotalTimeToolTappingOperationHole}}</TotalTimeToolTappingOperationHole>\n <HoleTotalCostsTappingToolSetup>{{this.Part.Tap.HoleTotalCostsTappingToolSetup}}</HoleTotalCostsTappingToolSetup>\n <HoleTotalCostsTappingHandling>{{this.Part.Tap.HoleTotalCostsTappingHandling}}</HoleTotalCostsTappingHandling>\n <HoleTotalCostsTappingProcessing>{{this.Part.Tap.HoleTotalCostsTappingProcessing}}</HoleTotalCostsTappingProcessing>\n <HoleTotalCostTappingOperation>{{this.Part.Tap.HoleTotalCostTappingOperation}}</HoleTotalCostTappingOperation>\n <TotalCostHoleFinishingOperation>{{this.Part.Tap.TotalCostHoleFinishingOperation}}</TotalCostHoleFinishingOperation>\n <TotalPriceHoleFinishingOperation>{{this.Part.Tap.TotalPriceHoleFinishingOperation}}</TotalPriceHoleFinishingOperation>\n </Tap>{{/if}}\n </Part>{{/each}}\n </Parts>\n </Assembly>{{/each}}\n </Quotes>\n </CustomerOrderPosition>{{/each}}\n </CustomerOrderPositions>\n</CustomerOrder>\n";
7
+ constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
8
+ execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
9
+ }
@@ -0,0 +1,8 @@
1
+ import { ConnectorSDKInterface, HttpClientSDKInterface, IntervalHandler } from '@transai/connector-runtime-sdk';
2
+ import { ConnectorConfig } from '../types';
3
+ export declare class CapaciteitExtractorService implements IntervalHandler {
4
+ #private;
5
+ readonly name = "gpms-capaciteit-extractor";
6
+ constructor(sdk: ConnectorSDKInterface<ConnectorConfig>, httpClient: HttpClientSDKInterface);
7
+ onRun(): Promise<void>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { ConnectorSDKInterface, HttpClientSDKInterface, IntervalHandler } from '@transai/connector-runtime-sdk';
2
+ import { ConnectorConfig } from '../types';
3
+ export declare class PlanningExtractorService implements IntervalHandler {
4
+ #private;
5
+ constructor(sdk: ConnectorSDKInterface<ConnectorConfig>, httpClient: HttpClientSDKInterface);
6
+ readonly name = "gpms-planning-extractor";
7
+ onRun(): Promise<void>;
8
+ }
@@ -1,7 +1,10 @@
1
1
  import { BaseConnectorConfig } from '@transai/connector-runtime-sdk';
2
2
  export interface ConnectorConfig extends BaseConnectorConfig {
3
- endpointUrl: string;
3
+ orooxEndpointUrl: string;
4
+ extractorEndpointUrl: string;
4
5
  apiKey: string;
5
6
  webhooks?: boolean;
6
7
  port?: number | 3050;
8
+ planningIntervalSeconds?: number;
9
+ capaciteitIntervalSeconds?: number;
7
10
  }
@@ -0,0 +1,29 @@
1
+ import { ConnectorSDKInterface } from '@transai/connector-runtime-sdk';
2
+ import { Response } from 'express';
3
+ import { z } from 'zod';
4
+ import { ConnectorConfig } from './types';
5
+ export declare const orderStatusUpdateSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
6
+ OrderNumber: z.ZodString;
7
+ OrderStatusId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ orderNumber: z.ZodString;
10
+ orderStatusId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
11
+ }, z.core.$strip>]>, z.ZodTransform<{
12
+ orderId: string;
13
+ orderStatus: string;
14
+ }, {
15
+ OrderNumber: string;
16
+ OrderStatusId: string | number;
17
+ } | {
18
+ orderNumber: string;
19
+ orderStatusId: string | number;
20
+ }>>;
21
+ export declare const ORDER_STATUS_UPDATE_ACKNOWLEDGEMENT = "Request queued successfully.";
22
+ export declare const sendOrderStatusUpdateAcknowledgement: (res: Response) => void;
23
+ export declare class WebhookServer {
24
+ #private;
25
+ constructor(sdk: ConnectorSDKInterface<ConnectorConfig>);
26
+ init(): void;
27
+ start(): void;
28
+ stop(): void;
29
+ }
@@ -2,6 +2,7 @@ export interface HttpConfig {
2
2
  baseUrl?: string;
3
3
  contentType?: string;
4
4
  timeout?: number;
5
+ insecure?: boolean;
5
6
  }
6
7
  export type HttpRequestOptions<D = string | object> = {
7
8
  headers?: Record<string, string>;
@@ -28,6 +29,7 @@ export type HttpResponse<D = unknown> = {
28
29
  export type HttpError = {
29
30
  status: number;
30
31
  error?: string;
32
+ headers?: Record<string, HttpResponseHeader>;
31
33
  };
32
34
  interface PromiseWithReason<T = unknown, R = unknown> extends Promise<T> {
33
35
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: R) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
@@ -52,8 +52,8 @@ export interface ActionInterface {
52
52
  connectorIdentifier: string;
53
53
  config: {
54
54
  [key: string]: {
55
- [key: string]: string | object;
56
- } | string | object;
55
+ [key: string]: string | number | object;
56
+ } | string | number | object;
57
57
  };
58
58
  inputParameters: Array<InputParameterInterface>;
59
59
  outputParameters: LegacyOutputParameterInterface | OutputParameterInterface;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transai/connector-runner-gpms",
3
- "version": "0.19.0",
3
+ "version": "0.24.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,9 +11,10 @@
11
11
  "url": "https://transai.com"
12
12
  },
13
13
  "dependencies": {
14
- "express": "^4.0"
14
+ "express": "^4.0",
15
+ "form-data": "^4.0.5"
15
16
  },
16
17
  "type": "commonjs",
17
18
  "main": "./index.cjs",
18
19
  "typings": "./index.d.ts"
19
- }
20
+ }
@@ -1,9 +0,0 @@
1
- import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
- import { GpmsActionInterface } from './action.interface';
3
- export declare class CreateClientAction implements GpmsActionInterface {
4
- #private;
5
- readonly identifier = "create_client";
6
- readonly clientTemplate = "<Client>\n <ClientId>{{ id }}</ClientId>\n <CustomerNo>{{ number }}</CustomerNo>\n <Name>{{ name }}</Name>\n <ShortName>{{ name }}</ShortName>\n <BillingEmail>{{ email }}</BillingEmail>\n <DiscountValue>{{ discountValue }}</DiscountValue>\n <MarkupValue>{{ markupValue }}</MarkupValue>\n <Vatnumber>{{ vatNumber }}</Vatnumber>\n <IsVatException></IsVatException>\n <IsPrivate>false</IsPrivate>\n <IsActive>true</IsActive>\n <Blocked>false</Blocked>\n <NumberOfEmployees></NumberOfEmployees>\n <Industry>{{ industry }}</Industry>\n <TimeZone></TimeZone>\n <AnnualRevenue></AnnualRevenue>\n <PurchaseLimitPerOrder></PurchaseLimitPerOrder>\n <Website>{{ website }}</Website>\n <ExternalId>{{ externalId }}</ExternalId>\n <RegisterDate></RegisterDate>\n <ChangedAt></ChangedAt>\n\n {{ #if customerPaymentMethods }}\n <CustomerPaymentMethods>\n {{ #each customerPaymentMethods }}\n <CustomerPaymentMethod>{{ this }}</CustomerPaymentMethod>\n {{ /each }}\n </CustomerPaymentMethods>\n {{/if}}\n\n {{ #if customerAddresses }}\n <CustomerAddresses>\n {{ #each customerAddresses }}\n <CustomerAddress>\n <Id>{{ id }}</Id>\n <Name>{{ name }}</Name>\n <Street>{{ street }}</Street>\n <City>{{ city }}</City>\n <ZipCode>{{ zip }}</ZipCode>\n <Country>{{ country }}</Country>\n <BuildingNumber>{{ buildingNumber }}</BuildingNumber>\n {{ #if phoneNumber }}\n <PhonePrefix>{{ phonePrefix }}</PhonePrefix>\n <PhoneNumber>{{ phoneNumber }}</PhoneNumber>\n {{ /if }}\n <Email>{{ email }}</Email>\n <IsActive>true</IsActive>\n <IsDefault>true</IsDefault>\n </CustomerAddress>\n {{ ~/each }}\n </CustomerAddresses>\n {{/if}}\n\n {{#if users}}\n <Users>\n {{ #each users }}\n <User>\n <UserId>{{ id }}</UserId>\n <FirstName>{{ firstName }}</FirstName>\n <LastName>{{ lastName }}</LastName>\n <FullName>{{ firstName }} {{ lastName }}</FullName>\n <Email>{{ email }}</Email>\n <UserTitle>{{ title }}</UserTitle>\n <Blocked>false</Blocked>\n <IsPrimaryContact>true</IsPrimaryContact>\n <IsActive>true</IsActive>\n <CreatedAt></CreatedAt>\n <ChangedAt></ChangedAt>\n <JobPosition>{{ jobPosition }}</JobPosition>\n {{ #if phoneNumber }}\n <UserPhoneNumbers>\n <UserPhoneNumber>\n <PhoneType>{{ phoneType }}</PhoneType>\n <PhoneNumber>{{ phoneNumber }}</PhoneNumber>\n <PhonePrefix>{{ phonePrefix }}</PhonePrefix>\n </UserPhoneNumber>\n </UserPhoneNumbers>\n {{/if}}\n </User>\n {{ ~/each }}\n </Users>\n {{/if}}\n</Client>\n";
7
- constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
8
- execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
9
- }
@@ -1,8 +0,0 @@
1
- import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
- import { GpmsActionInterface } from './action.interface';
3
- export declare class CreateOrderAction implements GpmsActionInterface {
4
- #private;
5
- readonly identifier = "create_order";
6
- constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
- }
@@ -1,9 +0,0 @@
1
- import { ConnectorSDKInterface } from '@transai/connector-runtime-sdk';
2
- import { ConnectorConfig } from './types';
3
- export declare class WebhookServer {
4
- #private;
5
- constructor(sdk: ConnectorSDKInterface<ConnectorConfig>);
6
- init(): void;
7
- start(): void;
8
- stop(): void;
9
- }