This repository has no description
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: org.tangled.temp.repo.listWebhooks
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 TempRepoListWebhooksNSID = "org.tangled.temp.repo.listWebhooks"
15)
16
17// TempRepoListWebhooks_Output is the output of a org.tangled.temp.repo.listWebhooks call.
18type TempRepoListWebhooks_Output struct {
19 Webhooks []*TempRepoListWebhooks_Webhook `json:"webhooks" cborgen:"webhooks"`
20}
21
22// TempRepoListWebhooks_Webhook is a "webhook" in the org.tangled.temp.repo.listWebhooks schema.
23type TempRepoListWebhooks_Webhook struct {
24 // active: Whether the webhook is currently enabled.
25 Active bool `json:"active" cborgen:"active"`
26 CreatedAt string `json:"createdAt" cborgen:"createdAt"`
27 // events: Event types this webhook is subscribed to (e.g. 'push', 'repository:renamed').
28 Events []string `json:"events" cborgen:"events"`
29 // id: Webhook identifier.
30 Id int64 `json:"id" cborgen:"id"`
31 UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"`
32 // url: Endpoint URL that receives webhook payloads.
33 Url string `json:"url" cborgen:"url"`
34}
35
36// TempRepoListWebhooks calls the XRPC method "org.tangled.temp.repo.listWebhooks".
37//
38// repoDid: DID of the repository as minted by the knot.
39func TempRepoListWebhooks(ctx context.Context, c util.LexClient, repoDid string) (*TempRepoListWebhooks_Output, error) {
40 var out TempRepoListWebhooks_Output
41
42 params := map[string]interface{}{}
43 params["repoDid"] = repoDid
44 if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.repo.listWebhooks", params, nil, &out); err != nil {
45 return nil, err
46 }
47
48 return &out, nil
49}