Socket
Socket
Sign inDemoInstall

psn-api

Package Overview
Dependencies
9
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.6.0 to 2.7.0

dist/models/profile-from-account-id-response.model.d.ts

1

dist/models/index.d.ts

@@ -6,2 +6,3 @@ export * from "./all-call-options.model";

export * from "./get-user-friends-account-ids-response.model";
export * from "./profile-from-account-id-response.model";
export * from "./profile-from-user-name-response.model";

@@ -8,0 +9,0 @@ export * from "./rarest-thin-trophy.model";

@@ -1514,3 +1514,56 @@ 'use strict';

var USER_BASE_URL = "https://m.np.playstation.net/api/userProfile/v1/internal/users";
/**
* A call to this function will retrieve some profile information of the accountId being requested.
* If the account's profile cannot be found (either due to non-existence or privacy settings),
* an error will be thrown.
*
* @param authorization An object containing your access token, typically retrieved with `exchangeCodeForAccessToken()`.
* @param accountId The accountId for the user you wish to retrieve a profile for.
*/
var getProfileFromAccountId = /*#__PURE__*/function () {
var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(authorization, accountId, options) {
var url, response, _response$error$messa, _response$error;
return _regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
url = buildRequestUrl(USER_BASE_URL, "/:accountId/profiles", options, {
accountId: accountId
});
_context.next = 3;
return call({
url: url
}, authorization);
case 3:
response = _context.sent;
if (!(response != null && response.error)) {
_context.next = 6;
break;
}
throw new Error((_response$error$messa = response == null ? void 0 : (_response$error = response.error) == null ? void 0 : _response$error.message) != null ? _response$error$messa : "Unexpected Error");
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function getProfileFromAccountId(_x, _x2, _x3) {
return _ref.apply(this, arguments);
};
}();
/**
* A call to this function will retrieve the profile of the username being requested.

@@ -1569,4 +1622,2 @@ * If the user cannot be found (either due to non-existence or privacy settings),

var USER_BASE_URL = "https://m.np.playstation.net/api/userProfile/v1/internal/users";
/**

@@ -1629,2 +1680,3 @@ * A call to this function will retrieve the list of friended `accountId` values

exports.exchangeRefreshTokenForAuthTokens = exchangeRefreshTokenForAuthTokens;
exports.getProfileFromAccountId = getProfileFromAccountId;
exports.getProfileFromUserName = getProfileFromUserName;

@@ -1631,0 +1683,0 @@ exports.getTitleTrophies = getTitleTrophies;

2

dist/psn-api.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("isomorphic-unfetch"));function t(r,e,t,n,o,a,i){try{var u=r[a](i),c=u.value}catch(r){return void t(r)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(r){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=r.apply(e,n);function u(r){t(i,o,a,u,c,"next",r)}function c(r){t(i,o,a,u,c,"throw",r)}u(void 0)}))}}function o(){return o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},o.apply(this,arguments)}var a={exports:{}};!function(r){var e=function(r){var e,t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{c({},"")}catch(r){c=function(r,e,t){return r[e]=t}}function s(r,e,t,n){var o=Object.create((e&&e.prototype instanceof y?e:y).prototype),a=new S(n||[]);return o._invoke=function(r,e,t){var n=l;return function(o,a){if(n===f)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return j()}for(t.method=o,t.arg=a;;){var i=t.delegate;if(i){var u=_(i,t);if(u){if(u===v)continue;return u}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if(n===l)throw n=d,t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);n=f;var c=p(r,e,t);if("normal"===c.type){if(n=t.done?d:h,c.arg===v)continue;return{value:c.arg,done:t.done}}"throw"===c.type&&(n=d,t.method="throw",t.arg=c.arg)}}}(r,t,a),o}function p(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(r){return{type:"throw",arg:r}}}r.wrap=s;var l="suspendedStart",h="suspendedYield",f="executing",d="completed",v={};function y(){}function m(){}function g(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(L([])));k&&k!==t&&n.call(k,a)&&(w=k);var b=g.prototype=y.prototype=Object.create(w);function T(r){["next","throw","return"].forEach((function(e){c(r,e,(function(r){return this._invoke(e,r)}))}))}function I(r,e){function t(o,a,i,u){var c=p(r[o],r,a);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(r){t("next",r,i,u)}),(function(r){t("throw",r,i,u)})):e.resolve(l).then((function(r){s.value=r,i(s)}),(function(r){return t("throw",r,i,u)}))}u(c.arg)}var o;this._invoke=function(r,n){function a(){return new e((function(e,o){t(r,n,e,o)}))}return o=o?o.then(a,a):a()}}function _(r,t){var n=r.iterator[t.method];if(n===e){if(t.delegate=null,"throw"===t.method){if(r.iterator.return&&(t.method="return",t.arg=e,_(r,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=p(n,r.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var a=o.arg;return a?a.done?(t[r.resultName]=a.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,v):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function E(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function O(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function S(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(E,this),this.reset(!0)}function L(r){if(r){var t=r[a];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(n.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}return{next:j}}function j(){return{value:e,done:!0}}return m.prototype=g,c(b,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(r){var e="function"==typeof r&&r.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,c(r,u,"GeneratorFunction")),r.prototype=Object.create(b),r},r.awrap=function(r){return{__await:r}},T(I.prototype),c(I.prototype,i,(function(){return this})),r.AsyncIterator=I,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var i=new I(s(e,t,n,o),a);return r.isGeneratorFunction(t)?i:i.next().then((function(r){return r.done?r.value:i.next()}))},T(b),c(b,u,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),r.keys=function(r){var e=[];for(var t in r)e.push(t);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=L,S.prototype={constructor:S,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!r)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=e)},stop:function(){this.done=!0;var r=this.tryEntries[0].completion;if("throw"===r.type)throw r.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var t=this;function o(n,o){return u.type="throw",u.arg=r,t.next=n,o&&(t.method="next",t.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(r,e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===r||"continue"===r)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=r,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(r,e){if("throw"===r.type)throw r.arg;return"break"===r.type||"continue"===r.type?this.next=r.arg:"return"===r.type?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):"normal"===r.type&&e&&(this.next=e),v},finish:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var t=this.tryEntries[e];if(t.finallyLoc===r)return this.complete(t.completion,t.afterLoc),O(t),v}},catch:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var t=this.tryEntries[e];if(t.tryLoc===r){var n=t.completion;if("throw"===n.type){var o=n.arg;O(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,n){return this.delegate={iterator:L(r),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=e),v}},r}(r.exports);try{regeneratorRuntime=e}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(a);var i,u=a.exports,c=function(){var r=n(u.mark((function r(t){var n,o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=3,e.default("https://ca.account.sony.com/api/authz/v3/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic YWM4ZDE2MWEtZDk2Ni00NzI4LWIwZWEtZmZlYzIyZjY5ZWRjOkRFaXhFcVhYQ2RYZHdqMHY="},body:new URLSearchParams({code:t,redirect_uri:"com.playstation.PlayStationApp://redirect",grant_type:"authorization_code",token_format:"jwt"}).toString()});case 3:return n=r.sent,r.next=6,n.json();case 6:return r.abrupt("return",{accessToken:(o=r.sent).access_token,expiresIn:o.expires_in,idToken:o.id_token,refreshToken:o.refresh_token,refreshTokenExpiresIn:o.refresh_token_expires_in,scope:o.scope,tokenType:o.token_type});case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),s=function(){var r=n(u.mark((function r(t){var n,o,a,i,c,s;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=new URLSearchParams({access_type:"offline",client_id:"ac8d161a-d966-4728-b0ea-ffec22f69edc",redirect_uri:"com.playstation.PlayStationApp://redirect",response_type:"code",scope:"psn:mobile.v1 psn:clientapp"}).toString(),a="https://ca.account.sony.com/api/authz/v3/oauth/authorize?"+o,r.next=4,e.default(a,{headers:{Cookie:"npsso="+t},redirect:"manual"});case 4:if((i=r.sent.headers).has("location")&&null!=(n=i.get("location"))&&n.includes("?code=")){r.next=8;break}throw new Error("\n There was a problem retrieving your PSN access code. Is your NPSSO code valid?\n To get a new NPSSO code, visit https://ca.account.sony.com/api/v1/ssocookie.\n ");case 8:return c=i.get("location"),s=new URLSearchParams(c.split("redirect/")[1]),r.abrupt("return",s.get("code"));case 11:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),p=function(){var r=n(u.mark((function r(t){var n,o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=3,e.default("https://ca.account.sony.com/api/authz/v3/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic YWM4ZDE2MWEtZDk2Ni00NzI4LWIwZWEtZmZlYzIyZjY5ZWRjOkRFaXhFcVhYQ2RYZHdqMHY="},body:new URLSearchParams({refresh_token:t,grant_type:"refresh_token",token_format:"jwt",scope:"psn:mobile.v1 psn:clientapp"}).toString()});case 3:return n=r.sent,r.next=6,n.json();case 6:return r.abrupt("return",{accessToken:(o=r.sent).access_token,expiresIn:o.expires_in,idToken:o.id_token,refreshToken:o.refresh_token,refreshTokenExpiresIn:o.refresh_token_expires_in,scope:o.scope,tokenType:o.token_type});case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();exports.TrophyRarity=void 0,(i=exports.TrophyRarity||(exports.TrophyRarity={}))[i.UltraRare=0]="UltraRare",i[i.VeryRare=1]="VeryRare",i[i.Rare=2]="Rare",i[i.Common=3]="Common";var l=["headerOverrides"],h=function(r,e,t,n){void 0===t&&(t={}),void 0===n&&(n={});for(var a=function(r,e){if(null==r)return{};var t,n,o={},a=Object.keys(r);for(n=0;n<a.length;n++)e.indexOf(t=a[n])>=0||(o[t]=r[t]);return o}(t,l),i=(r+"/"+e).replace(/([^:]\/)\/+/g,"$1"),u={},c=0,s=Object.entries(o({},n,a));c<s.length;c++){var p=s[c],h=p[0],f=p[1];i.includes(":"+h)?i=i.replace(":"+h,String(f)):void 0!==f&&(u[h]=String(f))}var d=new URLSearchParams(u).toString();return d.length>0?i+"?"+d:i},f=function(){var r=n(u.mark((function r(t,n,a){var i,c;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.default(t.url,{method:null!=(i=null==t?void 0:t.method)?i:"GET",headers:o({Authorization:"Bearer "+n.accessToken,"Content-Type":"application/json"},null==t?void 0:t.headers),body:JSON.stringify(a)});case 2:return c=r.sent,r.next=5,c.json();case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),d=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h("https://m.np.playstation.net/api/search","/v1/universalSearch"),r.next=3,f({url:o,method:"POST"},e,{searchTerm:t,domainRequests:[{domain:n}]});case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),v="https://m.np.playstation.net/api/trophy",y=function(){var r=n(u.mark((function r(e,t,n,o){var a;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=h(v,"/v1/npCommunicationIds/:npCommunicationId/trophyGroups/:trophyGroupId/trophies",o,{npCommunicationId:t,trophyGroupId:n}),r.next=3,f({url:a,headers:null==o?void 0:o.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n,o){return r.apply(this,arguments)}}(),m=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(v,"/v1/npCommunicationIds/:npCommunicationId/trophyGroups",n,{npCommunicationId:t}),r.next=3,f({url:o,headers:null==n?void 0:n.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),g=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(v,"/v1/users/:accountId/trophyTitles",n,{accountId:t}),r.next=3,f({url:o,headers:null==n?void 0:n.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),w=function(){var r=n(u.mark((function r(e,t,n,o,a){var i,c,s,p;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=h(v,"/v1/users/:accountId/npCommunicationIds/:npCommunicationId/trophyGroups/:trophyGroupId/trophies",a,{accountId:t,npCommunicationId:n,trophyGroupId:o}),r.next=3,f({url:i,headers:null==a?void 0:a.headerOverrides},e);case 3:if(null==(c=r.sent)||!c.error){r.next=6;break}throw new Error(null!=(s=null==c||null==(p=c.error)?void 0:p.message)?s:"Unexpected Error");case 6:return r.abrupt("return",c);case 7:case"end":return r.stop()}}),r)})));return function(e,t,n,o,a){return r.apply(this,arguments)}}(),x=function(){var r=n(u.mark((function r(e,t,n,o){var a,i,c,s;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=h(v,"/v1/users/:accountId/npCommunicationIds/:npCommunicationId/trophyGroups",o,{accountId:t,npCommunicationId:n}),r.next=3,f({url:a,headers:null==o?void 0:o.headerOverrides},e);case 3:if(null==(i=r.sent)||!i.error){r.next=6;break}throw new Error(null!=(c=null==i||null==(s=i.error)?void 0:s.message)?c:"Unexpected Error");case 6:return r.abrupt("return",i);case 7:case"end":return r.stop()}}),r)})));return function(e,t,n,o){return r.apply(this,arguments)}}(),k=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(v,"/v1/users/:accountId/trophySummary",n,{accountId:t}),r.next=3,f({url:o,headers:null==n?void 0:n.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),b=function(){var r=n(u.mark((function r(e,t){var n,o,a,i;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="https://us-prof.np.community.playstation.net/userProfile/v1/users/"+t+"/profile2?fields=npId,onlineId,accountId,avatarUrls,plus,aboutMe,languagesUsed,trophySummary(@default,level,progress,earnedTrophies),isOfficiallyVerified,personalDetail(@default,profilePictureUrls),personalDetailSharing,personalDetailSharingRequestMessageFlag,primaryOnlineStatus,presences(@default,@titleInfo,platform,lastOnlineDate,hasBroadcastData),requestMessageFlag,blocking,friendRelation,following,consoleAvailability",r.next=3,f({url:n},e);case 3:if(null==(o=r.sent)||!o.error){r.next=6;break}throw new Error(null!=(a=null==o||null==(i=o.error)?void 0:i.message)?a:"Unexpected Error");case 6:return r.abrupt("return",o);case 7:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}(),T=function(){var r=n(u.mark((function r(e,t,n){var o,a,i,c;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h("https://m.np.playstation.net/api/userProfile/v1/internal/users","/:accountId/friends",n,{accountId:t}),r.next=3,f({url:o},e);case 3:if(null==(a=r.sent)||!a.error){r.next=6;break}throw new Error(null!=(i=null==a||null==(c=a.error)?void 0:c.message)?i:"Unexpected Error");case 6:return r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}();exports.call=f,exports.exchangeCodeForAccessToken=c,exports.exchangeNpssoForCode=s,exports.exchangeRefreshTokenForAuthTokens=p,exports.getProfileFromUserName=b,exports.getTitleTrophies=y,exports.getTitleTrophyGroups=m,exports.getUserFriendsAccountIds=T,exports.getUserTitles=g,exports.getUserTrophiesEarnedForTitle=w,exports.getUserTrophyGroupEarningsForTitle=x,exports.getUserTrophyProfileSummary=k,exports.makeUniversalSearch=d;
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("isomorphic-unfetch"));function t(r,e,t,n,o,a,i){try{var u=r[a](i),c=u.value}catch(r){return void t(r)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(r){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=r.apply(e,n);function u(r){t(i,o,a,u,c,"next",r)}function c(r){t(i,o,a,u,c,"throw",r)}u(void 0)}))}}function o(){return o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},o.apply(this,arguments)}var a={exports:{}};!function(r){var e=function(r){var e,t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{c({},"")}catch(r){c=function(r,e,t){return r[e]=t}}function s(r,e,t,n){var o=Object.create((e&&e.prototype instanceof y?e:y).prototype),a=new S(n||[]);return o._invoke=function(r,e,t){var n=l;return function(o,a){if(n===f)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return P()}for(t.method=o,t.arg=a;;){var i=t.delegate;if(i){var u=_(i,t);if(u){if(u===v)continue;return u}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if(n===l)throw n=d,t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);n=f;var c=p(r,e,t);if("normal"===c.type){if(n=t.done?d:h,c.arg===v)continue;return{value:c.arg,done:t.done}}"throw"===c.type&&(n=d,t.method="throw",t.arg=c.arg)}}}(r,t,a),o}function p(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(r){return{type:"throw",arg:r}}}r.wrap=s;var l="suspendedStart",h="suspendedYield",f="executing",d="completed",v={};function y(){}function m(){}function g(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(L([])));k&&k!==t&&n.call(k,a)&&(w=k);var b=g.prototype=y.prototype=Object.create(w);function I(r){["next","throw","return"].forEach((function(e){c(r,e,(function(r){return this._invoke(e,r)}))}))}function T(r,e){function t(o,a,i,u){var c=p(r[o],r,a);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(r){t("next",r,i,u)}),(function(r){t("throw",r,i,u)})):e.resolve(l).then((function(r){s.value=r,i(s)}),(function(r){return t("throw",r,i,u)}))}u(c.arg)}var o;this._invoke=function(r,n){function a(){return new e((function(e,o){t(r,n,e,o)}))}return o=o?o.then(a,a):a()}}function _(r,t){var n=r.iterator[t.method];if(n===e){if(t.delegate=null,"throw"===t.method){if(r.iterator.return&&(t.method="return",t.arg=e,_(r,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=p(n,r.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var a=o.arg;return a?a.done?(t[r.resultName]=a.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,v):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function E(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function O(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function S(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(E,this),this.reset(!0)}function L(r){if(r){var t=r[a];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(n.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}return{next:P}}function P(){return{value:e,done:!0}}return m.prototype=g,c(b,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(r){var e="function"==typeof r&&r.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,c(r,u,"GeneratorFunction")),r.prototype=Object.create(b),r},r.awrap=function(r){return{__await:r}},I(T.prototype),c(T.prototype,i,(function(){return this})),r.AsyncIterator=T,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var i=new T(s(e,t,n,o),a);return r.isGeneratorFunction(t)?i:i.next().then((function(r){return r.done?r.value:i.next()}))},I(b),c(b,u,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),r.keys=function(r){var e=[];for(var t in r)e.push(t);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=L,S.prototype={constructor:S,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!r)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=e)},stop:function(){this.done=!0;var r=this.tryEntries[0].completion;if("throw"===r.type)throw r.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var t=this;function o(n,o){return u.type="throw",u.arg=r,t.next=n,o&&(t.method="next",t.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(r,e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===r||"continue"===r)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=r,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(r,e){if("throw"===r.type)throw r.arg;return"break"===r.type||"continue"===r.type?this.next=r.arg:"return"===r.type?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):"normal"===r.type&&e&&(this.next=e),v},finish:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var t=this.tryEntries[e];if(t.finallyLoc===r)return this.complete(t.completion,t.afterLoc),O(t),v}},catch:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var t=this.tryEntries[e];if(t.tryLoc===r){var n=t.completion;if("throw"===n.type){var o=n.arg;O(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,n){return this.delegate={iterator:L(r),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=e),v}},r}(r.exports);try{regeneratorRuntime=e}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(a);var i,u=a.exports,c=function(){var r=n(u.mark((function r(t){var n,o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=3,e.default("https://ca.account.sony.com/api/authz/v3/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic YWM4ZDE2MWEtZDk2Ni00NzI4LWIwZWEtZmZlYzIyZjY5ZWRjOkRFaXhFcVhYQ2RYZHdqMHY="},body:new URLSearchParams({code:t,redirect_uri:"com.playstation.PlayStationApp://redirect",grant_type:"authorization_code",token_format:"jwt"}).toString()});case 3:return n=r.sent,r.next=6,n.json();case 6:return r.abrupt("return",{accessToken:(o=r.sent).access_token,expiresIn:o.expires_in,idToken:o.id_token,refreshToken:o.refresh_token,refreshTokenExpiresIn:o.refresh_token_expires_in,scope:o.scope,tokenType:o.token_type});case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),s=function(){var r=n(u.mark((function r(t){var n,o,a,i,c,s;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=new URLSearchParams({access_type:"offline",client_id:"ac8d161a-d966-4728-b0ea-ffec22f69edc",redirect_uri:"com.playstation.PlayStationApp://redirect",response_type:"code",scope:"psn:mobile.v1 psn:clientapp"}).toString(),a="https://ca.account.sony.com/api/authz/v3/oauth/authorize?"+o,r.next=4,e.default(a,{headers:{Cookie:"npsso="+t},redirect:"manual"});case 4:if((i=r.sent.headers).has("location")&&null!=(n=i.get("location"))&&n.includes("?code=")){r.next=8;break}throw new Error("\n There was a problem retrieving your PSN access code. Is your NPSSO code valid?\n To get a new NPSSO code, visit https://ca.account.sony.com/api/v1/ssocookie.\n ");case 8:return c=i.get("location"),s=new URLSearchParams(c.split("redirect/")[1]),r.abrupt("return",s.get("code"));case 11:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),p=function(){var r=n(u.mark((function r(t){var n,o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=3,e.default("https://ca.account.sony.com/api/authz/v3/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic YWM4ZDE2MWEtZDk2Ni00NzI4LWIwZWEtZmZlYzIyZjY5ZWRjOkRFaXhFcVhYQ2RYZHdqMHY="},body:new URLSearchParams({refresh_token:t,grant_type:"refresh_token",token_format:"jwt",scope:"psn:mobile.v1 psn:clientapp"}).toString()});case 3:return n=r.sent,r.next=6,n.json();case 6:return r.abrupt("return",{accessToken:(o=r.sent).access_token,expiresIn:o.expires_in,idToken:o.id_token,refreshToken:o.refresh_token,refreshTokenExpiresIn:o.refresh_token_expires_in,scope:o.scope,tokenType:o.token_type});case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();exports.TrophyRarity=void 0,(i=exports.TrophyRarity||(exports.TrophyRarity={}))[i.UltraRare=0]="UltraRare",i[i.VeryRare=1]="VeryRare",i[i.Rare=2]="Rare",i[i.Common=3]="Common";var l=["headerOverrides"],h=function(r,e,t,n){void 0===t&&(t={}),void 0===n&&(n={});for(var a=function(r,e){if(null==r)return{};var t,n,o={},a=Object.keys(r);for(n=0;n<a.length;n++)e.indexOf(t=a[n])>=0||(o[t]=r[t]);return o}(t,l),i=(r+"/"+e).replace(/([^:]\/)\/+/g,"$1"),u={},c=0,s=Object.entries(o({},n,a));c<s.length;c++){var p=s[c],h=p[0],f=p[1];i.includes(":"+h)?i=i.replace(":"+h,String(f)):void 0!==f&&(u[h]=String(f))}var d=new URLSearchParams(u).toString();return d.length>0?i+"?"+d:i},f=function(){var r=n(u.mark((function r(t,n,a){var i,c;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.default(t.url,{method:null!=(i=null==t?void 0:t.method)?i:"GET",headers:o({Authorization:"Bearer "+n.accessToken,"Content-Type":"application/json"},null==t?void 0:t.headers),body:JSON.stringify(a)});case 2:return c=r.sent,r.next=5,c.json();case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),d=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h("https://m.np.playstation.net/api/search","/v1/universalSearch"),r.next=3,f({url:o,method:"POST"},e,{searchTerm:t,domainRequests:[{domain:n}]});case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),v="https://m.np.playstation.net/api/trophy",y=function(){var r=n(u.mark((function r(e,t,n,o){var a;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=h(v,"/v1/npCommunicationIds/:npCommunicationId/trophyGroups/:trophyGroupId/trophies",o,{npCommunicationId:t,trophyGroupId:n}),r.next=3,f({url:a,headers:null==o?void 0:o.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n,o){return r.apply(this,arguments)}}(),m=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(v,"/v1/npCommunicationIds/:npCommunicationId/trophyGroups",n,{npCommunicationId:t}),r.next=3,f({url:o,headers:null==n?void 0:n.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),g=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(v,"/v1/users/:accountId/trophyTitles",n,{accountId:t}),r.next=3,f({url:o,headers:null==n?void 0:n.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),w=function(){var r=n(u.mark((function r(e,t,n,o,a){var i,c,s,p;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=h(v,"/v1/users/:accountId/npCommunicationIds/:npCommunicationId/trophyGroups/:trophyGroupId/trophies",a,{accountId:t,npCommunicationId:n,trophyGroupId:o}),r.next=3,f({url:i,headers:null==a?void 0:a.headerOverrides},e);case 3:if(null==(c=r.sent)||!c.error){r.next=6;break}throw new Error(null!=(s=null==c||null==(p=c.error)?void 0:p.message)?s:"Unexpected Error");case 6:return r.abrupt("return",c);case 7:case"end":return r.stop()}}),r)})));return function(e,t,n,o,a){return r.apply(this,arguments)}}(),x=function(){var r=n(u.mark((function r(e,t,n,o){var a,i,c,s;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=h(v,"/v1/users/:accountId/npCommunicationIds/:npCommunicationId/trophyGroups",o,{accountId:t,npCommunicationId:n}),r.next=3,f({url:a,headers:null==o?void 0:o.headerOverrides},e);case 3:if(null==(i=r.sent)||!i.error){r.next=6;break}throw new Error(null!=(c=null==i||null==(s=i.error)?void 0:s.message)?c:"Unexpected Error");case 6:return r.abrupt("return",i);case 7:case"end":return r.stop()}}),r)})));return function(e,t,n,o){return r.apply(this,arguments)}}(),k=function(){var r=n(u.mark((function r(e,t,n){var o;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(v,"/v1/users/:accountId/trophySummary",n,{accountId:t}),r.next=3,f({url:o,headers:null==n?void 0:n.headerOverrides},e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),b="https://m.np.playstation.net/api/userProfile/v1/internal/users",I=function(){var r=n(u.mark((function r(e,t,n){var o,a,i,c;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(b,"/:accountId/profiles",n,{accountId:t}),r.next=3,f({url:o},e);case 3:if(null==(a=r.sent)||!a.error){r.next=6;break}throw new Error(null!=(i=null==a||null==(c=a.error)?void 0:c.message)?i:"Unexpected Error");case 6:return r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),T=function(){var r=n(u.mark((function r(e,t){var n,o,a,i;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="https://us-prof.np.community.playstation.net/userProfile/v1/users/"+t+"/profile2?fields=npId,onlineId,accountId,avatarUrls,plus,aboutMe,languagesUsed,trophySummary(@default,level,progress,earnedTrophies),isOfficiallyVerified,personalDetail(@default,profilePictureUrls),personalDetailSharing,personalDetailSharingRequestMessageFlag,primaryOnlineStatus,presences(@default,@titleInfo,platform,lastOnlineDate,hasBroadcastData),requestMessageFlag,blocking,friendRelation,following,consoleAvailability",r.next=3,f({url:n},e);case 3:if(null==(o=r.sent)||!o.error){r.next=6;break}throw new Error(null!=(a=null==o||null==(i=o.error)?void 0:i.message)?a:"Unexpected Error");case 6:return r.abrupt("return",o);case 7:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}(),_=function(){var r=n(u.mark((function r(e,t,n){var o,a,i,c;return u.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=h(b,"/:accountId/friends",n,{accountId:t}),r.next=3,f({url:o},e);case 3:if(null==(a=r.sent)||!a.error){r.next=6;break}throw new Error(null!=(i=null==a||null==(c=a.error)?void 0:c.message)?i:"Unexpected Error");case 6:return r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}();exports.call=f,exports.exchangeCodeForAccessToken=c,exports.exchangeNpssoForCode=s,exports.exchangeRefreshTokenForAuthTokens=p,exports.getProfileFromAccountId=I,exports.getProfileFromUserName=T,exports.getTitleTrophies=y,exports.getTitleTrophyGroups=m,exports.getUserFriendsAccountIds=_,exports.getUserTitles=g,exports.getUserTrophiesEarnedForTitle=w,exports.getUserTrophyGroupEarningsForTitle=x,exports.getUserTrophyProfileSummary=k,exports.makeUniversalSearch=d;
//# sourceMappingURL=psn-api.cjs.production.min.js.map

@@ -1506,3 +1506,56 @@ import fetch from 'isomorphic-unfetch';

var USER_BASE_URL = "https://m.np.playstation.net/api/userProfile/v1/internal/users";
/**
* A call to this function will retrieve some profile information of the accountId being requested.
* If the account's profile cannot be found (either due to non-existence or privacy settings),
* an error will be thrown.
*
* @param authorization An object containing your access token, typically retrieved with `exchangeCodeForAccessToken()`.
* @param accountId The accountId for the user you wish to retrieve a profile for.
*/
var getProfileFromAccountId = /*#__PURE__*/function () {
var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(authorization, accountId, options) {
var url, response, _response$error$messa, _response$error;
return _regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
url = buildRequestUrl(USER_BASE_URL, "/:accountId/profiles", options, {
accountId: accountId
});
_context.next = 3;
return call({
url: url
}, authorization);
case 3:
response = _context.sent;
if (!(response != null && response.error)) {
_context.next = 6;
break;
}
throw new Error((_response$error$messa = response == null ? void 0 : (_response$error = response.error) == null ? void 0 : _response$error.message) != null ? _response$error$messa : "Unexpected Error");
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function getProfileFromAccountId(_x, _x2, _x3) {
return _ref.apply(this, arguments);
};
}();
/**
* A call to this function will retrieve the profile of the username being requested.

@@ -1561,4 +1614,2 @@ * If the user cannot be found (either due to non-existence or privacy settings),

var USER_BASE_URL = "https://m.np.playstation.net/api/userProfile/v1/internal/users";
/**

@@ -1617,3 +1668,3 @@ * A call to this function will retrieve the list of friended `accountId` values

export { TrophyRarity, call, exchangeCodeForAccessToken, exchangeNpssoForCode, exchangeRefreshTokenForAuthTokens, getProfileFromUserName, getTitleTrophies, getTitleTrophyGroups, getUserFriendsAccountIds, getUserTitles, getUserTrophiesEarnedForTitle, getUserTrophyGroupEarningsForTitle, getUserTrophyProfileSummary, makeUniversalSearch };
export { TrophyRarity, call, exchangeCodeForAccessToken, exchangeNpssoForCode, exchangeRefreshTokenForAuthTokens, getProfileFromAccountId, getProfileFromUserName, getTitleTrophies, getTitleTrophyGroups, getUserFriendsAccountIds, getUserTitles, getUserTrophiesEarnedForTitle, getUserTrophyGroupEarningsForTitle, getUserTrophyProfileSummary, makeUniversalSearch };
//# sourceMappingURL=psn-api.esm.js.map

@@ -0,2 +1,3 @@

export * from "./getProfileFromAccountId";
export * from "./getProfileFromUserName";
export * from "./getUserFriendsAccountIds";

@@ -13,3 +13,3 @@ {

],
"version": "2.6.0",
"version": "2.7.0",
"main": "dist/index.js",

@@ -55,17 +55,17 @@ "module": "dist/psn-api.esm.js",

"@commitlint/config-conventional": "^13.2.0",
"@rollup/plugin-alias": "^3.1.8",
"@rollup/plugin-alias": "^3.1.9",
"@size-limit/preset-small-lib": "^6.0.4",
"@skypack/package-check": "^0.2.2",
"@types/faker": "^5.5.9",
"@types/jest": "^27.0.3",
"@types/node": "^16.11.12",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@types/jest": "^27.4.0",
"@types/node": "^16.11.24",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"cz-conventional-changelog": "^3.3.0",
"dotenv-flow-cli": "^1.0.0",
"dts-cli": "^0.19.7",
"eslint": "^8.4.1",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-simple-import-sort": "^7.0.0",

@@ -76,13 +76,13 @@ "eslint-plugin-sonarjs": "^0.10.0",

"husky": "^4.3.8",
"jest": "^27.4.4",
"jest": "^27.5.1",
"msw": "^0.35.0",
"prettier": "2.4.1",
"pretty-quick": "^3.1.2",
"pretty-quick": "^3.1.3",
"redis": "^4.0.0-rc.3",
"semantic-release": "^18.0.1",
"size-limit": "^6.0.4",
"ts-jest": "^27.1.1",
"ts-jest": "^27.1.3",
"ts-node-dev": "^1.1.8",
"tslib": "^2.3.1",
"typescript": "^4.5.3"
"typescript": "^4.5.5"
},

@@ -89,0 +89,0 @@ "size-limit": [

@@ -77,2 +77,4 @@ <h1 align="center">psn-api</h1>

If you see an error response, try using different browser.
3. You can now obtain an authentication token using your NPSSO with the following function calls from this package.

@@ -120,2 +122,3 @@

- [`getProfileFromUserName()`](https://psn-api.achievements.app/api-docs/users#getprofilefromusername) - Get a user's legacy profile from the username. Often used to check for legacy presence.
- [`getProfileFromAccountId()`](https://psn-api.achievements.app/api-docs/users#getprofilefromAccountId) - Get a user's profile from the `accountId`.
- [`getUserFriendsAccountIds()`](https://psn-api.achievements.app/api-docs/users#getuserfriendsaccountids) - Get a list of `accountId` values present on a target account's friends list.

@@ -157,2 +160,3 @@

<td align="center"><a href="https://github.com/purplem1lk"><img src="https://avatars.githubusercontent.com/u/49956513?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Susan Ma</b></sub></a><br /><a href="https://github.com/achievements-app/psn-api/commits?author=purplem1lk" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/travisrroy"><img src="https://avatars.githubusercontent.com/u/24424190?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Travis Roy</b></sub></a><br /><a href="https://github.com/achievements-app/psn-api/commits?author=travisrroy" title="Code">💻</a> <a href="#example-travisrroy" title="Examples">💡</a> <a href="https://github.com/achievements-app/psn-api/commits?author=travisrroy" title="Documentation">📖</a></td>
</tr>

@@ -159,0 +163,0 @@ </table>

@@ -6,2 +6,3 @@ export * from "./all-call-options.model";

export * from "./get-user-friends-account-ids-response.model";
export * from "./profile-from-account-id-response.model";
export * from "./profile-from-user-name-response.model";

@@ -8,0 +9,0 @@ export * from "./rarest-thin-trophy.model";

@@ -0,2 +1,3 @@

export * from "./getProfileFromAccountId";
export * from "./getProfileFromUserName";
export * from "./getUserFriendsAccountIds";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc