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.createWebhook
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 TempRepoCreateWebhookNSID = "org.tangled.temp.repo.createWebhook"
15)
16
17// TempRepoCreateWebhook_Input is the input argument to a org.tangled.temp.repo.createWebhook call.
18type TempRepoCreateWebhook_Input struct {
19 // active: Whether the webhook should be active immediately. Defaults to true.
20 Active *bool `json:"active,omitempty" cborgen:"active,omitempty"`
21 // events: Event types to subscribe to (e.g. 'push', 'repository:renamed').
22 Events []string `json:"events" cborgen:"events"`
23 // repoDid: DID of the repository as minted by the knot.
24 RepoDid string `json:"repoDid" cborgen:"repoDid"`
25 // secret: Optional HMAC secret used to sign payloads. If omitted, payloads are not signed.
26 Secret *string `json:"secret,omitempty" cborgen:"secret,omitempty"`
27 // url: Endpoint URL that will receive webhook payloads.
28 Url string `json:"url" cborgen:"url"`
29}
30
31// TempRepoCreateWebhook_Output is the output of a org.tangled.temp.repo.createWebhook call.
32type TempRepoCreateWebhook_Output struct {
33 // id: ID of the newly created webhook.
34 Id int64 `json:"id" cborgen:"id"`
35}
36
37// TempRepoCreateWebhook calls the XRPC method "org.tangled.temp.repo.createWebhook".
38func TempRepoCreateWebhook(ctx context.Context, c util.LexClient, input *TempRepoCreateWebhook_Input) (*TempRepoCreateWebhook_Output, error) {
39 var out TempRepoCreateWebhook_Output
40 if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.createWebhook", nil, input, &out); err != nil {
41 return nil, err
42 }
43
44 return &out, nil
45}