Class: OfferProposal
market/proposal/offer-proposal.OfferProposal
Entity representing the offer presented by the Provider to the Requestor
Issue: The final proposal that gets promoted to an agreement comes from the provider Right now the last time I can access it directly is when I receive the counter from the provider, later it's impossible for me to get it via the API {"message":"Path deserialize error: Id [2cb0b2820c6142fab5af7a8e90da09f0] has invalid owner type."}
FIXME #yagna should allow obtaining proposals via the API even if I'm not the owner!
Hierarchy
↳
OfferProposal
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new OfferProposal(model
, demand
): OfferProposal
Parameters
Name | Type |
---|---|
model | Proposal |
demand | Demand |
Returns
Overrides
Defined in
src/market/proposal/offer-proposal.ts:44
Properties
issuer
• Readonly
issuer: "Provider"
Overrides
Defined in
src/market/proposal/offer-proposal.ts:42
demand
• Readonly
demand: Demand
Defined in
src/market/proposal/offer-proposal.ts:46
id
• Readonly
id: string
Inherited from
Defined in
src/market/proposal/market-proposal.ts:19
previousProposalId
• Readonly
previousProposalId: null
| string
= null
Reference to the previous proposal in the "negotiation chain"
If null, this means that was the initial offer that the negotiations started from
Inherited from
MarketProposal.previousProposalId
Defined in
src/market/proposal/market-proposal.ts:25
properties
• Readonly
properties: ProposalProperties
Inherited from
Defined in
src/market/proposal/market-proposal.ts:29
model
• Protected
Readonly
model: Proposal
Inherited from
Defined in
src/market/proposal/market-proposal.ts:31
Accessors
pricing
• get
pricing(): PricingInfo
Returns
Defined in
src/market/proposal/offer-proposal.ts:53
provider
• get
provider(): ProviderInfo
Returns
Defined in
src/market/proposal/offer-proposal.ts:107
state
• get
state(): ProposalState
Returns
Inherited from
MarketProposal.state
Defined in
src/market/proposal/market-proposal.ts:37
timestamp
• get
timestamp(): Date
Returns
Date
Inherited from
MarketProposal.timestamp
Defined in
src/market/proposal/market-proposal.ts:41
Methods
getDto
▸ getDto(): Partial
<{ transferProtocol
: string
[] ; cpuBrand
: string
; cpuCapabilities
: string
[] ; cpuCores
: number
; cpuThreads
: number
; memory
: number
; storage
: number
; publicNet
: boolean
; runtimeCapabilities
: string
[] ; runtimeName
: string
; state
: ProposalState
}>
Returns
Partial
<{ transferProtocol
: string
[] ; cpuBrand
: string
; cpuCapabilities
: string
[] ; cpuCores
: number
; cpuThreads
: number
; memory
: number
; storage
: number
; publicNet
: boolean
; runtimeCapabilities
: string
[] ; runtimeName
: string
; state
: ProposalState
}>
Defined in
src/market/proposal/offer-proposal.ts:83
getEstimatedCost
▸ getEstimatedCost(): number
Proposal cost estimation based on CPU, Env and startup costs
Returns
number
Defined in
src/market/proposal/offer-proposal.ts:102
validate
▸ validate(): void
Validates if the proposal satisfies basic business rules, is complete and thus safe to interact with
Use this method before executing any important logic, to ensure that you're working with correct, complete data
Returns
void
Overrides
Defined in
src/market/proposal/offer-proposal.ts:120
isInitial
▸ isInitial(): boolean
Returns
boolean
Inherited from
Defined in
src/market/proposal/market-proposal.ts:45
isDraft
▸ isDraft(): boolean
Returns
boolean
Inherited from
Defined in
src/market/proposal/market-proposal.ts:49
isExpired
▸ isExpired(): boolean
Returns
boolean
Inherited from
Defined in
src/market/proposal/market-proposal.ts:53
isRejected
▸ isRejected(): boolean
Returns
boolean
Inherited from
Defined in
src/market/proposal/market-proposal.ts:57
isValid
▸ isValid(): boolean
Returns
boolean