@spritz-finance/api-client 0.0.10 → 0.0.12
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.
- package/README.md +1 -1
- package/dist/spritz-api-client.d.ts +224 -79
- package/dist/spritz-api-client.js +53 -35
- package/dist/spritz-api-client.mjs +53 -35
- package/package.json +1 -1
- package/dist/spritz-api-client.js.map +0 -1
- package/dist/spritz-api-client.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import In from"axios";var
|
|
2
|
-
`),g=i.split(/\r\n|[\n\r]/g),E=g[a];if(E.length>120){for(var y=Math.floor(s/80),d=s%80,
|
|
3
|
-
`)}function Ce(e){return Array(e+1).join(" ")}function _i(e,n){return Ce(e-n.length)+n}function qe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qe=function(t){return typeof t}:qe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(e)}function ct(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,i)}return t}function
|
|
1
|
+
import In from"axios";var Oi=Object.getOwnPropertyNames,Z=(e,n)=>function(){return n||(0,e[Oi(e)[0]])((n={exports:{}}).exports,n),n.exports};function xe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xe=function(t){return typeof t}:xe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(e)}function oe(e){return xe(e)=="object"&&e!==null}var ot=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",G=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function wn(e,n){for(var t=/\r\n|[\n\r]/g,i=1,a=n+1,r;(r=t.exec(e.body))&&r.index<n;)i+=1,a=n+1-(r.index+r[0].length);return{line:i,column:a}}function Fi(e){return st(e.source,wn(e.source,e.start))}function st(e,n){var t=e.locationOffset.column-1,i=Ce(t)+e.body,a=n.line-1,r=e.locationOffset.line-1,u=n.line+r,o=n.line===1?t:0,s=n.column+o,l="".concat(e.name,":").concat(u,":").concat(s,`
|
|
2
|
+
`),g=i.split(/\r\n|[\n\r]/g),E=g[a];if(E.length>120){for(var y=Math.floor(s/80),d=s%80,T=[],w=0;w<E.length;w+=80)T.push(E.slice(w,w+80));return l+ut([["".concat(u),T[0]]].concat(T.slice(1,y+1).map(function(O){return["",O]}),[[" ",Ce(d-1)+"^"],["",T[y+1]]]))}return l+ut([["".concat(u-1),g[a-1]],["".concat(u),E],["",Ce(s-1)+"^"],["".concat(u+1),g[a+1]]])}function ut(e){var n=e.filter(function(i){i[0];var a=i[1];return a!==void 0}),t=Math.max.apply(Math,n.map(function(i){var a=i[0];return a.length}));return n.map(function(i){var a=i[0],r=i[1];return _i(t,a)+(r?" | "+r:" |")}).join(`
|
|
3
|
+
`)}function Ce(e){return Array(e+1).join(" ")}function _i(e,n){return Ce(e-n.length)+n}function qe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qe=function(t){return typeof t}:qe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(e)}function ct(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,i)}return t}function Li(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?ct(Object(t),!0).forEach(function(i){Ri(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ct(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Ri(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pi(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function lt(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ui(e,n,t){return n&<(e.prototype,n),t&<(e,t),e}function Bi(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Ae(e,n)}function Vi(e){var n=dt();return function(){var i=De(e),a;if(n){var r=De(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return ft(this,a)}}function ft(e,n){return n&&(qe(n)==="object"||typeof n=="function")?n:we(e)}function we(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function An(e){var n=typeof Map=="function"?new Map:void 0;return An=function(i){if(i===null||!Mi(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(i))return n.get(i);n.set(i,a)}function a(){return je(i,arguments,De(this).constructor)}return a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Ae(a,i)},An(e)}function je(e,n,t){return dt()?je=Reflect.construct:je=function(a,r,u){var o=[null];o.push.apply(o,r);var s=Function.bind.apply(a,o),l=new s;return u&&Ae(l,u.prototype),l},je.apply(null,arguments)}function dt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Mi(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ae(e,n){return Ae=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},Ae(e,n)}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},De(e)}var U=function(e){Bi(t,e);var n=Vi(t);function t(i,a,r,u,o,s,l){var g,E,y,d;Pi(this,t),d=n.call(this,i),d.name="GraphQLError",d.originalError=s??void 0,d.nodes=vt(Array.isArray(a)?a:a?[a]:void 0);for(var T=[],w=0,O=(D=d.nodes)!==null&&D!==void 0?D:[];w<O.length;w++){var D,P=O[w],L=P.loc;L!=null&&T.push(L)}T=vt(T),d.source=r??((g=T)===null||g===void 0?void 0:g[0].source),d.positions=u??((E=T)===null||E===void 0?void 0:E.map(function(c){return c.start})),d.locations=u&&r?u.map(function(c){return wn(r,c)}):(y=T)===null||y===void 0?void 0:y.map(function(c){return wn(c.source,c.start)}),d.path=o??void 0;var f=s?.extensions;return l==null&&oe(f)?d.extensions=Li({},f):d.extensions=l??{},Object.defineProperties(we(d),{message:{enumerable:!0},locations:{enumerable:d.locations!=null},path:{enumerable:d.path!=null},extensions:{enumerable:d.extensions!=null&&Object.keys(d.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),s!=null&&s.stack?(Object.defineProperty(we(d),"stack",{value:s.stack,writable:!0,configurable:!0}),ft(d)):(Error.captureStackTrace?Error.captureStackTrace(we(d),t):Object.defineProperty(we(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return Ui(t,[{key:"toString",value:function(){return xi(this)}},{key:G,get:function(){return"Object"}}]),t}(An(Error));function vt(e){return e===void 0||e.length===0?void 0:e}function xi(e){var n=e.message;if(e.nodes)for(var t=0,i=e.nodes;t<i.length;t++){var a=i[t];a.loc&&(n+=`
|
|
4
4
|
|
|
5
|
-
`+
|
|
5
|
+
`+Fi(a.loc))}else if(e.source&&e.locations)for(var r=0,u=e.locations;r<u.length;r++){var o=u[r];n+=`
|
|
6
6
|
|
|
7
|
-
`+st(e.source,o)}return n}var h=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function Oe(e,n){var t=!!e;if(!t)throw new Error(n??"Unexpected invariant triggered.")}var
|
|
7
|
+
`+st(e.source,o)}return n}var h=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function Oe(e,n){var t=!!e;if(!t)throw new Error(n??"Unexpected invariant triggered.")}var Ci=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,Dn=Ci;function H(e){var n=e.prototype.toJSON;typeof n=="function"||Oe(0),e.prototype.inspect=n,Dn&&(e.prototype[Dn]=n)}var qi=function(){function e(t,i,a){this.start=t.start,this.end=i.end,this.startToken=t,this.endToken=i,this.source=a}var n=e.prototype;return n.toJSON=function(){return{start:this.start,end:this.end}},e}();H(qi);var ji=function(){function e(t,i,a,r,u,o,s){this.kind=t,this.start=i,this.end=a,this.line=r,this.column=u,this.value=s,this.prev=o,this.next=null}var n=e.prototype;return n.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();H(ji);function On(e){return e!=null&&typeof e.kind=="string"}function Ge(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ge=function(t){return typeof t}:Ge=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ge(e)}var Gi=10,pt=2;function _(e){return $e(e,[])}function $e(e,n){switch(Ge(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":$i(e,n);default:return String(e)}}function $i(e,n){if(n.indexOf(e)!==-1)return"[Circular]";var t=[].concat(n,[e]),i=Hi(e);if(i!==void 0){var a=i.call(e);if(a!==e)return typeof a=="string"?a:$e(a,t)}else if(Array.isArray(e))return Ji(e,t);return Qi(e,t)}function Qi(e,n){var t=Object.keys(e);if(t.length===0)return"{}";if(n.length>pt)return"["+zi(e)+"]";var i=t.map(function(a){var r=$e(e[a],n);return a+": "+r});return"{ "+i.join(", ")+" }"}function Ji(e,n){if(e.length===0)return"[]";if(n.length>pt)return"[Array]";for(var t=Math.min(Gi,e.length),i=e.length-t,a=[],r=0;r<t;++r)a.push($e(e[r],n));return i===1?a.push("... 1 more item"):i>1&&a.push("... ".concat(i," more items")),"["+a.join(", ")+"]"}function Hi(e){var n=e[String(Dn)];if(typeof n=="function")return n;if(typeof e.inspect=="function")return e.inspect}function zi(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(n==="Object"&&typeof e.constructor=="function"){var t=e.constructor.name;if(typeof t=="string"&&t!=="")return t}return n}function F(e,n){var t=!!e;if(!t)throw new Error(n)}function Qe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qe=function(t){return typeof t}:Qe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qe(e)}var ee=function(n,t){if(n instanceof t)return!0;if(Qe(n)==="object"&&n!==null){var i,a=t.prototype[Symbol.toStringTag],r=Symbol.toStringTag in n?n[Symbol.toStringTag]:(i=n.constructor)===null||i===void 0?void 0:i.name;if(a===r){var u=_(n);throw new Error("Cannot use ".concat(a,' "').concat(u,`" from another module or realm.
|
|
8
8
|
|
|
9
9
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
10
10
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -15,20 +15,20 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
15
15
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
16
16
|
versions may have different capabilities and behavior. The data from one
|
|
17
17
|
version used in the function from another could produce confusing and
|
|
18
|
-
spurious results.`))}}return!1};function mt(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function
|
|
18
|
+
spurious results.`))}}return!1};function mt(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Yi(e,n,t){return n&&mt(e.prototype,n),t&&mt(e,t),e}(function(){function e(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof n=="string"||F(0,"Body must be a string. Received: ".concat(_(n),".")),this.body=n,this.name=t,this.locationOffset=i,this.locationOffset.line>0||F(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||F(0,"column in locationOffset is 1-indexed and must be positive.")}return Yi(e,[{key:G,get:function(){return"Source"}}]),e})();var R=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Ki(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=e.indexOf(`
|
|
19
19
|
`)===-1,a=e[0]===" "||e[0]===" ",r=e[e.length-1]==='"',u=e[e.length-1]==="\\",o=!i||r||u||t,s="";return o&&!(i&&a)&&(s+=`
|
|
20
20
|
`+n),s+=n?e.replace(/\n/g,`
|
|
21
21
|
`+n):e,o&&(s+=`
|
|
22
|
-
`),'"""'+s.replace(/"""/g,'\\"""')+'"""'}var
|
|
22
|
+
`),'"""'+s.replace(/"""/g,'\\"""')+'"""'}var Xi={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Wi=Object.freeze({});function ht(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xi,i=void 0,a=Array.isArray(e),r=[e],u=-1,o=[],s=void 0,l=void 0,g=void 0,E=[],y=[],d=e;do{u++;var T=u===r.length,w=T&&o.length!==0;if(T){if(l=y.length===0?void 0:E[E.length-1],s=g,g=y.pop(),w){if(a)s=s.slice();else{for(var O={},D=0,P=Object.keys(s);D<P.length;D++){var L=P[D];O[L]=s[L]}s=O}for(var f=0,c=0;c<o.length;c++){var S=o[c][0],v=o[c][1];a&&(S-=f),a&&v===null?(s.splice(S,1),f++):s[S]=v}}u=i.index,r=i.keys,o=i.edits,a=i.inArray,i=i.prev}else{if(l=g?a?u:r[u]:void 0,s=g?g[l]:d,s==null)continue;g&&E.push(l)}var b=void 0;if(!Array.isArray(s)){if(!On(s))throw new Error("Invalid AST Node: ".concat(_(s),"."));var A=Fn(n,s.kind,T);if(A){if(b=A.call(n,s,l,g,E,y),b===Wi)break;if(b===!1){if(!T){E.pop();continue}}else if(b!==void 0&&(o.push([l,b]),!T))if(On(b))s=b;else{E.pop();continue}}}if(b===void 0&&w&&o.push([l,s]),T)E.pop();else{var m;i={inArray:a,index:u,keys:r,edits:o,prev:i},a=Array.isArray(s),r=a?s:(m=t[s.kind])!==null&&m!==void 0?m:[],u=-1,o=[],g&&y.push(g),g=s}}while(i!==void 0);return o.length!==0&&(d=o[o.length-1][1]),d}function Fn(e,n,t){var i=e[n];if(i){if(!t&&typeof i=="function")return i;var a=t?i.leave:i.enter;if(typeof a=="function")return a}else{var r=t?e.leave:e.enter;if(r){if(typeof r=="function")return r;var u=r[n];if(typeof u=="function")return u}}}var Zi=Array.prototype.find?function(e,n){return Array.prototype.find.call(e,n)}:function(e,n){for(var t=0;t<e.length;t++){var i=e[t];if(n(i))return i}},yt=Zi,ea=Object.values||function(e){return Object.keys(e).map(function(n){return e[n]})},se=ea,na=Object.entries||function(e){return Object.keys(e).map(function(n){return[n,e[n]]})},Fe=na;function gt(e,n){return e.reduce(function(t,i){return t[n(i)]=i,t},Object.create(null))}function Je(e,n){for(var t=Object.create(null),i=0,a=Fe(e);i<a.length;i++){var r=a[i],u=r[0],o=r[1];t[u]=n(o,u)}return t}function j(e){if(Object.getPrototypeOf(e)===null)return e;for(var n=Object.create(null),t=0,i=Fe(e);t<i.length;t++){var a=i[t],r=a[0],u=a[1];n[r]=u}return n}function _n(e,n,t){return e.reduce(function(i,a){return i[n(a)]=t(a),i},Object.create(null))}var ta=5;function ia(e,n){var t=typeof e=="string"?[e,n]:[void 0,e],i=t[0],a=t[1],r=" Did you mean ";i&&(r+=i+" ");var u=a.map(function(l){return'"'.concat(l,'"')});switch(u.length){case 0:return"";case 1:return r+u[0]+"?";case 2:return r+u[0]+" or "+u[1]+"?"}var o=u.slice(0,ta),s=o.pop();return r+o.join(", ")+", or "+s+"?"}function kt(e){return e}function aa(e,n){for(var t=0,i=0;t<e.length&&i<n.length;){var a=e.charCodeAt(t),r=n.charCodeAt(i);if(He(a)&&He(r)){var u=0;do++t,u=u*10+a-Ln,a=e.charCodeAt(t);while(He(a)&&u>0);var o=0;do++i,o=o*10+r-Ln,r=n.charCodeAt(i);while(He(r)&&o>0);if(u<o)return-1;if(u>o)return 1}else{if(a<r)return-1;if(a>r)return 1;++t,++i}}return e.length-n.length}var Ln=48,ra=57;function He(e){return!isNaN(e)&&Ln<=e&&e<=ra}function oa(e,n){for(var t=Object.create(null),i=new sa(e),a=Math.floor(e.length*.4)+1,r=0;r<n.length;r++){var u=n[r],o=i.measure(u,a);o!==void 0&&(t[u]=o)}return Object.keys(t).sort(function(s,l){var g=t[s]-t[l];return g!==0?g:aa(s,l)})}var sa=function(){function e(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=St(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}var n=e.prototype;return n.measure=function(i,a){if(this._input===i)return 0;var r=i.toLowerCase();if(this._inputLowerCase===r)return 1;var u=St(r),o=this._inputArray;if(u.length<o.length){var s=u;u=o,o=s}var l=u.length,g=o.length;if(!(l-g>a)){for(var E=this._rows,y=0;y<=g;y++)E[0][y]=y;for(var d=1;d<=l;d++){for(var T=E[(d-1)%3],w=E[d%3],O=w[0]=d,D=1;D<=g;D++){var P=u[d-1]===o[D-1]?0:1,L=Math.min(T[D]+1,w[D-1]+1,T[D-1]+P);if(d>1&&D>1&&u[d-1]===o[D-2]&&u[d-2]===o[D-1]){var f=E[(d-2)%3][D-2];L=Math.min(L,f+1)}L<O&&(O=L),w[D]=L}if(O>a)return}var c=E[l%3][g];return c<=a?c:void 0}},e}();function St(e){for(var n=e.length,t=new Array(n),i=0;i<n;++i)t[i]=e.charCodeAt(i);return t}function ne(e){return ht(e,{leave:ca})}var ua=80,ca={Name:function(n){return n.value},Variable:function(n){return"$"+n.name},Document:function(n){return k(n.definitions,`
|
|
23
23
|
|
|
24
24
|
`)+`
|
|
25
|
-
`},OperationDefinition:function(n){var t=n.operation,i=n.name,a=B("(",k(n.variableDefinitions,", "),")"),r=k(n.directives," "),u=n.selectionSet;return!i&&!r&&!a&&t==="query"?u:k([t,k([i,a]),r,u]," ")},VariableDefinition:function(n){var t=n.variable,i=n.type,a=n.defaultValue,r=n.directives;return t+": "+i+B(" = ",a)+B(" ",k(r," "))},SelectionSet:function(n){var t=n.selections;return Y(t)},Field:function(n){var t=n.alias,i=n.name,a=n.arguments,r=n.directives,u=n.selectionSet,o=B("",t,": ")+i,s=o+B("(",k(a,", "),")");return s.length>
|
|
25
|
+
`},OperationDefinition:function(n){var t=n.operation,i=n.name,a=B("(",k(n.variableDefinitions,", "),")"),r=k(n.directives," "),u=n.selectionSet;return!i&&!r&&!a&&t==="query"?u:k([t,k([i,a]),r,u]," ")},VariableDefinition:function(n){var t=n.variable,i=n.type,a=n.defaultValue,r=n.directives;return t+": "+i+B(" = ",a)+B(" ",k(r," "))},SelectionSet:function(n){var t=n.selections;return Y(t)},Field:function(n){var t=n.alias,i=n.name,a=n.arguments,r=n.directives,u=n.selectionSet,o=B("",t,": ")+i,s=o+B("(",k(a,", "),")");return s.length>ua&&(s=o+B(`(
|
|
26
26
|
`,ze(k(a,`
|
|
27
27
|
`)),`
|
|
28
|
-
)`)),k([s,k(r," "),u]," ")},Argument:function(n){var t=n.name,i=n.value;return t+": "+i},FragmentSpread:function(n){var t=n.name,i=n.directives;return"..."+t+B(" ",k(i," "))},InlineFragment:function(n){var t=n.typeCondition,i=n.directives,a=n.selectionSet;return k(["...",B("on ",t),k(i," "),a]," ")},FragmentDefinition:function(n){var t=n.name,i=n.typeCondition,a=n.variableDefinitions,r=n.directives,u=n.selectionSet;return"fragment ".concat(t).concat(B("(",k(a,", "),")")," ")+"on ".concat(i," ").concat(B("",k(r," ")," "))+u},IntValue:function(n){var t=n.value;return t},FloatValue:function(n){var t=n.value;return t},StringValue:function(n,t){var i=n.value,a=n.block;return a?
|
|
28
|
+
)`)),k([s,k(r," "),u]," ")},Argument:function(n){var t=n.name,i=n.value;return t+": "+i},FragmentSpread:function(n){var t=n.name,i=n.directives;return"..."+t+B(" ",k(i," "))},InlineFragment:function(n){var t=n.typeCondition,i=n.directives,a=n.selectionSet;return k(["...",B("on ",t),k(i," "),a]," ")},FragmentDefinition:function(n){var t=n.name,i=n.typeCondition,a=n.variableDefinitions,r=n.directives,u=n.selectionSet;return"fragment ".concat(t).concat(B("(",k(a,", "),")")," ")+"on ".concat(i," ").concat(B("",k(r," ")," "))+u},IntValue:function(n){var t=n.value;return t},FloatValue:function(n){var t=n.value;return t},StringValue:function(n,t){var i=n.value,a=n.block;return a?Ki(i,t==="description"?"":" "):JSON.stringify(i)},BooleanValue:function(n){var t=n.value;return t?"true":"false"},NullValue:function(){return"null"},EnumValue:function(n){var t=n.value;return t},ListValue:function(n){var t=n.values;return"["+k(t,", ")+"]"},ObjectValue:function(n){var t=n.fields;return"{"+k(t,", ")+"}"},ObjectField:function(n){var t=n.name,i=n.value;return t+": "+i},Directive:function(n){var t=n.name,i=n.arguments;return"@"+t+B("(",k(i,", "),")")},NamedType:function(n){var t=n.name;return t},ListType:function(n){var t=n.type;return"["+t+"]"},NonNullType:function(n){var t=n.type;return t+"!"},SchemaDefinition:z(function(e){var n=e.directives,t=e.operationTypes;return k(["schema",k(n," "),Y(t)]," ")}),OperationTypeDefinition:function(n){var t=n.operation,i=n.type;return t+": "+i},ScalarTypeDefinition:z(function(e){var n=e.name,t=e.directives;return k(["scalar",n,k(t," ")]," ")}),ObjectTypeDefinition:z(function(e){var n=e.name,t=e.interfaces,i=e.directives,a=e.fields;return k(["type",n,B("implements ",k(t," & ")),k(i," "),Y(a)]," ")}),FieldDefinition:z(function(e){var n=e.name,t=e.arguments,i=e.type,a=e.directives;return n+(Nt(t)?B(`(
|
|
29
29
|
`,ze(k(t,`
|
|
30
30
|
`)),`
|
|
31
|
-
)`):B("(",k(t,", "),")"))+": "+i+B(" ",k(a," "))}),InputValueDefinition:z(function(e){var n=e.name,t=e.type,i=e.defaultValue,a=e.directives;return k([n+": "+t,B("= ",i),k(a," ")]," ")}),InterfaceTypeDefinition:z(function(e){var n=e.name,t=e.interfaces,i=e.directives,a=e.fields;return k(["interface",n,B("implements ",k(t," & ")),k(i," "),Y(a)]," ")}),UnionTypeDefinition:z(function(e){var n=e.name,t=e.directives,i=e.types;return k(["union",n,k(t," "),i&&i.length!==0?"= "+k(i," | "):""]," ")}),EnumTypeDefinition:z(function(e){var n=e.name,t=e.directives,i=e.values;return k(["enum",n,k(t," "),Y(i)]," ")}),EnumValueDefinition:z(function(e){var n=e.name,t=e.directives;return k([n,k(t," ")]," ")}),InputObjectTypeDefinition:z(function(e){var n=e.name,t=e.directives,i=e.fields;return k(["input",n,k(t," "),Y(i)]," ")}),DirectiveDefinition:z(function(e){var n=e.name,t=e.arguments,i=e.repeatable,a=e.locations;return"directive @"+n+(
|
|
31
|
+
)`):B("(",k(t,", "),")"))+": "+i+B(" ",k(a," "))}),InputValueDefinition:z(function(e){var n=e.name,t=e.type,i=e.defaultValue,a=e.directives;return k([n+": "+t,B("= ",i),k(a," ")]," ")}),InterfaceTypeDefinition:z(function(e){var n=e.name,t=e.interfaces,i=e.directives,a=e.fields;return k(["interface",n,B("implements ",k(t," & ")),k(i," "),Y(a)]," ")}),UnionTypeDefinition:z(function(e){var n=e.name,t=e.directives,i=e.types;return k(["union",n,k(t," "),i&&i.length!==0?"= "+k(i," | "):""]," ")}),EnumTypeDefinition:z(function(e){var n=e.name,t=e.directives,i=e.values;return k(["enum",n,k(t," "),Y(i)]," ")}),EnumValueDefinition:z(function(e){var n=e.name,t=e.directives;return k([n,k(t," ")]," ")}),InputObjectTypeDefinition:z(function(e){var n=e.name,t=e.directives,i=e.fields;return k(["input",n,k(t," "),Y(i)]," ")}),DirectiveDefinition:z(function(e){var n=e.name,t=e.arguments,i=e.repeatable,a=e.locations;return"directive @"+n+(Nt(t)?B(`(
|
|
32
32
|
`,ze(k(t,`
|
|
33
33
|
`)),`
|
|
34
34
|
)`):B("(",k(t,", "),")"))+(i?" repeatable":"")+" on "+k(a," | ")}),SchemaExtension:function(n){var t=n.directives,i=n.operationTypes;return k(["extend schema",k(t," "),Y(i)]," ")},ScalarTypeExtension:function(n){var t=n.name,i=n.directives;return k(["extend scalar",t,k(i," ")]," ")},ObjectTypeExtension:function(n){var t=n.name,i=n.interfaces,a=n.directives,r=n.fields;return k(["extend type",t,B("implements ",k(i," & ")),k(a," "),Y(r)]," ")},InterfaceTypeExtension:function(n){var t=n.name,i=n.interfaces,a=n.directives,r=n.fields;return k(["extend interface",t,B("implements ",k(i," & ")),k(a," "),Y(r)]," ")},UnionTypeExtension:function(n){var t=n.name,i=n.directives,a=n.types;return k(["extend union",t,k(i," "),a&&a.length!==0?"= "+k(a," | "):""]," ")},EnumTypeExtension:function(n){var t=n.name,i=n.directives,a=n.values;return k(["extend enum",t,k(i," "),Y(a)]," ")},InputObjectTypeExtension:function(n){var t=n.name,i=n.directives,a=n.fields;return k(["extend input",t,k(i," "),Y(a)]," ")}};function z(e){return function(n){return k([n.description,e(n)],`
|
|
@@ -36,10 +36,10 @@ spurious results.`))}}return!1};function mt(e,n){for(var t=0;t<n.length;t++){var
|
|
|
36
36
|
`,ze(k(e,`
|
|
37
37
|
`)),`
|
|
38
38
|
}`)}function B(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return n!=null&&n!==""?e+n+t:""}function ze(e){return B(" ",e.replace(/\n/g,`
|
|
39
|
-
`))}function
|
|
40
|
-
`)!==-1}function Tt(e){return e!=null&&e.some(ca)}function Rn(e,n){switch(e.kind){case h.NULL:return null;case h.INT:return parseInt(e.value,10);case h.FLOAT:return parseFloat(e.value);case h.STRING:case h.ENUM:case h.BOOLEAN:return e.value;case h.LIST:return e.values.map(function(t){return Rn(t,n)});case h.OBJECT:return Fn(e.fields,function(t){return t.name.value},function(t){return Rn(t.value,n)});case h.VARIABLE:return n?.[e.name.value]}Oe(0,"Unexpected value node: "+F(e))}function Nt(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function fe(e,n,t){return n&&Nt(e.prototype,n),t&&Nt(e,t),e}function bt(e){return Fe(e)||W(e)||$(e)||te(e)||ie(e)||ue(e)||Le(e)||de(e)}function la(e){if(!bt(e))throw new Error("Expected ".concat(F(e)," to be a GraphQL type."));return e}function Fe(e){return ee(e,ce)}function W(e){return ee(e,ae)}function $(e){return ee(e,Dt)}function te(e){return ee(e,Ot)}function ie(e){return ee(e,Xe)}function ue(e){return ee(e,_t)}function Le(e){return ee(e,C)}function de(e){return ee(e,I)}function ve(e){return Fe(e)||ie(e)||ue(e)||Un(e)&&ve(e.ofType)}function Ye(e){return Fe(e)||W(e)||$(e)||te(e)||ie(e)||Un(e)&&Ye(e.ofType)}function fa(e){return Fe(e)||ie(e)}function Pn(e){return W(e)||$(e)||te(e)}function da(e){return $(e)||te(e)}function C(e){if(this instanceof C)this.ofType=la(e);else return new C(e)}C.prototype.toString=function(){return"["+String(this.ofType)+"]"},C.prototype.toJSON=function(){return this.toString()},Object.defineProperty(C.prototype,G,{get:function(){return"GraphQLList"}}),H(C);function I(e){if(this instanceof I)this.ofType=pa(e);else return new I(e)}I.prototype.toString=function(){return String(this.ofType)+"!"},I.prototype.toJSON=function(){return this.toString()},Object.defineProperty(I.prototype,G,{get:function(){return"GraphQLNonNull"}}),H(I);function Un(e){return Le(e)||de(e)}function va(e){return bt(e)&&!de(e)}function pa(e){if(!va(e))throw new Error("Expected ".concat(F(e)," to be a GraphQL nullable type."));return e}function ma(e){if(e)return de(e)?e.ofType:e}function Re(e){if(e){for(var n=e;Un(n);)n=n.ofType;return n}}function Ke(e){return typeof e=="function"?e():e}function pe(e){return e&&e.length>0?e:void 0}var ce=function(){function e(t){var i,a,r,u=(i=t.parseValue)!==null&&i!==void 0?i:kt;this.name=t.name,this.description=t.description,this.specifiedByUrl=t.specifiedByUrl,this.serialize=(a=t.serialize)!==null&&a!==void 0?a:kt,this.parseValue=u,this.parseLiteral=(r=t.parseLiteral)!==null&&r!==void 0?r:function(o,s){return u(Rn(o,s))},this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),typeof t.name=="string"||_(0,"Must provide name."),t.specifiedByUrl==null||typeof t.specifiedByUrl=="string"||_(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(F(t.specifiedByUrl),".")),t.serialize==null||typeof t.serialize=="function"||_(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||_(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var n=e.prototype;return n.toConfig=function(){var i;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLScalarType"}}]),e}();H(ce);var ae=function(){function e(t){this.name=t.name,this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._fields=It.bind(void 0,t),this._interfaces=Et.bind(void 0,t),typeof t.name=="string"||_(0,"Must provide name."),t.isTypeOf==null||typeof t.isTypeOf=="function"||_(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(F(t.isTypeOf),"."))}var n=e.prototype;return n.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},n.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},n.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:wt(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLObjectType"}}]),e}();H(ae);function Et(e){var n,t=(n=Ke(e.interfaces))!==null&&n!==void 0?n:[];return Array.isArray(t)||_(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),t}function It(e){var n=Ke(e.fields);return me(n)||_(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Je(n,function(t,i){var a;me(t)||_(0,"".concat(e.name,".").concat(i," field config must be an object.")),!("isDeprecated"in t)||_(0,"".concat(e.name,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),t.resolve==null||typeof t.resolve=="function"||_(0,"".concat(e.name,".").concat(i," field resolver must be a function if ")+"provided, but got: ".concat(F(t.resolve),"."));var r=(a=t.args)!==null&&a!==void 0?a:{};me(r)||_(0,"".concat(e.name,".").concat(i," args must be an object with argument names as keys."));var u=_e(r).map(function(o){var s=o[0],l=o[1];return{name:s,description:l.description,type:l.type,defaultValue:l.defaultValue,deprecationReason:l.deprecationReason,extensions:l.extensions&&j(l.extensions),astNode:l.astNode}});return{name:i,description:t.description,type:t.type,args:u,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:t.deprecationReason!=null,deprecationReason:t.deprecationReason,extensions:t.extensions&&j(t.extensions),astNode:t.astNode}})}function me(e){return oe(e)&&!Array.isArray(e)}function wt(e){return Je(e,function(n){return{description:n.description,type:n.type,args:At(n.args),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}})}function At(e){return Fn(e,function(n){return n.name},function(n){return{description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}})}var Dt=function(){function e(t){this.name=t.name,this.description=t.description,this.resolveType=t.resolveType,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._fields=It.bind(void 0,t),this._interfaces=Et.bind(void 0,t),typeof t.name=="string"||_(0,"Must provide name."),t.resolveType==null||typeof t.resolveType=="function"||_(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(F(t.resolveType),"."))}var n=e.prototype;return n.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},n.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},n.toConfig=function(){var i;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:wt(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLInterfaceType"}}]),e}();H(Dt);var Ot=function(){function e(t){this.name=t.name,this.description=t.description,this.resolveType=t.resolveType,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._types=ha.bind(void 0,t),typeof t.name=="string"||_(0,"Must provide name."),t.resolveType==null||typeof t.resolveType=="function"||_(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(F(t.resolveType),"."))}var n=e.prototype;return n.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},n.toConfig=function(){var i;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLUnionType"}}]),e}();H(Ot);function ha(e){var n=Ke(e.types);return Array.isArray(n)||_(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),n}var Xe=function(){function e(t){this.name=t.name,this.description=t.description,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._values=ya(this.name,t.values),this._valueLookup=new Map(this._values.map(function(i){return[i.value,i]})),this._nameLookup=gt(this._values,function(i){return i.name}),typeof t.name=="string"||_(0,"Must provide name.")}var n=e.prototype;return n.getValues=function(){return this._values},n.getValue=function(i){return this._nameLookup[i]},n.serialize=function(i){var a=this._valueLookup.get(i);if(a===void 0)throw new U('Enum "'.concat(this.name,'" cannot represent value: ').concat(F(i)));return a.name},n.parseValue=function(i){if(typeof i!="string"){var a=F(i);throw new U('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(a,".")+We(this,a))}var r=this.getValue(i);if(r==null)throw new U('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+We(this,i));return r.value},n.parseLiteral=function(i,a){if(i.kind!==h.ENUM){var r=ne(i);throw new U('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(r,".")+We(this,r),i)}var u=this.getValue(i.value);if(u==null){var o=ne(i);throw new U('Value "'.concat(o,'" does not exist in "').concat(this.name,'" enum.')+We(this,o),i)}return u.value},n.toConfig=function(){var i,a=Fn(this.getValues(),function(r){return r.name},function(r){return{description:r.description,value:r.value,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}});return{name:this.name,description:this.description,values:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLEnumType"}}]),e}();H(Xe);function We(e,n){var t=e.getValues().map(function(a){return a.name}),i=ra(n,t);return ta("the enum value",i)}function ya(e,n){return me(n)||_(0,"".concat(e," values must be an object with value names as keys.")),_e(n).map(function(t){var i=t[0],a=t[1];return me(a)||_(0,"".concat(e,".").concat(i,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(F(a),".")),!("isDeprecated"in a)||_(0,"".concat(e,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),{name:i,description:a.description,value:a.value!==void 0?a.value:i,isDeprecated:a.deprecationReason!=null,deprecationReason:a.deprecationReason,extensions:a.extensions&&j(a.extensions),astNode:a.astNode}})}var _t=function(){function e(t){this.name=t.name,this.description=t.description,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._fields=ga.bind(void 0,t),typeof t.name=="string"||_(0,"Must provide name.")}var n=e.prototype;return n.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},n.toConfig=function(){var i,a=Je(this.getFields(),function(r){return{description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}});return{name:this.name,description:this.description,fields:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLInputObjectType"}}]),e}();H(_t);function ga(e){var n=Ke(e.fields);return me(n)||_(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Je(n,function(t,i){return!("resolve"in t)||_(0,"".concat(e.name,".").concat(i," field has a resolve property, but Input Types cannot define resolvers.")),{name:i,description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&j(t.extensions),astNode:t.astNode}})}var ka=Array.from||function(e,n,t){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i=e[ot];if(typeof i=="function"){for(var a=i.call(e),r=[],u,o=0;!(u=a.next()).done;++o)if(r.push(n.call(t,u.value,o)),o>9999999)throw new TypeError("Near-infinite iteration.");return r}var s=e.length;if(typeof s=="number"&&s>=0&&s%1===0){for(var l=[],g=0;g<s;++g)Object.prototype.hasOwnProperty.call(e,g)&&l.push(n.call(t,e[g],g));return l}return[]},Sa=ka,Ta=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Pe=Ta;function Ze(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ze=function(t){return typeof t}:Ze=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function Na(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(g){return g};if(e==null||Ze(e)!=="object")return null;if(Array.isArray(e))return e.map(n);var t=e[ot];if(typeof t=="function"){for(var i=t.call(e),a=[],r,u=0;!(r=i.next()).done;++u)a.push(n(r.value,u));return a}var o=e.length;if(typeof o=="number"&&o>=0&&o%1===0){for(var s=[],l=0;l<o;++l){if(!Object.prototype.hasOwnProperty.call(e,l))return null;s.push(n(e[String(l)],l))}return s}return null}var ba=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},en=ba,Bn=2147483647,Vn=-2147483648;function Ea(e){var n=Ue(e);if(typeof n=="boolean")return n?1:0;var t=n;if(typeof n=="string"&&n!==""&&(t=Number(n)),!en(t))throw new U("Int cannot represent non-integer value: ".concat(F(n)));if(t>Bn||t<Vn)throw new U("Int cannot represent non 32-bit signed integer value: "+F(n));return t}function Ia(e){if(!en(e))throw new U("Int cannot represent non-integer value: ".concat(F(e)));if(e>Bn||e<Vn)throw new U("Int cannot represent non 32-bit signed integer value: ".concat(e));return e}var wa=new ce({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:Ea,parseValue:Ia,parseLiteral:function(n){if(n.kind!==h.INT)throw new U("Int cannot represent non-integer value: ".concat(ne(n)),n);var t=parseInt(n.value,10);if(t>Bn||t<Vn)throw new U("Int cannot represent non 32-bit signed integer value: ".concat(n.value),n);return t}});function Aa(e){var n=Ue(e);if(typeof n=="boolean")return n?1:0;var t=n;if(typeof n=="string"&&n!==""&&(t=Number(n)),!Pe(t))throw new U("Float cannot represent non numeric value: ".concat(F(n)));return t}function Da(e){if(!Pe(e))throw new U("Float cannot represent non numeric value: ".concat(F(e)));return e}var Oa=new ce({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:Aa,parseValue:Da,parseLiteral:function(n){if(n.kind!==h.FLOAT&&n.kind!==h.INT)throw new U("Float cannot represent non numeric value: ".concat(ne(n)),n);return parseFloat(n.value)}});function Ue(e){if(oe(e)){if(typeof e.valueOf=="function"){var n=e.valueOf();if(!oe(n))return n}if(typeof e.toJSON=="function")return e.toJSON()}return e}function _a(e){var n=Ue(e);if(typeof n=="string")return n;if(typeof n=="boolean")return n?"true":"false";if(Pe(n))return n.toString();throw new U("String cannot represent value: ".concat(F(e)))}function Fa(e){if(typeof e!="string")throw new U("String cannot represent a non string value: ".concat(F(e)));return e}var V=new ce({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:_a,parseValue:Fa,parseLiteral:function(n){if(n.kind!==h.STRING)throw new U("String cannot represent a non string value: ".concat(ne(n)),n);return n.value}});function La(e){var n=Ue(e);if(typeof n=="boolean")return n;if(Pe(n))return n!==0;throw new U("Boolean cannot represent a non boolean value: ".concat(F(n)))}function Ra(e){if(typeof e!="boolean")throw new U("Boolean cannot represent a non boolean value: ".concat(F(e)));return e}var Q=new ce({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:La,parseValue:Ra,parseLiteral:function(n){if(n.kind!==h.BOOLEAN)throw new U("Boolean cannot represent a non boolean value: ".concat(ne(n)),n);return n.value}});function Pa(e){var n=Ue(e);if(typeof n=="string")return n;if(en(n))return String(n);throw new U("ID cannot represent value: ".concat(F(e)))}function Ua(e){if(typeof e=="string")return e;if(en(e))return e.toString();throw new U("ID cannot represent value: ".concat(F(e)))}var Ft=new ce({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:Pa,parseValue:Ua,parseLiteral:function(n){if(n.kind!==h.STRING&&n.kind!==h.INT)throw new U("ID cannot represent a non-string and non-integer value: "+ne(n),n);return n.value}}),Lt=Object.freeze([V,wa,Oa,Q,Ft]);function Be(e,n){if(de(n)){var t=Be(e,n.ofType);return t?.kind===h.NULL?null:t}if(e===null)return{kind:h.NULL};if(e===void 0)return null;if(Le(n)){var i=n.ofType,a=Na(e);if(a!=null){for(var r=[],u=0;u<a.length;u++){var o=a[u],s=Be(o,i);s!=null&&r.push(s)}return{kind:h.LIST,values:r}}return Be(e,i)}if(ue(n)){if(!oe(e))return null;for(var l=[],g=0,E=se(n.getFields());g<E.length;g++){var y=E[g],d=Be(e[y.name],y.type);d&&l.push({kind:h.OBJECT_FIELD,name:{kind:h.NAME,value:y.name},value:d})}return{kind:h.OBJECT,fields:l}}if(fa(n)){var N=n.serialize(e);if(N==null)return null;if(typeof N=="boolean")return{kind:h.BOOLEAN,value:N};if(typeof N=="number"&&Pe(N)){var w=String(N);return Rt.test(w)?{kind:h.INT,value:w}:{kind:h.FLOAT,value:w}}if(typeof N=="string")return ie(n)?{kind:h.ENUM,value:N}:n===Ft&&Rt.test(N)?{kind:h.INT,value:N}:{kind:h.STRING,value:N};throw new TypeError("Cannot convert value to AST: ".concat(F(N),"."))}Oe(0,"Unexpected input type: "+F(n))}var Rt=/^-?(?:0|[1-9][0-9]*)$/,Mn=new ae({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:V,resolve:function(t){return t.description}},types:{description:"A list of all types supported by this server.",type:new I(new C(new I(K))),resolve:function(t){return se(t.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new I(K),resolve:function(t){return t.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:K,resolve:function(t){return t.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:K,resolve:function(t){return t.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new I(new C(new I(Pt))),resolve:function(t){return t.getDirectives()}}}}}),Pt=new ae({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
|
|
39
|
+
`))}function la(e){return e.indexOf(`
|
|
40
|
+
`)!==-1}function Nt(e){return e!=null&&e.some(la)}function Rn(e,n){switch(e.kind){case h.NULL:return null;case h.INT:return parseInt(e.value,10);case h.FLOAT:return parseFloat(e.value);case h.STRING:case h.ENUM:case h.BOOLEAN:return e.value;case h.LIST:return e.values.map(function(t){return Rn(t,n)});case h.OBJECT:return _n(e.fields,function(t){return t.name.value},function(t){return Rn(t.value,n)});case h.VARIABLE:return n?.[e.name.value]}Oe(0,"Unexpected value node: "+_(e))}function Tt(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function fe(e,n,t){return n&&Tt(e.prototype,n),t&&Tt(e,t),e}function bt(e){return _e(e)||W(e)||$(e)||te(e)||ie(e)||ue(e)||Le(e)||de(e)}function fa(e){if(!bt(e))throw new Error("Expected ".concat(_(e)," to be a GraphQL type."));return e}function _e(e){return ee(e,ce)}function W(e){return ee(e,ae)}function $(e){return ee(e,Dt)}function te(e){return ee(e,Ot)}function ie(e){return ee(e,Xe)}function ue(e){return ee(e,Ft)}function Le(e){return ee(e,C)}function de(e){return ee(e,I)}function ve(e){return _e(e)||ie(e)||ue(e)||Un(e)&&ve(e.ofType)}function Ye(e){return _e(e)||W(e)||$(e)||te(e)||ie(e)||Un(e)&&Ye(e.ofType)}function da(e){return _e(e)||ie(e)}function Pn(e){return W(e)||$(e)||te(e)}function va(e){return $(e)||te(e)}function C(e){if(this instanceof C)this.ofType=fa(e);else return new C(e)}C.prototype.toString=function(){return"["+String(this.ofType)+"]"},C.prototype.toJSON=function(){return this.toString()},Object.defineProperty(C.prototype,G,{get:function(){return"GraphQLList"}}),H(C);function I(e){if(this instanceof I)this.ofType=ma(e);else return new I(e)}I.prototype.toString=function(){return String(this.ofType)+"!"},I.prototype.toJSON=function(){return this.toString()},Object.defineProperty(I.prototype,G,{get:function(){return"GraphQLNonNull"}}),H(I);function Un(e){return Le(e)||de(e)}function pa(e){return bt(e)&&!de(e)}function ma(e){if(!pa(e))throw new Error("Expected ".concat(_(e)," to be a GraphQL nullable type."));return e}function ha(e){if(e)return de(e)?e.ofType:e}function Re(e){if(e){for(var n=e;Un(n);)n=n.ofType;return n}}function Ke(e){return typeof e=="function"?e():e}function pe(e){return e&&e.length>0?e:void 0}var ce=function(){function e(t){var i,a,r,u=(i=t.parseValue)!==null&&i!==void 0?i:kt;this.name=t.name,this.description=t.description,this.specifiedByUrl=t.specifiedByUrl,this.serialize=(a=t.serialize)!==null&&a!==void 0?a:kt,this.parseValue=u,this.parseLiteral=(r=t.parseLiteral)!==null&&r!==void 0?r:function(o,s){return u(Rn(o,s))},this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),typeof t.name=="string"||F(0,"Must provide name."),t.specifiedByUrl==null||typeof t.specifiedByUrl=="string"||F(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(_(t.specifiedByUrl),".")),t.serialize==null||typeof t.serialize=="function"||F(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||F(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var n=e.prototype;return n.toConfig=function(){var i;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLScalarType"}}]),e}();H(ce);var ae=function(){function e(t){this.name=t.name,this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._fields=It.bind(void 0,t),this._interfaces=Et.bind(void 0,t),typeof t.name=="string"||F(0,"Must provide name."),t.isTypeOf==null||typeof t.isTypeOf=="function"||F(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(_(t.isTypeOf),"."))}var n=e.prototype;return n.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},n.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},n.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:wt(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLObjectType"}}]),e}();H(ae);function Et(e){var n,t=(n=Ke(e.interfaces))!==null&&n!==void 0?n:[];return Array.isArray(t)||F(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),t}function It(e){var n=Ke(e.fields);return me(n)||F(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Je(n,function(t,i){var a;me(t)||F(0,"".concat(e.name,".").concat(i," field config must be an object.")),!("isDeprecated"in t)||F(0,"".concat(e.name,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),t.resolve==null||typeof t.resolve=="function"||F(0,"".concat(e.name,".").concat(i," field resolver must be a function if ")+"provided, but got: ".concat(_(t.resolve),"."));var r=(a=t.args)!==null&&a!==void 0?a:{};me(r)||F(0,"".concat(e.name,".").concat(i," args must be an object with argument names as keys."));var u=Fe(r).map(function(o){var s=o[0],l=o[1];return{name:s,description:l.description,type:l.type,defaultValue:l.defaultValue,deprecationReason:l.deprecationReason,extensions:l.extensions&&j(l.extensions),astNode:l.astNode}});return{name:i,description:t.description,type:t.type,args:u,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:t.deprecationReason!=null,deprecationReason:t.deprecationReason,extensions:t.extensions&&j(t.extensions),astNode:t.astNode}})}function me(e){return oe(e)&&!Array.isArray(e)}function wt(e){return Je(e,function(n){return{description:n.description,type:n.type,args:At(n.args),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}})}function At(e){return _n(e,function(n){return n.name},function(n){return{description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}})}var Dt=function(){function e(t){this.name=t.name,this.description=t.description,this.resolveType=t.resolveType,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._fields=It.bind(void 0,t),this._interfaces=Et.bind(void 0,t),typeof t.name=="string"||F(0,"Must provide name."),t.resolveType==null||typeof t.resolveType=="function"||F(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(_(t.resolveType),"."))}var n=e.prototype;return n.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},n.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},n.toConfig=function(){var i;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:wt(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLInterfaceType"}}]),e}();H(Dt);var Ot=function(){function e(t){this.name=t.name,this.description=t.description,this.resolveType=t.resolveType,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._types=ya.bind(void 0,t),typeof t.name=="string"||F(0,"Must provide name."),t.resolveType==null||typeof t.resolveType=="function"||F(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(_(t.resolveType),"."))}var n=e.prototype;return n.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},n.toConfig=function(){var i;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLUnionType"}}]),e}();H(Ot);function ya(e){var n=Ke(e.types);return Array.isArray(n)||F(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),n}var Xe=function(){function e(t){this.name=t.name,this.description=t.description,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._values=ga(this.name,t.values),this._valueLookup=new Map(this._values.map(function(i){return[i.value,i]})),this._nameLookup=gt(this._values,function(i){return i.name}),typeof t.name=="string"||F(0,"Must provide name.")}var n=e.prototype;return n.getValues=function(){return this._values},n.getValue=function(i){return this._nameLookup[i]},n.serialize=function(i){var a=this._valueLookup.get(i);if(a===void 0)throw new U('Enum "'.concat(this.name,'" cannot represent value: ').concat(_(i)));return a.name},n.parseValue=function(i){if(typeof i!="string"){var a=_(i);throw new U('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(a,".")+We(this,a))}var r=this.getValue(i);if(r==null)throw new U('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+We(this,i));return r.value},n.parseLiteral=function(i,a){if(i.kind!==h.ENUM){var r=ne(i);throw new U('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(r,".")+We(this,r),i)}var u=this.getValue(i.value);if(u==null){var o=ne(i);throw new U('Value "'.concat(o,'" does not exist in "').concat(this.name,'" enum.')+We(this,o),i)}return u.value},n.toConfig=function(){var i,a=_n(this.getValues(),function(r){return r.name},function(r){return{description:r.description,value:r.value,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}});return{name:this.name,description:this.description,values:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLEnumType"}}]),e}();H(Xe);function We(e,n){var t=e.getValues().map(function(a){return a.name}),i=oa(n,t);return ia("the enum value",i)}function ga(e,n){return me(n)||F(0,"".concat(e," values must be an object with value names as keys.")),Fe(n).map(function(t){var i=t[0],a=t[1];return me(a)||F(0,"".concat(e,".").concat(i,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(_(a),".")),!("isDeprecated"in a)||F(0,"".concat(e,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),{name:i,description:a.description,value:a.value!==void 0?a.value:i,isDeprecated:a.deprecationReason!=null,deprecationReason:a.deprecationReason,extensions:a.extensions&&j(a.extensions),astNode:a.astNode}})}var Ft=function(){function e(t){this.name=t.name,this.description=t.description,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=pe(t.extensionASTNodes),this._fields=ka.bind(void 0,t),typeof t.name=="string"||F(0,"Must provide name.")}var n=e.prototype;return n.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},n.toConfig=function(){var i,a=Je(this.getFields(),function(r){return{description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}});return{name:this.name,description:this.description,fields:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},n.toString=function(){return this.name},n.toJSON=function(){return this.toString()},fe(e,[{key:G,get:function(){return"GraphQLInputObjectType"}}]),e}();H(Ft);function ka(e){var n=Ke(e.fields);return me(n)||F(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Je(n,function(t,i){return!("resolve"in t)||F(0,"".concat(e.name,".").concat(i," field has a resolve property, but Input Types cannot define resolvers.")),{name:i,description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&j(t.extensions),astNode:t.astNode}})}var Sa=Array.from||function(e,n,t){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i=e[ot];if(typeof i=="function"){for(var a=i.call(e),r=[],u,o=0;!(u=a.next()).done;++o)if(r.push(n.call(t,u.value,o)),o>9999999)throw new TypeError("Near-infinite iteration.");return r}var s=e.length;if(typeof s=="number"&&s>=0&&s%1===0){for(var l=[],g=0;g<s;++g)Object.prototype.hasOwnProperty.call(e,g)&&l.push(n.call(t,e[g],g));return l}return[]},Na=Sa,Ta=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Pe=Ta;function Ze(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ze=function(t){return typeof t}:Ze=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function ba(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(g){return g};if(e==null||Ze(e)!=="object")return null;if(Array.isArray(e))return e.map(n);var t=e[ot];if(typeof t=="function"){for(var i=t.call(e),a=[],r,u=0;!(r=i.next()).done;++u)a.push(n(r.value,u));return a}var o=e.length;if(typeof o=="number"&&o>=0&&o%1===0){for(var s=[],l=0;l<o;++l){if(!Object.prototype.hasOwnProperty.call(e,l))return null;s.push(n(e[String(l)],l))}return s}return null}var Ea=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},en=Ea,Bn=2147483647,Vn=-2147483648;function Ia(e){var n=Ue(e);if(typeof n=="boolean")return n?1:0;var t=n;if(typeof n=="string"&&n!==""&&(t=Number(n)),!en(t))throw new U("Int cannot represent non-integer value: ".concat(_(n)));if(t>Bn||t<Vn)throw new U("Int cannot represent non 32-bit signed integer value: "+_(n));return t}function wa(e){if(!en(e))throw new U("Int cannot represent non-integer value: ".concat(_(e)));if(e>Bn||e<Vn)throw new U("Int cannot represent non 32-bit signed integer value: ".concat(e));return e}var Aa=new ce({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:Ia,parseValue:wa,parseLiteral:function(n){if(n.kind!==h.INT)throw new U("Int cannot represent non-integer value: ".concat(ne(n)),n);var t=parseInt(n.value,10);if(t>Bn||t<Vn)throw new U("Int cannot represent non 32-bit signed integer value: ".concat(n.value),n);return t}});function Da(e){var n=Ue(e);if(typeof n=="boolean")return n?1:0;var t=n;if(typeof n=="string"&&n!==""&&(t=Number(n)),!Pe(t))throw new U("Float cannot represent non numeric value: ".concat(_(n)));return t}function Oa(e){if(!Pe(e))throw new U("Float cannot represent non numeric value: ".concat(_(e)));return e}var Fa=new ce({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:Da,parseValue:Oa,parseLiteral:function(n){if(n.kind!==h.FLOAT&&n.kind!==h.INT)throw new U("Float cannot represent non numeric value: ".concat(ne(n)),n);return parseFloat(n.value)}});function Ue(e){if(oe(e)){if(typeof e.valueOf=="function"){var n=e.valueOf();if(!oe(n))return n}if(typeof e.toJSON=="function")return e.toJSON()}return e}function _a(e){var n=Ue(e);if(typeof n=="string")return n;if(typeof n=="boolean")return n?"true":"false";if(Pe(n))return n.toString();throw new U("String cannot represent value: ".concat(_(e)))}function La(e){if(typeof e!="string")throw new U("String cannot represent a non string value: ".concat(_(e)));return e}var V=new ce({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:_a,parseValue:La,parseLiteral:function(n){if(n.kind!==h.STRING)throw new U("String cannot represent a non string value: ".concat(ne(n)),n);return n.value}});function Ra(e){var n=Ue(e);if(typeof n=="boolean")return n;if(Pe(n))return n!==0;throw new U("Boolean cannot represent a non boolean value: ".concat(_(n)))}function Pa(e){if(typeof e!="boolean")throw new U("Boolean cannot represent a non boolean value: ".concat(_(e)));return e}var Q=new ce({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Ra,parseValue:Pa,parseLiteral:function(n){if(n.kind!==h.BOOLEAN)throw new U("Boolean cannot represent a non boolean value: ".concat(ne(n)),n);return n.value}});function Ua(e){var n=Ue(e);if(typeof n=="string")return n;if(en(n))return String(n);throw new U("ID cannot represent value: ".concat(_(e)))}function Ba(e){if(typeof e=="string")return e;if(en(e))return e.toString();throw new U("ID cannot represent value: ".concat(_(e)))}var _t=new ce({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:Ua,parseValue:Ba,parseLiteral:function(n){if(n.kind!==h.STRING&&n.kind!==h.INT)throw new U("ID cannot represent a non-string and non-integer value: "+ne(n),n);return n.value}}),Lt=Object.freeze([V,Aa,Fa,Q,_t]);function Be(e,n){if(de(n)){var t=Be(e,n.ofType);return t?.kind===h.NULL?null:t}if(e===null)return{kind:h.NULL};if(e===void 0)return null;if(Le(n)){var i=n.ofType,a=ba(e);if(a!=null){for(var r=[],u=0;u<a.length;u++){var o=a[u],s=Be(o,i);s!=null&&r.push(s)}return{kind:h.LIST,values:r}}return Be(e,i)}if(ue(n)){if(!oe(e))return null;for(var l=[],g=0,E=se(n.getFields());g<E.length;g++){var y=E[g],d=Be(e[y.name],y.type);d&&l.push({kind:h.OBJECT_FIELD,name:{kind:h.NAME,value:y.name},value:d})}return{kind:h.OBJECT,fields:l}}if(da(n)){var T=n.serialize(e);if(T==null)return null;if(typeof T=="boolean")return{kind:h.BOOLEAN,value:T};if(typeof T=="number"&&Pe(T)){var w=String(T);return Rt.test(w)?{kind:h.INT,value:w}:{kind:h.FLOAT,value:w}}if(typeof T=="string")return ie(n)?{kind:h.ENUM,value:T}:n===_t&&Rt.test(T)?{kind:h.INT,value:T}:{kind:h.STRING,value:T};throw new TypeError("Cannot convert value to AST: ".concat(_(T),"."))}Oe(0,"Unexpected input type: "+_(n))}var Rt=/^-?(?:0|[1-9][0-9]*)$/,Mn=new ae({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:V,resolve:function(t){return t.description}},types:{description:"A list of all types supported by this server.",type:new I(new C(new I(K))),resolve:function(t){return se(t.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new I(K),resolve:function(t){return t.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:K,resolve:function(t){return t.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:K,resolve:function(t){return t.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new I(new C(new I(Pt))),resolve:function(t){return t.getDirectives()}}}}}),Pt=new ae({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
|
|
41
41
|
|
|
42
|
-
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},isRepeatable:{type:new I(Q),resolve:function(t){return t.isRepeatable}},locations:{type:new I(new C(new I(Ut))),resolve:function(t){return t.locations}},args:{type:new I(new C(new I(nn))),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;return a?t.args:t.args.filter(function(r){return r.deprecationReason==null})}}}}}),Ut=new Xe({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:R.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:R.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:R.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:R.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:R.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:R.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:R.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:R.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:R.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:R.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:R.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:R.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:R.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:R.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:R.UNION,description:"Location adjacent to a union definition."},ENUM:{value:R.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:R.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:R.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:R.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),K=new ae({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new I(Mt),resolve:function(t){if(Fe(t))return q.SCALAR;if(W(t))return q.OBJECT;if($(t))return q.INTERFACE;if(te(t))return q.UNION;if(ie(t))return q.ENUM;if(ue(t))return q.INPUT_OBJECT;if(Le(t))return q.LIST;if(de(t))return q.NON_NULL;Oe(0,'Unexpected type: "'.concat(F(t),'".'))}},name:{type:V,resolve:function(t){return t.name!==void 0?t.name:void 0}},description:{type:V,resolve:function(t){return t.description!==void 0?t.description:void 0}},specifiedByUrl:{type:V,resolve:function(t){return t.specifiedByUrl!==void 0?t.specifiedByUrl:void 0}},fields:{type:new C(new I(Bt)),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;if(W(t)||$(t)){var r=se(t.getFields());return a?r:r.filter(function(u){return u.deprecationReason==null})}}},interfaces:{type:new C(new I(K)),resolve:function(t){if(W(t)||$(t))return t.getInterfaces()}},possibleTypes:{type:new C(new I(K)),resolve:function(t,i,a,r){var u=r.schema;if(da(t))return u.getPossibleTypes(t)}},enumValues:{type:new C(new I(Vt)),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;if(ie(t)){var r=t.getValues();return a?r:r.filter(function(u){return u.deprecationReason==null})}}},inputFields:{type:new C(new I(nn)),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;if(ue(t)){var r=se(t.getFields());return a?r:r.filter(function(u){return u.deprecationReason==null})}}},ofType:{type:K,resolve:function(t){return t.ofType!==void 0?t.ofType:void 0}}}}}),Bt=new ae({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},args:{type:new I(new C(new I(nn))),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;return a?t.args:t.args.filter(function(r){return r.deprecationReason==null})}},type:{type:new I(K),resolve:function(t){return t.type}},isDeprecated:{type:new I(Q),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:V,resolve:function(t){return t.deprecationReason}}}}}),nn=new ae({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},type:{type:new I(K),resolve:function(t){return t.type}},defaultValue:{type:V,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(t){var i=t.type,a=t.defaultValue,r=Be(a,i);return r?ne(r):null}},isDeprecated:{type:new I(Q),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:V,resolve:function(t){return t.deprecationReason}}}}}),Vt=new ae({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},isDeprecated:{type:new I(Q),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:V,resolve:function(t){return t.deprecationReason}}}}}),q=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),Mt=new Xe({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:q.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:q.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:q.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:q.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:q.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:q.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:q.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:q.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),xt={name:"__schema",type:new I(Mn),description:"Access the current type schema of this server.",args:[],resolve:function(n,t,i,a){var r=a.schema;return r},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Ct={name:"__type",type:K,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new I(V),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(n,t,i,a){var r=t.name,u=a.schema;return u.getType(r)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},qt={name:"__typename",type:new I(V),description:"The name of the current Object type at runtime.",args:[],resolve:function(n,t,i,a){var r=a.parentType;return r.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},jt=Object.freeze([Mn,Pt,Ut,K,Bt,nn,Vt,Mt]);function Gt(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ba(e,n,t){return n&&Gt(e.prototype,n),t&&Gt(e,t),e}function Va(e){return ee(e,he)}var he=function(){function e(t){var i,a;this.name=t.name,this.description=t.description,this.locations=t.locations,this.isRepeatable=(i=t.isRepeatable)!==null&&i!==void 0?i:!1,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,t.name||_(0,"Directive must be named."),Array.isArray(t.locations)||_(0,"@".concat(t.name," locations must be an Array."));var r=(a=t.args)!==null&&a!==void 0?a:{};oe(r)&&!Array.isArray(r)||_(0,"@".concat(t.name," args must be an object with argument names as keys.")),this.args=_e(r).map(function(u){var o=u[0],s=u[1];return{name:o,description:s.description,type:s.type,defaultValue:s.defaultValue,deprecationReason:s.deprecationReason,extensions:s.extensions&&j(s.extensions),astNode:s.astNode}})}var n=e.prototype;return n.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:At(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},n.toString=function(){return"@"+this.name},n.toJSON=function(){return this.toString()},Ba(e,[{key:G,get:function(){return"GraphQLDirective"}}]),e}();H(he);var Ma=new he({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[R.FIELD,R.FRAGMENT_SPREAD,R.INLINE_FRAGMENT],args:{if:{type:new I(Q),description:"Included when true."}}}),xa=new he({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[R.FIELD,R.FRAGMENT_SPREAD,R.INLINE_FRAGMENT],args:{if:{type:new I(Q),description:"Skipped when true."}}}),Ca="No longer supported",qa=new he({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[R.FIELD_DEFINITION,R.ARGUMENT_DEFINITION,R.INPUT_FIELD_DEFINITION,R.ENUM_VALUE],args:{reason:{type:V,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Ca}}}),ja=new he({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[R.SCALAR],args:{url:{type:new I(V),description:"The URL that specifies the behaviour of this scalar."}}}),Ga=Object.freeze([Ma,xa,qa,ja]);function $t(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function $a(e,n,t){return n&&$t(e.prototype,n),t&&$t(e,t),e}(function(){function e(t){var i;this.__validationErrors=t.assumeValid===!0?[]:void 0,oe(t)||_(0,"Must provide configuration object."),!t.types||Array.isArray(t.types)||_(0,'"types" must be Array if provided but got: '.concat(F(t.types),".")),!t.directives||Array.isArray(t.directives)||_(0,'"directives" must be Array if provided but got: '+"".concat(F(t.directives),".")),this.description=t.description,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes,this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(i=t.directives)!==null&&i!==void 0?i:Ga;var a=new Set(t.types);if(t.types!=null)for(var r=0,u=t.types;r<u.length;r++){var o=u[r];a.delete(o),X(o,a)}this._queryType!=null&&X(this._queryType,a),this._mutationType!=null&&X(this._mutationType,a),this._subscriptionType!=null&&X(this._subscriptionType,a);for(var s=0,l=this._directives;s<l.length;s++){var g=l[s];if(Va(g))for(var E=0,y=g.args;E<y.length;E++){var d=y[E];X(d.type,a)}}X(Mn,a),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var N=0,w=Sa(a);N<w.length;N++){var O=w[N];if(O!=null){var D=O.name;if(D||_(0,"One of the provided types for building the Schema is missing a name."),this._typeMap[D]!==void 0)throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(D,'".'));if(this._typeMap[D]=O,$(O))for(var P=0,L=O.getInterfaces();P<L.length;P++){var f=L[P];if($(f)){var c=this._implementationsMap[f.name];c===void 0&&(c=this._implementationsMap[f.name]={objects:[],interfaces:[]}),c.interfaces.push(O)}}else if(W(O))for(var S=0,v=O.getInterfaces();S<v.length;S++){var b=v[S];if($(b)){var A=this._implementationsMap[b.name];A===void 0&&(A=this._implementationsMap[b.name]={objects:[],interfaces:[]}),A.objects.push(O)}}}}}var n=e.prototype;return n.getQueryType=function(){return this._queryType},n.getMutationType=function(){return this._mutationType},n.getSubscriptionType=function(){return this._subscriptionType},n.getTypeMap=function(){return this._typeMap},n.getType=function(i){return this.getTypeMap()[i]},n.getPossibleTypes=function(i){return te(i)?i.getTypes():this.getImplementations(i).objects},n.getImplementations=function(i){var a=this._implementationsMap[i.name];return a??{objects:[],interfaces:[]}},n.isPossibleType=function(i,a){return this.isSubType(i,a)},n.isSubType=function(i,a){var r=this._subTypeMap[i.name];if(r===void 0){if(r=Object.create(null),te(i))for(var u=0,o=i.getTypes();u<o.length;u++){var s=o[u];r[s.name]=!0}else{for(var l=this.getImplementations(i),g=0,E=l.objects;g<E.length;g++){var y=E[g];r[y.name]=!0}for(var d=0,N=l.interfaces;d<N.length;d++){var w=N[d];r[w.name]=!0}}this._subTypeMap[i.name]=r}return r[a.name]!==void 0},n.getDirectives=function(){return this._directives},n.getDirective=function(i){return yt(this.getDirectives(),function(a){return a.name===i})},n.toConfig=function(){var i;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:se(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[],assumeValid:this.__validationErrors!==void 0}},$a(e,[{key:G,get:function(){return"GraphQLSchema"}}]),e})();function X(e,n){var t=Re(e);if(!n.has(t)){if(n.add(t),te(t))for(var i=0,a=t.getTypes();i<a.length;i++){var r=a[i];X(r,n)}else if(W(t)||$(t)){for(var u=0,o=t.getInterfaces();u<o.length;u++){var s=o[u];X(s,n)}for(var l=0,g=se(t.getFields());l<g.length;l++){var E=g[l];X(E.type,n);for(var y=0,d=E.args;y<d.length;y++){var N=d[y];X(N.type,n)}}}else if(ue(t))for(var w=0,O=se(t.getFields());w<O.length;w++){var D=O[w];X(D.type,n)}}return n}function tn(e,n){var t;if(n.kind===h.LIST_TYPE)return t=tn(e,n.type),t&&new C(t);if(n.kind===h.NON_NULL_TYPE)return t=tn(e,n.type),t&&new I(t);if(n.kind===h.NAMED_TYPE)return e.getType(n.name.value);Oe(0,"Unexpected type node: "+F(n))}var Qa=function(){function e(t,i,a){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=i??Ja,a&&(ve(a)&&this._inputTypeStack.push(a),Pn(a)&&this._parentTypeStack.push(a),Ye(a)&&this._typeStack.push(a))}var n=e.prototype;return n.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},n.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},n.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},n.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},n.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},n.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},n.getDirective=function(){return this._directive},n.getArgument=function(){return this._argument},n.getEnumValue=function(){return this._enumValue},n.enter=function(i){var a=this._schema;switch(i.kind){case h.SELECTION_SET:{var r=Re(this.getType());this._parentTypeStack.push(Pn(r)?r:void 0);break}case h.FIELD:{var u=this.getParentType(),o,s;u&&(o=this._getFieldDef(a,u,i),o&&(s=o.type)),this._fieldDefStack.push(o),this._typeStack.push(Ye(s)?s:void 0);break}case h.DIRECTIVE:this._directive=a.getDirective(i.name.value);break;case h.OPERATION_DEFINITION:{var l;switch(i.operation){case"query":l=a.getQueryType();break;case"mutation":l=a.getMutationType();break;case"subscription":l=a.getSubscriptionType();break}this._typeStack.push(W(l)?l:void 0);break}case h.INLINE_FRAGMENT:case h.FRAGMENT_DEFINITION:{var g=i.typeCondition,E=g?tn(a,g):Re(this.getType());this._typeStack.push(Ye(E)?E:void 0);break}case h.VARIABLE_DEFINITION:{var y=tn(a,i.type);this._inputTypeStack.push(ve(y)?y:void 0);break}case h.ARGUMENT:{var d,N,w,O=(d=this.getDirective())!==null&&d!==void 0?d:this.getFieldDef();O&&(N=yt(O.args,function(b){return b.name===i.name.value}),N&&(w=N.type)),this._argument=N,this._defaultValueStack.push(N?N.defaultValue:void 0),this._inputTypeStack.push(ve(w)?w:void 0);break}case h.LIST:{var D=ma(this.getInputType()),P=Le(D)?D.ofType:D;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ve(P)?P:void 0);break}case h.OBJECT_FIELD:{var L=Re(this.getInputType()),f,c;ue(L)&&(c=L.getFields()[i.name.value],c&&(f=c.type)),this._defaultValueStack.push(c?c.defaultValue:void 0),this._inputTypeStack.push(ve(f)?f:void 0);break}case h.ENUM:{var S=Re(this.getInputType()),v;ie(S)&&(v=S.getValue(i.value)),this._enumValue=v;break}}},n.leave=function(i){switch(i.kind){case h.SELECTION_SET:this._parentTypeStack.pop();break;case h.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case h.DIRECTIVE:this._directive=null;break;case h.OPERATION_DEFINITION:case h.INLINE_FRAGMENT:case h.FRAGMENT_DEFINITION:this._typeStack.pop();break;case h.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case h.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case h.LIST:case h.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case h.ENUM:this._enumValue=null;break}},e}();function Ja(e,n,t){var i=t.name.value;if(i===xt.name&&e.getQueryType()===n)return xt;if(i===Ct.name&&e.getQueryType()===n)return Ct;if(i===qt.name&&Pn(n))return qt;if(W(n)||$(n))return n.getFields()[i]}function Ha(e,n){return{enter:function(i){e.enter(i);var a=_n(n,i.kind,!1);if(a){var r=a.apply(n,arguments);return r!==void 0&&(e.leave(i),On(r)&&e.enter(r)),r}},leave:function(i){var a=_n(n,i.kind,!0),r;return a&&(r=a.apply(n,arguments)),e.leave(i),r}}}[].concat(Lt,jt).map(function(e){return e.name});var re;function ye(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}re={},ye(re,h.SCALAR_TYPE_DEFINITION,h.SCALAR_TYPE_EXTENSION),ye(re,h.OBJECT_TYPE_DEFINITION,h.OBJECT_TYPE_EXTENSION),ye(re,h.INTERFACE_TYPE_DEFINITION,h.INTERFACE_TYPE_EXTENSION),ye(re,h.UNION_TYPE_DEFINITION,h.UNION_TYPE_EXTENSION),ye(re,h.ENUM_TYPE_DEFINITION,h.ENUM_TYPE_EXTENSION),ye(re,h.INPUT_OBJECT_TYPE_DEFINITION,h.INPUT_OBJECT_TYPE_EXTENSION);function Qt(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}var Jt=function(){function e(t,i){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=i}var n=e.prototype;return n.reportError=function(i){this._onError(i)},n.getDocument=function(){return this._ast},n.getFragment=function(i){var a=this._fragments;return a||(this._fragments=a=this.getDocument().definitions.reduce(function(r,u){return u.kind===h.FRAGMENT_DEFINITION&&(r[u.name.value]=u),r},Object.create(null))),a[i]},n.getFragmentSpreads=function(i){var a=this._fragmentSpreads.get(i);if(!a){a=[];for(var r=[i];r.length!==0;)for(var u=r.pop(),o=0,s=u.selections;o<s.length;o++){var l=s[o];l.kind===h.FRAGMENT_SPREAD?a.push(l):l.selectionSet&&r.push(l.selectionSet)}this._fragmentSpreads.set(i,a)}return a},n.getRecursivelyReferencedFragments=function(i){var a=this._recursivelyReferencedFragments.get(i);if(!a){a=[];for(var r=Object.create(null),u=[i.selectionSet];u.length!==0;)for(var o=u.pop(),s=0,l=this.getFragmentSpreads(o);s<l.length;s++){var g=l[s],E=g.name.value;if(r[E]!==!0){r[E]=!0;var y=this.getFragment(E);y&&(a.push(y),u.push(y.selectionSet))}}this._recursivelyReferencedFragments.set(i,a)}return a},e}();(function(e){Qt(n,e);function n(i,a,r){var u;return u=e.call(this,i,r)||this,u._schema=a,u}var t=n.prototype;return t.getSchema=function(){return this._schema},n})(Jt),function(e){Qt(n,e);function n(i,a,r,u){var o;return o=e.call(this,a,u)||this,o._schema=i,o._typeInfo=r,o._variableUsages=new Map,o._recursiveVariableUsages=new Map,o}var t=n.prototype;return t.getSchema=function(){return this._schema},t.getVariableUsages=function(a){var r=this._variableUsages.get(a);if(!r){var u=[],o=new Qa(this._schema);ht(a,Ha(o,{VariableDefinition:function(){return!1},Variable:function(l){u.push({node:l,type:o.getInputType(),defaultValue:o.getDefaultValue()})}})),r=u,this._variableUsages.set(a,r)}return r},t.getRecursiveVariableUsages=function(a){var r=this._recursiveVariableUsages.get(a);if(!r){r=this.getVariableUsages(a);for(var u=0,o=this.getRecursivelyReferencedFragments(a);u<o.length;u++){var s=o[u];r=r.concat(this.getVariableUsages(s))}this._recursiveVariableUsages.set(a,r)}return r},t.getType=function(){return this._typeInfo.getType()},t.getParentType=function(){return this._typeInfo.getParentType()},t.getInputType=function(){return this._typeInfo.getInputType()},t.getParentInputType=function(){return this._typeInfo.getParentInputType()},t.getFieldDef=function(){return this._typeInfo.getFieldDef()},t.getDirective=function(){return this._typeInfo.getDirective()},t.getArgument=function(){return this._typeInfo.getArgument()},t.getEnumValue=function(){return this._typeInfo.getEnumValue()},n}(Jt),gt(Lt.concat(jt),function(e){return e.name});const Ht={staging:{baseEndpoint:"https://api-staging.spritz.finance",graphEndpoint:"https://api-staging.spritz.finance/graphql"},production:{baseEndpoint:"https://api.spritz.finance",graphEndpoint:"https://api.spritz.finance/graphql"}};let xn=class wi extends Error{date;constructor(n,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,wi),this.name="SpritzApiError",this.message=n,this.date=new Date}};const za=e=>In.create(e),Ya=e=>In.create(e);class Ka{client;baseClient;constructor(n,t,i){const a={"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer "+t,...i?{"X-INTEGRATION-KEY":i}:{}};this.client=za({baseURL:Ht[n].graphEndpoint,headers:a}),this.baseClient=Ya({baseURL:Ht[n].baseEndpoint,headers:a})}async query({query:n,variables:t}){try{const i=await this.client.post("",{query:ne(n),variables:t,operationName:n?.definitions?.[0]?.name?.value});if(i.data.errors)throw new xn(`Spritz GraphQL Error: ${i.data.errors[0].message}`);return i.data.data}catch(i){if(In.isAxiosError(i)){const a=i.response?.data.Message??i.response?.data.message;throw new xn(`Spritz Request Error: ${a}`)}else throw new xn(`Spritz Request Error: ${i.message}`)}}}var an={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PayableAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PayableAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:501}};an.loc.source={body:`fragment PayableAccountFragment on PayableAccount {
|
|
42
|
+
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},isRepeatable:{type:new I(Q),resolve:function(t){return t.isRepeatable}},locations:{type:new I(new C(new I(Ut))),resolve:function(t){return t.locations}},args:{type:new I(new C(new I(nn))),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;return a?t.args:t.args.filter(function(r){return r.deprecationReason==null})}}}}}),Ut=new Xe({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:R.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:R.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:R.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:R.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:R.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:R.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:R.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:R.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:R.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:R.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:R.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:R.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:R.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:R.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:R.UNION,description:"Location adjacent to a union definition."},ENUM:{value:R.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:R.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:R.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:R.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),K=new ae({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new I(Mt),resolve:function(t){if(_e(t))return q.SCALAR;if(W(t))return q.OBJECT;if($(t))return q.INTERFACE;if(te(t))return q.UNION;if(ie(t))return q.ENUM;if(ue(t))return q.INPUT_OBJECT;if(Le(t))return q.LIST;if(de(t))return q.NON_NULL;Oe(0,'Unexpected type: "'.concat(_(t),'".'))}},name:{type:V,resolve:function(t){return t.name!==void 0?t.name:void 0}},description:{type:V,resolve:function(t){return t.description!==void 0?t.description:void 0}},specifiedByUrl:{type:V,resolve:function(t){return t.specifiedByUrl!==void 0?t.specifiedByUrl:void 0}},fields:{type:new C(new I(Bt)),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;if(W(t)||$(t)){var r=se(t.getFields());return a?r:r.filter(function(u){return u.deprecationReason==null})}}},interfaces:{type:new C(new I(K)),resolve:function(t){if(W(t)||$(t))return t.getInterfaces()}},possibleTypes:{type:new C(new I(K)),resolve:function(t,i,a,r){var u=r.schema;if(va(t))return u.getPossibleTypes(t)}},enumValues:{type:new C(new I(Vt)),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;if(ie(t)){var r=t.getValues();return a?r:r.filter(function(u){return u.deprecationReason==null})}}},inputFields:{type:new C(new I(nn)),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;if(ue(t)){var r=se(t.getFields());return a?r:r.filter(function(u){return u.deprecationReason==null})}}},ofType:{type:K,resolve:function(t){return t.ofType!==void 0?t.ofType:void 0}}}}}),Bt=new ae({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},args:{type:new I(new C(new I(nn))),args:{includeDeprecated:{type:Q,defaultValue:!1}},resolve:function(t,i){var a=i.includeDeprecated;return a?t.args:t.args.filter(function(r){return r.deprecationReason==null})}},type:{type:new I(K),resolve:function(t){return t.type}},isDeprecated:{type:new I(Q),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:V,resolve:function(t){return t.deprecationReason}}}}}),nn=new ae({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},type:{type:new I(K),resolve:function(t){return t.type}},defaultValue:{type:V,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(t){var i=t.type,a=t.defaultValue,r=Be(a,i);return r?ne(r):null}},isDeprecated:{type:new I(Q),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:V,resolve:function(t){return t.deprecationReason}}}}}),Vt=new ae({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new I(V),resolve:function(t){return t.name}},description:{type:V,resolve:function(t){return t.description}},isDeprecated:{type:new I(Q),resolve:function(t){return t.deprecationReason!=null}},deprecationReason:{type:V,resolve:function(t){return t.deprecationReason}}}}}),q=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),Mt=new Xe({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:q.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:q.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:q.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:q.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:q.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:q.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:q.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:q.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),xt={name:"__schema",type:new I(Mn),description:"Access the current type schema of this server.",args:[],resolve:function(n,t,i,a){var r=a.schema;return r},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Ct={name:"__type",type:K,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new I(V),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(n,t,i,a){var r=t.name,u=a.schema;return u.getType(r)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},qt={name:"__typename",type:new I(V),description:"The name of the current Object type at runtime.",args:[],resolve:function(n,t,i,a){var r=a.parentType;return r.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},jt=Object.freeze([Mn,Pt,Ut,K,Bt,nn,Vt,Mt]);function Gt(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Va(e,n,t){return n&&Gt(e.prototype,n),t&&Gt(e,t),e}function Ma(e){return ee(e,he)}var he=function(){function e(t){var i,a;this.name=t.name,this.description=t.description,this.locations=t.locations,this.isRepeatable=(i=t.isRepeatable)!==null&&i!==void 0?i:!1,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,t.name||F(0,"Directive must be named."),Array.isArray(t.locations)||F(0,"@".concat(t.name," locations must be an Array."));var r=(a=t.args)!==null&&a!==void 0?a:{};oe(r)&&!Array.isArray(r)||F(0,"@".concat(t.name," args must be an object with argument names as keys.")),this.args=Fe(r).map(function(u){var o=u[0],s=u[1];return{name:o,description:s.description,type:s.type,defaultValue:s.defaultValue,deprecationReason:s.deprecationReason,extensions:s.extensions&&j(s.extensions),astNode:s.astNode}})}var n=e.prototype;return n.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:At(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},n.toString=function(){return"@"+this.name},n.toJSON=function(){return this.toString()},Va(e,[{key:G,get:function(){return"GraphQLDirective"}}]),e}();H(he);var xa=new he({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[R.FIELD,R.FRAGMENT_SPREAD,R.INLINE_FRAGMENT],args:{if:{type:new I(Q),description:"Included when true."}}}),Ca=new he({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[R.FIELD,R.FRAGMENT_SPREAD,R.INLINE_FRAGMENT],args:{if:{type:new I(Q),description:"Skipped when true."}}}),qa="No longer supported",ja=new he({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[R.FIELD_DEFINITION,R.ARGUMENT_DEFINITION,R.INPUT_FIELD_DEFINITION,R.ENUM_VALUE],args:{reason:{type:V,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:qa}}}),Ga=new he({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[R.SCALAR],args:{url:{type:new I(V),description:"The URL that specifies the behaviour of this scalar."}}}),$a=Object.freeze([xa,Ca,ja,Ga]);function $t(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Qa(e,n,t){return n&&$t(e.prototype,n),t&&$t(e,t),e}(function(){function e(t){var i;this.__validationErrors=t.assumeValid===!0?[]:void 0,oe(t)||F(0,"Must provide configuration object."),!t.types||Array.isArray(t.types)||F(0,'"types" must be Array if provided but got: '.concat(_(t.types),".")),!t.directives||Array.isArray(t.directives)||F(0,'"directives" must be Array if provided but got: '+"".concat(_(t.directives),".")),this.description=t.description,this.extensions=t.extensions&&j(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes,this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(i=t.directives)!==null&&i!==void 0?i:$a;var a=new Set(t.types);if(t.types!=null)for(var r=0,u=t.types;r<u.length;r++){var o=u[r];a.delete(o),X(o,a)}this._queryType!=null&&X(this._queryType,a),this._mutationType!=null&&X(this._mutationType,a),this._subscriptionType!=null&&X(this._subscriptionType,a);for(var s=0,l=this._directives;s<l.length;s++){var g=l[s];if(Ma(g))for(var E=0,y=g.args;E<y.length;E++){var d=y[E];X(d.type,a)}}X(Mn,a),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var T=0,w=Na(a);T<w.length;T++){var O=w[T];if(O!=null){var D=O.name;if(D||F(0,"One of the provided types for building the Schema is missing a name."),this._typeMap[D]!==void 0)throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(D,'".'));if(this._typeMap[D]=O,$(O))for(var P=0,L=O.getInterfaces();P<L.length;P++){var f=L[P];if($(f)){var c=this._implementationsMap[f.name];c===void 0&&(c=this._implementationsMap[f.name]={objects:[],interfaces:[]}),c.interfaces.push(O)}}else if(W(O))for(var S=0,v=O.getInterfaces();S<v.length;S++){var b=v[S];if($(b)){var A=this._implementationsMap[b.name];A===void 0&&(A=this._implementationsMap[b.name]={objects:[],interfaces:[]}),A.objects.push(O)}}}}}var n=e.prototype;return n.getQueryType=function(){return this._queryType},n.getMutationType=function(){return this._mutationType},n.getSubscriptionType=function(){return this._subscriptionType},n.getTypeMap=function(){return this._typeMap},n.getType=function(i){return this.getTypeMap()[i]},n.getPossibleTypes=function(i){return te(i)?i.getTypes():this.getImplementations(i).objects},n.getImplementations=function(i){var a=this._implementationsMap[i.name];return a??{objects:[],interfaces:[]}},n.isPossibleType=function(i,a){return this.isSubType(i,a)},n.isSubType=function(i,a){var r=this._subTypeMap[i.name];if(r===void 0){if(r=Object.create(null),te(i))for(var u=0,o=i.getTypes();u<o.length;u++){var s=o[u];r[s.name]=!0}else{for(var l=this.getImplementations(i),g=0,E=l.objects;g<E.length;g++){var y=E[g];r[y.name]=!0}for(var d=0,T=l.interfaces;d<T.length;d++){var w=T[d];r[w.name]=!0}}this._subTypeMap[i.name]=r}return r[a.name]!==void 0},n.getDirectives=function(){return this._directives},n.getDirective=function(i){return yt(this.getDirectives(),function(a){return a.name===i})},n.toConfig=function(){var i;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:se(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[],assumeValid:this.__validationErrors!==void 0}},Qa(e,[{key:G,get:function(){return"GraphQLSchema"}}]),e})();function X(e,n){var t=Re(e);if(!n.has(t)){if(n.add(t),te(t))for(var i=0,a=t.getTypes();i<a.length;i++){var r=a[i];X(r,n)}else if(W(t)||$(t)){for(var u=0,o=t.getInterfaces();u<o.length;u++){var s=o[u];X(s,n)}for(var l=0,g=se(t.getFields());l<g.length;l++){var E=g[l];X(E.type,n);for(var y=0,d=E.args;y<d.length;y++){var T=d[y];X(T.type,n)}}}else if(ue(t))for(var w=0,O=se(t.getFields());w<O.length;w++){var D=O[w];X(D.type,n)}}return n}function tn(e,n){var t;if(n.kind===h.LIST_TYPE)return t=tn(e,n.type),t&&new C(t);if(n.kind===h.NON_NULL_TYPE)return t=tn(e,n.type),t&&new I(t);if(n.kind===h.NAMED_TYPE)return e.getType(n.name.value);Oe(0,"Unexpected type node: "+_(n))}var Ja=function(){function e(t,i,a){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=i??Ha,a&&(ve(a)&&this._inputTypeStack.push(a),Pn(a)&&this._parentTypeStack.push(a),Ye(a)&&this._typeStack.push(a))}var n=e.prototype;return n.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},n.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},n.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},n.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},n.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},n.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},n.getDirective=function(){return this._directive},n.getArgument=function(){return this._argument},n.getEnumValue=function(){return this._enumValue},n.enter=function(i){var a=this._schema;switch(i.kind){case h.SELECTION_SET:{var r=Re(this.getType());this._parentTypeStack.push(Pn(r)?r:void 0);break}case h.FIELD:{var u=this.getParentType(),o,s;u&&(o=this._getFieldDef(a,u,i),o&&(s=o.type)),this._fieldDefStack.push(o),this._typeStack.push(Ye(s)?s:void 0);break}case h.DIRECTIVE:this._directive=a.getDirective(i.name.value);break;case h.OPERATION_DEFINITION:{var l;switch(i.operation){case"query":l=a.getQueryType();break;case"mutation":l=a.getMutationType();break;case"subscription":l=a.getSubscriptionType();break}this._typeStack.push(W(l)?l:void 0);break}case h.INLINE_FRAGMENT:case h.FRAGMENT_DEFINITION:{var g=i.typeCondition,E=g?tn(a,g):Re(this.getType());this._typeStack.push(Ye(E)?E:void 0);break}case h.VARIABLE_DEFINITION:{var y=tn(a,i.type);this._inputTypeStack.push(ve(y)?y:void 0);break}case h.ARGUMENT:{var d,T,w,O=(d=this.getDirective())!==null&&d!==void 0?d:this.getFieldDef();O&&(T=yt(O.args,function(b){return b.name===i.name.value}),T&&(w=T.type)),this._argument=T,this._defaultValueStack.push(T?T.defaultValue:void 0),this._inputTypeStack.push(ve(w)?w:void 0);break}case h.LIST:{var D=ha(this.getInputType()),P=Le(D)?D.ofType:D;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ve(P)?P:void 0);break}case h.OBJECT_FIELD:{var L=Re(this.getInputType()),f,c;ue(L)&&(c=L.getFields()[i.name.value],c&&(f=c.type)),this._defaultValueStack.push(c?c.defaultValue:void 0),this._inputTypeStack.push(ve(f)?f:void 0);break}case h.ENUM:{var S=Re(this.getInputType()),v;ie(S)&&(v=S.getValue(i.value)),this._enumValue=v;break}}},n.leave=function(i){switch(i.kind){case h.SELECTION_SET:this._parentTypeStack.pop();break;case h.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case h.DIRECTIVE:this._directive=null;break;case h.OPERATION_DEFINITION:case h.INLINE_FRAGMENT:case h.FRAGMENT_DEFINITION:this._typeStack.pop();break;case h.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case h.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case h.LIST:case h.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case h.ENUM:this._enumValue=null;break}},e}();function Ha(e,n,t){var i=t.name.value;if(i===xt.name&&e.getQueryType()===n)return xt;if(i===Ct.name&&e.getQueryType()===n)return Ct;if(i===qt.name&&Pn(n))return qt;if(W(n)||$(n))return n.getFields()[i]}function za(e,n){return{enter:function(i){e.enter(i);var a=Fn(n,i.kind,!1);if(a){var r=a.apply(n,arguments);return r!==void 0&&(e.leave(i),On(r)&&e.enter(r)),r}},leave:function(i){var a=Fn(n,i.kind,!0),r;return a&&(r=a.apply(n,arguments)),e.leave(i),r}}}[].concat(Lt,jt).map(function(e){return e.name});var re;function ye(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}re={},ye(re,h.SCALAR_TYPE_DEFINITION,h.SCALAR_TYPE_EXTENSION),ye(re,h.OBJECT_TYPE_DEFINITION,h.OBJECT_TYPE_EXTENSION),ye(re,h.INTERFACE_TYPE_DEFINITION,h.INTERFACE_TYPE_EXTENSION),ye(re,h.UNION_TYPE_DEFINITION,h.UNION_TYPE_EXTENSION),ye(re,h.ENUM_TYPE_DEFINITION,h.ENUM_TYPE_EXTENSION),ye(re,h.INPUT_OBJECT_TYPE_DEFINITION,h.INPUT_OBJECT_TYPE_EXTENSION);function Qt(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}var Jt=function(){function e(t,i){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=i}var n=e.prototype;return n.reportError=function(i){this._onError(i)},n.getDocument=function(){return this._ast},n.getFragment=function(i){var a=this._fragments;return a||(this._fragments=a=this.getDocument().definitions.reduce(function(r,u){return u.kind===h.FRAGMENT_DEFINITION&&(r[u.name.value]=u),r},Object.create(null))),a[i]},n.getFragmentSpreads=function(i){var a=this._fragmentSpreads.get(i);if(!a){a=[];for(var r=[i];r.length!==0;)for(var u=r.pop(),o=0,s=u.selections;o<s.length;o++){var l=s[o];l.kind===h.FRAGMENT_SPREAD?a.push(l):l.selectionSet&&r.push(l.selectionSet)}this._fragmentSpreads.set(i,a)}return a},n.getRecursivelyReferencedFragments=function(i){var a=this._recursivelyReferencedFragments.get(i);if(!a){a=[];for(var r=Object.create(null),u=[i.selectionSet];u.length!==0;)for(var o=u.pop(),s=0,l=this.getFragmentSpreads(o);s<l.length;s++){var g=l[s],E=g.name.value;if(r[E]!==!0){r[E]=!0;var y=this.getFragment(E);y&&(a.push(y),u.push(y.selectionSet))}}this._recursivelyReferencedFragments.set(i,a)}return a},e}();(function(e){Qt(n,e);function n(i,a,r){var u;return u=e.call(this,i,r)||this,u._schema=a,u}var t=n.prototype;return t.getSchema=function(){return this._schema},n})(Jt),function(e){Qt(n,e);function n(i,a,r,u){var o;return o=e.call(this,a,u)||this,o._schema=i,o._typeInfo=r,o._variableUsages=new Map,o._recursiveVariableUsages=new Map,o}var t=n.prototype;return t.getSchema=function(){return this._schema},t.getVariableUsages=function(a){var r=this._variableUsages.get(a);if(!r){var u=[],o=new Ja(this._schema);ht(a,za(o,{VariableDefinition:function(){return!1},Variable:function(l){u.push({node:l,type:o.getInputType(),defaultValue:o.getDefaultValue()})}})),r=u,this._variableUsages.set(a,r)}return r},t.getRecursiveVariableUsages=function(a){var r=this._recursiveVariableUsages.get(a);if(!r){r=this.getVariableUsages(a);for(var u=0,o=this.getRecursivelyReferencedFragments(a);u<o.length;u++){var s=o[u];r=r.concat(this.getVariableUsages(s))}this._recursiveVariableUsages.set(a,r)}return r},t.getType=function(){return this._typeInfo.getType()},t.getParentType=function(){return this._typeInfo.getParentType()},t.getInputType=function(){return this._typeInfo.getInputType()},t.getParentInputType=function(){return this._typeInfo.getParentInputType()},t.getFieldDef=function(){return this._typeInfo.getFieldDef()},t.getDirective=function(){return this._typeInfo.getDirective()},t.getArgument=function(){return this._typeInfo.getArgument()},t.getEnumValue=function(){return this._typeInfo.getEnumValue()},n}(Jt),gt(Lt.concat(jt),function(e){return e.name});const Ht={staging:{baseEndpoint:"https://api-staging.spritz.finance",graphEndpoint:"https://api-staging.spritz.finance/graphql"},production:{baseEndpoint:"https://api.spritz.finance",graphEndpoint:"https://api.spritz.finance/graphql"}};let xn=class Ai extends Error{date;constructor(n,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,Ai),this.name="SpritzApiError",this.message=n,this.date=new Date}};const Ya=e=>In.create(e),Ka=e=>In.create(e);class Xa{client;baseClient;constructor(n,t,i){const a={"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer "+t,...i?{"X-INTEGRATION-KEY":i}:{}};this.client=Ya({baseURL:Ht[n].graphEndpoint,headers:a}),this.baseClient=Ka({baseURL:Ht[n].baseEndpoint,headers:a})}async query({query:n,variables:t}){try{const i=await this.client.post("",{query:ne(n),variables:t,operationName:n?.definitions?.[0]?.name?.value});if(i.data.errors)throw new xn(`Spritz GraphQL Error: ${i.data.errors[0].message}`);return i.data.data}catch(i){if(In.isAxiosError(i)){const a=i.response?.data.Message??i.response?.data.message;throw new xn(`Spritz Request Error: ${a}`)}else throw new xn(`Spritz Request Error: ${i.message}`)}}}var an={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PayableAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PayableAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VirtualCard"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mask"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"balance"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"renderSecret"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"virtualCardType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"billingInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"street"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"street2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subdivision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postalCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countryCode"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:880}};an.loc.source={body:`fragment PayableAccountFragment on PayableAccount {
|
|
43
43
|
id
|
|
44
44
|
name
|
|
45
45
|
userId
|
|
@@ -60,6 +60,25 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
... on VirtualCard {
|
|
64
|
+
mask
|
|
65
|
+
balance
|
|
66
|
+
renderSecret
|
|
67
|
+
virtualCardType
|
|
68
|
+
billingInfo {
|
|
69
|
+
holder
|
|
70
|
+
phone
|
|
71
|
+
email
|
|
72
|
+
address {
|
|
73
|
+
street
|
|
74
|
+
street2
|
|
75
|
+
city
|
|
76
|
+
subdivision
|
|
77
|
+
postalCode
|
|
78
|
+
countryCode
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
63
82
|
institution {
|
|
64
83
|
id
|
|
65
84
|
name
|
|
@@ -68,14 +87,14 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
68
87
|
currency
|
|
69
88
|
}
|
|
70
89
|
}
|
|
71
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function rn(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){rn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){rn(i,n)}),e.definitions&&e.definitions.forEach(function(i){rn(i,n)})}var Cn={};(function(){an.definitions.forEach(function(n){if(n.name){var t=new Set;rn(n,t),Cn[n.name.value]=t}})})();function zt(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
|
|
90
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function rn(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){rn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){rn(i,n)}),e.definitions&&e.definitions.forEach(function(i){rn(i,n)})}var Cn={};(function(){an.definitions.forEach(function(n){if(n.name){var t=new Set;rn(n,t),Cn[n.name.value]=t}})})();function zt(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 Wa(e,n){var t={kind:e.kind,definitions:[zt(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Cn[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=Cn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=zt(e,o);s&&t.definitions.push(s)}),t}Wa(an,"PayableAccountFragment");var ge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUSBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createUSAccountInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUSBankAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"createUSAccountInput"},value:{kind:"Variable",name:{kind:"Name",value:"createUSAccountInput"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PayableAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:241}};ge.loc.source={body:`#import "../queries/payableAccountFragment.graphql"
|
|
72
91
|
|
|
73
92
|
mutation CreateUSBankAccount($createUSAccountInput: USBankAccountInput!) {
|
|
74
93
|
createUSBankAccount(createUSAccountInput: $createUSAccountInput) {
|
|
75
94
|
...PayableAccountFragment
|
|
76
95
|
}
|
|
77
96
|
}
|
|
78
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Yt={};function
|
|
97
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Yt={};function Za(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return Yt[t]?!1:(Yt[t]=!0,!0)})}ge.definitions=ge.definitions.concat(Za(an.definitions));function on(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){on(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){on(i,n)}),e.definitions&&e.definitions.forEach(function(i){on(i,n)})}var qn={};(function(){ge.definitions.forEach(function(n){if(n.name){var t=new Set;on(n,t),qn[n.name.value]=t}})})();function Kt(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 er(e,n){var t={kind:e.kind,definitions:[Kt(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=qn[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=qn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=Kt(e,o);s&&t.definitions.push(s)}),t}er(ge,"CreateUSBankAccount");var ke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"BankAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:495}};ke.loc.source={body:`fragment BankAccountFragment on BankAccount {
|
|
79
98
|
id
|
|
80
99
|
name
|
|
81
100
|
userId
|
|
@@ -104,28 +123,28 @@ mutation CreateUSBankAccount($createUSAccountInput: USBankAccountInput!) {
|
|
|
104
123
|
currency
|
|
105
124
|
}
|
|
106
125
|
}
|
|
107
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function sn(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){sn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){sn(i,n)}),e.definitions&&e.definitions.forEach(function(i){sn(i,n)})}var jn={};(function(){ke.definitions.forEach(function(n){if(n.name){var t=new Set;sn(n,t),jn[n.name.value]=t}})})();function Xt(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
|
|
126
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function sn(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){sn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){sn(i,n)}),e.definitions&&e.definitions.forEach(function(i){sn(i,n)})}var jn={};(function(){ke.definitions.forEach(function(n){if(n.name){var t=new Set;sn(n,t),jn[n.name.value]=t}})})();function Xt(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 nr(e,n){var t={kind:e.kind,definitions:[Xt(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=jn[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=jn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=Xt(e,o);s&&t.definitions.push(s)}),t}nr(ke,"BankAccountFragment");var Se={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletePayableAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:189}};Se.loc.source={body:`#import "../queries/bankAccountFragment.graphql"
|
|
108
127
|
|
|
109
|
-
mutation
|
|
110
|
-
|
|
128
|
+
mutation DeleteBankAccount($accountId: String!) {
|
|
129
|
+
deletePayableAccount(accountId: $accountId) {
|
|
111
130
|
...BankAccountFragment
|
|
112
131
|
}
|
|
113
132
|
}
|
|
114
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Wt={};function
|
|
133
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Wt={};function tr(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return Wt[t]?!1:(Wt[t]=!0,!0)})}Se.definitions=Se.definitions.concat(tr(ke.definitions));function un(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){un(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){un(i,n)}),e.definitions&&e.definitions.forEach(function(i){un(i,n)})}var Gn={};(function(){Se.definitions.forEach(function(n){if(n.name){var t=new Set;un(n,t),Gn[n.name.value]=t}})})();function Zt(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 ir(e,n){var t={kind:e.kind,definitions:[Zt(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Gn[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=Gn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=Zt(e,o);s&&t.definitions.push(s)}),t}ir(Se,"DeleteBankAccount");var Ne={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renamePayableAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:218}};Ne.loc.source={body:`#import "../queries/bankAccountFragment.graphql"
|
|
115
134
|
|
|
116
|
-
mutation
|
|
117
|
-
|
|
135
|
+
mutation RenameBankAccount($accountId: String!, $name: String!) {
|
|
136
|
+
renamePayableAccount(accountId: $accountId, name: $name) {
|
|
118
137
|
...BankAccountFragment
|
|
119
138
|
}
|
|
120
139
|
}
|
|
121
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var ei={};function
|
|
140
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var ei={};function ar(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return ei[t]?!1:(ei[t]=!0,!0)})}Ne.definitions=Ne.definitions.concat(ar(ke.definitions));function cn(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){cn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){cn(i,n)}),e.definitions&&e.definitions.forEach(function(i){cn(i,n)})}var $n={};(function(){Ne.definitions.forEach(function(n){if(n.name){var t=new Set;cn(n,t),$n[n.name.value]=t}})})();function ni(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 rr(e,n){var t={kind:e.kind,definitions:[ni(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=$n[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=$n[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=ni(e,o);s&&t.definitions.push(s)}),t}rr(Ne,"RenameBankAccount");var Te={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserBankAccounts"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bankAccounts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:124}};Te.loc.source={body:`#import "./bankAccountFragment.graphql"
|
|
122
141
|
|
|
123
142
|
query UserBankAccounts {
|
|
124
|
-
|
|
143
|
+
bankAccounts {
|
|
125
144
|
...BankAccountFragment
|
|
126
145
|
}
|
|
127
146
|
}
|
|
128
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var ti={};function
|
|
147
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var ti={};function or(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return ti[t]?!1:(ti[t]=!0,!0)})}Te.definitions=Te.definitions.concat(or(ke.definitions));function ln(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){ln(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){ln(i,n)}),e.definitions&&e.definitions.forEach(function(i){ln(i,n)})}var Qn={};(function(){Te.definitions.forEach(function(n){if(n.name){var t=new Set;ln(n,t),Qn[n.name.value]=t}})})();function ii(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 sr(e,n){var t={kind:e.kind,definitions:[ii(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Qn[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=Qn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=ii(e,o);s&&t.definitions.push(s)}),t}sr(Te,"UserBankAccounts");var Jn=(e=>(e.CHECKBOOK="CHECKBOOK",e.METHOD_FI="METHOD_FI",e))(Jn||{}),ai=(e=>(e.Business="Business",e.Checking="Checking",e.Savings="Savings",e))(ai||{}),Hn=(e=>(e.USBankAccount="USBankAccount",e))(Hn||{}),ri=(e=>(e.COMPLETED="COMPLETED",e.CONFIRMED="CONFIRMED",e.CREATED="CREATED",e.FAILED="FAILED",e.PENDING="PENDING",e.REFUNDED="REFUNDED",e.TRANSACTION_FAILED="TRANSACTION_FAILED",e.TRANSACTION_PENDING="TRANSACTION_PENDING",e))(ri||{}),oi=(e=>(e.ACTIVE="ACTIVE",e.DISABLED="DISABLED",e.FAILED="FAILED",e.INITIALIZED="INITIALIZED",e.LOADING="LOADING",e.RETRY="RETRY",e.UNAVAILABLE="UNAVAILABLE",e.UNINITIALIZED="UNINITIALIZED",e))(oi||{}),si=(e=>(e.BankAccount="BankAccount",e.Bill="Bill",e.VirtualCard="VirtualCard",e))(si||{}),ui=(e=>(e.CANCELLED="CANCELLED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.INITIALIZED="INITIALIZED",e.PENDING="PENDING",e.REFUNDED="REFUNDED",e.REVERSAL_IN_PROGRESS="REVERSAL_IN_PROGRESS",e.REVERSED="REVERSED",e.SCHEDULED="SCHEDULED",e.SENT="SENT",e))(ui||{}),ci=(e=>(e.USVirtualDebitCard="USVirtualDebitCard",e))(ci||{});const ur={[Hn.USBankAccount]:e=>({query:ge,variables:{createUSAccountInput:e},response:"createUSBankAccount"})},cr=(e,n)=>ur[e]?.(n)??null;class lr{client;constructor(n){this.client=n}async list(){return(await this.client.query({query:Te}))?.bankAccounts??[]}async rename(n,t){return(await this.client.query({query:Ne,variables:{accountId:n,name:t}}))?.renamePayableAccount??null}async delete(n){return(await this.client.query({query:Se,variables:{accountId:n}}))?.deletePayableAccount??null}async create(n,t){const i=cr(n,t);if(!i)throw new Error("Invalid bank account type");return(await this.client.query({query:i.query,variables:i.variables}))?.[i.response]??null}}var Ve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PaymentFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Payment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"feeAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}],loc:{start:0,end:122}};Ve.loc.source={body:`fragment PaymentFragment on Payment {
|
|
129
148
|
id
|
|
130
149
|
userId
|
|
131
150
|
status
|
|
@@ -134,21 +153,21 @@ query UserBankAccounts {
|
|
|
134
153
|
feeAmount
|
|
135
154
|
createdAt
|
|
136
155
|
}
|
|
137
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function fn(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){fn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){fn(i,n)}),e.definitions&&e.definitions.forEach(function(i){fn(i,n)})}var zn={};(function(){Ve.definitions.forEach(function(n){if(n.name){var t=new Set;fn(n,t),zn[n.name.value]=t}})})();function
|
|
156
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function fn(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){fn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){fn(i,n)}),e.definitions&&e.definitions.forEach(function(i){fn(i,n)})}var zn={};(function(){Ve.definitions.forEach(function(n){if(n.name){var t=new Set;fn(n,t),zn[n.name.value]=t}})})();function li(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 fr(e,n){var t={kind:e.kind,definitions:[li(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=zn[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=zn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=li(e,o);s&&t.definitions.push(s)}),t}fr(Ve,"PaymentFragment");var be={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PaymentRequestPayment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paymentRequestId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paymentForPaymentRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paymentRequestId"},value:{kind:"Variable",name:{kind:"Name",value:"paymentRequestId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PaymentFragment"},directives:[]}]}}]}}],loc:{start:0,end:198}};be.loc.source={body:`#import "./paymentFragment.graphql"
|
|
138
157
|
|
|
139
158
|
query PaymentRequestPayment($paymentRequestId: String!) {
|
|
140
159
|
paymentForPaymentRequest(paymentRequestId: $paymentRequestId) {
|
|
141
160
|
...PaymentFragment
|
|
142
161
|
}
|
|
143
162
|
}
|
|
144
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
163
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var fi={};function dr(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return fi[t]?!1:(fi[t]=!0,!0)})}be.definitions=be.definitions.concat(dr(Ve.definitions));function dn(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){dn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){dn(i,n)}),e.definitions&&e.definitions.forEach(function(i){dn(i,n)})}var Yn={};(function(){be.definitions.forEach(function(n){if(n.name){var t=new Set;dn(n,t),Yn[n.name.value]=t}})})();function di(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 vr(e,n){var t={kind:e.kind,definitions:[di(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Yn[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=Yn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=di(e,o);s&&t.definitions.push(s)}),t}vr(be,"PaymentRequestPayment");var Ee={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AccountPayments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paymentsForAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PaymentFragment"},directives:[]}]}}]}}],loc:{start:0,end:165}};Ee.loc.source={body:`#import "./paymentFragment.graphql"
|
|
145
164
|
|
|
146
165
|
query AccountPayments($accountId: String!) {
|
|
147
166
|
paymentsForAccount(accountId: $accountId) {
|
|
148
167
|
...PaymentFragment
|
|
149
168
|
}
|
|
150
169
|
}
|
|
151
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
170
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var vi={};function pr(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return vi[t]?!1:(vi[t]=!0,!0)})}Ee.definitions=Ee.definitions.concat(pr(Ve.definitions));function vn(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){vn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){vn(i,n)}),e.definitions&&e.definitions.forEach(function(i){vn(i,n)})}var Kn={};(function(){Ee.definitions.forEach(function(n){if(n.name){var t=new Set;vn(n,t),Kn[n.name.value]=t}})})();function pi(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 mr(e,n){var t={kind:e.kind,definitions:[pi(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Kn[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=Kn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=pi(e,o);s&&t.definitions.push(s)}),t}mr(Ee,"AccountPayments");class hr{client;constructor(n){this.client=n}async listForAccount(n){return(await this.client.query({query:Ee,variables:{accountId:n}}))?.paymentsForAccount??[]}async getForPaymentRequest(n){return(await this.client.query({query:be,variables:{paymentRequestId:n}}))?.paymentForPaymentRequest??null}}var pn={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PaymentRequestFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DirectPayment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"feeAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amountDue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"network"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}],loc:{start:0,end:161}};pn.loc.source={body:`fragment PaymentRequestFragment on DirectPayment {
|
|
152
171
|
id
|
|
153
172
|
userId
|
|
154
173
|
accountId
|
|
@@ -159,14 +178,14 @@ query AccountPayments($accountId: String!) {
|
|
|
159
178
|
network
|
|
160
179
|
createdAt
|
|
161
180
|
}
|
|
162
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function mn(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){mn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){mn(i,n)}),e.definitions&&e.definitions.forEach(function(i){mn(i,n)})}var Xn={};(function(){pn.definitions.forEach(function(n){if(n.name){var t=new Set;mn(n,t),Xn[n.name.value]=t}})})();function
|
|
181
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function mn(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){mn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){mn(i,n)}),e.definitions&&e.definitions.forEach(function(i){mn(i,n)})}var Xn={};(function(){pn.definitions.forEach(function(n){if(n.name){var t=new Set;mn(n,t),Xn[n.name.value]=t}})})();function mi(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 yr(e,n){var t={kind:e.kind,definitions:[mi(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Xn[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=Xn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=mi(e,o);s&&t.definitions.push(s)}),t}yr(pn,"PaymentRequestFragment");var le={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePaymentRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createDirectPaymentInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateDirectPaymentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDirectPayment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"createDirectPaymentInput"},value:{kind:"Variable",name:{kind:"Name",value:"createDirectPaymentInput"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PaymentRequestFragment"},directives:[]}]}}]}}],loc:{start:0,end:260}};le.loc.source={body:`#import "../queries/paymentRequestFragment.graphql"
|
|
163
182
|
|
|
164
183
|
mutation CreatePaymentRequest($createDirectPaymentInput: CreateDirectPaymentInput!) {
|
|
165
184
|
createDirectPayment(createDirectPaymentInput: $createDirectPaymentInput) {
|
|
166
185
|
...PaymentRequestFragment
|
|
167
186
|
}
|
|
168
187
|
}
|
|
169
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
188
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var hi={};function gr(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return hi[t]?!1:(hi[t]=!0,!0)})}le.definitions=le.definitions.concat(gr(pn.definitions));function hn(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){hn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){hn(i,n)}),e.definitions&&e.definitions.forEach(function(i){hn(i,n)})}var Wn={};(function(){le.definitions.forEach(function(n){if(n.name){var t=new Set;hn(n,t),Wn[n.name.value]=t}})})();function yi(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 kr(e,n){var t={kind:e.kind,definitions:[yi(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Wn[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=Wn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=yi(e,o);s&&t.definitions.push(s)}),t}kr(le,"CreatePaymentRequest");var yn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSpritzPayParams"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tokenAddress"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"amount"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reference"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"network"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"spritzPayParams"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tokenAddress"},value:{kind:"Variable",name:{kind:"Name",value:"tokenAddress"}}},{kind:"Argument",name:{kind:"Name",value:"amount"},value:{kind:"Variable",name:{kind:"Name",value:"amount"}}},{kind:"Argument",name:{kind:"Name",value:"reference"},value:{kind:"Variable",name:{kind:"Name",value:"reference"}}},{kind:"Argument",name:{kind:"Name",value:"network"},value:{kind:"Variable",name:{kind:"Name",value:"network"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contractAddress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"method"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calldata"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requiredTokenInput"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"suggestedGasLimit"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:399}};yn.loc.source={body:`query GetSpritzPayParams(
|
|
170
189
|
$tokenAddress: String!
|
|
171
190
|
$amount: Float!
|
|
172
191
|
$reference: String!
|
|
@@ -186,11 +205,11 @@ mutation CreatePaymentRequest($createDirectPaymentInput: CreateDirectPaymentInpu
|
|
|
186
205
|
suggestedGasLimit
|
|
187
206
|
}
|
|
188
207
|
}
|
|
189
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function gn(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){gn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){gn(i,n)}),e.definitions&&e.definitions.forEach(function(i){gn(i,n)})}var Zn={};(function(){yn.definitions.forEach(function(n){if(n.name){var t=new Set;gn(n,t),Zn[n.name.value]=t}})})();function
|
|
208
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function gn(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){gn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){gn(i,n)}),e.definitions&&e.definitions.forEach(function(i){gn(i,n)})}var Zn={};(function(){yn.definitions.forEach(function(n){if(n.name){var t=new Set;gn(n,t),Zn[n.name.value]=t}})})();function gi(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 Sr(e,n){var t={kind:e.kind,definitions:[gi(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=Zn[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=Zn[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=gi(e,o);s&&t.definitions.push(s)}),t}Sr(yn,"GetSpritzPayParams");var ki=Z({"node_modules/@noble/hashes/_assert.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=void 0;function n(s){if(!Number.isSafeInteger(s)||s<0)throw new Error(`Wrong positive integer: ${s}`)}e.number=n;function t(s){if(typeof s!="boolean")throw new Error(`Expected boolean, not ${s}`)}e.bool=t;function i(s,...l){if(!(s instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(l.length>0&&!l.includes(s.length))throw new TypeError(`Expected Uint8Array of length ${l}, not of length=${s.length}`)}e.bytes=i;function a(s){if(typeof s!="function"||typeof s.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");n(s.outputLen),n(s.blockLen)}e.hash=a;function r(s,l=!0){if(s.destroyed)throw new Error("Hash instance has been destroyed");if(l&&s.finished)throw new Error("Hash#digest() has already been called")}e.exists=r;function u(s,l){i(s);const g=l.outputLen;if(s.length<g)throw new Error(`digestInto() expects output buffer of length at least ${g}`)}e.output=u;var o={number:n,bool:t,bytes:i,hash:a,exists:r,output:u};e.default=o}}),Nr=Z({"node_modules/@noble/hashes/crypto.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=void 0,e.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0}}),et=Z({"node_modules/@noble/hashes/utils.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;var n=Nr(),t=f=>new Uint8Array(f.buffer,f.byteOffset,f.byteLength);e.u8=t;var i=f=>new Uint32Array(f.buffer,f.byteOffset,Math.floor(f.byteLength/4));e.u32=i;var a=f=>new DataView(f.buffer,f.byteOffset,f.byteLength);e.createView=a;var r=(f,c)=>f<<32-c|f>>>c;if(e.rotr=r,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");var u=Array.from({length:256},(f,c)=>c.toString(16).padStart(2,"0"));function o(f){if(!(f instanceof Uint8Array))throw new Error("Uint8Array expected");let c="";for(let S=0;S<f.length;S++)c+=u[f[S]];return c}e.bytesToHex=o;function s(f){if(typeof f!="string")throw new TypeError("hexToBytes: expected string, got "+typeof f);if(f.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const c=new Uint8Array(f.length/2);for(let S=0;S<c.length;S++){const v=S*2,b=f.slice(v,v+2),A=Number.parseInt(b,16);if(Number.isNaN(A)||A<0)throw new Error("Invalid byte sequence");c[S]=A}return c}e.hexToBytes=s;var l=async()=>{};e.nextTick=l;async function g(f,c,S){let v=Date.now();for(let b=0;b<f;b++){S(b);const A=Date.now()-v;A>=0&&A<c||(await(0,e.nextTick)(),v+=A)}}e.asyncLoop=g;function E(f){if(typeof f!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof f}`);return new TextEncoder().encode(f)}e.utf8ToBytes=E;function y(f){if(typeof f=="string"&&(f=E(f)),!(f instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof f})`);return f}e.toBytes=y;function d(...f){if(!f.every(v=>v instanceof Uint8Array))throw new Error("Uint8Array list expected");if(f.length===1)return f[0];const c=f.reduce((v,b)=>v+b.length,0),S=new Uint8Array(c);for(let v=0,b=0;v<f.length;v++){const A=f[v];S.set(A,b),b+=A.length}return S}e.concatBytes=d;var T=class{clone(){return this._cloneInto()}};e.Hash=T;var w=f=>Object.prototype.toString.call(f)==="[object Object]"&&f.constructor===Object;function O(f,c){if(c!==void 0&&(typeof c!="object"||!w(c)))throw new TypeError("Options should be object or undefined");return Object.assign(f,c)}e.checkOpts=O;function D(f){const c=v=>f().update(y(v)).digest(),S=f();return c.outputLen=S.outputLen,c.blockLen=S.blockLen,c.create=()=>f(),c}e.wrapConstructor=D;function P(f){const c=(v,b)=>f(b).update(y(v)).digest(),S=f({});return c.outputLen=S.outputLen,c.blockLen=S.blockLen,c.create=v=>f(v),c}e.wrapConstructorWithOpts=P;function L(f=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(f));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=L}}),Si=Z({"node_modules/ethereum-cryptography/utils.js"(e,n){var t=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=e.wrapHash=e.equalsBytes=e.hexToBytes=e.bytesToUtf8=e.utf8ToBytes=e.createView=e.concatBytes=e.toHex=e.bytesToHex=e.assertBytes=e.assertBool=void 0;var i=t(ki()),a=et(),r=i.default.bool;e.assertBool=r;var u=i.default.bytes;e.assertBytes=u;var o=et();Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return o.concatBytes}}),Object.defineProperty(e,"createView",{enumerable:!0,get:function(){return o.createView}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return o.utf8ToBytes}});function s(y){if(!(y instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof y}`);return new TextDecoder().decode(y)}e.bytesToUtf8=s;function l(y){const d=y.startsWith("0x")?y.substring(2):y;return(0,a.hexToBytes)(d)}e.hexToBytes=l;function g(y,d){if(y.length!==d.length)return!1;for(let T=0;T<y.length;T++)if(y[T]!==d[T])return!1;return!0}e.equalsBytes=g;function E(y){return d=>(i.default.bytes(d),y(d))}e.wrapHash=E,e.crypto=(()=>{const y=typeof self=="object"&&"crypto"in self?self.crypto:void 0,d=typeof n<"u"&&typeof n.require=="function"&&n.require.bind(n);return{node:d&&!y?d("crypto"):void 0,web:y}})()}});/*! Bundled license information:
|
|
190
209
|
|
|
191
210
|
@noble/hashes/utils.js:
|
|
192
211
|
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
193
|
-
*/var Tr=Z({"node_modules/@noble/hashes/_u64.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.add=e.toBig=e.split=e.fromBig=void 0;var n=BigInt(2**32-1),t=BigInt(32);function i(m,p=!1){return p?{h:Number(m&n),l:Number(m>>t&n)}:{h:Number(m>>t&n)|0,l:Number(m&n)|0}}e.fromBig=i;function a(m,p=!1){let
|
|
212
|
+
*/var Tr=Z({"node_modules/@noble/hashes/_u64.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.add=e.toBig=e.split=e.fromBig=void 0;var n=BigInt(2**32-1),t=BigInt(32);function i(m,p=!1){return p?{h:Number(m&n),l:Number(m>>t&n)}:{h:Number(m>>t&n)|0,l:Number(m&n)|0}}e.fromBig=i;function a(m,p=!1){let N=new Uint32Array(m.length),M=new Uint32Array(m.length);for(let x=0;x<m.length;x++){const{h:J,l:En}=i(m[x],p);[N[x],M[x]]=[J,En]}return[N,M]}e.split=a;var r=(m,p)=>BigInt(m>>>0)<<t|BigInt(p>>>0);e.toBig=r;var u=(m,p,N)=>m>>>N,o=(m,p,N)=>m<<32-N|p>>>N,s=(m,p,N)=>m>>>N|p<<32-N,l=(m,p,N)=>m<<32-N|p>>>N,g=(m,p,N)=>m<<64-N|p>>>N-32,E=(m,p,N)=>m>>>N-32|p<<64-N,y=(m,p)=>p,d=(m,p)=>m,T=(m,p,N)=>m<<N|p>>>32-N,w=(m,p,N)=>p<<N|m>>>32-N,O=(m,p,N)=>p<<N-32|m>>>64-N,D=(m,p,N)=>m<<N-32|p>>>64-N;function P(m,p,N,M){const x=(p>>>0)+(M>>>0);return{h:m+N+(x/2**32|0)|0,l:x|0}}e.add=P;var L=(m,p,N)=>(m>>>0)+(p>>>0)+(N>>>0),f=(m,p,N,M)=>p+N+M+(m/2**32|0)|0,c=(m,p,N,M)=>(m>>>0)+(p>>>0)+(N>>>0)+(M>>>0),S=(m,p,N,M,x)=>p+N+M+x+(m/2**32|0)|0,v=(m,p,N,M,x)=>(m>>>0)+(p>>>0)+(N>>>0)+(M>>>0)+(x>>>0),b=(m,p,N,M,x,J)=>p+N+M+x+J+(m/2**32|0)|0,A={fromBig:i,split:a,toBig:e.toBig,shrSH:u,shrSL:o,rotrSH:s,rotrSL:l,rotrBH:g,rotrBL:E,rotr32H:y,rotr32L:d,rotlSH:T,rotlSL:w,rotlBH:O,rotlBL:D,add:P,add3L:L,add3H:f,add4L:c,add4H:S,add5H:b,add5L:v};e.default=A}}),br=Z({"node_modules/@noble/hashes/sha3.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shake256=e.shake128=e.keccak_512=e.keccak_384=e.keccak_256=e.keccak_224=e.sha3_512=e.sha3_384=e.sha3_256=e.sha3_224=e.Keccak=e.keccakP=void 0;var n=ki(),t=Tr(),i=et(),[a,r,u]=[[],[],[]],o=BigInt(0),s=BigInt(1),l=BigInt(2),g=BigInt(7),E=BigInt(256),y=BigInt(113);for(let c=0,S=s,v=1,b=0;c<24;c++){[v,b]=[b,(2*v+3*b)%5],a.push(2*(5*b+v)),r.push((c+1)*(c+2)/2%64);let A=o;for(let m=0;m<7;m++)S=(S<<s^(S>>g)*y)%E,S&l&&(A^=s<<(s<<BigInt(m))-s);u.push(A)}var[d,T]=t.default.split(u,!0),w=(c,S,v)=>v>32?t.default.rotlBH(c,S,v):t.default.rotlSH(c,S,v),O=(c,S,v)=>v>32?t.default.rotlBL(c,S,v):t.default.rotlSL(c,S,v);function D(c,S=24){const v=new Uint32Array(10);for(let b=24-S;b<24;b++){for(let p=0;p<10;p++)v[p]=c[p]^c[p+10]^c[p+20]^c[p+30]^c[p+40];for(let p=0;p<10;p+=2){const N=(p+8)%10,M=(p+2)%10,x=v[M],J=v[M+1],En=w(x,J,1)^v[N],Di=O(x,J,1)^v[N+1];for(let Me=0;Me<50;Me+=10)c[p+Me]^=En,c[p+Me+1]^=Di}let A=c[2],m=c[3];for(let p=0;p<24;p++){const N=r[p],M=w(A,m,N),x=O(A,m,N),J=a[p];A=c[J],m=c[J+1],c[J]=M,c[J+1]=x}for(let p=0;p<50;p+=10){for(let N=0;N<10;N++)v[N]=c[p+N];for(let N=0;N<10;N++)c[p+N]^=~v[(N+2)%10]&v[(N+4)%10]}c[0]^=d[b],c[1]^=T[b]}v.fill(0)}e.keccakP=D;var P=class extends i.Hash{constructor(c,S,v,b=!1,A=24){if(super(),this.blockLen=c,this.suffix=S,this.outputLen=v,this.enableXOF=b,this.rounds=A,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n.default.number(v),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){D(this.state32,this.rounds),this.posOut=0,this.pos=0}update(c){n.default.exists(this);const{blockLen:S,state:v}=this;c=(0,i.toBytes)(c);const b=c.length;for(let A=0;A<b;){const m=Math.min(S-this.pos,b-A);for(let p=0;p<m;p++)v[this.pos++]^=c[A++];this.pos===S&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:c,suffix:S,pos:v,blockLen:b}=this;c[v]^=S,S&128&&v===b-1&&this.keccak(),c[b-1]^=128,this.keccak()}writeInto(c){n.default.exists(this,!1),n.default.bytes(c),this.finish();const S=this.state,{blockLen:v}=this;for(let b=0,A=c.length;b<A;){this.posOut>=v&&this.keccak();const m=Math.min(v-this.posOut,A-b);c.set(S.subarray(this.posOut,this.posOut+m),b),this.posOut+=m,b+=m}return c}xofInto(c){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(c)}xof(c){return n.default.number(c),this.xofInto(new Uint8Array(c))}digestInto(c){if(n.default.output(c,this),this.finished)throw new Error("digest() was already called");return this.writeInto(c),this.destroy(),c}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(c){const{blockLen:S,suffix:v,outputLen:b,rounds:A,enableXOF:m}=this;return c||(c=new P(S,v,b,m,A)),c.state32.set(this.state32),c.pos=this.pos,c.posOut=this.posOut,c.finished=this.finished,c.rounds=A,c.suffix=v,c.outputLen=b,c.enableXOF=m,c.destroyed=this.destroyed,c}};e.Keccak=P;var L=(c,S,v)=>(0,i.wrapConstructor)(()=>new P(S,c,v));e.sha3_224=L(6,144,224/8),e.sha3_256=L(6,136,256/8),e.sha3_384=L(6,104,384/8),e.sha3_512=L(6,72,512/8),e.keccak_224=L(1,144,224/8),e.keccak_256=L(1,136,256/8),e.keccak_384=L(1,104,384/8),e.keccak_512=L(1,72,512/8);var f=(c,S,v)=>(0,i.wrapConstructorWithOpts)((b={})=>new P(S,c,b.dkLen===void 0?v:b.dkLen,!0));e.shake128=f(31,168,128/8),e.shake256=f(31,136,256/8)}}),Er=Z({"node_modules/ethereum-cryptography/keccak.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.keccak512=e.keccak384=e.keccak256=e.keccak224=void 0;var n=br(),t=Si();e.keccak224=(0,t.wrapHash)(n.keccak_224),e.keccak256=(()=>{const i=(0,t.wrapHash)(n.keccak_256);return i.create=n.keccak_256.create,i})(),e.keccak384=(0,t.wrapHash)(n.keccak_384),e.keccak512=(0,t.wrapHash)(n.keccak_512)}}),Ir=Z({"optimize-deps:ethereum-cryptography/keccak"(e,n){n.exports=Er()}}),wr=Ir(),Ar=Z({"optimize-deps:ethereum-cryptography/utils"(e,n){n.exports=Si()}}),Dr=Ar();function Or(e){let n="0x";for(const t of e){const i=t.toString(16);n+=i.length===1?`0${i}`:i}return n}const Fr=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;const n=e.slice(2),t=Dr.utf8ToBytes(n.toLowerCase()),i=Or(wr.keccak256(t)).slice(2);for(let a=0;a<40;a+=1)if(parseInt(i[a],16)>7&&n[a].toUpperCase()!==n[a]||parseInt(i[a],16)<=7&&n[a].toLowerCase()!==n[a])return!1;return!0};function _r(e){return/^0x[0-9a-f]{40}$/i.test(e)?/^0x[0-9a-f]{40}$/.test(e)||/^(0x|0X)[0-9A-F]{40}$/.test(e)?!0:Fr(e):!1}const nt=e=>Math.round((e+Number.EPSILON)*100)/100;class Lr{client;constructor(n){this.client=n}async create(n){return(await this.client.query({query:le,variables:{createDirectPaymentInput:{...n,amount:nt(n.amount),provider:Jn.CHECKBOOK}}}))?.createDirectPayment}async transactionPrice(n){return(await this.client.query({query:le,variables:{amount:nt(n)}}))?.transactionPrice??0}async getWeb3PaymentParams(n){if(!_r(n.paymentTokenAddress))throw new Error("Invalid token address");return(await this.client.query({query:yn,variables:{amount:nt(n.paymentRequest.amountDue),network:n.paymentRequest.network,tokenAddress:n.paymentTokenAddress,reference:n.paymentRequest.id}}))?.spritzPayParams}}var kn={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sub"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"picture"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timezone"},arguments:[],directives:[]}]}}],loc:{start:0,end:135}};kn.loc.source={body:`fragment UserFragment on User {
|
|
194
213
|
id
|
|
195
214
|
sub
|
|
196
215
|
email
|
|
@@ -201,14 +220,14 @@ mutation CreatePaymentRequest($createDirectPaymentInput: CreateDirectPaymentInpu
|
|
|
201
220
|
createdAt
|
|
202
221
|
timezone
|
|
203
222
|
}
|
|
204
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Sn(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){Sn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Sn(i,n)}),e.definitions&&e.definitions.forEach(function(i){Sn(i,n)})}var tt={};(function(){kn.definitions.forEach(function(n){if(n.name){var t=new Set;Sn(n,t),tt[n.name.value]=t}})})();function
|
|
223
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Sn(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){Sn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Sn(i,n)}),e.definitions&&e.definitions.forEach(function(i){Sn(i,n)})}var tt={};(function(){kn.definitions.forEach(function(n){if(n.name){var t=new Set;Sn(n,t),tt[n.name.value]=t}})})();function Ni(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 Rr(e,n){var t={kind:e.kind,definitions:[Ni(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=tt[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=tt[o]||new Set;s.forEach(function(l){r.add(l)})}})}return a.forEach(function(o){var s=Ni(e,o);s&&t.definitions.push(s)}),t}Rr(kn,"UserFragment");var Ie={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CurrentUser"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserFragment"},directives:[]}]}}]}}],loc:{start:0,end:95}};Ie.loc.source={body:`#import "./userFragment.graphql"
|
|
205
224
|
|
|
206
225
|
query CurrentUser {
|
|
207
226
|
me {
|
|
208
227
|
...UserFragment
|
|
209
228
|
}
|
|
210
229
|
}
|
|
211
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Ti={};function
|
|
230
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Ti={};function Pr(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return Ti[t]?!1:(Ti[t]=!0,!0)})}Ie.definitions=Ie.definitions.concat(Pr(kn.definitions));function Nn(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){Nn(i,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Nn(i,n)}),e.definitions&&e.definitions.forEach(function(i){Nn(i,n)})}var it={};(function(){Ie.definitions.forEach(function(n){if(n.name){var t=new Set;Nn(n,t),it[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=it[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=it[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(Ie,"CurrentUser");var Tn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserVerification"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"verification"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"identity"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verificationUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:297}};Tn.loc.source={body:`query UserVerification {
|
|
212
231
|
verification {
|
|
213
232
|
userId
|
|
214
233
|
identity {
|
|
@@ -224,5 +243,4 @@ query CurrentUser {
|
|
|
224
243
|
}
|
|
225
244
|
}
|
|
226
245
|
}
|
|
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(){
|
|
228
|
-
//# sourceMappingURL=spritz-api-client.mjs.map
|
|
246
|
+
`,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(){Tn.definitions.forEach(function(n){if(n.name){var t=new Set;bn(n,t),at[n.name.value]=t}})})();function Ei(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 Br(e,n){var t={kind:e.kind,definitions:[Ei(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=Ei(e,o);s&&t.definitions.push(s)}),t}Br(Tn,"UserVerification");class Vr{client;constructor(n){this.client=n}async createUser(n){const{data:t}=await this.client.baseClient.post("/users/integration",n);return t}async create(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:Tn}))?.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 Xa(this.environment,this.apiKey,this.integrationKey),this.user=new Vr(this.client),this.bankAccount=new lr(this.client),this.paymentRequest=new Lr(this.client),this.payment=new hr(this.client)}setApiKey(n){return this.apiKey=n,this.init(),this}}var Ii=(e=>(e.Staging="staging",e.Production="production",e))(Ii||{}),wi=(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))(wi||{});export{Jn as AccountProvider,ai as BankAccountSubType,Hn as BankAccountType,ri as DirectPaymentStatus,Ii as Environment,oi as ModuleStatus,si as PayableAccountType,wi as PaymentNetwork,ui as PaymentStatus,rt as SpritzApiClient,ci as VirtualCardType};
|