@redzone/taunt-logins 0.0.7 → 0.0.8

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.
@@ -643,6 +643,10 @@ class TauntApi {
643
643
  }
644
644
  return this.claimrToken;
645
645
  };
646
+ this.getClaimrData = async ()=>{
647
+ const { data } = await this.api.get("/v1/beamable/inventory/skulls");
648
+ return data;
649
+ };
646
650
  // Use the cookie stored in the browser to get the user and save user model in state and local storage
647
651
  // This assumes that the user is logged to backend in and has a cookie jwt
648
652
  this.getLoggedInUser = ()=>this.api.get("/v1/auth/me");
@@ -307,6 +307,11 @@ type TauntUser = {
307
307
  refreshToken: string;
308
308
  accessToken: string;
309
309
  };
310
+ type ClaimrCampaignData = {
311
+ redSkulls: number;
312
+ numActionsComplete: number;
313
+ questComplete: boolean;
314
+ };
310
315
  declare class TauntApi {
311
316
  private api;
312
317
  private refreshToken;
@@ -328,6 +333,7 @@ declare class TauntApi {
328
333
  refresh: (refreshToken?: string) => Promise<TauntRespType>;
329
334
  logout: () => Promise<void>;
330
335
  getClaimrToken: () => Promise<string | null>;
336
+ getClaimrData: () => Promise<ClaimrCampaignData>;
331
337
  getLoggedInUser: () => Promise<AxiosResponse<TauntUser, any, {}>>;
332
338
  writePlayerEvent(eventName: string, eventData?: unknown, retryIfLoginNeeded?: boolean): Promise<void>;
333
339
  }
@@ -400,4 +406,4 @@ declare function tauntMetamaskLogin(tauntServiceEndpoint: string, providerParam?
400
406
  }>;
401
407
 
402
408
  export { BadGatewayError, BadRequestError, BandwidthLimitExceededError, ConflictError, ErrorFromResponse, ErrorResponse, ExpectationFailedError, FailedDependencyError, ForbiddenError, GatewayTimeoutError, GoneError, HTTPVersionNotSupportedError, ImATeapotError, InsufficientStorageError, InternalServerError, LengthRequiredError, LockedError, LoopDetectedError, MethodNotAllowedError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RequestEntityTooLargeError, RequestHeaderFieldsTooLargeError, RequestTimeoutError, RequestUriTooLongError, RequestedRangeNotSatisfiableError, ServiceUnavailableError, TauntApi, TooManyRequestsError, UnauthorizedError, UnknownError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError, emailOTPWithMagic, tauntMagicDidLogin, tauntMagicEmailOTPLogin, tauntMagicTelegramLogin, tauntMetamaskLogin, tauntSignWithMetamask, telegramWithMagic };
403
- export type { TauntExtSigProps, TauntSigProps, TauntUser };
409
+ export type { ClaimrCampaignData, TauntExtSigProps, TauntSigProps, TauntUser };
@@ -307,6 +307,11 @@ type TauntUser = {
307
307
  refreshToken: string;
308
308
  accessToken: string;
309
309
  };
310
+ type ClaimrCampaignData = {
311
+ redSkulls: number;
312
+ numActionsComplete: number;
313
+ questComplete: boolean;
314
+ };
310
315
  declare class TauntApi {
311
316
  private api;
312
317
  private refreshToken;
@@ -328,6 +333,7 @@ declare class TauntApi {
328
333
  refresh: (refreshToken?: string) => Promise<TauntRespType>;
329
334
  logout: () => Promise<void>;
330
335
  getClaimrToken: () => Promise<string | null>;
336
+ getClaimrData: () => Promise<ClaimrCampaignData>;
331
337
  getLoggedInUser: () => Promise<AxiosResponse<TauntUser, any, {}>>;
332
338
  writePlayerEvent(eventName: string, eventData?: unknown, retryIfLoginNeeded?: boolean): Promise<void>;
333
339
  }
@@ -400,4 +406,4 @@ declare function tauntMetamaskLogin(tauntServiceEndpoint: string, providerParam?
400
406
  }>;
401
407
 
402
408
  export { BadGatewayError, BadRequestError, BandwidthLimitExceededError, ConflictError, ErrorFromResponse, ErrorResponse, ExpectationFailedError, FailedDependencyError, ForbiddenError, GatewayTimeoutError, GoneError, HTTPVersionNotSupportedError, ImATeapotError, InsufficientStorageError, InternalServerError, LengthRequiredError, LockedError, LoopDetectedError, MethodNotAllowedError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RequestEntityTooLargeError, RequestHeaderFieldsTooLargeError, RequestTimeoutError, RequestUriTooLongError, RequestedRangeNotSatisfiableError, ServiceUnavailableError, TauntApi, TooManyRequestsError, UnauthorizedError, UnknownError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError, emailOTPWithMagic, tauntMagicDidLogin, tauntMagicEmailOTPLogin, tauntMagicTelegramLogin, tauntMetamaskLogin, tauntSignWithMetamask, telegramWithMagic };
403
- export type { TauntExtSigProps, TauntSigProps, TauntUser };
409
+ export type { ClaimrCampaignData, TauntExtSigProps, TauntSigProps, TauntUser };
package/dist/es/index.js CHANGED
@@ -637,6 +637,10 @@ class TauntApi {
637
637
  }
638
638
  return this.claimrToken;
639
639
  };
640
+ this.getClaimrData = async ()=>{
641
+ const { data } = await this.api.get("/v1/beamable/inventory/skulls");
642
+ return data;
643
+ };
640
644
  // Use the cookie stored in the browser to get the user and save user model in state and local storage
641
645
  // This assumes that the user is logged to backend in and has a cookie jwt
642
646
  this.getLoggedInUser = ()=>this.api.get("/v1/auth/me");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redzone/taunt-logins",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  "build": "bunchee",
26
26
  "dev": "bunchee --watch",
27
27
  "prepublish": "npm run build",
28
- "publish": "npm publish --access public"
28
+ "npm:publish": "npm publish --access public"
29
29
  },
30
30
  "dependencies": {
31
31
  "@magic-ext/oauth2": "^12.0.0",