Skip to content

Commit 4289d29

Browse files
committed
Release 0.3.0
1 parent 258ed8f commit 4289d29

24 files changed

+779
-129
lines changed

reference.md

Lines changed: 156 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,21 @@ await client.SendAsync(
3131
{
3232
Message = new ContentMessage
3333
{
34-
Content = new ElementalContent
34+
To = new UserRecipient { Email = "email@example.com" },
35+
Content = new ElementalContentSugar
3536
{
36-
Version = "version",
37-
Brand = null,
38-
Elements = new List<object>()
37+
Title = "Welcome!",
38+
Body = "Thanks for signing up, {{name}}",
39+
},
40+
Data = new Dictionary<string, object>() { { "name", "Peter Parker" } },
41+
Routing = new Routing
42+
{
43+
Method = RoutingMethod.Single,
44+
Channels = new List<
45+
OneOf<RoutingStrategyChannel, RoutingStrategyProvider, string>
46+
>()
3947
{
40-
new ElementalTextNode
41-
{
42-
Content = "content",
43-
Align = TextAlign.Left,
44-
TextStyle = null,
45-
Color = null,
46-
Bold = null,
47-
Italic = null,
48-
Strikethrough = null,
49-
Underline = null,
50-
Locales = null,
51-
Format = null,
52-
},
53-
new ElementalTextNode
54-
{
55-
Content = "content",
56-
Align = TextAlign.Left,
57-
TextStyle = null,
58-
Color = null,
59-
Bold = null,
60-
Italic = null,
61-
Strikethrough = null,
62-
Underline = null,
63-
Locales = null,
64-
Format = null,
65-
},
48+
"email",
6649
},
6750
},
6851
},
@@ -1017,7 +1000,18 @@ await client.Brands.ReplaceAsync(
10171000

10181001
```csharp
10191002
await client.Bulk.CreateJobAsync(
1020-
new BulkCreateJobParams { Message = new InboundBulkMessage { Message = null } }
1003+
new BulkCreateJobParams
1004+
{
1005+
Message = new InboundBulkMessage
1006+
{
1007+
Brand = null,
1008+
Data = null,
1009+
Event = null,
1010+
Locale = null,
1011+
Override = null,
1012+
Message = null,
1013+
},
1014+
}
10211015
);
10221016
```
10231017
</dd>
@@ -1465,7 +1459,7 @@ await client.Lists.GetAsync("list_id");
14651459
</dl>
14661460
</details>
14671461

1468-
<details><summary><code>client.Lists.<a href="/src/Courier.Client/Lists/ListsClient.cs">UpdateAsync</a>(listId, ListPutParams { ... }) -> List</code></summary>
1462+
<details><summary><code>client.Lists.<a href="/src/Courier.Client/Lists/ListsClient.cs">UpdateAsync</a>(listId, ListPutParams { ... })</code></summary>
14691463
<dl>
14701464
<dd>
14711465

@@ -1581,7 +1575,7 @@ await client.Lists.DeleteAsync("list_id");
15811575
</dl>
15821576
</details>
15831577

1584-
<details><summary><code>client.Lists.<a href="/src/Courier.Client/Lists/ListsClient.cs">RestoreAsync</a>(listId)</code></summary>
1578+
<details><summary><code>client.Lists.<a href="/src/Courier.Client/Lists/ListsClient.cs">RestoreAsync</a>(listId, RestoreListRequest { ... })</code></summary>
15851579
<dl>
15861580
<dd>
15871581

@@ -1608,7 +1602,7 @@ Restore a previously deleted list.
16081602
<dd>
16091603

16101604
```csharp
1611-
await client.Lists.RestoreAsync("list_id");
1605+
await client.Lists.RestoreAsync("list_id", new RestoreListRequest());
16121606
```
16131607
</dd>
16141608
</dl>
@@ -1625,6 +1619,14 @@ await client.Lists.RestoreAsync("list_id");
16251619

16261620
**listId:** `string` — A unique identifier representing the list you wish to retrieve.
16271621

1622+
</dd>
1623+
</dl>
1624+
1625+
<dl>
1626+
<dd>
1627+
1628+
**request:** `RestoreListRequest`
1629+
16281630
</dd>
16291631
</dl>
16301632
</dd>
@@ -2032,7 +2034,7 @@ await client.Messages.ListAsync(new ListMessagesRequest());
20322034
</dl>
20332035
</details>
20342036

2035-
<details><summary><code>client.Messages.<a href="/src/Courier.Client/Messages/MessagesClient.cs">GetAsync</a>(messageId) -> MessageDetails</code></summary>
2037+
<details><summary><code>client.Messages.<a href="/src/Courier.Client/Messages/MessagesClient.cs">GetAsync</a>(messageId) -> MessageDetailsExtended</code></summary>
20362038
<dl>
20372039
<dd>
20382040

@@ -2717,9 +2719,9 @@ await client.Profiles.CreateAsync(
27172719
<dl>
27182720
<dd>
27192721

2720-
When using `PUT`, be sure to include all the key-value pairs required by the recipient's profile.
2721-
Any key-value pairs that exist in the profile but fail to be included in the `PUT` request will be
2722-
removed from the profile. Remember, a `PUT` update is a full replacement of the data. For partial updates,
2722+
When using `PUT`, be sure to include all the key-value pairs required by the recipient's profile.
2723+
Any key-value pairs that exist in the profile but fail to be included in the `PUT` request will be
2724+
removed from the profile. Remember, a `PUT` update is a full replacement of the data. For partial updates,
27232725
use the [Patch](https://www.courier.com/docs/reference/profiles/patch/) request.
27242726
</dd>
27252727
</dl>
@@ -2782,7 +2784,7 @@ await client.Profiles.ReplaceAsync(
27822784
</dl>
27832785
</details>
27842786

2785-
<details><summary><code>client.Profiles.<a href="/src/Courier.Client/Profiles/ProfilesClient.cs">MergeProfileAsync</a>(userId, IEnumerable<UserProfilePatch> { ... })</code></summary>
2787+
<details><summary><code>client.Profiles.<a href="/src/Courier.Client/Profiles/ProfilesClient.cs">MergeProfileAsync</a>(userId, ProfileUpdateRequest { ... })</code></summary>
27862788
<dl>
27872789
<dd>
27882790

@@ -2797,19 +2799,22 @@ await client.Profiles.ReplaceAsync(
27972799
```csharp
27982800
await client.Profiles.MergeProfileAsync(
27992801
"user_id",
2800-
new List<UserProfilePatch>()
2802+
new ProfileUpdateRequest
28012803
{
2802-
new UserProfilePatch
2803-
{
2804-
Op = "op",
2805-
Path = "path",
2806-
Value = "value",
2807-
},
2808-
new UserProfilePatch
2804+
Patch = new List<UserProfilePatch>()
28092805
{
2810-
Op = "op",
2811-
Path = "path",
2812-
Value = "value",
2806+
new UserProfilePatch
2807+
{
2808+
Op = "op",
2809+
Path = "path",
2810+
Value = "value",
2811+
},
2812+
new UserProfilePatch
2813+
{
2814+
Op = "op",
2815+
Path = "path",
2816+
Value = "value",
2817+
},
28132818
},
28142819
}
28152820
);
@@ -2835,7 +2840,7 @@ await client.Profiles.MergeProfileAsync(
28352840
<dl>
28362841
<dd>
28372842

2838-
**request:** `IEnumerable<UserProfilePatch>`
2843+
**request:** `ProfileUpdateRequest`
28392844

28402845
</dd>
28412846
</dl>
@@ -3481,6 +3486,102 @@ await client.Tenants.RemoveDefaultPreferencesForTopicAsync("tenant_id", "topic_i
34813486
</dl>
34823487

34833488

3489+
</dd>
3490+
</dl>
3491+
</details>
3492+
3493+
<details><summary><code>client.Tenants.<a href="/src/Courier.Client/Tenants/TenantsClient.cs">GetTemplateByTenantAsync</a>(tenantId, templateId) -> GetTemplateByTenantResponse</code></summary>
3494+
<dl>
3495+
<dd>
3496+
3497+
#### 🔌 Usage
3498+
3499+
<dl>
3500+
<dd>
3501+
3502+
<dl>
3503+
<dd>
3504+
3505+
```csharp
3506+
await client.Tenants.GetTemplateByTenantAsync("tenant_id", "template_id");
3507+
```
3508+
</dd>
3509+
</dl>
3510+
</dd>
3511+
</dl>
3512+
3513+
#### ⚙️ Parameters
3514+
3515+
<dl>
3516+
<dd>
3517+
3518+
<dl>
3519+
<dd>
3520+
3521+
**tenantId:** `string` — Id of the tenant for which to retrieve the template.
3522+
3523+
</dd>
3524+
</dl>
3525+
3526+
<dl>
3527+
<dd>
3528+
3529+
**templateId:** `string` — Id of the template to be retrieved.
3530+
3531+
</dd>
3532+
</dl>
3533+
</dd>
3534+
</dl>
3535+
3536+
3537+
</dd>
3538+
</dl>
3539+
</details>
3540+
3541+
<details><summary><code>client.Tenants.<a href="/src/Courier.Client/Tenants/TenantsClient.cs">GetTemplateListByTenantAsync</a>(tenantId, GetTemplateListByTenantParams { ... }) -> ListTemplatesByTenantResponse</code></summary>
3542+
<dl>
3543+
<dd>
3544+
3545+
#### 🔌 Usage
3546+
3547+
<dl>
3548+
<dd>
3549+
3550+
<dl>
3551+
<dd>
3552+
3553+
```csharp
3554+
await client.Tenants.GetTemplateListByTenantAsync("tenant_id", new GetTemplateListByTenantParams());
3555+
```
3556+
</dd>
3557+
</dl>
3558+
</dd>
3559+
</dl>
3560+
3561+
#### ⚙️ Parameters
3562+
3563+
<dl>
3564+
<dd>
3565+
3566+
<dl>
3567+
<dd>
3568+
3569+
**tenantId:** `string` — Id of the tenant for which to retrieve the templates.
3570+
3571+
</dd>
3572+
</dl>
3573+
3574+
<dl>
3575+
<dd>
3576+
3577+
**request:** `GetTemplateListByTenantParams`
3578+
3579+
</dd>
3580+
</dl>
3581+
</dd>
3582+
</dl>
3583+
3584+
34843585
</dd>
34853586
</dl>
34863587
</details>
@@ -3852,8 +3953,8 @@ await client.Users.Preferences.UpdateAsync(
38523953

38533954
This endpoint is used to add a user to
38543955
multiple tenants in one call.
3855-
A custom profile can also be supplied for each tenant.
3856-
This profile will be merged with the user's main
3956+
A custom profile can also be supplied for each tenant.
3957+
This profile will be merged with the user's main
38573958
profile when sending to the user with that tenant.
38583959
</dd>
38593960
</dl>
@@ -3940,8 +4041,8 @@ await client.Users.Tenants.AddMultpleAsync(
39404041

39414042
This endpoint is used to add a single tenant.
39424043

3943-
A custom profile can also be supplied with the tenant.
3944-
This profile will be merged with the user's main profile
4044+
A custom profile can also be supplied with the tenant.
4045+
This profile will be merged with the user's main profile
39454046
when sending to the user with that tenant.
39464047
</dd>
39474048
</dl>

src/Courier.Client.sln

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Courier.Client", "Courier.Client\Courier.Client.csproj", "{A6DE2B75-7B5F-45FE-B453-DECA52A557D7}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Courier.Client", "Courier.Client\Courier.Client.csproj", "{25AB18EC-0D7E-4638-B59A-ED173ADC3B98}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Courier.Client.Test", "Courier.Client.Test\Courier.Client.Test.csproj", "{BAE251F8-CB21-40F2-908B-61A197EC5381}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Courier.Client.Test", "Courier.Client.Test\Courier.Client.Test.csproj", "{DD40B5A4-7584-45A5-B918-31B98412DEB5}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
1616
HideSolutionNode = FALSE
1717
EndGlobalSection
1818
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{A6DE2B75-7B5F-45FE-B453-DECA52A557D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{A6DE2B75-7B5F-45FE-B453-DECA52A557D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{A6DE2B75-7B5F-45FE-B453-DECA52A557D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{A6DE2B75-7B5F-45FE-B453-DECA52A557D7}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{BAE251F8-CB21-40F2-908B-61A197EC5381}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{BAE251F8-CB21-40F2-908B-61A197EC5381}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{BAE251F8-CB21-40F2-908B-61A197EC5381}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{BAE251F8-CB21-40F2-908B-61A197EC5381}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{25AB18EC-0D7E-4638-B59A-ED173ADC3B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{25AB18EC-0D7E-4638-B59A-ED173ADC3B98}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{25AB18EC-0D7E-4638-B59A-ED173ADC3B98}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{25AB18EC-0D7E-4638-B59A-ED173ADC3B98}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{DD40B5A4-7584-45A5-B918-31B98412DEB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{DD40B5A4-7584-45A5-B918-31B98412DEB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{DD40B5A4-7584-45A5-B918-31B98412DEB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{DD40B5A4-7584-45A5-B918-31B98412DEB5}.Release|Any CPU.Build.0 = Release|Any CPU
2727
EndGlobalSection
2828
EndGlobal

src/Courier.Client/Bulk/BulkClient.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,18 @@ internal BulkClient(RawClient client)
2020
/// <example>
2121
/// <code>
2222
/// await client.Bulk.CreateJobAsync(
23-
/// new BulkCreateJobParams { Message = new InboundBulkMessage { Message = null } }
23+
/// new BulkCreateJobParams
24+
/// {
25+
/// Message = new InboundBulkMessage
26+
/// {
27+
/// Brand = null,
28+
/// Data = null,
29+
/// Event = null,
30+
/// Locale = null,
31+
/// Override = null,
32+
/// Message = null,
33+
/// },
34+
/// }
2435
/// );
2536
/// </code>
2637
/// </example>

0 commit comments

Comments
 (0)