Skip to content

Commit 45aceb4

Browse files
committed
chore: regen sdk
1 parent e94c768 commit 45aceb4

File tree

112 files changed

+3060
-829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3060
-829
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"magicbell-go": minor
3+
---
4+
5+
Automatic minor version bump for changes in `magicbell-go`.

README.md

Lines changed: 142 additions & 25 deletions
Large diffs are not rendered by default.

cmd/project-client/examples/example.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package main
22

33
import (
44
"bufio"
5-
"context"
65
"fmt"
76
"os"
87
"strings"
98

9+
"context"
10+
"github.com/magicbell/magicbell-go/pkg/project-client/broadcasts"
1011
"github.com/magicbell/magicbell-go/pkg/project-client/client"
1112
"github.com/magicbell/magicbell-go/pkg/project-client/clientconfig"
12-
13-
"github.com/magicbell/magicbell-go/pkg/project-client/broadcasts"
13+
"github.com/magicbell/magicbell-go/pkg/project-client/util"
1414
)
1515

1616
func main() {
@@ -19,7 +19,11 @@ func main() {
1919
config := clientconfig.NewConfig()
2020
client := client.NewClient(config)
2121

22-
params := broadcasts.ListBroadcastsRequestParams{}
22+
params := broadcasts.ListBroadcastsRequestParams{
23+
Limit: util.ToPointer(int64(8)),
24+
StartingAfter: util.ToPointer("starting_after"),
25+
EndingBefore: util.ToPointer("ending_before"),
26+
}
2327

2428
response, err := client.Broadcasts.ListBroadcasts(context.Background(), params)
2529
if err != nil {

cmd/user-client/examples/example.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package main
22

33
import (
44
"bufio"
5-
"context"
65
"fmt"
76
"os"
87
"strings"
98

9+
"context"
10+
"github.com/magicbell/magicbell-go/pkg/user-client/channels"
1011
"github.com/magicbell/magicbell-go/pkg/user-client/client"
1112
"github.com/magicbell/magicbell-go/pkg/user-client/clientconfig"
12-
13-
"github.com/magicbell/magicbell-go/pkg/user-client/channels"
13+
"github.com/magicbell/magicbell-go/pkg/user-client/util"
1414
)
1515

1616
func main() {
@@ -19,7 +19,11 @@ func main() {
1919
config := clientconfig.NewConfig()
2020
client := client.NewClient(config)
2121

22-
params := channels.ListInboxTokensRequestParams{}
22+
params := channels.ListInboxTokensRequestParams{
23+
Limit: util.ToPointer(int64(8)),
24+
StartingAfter: util.ToPointer("starting_after"),
25+
EndingBefore: util.ToPointer("ending_before"),
26+
}
2327

2428
response, err := client.Channels.ListInboxTokens(context.Background(), params)
2529
if err != nil {

docs/project-client/README.md

Lines changed: 89 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ title: "project-client"
88

99
This SDK is compatible with the following versions: `Go >= 1.19.0`
1010

11+
## Installation
12+
13+
To get started with the SDK, we recommend installing using `go get`:
14+
15+
```bash
16+
go get client
17+
```
18+
1119
## Authentication
1220

1321
### Access Token Authentication
@@ -46,11 +54,60 @@ sdk := client.NewClient(config)
4654
sdk.SetAccessToken("YOUR-TOKEN")
4755
```
4856

57+
## Setting a Custom Timeout
58+
59+
You can set a custom timeout for the SDK's HTTP requests as follows:
60+
61+
```go
62+
import "time"
63+
64+
config := clientconfig.NewConfig()
65+
66+
sdk := client.NewClient(config)
67+
68+
sdk.SetTimeout(10 * time.Second)
69+
```
70+
71+
# Sample Usage
72+
73+
Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:
74+
75+
```go
76+
import (
77+
"fmt"
78+
"encoding/json"
79+
"context"
80+
"github.com/magicbell/magicbell-go/pkg/project-client/clientconfig"
81+
"github.com/magicbell/magicbell-go/pkg/project-client/client"
82+
"github.com/magicbell/magicbell-go/pkg/project-client/util"
83+
"github.com/magicbell/magicbell-go/pkg/project-client/broadcasts"
84+
)
85+
86+
config := clientconfig.NewConfig()
87+
config.SetAccessToken("ACCESS_TOKEN")
88+
client := client.NewClient(config)
89+
90+
91+
params := broadcasts.ListBroadcastsRequestParams{
92+
Limit: util.ToPointer(int64(8)),
93+
StartingAfter: util.ToPointer("starting_after"),
94+
EndingBefore: util.ToPointer("ending_before"),
95+
}
96+
97+
response, err := client.Broadcasts.ListBroadcasts(context.Background(), params)
98+
if err != nil {
99+
panic(err)
100+
}
101+
102+
fmt.Println(response)
103+
104+
```
105+
49106
## Services
50107

51108
The SDK provides various services to interact with the API.
52109

53-
<details>
110+
<details>
54111
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
55112

56113
| Name |
@@ -60,6 +117,7 @@ The SDK provides various services to interact with the API.
60117
| [EventsService](services/events_service.md) |
61118
| [IntegrationsService](services/integrations_service.md) |
62119
| [UsersService](services/users_service.md) |
120+
| [WorkflowsService](services/workflows_service.md) |
63121

64122
</details>
65123

@@ -106,16 +164,19 @@ This struct is shared by both response wrappers and contains the following field
106164

107165
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
108166

109-
<details>
167+
<details>
110168
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
111169

112170
| Name | Description |
113171
| :-------------------------------------------------------------------------------------- | :---------- |
114172
| [BroadcastCollection](models/broadcast_collection.md) | |
115173
| [Broadcast](models/broadcast.md) | |
174+
| [User](models/user.md) | |
175+
| [Links](models/links.md) | |
116176
| [CategoryDeliveryConfig](models/category_delivery_config.md) | |
117177
| [InboxTokenResponseCollection](models/inbox_token_response_collection.md) | |
118178
| [InboxTokenResponse](models/inbox_token_response.md) | |
179+
| [Links](models/links.md) | |
119180
| [DiscardResult](models/discard_result.md) | |
120181
| [ApnsTokenCollection](models/apns_token_collection.md) | |
121182
| [ApnsToken](models/apns_token.md) | |
@@ -131,49 +192,61 @@ The SDK includes several models that represent the data structures used in API r
131192
| [WebPushToken](models/web_push_token.md) | |
132193
| [EventCollection](models/event_collection.md) | |
133194
| [Event](models/event.md) | |
195+
| [Links](models/links.md) | |
134196
| [IntegrationConfigCollection](models/integration_config_collection.md) | |
197+
| [IntegrationConfig](models/integration_config.md) | |
198+
| [Links](models/links.md) | |
135199
| [ApnsConfigCollection](models/apns_config_collection.md) | |
200+
| [ApnsConfig](models/apns_config.md) | |
136201
| [ApnsConfigPayload](models/apns_config_payload.md) | |
202+
| [EventSourceConfigCollection](models/event_source_config_collection.md) | |
203+
| [EventSourceConfig](models/event_source_config.md) | |
204+
| [EventSourceConfigPayload](models/event_source_config_payload.md) | |
137205
| [ExpoConfigCollection](models/expo_config_collection.md) | |
206+
| [ExpoConfig](models/expo_config.md) | |
138207
| [ExpoConfigPayload](models/expo_config_payload.md) | |
139208
| [FcmConfigCollection](models/fcm_config_collection.md) | |
209+
| [FcmConfig](models/fcm_config.md) | |
140210
| [FcmConfigPayload](models/fcm_config_payload.md) | |
141211
| [GithubConfigCollection](models/github_config_collection.md) | |
212+
| [GithubConfig](models/github_config.md) | |
142213
| [GithubConfigPayload](models/github_config_payload.md) | |
143214
| [InboxConfigCollection](models/inbox_config_collection.md) | |
215+
| [InboxConfig](models/inbox_config.md) | |
144216
| [InboxConfigPayload](models/inbox_config_payload.md) | |
145217
| [MailgunConfigCollection](models/mailgun_config_collection.md) | |
218+
| [MailgunConfig](models/mailgun_config.md) | |
146219
| [MailgunConfigPayload](models/mailgun_config_payload.md) | |
147220
| [PingConfigCollection](models/ping_config_collection.md) | |
221+
| [PingConfig](models/ping_config.md) | |
148222
| [PingConfigPayload](models/ping_config_payload.md) | |
149223
| [SendgridConfigCollection](models/sendgrid_config_collection.md) | |
224+
| [SendgridConfig](models/sendgrid_config.md) | |
150225
| [SendgridConfigPayload](models/sendgrid_config_payload.md) | |
151226
| [SesConfigCollection](models/ses_config_collection.md) | |
227+
| [SesConfig](models/ses_config.md) | |
152228
| [SesConfigPayload](models/ses_config_payload.md) | |
153229
| [SlackConfigCollection](models/slack_config_collection.md) | |
230+
| [SlackConfig](models/slack_config.md) | |
154231
| [SlackConfigPayload](models/slack_config_payload.md) | |
155232
| [StripeConfigCollection](models/stripe_config_collection.md) | |
233+
| [StripeConfig](models/stripe_config.md) | |
156234
| [StripeConfigPayload](models/stripe_config_payload.md) | |
157235
| [TwilioConfigCollection](models/twilio_config_collection.md) | |
236+
| [TwilioConfig](models/twilio_config.md) | |
158237
| [TwilioConfigPayload](models/twilio_config_payload.md) | |
159238
| [WebpushConfigCollection](models/webpush_config_collection.md) | |
239+
| [WebpushConfig](models/webpush_config.md) | |
160240
| [WebpushConfigPayload](models/webpush_config_payload.md) | |
161241
| [UserCollection](models/user_collection.md) | |
162242
| [User](models/user.md) | |
163243
| [Links](models/links.md) | |
164-
| [IntegrationConfig](models/integration_config.md) | |
165-
| [ApnsConfig](models/apns_config.md) | |
166-
| [ExpoConfig](models/expo_config.md) | |
167-
| [FcmConfig](models/fcm_config.md) | |
168-
| [GithubConfig](models/github_config.md) | |
169-
| [InboxConfig](models/inbox_config.md) | |
170-
| [MailgunConfig](models/mailgun_config.md) | |
171-
| [PingConfig](models/ping_config.md) | |
172-
| [SendgridConfig](models/sendgrid_config.md) | |
173-
| [SesConfig](models/ses_config.md) | |
174-
| [SlackConfig](models/slack_config.md) | |
175-
| [StripeConfig](models/stripe_config.md) | |
176-
| [TwilioConfig](models/twilio_config.md) | |
177-
| [WebpushConfig](models/webpush_config.md) | |
244+
| [WorkflowDefinition](models/workflow_definition.md) | |
245+
| [ExecuteWorkflowRequest](models/execute_workflow_request.md) | |
246+
| [CreateRunResponse](models/create_run_response.md) | |
247+
| [GetRunResponse](models/get_run_response.md) | |
248+
| [WorkflowRunCollection](models/workflow_run_collection.md) | |
249+
| [WorkflowRun](models/workflow_run.md) | |
250+
| [Links](models/links.md) | |
178251

179252
</details>

docs/project-client/models/apns_config.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
**Properties**
44

5-
| Name | Type | Required | Description |
6-
| :----- | :----------------------------- | :------- | :---------- |
7-
| Config | integrations.ApnsConfigPayload || |
8-
| Id | string || |
9-
| Name | string || |
5+
| Name | Type | Required | Description |
6+
| :----- | :------------------------------------------------------- | :------- | :---------- |
7+
| Config | [integrations.ApnsConfigPayload](apns_config_payload.md) || |
8+
| Id | string || |
9+
| Name | string || |

docs/project-client/models/apns_config_collection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Properties**
44

5-
| Name | Type | Required | Description |
6-
| :---- | :------------------------ | :------- | :---------- |
7-
| Data | []integrations.ApnsConfig || |
8-
| Links | shared.Links || |
5+
| Name | Type | Required | Description |
6+
| :---- | :------------------------------------------ | :------- | :---------- |
7+
| Data | [][integrations.ApnsConfig](apns_config.md) || |
8+
| Links | [shared.Links](links.md) || |

docs/project-client/models/apns_config_payload.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
| Name | Type | Required | Description |
1919
| :----- | :----- | :------- | :---------- |
20-
| unread | string || "unread" |
21-
| unseen | string || "unseen" |
20+
| Unread | string || "unread" |
21+
| Unseen | string || "unseen" |
2222

2323
# PayloadVersion
2424

docs/project-client/models/apns_token.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020

2121
| Name | Type | Required | Description |
2222
| :---------- | :----- | :------- | :------------ |
23-
| development | string || "development" |
24-
| production | string || "production" |
23+
| Development | string || "development" |
24+
| Production | string || "production" |

docs/project-client/models/apns_token_collection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Properties**
44

5-
| Name | Type | Required | Description |
6-
| :---- | :------------------- | :------- | :---------- |
7-
| Data | []channels.ApnsToken || |
8-
| Links | shared.Links || |
5+
| Name | Type | Required | Description |
6+
| :---- | :------------------------------------ | :------- | :---------- |
7+
| Data | [][channels.ApnsToken](apns_token.md) || |
8+
| Links | [shared.Links](links.md) || |

0 commit comments

Comments
 (0)