Live video on the AT Protocol
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package streamplace
4
5// schema: place.stream.server.updateWebhook
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13// ServerUpdateWebhook_Input is the input argument to a place.stream.server.updateWebhook call.
14type ServerUpdateWebhook_Input struct {
15 // active: Whether this webhook should be active.
16 Active *bool `json:"active,omitempty" cborgen:"active,omitempty"`
17 // description: A description of what this webhook is used for.
18 Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
19 // events: The types of events this webhook should receive.
20 Events []string `json:"events,omitempty" cborgen:"events,omitempty"`
21 // id: The ID of the webhook to update.
22 Id string `json:"id" cborgen:"id"`
23 // muteWords: Words to filter out from chat messages. Messages containing any of these words will not be forwarded.
24 MuteWords []string `json:"muteWords,omitempty" cborgen:"muteWords,omitempty"`
25 // name: A user-friendly name for this webhook.
26 Name *string `json:"name,omitempty" cborgen:"name,omitempty"`
27 // prefix: Text to prepend to webhook messages.
28 Prefix *string `json:"prefix,omitempty" cborgen:"prefix,omitempty"`
29 // rewrite: Text replacement rules for webhook messages.
30 Rewrite []*ServerDefs_RewriteRule `json:"rewrite,omitempty" cborgen:"rewrite,omitempty"`
31 // suffix: Text to append to webhook messages.
32 Suffix *string `json:"suffix,omitempty" cborgen:"suffix,omitempty"`
33 // url: The webhook URL where events will be sent.
34 Url *string `json:"url,omitempty" cborgen:"url,omitempty"`
35}
36
37// ServerUpdateWebhook_Output is the output of a place.stream.server.updateWebhook call.
38type ServerUpdateWebhook_Output struct {
39 Webhook *ServerDefs_Webhook `json:"webhook" cborgen:"webhook"`
40}
41
42// ServerUpdateWebhook calls the XRPC method "place.stream.server.updateWebhook".
43func ServerUpdateWebhook(ctx context.Context, c util.LexClient, input *ServerUpdateWebhook_Input) (*ServerUpdateWebhook_Output, error) {
44 var out ServerUpdateWebhook_Output
45 if err := c.LexDo(ctx, util.Procedure, "application/json", "place.stream.server.updateWebhook", nil, input, &out); err != nil {
46 return nil, err
47 }
48
49 return &out, nil
50}