skapi-js 1.0.54 → 1.0.55

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.
@@ -61,8 +61,8 @@ export default class Skapi {
61
61
  }): Promise<any>;
62
62
  consumeTicket(params: {
63
63
  ticket_id: string;
64
- }, placeholder: {
65
- [key: string]: string;
64
+ } & {
65
+ [key: string]: any;
66
66
  }): Promise<any>;
67
67
  getConsumedTickets(params: {
68
68
  ticket_id?: string;
package/js/main/skapi.js CHANGED
@@ -23,7 +23,7 @@ export default class Skapi {
23
23
  set user(value) {
24
24
  }
25
25
  constructor(service, owner, options, __etc) {
26
- this.version = '1.0.54';
26
+ this.version = '1.0.55';
27
27
  this.session = null;
28
28
  this.connection = null;
29
29
  this.host = 'skapi';
@@ -209,8 +209,8 @@ export default class Skapi {
209
209
  clientSecretRequest(params) {
210
210
  return clientSecretRequest.bind(this)(params);
211
211
  }
212
- consumeTicket(params, placeholder) {
213
- return consumeTicket.bind(this)(params, placeholder);
212
+ consumeTicket(params) {
213
+ return consumeTicket.bind(this)(params);
214
214
  }
215
215
  getConsumedTickets(params, fetchOptions) {
216
216
  return getConsumedTickets.bind(this)(params, fetchOptions);
@@ -48,10 +48,8 @@ export async function consumeTicket(params) {
48
48
  if (!params.ticket_id) {
49
49
  throw new SkapiError('Ticket ID is required.', { code: 'INVALID_PARAMETER' });
50
50
  }
51
- let ticket_id = params.ticket_id;
52
- delete params.ticket_id;
53
51
  await this.__connection;
54
- let resp = await request.bind(this)(`https://${this.service.slice(0, 4)}.skapi.dev/auth/consume/${this.service}/${this.owner}/${ticket_id}`, params, { auth: true });
52
+ let resp = await request.bind(this)('ticket', Object.assign({ exec: 'consume' }, params), { auth: true });
55
53
  return map_ticket_obj(resp);
56
54
  }
57
55
  export async function getTickets(params, fetchOptions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skapi-js",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "Skapi: Backend API Library for HTML frontend.",
5
5
  "main": "./dist/skapi.module.js",
6
6
  "types": "./js/Main.d.ts",