| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Rfp/{RfpDocumentUID}/Estimate/Jobs/{TaskSeq}/assembly |
|---|
"use strict";
export class ResourcedPosition {
/** @param {{PositionTag?:string,Hours?:number,CrewSize?:number,Utilization?:number,FixedDays?:number,Headcount?:number,SourceReference?:string,Notes?:string,IsInCatalog?:boolean,ContactID?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
PositionTag;
/** @type {?number} */
Hours;
/** @type {?number} */
CrewSize;
/** @type {?number} */
Utilization;
/** @type {?number} */
FixedDays;
/** @type {?number} */
Headcount;
/** @type {string} */
SourceReference;
/** @type {string} */
Notes;
/** @type {boolean} */
IsInCatalog;
/** @type {?number} */
ContactID;
}
export class ResourcedEquipment {
/** @param {{EquipmentID?:number,EquipmentName?:string,MakeModel?:string,Quantity?:number,DurationDays?:number,Utilization?:number,FixedDays?:number,SourceReference?:string,Notes?:string,IsInCatalog?:boolean,SuggestedEquipmentID?:number,SuggestedEquipmentName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
EquipmentID;
/** @type {string} */
EquipmentName;
/** @type {string} */
MakeModel;
/** @type {?number} */
Quantity;
/** @type {?number} */
DurationDays;
/** @type {?number} */
Utilization;
/** @type {?number} */
FixedDays;
/** @type {string} */
SourceReference;
/** @type {string} */
Notes;
/** @type {boolean} */
IsInCatalog;
/** @type {number} */
SuggestedEquipmentID;
/** @type {string} */
SuggestedEquipmentName;
}
export class ResourcedMaterial {
/** @param {{MaterialID?:number,MaterialName?:string,MakeModel?:string,Quantity?:number,QuantityPerUnit?:number,Unit?:string,SourceReference?:string,Notes?:string,IsInCatalog?:boolean,SuggestedMaterialID?:number,SuggestedMaterialName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
MaterialID;
/** @type {string} */
MaterialName;
/** @type {string} */
MakeModel;
/** @type {?number} */
Quantity;
/** @type {?number} */
QuantityPerUnit;
/** @type {string} */
Unit;
/** @type {string} */
SourceReference;
/** @type {string} */
Notes;
/** @type {boolean} */
IsInCatalog;
/** @type {number} */
SuggestedMaterialID;
/** @type {string} */
SuggestedMaterialName;
}
export class TaskResourcing {
/** @param {{Positions?:ResourcedPosition[],Equipment?:ResourcedEquipment[],Materials?:ResourcedMaterial[],ResourcedForQuantity?:number,ProductionRatePerDay?:number,FixedDays?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResourcedPosition[]} */
Positions = [];
/** @type {ResourcedEquipment[]} */
Equipment = [];
/** @type {ResourcedMaterial[]} */
Materials = [];
/** @type {?number} */
ResourcedForQuantity;
/** @type {?number} */
ProductionRatePerDay;
/** @type {?number} */
FixedDays;
}
export class SpecRefView {
/** @param {{Section?:string,Title?:string,Url?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Section;
/** @type {string} */
Title;
/** @type {string} */
Url;
}
export class DodItemView {
/** @param {{Key?:string,Text?:string,Checked?:boolean,Source?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Text;
/** @type {boolean} */
Checked;
/** @type {string} */
Source;
}
export class WorkPackageView {
/** @param {{HasPackage?:boolean,Scope?:string,LimitsOfWork?:string,SpecRefs?:SpecRefView[],Constraints?:string[],HoldPoints?:string[],Dod?:DodItemView[],SafetyNote?:string,Provenance?:string,SpecBook?:string,UserEdited?:boolean,RedraftNote?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
HasPackage;
/** @type {string} */
Scope;
/** @type {string} */
LimitsOfWork;
/** @type {SpecRefView[]} */
SpecRefs = [];
/** @type {string[]} */
Constraints = [];
/** @type {string[]} */
HoldPoints = [];
/** @type {DodItemView[]} */
Dod = [];
/** @type {string} */
SafetyNote;
/** @type {string} */
Provenance;
/** @type {string} */
SpecBook;
/** @type {boolean} */
UserEdited;
/** @type {string} */
RedraftNote;
}
export class EstimateCrewLineResult {
/** @param {{Role?:string,Hours?:number,StHours?:number,OtHours?:number,Rrop?:number,StCost?:number,OtCost?:number,Cost?:number,FringeCost?:number,PremiumApplied?:boolean,HasOt?:boolean,NeedsRate?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Role;
/** @type {number} */
Hours;
/** @type {number} */
StHours;
/** @type {number} */
OtHours;
/** @type {number} */
Rrop;
/** @type {number} */
StCost;
/** @type {number} */
OtCost;
/** @type {number} */
Cost;
/** @type {number} */
FringeCost;
/** @type {boolean} */
PremiumApplied;
/** @type {boolean} */
HasOt;
/** @type {boolean} */
NeedsRate;
}
export class EstimateEquipmentLineResult {
/** @param {{Name?:string,Quantity?:number,Rate?:number,NeedsRate?:boolean,MobCost?:number,Cost?:number,IsAvailabilityTracked?:boolean,IsOwned?:boolean,AvailabilityLabel?:string,FreedFromProject?:string,AvailableFrom?:string,RateKey?:string,RentalExplain?:string,UsageDays?:number,BilledDays?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {number} */
Quantity;
/** @type {?number} */
Rate;
/** @type {boolean} */
NeedsRate;
/** @type {number} */
MobCost;
/** @type {number} */
Cost;
/** @type {boolean} */
IsAvailabilityTracked;
/** @type {boolean} */
IsOwned;
/** @type {string} */
AvailabilityLabel;
/** @type {string} */
FreedFromProject;
/** @type {?string} */
AvailableFrom;
/** @type {string} */
RateKey;
/** @type {string} */
RentalExplain;
/** @type {number} */
UsageDays;
/** @type {number} */
BilledDays;
}
export class EstimateMaterialLineResult {
/** @param {{Name?:string,Quantity?:number,Unit?:string,Rate?:number,NeedsRate?:boolean,Cost?:number,RateKey?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {number} */
Quantity;
/** @type {string} */
Unit;
/** @type {?number} */
Rate;
/** @type {boolean} */
NeedsRate;
/** @type {number} */
Cost;
/** @type {string} */
RateKey;
}
export class EstimateSubcontractLine {
/** @param {{Vendor?:string,Amount?:number,Scope?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Vendor;
/** @type {number} */
Amount;
/** @type {string} */
Scope;
}
export class EstimateJobResult {
/** @param {{Seq?:number,DependsOn?:number[],ItemNo?:string,Name?:string,Category?:string,SourceRef?:string,Unit?:string,Quantity?:number,PatternCode?:string,Workdays?:number,HoursPerDay?:number,IsNight?:boolean,WeeklyHours?:number,OtFraction?:number,Days?:number,EffectiveProdPerDay?:number,CrewPremiumApplied?:boolean,WorkPackage?:WorkPackageView,Crew?:EstimateCrewLineResult[],Equipment?:EstimateEquipmentLineResult[],Materials?:EstimateMaterialLineResult[],Subcontracts?:EstimateSubcontractLine[],CrewCost?:number,FringeCost?:number,EquipmentCost?:number,MaterialCost?:number,SubcontractCost?:number,Direct?:number,PricingBasis?:string,PricingRuleId?:string,PricingBandP25?:number,PricingBandP75?:number,PricingBandN?:number,PricingBandLabel?:string,BenchmarkUnitPrice?:number,BenchmarkRateMin?:number,BenchmarkRateMax?:number,BenchmarkSampleSize?:number,BenchmarkP25?:number,BenchmarkP75?:number,BenchmarkBasis?:string,UnitPriceOverride?:number,OverrideBasis?:string,ReferencePrice?:number,ReferenceRangeMin?:number,ReferenceRangeMax?:number,ReferenceN?:number,ReferenceDate?:string,ReferenceBasis?:string,ReferenceUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Seq;
/** @type {number[]} */
DependsOn = [];
/** @type {string} */
ItemNo;
/** @type {string} */
Name;
/** @type {string} */
Category;
/** @type {string} */
SourceRef;
/** @type {string} */
Unit;
/** @type {number} */
Quantity;
/** @type {string} */
PatternCode;
/** @type {number} */
Workdays;
/** @type {number} */
HoursPerDay;
/** @type {boolean} */
IsNight;
/** @type {number} */
WeeklyHours;
/** @type {number} */
OtFraction;
/** @type {number} */
Days;
/** @type {?number} */
EffectiveProdPerDay;
/** @type {boolean} */
CrewPremiumApplied;
/** @type {WorkPackageView} */
WorkPackage;
/** @type {EstimateCrewLineResult[]} */
Crew = [];
/** @type {EstimateEquipmentLineResult[]} */
Equipment = [];
/** @type {EstimateMaterialLineResult[]} */
Materials = [];
/** @type {EstimateSubcontractLine[]} */
Subcontracts = [];
/** @type {number} */
CrewCost;
/** @type {number} */
FringeCost;
/** @type {number} */
EquipmentCost;
/** @type {number} */
MaterialCost;
/** @type {number} */
SubcontractCost;
/** @type {number} */
Direct;
/** @type {string} */
PricingBasis;
/** @type {string} */
PricingRuleId;
/** @type {?number} */
PricingBandP25;
/** @type {?number} */
PricingBandP75;
/** @type {?number} */
PricingBandN;
/** @type {string} */
PricingBandLabel;
/** @type {?number} */
BenchmarkUnitPrice;
/** @type {?number} */
BenchmarkRateMin;
/** @type {?number} */
BenchmarkRateMax;
/** @type {?number} */
BenchmarkSampleSize;
/** @type {?number} */
BenchmarkP25;
/** @type {?number} */
BenchmarkP75;
/** @type {string} */
BenchmarkBasis;
/** @type {?number} */
UnitPriceOverride;
/** @type {string} */
OverrideBasis;
/** @type {?number} */
ReferencePrice;
/** @type {?number} */
ReferenceRangeMin;
/** @type {?number} */
ReferenceRangeMax;
/** @type {?number} */
ReferenceN;
/** @type {?string} */
ReferenceDate;
/** @type {string} */
ReferenceBasis;
/** @type {string} */
ReferenceUrl;
}
export class ApplyAssemblyResponse {
/** @param {{ResponseStatus?:ResponseStatus,TaskSeq?:number,TemplateUID?:string,TemplateName?:string,Quantity?:number,Unit?:string,Resourcing?:TaskResourcing,Job?:EstimateJobResult,Headline?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {number} */
TaskSeq;
/** @type {?string} */
TemplateUID;
/** @type {string} */
TemplateName;
/** @type {number} */
Quantity;
/** @type {string} */
Unit;
/** @type {TaskResourcing} */
Resourcing;
/** @type {EstimateJobResult} */
Job;
/** @type {string} */
Headline;
}
export class ApplyAssemblyRequest {
/** @param {{RfpDocumentUID?:string,TaskSeq?:number,TemplateUID?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
RfpDocumentUID;
/** @type {number} */
TaskSeq;
/** @type {string} */
TemplateUID;
}
JavaScript ApplyAssemblyRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Rfp/{RfpDocumentUID}/Estimate/Jobs/{TaskSeq}/assembly HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
RfpDocumentUID: 00000000000000000000000000000000,
TaskSeq: 0,
TemplateUID: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
TaskSeq: 0,
TemplateUID: 00000000000000000000000000000000,
TemplateName: String,
Quantity: 0,
Unit: String,
Resourcing:
{
Positions:
[
{
PositionTag: String,
Hours: 0,
CrewSize: 0,
Utilization: 0,
FixedDays: 0,
Headcount: 0,
SourceReference: String,
Notes: String,
IsInCatalog: False,
ContactID: 0
}
],
Equipment:
[
{
EquipmentID: 0,
EquipmentName: String,
MakeModel: String,
Quantity: 0,
DurationDays: 0,
Utilization: 0,
FixedDays: 0,
SourceReference: String,
Notes: String,
IsInCatalog: False,
SuggestedEquipmentID: 0,
SuggestedEquipmentName: String
}
],
Materials:
[
{
MaterialID: 0,
MaterialName: String,
MakeModel: String,
Quantity: 0,
QuantityPerUnit: 0,
Unit: String,
SourceReference: String,
Notes: String,
IsInCatalog: False,
SuggestedMaterialID: 0,
SuggestedMaterialName: String
}
],
ResourcedForQuantity: 0,
ProductionRatePerDay: 0,
FixedDays: 0
},
Job:
{
Seq: 0,
DependsOn:
[
0
],
ItemNo: String,
Name: String,
Category: String,
SourceRef: String,
Unit: String,
Quantity: 0,
PatternCode: String,
Workdays: 0,
HoursPerDay: 0,
IsNight: False,
WeeklyHours: 0,
OtFraction: 0,
Days: 0,
EffectiveProdPerDay: 0,
CrewPremiumApplied: False,
WorkPackage:
{
HasPackage: False,
Scope: String,
LimitsOfWork: String,
SpecRefs:
[
{
Section: String,
Title: String,
Url: String
}
],
Constraints:
[
String
],
HoldPoints:
[
String
],
Dod:
[
{
Key: String,
Text: String,
Checked: False,
Source: String
}
],
SafetyNote: String,
Provenance: String,
SpecBook: String,
UserEdited: False,
RedraftNote: String
},
Crew:
[
{
Role: String,
Hours: 0,
StHours: 0,
OtHours: 0,
Rrop: 0,
StCost: 0,
OtCost: 0,
Cost: 0,
FringeCost: 0,
PremiumApplied: False,
HasOt: False,
NeedsRate: False
}
],
Equipment:
[
{
Name: String,
Quantity: 0,
Rate: 0,
NeedsRate: False,
MobCost: 0,
Cost: 0,
IsAvailabilityTracked: False,
IsOwned: False,
AvailabilityLabel: String,
FreedFromProject: String,
AvailableFrom: 0001-01-01,
RateKey: String,
RentalExplain: String,
UsageDays: 0,
BilledDays: 0
}
],
Materials:
[
{
Name: String,
Quantity: 0,
Unit: String,
Rate: 0,
NeedsRate: False,
Cost: 0,
RateKey: String
}
],
Subcontracts:
[
{
Vendor: String,
Amount: 0,
Scope: String
}
],
CrewCost: 0,
FringeCost: 0,
EquipmentCost: 0,
MaterialCost: 0,
SubcontractCost: 0,
Direct: 0,
PricingBasis: String,
PricingRuleId: String,
PricingBandP25: 0,
PricingBandP75: 0,
PricingBandN: 0,
PricingBandLabel: String,
BenchmarkUnitPrice: 0,
BenchmarkRateMin: 0,
BenchmarkRateMax: 0,
BenchmarkSampleSize: 0,
BenchmarkP25: 0,
BenchmarkP75: 0,
BenchmarkBasis: String,
UnitPriceOverride: 0,
OverrideBasis: String,
ReferencePrice: 0,
ReferenceRangeMin: 0,
ReferenceRangeMax: 0,
ReferenceN: 0,
ReferenceDate: 0001-01-01,
ReferenceBasis: String,
ReferenceUrl: String
},
Headline: String
}