Skip to content

Commit 079fcd6

Browse files
authored
feat: New entitlement endpoint behaviour (#1145)
* feat: new entitlement endpoint behaviour * fix: correct `RESTGetAPIEntitlementResult` * docs: update changes
1 parent 566ae49 commit 079fcd6

File tree

8 files changed

+44
-4
lines changed

8 files changed

+44
-4
lines changed

deno/rest/v10/mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ export const Routes = {
952952

953953
/**
954954
* Route for:
955+
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
955956
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
956957
*/
957958
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {

deno/rest/v10/monetization.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
3333
*/
3434
guild_id?: Snowflake | undefined;
3535
/**
36-
* Whether ended entitlements should be omitted
36+
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
3737
*/
3838
exclude_ended?: boolean | undefined;
39+
/**
40+
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
41+
*/
42+
exclude_deleted?: boolean | undefined;
3943
}
4044

4145
/**
4246
* https://discord.com/developers/docs/resources/entitlement#list-entitlements
4347
*/
4448
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
4549

50+
/**
51+
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
52+
*/
53+
export type RESTGetAPIEntitlementResult = APIEntitlement;
54+
4655
/**
4756
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
4857
*/

deno/rest/v9/mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,7 @@ export const Routes = {
961961

962962
/**
963963
* Route for:
964+
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
964965
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
965966
*/
966967
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {

deno/rest/v9/monetization.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
3333
*/
3434
guild_id?: Snowflake | undefined;
3535
/**
36-
* Whether ended entitlements should be omitted
36+
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
3737
*/
3838
exclude_ended?: boolean | undefined;
39+
/**
40+
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
41+
*/
42+
exclude_deleted?: boolean | undefined;
3943
}
4044

4145
/**
4246
* https://discord.com/developers/docs/resources/entitlement#list-entitlements
4347
*/
4448
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
4549

50+
/**
51+
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
52+
*/
53+
export type RESTGetAPIEntitlementResult = APIEntitlement;
54+
4655
/**
4756
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
4857
*/

rest/v10/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ export const Routes = {
952952

953953
/**
954954
* Route for:
955+
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
955956
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
956957
*/
957958
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {

rest/v10/monetization.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
3333
*/
3434
guild_id?: Snowflake | undefined;
3535
/**
36-
* Whether ended entitlements should be omitted
36+
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
3737
*/
3838
exclude_ended?: boolean | undefined;
39+
/**
40+
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
41+
*/
42+
exclude_deleted?: boolean | undefined;
3943
}
4044

4145
/**
4246
* https://discord.com/developers/docs/resources/entitlement#list-entitlements
4347
*/
4448
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
4549

50+
/**
51+
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
52+
*/
53+
export type RESTGetAPIEntitlementResult = APIEntitlement;
54+
4655
/**
4756
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
4857
*/

rest/v9/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,7 @@ export const Routes = {
961961

962962
/**
963963
* Route for:
964+
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
964965
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
965966
*/
966967
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {

rest/v9/monetization.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
3333
*/
3434
guild_id?: Snowflake | undefined;
3535
/**
36-
* Whether ended entitlements should be omitted
36+
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
3737
*/
3838
exclude_ended?: boolean | undefined;
39+
/**
40+
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
41+
*/
42+
exclude_deleted?: boolean | undefined;
3943
}
4044

4145
/**
4246
* https://discord.com/developers/docs/resources/entitlement#list-entitlements
4347
*/
4448
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
4549

50+
/**
51+
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
52+
*/
53+
export type RESTGetAPIEntitlementResult = APIEntitlement;
54+
4655
/**
4756
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
4857
*/

0 commit comments

Comments
 (0)