feat: submitStreaming + detached-invocation client (T2/T3)
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
Regenerates the gRPC stubs from the updated proto and adds: - HubClient.submitStreaming(...) -> Stream<SubmitStreamEvent>: follow a flow execution live (step markers, module emit-events, terminal result/error). Works over native gRPC and, on web, gRPC-Web (the same conditional channel factory the rest of the SDK uses). - submit(..., detach: true) and getInvocationStatus / getInvocationResult / cancelInvocation wrappers (T3). - SubmitStreamEvent + InvocationStatus re-exported as typedefs. Shared _buildSubmitRequest between submit + submitStreaming. analyze clean, tests pass. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
0d2e939867
commit
c46dc58ac3
5 changed files with 1038 additions and 5 deletions
|
|
@ -41,6 +41,7 @@ const SubmitRequest$json = {
|
|||
'6': '.chain.v1.SubmitRequest.InputsEntry',
|
||||
'10': 'inputs'
|
||||
},
|
||||
{'1': 'detach', '3': 3, '4': 1, '5': 8, '10': 'detach'},
|
||||
],
|
||||
'3': [SubmitRequest_InputsEntry$json],
|
||||
};
|
||||
|
|
@ -65,9 +66,9 @@ const SubmitRequest_InputsEntry$json = {
|
|||
/// Descriptor for `SubmitRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List submitRequestDescriptor = $convert.base64Decode(
|
||||
'Cg1TdWJtaXRSZXF1ZXN0EhsKCWZsb3dfeWFtbBgBIAEoDFIIZmxvd1lhbWwSOwoGaW5wdXRzGA'
|
||||
'IgAygLMiMuY2hhaW4udjEuU3VibWl0UmVxdWVzdC5JbnB1dHNFbnRyeVIGaW5wdXRzGkwKC0lu'
|
||||
'cHV0c0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EicKBXZhbHVlGAIgASgLMhEuY2hhaW4udjEuUG'
|
||||
'F5bG9hZFIFdmFsdWU6AjgB');
|
||||
'IgAygLMiMuY2hhaW4udjEuU3VibWl0UmVxdWVzdC5JbnB1dHNFbnRyeVIGaW5wdXRzEhYKBmRl'
|
||||
'dGFjaBgDIAEoCFIGZGV0YWNoGkwKC0lucHV0c0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EicKBX'
|
||||
'ZhbHVlGAIgASgLMhEuY2hhaW4udjEuUGF5bG9hZFIFdmFsdWU6AjgB');
|
||||
|
||||
@$core.Deprecated('Use submitResponseDescriptor instead')
|
||||
const SubmitResponse$json = {
|
||||
|
|
@ -117,6 +118,189 @@ final $typed_data.Uint8List submitResponseDescriptor = $convert.base64Decode(
|
|||
'dFJlc3BvbnNlLk91dHB1dHNFbnRyeVIHb3V0cHV0cxpNCgxPdXRwdXRzRW50cnkSEAoDa2V5GA'
|
||||
'EgASgJUgNrZXkSJwoFdmFsdWUYAiABKAsyES5jaGFpbi52MS5QYXlsb2FkUgV2YWx1ZToCOAE=');
|
||||
|
||||
@$core.Deprecated('Use submitStreamEventDescriptor instead')
|
||||
const SubmitStreamEvent$json = {
|
||||
'1': 'SubmitStreamEvent',
|
||||
'2': [
|
||||
{
|
||||
'1': 'step_started',
|
||||
'3': 1,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.chain.v1.StepStarted',
|
||||
'9': 0,
|
||||
'10': 'stepStarted'
|
||||
},
|
||||
{
|
||||
'1': 'step_finished',
|
||||
'3': 2,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.chain.v1.StepFinished',
|
||||
'9': 0,
|
||||
'10': 'stepFinished'
|
||||
},
|
||||
{
|
||||
'1': 'module_event',
|
||||
'3': 3,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.chain.v1.ModuleEvent',
|
||||
'9': 0,
|
||||
'10': 'moduleEvent'
|
||||
},
|
||||
{
|
||||
'1': 'final_result',
|
||||
'3': 4,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.chain.v1.SubmitResponse',
|
||||
'9': 0,
|
||||
'10': 'finalResult'
|
||||
},
|
||||
{
|
||||
'1': 'error',
|
||||
'3': 5,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.chain.v1.StreamError',
|
||||
'9': 0,
|
||||
'10': 'error'
|
||||
},
|
||||
],
|
||||
'8': [
|
||||
{'1': 'event'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `SubmitStreamEvent`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List submitStreamEventDescriptor = $convert.base64Decode(
|
||||
'ChFTdWJtaXRTdHJlYW1FdmVudBI6CgxzdGVwX3N0YXJ0ZWQYASABKAsyFS5jaGFpbi52MS5TdG'
|
||||
'VwU3RhcnRlZEgAUgtzdGVwU3RhcnRlZBI9Cg1zdGVwX2ZpbmlzaGVkGAIgASgLMhYuY2hhaW4u'
|
||||
'djEuU3RlcEZpbmlzaGVkSABSDHN0ZXBGaW5pc2hlZBI6Cgxtb2R1bGVfZXZlbnQYAyABKAsyFS'
|
||||
'5jaGFpbi52MS5Nb2R1bGVFdmVudEgAUgttb2R1bGVFdmVudBI9CgxmaW5hbF9yZXN1bHQYBCAB'
|
||||
'KAsyGC5jaGFpbi52MS5TdWJtaXRSZXNwb25zZUgAUgtmaW5hbFJlc3VsdBItCgVlcnJvchgFIA'
|
||||
'EoCzIVLmNoYWluLnYxLlN0cmVhbUVycm9ySABSBWVycm9yQgcKBWV2ZW50');
|
||||
|
||||
@$core.Deprecated('Use stepStartedDescriptor instead')
|
||||
const StepStarted$json = {
|
||||
'1': 'StepStarted',
|
||||
'2': [
|
||||
{'1': 'step', '3': 1, '4': 1, '5': 9, '10': 'step'},
|
||||
{'1': 'capability', '3': 2, '4': 1, '5': 9, '10': 'capability'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `StepStarted`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List stepStartedDescriptor = $convert.base64Decode(
|
||||
'CgtTdGVwU3RhcnRlZBISCgRzdGVwGAEgASgJUgRzdGVwEh4KCmNhcGFiaWxpdHkYAiABKAlSCm'
|
||||
'NhcGFiaWxpdHk=');
|
||||
|
||||
@$core.Deprecated('Use stepFinishedDescriptor instead')
|
||||
const StepFinished$json = {
|
||||
'1': 'StepFinished',
|
||||
'2': [
|
||||
{'1': 'step', '3': 1, '4': 1, '5': 9, '10': 'step'},
|
||||
{'1': 'ok', '3': 2, '4': 1, '5': 8, '10': 'ok'},
|
||||
{'1': 'duration_ms', '3': 3, '4': 1, '5': 3, '10': 'durationMs'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `StepFinished`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List stepFinishedDescriptor = $convert.base64Decode(
|
||||
'CgxTdGVwRmluaXNoZWQSEgoEc3RlcBgBIAEoCVIEc3RlcBIOCgJvaxgCIAEoCFICb2sSHwoLZH'
|
||||
'VyYXRpb25fbXMYAyABKANSCmR1cmF0aW9uTXM=');
|
||||
|
||||
@$core.Deprecated('Use moduleEventDescriptor instead')
|
||||
const ModuleEvent$json = {
|
||||
'1': 'ModuleEvent',
|
||||
'2': [
|
||||
{'1': 'step', '3': 1, '4': 1, '5': 9, '10': 'step'},
|
||||
{'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
||||
{
|
||||
'1': 'payload',
|
||||
'3': 3,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.chain.v1.Payload',
|
||||
'10': 'payload'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `ModuleEvent`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List moduleEventDescriptor = $convert.base64Decode(
|
||||
'CgtNb2R1bGVFdmVudBISCgRzdGVwGAEgASgJUgRzdGVwEhIKBG5hbWUYAiABKAlSBG5hbWUSKw'
|
||||
'oHcGF5bG9hZBgDIAEoCzIRLmNoYWluLnYxLlBheWxvYWRSB3BheWxvYWQ=');
|
||||
|
||||
@$core.Deprecated('Use streamErrorDescriptor instead')
|
||||
const StreamError$json = {
|
||||
'1': 'StreamError',
|
||||
'2': [
|
||||
{'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `StreamError`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List streamErrorDescriptor = $convert
|
||||
.base64Decode('CgtTdHJlYW1FcnJvchIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdl');
|
||||
|
||||
@$core.Deprecated('Use invocationStatusDescriptor instead')
|
||||
const InvocationStatus$json = {
|
||||
'1': 'InvocationStatus',
|
||||
'2': [
|
||||
{
|
||||
'1': 'phase',
|
||||
'3': 1,
|
||||
'4': 1,
|
||||
'5': 14,
|
||||
'6': '.chain.v1.InvocationStatus.Phase',
|
||||
'10': 'phase'
|
||||
},
|
||||
{'1': 'current_step', '3': 2, '4': 1, '5': 9, '10': 'currentStep'},
|
||||
{'1': 'started_at', '3': 3, '4': 1, '5': 9, '10': 'startedAt'},
|
||||
{'1': 'finished_at', '3': 4, '4': 1, '5': 9, '10': 'finishedAt'},
|
||||
{'1': 'error', '3': 5, '4': 1, '5': 9, '10': 'error'},
|
||||
],
|
||||
'4': [InvocationStatus_Phase$json],
|
||||
};
|
||||
|
||||
@$core.Deprecated('Use invocationStatusDescriptor instead')
|
||||
const InvocationStatus_Phase$json = {
|
||||
'1': 'Phase',
|
||||
'2': [
|
||||
{'1': 'PHASE_UNKNOWN', '2': 0},
|
||||
{'1': 'PENDING', '2': 1},
|
||||
{'1': 'RUNNING', '2': 2},
|
||||
{'1': 'SUCCEEDED', '2': 3},
|
||||
{'1': 'FAILED', '2': 4},
|
||||
{'1': 'CANCELLED', '2': 5},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `InvocationStatus`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List invocationStatusDescriptor = $convert.base64Decode(
|
||||
'ChBJbnZvY2F0aW9uU3RhdHVzEjYKBXBoYXNlGAEgASgOMiAuY2hhaW4udjEuSW52b2NhdGlvbl'
|
||||
'N0YXR1cy5QaGFzZVIFcGhhc2USIQoMY3VycmVudF9zdGVwGAIgASgJUgtjdXJyZW50U3RlcBId'
|
||||
'CgpzdGFydGVkX2F0GAMgASgJUglzdGFydGVkQXQSHwoLZmluaXNoZWRfYXQYBCABKAlSCmZpbm'
|
||||
'lzaGVkQXQSFAoFZXJyb3IYBSABKAlSBWVycm9yIl4KBVBoYXNlEhEKDVBIQVNFX1VOS05PV04Q'
|
||||
'ABILCgdQRU5ESU5HEAESCwoHUlVOTklORxACEg0KCVNVQ0NFRURFRBADEgoKBkZBSUxFRBAEEg'
|
||||
'0KCUNBTkNFTExFRBAF');
|
||||
|
||||
@$core.Deprecated('Use cancelInvocationResponseDescriptor instead')
|
||||
const CancelInvocationResponse$json = {
|
||||
'1': 'CancelInvocationResponse',
|
||||
'2': [
|
||||
{'1': 'cancelled', '3': 1, '4': 1, '5': 8, '10': 'cancelled'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `CancelInvocationResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List cancelInvocationResponseDescriptor =
|
||||
$convert.base64Decode(
|
||||
'ChhDYW5jZWxJbnZvY2F0aW9uUmVzcG9uc2USHAoJY2FuY2VsbGVkGAEgASgIUgljYW5jZWxsZW'
|
||||
'Q=');
|
||||
|
||||
@$core.Deprecated('Use moduleListDescriptor instead')
|
||||
const ModuleList$json = {
|
||||
'1': 'ModuleList',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue