@discordjs/core 1.2.0-dev.1714522226-a1aeaeb9d → 1.2.0-dev.1714694997-6cf094c28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1456,6 +1456,15 @@ declare class MonetizationAPI {
1456
1456
  * @param options - The options for deleting the entitlement
1457
1457
  */
1458
1458
  deleteTestEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1459
+ /**
1460
+ * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1461
+ *
1462
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement}
1463
+ * @param applicationId - The application id to consume the entitlement for
1464
+ * @param entitlementId - The entitlement id to consume
1465
+ * @param options - The options for consuming the entitlement
1466
+ */
1467
+ consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1459
1468
  }
1460
1469
 
1461
1470
  declare class OAuth2API {
@@ -1456,6 +1456,15 @@ declare class MonetizationAPI {
1456
1456
  * @param options - The options for deleting the entitlement
1457
1457
  */
1458
1458
  deleteTestEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1459
+ /**
1460
+ * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1461
+ *
1462
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement}
1463
+ * @param applicationId - The application id to consume the entitlement for
1464
+ * @param entitlementId - The entitlement id to consume
1465
+ * @param options - The options for consuming the entitlement
1466
+ */
1467
+ consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1459
1468
  }
1460
1469
 
1461
1470
  declare class OAuth2API {
package/dist/http-only.js CHANGED
@@ -1953,6 +1953,17 @@ var MonetizationAPI = class {
1953
1953
  async deleteTestEntitlement(applicationId, entitlementId, { signal } = {}) {
1954
1954
  await this.rest.delete(import_v107.Routes.entitlement(applicationId, entitlementId), { signal });
1955
1955
  }
1956
+ /**
1957
+ * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1958
+ *
1959
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement}
1960
+ * @param applicationId - The application id to consume the entitlement for
1961
+ * @param entitlementId - The entitlement id to consume
1962
+ * @param options - The options for consuming the entitlement
1963
+ */
1964
+ async consumeEntitlement(applicationId, entitlementId, { signal } = {}) {
1965
+ await this.rest.post(import_v107.Routes.consumeEntitlement(applicationId, entitlementId), { signal });
1966
+ }
1956
1967
  };
1957
1968
 
1958
1969
  // src/api/oauth2.ts
@@ -2698,7 +2709,7 @@ __name(withFiles, "withFiles");
2698
2709
 
2699
2710
  // src/http-only/index.ts
2700
2711
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2701
- var version = "1.2.0-dev.1714522226-a1aeaeb9d";
2712
+ var version = "1.2.0-dev.1714694997-6cf094c28";
2702
2713
  // Annotate the CommonJS export names for ESM import in node:
2703
2714
  0 && (module.exports = {
2704
2715
  API,