diff --git a/api/multiparty/prompt/v1/notify.pb.go b/api/multiparty/prompt/v1/notify.pb.go index 7618ee5..22b7bf7 100644 --- a/api/multiparty/prompt/v1/notify.pb.go +++ b/api/multiparty/prompt/v1/notify.pb.go @@ -235,6 +235,104 @@ func (x *WebPushSubscriptionKeys) GetAuth() string { return "" } +// GetSubscribeOptionsRequest is a request to get the options for subscribing. +type GetSubscribeOptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SpaceName is the name being subscribed to. + SpaceName string `protobuf:"bytes,1,opt,name=space_name,json=spaceName,proto3" json:"space_name,omitempty"` +} + +func (x *GetSubscribeOptionsRequest) Reset() { + *x = GetSubscribeOptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_multiparty_prompt_v1_notify_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubscribeOptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubscribeOptionsRequest) ProtoMessage() {} + +func (x *GetSubscribeOptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_multiparty_prompt_v1_notify_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubscribeOptionsRequest.ProtoReflect.Descriptor instead. +func (*GetSubscribeOptionsRequest) Descriptor() ([]byte, []int) { + return file_multiparty_prompt_v1_notify_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSubscribeOptionsRequest) GetSpaceName() string { + if x != nil { + return x.SpaceName + } + return "" +} + +// SubscribeOptions are options for subscribing. +type SubscribeOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ApplicationServerKey is the ECDSA P-256 public key that the push server will use to authenticate your server. + ApplicationServerKey string `protobuf:"bytes,1,opt,name=application_server_key,json=applicationServerKey,proto3" json:"application_server_key,omitempty"` +} + +func (x *SubscribeOptions) Reset() { + *x = SubscribeOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_multiparty_prompt_v1_notify_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeOptions) ProtoMessage() {} + +func (x *SubscribeOptions) ProtoReflect() protoreflect.Message { + mi := &file_multiparty_prompt_v1_notify_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscribeOptions.ProtoReflect.Descriptor instead. +func (*SubscribeOptions) Descriptor() ([]byte, []int) { + return file_multiparty_prompt_v1_notify_proto_rawDescGZIP(), []int{4} +} + +func (x *SubscribeOptions) GetApplicationServerKey() string { + if x != nil { + return x.ApplicationServerKey + } + return "" +} + var File_multiparty_prompt_v1_notify_proto protoreflect.FileDescriptor var file_multiparty_prompt_v1_notify_proto_rawDesc = []byte{ @@ -271,21 +369,30 @@ var file_multiparty_prompt_v1_notify_proto_rawDesc = []byte{ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x32, 0x35, 0x36, 0x64, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x32, 0x35, 0x36, 0x64, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x42, 0xdf, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, - 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x44, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2e, 0x61, - 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x2f, 0x76, 0x31, 0x3b, - 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x50, 0x58, 0xaa, 0x02, - 0x14, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x6d, - 0x70, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x5c, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x20, 0x4d, + 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22, 0x3b, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x48, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x42, 0xdf, 0x01, + 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x2e, 0x61, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x70, 0x72, 0x6f, + 0x6d, 0x70, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x4d, 0x50, 0x58, 0xaa, 0x02, 0x14, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5c, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x16, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, 0x3a, 0x3a, 0x50, 0x72, - 0x6f, 0x6d, 0x70, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x20, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5c, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -300,16 +407,18 @@ func file_multiparty_prompt_v1_notify_proto_rawDescGZIP() []byte { return file_multiparty_prompt_v1_notify_proto_rawDescData } -var file_multiparty_prompt_v1_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_multiparty_prompt_v1_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_multiparty_prompt_v1_notify_proto_goTypes = []interface{}{ (*CreateWebPushSubscriptionRequest)(nil), // 0: multiparty.prompt.v1.CreateWebPushSubscriptionRequest (*WebPushSubscription)(nil), // 1: multiparty.prompt.v1.WebPushSubscription (*WebPushSubscriptionKeys)(nil), // 2: multiparty.prompt.v1.WebPushSubscriptionKeys - (*Meta)(nil), // 3: multiparty.prompt.v1.Meta + (*GetSubscribeOptionsRequest)(nil), // 3: multiparty.prompt.v1.GetSubscribeOptionsRequest + (*SubscribeOptions)(nil), // 4: multiparty.prompt.v1.SubscribeOptions + (*Meta)(nil), // 5: multiparty.prompt.v1.Meta } var file_multiparty_prompt_v1_notify_proto_depIdxs = []int32{ 2, // 0: multiparty.prompt.v1.CreateWebPushSubscriptionRequest.keys:type_name -> multiparty.prompt.v1.WebPushSubscriptionKeys - 3, // 1: multiparty.prompt.v1.WebPushSubscription.meta:type_name -> multiparty.prompt.v1.Meta + 5, // 1: multiparty.prompt.v1.WebPushSubscription.meta:type_name -> multiparty.prompt.v1.Meta 2, // 2: multiparty.prompt.v1.WebPushSubscription.keys:type_name -> multiparty.prompt.v1.WebPushSubscriptionKeys 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type @@ -361,6 +470,30 @@ func file_multiparty_prompt_v1_notify_proto_init() { return nil } } + file_multiparty_prompt_v1_notify_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubscribeOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_multiparty_prompt_v1_notify_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -368,7 +501,7 @@ func file_multiparty_prompt_v1_notify_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_multiparty_prompt_v1_notify_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/multiparty/prompt/v1/notify.proto b/api/multiparty/prompt/v1/notify.proto index e860860..599fff7 100644 --- a/api/multiparty/prompt/v1/notify.proto +++ b/api/multiparty/prompt/v1/notify.proto @@ -56,3 +56,15 @@ message WebPushSubscriptionKeys { // Auth is the authentication secret used to encrypt the push message. string auth = 2; } + +// GetSubscribeOptionsRequest is a request to get the options for subscribing. +message GetSubscribeOptionsRequest { + // SpaceName is the name being subscribed to. + string space_name = 1; +} + +// SubscribeOptions are options for subscribing. +message SubscribeOptions { + // ApplicationServerKey is the ECDSA P-256 public key that the push server will use to authenticate your server. + string application_server_key = 1; +} diff --git a/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.py b/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.py index 66b26f1..665a057 100644 --- a/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.py +++ b/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.py @@ -15,7 +15,7 @@ from multiparty.prompt.v1 import prompt_pb2 as multiparty_dot_prompt_dot_v1_dot_prompt__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!multiparty/prompt/v1/notify.proto\x12\x14multiparty.prompt.v1\x1a!multiparty/prompt/v1/prompt.proto\"\xc9\x01\n CreateWebPushSubscriptionRequest\x12\x1d\n\nspace_name\x18\x01 \x01(\tR\tspaceName\x12\x1a\n\x08\x65ndpoint\x18\x02 \x01(\tR\x08\x65ndpoint\x12\'\n\x0f\x65xpiration_time\x18\x03 \x01(\x04R\x0e\x65xpirationTime\x12\x41\n\x04keys\x18\x04 \x01(\x0b\x32-.multiparty.prompt.v1.WebPushSubscriptionKeysR\x04keys\"\xa4\x01\n\x13WebPushSubscription\x12.\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.multiparty.prompt.v1.MetaR\x04meta\x12\x1a\n\x08\x65ndpoint\x18\x02 \x01(\tR\x08\x65ndpoint\x12\x41\n\x04keys\x18\x03 \x01(\x0b\x32-.multiparty.prompt.v1.WebPushSubscriptionKeysR\x04keys\"E\n\x17WebPushSubscriptionKeys\x12\x16\n\x06p256dh\x18\x01 \x01(\tR\x06p256dh\x12\x12\n\x04\x61uth\x18\x02 \x01(\tR\x04\x61uthB\xdf\x01\n\x18\x63om.multiparty.prompt.v1B\x0bNotifyProtoP\x01ZDmultiparty.ai/api/multiparty/prompt/v1/multiparty/prompt/v1;promptv1\xa2\x02\x03MPX\xaa\x02\x14Multiparty.Prompt.V1\xca\x02\x14Multiparty\\Prompt\\V1\xe2\x02 Multiparty\\Prompt\\V1\\GPBMetadata\xea\x02\x16Multiparty::Prompt::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!multiparty/prompt/v1/notify.proto\x12\x14multiparty.prompt.v1\x1a!multiparty/prompt/v1/prompt.proto\"\xc9\x01\n CreateWebPushSubscriptionRequest\x12\x1d\n\nspace_name\x18\x01 \x01(\tR\tspaceName\x12\x1a\n\x08\x65ndpoint\x18\x02 \x01(\tR\x08\x65ndpoint\x12\'\n\x0f\x65xpiration_time\x18\x03 \x01(\x04R\x0e\x65xpirationTime\x12\x41\n\x04keys\x18\x04 \x01(\x0b\x32-.multiparty.prompt.v1.WebPushSubscriptionKeysR\x04keys\"\xa4\x01\n\x13WebPushSubscription\x12.\n\x04meta\x18\x01 \x01(\x0b\x32\x1a.multiparty.prompt.v1.MetaR\x04meta\x12\x1a\n\x08\x65ndpoint\x18\x02 \x01(\tR\x08\x65ndpoint\x12\x41\n\x04keys\x18\x03 \x01(\x0b\x32-.multiparty.prompt.v1.WebPushSubscriptionKeysR\x04keys\"E\n\x17WebPushSubscriptionKeys\x12\x16\n\x06p256dh\x18\x01 \x01(\tR\x06p256dh\x12\x12\n\x04\x61uth\x18\x02 \x01(\tR\x04\x61uth\";\n\x1aGetSubscribeOptionsRequest\x12\x1d\n\nspace_name\x18\x01 \x01(\tR\tspaceName\"H\n\x10SubscribeOptions\x12\x34\n\x16\x61pplication_server_key\x18\x01 \x01(\tR\x14\x61pplicationServerKeyB\xdf\x01\n\x18\x63om.multiparty.prompt.v1B\x0bNotifyProtoP\x01ZDmultiparty.ai/api/multiparty/prompt/v1/multiparty/prompt/v1;promptv1\xa2\x02\x03MPX\xaa\x02\x14Multiparty.Prompt.V1\xca\x02\x14Multiparty\\Prompt\\V1\xe2\x02 Multiparty\\Prompt\\V1\\GPBMetadata\xea\x02\x16Multiparty::Prompt::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,4 +29,8 @@ _globals['_WEBPUSHSUBSCRIPTION']._serialized_end=463 _globals['_WEBPUSHSUBSCRIPTIONKEYS']._serialized_start=465 _globals['_WEBPUSHSUBSCRIPTIONKEYS']._serialized_end=534 + _globals['_GETSUBSCRIBEOPTIONSREQUEST']._serialized_start=536 + _globals['_GETSUBSCRIBEOPTIONSREQUEST']._serialized_end=595 + _globals['_SUBSCRIBEOPTIONS']._serialized_start=597 + _globals['_SUBSCRIBEOPTIONS']._serialized_end=669 # @@protoc_insertion_point(module_scope) diff --git a/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.pyi b/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.pyi index eb9aade..3664651 100644 --- a/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.pyi +++ b/clients/python/multiparty/api/multiparty/prompt/v1/notify_pb2.pyi @@ -110,3 +110,39 @@ class WebPushSubscriptionKeys(google.protobuf.message.Message): def ClearField(self, field_name: typing_extensions.Literal["auth", b"auth", "p256dh", b"p256dh"]) -> None: ... global___WebPushSubscriptionKeys = WebPushSubscriptionKeys + +@typing_extensions.final +class GetSubscribeOptionsRequest(google.protobuf.message.Message): + """GetSubscribeOptionsRequest is a request to get the options for subscribing.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SPACE_NAME_FIELD_NUMBER: builtins.int + space_name: builtins.str + """SpaceName is the name being subscribed to.""" + def __init__( + self, + *, + space_name: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["space_name", b"space_name"]) -> None: ... + +global___GetSubscribeOptionsRequest = GetSubscribeOptionsRequest + +@typing_extensions.final +class SubscribeOptions(google.protobuf.message.Message): + """SubscribeOptions are options for subscribing.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + APPLICATION_SERVER_KEY_FIELD_NUMBER: builtins.int + application_server_key: builtins.str + """ApplicationServerKey is the ECDSA P-256 public key that the push server will use to authenticate your server.""" + def __init__( + self, + *, + application_server_key: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["application_server_key", b"application_server_key"]) -> None: ... + +global___SubscribeOptions = SubscribeOptions