pnz-apicentre-sandbox-sdk
Version:
The sandbox, powered by Middleware New Zealand, is a dedicated environment that mimics an API Provider, as defined in the [Payments NZ API Centre standards](https://paymentsnz.atlassian.net/wiki/spaces/PaymentsNZAPIStandards/overview). This SDK is generat
3 lines (2 loc) • 48.4 kB
JavaScript
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@apimatic/core"),n=require("@apimatic/schema"),r=t(require("jsonwebtoken")),a=require("uuid"),i=t(require("request"));function o(){o=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function p(t,e,n,a){var i=Object.create((e&&e.prototype instanceof d?e:d).prototype),o=new D(a||[]);return r(i,"_invoke",{value:z(t,n,o)}),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=p;var f={};function d(){}function h(){}function y(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(x([])));v&&v!==e&&n.call(v,i)&&(m=v);var b=y.prototype=d.prototype=Object.create(m);function A(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){var a;r(this,"_invoke",{value:function(r,i){function o(){return new e((function(a,o){!function r(a,i,o,c){var s=l(t[a],t,i);if("throw"!==s.type){var u=s.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,o,c)}),(function(t){r("throw",t,o,c)})):e.resolve(p).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,c)}))}c(s.arg)}(r,i,a,o)}))}return a=a?a.then(o,o):o()}})}function z(t,e,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return{value:void 0,done:!0}}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var c=w(o,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function w(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=l(r,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,f;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:j}}function j(){return{value:void 0,done:!0}}return h.prototype=y,r(b,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:h,configurable:!0}),h.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},A(T.prototype),u(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new T(p(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},A(b),u(b,s,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=x,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return o.type="throw",o.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function c(t,e,n,r,a,i,o){try{var c=t[i](o),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,a)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){c(i,r,a,o,s,"next",t)}function s(t){c(i,r,a,o,s,"throw",t)}o(void 0)}))}}function u(){return(u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function p(t,e){var n,r;t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n=t,r=e,(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(n,r)}function l(t,e){return e||(e=t.slice(0)),t.raw=e,t}var f=function(){return e.passThroughInterceptor};(exports.Environment||(exports.Environment={})).Production="production";var d={timeout:0,environment:exports.Environment.Production},h={maxNumberOfRetries:0,retryOnTimeout:!0,retryInterval:1,maximumRetryWaitTime:0,backoffFactor:2,httpStatusCodesToRetry:[408,413,429,500,502,503,504,521,522,524],httpMethodsToRetry:["GET","PUT"]},y=function(){function t(){}var e=t.prototype;return e.xmlSerialize=function(t,e){throw new Error("XML serialization is not available.")},e.xmlDeserialize=function(t,e){throw new Error("XML deserialization is not available.")},t}(),m=function(){function t(t){var n,r,a,i,c,p,l,m,A,T,z,w,k=this;this._config=u({},d,t),this._retryConfig=u({},h,null==(n=this._config.httpClientOptions)?void 0:n.retryConfig),this._timeout=void 0!==(null==(r=this._config.httpClientOptions)?void 0:r.timeout)?this._config.httpClientOptions.timeout:this._config.timeout,this._requestBuilderFactory=(c=function(t){return function(t,e){if(void 0===t&&(t="server 1"),e.environment===exports.Environment.Production){if("server 1"===t)return"https://api-nomatls.apicentre.middleware.co.nz";if("server 2"===t)return"https://obabank.glueware.dev"}throw new Error("Could not get Base URL. Invalid environment or server.")}(t,k._config)},p=f,l=new e.HttpClient({timeout:this._timeout,clientConfigOverrides:this._config.unstable_httpClientOptions,httpAgent:null==(a=this._config.httpClientOptions)?void 0:a.httpAgent,httpsAgent:null==(i=this._config.httpClientOptions)?void 0:i.httpsAgent}),m=[v,b],A=new y,T=this._retryConfig,z=e.createRequestBuilderFactory((w=l,function(){var t=s(o().mark((function t(e,n){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.executeRequest(e,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),c,e.ApiError,p,A,T),g.apply(void 0,[z].concat(m)))}var n=t.prototype;return n.getRequestBuilderFactory=function(){return this._requestBuilderFactory},n.withConfiguration=function(e){return new t(u({},this._config,e))},t}();function g(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){var e=t.apply(void 0,arguments);return n.forEach((function(t){return t(e)})),e}}function v(t){t.defaultToError(e.ApiError)}function b(t){t.header("user-agent","APIMATIC 3.0")}(exports.ContentType2Enum||(exports.ContentType2Enum={})).EnumApplicationjson="application/json";var A=n.stringEnum(exports.ContentType2Enum);(exports.ContentTypeEnum||(exports.ContentTypeEnum={})).EnumApplicationxwwwformurlencoded="application/x-www-form-urlencoded";var T=n.stringEnum(exports.ContentTypeEnum),z=n.object({tokenType:["token_type",n.string()],expiresIn:["expires_in",n.number()],refreshToken:["refresh_token",n.string()],accessToken:["access_token",n.string()]});function w(t,e,n){return r.sign(n,t,{algorithm:"PS512",keyid:{alg:"PS512",kid:e,typ:"JWT"}.kid})}var k,C,D,x,j,I,N,S,P,R,E,_,L,O,q=function(t){this.createRequest=t.getRequestBuilderFactory()},M=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var r=e.prototype;return r.initiateAuthorizationCodeGrant=function(t,e,n,r,o){var c=a.v4(),s=a.v4(),u={method:"GET",url:"https://api-nomatls.apicentre.middleware.co.nz/oauth/v2.0/authorize?scope=openid accounts&response_type=code id_token&client_id="+t+"&redirect_uri="+e+"&state="+c+"&nonce="+s+"&request="+w(n,r,{iss:t,client_id:t,response_type:"code id_token",scope:"openid accounts",redirect_uri:e,aud:"https://api-nomatls.apicentre.middleware.co.nz/oauth/v2.0",state:c,nonce:s,iat:Math.floor(Date.now()/1e3)-120,exp:Math.floor(Date.now()/1e3)+3599,claims:{id_token:{ConsentId:{value:o,essential:!0},acr:{value:"urn:openbanking:nz:ca",essential:!0}}}}),followRedirect:!1};return new Promise((function(t,e){i(u,(function(n,r){if(n)return e(n),n;t(r.headers.location)}))}))},r.followRedirectToMiddlewareBankSLoginPage=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=this.createRequest("GET","/auth/login")).baseUrl("server 2"),c=i.prepareArgs({contentType:[e,A],obaRequest:[r,n.string()]}),i.header("Content-Type",c.contentType),i.query("oba_request",c.obaRequest),i.authenticate(!1),t.abrupt("return",i.callAsText(a));case 7:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.authenticateCustomerToMiddlewareBank=function(){var t=s(o().mark((function t(e,r,a,i,c){var s,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(s=this.createRequest("POST","/mwnz-bank/v2.0/login")).baseUrl("server 2"),u=s.prepareArgs({contentType:[e,T],username:[r,n.string()],password:[a,n.string()],obaRequest:[i,n.string()]}),s.header("Content-Type",u.contentType),s.form({username:u.username,password:u.password,oba_request:u.obaRequest}),s.authenticate(!1),t.abrupt("return",s.call(c));case 7:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a,i){return t.apply(this,arguments)}}(),r.followRedirectToMiddlewareBankSConsentPage=function(){var t=s(o().mark((function t(e,r,a,i){var c,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(c=this.createRequest("GET","/auth/consent")).baseUrl("server 2"),s=c.prepareArgs({contentType:[e,T],obaRequest:[r,n.string()],cookie:[a,n.string()]}),c.header("Content-Type",s.contentType),c.header("Cookie",s.cookie),c.query("oba_request",s.obaRequest),c.authenticate(!1),t.abrupt("return",c.callAsText(i));case 8:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a){return t.apply(this,arguments)}}(),r.postConsentedAccountsArray=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=this.createRequest("POST","/mwnz-bank/v2.0/consent")).baseUrl("server 2"),c=i.prepareArgs({cookie:[e,n.string()],body:[r,n.string()]}),i.header("Cookie",c.cookie),i.header("Content-Type","application/x-www-form-urlencoded"),i.text(c.body),i.authenticate(!1),t.abrupt("return",i.call(a));case 8:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.exchangeAuthorizationCode=function(){var t=s(o().mark((function t(e,r,a,i,c,s){var u,p,l,f;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(u=this.createRequest("POST","/oauth/v2.0/token")).baseUrl("server 1"),p={sub:e,aud:"https://api-nomatls.apicentre.middleware.co.nz/oauth/v2.0/token",iss:e,exp:Math.floor(Date.now()/1e3)+3599,iat:Math.floor(Date.now()/1e3)-120,jti:"9OyL2boCICsjI4wM4CKTlw"},l=w(r,a,p),f=u.prepareArgs({grantType:["authorization_code",n.string()],code:[c,n.string()],redirectUri:[i,n.string()],clientAssertion:[l,n.string()],clientAssertionType:["urn:ietf:params:oauth:client-assertion-type:jwt-bearer",n.string()]}),u.header("Content-Type","application/x-www-form-urlencoded"),u.form({grant_type:f.grantType,code:f.code,redirect_uri:f.redirectUri,client_assertion:f.clientAssertion,client_assertion_type:f.clientAssertionType}),u.authenticate(!1),t.abrupt("return",u.callAsJson(z,s));case 12:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a,i,o){return t.apply(this,arguments)}}(),e}(q),B=n.object({amount:["Amount",n.string()],currency:["Currency",n.string()]}),G=n.object({amount:["Amount",n.lazy((function(){return B}))],creditDebitIndicator:["CreditDebitIndicator",n.string()],type:["Type",n.string()]}),Z=n.object({code:["Code",n.string()],subCode:["SubCode",n.string()]}),F=n.object({cardSchemeName:["CardSchemeName",n.string()],name:["Name",n.string()],authorisationType:["AuthorisationType",n.string()],identification:["Identification",n.string()]}),J=n.object({schemeName:["SchemeName",n.string()],identification:["Identification",n.string()],name:["Name",n.string()]}),U=n.object({schemeName:["SchemeName",n.string()],identification:["Identification",n.string()]}),V=n.object({schemeName:["SchemeName",n.string()],identification:["Identification",n.string()],name:["Name",n.string()]}),W=n.object({schemeName:["SchemeName",n.string()],identification:["Identification",n.string()]}),Y=n.object({merchantName:["MerchantName",n.string()],merchantCategoryCode:["MerchantCategoryCode",n.string()]}),X=n.object({code:["Code",n.string()],issuer:["Issuer",n.string()]}),H=n.object({particulars:["Particulars",n.string()],code:["Code",n.string()],reference:["Reference",n.string()]}),K=n.object({particulars:["Particulars",n.string()],code:["Code",n.string()],reference:["Reference",n.string()]}),Q=n.object({creditorName:["CreditorName",n.string()],debtorName:["DebtorName",n.string()],creditorReference:["CreditorReference",n.lazy((function(){return H}))],debtorReference:["DebtorReference",n.lazy((function(){return K}))]}),$=n.object({accountId:["AccountId",n.string()],amount:["Amount",n.lazy((function(){return B}))],creditDebitIndicator:["CreditDebitIndicator",n.string()],bookingDateTime:["BookingDateTime",n.string()],status:["Status",n.string()],statementReference:["StatementReference",n.array(n.string())],transactionReference:["TransactionReference",n.lazy((function(){return Q}))],transactionId:["TransactionId",n.string()],bankTransactionCode:["BankTransactionCode",n.lazy((function(){return Z}))],proprietaryBankTransactionCode:["ProprietaryBankTransactionCode",n.lazy((function(){return X}))],valueDateTime:["ValueDateTime",n.string()],transactionInformation:["TransactionInformation",n.string()],balance:["Balance",n.lazy((function(){return G}))],merchantDetails:["MerchantDetails",n.lazy((function(){return Y}))],creditorAgent:["CreditorAgent",n.lazy((function(){return U}))],creditorAccount:["CreditorAccount",n.lazy((function(){return J}))],debtorAgent:["DebtorAgent",n.lazy((function(){return W}))],debtorAccount:["DebtorAccount",n.lazy((function(){return V}))],cardInstrument:["CardInstrument",n.optional(n.lazy((function(){return F})))]}),tt=n.object({transaction:["Transaction",n.array(n.lazy((function(){return $})))]}),et=n.object({self:["Self",n.string()]}),nt=n.object({totalPages:["TotalPages",n.number()]}),rt=n.object({data:["Data",n.lazy((function(){return tt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),at=n.object({schemeName:["SchemeName",n.string()],identification:["Identification",n.string()],name:["Name",n.string()],secondaryIdentification:["SecondaryIdentification",n.string()]}),it=n.object({accountId:["AccountId",n.string()],currency:["Currency",n.string()],nickname:["Nickname",n.string()],description:["Description",n.string()],accountType:["AccountType",n.string()],accountSubType:["AccountSubType",n.string()],account:["Account",n.lazy((function(){return at}))]}),ot=n.object({account:["Account",n.array(n.lazy((function(){return it})))]}),ct=n.object({data:["Data",n.lazy((function(){return ot}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),st=n.object({accountId:["AccountId",n.string()],type:["Type",n.string()],amount:["Amount",n.lazy((function(){return B}))],creditLine:["CreditLine",n.array(n.string())],dateTime:["DateTime",n.string()],creditDebitIndicator:["CreditDebitIndicator",n.string()]}),ut=n.object({balance:["Balance",n.array(n.lazy((function(){return st})))]}),pt=n.object({data:["Data",n.lazy((function(){return ut}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),lt=n.object({schemeName:["SchemeName",n.string()],identification:["Identification",n.string()],name:["Name",n.string()],secondaryIdentification:["SecondaryIdentification",n.string()]}),ft=n.object({country:["Country",n.string()],addressLine:["AddressLine",n.array(n.string())],addressType:["AddressType",n.string()],streetName:["StreetName",n.string()],buildingNumber:["BuildingNumber",n.string()],postCode:["PostCode",n.string()],townName:["TownName",n.string()],countrySubDivision:["CountrySubDivision",n.string()]}),dt=n.object({schemeName:["SchemeName",n.string()],identification:["Identification",n.string()],name:["Name",n.string()],postalAddress:["PostalAddress",n.lazy((function(){return ft}))]}),ht=n.object({creditorName:["CreditorName",n.string()],debtorName:["DebtorName",n.string()],creditorReference:["CreditorReference",n.lazy((function(){return H}))],debtorReference:["DebtorReference",n.lazy((function(){return K}))]}),yt=n.object({accountId:["AccountId",n.string()],beneficiaryId:["BeneficiaryId",n.string()],reference:["Reference",n.lazy((function(){return ht}))],creditorAgent:["CreditorAgent",n.lazy((function(){return dt}))],creditorAccount:["CreditorAccount",n.lazy((function(){return lt}))]}),mt=n.object({beneficiary:["Beneficiary",n.array(n.lazy((function(){return yt})))]}),gt=n.object({data:["Data",n.lazy((function(){return mt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),vt=n.object({amount:["Amount",n.string()],currency:["Currency",n.string()]}),bt=n.object({accountId:["AccountId",n.string()],mandateIdentification:["MandateIdentification",n.string()],name:["Name",n.string()],directDebitId:["DirectDebitId",n.string()],directDebitStatusCode:["DirectDebitStatusCode",n.string()],previousPaymentAmount:["PreviousPaymentAmount",n.lazy((function(){return vt}))],previousPaymentDateTime:["PreviousPaymentDateTime",n.string()]}),At=n.object({directDebit:["DirectDebit",n.array(n.lazy((function(){return bt})))]}),Tt=n.object({data:["Data",n.lazy((function(){return At}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),zt=n.object({amount:["Amount",n.string()],currency:["Currency",n.string()]}),wt=n.object({accountId:["AccountId",n.string()],offerId:["OfferId",n.string()],offerType:["OfferType",n.string()],description:["Description",n.string()],startDateTime:["StartDateTime",n.string()],endDateTime:["EndDateTime",n.string()],amount:["Amount",n.optional(n.lazy((function(){return B})))],fee:["Fee",n.optional(n.lazy((function(){return zt})))],value:["Value",n.optional(n.number())],term:["Term",n.optional(n.string())],rate:["Rate",n.optional(n.string())]}),kt=n.object({offer:["Offer",n.array(n.lazy((function(){return wt})))]}),Ct=n.object({data:["Data",n.lazy((function(){return kt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),Dt=n.object({country:["Country",n.string()],addressLine:["AddressLine",n.array(n.string())],addressType:["AddressType",n.string()],streetName:["StreetName",n.optional(n.string())],buildingNumber:["BuildingNumber",n.optional(n.string())],postCode:["PostCode",n.string()],townName:["TownName",n.string()],countrySubDivision:["CountrySubDivision",n.optional(n.string())]}),xt=n.object({partyId:["PartyId",n.string()],partyNumber:["PartyNumber",n.string()],partyType:["PartyType",n.string()],name:["Name",n.string()],emailAddress:["EmailAddress",n.string()],phone:["Phone",n.string()],mobile:["Mobile",n.string()],address:["Address",n.array(n.lazy((function(){return Dt})))]}),jt=n.object({party:["Party",n.lazy((function(){return xt}))]}),It=n.object({data:["Data",n.lazy((function(){return jt}))],meta:["Meta",n.unknown()],links:["Links",n.lazy((function(){return et}))]}),Nt=n.object({amount:["Amount",n.string()],currency:["Currency",n.string()]}),St=n.object({accountId:["AccountId",n.string()],scheduledType:["ScheduledType",n.string()],instructedAmount:["InstructedAmount",n.lazy((function(){return Nt}))],scheduledPaymentDateTime:["ScheduledPaymentDateTime",n.string()],scheduledPaymentId:["ScheduledPaymentId",n.string()],reference:["Reference",n.lazy((function(){return ht}))],creditorAccount:["CreditorAccount",n.lazy((function(){return J}))],creditorAgent:["CreditorAgent",n.lazy((function(){return U}))]}),Pt=n.object({scheduledPayment:["ScheduledPayment",n.array(n.lazy((function(){return St})))]}),Rt=n.object({data:["Data",n.lazy((function(){return Pt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),Et=n.object({amount:["Amount",n.string()],currency:["Currency",n.string()]}),_t=n.object({amount:["Amount",n.string()],currency:["Currency",n.string()]}),Lt=n.object({amount:["Amount",n.string()],currency:["Currency",n.string()]}),Ot=n.object({accountId:["AccountId",n.string()],frequency:["Frequency",n.string()],nextPaymentDateTime:["NextPaymentDateTime",n.string()],nextPaymentAmount:["NextPaymentAmount",n.lazy((function(){return Lt}))],standingOrderId:["StandingOrderId",n.string()],reference:["Reference",n.lazy((function(){return ht}))],firstPaymentAmount:["FirstPaymentAmount",n.lazy((function(){return _t}))],finalPaymentAmount:["FinalPaymentAmount",n.lazy((function(){return Et}))],firstPaymentDateTime:["FirstPaymentDateTime",n.string()],finalPaymentDateTime:["FinalPaymentDateTime",n.string()],creditorAccount:["CreditorAccount",n.lazy((function(){return J}))],creditorAgent:["CreditorAgent",n.lazy((function(){return U}))]}),qt=n.object({standingOrder:["StandingOrder",n.array(n.lazy((function(){return Ot})))]}),Mt=n.object({data:["Data",n.lazy((function(){return qt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),Bt=n.object({creditDebitIndicator:["CreditDebitIndicator",n.string()],type:["Type",n.string()],amount:["Amount",n.lazy((function(){return B}))]}),Gt=n.object({accountId:["AccountId",n.string()],startDateTime:["StartDateTime",n.string()],endDateTime:["EndDateTime",n.string()],creationDateTime:["CreationDateTime",n.string()],type:["Type",n.string()],statementId:["StatementId",n.string()],statementDescription:["StatementDescription",n.array(n.string())],statementBenefit:["StatementBenefit",n.array(n.string())],statementFee:["StatementFee",n.array(n.string())],statementInterest:["StatementInterest",n.array(n.string())],statementDateTime:["StatementDateTime",n.array(n.string())],statementRate:["StatementRate",n.array(n.string())],statementValue:["StatementValue",n.array(n.string())],statementAmount:["StatementAmount",n.array(n.lazy((function(){return Bt})))]}),Zt=n.object({statement:["Statement",n.array(n.lazy((function(){return Gt})))]}),Ft=n.object({data:["Data",n.lazy((function(){return Zt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),Jt=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var r=e.prototype;return r.retrieveConsentedAccountsInformation=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/accounts"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(ct,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkBalances=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/balances"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(pt,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkBeneficiaries=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/beneficiaries"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(gt,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkDirectDebits=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/direct-debits"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(Tt,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkOffers=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/offers"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(Ct,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveAuthorisingParty=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/party"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(It,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkScheduledPayments=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/scheduled-payments"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(Rt,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkStandingOrders=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/standing-orders"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(Mt,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkStatements=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/statements"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(Ft,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),r.retrieveBulkTransactions=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET","/open-banking-nz/v2.3/transactions"),i=a.prepareArgs({authorization:[e,n.string()]}),a.header("Authorization",i.authorization),t.abrupt("return",a.callAsJson(rt,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),e}(q),Ut=n.object({transactionToDateTime:["TransactionToDateTime",n.string()],expirationDateTime:["ExpirationDateTime",n.string()],permissions:["Permissions",n.array(n.string())],transactionFromDateTime:["TransactionFromDateTime",n.string()]}),Vt=n.object({consent:["Consent",n.lazy((function(){return Ut}))],status:["Status",n.string()],statusUpdateDateTime:["StatusUpdateDateTime",n.string()],creationDateTime:["CreationDateTime",n.string()],consentId:["ConsentId",n.string()]}),Wt=n.object({addressLine:["AddressLine",n.array(n.string())],streetName:["StreetName",n.string()],buildingNumber:["BuildingNumber",n.string()],postCode:["PostCode",n.string()],townName:["TownName",n.string()],countrySubDivision:["CountrySubDivision",n.string()],country:["Country",n.string()]}),Yt=n.object({latitude:["Latitude",n.string()],longitude:["Longitude",n.string()]}),Xt=n.object({endUserAppName:["EndUserAppName",n.string()],endUserAppVersion:["EndUserAppVersion",n.string()],paymentContextCode:["PaymentContextCode",n.string()],merchantName:["MerchantName",n.string()],merchantNZBN:["MerchantNZBN",n.string()],merchantCategoryCode:["MerchantCategoryCode",n.string()],merchantCustomerIdentification:["MerchantCustomerIdentification",n.string()],geoLocation:["GeoLocation",n.lazy((function(){return Yt}))],deliveryAddress:["DeliveryAddress",n.lazy((function(){return Wt}))]}),Ht=n.object({data:["Data",n.lazy((function(){return Vt}))],risk:["Risk",n.lazy((function(){return Xt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.unknown()]}),Kt=function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.prototype.checkAccountAccessConsentStatus=function(){var t=s(o().mark((function t(e,r){var a,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.createRequest("GET"),i=a.prepareArgs({pNZTACAccountAccessConsentId:[e,n.string()]}),a.appendTemplatePath(k||(k=l(["/open-banking-nz/v2.3/account-access-consents/",""])),i.pNZTACAccountAccessConsentId),t.abrupt("return",a.callAsJson(Ht,r));case 4:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),e}(q),Qt=function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.prototype.refreshAccessToken=function(){var t=s(o().mark((function t(e,r,i,c,s){var u,p,l,f;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=this.createRequest("POST","/oauth/v2.0/token"),p={sub:e,aud:"https://api-nomatls.apicentre.middleware.co.nz/oauth/v2.0/token",iss:e,exp:Math.floor(Date.now()/1e3)+2e3,iat:Math.floor(Date.now()/1e3)-120,jti:a.v4()},l=w(r,i,p),f=u.prepareArgs({grantType:["refresh_token",n.string()],refreshToken:[c,n.string()],scope:["openid accounts",n.string()],clientAssertionType:["urn:ietf:params:oauth:client-assertion-type:jwt-bearer",n.string()],clientAssertion:[l,n.string()]}),u.header("content-type","application/x-www-form-urlencoded"),u.form({grant_type:f.grantType,refresh_token:f.refreshToken,scope:f.scope,client_assertion_type:f.clientAssertionType,client_assertion:f.clientAssertion}),t.abrupt("return",u.callAsJson(z,s));case 10:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a,i){return t.apply(this,arguments)}}(),e}(q),$t=n.object({tokenType:["token_type",n.string()],expiresIn:["expires_in",n.number()],accessToken:["access_token",n.string()]}),te=n.object({data:["Data",n.lazy((function(){return Vt}))],risk:["Risk",n.lazy((function(){return Xt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.unknown()]}),ee=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var r=e.prototype;return r.initiateClientCredentialsGrant=function(){var t=s(o().mark((function t(e,r,i,c){var s,u,p,l;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(s=this.createRequest("POST","/oauth/v2.0/token")).baseUrl("server 1"),u={sub:e,aud:"https://api-nomatls.apicentre.middleware.co.nz/oauth/v2.0/token",iss:e,exp:Math.floor(Date.now()/1e3)+3599,iat:Math.floor(Date.now()/1e3)-120,jti:a.v4()},p=w(r,i,u),l=s.prepareArgs({contentType:["application/x-www-form-urlencoded",T],grantType:["client_credentials",n.string()],scope:["openid accounts",n.string()],clientAssertion:[p,n.string()],clientAssertionType:["urn:ietf:params:oauth:client-assertion-type:jwt-bearer",n.string()]}),s.header("Content-Type",l.contentType),s.form({grant_type:l.grantType,scope:l.scope,client_assertion:l.clientAssertion,client_assertion_type:l.clientAssertionType}),t.abrupt("return",s.callAsJson($t,c));case 12:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a){return t.apply(this,arguments)}}(),r.createAccountAccessConsent=function(){var t=s(o().mark((function t(e,r){var a,i,c,s,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(a=this.createRequest("POST","/open-banking-nz/v2.3/account-access-consents")).baseUrl("server 1"),(i=new Date).setDate(i.getDate()+2),c='"'+i.toISOString()+'"',s='{\n "Data": {\n "Consent": {\n "TransactionToDateTime": "2025-05-08T00:00:00-00:00",\n "ExpirationDateTime": '+c+',\n "Permissions": [\n "ReadAccountsDetail",\n "ReadBalances",\n "ReadBeneficiariesDetail",\n "ReadDirectDebits",\n "ReadParty",\n "ReadPartyAuthUser",\n "ReadOffers",\n "ReadScheduledPaymentsDetail",\n "ReadStandingOrdersDetail",\n "ReadStatementsBasic",\n "ReadStatementsDetail",\n "ReadTransactionsDetail",\n "ReadTransactionsCredits",\n "ReadTransactionsDebits"\n ],\n "TransactionFromDateTime": "2012-05-03T00:00:00-00:00"\n }\n },\n "Risk": {\n "EndUserAppName": "This is an app name that is long",\n "EndUserAppVersion": "App Version3.0",\n "PaymentContextCode": "EcommerceServices",\n "MerchantName": "This is a merchant name that is long",\n "MerchantNZBN": "This is an NZBN number",\n "MerchantCategoryCode": "5967",\n "MerchantCustomerIdentification": "This is a special customer identifier",\n "GeoLocation": {\n "Latitude": "45.516136",\n "Longitude": "-73.656830"\n },\n "DeliveryAddress": {\n "AddressLine": [\n "This is address line 1"\n ],\n "StreetName": "Main Street",\n "BuildingNumber": "12345",\n "PostCode": "12345",\n "TownName": "Some Town",\n "CountrySubDivision": "Some Subdivision",\n "Country": "CA"\n }\n }\n }',u=a.prepareArgs({accept:["application/json",n.string()],body:[s,n.string()],authorization:[e,n.string()]}),a.header("Accept",u.accept),a.header("Content-Type","application/json"),a.header("authorization",u.authorization),a.text(u.body),t.abrupt("return",a.callAsJson(te,r));case 13:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),e}(q),ne=n.object({data:["Data",n.lazy((function(){return Zt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),re=n.object({account:["Account",n.lazy((function(){return it}))]}),ae=n.object({data:["Data",n.lazy((function(){return re}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.unknown()]}),ie=n.object({data:["Data",n.lazy((function(){return ut}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),oe=n.object({data:["Data",n.lazy((function(){return mt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),ce=n.object({data:["Data",n.lazy((function(){return At}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),se=n.object({data:["Data",n.lazy((function(){return kt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),ue=n.object({data:["Data",n.lazy((function(){return jt}))],meta:["Meta",n.unknown()],links:["Links",n.lazy((function(){return et}))]}),pe=n.object({data:["Data",n.lazy((function(){return Pt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),le=n.object({data:["Data",n.lazy((function(){return qt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),fe=n.object({data:["Data",n.lazy((function(){return tt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),de=n.object({statement:["Statement",n.lazy((function(){return Gt}))]}),he=n.object({data:["Data",n.lazy((function(){return de}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.unknown()]}),ye=n.object({data:["Data",n.lazy((function(){return tt}))],links:["Links",n.lazy((function(){return et}))],meta:["Meta",n.lazy((function(){return nt}))]}),me=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var r=e.prototype;return r.retrieveAnAccount=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(C||(C=l(["/open-banking-nz/v2.3/accounts/",""])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(ae,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountBalance=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(D||(D=l(["/open-banking-nz/v2.3/accounts/","/balances"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(ie,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountBeneficiaries=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(x||(x=l(["/open-banking-nz/v2.3/accounts/","/beneficiaries"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(oe,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountDirectDebits=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(j||(j=l(["/open-banking-nz/v2.3/accounts/","/direct-debits"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(ce,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountOffers=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(I||(I=l(["/open-banking-nz/v2.3/accounts/","/offers"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(se,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountParty=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(N||(N=l(["/open-banking-nz/v2.3/accounts/","/party"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(ue,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountScheduledPayments=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(S||(S=l(["/open-banking-nz/v2.3/accounts/","/scheduled-payments"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(pe,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountStandingOrders=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(P||(P=l(["/open-banking-nz/v2.3/accounts/","/standing-orders"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(le,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountTransactions=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(R||(R=l(["/open-banking-nz/v2.3/accounts/","/transactions"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(fe,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveAccountStatements=function(){var t=s(o().mark((function t(e,r,a){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createRequest("GET"),c=i.prepareArgs({pNZTACAccountId:[e,n.string()],authorization:[r,n.string()]}),i.header("Authorization",c.authorization),i.appendTemplatePath(E||(E=l(["/open-banking-nz/v2.3/accounts/","/statements"])),c.pNZTACAccountId),t.abrupt("return",i.callAsJson(ne,a));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}(),r.retrieveStatement=function(){var t=s(o().mark((function t(e,r,a,i){var c,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=this.createRequest("GET"),s=c.prepareArgs({pNZTACAccountId:[e,n.string()],pNZTACStatementId:[r,n.string()],authorization:[a,n.string()]}),c.header("Authorization",s.authorization),c.appendTemplatePath(_||(_=l(["/open-banking-nz/v2.3/accounts/","/statements/",""])),s.pNZTACAccountId,s.pNZTACStatementId),t.abrupt("return",c.callAsJson(he,i));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a){return t.apply(this,arguments)}}(),r.retrieveStatementFile=function(){var t=s(o().mark((function t(e,r,a,i,c){var s,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=this.createRequest("GET"),u=s.prepareArgs({accept:[e,n.string()],pNZTACAccountId:[r,n.string()],pNZTACStatementId:[a,n.string()],authorization:[i,n.string()]}),s.header("Accept",u.accept),s.header("Authorization",u.authorization),s.appendTemplatePath(L||(L=l(["/open-banking-nz/v2.3/accounts/","/statements/","/file"])),u.pNZTACAccountId,u.pNZTACStatementId),t.abrupt("return",s.callAsText(c));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a,i){return t.apply(this,arguments)}}(),r.retrieveTransactionsForSpecificStatement=function(){var t=s(o().mark((function t(e,r,a,i){var c,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=this.createRequest("GET"),s=c.prepareArgs({pNZTACAccountId:[e,n.string()],pNZTACStatementId:[r,n.string()],authorization:[a,n.string()]}),c.header("Authorization",s.authorization),c.appendTemplatePath(O||(O=l(["/open-banking-nz/v2.3/accounts/","/statements/","/transactions"])),s.pNZTACAccountId,s.pNZTACStatementId),t.abrupt("return",c.callAsJson(ye,i));case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r,a){return t.apply(this,arguments)}}(),e}(q);Object.defineProperty(exports,"AbortError",{enumerable:!0,get:function(){return e.AbortError}}),Object.defineProperty(exports,"ApiError",{enumerable:!0,get:function(){return e.ApiError}}),Object.defineProperty(exports,"ArgumentsValidationError",{enumerable:!0,get:function(){return e.ArgumentsValidationError}}),Object.defineProperty(exports,"FileWrapper",{enumerable:!0,get:function(){return e.FileWrapper}}),Object.defineProperty(exports,"ResponseValidationError",{enumerable:!0,get:function(){return e.ResponseValidationError}}),Object.defineProperty(exports,"cloneFileWrapper",{enumerable:!0,get:function(){return e.cloneFileWrapper}}),Object.defineProperty(exports,"isFileWrapper",{enumerable:!0,get:function(){return e.isFileWrapper}}),exports.AuthorizeConsentController=M,exports.BulkEndpointsController=Jt,exports.Client=m,exports.ClientAssertionJWT=w,exports.ConsentStatusController=Kt,exports.DEFAULT_CONFIGURATION=d,exports.DEFAULT_RETRY_CONFIG=h,exports.RefreshTokenController=Qt,exports.SetupAccountAccessConsentsResourceController=ee,exports.SpecificAccountEndpointsController=me;
//# sourceMappingURL=pnz-apicentre-sandbox-sdk.cjs.production.min.js.map