diff --git a/api/openapi.json b/api/openapi.json index 3b038e01..e3edc0d2 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -6133,7 +6133,13 @@ "jetton": { "$ref": "#/components/schemas/JettonPreview" }, + "qty": { + "example": "200", + "type": "string", + "x-js-format": "bigint" + }, "quantity": { + "deprecated": true, "example": 10, "format": "int64", "type": "integer", @@ -6142,6 +6148,7 @@ }, "required": [ "account", + "qty", "quantity", "jetton" ], diff --git a/api/openapi.yml b/api/openapi.yml index 691ee11c..053d5ea3 100644 --- a/api/openapi.yml +++ b/api/openapi.yml @@ -5754,6 +5754,7 @@ components: type: object required: - account + - qty - quantity - jetton properties: @@ -5761,8 +5762,13 @@ components: $ref: '#/components/schemas/AccountAddress' jetton: $ref: '#/components/schemas/JettonPreview' + qty: + type: string + x-js-format: bigint + example: "200" quantity: type: integer + deprecated: true format: int64 x-js-format: bigint example: 10 diff --git a/pkg/api/event_converters.go b/pkg/api/event_converters.go index 2b6f47eb..1bbfb508 100644 --- a/pkg/api/event_converters.go +++ b/pkg/api/event_converters.go @@ -782,6 +782,7 @@ func convertAccountValueFlow(accountID tongo.AccountID, flow *bath.AccountValueF Account: convertAccountAddress(jettonMaster, book), Jetton: previews[jettonMaster], Quantity: quantity.Int64(), + Qty: quantity.String(), }) } return valueFlow diff --git a/pkg/oas/oas_json_gen.go b/pkg/oas/oas_json_gen.go index a8d4a86e..e6c33009 100644 --- a/pkg/oas/oas_json_gen.go +++ b/pkg/oas/oas_json_gen.go @@ -40180,16 +40180,21 @@ func (s *ValueFlowJettonsItem) encodeFields(e *jx.Encoder) { e.FieldStart("jetton") s.Jetton.Encode(e) } + { + e.FieldStart("qty") + e.Str(s.Qty) + } { e.FieldStart("quantity") e.Int64(s.Quantity) } } -var jsonFieldsNameOfValueFlowJettonsItem = [3]string{ +var jsonFieldsNameOfValueFlowJettonsItem = [4]string{ 0: "account", 1: "jetton", - 2: "quantity", + 2: "qty", + 3: "quantity", } // Decode decodes ValueFlowJettonsItem from json. @@ -40221,8 +40226,20 @@ func (s *ValueFlowJettonsItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"jetton\"") } - case "quantity": + case "qty": requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Qty = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"qty\"") + } + case "quantity": + requiredBitSet[0] |= 1 << 3 if err := func() error { v, err := d.Int64() s.Quantity = int64(v) @@ -40243,7 +40260,7 @@ func (s *ValueFlowJettonsItem) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000111, + 0b00001111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. diff --git a/pkg/oas/oas_schemas_gen.go b/pkg/oas/oas_schemas_gen.go index be542dba..c04c5d97 100644 --- a/pkg/oas/oas_schemas_gen.go +++ b/pkg/oas/oas_schemas_gen.go @@ -17270,9 +17270,11 @@ func (s *ValueFlow) SetJettons(val []ValueFlowJettonsItem) { } type ValueFlowJettonsItem struct { - Account AccountAddress `json:"account"` - Jetton JettonPreview `json:"jetton"` - Quantity int64 `json:"quantity"` + Account AccountAddress `json:"account"` + Jetton JettonPreview `json:"jetton"` + Qty string `json:"qty"` + // Deprecated: schema marks this property as deprecated. + Quantity int64 `json:"quantity"` } // GetAccount returns the value of Account. @@ -17285,6 +17287,11 @@ func (s *ValueFlowJettonsItem) GetJetton() JettonPreview { return s.Jetton } +// GetQty returns the value of Qty. +func (s *ValueFlowJettonsItem) GetQty() string { + return s.Qty +} + // GetQuantity returns the value of Quantity. func (s *ValueFlowJettonsItem) GetQuantity() int64 { return s.Quantity @@ -17300,6 +17307,11 @@ func (s *ValueFlowJettonsItem) SetJetton(val JettonPreview) { s.Jetton = val } +// SetQty sets the value of Qty. +func (s *ValueFlowJettonsItem) SetQty(val string) { + s.Qty = val +} + // SetQuantity sets the value of Quantity. func (s *ValueFlowJettonsItem) SetQuantity(val int64) { s.Quantity = val