Skip to content

Commit 57421aa

Browse files
Updated entities based on latest GraphQL schema (2024-06-015)
1 parent 2bae0b5 commit 57421aa

20 files changed

+358
-8
lines changed

Scr/Sdk4me.GraphQL/Entities/AppOffering.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ public DataList<Attachment>? FeaturesAttachments
124124
[JsonProperty("name"), Sdk4meField(IsDefaultQueryProperty = true)]
125125
public string? Name { get; internal set; }
126126

127+
/// <summary>
128+
/// The endpoints for the OAuth application that will be created for this app to use in the <see href="https://developer.4me.com/v1/oauth/authorization_code_grant/">Authorization Code Grant flow</see>.
129+
/// </summary>
130+
[JsonProperty("oauthAuthorizationEndpoints")]
131+
public List<string>? OauthAuthorizationEndpoints { get; internal set; }
132+
127133
/// <summary>
128134
/// The hyperlink to the image file for the record.
129135
/// </summary>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Sdk4me.GraphQL
4+
{
5+
/// <summary>
6+
/// The <see href="https://developer.4me.com/graphql/input_object/appofferingautomationruledeletemutationinput/">AppOfferingAutomationRuleDeleteMutationInput</see> object.
7+
/// </summary>
8+
public class AppOfferingAutomationRuleDeleteMutationInput : PropertyChangeSet
9+
{
10+
private string? clientMutationId;
11+
private string id;
12+
13+
/// <summary>
14+
/// A unique identifier for the client performing the mutation.
15+
/// </summary>
16+
[JsonProperty("clientMutationId")]
17+
public string? ClientMutationId
18+
{
19+
get => clientMutationId;
20+
set => clientMutationId = Set("clientMutationId", value);
21+
}
22+
23+
/// <summary>
24+
/// The node ID of the record to delete.
25+
/// </summary>
26+
[JsonProperty("id"), Sdk4meField(IsRequiredForMutation = true)]
27+
public string ID
28+
{
29+
get => id;
30+
set => id = Set("id", value);
31+
}
32+
33+
/// <summary>
34+
/// Initializes a new instance of the <see cref="AppOfferingAutomationRuleDeleteMutationInput"/> class without providing the required values.
35+
/// </summary>
36+
public AppOfferingAutomationRuleDeleteMutationInput()
37+
{
38+
id = string.Empty;
39+
}
40+
41+
/// <summary>
42+
/// Initializes a new instance of the <see cref="AppOfferingAutomationRuleDeleteMutationInput"/> class.
43+
/// </summary>
44+
/// <param name="id">The node ID of the record to delete.</param>
45+
public AppOfferingAutomationRuleDeleteMutationInput(string id)
46+
{
47+
this.id = Set("id", id);
48+
}
49+
}
50+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Sdk4me.GraphQL
4+
{
5+
/// <summary>
6+
/// The <see href="https://developer.4me.com/graphql/object/appofferingautomationruledeletemutationpayload/">AppOfferingAutomationRuleDeleteMutationPayload</see> object.
7+
/// </summary>
8+
public class AppOfferingAutomationRuleDeleteMutationPayload : Payload
9+
{
10+
/// <summary>
11+
/// <c>true</c> when the record was successfully deleted, <c>false</c> otherwise.
12+
/// </summary>
13+
[JsonProperty("success"), Sdk4meField(IsDefaultQueryProperty = true)]
14+
public bool? Success { get; internal set; }
15+
}
16+
}

Scr/Sdk4me.GraphQL/Entities/AppOfferingCreateInput.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace Sdk4me.GraphQL
88
/// </summary>
99
public class AppOfferingCreateInput : PropertyChangeSet
1010
{
11+
private string? cardDescription;
1112
private string? clientMutationId;
1213
private string? compliance;
1314
private string? configurationUriTemplate;
@@ -17,6 +18,7 @@ public class AppOfferingCreateInput : PropertyChangeSet
1718
private string? features;
1819
private string name;
1920
private List<AppOfferingScopeInput>? newScopes;
21+
private List<string>? oauthAuthorizationEndpoints;
2022
private WebhookPolicyJwtAlg? policyJwtAlg;
2123
private string? policyJwtAudience;
2224
private long? policyJwtClaimExpiresIn;
@@ -29,6 +31,16 @@ public class AppOfferingCreateInput : PropertyChangeSet
2931
private string? uiExtensionVersionId;
3032
private string? webhookUriTemplate;
3133

34+
/// <summary>
35+
/// Short description of the app offering to be shown on the card in the App store.
36+
/// </summary>
37+
[JsonProperty("cardDescription")]
38+
public string? CardDescription
39+
{
40+
get => cardDescription;
41+
set => cardDescription = Set("cardDescription", value);
42+
}
43+
3244
/// <summary>
3345
/// A unique identifier for the client performing the mutation.
3446
/// </summary>
@@ -119,6 +131,16 @@ public List<AppOfferingScopeInput>? NewScopes
119131
set => newScopes = Set("newScopes", value);
120132
}
121133

134+
/// <summary>
135+
/// The endpoints for the OAuth application that will be created for this app to use in the <see href="https://developer.4me.com/v1/oauth/authorization_code_grant/">Authorization Code Grant flow</see>.
136+
/// </summary>
137+
[JsonProperty("oauthAuthorizationEndpoints")]
138+
public List<string>? OauthAuthorizationEndpoints
139+
{
140+
get => oauthAuthorizationEndpoints;
141+
set => oauthAuthorizationEndpoints = Set("oauthAuthorizationEndpoints", value);
142+
}
143+
122144
/// <summary>
123145
/// The algorithm used for generating the policy for the app offering's webhook.
124146
/// </summary>

Scr/Sdk4me.GraphQL/Entities/AppOfferingScope.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ public class AppOfferingScope : Node
2626
[JsonProperty("effect")]
2727
public ScopeEffect? Effect { get; internal set; }
2828

29+
/// <summary>
30+
/// Whether this scope is for the app's OAuth application using <see href="https://developer.4me.com/v1/oauth/client_credentials_grant/">client credentials</see> or <see href="https://developer.4me.com/v1/oauth/authorization_code_grant/">authorization code grant</see>.
31+
/// </summary>
32+
[JsonProperty("grantType")]
33+
public OauthApplicationGrantType? GrantType { get; internal set; }
34+
2935
internal override HashSet<QueryPageInfo> GetQueryPageInfo(string fieldName, int depth)
3036
{
3137
return new HashSet<QueryPageInfo>();

Scr/Sdk4me.GraphQL/Entities/AppOfferingScopeInput.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public class AppOfferingScopeInput : PropertyChangeSet
1111
private List<string>? actions;
1212
private List<string>? conditions;
1313
private ScopeEffect? effect;
14+
private OauthApplicationGrantType? grantType;
1415
private string? id;
1516

1617
/// <summary>
@@ -43,6 +44,16 @@ public ScopeEffect? Effect
4344
set => effect = Set("effect", value);
4445
}
4546

47+
/// <summary>
48+
/// Whether this scope is for the app's OAuth application using <see href="https://developer.4me.com/v1/oauth/client_credentials_grant/">client credentials</see> or <see href="https://developer.4me.com/v1/oauth/authorization_code_grant/">authorization code grant</see>.
49+
/// </summary>
50+
[JsonProperty("grantType")]
51+
public OauthApplicationGrantType? GrantType
52+
{
53+
get => grantType;
54+
set => grantType = Set("grantType", value);
55+
}
56+
4657
/// <summary>
4758
/// Identifier of the object to update using these values. For new objects it should be <c>null</c>.
4859
/// </summary>

Scr/Sdk4me.GraphQL/Entities/AppOfferingUpdateInput.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace Sdk4me.GraphQL
88
/// </summary>
99
public class AppOfferingUpdateInput : PropertyChangeSet
1010
{
11+
private string? cardDescription;
1112
private string? clientMutationId;
1213
private string? compliance;
1314
private string? configurationUriTemplate;
@@ -18,6 +19,7 @@ public class AppOfferingUpdateInput : PropertyChangeSet
1819
private string id;
1920
private string? name;
2021
private List<AppOfferingScopeInput>? newScopes;
22+
private List<string>? oauthAuthorizationEndpoints;
2123
private WebhookPolicyJwtAlg? policyJwtAlg;
2224
private string? policyJwtAudience;
2325
private long? policyJwtClaimExpiresIn;
@@ -31,6 +33,16 @@ public class AppOfferingUpdateInput : PropertyChangeSet
3133
private string? uiExtensionVersionId;
3234
private string? webhookUriTemplate;
3335

36+
/// <summary>
37+
/// Short description of the app offering to be shown on the card in the App store.
38+
/// </summary>
39+
[JsonProperty("cardDescription")]
40+
public string? CardDescription
41+
{
42+
get => cardDescription;
43+
set => cardDescription = Set("cardDescription", value);
44+
}
45+
3446
/// <summary>
3547
/// A unique identifier for the client performing the mutation.
3648
/// </summary>
@@ -131,6 +143,16 @@ public List<AppOfferingScopeInput>? NewScopes
131143
set => newScopes = Set("newScopes", value);
132144
}
133145

146+
/// <summary>
147+
/// The endpoints for the OAuth application that will be created for this app to use in the <see href="https://developer.4me.com/v1/oauth/authorization_code_grant/">Authorization Code Grant flow</see>.
148+
/// </summary>
149+
[JsonProperty("oauthAuthorizationEndpoints")]
150+
public List<string>? OauthAuthorizationEndpoints
151+
{
152+
get => oauthAuthorizationEndpoints;
153+
set => oauthAuthorizationEndpoints = Set("oauthAuthorizationEndpoints", value);
154+
}
155+
134156
/// <summary>
135157
/// The algorithm used for generating the policy for the app offering's webhook.
136158
/// </summary>

Scr/Sdk4me.GraphQL/Entities/ShopArticle.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Sdk4me.GraphQL
77
/// <summary>
88
/// The <see href="https://developer.4me.com/graphql/object/shoparticle/">ShopArticle</see> object.
99
/// </summary>
10-
public class ShopArticle : Node
10+
public class ShopArticle : Node, IHasTranslations
1111
{
1212
/// <summary>
1313
/// The account this record belongs to.
@@ -168,6 +168,17 @@ public class ShopArticle : Node
168168
[JsonProperty("timeZone")]
169169
public string? TimeZone { get; internal set; }
170170

171+
[JsonProperty("translations")]
172+
internal NodeCollection<Translation>? TranslationsCollection { get; set; }
173+
174+
/// <summary>
175+
/// Translations associated with this object.
176+
/// </summary>
177+
public DataList<Translation>? Translations
178+
{
179+
get => TranslationsCollection?.Data;
180+
}
181+
171182
/// <summary>
172183
/// UI extension that is to be used when the shop article is ordered.
173184
/// </summary>
@@ -182,11 +193,14 @@ public class ShopArticle : Node
182193

183194
internal override HashSet<QueryPageInfo> GetQueryPageInfo(string fieldName, int depth)
184195
{
185-
return new HashSet<QueryPageInfo>();
196+
HashSet<QueryPageInfo> retval = new();
197+
retval.AddRange(TranslationsCollection?.GetQueryPageInfo("translations", depth + 1));
198+
return retval;
186199
}
187200

188201
internal override void AddToCollection(object data)
189202
{
203+
Translations?.AddRange((data as ShopArticle)?.Translations);
190204
}
191205
}
192206
}

Scr/Sdk4me.GraphQL/Entities/ShopArticleCategory.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Sdk4me.GraphQL
77
/// <summary>
88
/// The <see href="https://developer.4me.com/graphql/object/shoparticlecategory/">ShopArticleCategory</see> object.
99
/// </summary>
10-
public class ShopArticleCategory : Node
10+
public class ShopArticleCategory : Node, IHasTranslations
1111
{
1212
/// <summary>
1313
/// The account this record belongs to.
@@ -74,6 +74,17 @@ public DataList<Attachment>? FullDescriptionAttachments
7474
[JsonProperty("sourceID")]
7575
public string? SourceID { get; internal set; }
7676

77+
[JsonProperty("translations")]
78+
internal NodeCollection<Translation>? TranslationsCollection { get; set; }
79+
80+
/// <summary>
81+
/// Translations associated with this object.
82+
/// </summary>
83+
public DataList<Translation>? Translations
84+
{
85+
get => TranslationsCollection?.Data;
86+
}
87+
7788
/// <summary>
7889
/// The date and time of the last update of the record. If the record has no updates it contains the <c>createdAt</c> value.
7990
/// </summary>
@@ -84,12 +95,14 @@ internal override HashSet<QueryPageInfo> GetQueryPageInfo(string fieldName, int
8495
{
8596
HashSet<QueryPageInfo> retval = new();
8697
retval.AddRange(FullDescriptionAttachmentsCollection?.GetQueryPageInfo("fullDescriptionAttachments", depth + 1));
98+
retval.AddRange(TranslationsCollection?.GetQueryPageInfo("translations", depth + 1));
8799
return retval;
88100
}
89101

90102
internal override void AddToCollection(object data)
91103
{
92104
FullDescriptionAttachments?.AddRange((data as ShopArticleCategory)?.FullDescriptionAttachments);
105+
Translations?.AddRange((data as ShopArticleCategory)?.Translations);
93106
}
94107
}
95108
}

Scr/Sdk4me.GraphQL/Entities/ShopOrderLine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public DataList<Attachment>? CustomFieldsAttachments
6565
/// The fulfillment task of the purchase workflow generated to fulfil this shop order line.
6666
/// </summary>
6767
[JsonProperty("fulfillmentTask")]
68-
public Request? FulfillmentTask { get; internal set; }
68+
public Task? FulfillmentTask { get; internal set; }
6969

7070
/// <summary>
7171
/// The request template used to order one of more units of this shop article.

0 commit comments

Comments
 (0)