glitch-javascript-sdk 1.6.0 → 1.6.1

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.
@@ -173,5 +173,20 @@ declare class Titles {
173
173
  * @returns AxiosPromise
174
174
  */
175
175
  static getWishlist<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
176
+ /**
177
+ * Create a new API token for a title.
178
+ * Returns { full_token: string, token: TitleToken }.
179
+ */
180
+ static createTitleToken<T>(title_id: string, data?: {
181
+ expires_at?: string;
182
+ }): AxiosPromise<Response<T>>;
183
+ /**
184
+ * List all tokens for a title.
185
+ */
186
+ static listTitleTokens<T>(title_id: string): AxiosPromise<Response<T>>;
187
+ /**
188
+ * Revoke a specific token by ID.
189
+ */
190
+ static revokeTitleToken<T>(title_id: string, token_id: string): AxiosPromise<Response<T>>;
176
191
  }
177
192
  export default Titles;
package/dist/esm/index.js CHANGED
@@ -9591,6 +9591,9 @@ var TitlesRoute = /** @class */ (function () {
9591
9591
  updateMediaOrder: { url: '/titles/{title_id}/updateMediaOrder', method: HTTP_METHODS.POST },
9592
9592
  importWishlist: { url: '/titles/{title_id}/wishlist/import', method: HTTP_METHODS.POST },
9593
9593
  getWishlist: { url: '/titles/{title_id}/wishlist', method: HTTP_METHODS.GET },
9594
+ createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
9595
+ listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
9596
+ revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
9594
9597
  };
9595
9598
  return TitlesRoute;
9596
9599
  }());
@@ -9809,6 +9812,25 @@ var Titles = /** @class */ (function () {
9809
9812
  TitlesRoute.routes.getWishlist.url.replace('{title_id}', title_id);
9810
9813
  return Requests.processRoute(TitlesRoute.routes.getWishlist, {}, { title_id: title_id }, params);
9811
9814
  };
9815
+ /**
9816
+ * Create a new API token for a title.
9817
+ * Returns { full_token: string, token: TitleToken }.
9818
+ */
9819
+ Titles.createTitleToken = function (title_id, data) {
9820
+ return Requests.processRoute(TitlesRoute.routes.createToken, data, { title_id: title_id });
9821
+ };
9822
+ /**
9823
+ * List all tokens for a title.
9824
+ */
9825
+ Titles.listTitleTokens = function (title_id) {
9826
+ return Requests.processRoute(TitlesRoute.routes.listTokens, {}, { title_id: title_id });
9827
+ };
9828
+ /**
9829
+ * Revoke a specific token by ID.
9830
+ */
9831
+ Titles.revokeTitleToken = function (title_id, token_id) {
9832
+ return Requests.processRoute(TitlesRoute.routes.revokeToken, {}, { title_id: title_id, token_id: token_id });
9833
+ };
9812
9834
  return Titles;
9813
9835
  }());
9814
9836