From ec9149b7658940c85c0a1e5db2d21f632f03bb2b Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Wed, 12 Feb 2025 15:47:11 +0100 Subject: [PATCH 1/3] intents: openScopedSession intent --- intents/intent.gen.go | 12 ++++++++++-- intents/intent.ridl | 9 +++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/intents/intent.gen.go b/intents/intent.gen.go index 6dba047e..5e24635e 100644 --- a/intents/intent.gen.go +++ b/intents/intent.gen.go @@ -1,4 +1,4 @@ -// sequence-waas-intents v0.1.0 2ceeffac8ca0cebead69d58a1aa7a27d30ecb864 +// sequence-waas-intents v0.1.0 a0903443e93d1b801b782c8f9941477b551f2e70 // -- // Code generated by webrpc-gen@v0.19.3 with golang generator. DO NOT EDIT. // @@ -27,7 +27,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "2ceeffac8ca0cebead69d58a1aa7a27d30ecb864" + return "a0903443e93d1b801b782c8f9941477b551f2e70" } // @@ -39,6 +39,7 @@ type IntentName string const ( IntentName_initiateAuth IntentName = "initiateAuth" IntentName_openSession IntentName = "openSession" + IntentName_openScopedSession IntentName = "openScopedSession" IntentName_closeSession IntentName = "closeSession" IntentName_validateSession IntentName = "validateSession" IntentName_finishValidateSession IntentName = "finishValidateSession" @@ -297,6 +298,13 @@ type IntentDataOpenSession struct { IdToken *string `json:"idToken,omitempty"` } +type IntentDataOpenScopedSession struct { + SessionID string `json:"sessionId"` + ScopedSessionID string `json:"scopedSessionId"` + Wallet string `json:"wallet"` + Scope string `json:"scope"` +} + type IntentDataCloseSession struct { SessionID string `json:"sessionId"` } diff --git a/intents/intent.ridl b/intents/intent.ridl index c0e4e31a..13ac44b1 100644 --- a/intents/intent.ridl +++ b/intents/intent.ridl @@ -20,6 +20,7 @@ struct Signature enum IntentName: string - initiateAuth - openSession + - openScopedSession - closeSession - validateSession - finishValidateSession @@ -70,6 +71,14 @@ struct IntentDataOpenSession - idToken?: string + go.tag.json = idToken,omitempty +struct IntentDataOpenScopedSession + - sessionId: string + + go.field.name = SessionID + - scopedSessionId: string + + go.field.name = ScopedSessionID + - wallet: string + - scope: string + struct IntentDataCloseSession - sessionId: string + go.field.name = SessionID From 88efe4e66e49bc36c8269aa6440c4f595027565c Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 18 Feb 2025 19:46:57 +0100 Subject: [PATCH 2/3] intents: rename scope to projectId --- intents/intent.gen.go | 6 +++--- intents/intent.ridl | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/intents/intent.gen.go b/intents/intent.gen.go index 5e24635e..d41c32ae 100644 --- a/intents/intent.gen.go +++ b/intents/intent.gen.go @@ -1,4 +1,4 @@ -// sequence-waas-intents v0.1.0 a0903443e93d1b801b782c8f9941477b551f2e70 +// sequence-waas-intents v0.1.0 7378e9992f73e21a87a2091e9632962838ba106b // -- // Code generated by webrpc-gen@v0.19.3 with golang generator. DO NOT EDIT. // @@ -27,7 +27,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "a0903443e93d1b801b782c8f9941477b551f2e70" + return "7378e9992f73e21a87a2091e9632962838ba106b" } // @@ -302,7 +302,7 @@ type IntentDataOpenScopedSession struct { SessionID string `json:"sessionId"` ScopedSessionID string `json:"scopedSessionId"` Wallet string `json:"wallet"` - Scope string `json:"scope"` + ProjectID uint64 `json:"projectId"` } type IntentDataCloseSession struct { diff --git a/intents/intent.ridl b/intents/intent.ridl index 13ac44b1..d8bc846a 100644 --- a/intents/intent.ridl +++ b/intents/intent.ridl @@ -77,7 +77,8 @@ struct IntentDataOpenScopedSession - scopedSessionId: string + go.field.name = ScopedSessionID - wallet: string - - scope: string + - projectId: uint64 + + go.field.name = ProjectID struct IntentDataCloseSession - sessionId: string From 002704ebe2bf022825f7ea19c5b9beef5f12d89a Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Wed, 19 Feb 2025 14:31:09 +0100 Subject: [PATCH 3/3] intents: add missing intent name --- intents/intent_typed.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intents/intent_typed.go b/intents/intent_typed.go index 4455b4d8..f85d6ac7 100644 --- a/intents/intent_typed.go +++ b/intents/intent_typed.go @@ -13,6 +13,8 @@ func IntentDataTypeToName[T any](t *T) IntentName { return IntentName_initiateAuth case *IntentDataOpenSession: return IntentName_openSession + case *IntentDataOpenScopedSession: + return IntentName_openScopedSession case *IntentDataCloseSession: return IntentName_closeSession case *IntentDataValidateSession: