Skip to content

Commit 7e06e2a

Browse files
committed
chore: regen sdk
1 parent e94c768 commit 7e06e2a

File tree

14 files changed

+505
-325
lines changed

14 files changed

+505
-325
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: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,25 @@ 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+
5165
## Services
5266

5367
The SDK provides various services to interact with the API.
5468

55-
<details>
69+
<details>
5670
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
5771

5872
| Name |
@@ -108,7 +122,7 @@ This struct is shared by both response wrappers and contains the following field
108122

109123
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.
110124

111-
<details>
125+
<details>
112126
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
113127

114128
| Name | Description |
@@ -224,11 +238,25 @@ sdk := client.NewClient(config)
224238
sdk.SetAccessToken("YOUR-TOKEN")
225239
```
226240

241+
## Setting a Custom Timeout
242+
243+
You can set a custom timeout for the SDK's HTTP requests as follows:
244+
245+
```go
246+
import "time"
247+
248+
config := clientconfig.NewConfig()
249+
250+
sdk := client.NewClient(config)
251+
252+
sdk.SetTimeout(10 * time.Second)
253+
```
254+
227255
## Services
228256

229257
The SDK provides various services to interact with the API.
230258

231-
<details>
259+
<details>
232260
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
233261

234262
| Name |
@@ -282,7 +310,7 @@ This struct is shared by both response wrappers and contains the following field
282310

283311
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.
284312

285-
<details>
313+
<details>
286314
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
287315

288316
| Name | Description |

docs/project-client/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,25 @@ sdk := client.NewClient(config)
4646
sdk.SetAccessToken("YOUR-TOKEN")
4747
```
4848

49+
## Setting a Custom Timeout
50+
51+
You can set a custom timeout for the SDK's HTTP requests as follows:
52+
53+
```go
54+
import "time"
55+
56+
config := clientconfig.NewConfig()
57+
58+
sdk := client.NewClient(config)
59+
60+
sdk.SetTimeout(10 * time.Second)
61+
```
62+
4963
## Services
5064

5165
The SDK provides various services to interact with the API.
5266

53-
<details>
67+
<details>
5468
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
5569

5670
| Name |
@@ -106,7 +120,7 @@ This struct is shared by both response wrappers and contains the following field
106120

107121
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.
108122

109-
<details>
123+
<details>
110124
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
111125

112126
| Name | Description |

docs/project-client/services/broadcasts_service.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import (
3939
)
4040

4141
config := clientconfig.NewConfig()
42+
config.SetAccessToken("ACCESS_TOKEN")
4243
client := client.NewClient(config)
4344

4445

@@ -85,34 +86,35 @@ import (
8586
)
8687

8788
config := clientconfig.NewConfig()
89+
config.SetAccessToken("ACCESS_TOKEN")
8890
client := client.NewClient(config)
8991

9092

9193
email := broadcasts.Email{
92-
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "ActionUrl" }),
93-
Content: util.ToPointer("Content"),
94-
Title: util.ToPointer("Title"),
94+
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "action_url" }),
95+
Content: util.ToPointer("content"),
96+
Title: util.ToPointer("title"),
9597
}
9698

9799

98100
inApp := broadcasts.InApp{
99-
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "ActionUrl" }),
100-
Content: util.ToPointer("Content"),
101-
Title: util.ToPointer("Title"),
101+
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "action_url" }),
102+
Content: util.ToPointer("content"),
103+
Title: util.ToPointer("title"),
102104
}
103105

104106

105107
mobilePush := broadcasts.MobilePush{
106-
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "ActionUrl" }),
107-
Content: util.ToPointer("Content"),
108-
Title: util.ToPointer("Title"),
108+
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "action_url" }),
109+
Content: util.ToPointer("content"),
110+
Title: util.ToPointer("title"),
109111
}
110112

111113

112114
sms := broadcasts.Sms{
113-
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "ActionUrl" }),
114-
Content: util.ToPointer("Content"),
115-
Title: util.ToPointer("Title"),
115+
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "action_url" }),
116+
Content: util.ToPointer("content"),
117+
Title: util.ToPointer("title"),
116118
}
117119

118120
overridesChannels := broadcasts.OverridesChannels{
@@ -143,29 +145,29 @@ overrides := broadcasts.Overrides{
143145

144146

145147
user := shared.User{
146-
CreatedAt: util.ToPointer(util.Nullable[string]{ Value: "CreatedAt" }),
148+
CreatedAt: util.ToPointer(util.Nullable[string]{ Value: "created_at" }),
147149
CustomAttributes: []byte{},
148-
Email: util.ToPointer(util.Nullable[string]{ Value: "Email" }),
149-
ExternalId: util.ToPointer(util.Nullable[string]{ Value: "ExternalId" }),
150-
FirstName: util.ToPointer(util.Nullable[string]{ Value: "FirstName" }),
151-
Id: util.ToPointer("Id"),
152-
LastName: util.ToPointer(util.Nullable[string]{ Value: "LastName" }),
153-
LastNotifiedAt: util.ToPointer(util.Nullable[string]{ Value: "LastNotifiedAt" }),
154-
LastSeenAt: util.ToPointer(util.Nullable[string]{ Value: "LastSeenAt" }),
155-
UpdatedAt: util.ToPointer(util.Nullable[string]{ Value: "UpdatedAt" }),
150+
Email: util.ToPointer(util.Nullable[string]{ Value: "email" }),
151+
ExternalId: util.ToPointer(util.Nullable[string]{ Value: "external_id" }),
152+
FirstName: util.ToPointer(util.Nullable[string]{ Value: "first_name" }),
153+
Id: util.ToPointer("id"),
154+
LastName: util.ToPointer(util.Nullable[string]{ Value: "last_name" }),
155+
LastNotifiedAt: util.ToPointer(util.Nullable[string]{ Value: "last_notified_at" }),
156+
LastSeenAt: util.ToPointer(util.Nullable[string]{ Value: "last_seen_at" }),
157+
UpdatedAt: util.ToPointer(util.Nullable[string]{ Value: "updated_at" }),
156158
}
157159

158160

159161
errors := broadcasts.Errors{
160-
Message: util.ToPointer("Message"),
162+
Message: util.ToPointer("message"),
161163
}
162164

163165
statusStatus := broadcasts.STATUS_STATUS_ENQUEUED
164166

165167

166168
summary := broadcasts.Summary{
167-
Failures: util.ToPointer(int64(123)),
168-
Total: util.ToPointer(int64(123)),
169+
Failures: util.ToPointer(int64(0)),
170+
Total: util.ToPointer(int64(8)),
169171
}
170172

171173
broadcastStatus := broadcasts.BroadcastStatus{
@@ -175,17 +177,17 @@ broadcastStatus := broadcasts.BroadcastStatus{
175177
}
176178

177179
request := broadcasts.Broadcast{
178-
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "ActionUrl" }),
179-
Category: util.ToPointer(util.Nullable[string]{ Value: "Category" }),
180-
Content: util.ToPointer(util.Nullable[string]{ Value: "Content" }),
181-
CreatedAt: util.ToPointer("CreatedAt"),
180+
ActionUrl: util.ToPointer(util.Nullable[string]{ Value: "action_url" }),
181+
Category: util.ToPointer(util.Nullable[string]{ Value: "category" }),
182+
Content: util.ToPointer(util.Nullable[string]{ Value: "content" }),
183+
CreatedAt: util.ToPointer("created_at"),
182184
CustomAttributes: []byte{},
183-
Id: util.ToPointer("Id"),
185+
Id: util.ToPointer("id"),
184186
Overrides: &overrides,
185187
Recipients: []shared.User{user},
186188
Status: &broadcastStatus,
187-
Title: util.ToPointer("Title"),
188-
Topic: util.ToPointer(util.Nullable[string]{ Value: "Topic" }),
189+
Title: util.ToPointer("title"),
190+
Topic: util.ToPointer(util.Nullable[string]{ Value: "topic" }),
189191
}
190192

191193
response, err := client.Broadcasts.CreateBroadcast(context.Background(), request)
@@ -226,6 +228,7 @@ import (
226228
)
227229

228230
config := clientconfig.NewConfig()
231+
config.SetAccessToken("ACCESS_TOKEN")
229232
client := client.NewClient(config)
230233

231234
response, err := client.Broadcasts.FetchBroadcast(context.Background(), "broadcastId")

0 commit comments

Comments
 (0)