@spritz-finance/api-client 0.0.9 → 0.0.10
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.
|
@@ -653,10 +653,13 @@ interface CreateUserResponse {
|
|
|
653
653
|
email: string;
|
|
654
654
|
apiKey: string;
|
|
655
655
|
}
|
|
656
|
+
interface CreateUserArgs {
|
|
657
|
+
email: string;
|
|
658
|
+
}
|
|
656
659
|
declare class UserService {
|
|
657
660
|
private client;
|
|
658
661
|
constructor(client: GraphClient);
|
|
659
|
-
createUser(
|
|
662
|
+
createUser(args: CreateUserArgs): Promise<CreateUserResponse>;
|
|
660
663
|
getCurrentUser(): Promise<CurrentUser_me>;
|
|
661
664
|
getUserVerification(): Promise<UserVerification_verification>;
|
|
662
665
|
}
|
|
@@ -224,5 +224,5 @@ query CurrentUser {
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function bn(e,n){if(e.kind==="FragmentSpread")n.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){bn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){bn(i,n)}),e.definitions&&e.definitions.forEach(function(i){bn(i,n)})}var at={};(function(){Nn.definitions.forEach(function(n){if(n.name){var t=new Set;bn(n,t),at[n.name.value]=t}})})();function bi(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}function Ur(e,n){var t={kind:e.kind,definitions:[bi(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=at[n]||new Set,a=new Set,r=new Set;for(i.forEach(function(o){r.add(o)});r.size>0;){var u=r;r=new Set,u.forEach(function(o){if(!a.has(o)){a.add(o);var s=at[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=bi(e,o);s&&t.definitions.push(s)}),t}Ur(Nn,"UserVerification");class Br{client;constructor(n){this.client=n}async createUser(n){const{data:t}=await this.client.baseClient.post("/users/integration",
|
|
227
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function bn(e,n){if(e.kind==="FragmentSpread")n.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){bn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){bn(i,n)}),e.definitions&&e.definitions.forEach(function(i){bn(i,n)})}var at={};(function(){Nn.definitions.forEach(function(n){if(n.name){var t=new Set;bn(n,t),at[n.name.value]=t}})})();function bi(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}function Ur(e,n){var t={kind:e.kind,definitions:[bi(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=at[n]||new Set,a=new Set,r=new Set;for(i.forEach(function(o){r.add(o)});r.size>0;){var u=r;r=new Set,u.forEach(function(o){if(!a.has(o)){a.add(o);var s=at[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=bi(e,o);s&&t.definitions.push(s)}),t}Ur(Nn,"UserVerification");class Br{client;constructor(n){this.client=n}async createUser(n){const{data:t}=await this.client.baseClient.post("/users/integration",n);return t}async getCurrentUser(){return(await this.client.query({query:Ie}))?.me??null}async getUserVerification(){return(await this.client.query({query:Nn}))?.verification??null}}class rt{constructor(n,t,i){this.apiKey=n,this.integrationKey=t,this.environment=i}client;user;bankAccount;paymentRequest;payment;static initialize({environment:n,apiKey:t="",integrationKey:i=""}){const a=new rt(t,i,n);return a.init(),a}init(){this.client=new Ka(this.environment,this.apiKey,this.integrationKey),this.user=new Br(this.client),this.bankAccount=new cr(this.client),this.paymentRequest=new Fr(this.client),this.payment=new mr(this.client)}setApiKey(n){return this.apiKey=n,this.init(),this}}var Ei=(e=>(e.Staging="staging",e.Production="production",e))(Ei||{}),Ii=(e=>(e.Ethereum="ethereum",e.Polygon="polygon",e.Optimism="optimism",e.Arbitrum="arbitrum",e.Binance="binance-smart-chain",e.Avalanche="avalanche",e.Bitcoin="bitcoin",e.BitcoinTestnet="bitcoin-testnet",e.Dash="dash",e.DashTestnet="dash-testnet",e))(Ii||{});exports.AccountProvider=Jn,exports.BankAccountSubType=ai,exports.BankAccountType=Hn,exports.DirectPaymentStatus=ri,exports.Environment=Ei,exports.ModuleStatus=oi,exports.PayableAccountType=si,exports.PaymentNetwork=Ii,exports.PaymentStatus=ui,exports.SpritzApiClient=rt;
|
|
228
228
|
//# sourceMappingURL=spritz-api-client.js.map
|