Skip to content

Commit 239ae6b

Browse files
committed
chore: regen sdk
1 parent e94c768 commit 239ae6b

Some content is hidden

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

56 files changed

+2754
-547
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: 113 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,60 @@ sdk := client.NewClient(config)
4848
sdk.SetAccessToken("YOUR-TOKEN")
4949
```
5050

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

53102
The SDK provides various services to interact with the API.
54103

55-
<details>
104+
<details>
56105
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
57106

58107
| Name |
@@ -62,6 +111,7 @@ The SDK provides various services to interact with the API.
62111
| [EventsService](docs/project-client/services/events_service.md) |
63112
| [IntegrationsService](docs/project-client/services/integrations_service.md) |
64113
| [UsersService](docs/project-client/services/users_service.md) |
114+
| [WorkflowsService](docs/project-client/services/workflows_service.md) |
65115

66116
</details>
67117

@@ -108,7 +158,7 @@ This struct is shared by both response wrappers and contains the following field
108158

109159
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.
110160

111-
<details>
161+
<details>
112162
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
113163

114164
| Name | Description |
@@ -136,6 +186,8 @@ The SDK includes several models that represent the data structures used in API r
136186
| [IntegrationConfigCollection](docs/project-client/models/integration_config_collection.md) | |
137187
| [ApnsConfigCollection](docs/project-client/models/apns_config_collection.md) | |
138188
| [ApnsConfigPayload](docs/project-client/models/apns_config_payload.md) | |
189+
| [EventSourceConfigCollection](docs/project-client/models/event_source_config_collection.md) | |
190+
| [EventSourceConfigPayload](docs/project-client/models/event_source_config_payload.md) | |
139191
| [ExpoConfigCollection](docs/project-client/models/expo_config_collection.md) | |
140192
| [ExpoConfigPayload](docs/project-client/models/expo_config_payload.md) | |
141193
| [FcmConfigCollection](docs/project-client/models/fcm_config_collection.md) | |
@@ -162,9 +214,15 @@ The SDK includes several models that represent the data structures used in API r
162214
| [WebpushConfigPayload](docs/project-client/models/webpush_config_payload.md) | |
163215
| [UserCollection](docs/project-client/models/user_collection.md) | |
164216
| [User](docs/project-client/models/user.md) | |
217+
| [WorkflowDefinition](docs/project-client/models/workflow_definition.md) | |
218+
| [ExecuteWorkflowRequest](docs/project-client/models/execute_workflow_request.md) | |
219+
| [CreateRunResponse](docs/project-client/models/create_run_response.md) | |
220+
| [GetRunResponse](docs/project-client/models/get_run_response.md) | |
221+
| [WorkflowRunCollection](docs/project-client/models/workflow_run_collection.md) | |
165222
| [Links](docs/project-client/models/links.md) | |
166223
| [IntegrationConfig](docs/project-client/models/integration_config.md) | |
167224
| [ApnsConfig](docs/project-client/models/apns_config.md) | |
225+
| [EventSourceConfig](docs/project-client/models/event_source_config.md) | |
168226
| [ExpoConfig](docs/project-client/models/expo_config.md) | |
169227
| [FcmConfig](docs/project-client/models/fcm_config.md) | |
170228
| [GithubConfig](docs/project-client/models/github_config.md) | |
@@ -177,6 +235,7 @@ The SDK includes several models that represent the data structures used in API r
177235
| [StripeConfig](docs/project-client/models/stripe_config.md) | |
178236
| [TwilioConfig](docs/project-client/models/twilio_config.md) | |
179237
| [WebpushConfig](docs/project-client/models/webpush_config.md) | |
238+
| [WorkflowRun](docs/project-client/models/workflow_run.md) | |
180239

181240
</details>
182241

@@ -224,11 +283,60 @@ sdk := client.NewClient(config)
224283
sdk.SetAccessToken("YOUR-TOKEN")
225284
```
226285

286+
## Setting a Custom Timeout
287+
288+
You can set a custom timeout for the SDK's HTTP requests as follows:
289+
290+
```go
291+
import "time"
292+
293+
config := clientconfig.NewConfig()
294+
295+
sdk := client.NewClient(config)
296+
297+
sdk.SetTimeout(10 * time.Second)
298+
```
299+
300+
# Sample Usage
301+
302+
Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:
303+
304+
```go
305+
import (
306+
"fmt"
307+
"encoding/json"
308+
"context"
309+
"github.com/magicbell/magicbell-go/pkg/user-client/clientconfig"
310+
"github.com/magicbell/magicbell-go/pkg/user-client/client"
311+
"github.com/magicbell/magicbell-go/pkg/user-client/util"
312+
"github.com/magicbell/magicbell-go/pkg/user-client/channels"
313+
)
314+
315+
config := clientconfig.NewConfig()
316+
config.SetAccessToken("ACCESS_TOKEN")
317+
client := client.NewClient(config)
318+
319+
320+
params := channels.ListInboxTokensRequestParams{
321+
Limit: util.ToPointer(int64(8)),
322+
StartingAfter: util.ToPointer("starting_after"),
323+
EndingBefore: util.ToPointer("ending_before"),
324+
}
325+
326+
response, err := client.Channels.ListInboxTokens(context.Background(), params)
327+
if err != nil {
328+
panic(err)
329+
}
330+
331+
fmt.Println(response)
332+
333+
```
334+
227335
## Services
228336

229337
The SDK provides various services to interact with the API.
230338

231-
<details>
339+
<details>
232340
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
233341

234342
| Name |
@@ -282,7 +390,7 @@ This struct is shared by both response wrappers and contains the following field
282390

283391
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.
284392

285-
<details>
393+
<details>
286394
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
287395

288396
| Name | Description |
@@ -306,6 +414,7 @@ The SDK includes several models that represent the data structures used in API r
306414
| [TeamsTokenCollection](docs/user-client/models/teams_token_collection.md) | |
307415
| [TeamsTokenPayload](docs/user-client/models/teams_token_payload.md) | |
308416
| [TeamsToken](docs/user-client/models/teams_token.md) | |
417+
| [UserPreferences](docs/user-client/models/user_preferences.md) | |
309418
| [WebPushTokenCollection](docs/user-client/models/web_push_token_collection.md) | |
310419
| [WebPushTokenPayload](docs/user-client/models/web_push_token_payload.md) | |
311420
| [WebPushToken](docs/user-client/models/web_push_token.md) | |

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: 69 additions & 2 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,7 +164,7 @@ 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 |
@@ -134,6 +192,8 @@ The SDK includes several models that represent the data structures used in API r
134192
| [IntegrationConfigCollection](models/integration_config_collection.md) | |
135193
| [ApnsConfigCollection](models/apns_config_collection.md) | |
136194
| [ApnsConfigPayload](models/apns_config_payload.md) | |
195+
| [EventSourceConfigCollection](models/event_source_config_collection.md) | |
196+
| [EventSourceConfigPayload](models/event_source_config_payload.md) | |
137197
| [ExpoConfigCollection](models/expo_config_collection.md) | |
138198
| [ExpoConfigPayload](models/expo_config_payload.md) | |
139199
| [FcmConfigCollection](models/fcm_config_collection.md) | |
@@ -160,9 +220,15 @@ The SDK includes several models that represent the data structures used in API r
160220
| [WebpushConfigPayload](models/webpush_config_payload.md) | |
161221
| [UserCollection](models/user_collection.md) | |
162222
| [User](models/user.md) | |
223+
| [WorkflowDefinition](models/workflow_definition.md) | |
224+
| [ExecuteWorkflowRequest](models/execute_workflow_request.md) | |
225+
| [CreateRunResponse](models/create_run_response.md) | |
226+
| [GetRunResponse](models/get_run_response.md) | |
227+
| [WorkflowRunCollection](models/workflow_run_collection.md) | |
163228
| [Links](models/links.md) | |
164229
| [IntegrationConfig](models/integration_config.md) | |
165230
| [ApnsConfig](models/apns_config.md) | |
231+
| [EventSourceConfig](models/event_source_config.md) | |
166232
| [ExpoConfig](models/expo_config.md) | |
167233
| [FcmConfig](models/fcm_config.md) | |
168234
| [GithubConfig](models/github_config.md) | |
@@ -175,5 +241,6 @@ The SDK includes several models that represent the data structures used in API r
175241
| [StripeConfig](models/stripe_config.md) | |
176242
| [TwilioConfig](models/twilio_config.md) | |
177243
| [WebpushConfig](models/webpush_config.md) | |
244+
| [WorkflowRun](models/workflow_run.md) | |
178245

179246
</details>

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

0 commit comments

Comments
 (0)