Skip to content

Commit

Permalink
feat: New entitlement endpoint behaviour (#1145)
Browse files Browse the repository at this point in the history
* feat: new entitlement endpoint behaviour

* fix: correct `RESTGetAPIEntitlementResult`

* docs: update changes
  • Loading branch information
Jiralite authored Nov 26, 2024
1 parent 566ae49 commit 079fcd6
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 4 deletions.
1 change: 1 addition & 0 deletions deno/rest/v10/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ export const Routes = {

/**
* Route for:
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
Expand Down
11 changes: 10 additions & 1 deletion deno/rest/v10/monetization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

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

/**
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
*/
export type RESTGetAPIEntitlementResult = APIEntitlement;

/**
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
*/
Expand Down
1 change: 1 addition & 0 deletions deno/rest/v9/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ export const Routes = {

/**
* Route for:
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
Expand Down
11 changes: 10 additions & 1 deletion deno/rest/v9/monetization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

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

/**
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
*/
export type RESTGetAPIEntitlementResult = APIEntitlement;

/**
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
*/
Expand Down
1 change: 1 addition & 0 deletions rest/v10/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ export const Routes = {

/**
* Route for:
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
Expand Down
11 changes: 10 additions & 1 deletion rest/v10/monetization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

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

/**
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
*/
export type RESTGetAPIEntitlementResult = APIEntitlement;

/**
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
*/
Expand Down
1 change: 1 addition & 0 deletions rest/v9/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ export const Routes = {

/**
* Route for:
* - GET `/applications/{application.id}/entitlements/{entitlement.id}`
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
Expand Down
11 changes: 10 additions & 1 deletion rest/v9/monetization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,25 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

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

/**
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
*/
export type RESTGetAPIEntitlementResult = APIEntitlement;

/**
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
*/
Expand Down

0 comments on commit 079fcd6

Please sign in to comment.