From a0ac1ac44063af3bb625f75dfdafc87978185c0c Mon Sep 17 00:00:00 2001 From: Carlos Amaro <64661289+LordKubaya@users.noreply.github.com> Date: Fri, 29 Mar 2024 15:53:40 +0000 Subject: [PATCH] feat(satp-hermes): satp proto update (#3147) * feat(satp-hermes): update protos Signed-off-by: Carlos Amaro * feat(satp-hermes): protos Signed-off-by: Carlos Amaro * feat(satp-hermes): protos Signed-off-by: Carlos Amaro --------- Signed-off-by: Carlos Amaro --- .../satp/v02/common/common_messages.proto | 11 +- .../proto/cacti/satp/v02/common/session.proto | 103 +++-- .../src/main/typescript/core/constants.ts | 1 + .../satp/v02/common/common_messages_pb.ts | 42 +- .../proto/cacti/satp/v02/common/session_pb.ts | 363 +++++++++++++++--- .../main/typescript/plugin-satp-gateway.ts | 2 +- 6 files changed, 405 insertions(+), 117 deletions(-) diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/common_messages.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/common_messages.proto index 7dcc1ed9f5..38d898a5cd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/common_messages.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/common_messages.proto @@ -30,8 +30,8 @@ message TransferClaims { string beneficiary_pubkey = 6; string sender_gateway_network_id = 7; string recipient_gateway_network_id = 8; - string client_identity_pubkey = 9; - string server_identity_pubkey = 10; + string client_gateway_pubkey = 9; + string server_gateway_pubkey = 10; string sender_gateway_owner_id = 11; string receiver_gateway_owner_id = 12; uint32 max_retries = 13; @@ -110,17 +110,14 @@ message CommonSatp { string transfer_context_id = 4; uint64 sequence_number = 5; string resource_url = 6; - string developer_urn = 7; ActionResponse action_response = 8; - CredentialProfile credential_profile = 9; string credential_block = 10; PayloadProfile payload_profile = 11; - string application_profile = 12; Payload payload = 13; string payload_hash = 14; string signature = 15; - string client_identity_pubkey = 16; - string server_identity_pubkey = 17; + string client_gateway_pubkey = 16; + string server_gateway_pubkey = 17; string hash_previous_message = 18; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index 765412f590..efda931b19 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -6,40 +6,53 @@ import "google/protobuf/empty.proto"; import "cacti/satp/v02/common/common_messages.proto"; + message SessionData { - message SessionData { - string id = 1; - string version = 2; - string transfer_context_id = 3; - MessageStagesHashes hashes = 4; - cacti.satp.v02.common.PayloadProfile payload_profile = 5; - MessageStagesSignatures signatures = 6; - string max_retries = 7; - string max_timeout = 8; - string logging_profile = 9; - string recipient_base_path = 10; - string source_base_path = 11; - string access_control_profile = 12; - string application_profile = 13; - int64 last_sequence_number = 14; - string sender_gateway_network_id = 15; - string recipient_gateway_network_id = 16; - string source_ledger_asset_id = 17; - string recipient_ledger_asset_id = 18; - string server_identity_pubkey = 19; - string source_gateway_pubkey = 20; - string verified_originator_entity_id = 21; - string verified_beneficiary_entity_id = 22; - string asset_profile_id = 23; - string digital_asset_id = 24; - string originator_pubkey = 25; - string beneficiary_pubkey = 26; - string sender_gateway_owner_id = 27; - string receiver_gateway_owner_id = 28; - string hash_transfer_init_claims = 29; - } + string id = 1; + string version = 2; + string transfer_context_id = 3; + MessageStagesHashes hashes = 4; + cacti.satp.v02.common.PayloadProfile payload_profile = 5; + MessageStagesSignatures signatures = 6; + string max_retries = 7; + string max_timeout = 8; + string logging_profile = 9; + string recipient_base_path = 10; + string source_base_path = 11; + string access_control_profile = 12; + string application_profile = 13; + int64 last_sequence_number = 14; + string sender_gateway_network_id = 15; + string recipient_gateway_network_id = 16; + string source_ledger_asset_id = 17; + string recipient_ledger_asset_id = 18; + string server_gateway_pubkey = 19; + string client_gateway_pubkey = 20; + string verified_originator_entity_id = 21; + string verified_beneficiary_entity_id = 22; + string asset_profile_id = 23; + string digital_asset_id = 24; + string originator_pubkey = 25; + string beneficiary_pubkey = 26; + string sender_gateway_owner_id = 27; + string receiver_gateway_owner_id = 28; + string hash_transfer_init_claims = 29; + cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 30; + cacti.satp.v02.common.LockType lock_type = 31; + uint64 lock_expiration_time = 32; + cacti.satp.v02.common.Permissions permitions = 33; + string developer_urn = 34; + cacti.satp.v02.common.CredentialProfile credential_profile = 35; + string subsequent_calls = 36; + string history = 37; + bool multiple_claims_allowed = 38; + bool multiple_cancels_allowed = 39; + string last_message_received_timestamp = 40; + MessageStagesTimestamps processed_timestamps = 41; + MessageStagesTimestamps received_timestamps = 42; } + message MessageStagesHashes { Stage1Hashes stage1 = 1; Stage2Hashes stage2 = 2; @@ -96,6 +109,34 @@ message Stage3Signatures { string transfer_complete_response_message_server_signature = 6; } +message MessageStagesTimestamps { + Stage1Timestamps stage1 = 1; + Stage2Timestamps stage2 = 2; + Stage3Timestamps stage3 = 3; +} + +message Stage1Timestamps { + string transfer_proposal_request_message_timestamp = 1; + string transfer_proposal_receipt_message_timestamp = 2; + string transfer_proposal_reject_message_timestamp = 3; + string transfer_commence_request_message_timestamp = 4; + string transfer_commence_response_message_timestamp = 5; +} + +message Stage2Timestamps { + string lock_assertion_request_message_timestamp = 1; + string lock_assertion_receipt_message_timestamp = 2; +} + +message Stage3Timestamps { + string commit_preparation_request_message_timestamp = 1; + string commit_ready_response_message_timestamp = 2; + string commit_final_assertion_request_message_timestamp = 3; + string commit_final_acknoledgement_receipt_response_message_timestamp = 4; + string transfer_complete_request_message_timestamp = 5; + string transfer_complete_response_message_timestamp = 6; +} + message SendStatusRequest { string status = 1; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts index 10b525dcab..7cbce6dd9c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts @@ -1,3 +1,4 @@ export const DEFAULT_PORT_GATEWAY_SERVER = 3010; export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; +export const SATP_VERSION = "v02"; \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts index 9654d28cb9..ebffe19c62 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts @@ -484,14 +484,14 @@ export class TransferClaims extends Message { recipientGatewayNetworkId = ""; /** - * @generated from field: string client_identity_pubkey = 9; + * @generated from field: string client_gateway_pubkey = 9; */ - clientIdentityPubkey = ""; + clientGatewayPubkey = ""; /** - * @generated from field: string server_identity_pubkey = 10; + * @generated from field: string server_gateway_pubkey = 10; */ - serverIdentityPubkey = ""; + serverGatewayPubkey = ""; /** * @generated from field: string sender_gateway_owner_id = 11; @@ -529,8 +529,8 @@ export class TransferClaims extends Message { { no: 6, name: "beneficiary_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 7, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 8, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "client_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 10, name: "server_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 11, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 12, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 13, name: "max_retries", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, @@ -956,21 +956,11 @@ export class CommonSatp extends Message { */ resourceUrl = ""; - /** - * @generated from field: string developer_urn = 7; - */ - developerUrn = ""; - /** * @generated from field: cacti.satp.v02.common.ActionResponse action_response = 8; */ actionResponse?: ActionResponse; - /** - * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 9; - */ - credentialProfile = CredentialProfile.UNSPECIFIED; - /** * @generated from field: string credential_block = 10; */ @@ -981,11 +971,6 @@ export class CommonSatp extends Message { */ payloadProfile?: PayloadProfile; - /** - * @generated from field: string application_profile = 12; - */ - applicationProfile = ""; - /** * @generated from field: cacti.satp.v02.common.Payload payload = 13; */ @@ -1002,14 +987,14 @@ export class CommonSatp extends Message { signature = ""; /** - * @generated from field: string client_identity_pubkey = 16; + * @generated from field: string client_gateway_pubkey = 16; */ - clientIdentityPubkey = ""; + clientGatewayPubkey = ""; /** - * @generated from field: string server_identity_pubkey = 17; + * @generated from field: string server_gateway_pubkey = 17; */ - serverIdentityPubkey = ""; + serverGatewayPubkey = ""; /** * @generated from field: string hash_previous_message = 18; @@ -1030,17 +1015,14 @@ export class CommonSatp extends Message { { no: 4, name: "transfer_context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "sequence_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 6, name: "resource_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 8, name: "action_response", kind: "message", T: ActionResponse }, - { no: 9, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, { no: 10, name: "credential_block", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 11, name: "payload_profile", kind: "message", T: PayloadProfile }, - { no: 12, name: "application_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 13, name: "payload", kind: "message", T: Payload }, { no: 14, name: "payload_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 15, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 16, name: "client_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 17, name: "server_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 16, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 17, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 18, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 8b9d893459..3883bdf179 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -5,43 +5,12 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { PayloadProfile } from "./common_messages_pb.js"; +import { CredentialProfile, LockType, PayloadProfile, Permissions, SignatureAlgorithm } from "./common_messages_pb.js"; /** * @generated from message cacti.satp.v02.common.SessionData */ export class SessionData extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.SessionData"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { - return new SessionData().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SessionData { - return new SessionData().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SessionData { - return new SessionData().fromJsonString(jsonString, options); - } - - static equals(a: SessionData | PlainMessage | undefined, b: SessionData | PlainMessage | undefined): boolean { - return proto3.util.equals(SessionData, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.SessionData.SessionData - */ -export class SessionData_SessionData extends Message { /** * @generated from field: string id = 1; */ @@ -133,14 +102,14 @@ export class SessionData_SessionData extends Message { recipientLedgerAssetId = ""; /** - * @generated from field: string server_identity_pubkey = 19; + * @generated from field: string server_gateway_pubkey = 19; */ - serverIdentityPubkey = ""; + serverGatewayPubkey = ""; /** - * @generated from field: string source_gateway_pubkey = 20; + * @generated from field: string client_gateway_pubkey = 20; */ - sourceGatewayPubkey = ""; + clientGatewayPubkey = ""; /** * @generated from field: string verified_originator_entity_id = 21; @@ -187,13 +156,78 @@ export class SessionData_SessionData extends Message { */ hashTransferInitClaims = ""; - constructor(data?: PartialMessage) { + /** + * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 30; + */ + signatureAlgorithm = SignatureAlgorithm.UNSPECIFIED; + + /** + * @generated from field: cacti.satp.v02.common.LockType lock_type = 31; + */ + lockType = LockType.UNSPECIFIED; + + /** + * @generated from field: uint64 lock_expiration_time = 32; + */ + lockExpirationTime = protoInt64.zero; + + /** + * @generated from field: cacti.satp.v02.common.Permissions permitions = 33; + */ + permitions?: Permissions; + + /** + * @generated from field: string developer_urn = 34; + */ + developerUrn = ""; + + /** + * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 35; + */ + credentialProfile = CredentialProfile.UNSPECIFIED; + + /** + * @generated from field: string subsequent_calls = 36; + */ + subsequentCalls = ""; + + /** + * @generated from field: string history = 37; + */ + history = ""; + + /** + * @generated from field: bool multiple_claims_allowed = 38; + */ + multipleClaimsAllowed = false; + + /** + * @generated from field: bool multiple_cancels_allowed = 39; + */ + multipleCancelsAllowed = false; + + /** + * @generated from field: string last_message_received_timestamp = 40; + */ + lastMessageReceivedTimestamp = ""; + + /** + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps processed_timestamps = 41; + */ + processedTimestamps?: MessageStagesTimestamps; + + /** + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps received_timestamps = 42; + */ + receivedTimestamps?: MessageStagesTimestamps; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.SessionData.SessionData"; + static readonly typeName = "cacti.satp.v02.common.SessionData"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -213,8 +247,8 @@ export class SessionData_SessionData extends Message { { no: 16, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 17, name: "source_ledger_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 18, name: "recipient_ledger_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 19, name: "server_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 20, name: "source_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 19, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 20, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 21, name: "verified_originator_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 22, name: "verified_beneficiary_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 23, name: "asset_profile_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -224,22 +258,35 @@ export class SessionData_SessionData extends Message { { no: 27, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 28, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 29, name: "hash_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 30, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, + { no: 31, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, + { no: 32, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 33, name: "permitions", kind: "message", T: Permissions }, + { no: 34, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 35, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, + { no: 36, name: "subsequent_calls", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 37, name: "history", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 38, name: "multiple_claims_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 39, name: "multiple_cancels_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 40, name: "last_message_received_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 41, name: "processed_timestamps", kind: "message", T: MessageStagesTimestamps }, + { no: 42, name: "received_timestamps", kind: "message", T: MessageStagesTimestamps }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): SessionData_SessionData { - return new SessionData_SessionData().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { + return new SessionData().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): SessionData_SessionData { - return new SessionData_SessionData().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): SessionData { + return new SessionData().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): SessionData_SessionData { - return new SessionData_SessionData().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): SessionData { + return new SessionData().fromJsonString(jsonString, options); } - static equals(a: SessionData_SessionData | PlainMessage | undefined, b: SessionData_SessionData | PlainMessage | undefined): boolean { - return proto3.util.equals(SessionData_SessionData, a, b); + static equals(a: SessionData | PlainMessage | undefined, b: SessionData | PlainMessage | undefined): boolean { + return proto3.util.equals(SessionData, a, b); } } @@ -683,6 +730,226 @@ export class Stage3Signatures extends Message { } } +/** + * @generated from message cacti.satp.v02.common.MessageStagesTimestamps + */ +export class MessageStagesTimestamps extends Message { + /** + * @generated from field: cacti.satp.v02.common.Stage1Timestamps stage1 = 1; + */ + stage1?: Stage1Timestamps; + + /** + * @generated from field: cacti.satp.v02.common.Stage2Timestamps stage2 = 2; + */ + stage2?: Stage2Timestamps; + + /** + * @generated from field: cacti.satp.v02.common.Stage3Timestamps stage3 = 3; + */ + stage3?: Stage3Timestamps; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MessageStagesTimestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "stage1", kind: "message", T: Stage1Timestamps }, + { no: 2, name: "stage2", kind: "message", T: Stage2Timestamps }, + { no: 3, name: "stage3", kind: "message", T: Stage3Timestamps }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MessageStagesTimestamps { + return new MessageStagesTimestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MessageStagesTimestamps { + return new MessageStagesTimestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MessageStagesTimestamps { + return new MessageStagesTimestamps().fromJsonString(jsonString, options); + } + + static equals(a: MessageStagesTimestamps | PlainMessage | undefined, b: MessageStagesTimestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(MessageStagesTimestamps, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage1Timestamps + */ +export class Stage1Timestamps extends Message { + /** + * @generated from field: string transfer_proposal_request_message_timestamp = 1; + */ + transferProposalRequestMessageTimestamp = ""; + + /** + * @generated from field: string transfer_proposal_receipt_message_timestamp = 2; + */ + transferProposalReceiptMessageTimestamp = ""; + + /** + * @generated from field: string transfer_proposal_reject_message_timestamp = 3; + */ + transferProposalRejectMessageTimestamp = ""; + + /** + * @generated from field: string transfer_commence_request_message_timestamp = 4; + */ + transferCommenceRequestMessageTimestamp = ""; + + /** + * @generated from field: string transfer_commence_response_message_timestamp = 5; + */ + transferCommenceResponseMessageTimestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage1Timestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "transfer_proposal_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "transfer_proposal_receipt_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transfer_proposal_reject_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transfer_commence_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_commence_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage1Timestamps { + return new Stage1Timestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage1Timestamps { + return new Stage1Timestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage1Timestamps { + return new Stage1Timestamps().fromJsonString(jsonString, options); + } + + static equals(a: Stage1Timestamps | PlainMessage | undefined, b: Stage1Timestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage1Timestamps, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage2Timestamps + */ +export class Stage2Timestamps extends Message { + /** + * @generated from field: string lock_assertion_request_message_timestamp = 1; + */ + lockAssertionRequestMessageTimestamp = ""; + + /** + * @generated from field: string lock_assertion_receipt_message_timestamp = 2; + */ + lockAssertionReceiptMessageTimestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage2Timestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "lock_assertion_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "lock_assertion_receipt_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage2Timestamps { + return new Stage2Timestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage2Timestamps { + return new Stage2Timestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage2Timestamps { + return new Stage2Timestamps().fromJsonString(jsonString, options); + } + + static equals(a: Stage2Timestamps | PlainMessage | undefined, b: Stage2Timestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage2Timestamps, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage3Timestamps + */ +export class Stage3Timestamps extends Message { + /** + * @generated from field: string commit_preparation_request_message_timestamp = 1; + */ + commitPreparationRequestMessageTimestamp = ""; + + /** + * @generated from field: string commit_ready_response_message_timestamp = 2; + */ + commitReadyResponseMessageTimestamp = ""; + + /** + * @generated from field: string commit_final_assertion_request_message_timestamp = 3; + */ + commitFinalAssertionRequestMessageTimestamp = ""; + + /** + * @generated from field: string commit_final_acknoledgement_receipt_response_message_timestamp = 4; + */ + commitFinalAcknoledgementReceiptResponseMessageTimestamp = ""; + + /** + * @generated from field: string transfer_complete_request_message_timestamp = 5; + */ + transferCompleteRequestMessageTimestamp = ""; + + /** + * @generated from field: string transfer_complete_response_message_timestamp = 6; + */ + transferCompleteResponseMessageTimestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage3Timestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "commit_preparation_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "commit_ready_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "commit_final_assertion_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "commit_final_acknoledgement_receipt_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_complete_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "transfer_complete_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage3Timestamps { + return new Stage3Timestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage3Timestamps { + return new Stage3Timestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage3Timestamps { + return new Stage3Timestamps().fromJsonString(jsonString, options); + } + + static equals(a: Stage3Timestamps | PlainMessage | undefined, b: Stage3Timestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage3Timestamps, a, b); + } +} + /** * @generated from message cacti.satp.v02.common.SendStatusRequest */ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts index bf82655807..6a66dfaece 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts @@ -23,7 +23,6 @@ import { import { TransferInitializationV1Response, DefaultApi as SatpApi, - SessionData, ClientV1Request, TransferCommenceV1Request, TransferCommenceV1Response, @@ -41,6 +40,7 @@ import { RecoverUpdateAckV1Message, RollbackV1Message, RollbackAckV1Message, + SessionData } from "./generated/openapi/typescript-axios"; import { CommitFinalRequestEndpointV1 } from "./web-services/server-side/commit-final-request-endpoint"; import { CommitFinalResponseEndpointV1 } from "./web-services/client-side/commit-final-response-endpoint";