UNPKG

74.2 kBJavaScriptView Raw
1import t from"ky-universal";import e from"form-data";import{decamelizeKeys as o,camelizeKeys as n}from"xcase";import{stringify as r}from"query-string";import{Agent as s}from"https";import p from"li";
2/*! *****************************************************************************
3Copyright (c) Microsoft Corporation. All rights reserved.
4Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5this file except in compliance with the License. You may obtain a copy of the
6License at http://www.apache.org/licenses/LICENSE-2.0
7
8THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11MERCHANTABLITY OR NON-INFRINGEMENT.
12
13See the Apache Version 2.0 License for specific language governing permissions
14and limitations under the License.
15***************************************************************************** */var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function u(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var c=function(){return(c=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]])}return o}function m(t,e,o,n){return new(o||(o=Promise))((function(r,s){function p(t){try{u(n.next(t))}catch(t){s(t)}}function i(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){t.done?r(t.value):new o((function(e){e(t.value)})).then(p,i)}u((n=n.apply(t,e||[])).next())}))}function d(t,e){var o,n,r,s,p={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(s){return function(i){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;p;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return p.label++,{value:s[1],done:!1};case 5:p.label++,n=s[1],s=[0];continue;case 7:s=p.ops.pop(),p.trys.pop();continue;default:if(!(r=(r=p.trys).length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){p=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){p.label=s[1];break}if(6===s[0]&&p.label<r[1]){p.label=r[1],r=s;break}if(r&&p.label<r[2]){p.label=r[2],p.ops.push(s);break}r[2]&&p.ops.pop(),p.trys.pop();continue}s=e.call(t,p)}catch(t){s=[6,t],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,i])}}}function l(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,s=o.call(t),p=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)p.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return p}function h(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(l(arguments[e]));return t}var f={};function y(t){return m(this,void 0,void 0,(function(){var e,o,n;return d(this,(function(r){switch(r.label){case 0:switch(e=t.headers.get("content-type")||"",e){case"application/json":return[3,1];case"application/octet-stream":case"binary/octet-stream":case"application/gzip":return[3,3]}return[3,6];case 1:return[4,t.json()];case 2:return[2,r.sent()||{}];case 3:return[4,t.blob()];case 4:return o=r.sent(),[4,new Response(o).arrayBuffer()];case 5:return n=r.sent(),[2,Buffer.from(n)];case 6:return[4,t.text()];case 7:return[2,r.sent()||""]}}))}))}["get","post","put","delete","stream"].forEach((function(n){f[n]=function(p,i,u){return m(this,void 0,void 0,(function(){var a,m,f,v,g,I;return d(this,(function(d){switch(d.label){case 0:a=function(t,n){var p,i=n.body,u=n.query,c=n.sudo,a=n.method,m=new Headers(t.headers),d=i;return c&&m.append("sudo",""+c),"object"!=typeof i||i instanceof e||(d=JSON.stringify(o(i)),m.append("content-type","application/json")),t.url.includes("https")&&(p=new s({rejectUnauthorized:t.rejectUnauthorized})),{headers:m,agent:p,timeout:t.requestTimeout,method:"stream"===a?"get":a,onProgress:"stream"===a?function(){}:void 0,searchParams:r(o(u||{}),{arrayFormat:"bracket"}),prefixUrl:t.url,body:d}}(p,c(c({},u),{method:n})),d.label=1;case 1:return d.trys.push([1,3,,6]),[4,t(i,a)];case 2:return m=d.sent(),[3,6];case 3:return(f=d.sent()).response?[4,f.response.json()]:[3,5];case 4:v=d.sent(),f.description=v.error||v.message,d.label=5;case 5:throw f;case 6:return g=m.status,I=function(t){var e={};return h(t.headers.entries()).forEach((function(t){var o=l(t,2),n=o[0],r=o[1];e[n]=r})),e}(m),[4,y(m)];case 7:return[2,{body:d.sent(),headers:I,status:g}]}}))}))}}));var v=function(t){var e=void 0===t?{}:t,o=e.token,n=e.jobToken,r=e.oauthToken,s=e.sudo,p=e.profileToken,i=e.profileMode,u=void 0===i?"execution":i,c=e.host,a=void 0===c?"https://gitlab.com":c,m=e.url,d=void 0===m?"":m,l=e.version,h=void 0===l?4:l,y=e.camelize,v=void 0!==y&&y,g=e.rejectUnauthorized,I=void 0===g||g,R=e.requester,U=void 0===R?f:R,C=e.requestTimeout,j=void 0===C?3e5:C;this.url=[a,"api","v"+h,d].join("/"),this.headers={},this.rejectUnauthorized=I,this.camelize=v,this.requester=U,this.requestTimeout=j,r?this.headers.authorization="Bearer "+r:n?this.headers["job-token"]=n:o&&(this.headers["private-token"]=o),p&&(this.headers["X-Profile-Token"]=p,u&&(this.headers["X-Profile-Mode"]=u)),s&&(this.headers.Sudo=""+s)};function g(t){return function(e){var o=this;Object.entries(t||{}).forEach((function(t){var n=l(t,2),r=n[0],s=n[1];o[r]=new s(e)}))}}var I={post:function(t,e,o){return void 0===o&&(o={}),m(this,void 0,void 0,(function(){var n,r,s;return d(this,(function(p){switch(p.label){case 0:return n=o.sudo,r=o.form,s=a(o,["sudo","form"]),[4,t.requester.post(t,e,{body:r||s,sudo:n})];case 1:return[2,p.sent().body]}}))}))},put:function(t,e,o){return void 0===o&&(o={}),m(this,void 0,void 0,(function(){var n,r;return d(this,(function(s){switch(s.label){case 0:return n=o.sudo,r=a(o,["sudo"]),[4,t.requester.put(t,e,{body:r,sudo:n})];case 1:return[2,s.sent().body]}}))}))},get:function t(e,o,r){return void 0===r&&(r={}),m(this,void 0,void 0,(function(){var s,i,u,c,m,l,f,y,v,g,I,R,U;return d(this,(function(d){switch(d.label){case 0:return s=r.showPagination,i=r.maxPages,u=r.sudo,c=a(r,["showPagination","maxPages","sudo"]),[4,e.requester.get(e,o,{query:c||{},sudo:u})];case 1:return m=d.sent(),l=m.headers,f=m.body,y={total:parseInt(l["x-total"],10),next:parseInt(l["x-next-page"],10)||null,current:parseInt(l["x-page"],10)||1,previous:parseInt(l["x-prev-page"],10)||null,perPage:parseInt(l["x-per-page"],10),totalPages:parseInt(l["x-total-pages"],10)},v=!i||y.current<i,e.camelize&&(f=n(f)),!c.page&&v&&y.next?(g=p.parse(l.link).next,I=e.url.split("/").pop()||"",R=new RegExp(".+/api/v\\d(/"+I+")?/"),[4,t(e,g.replace(R,""),{maxPages:i,sudo:u,showPagination:!0})]):[3,3];case 2:U=d.sent(),y=U.pagination,f=h(f,U.data),d.label=3;case 3:return[2,(c.page||f.length>0)&&s?{data:f,pagination:y}:f]}}))}))},del:function(t,e,o){return void 0===o&&(o={}),m(this,void 0,void 0,(function(){var n,r;return d(this,(function(s){switch(s.label){case 0:return n=o.sudo,r=a(o,["sudo"]),[4,t.requester.delete(t,e,{query:r,sudo:n})];case 1:return[2,s.sent().body]}}))}))},stream:function(t,e,o){if(void 0===o&&(o={}),"function"!=typeof t.requester.stream)throw new Error("Stream method is not implementated in requester!");return t.requester.stream(t,e,{query:o})}},R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"groups",t)},e.prototype.create=function(t){return I.post(this,"groups",t)},e.prototype.createLDAPLink=function(t,e,o,n,r){var s=encodeURIComponent(t);return I.post(this,"groups/"+s+"/ldap_group_links",c({cn:e,groupAccess:o,provider:n},r))},e.prototype.edit=function(t,e){var o=encodeURIComponent(t);return I.put(this,"groups/"+o,e)},e.prototype.projects=function(t,e){var o=encodeURIComponent(t);return I.get(this,"groups/"+o+"/projects",e)},e.prototype.remove=function(t,e){var o=encodeURIComponent(t);return I.del(this,"groups/"+o,e)},e.prototype.removeLDAPLink=function(t,e,o){void 0===o&&(o={});var n=o.provider,r=a(o,["provider"]),s=encodeURIComponent(t),p=n?n+"/"+e:""+e;return I.del(this,"groups/"+s+"/ldap_group_links/"+p,r)},e.prototype.search=function(t,e){return I.get(this,"groups",c({search:t},e))},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"groups/"+o,e)},e.prototype.subgroups=function(t,e){var o=encodeURIComponent(t);return I.get(this,"groups/"+o+"/subgroups",e)},e.prototype.syncLDAP=function(t,e){var o=encodeURIComponent(t);return I.post(this,"groups/"+o+"/ldap_sync",e)},e}(v),U=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.all=function(t){var e=encodeURIComponent(t);return I.get(this,e+"/access_requests")},e.prototype.request=function(t){var e=encodeURIComponent(t);return I.post(this,e+"/access_requests")},e.prototype.approve=function(t,e,o){var n=(void 0===o?{}:o).accessLevel,r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,s+"/access_requests/"+p+"/approve",{accessLevel:n})},e.prototype.deny=function(t,e){var o=l([t,e].map(encodeURIComponent),2),n=o[0],r=o[1];return I.del(this,n+"/access_requests/"+r)},e}(v);function C(t,e,o,n,r){var s=l([t,o].map(encodeURIComponent),2),p=[s[0],e,s[1]];return r&&p.push("notes",encodeURIComponent(r)),p.push(encodeURIComponent("award_emoji")),n&&p.push(encodeURIComponent(n)),p.join("/")}var j=function(t){function e(e,o){var n=t.call(this,c({url:"projects"},o))||this;return n.resourceType=e,n}return u(e,t),e.prototype.all=function(t,e,o,n){return I.get(this,C(t,this.resourceType,e,null,o),n)},e.prototype.award=function(t,e,o,n,r){return I.post(this,C(t,this.resourceType,e,null,n),c({name:o},r))},e.prototype.remove=function(t,e,o,n,r){return I.del(this,C(t,this.resourceType,e,o,n),r)},e.prototype.show=function(t,e,o,n,r){return I.get(this,C(t,this.resourceType,e,o,n),r)},e}(v),b=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.add=function(t,e){var o=encodeURIComponent(t);return I.post(this,o+"/badges",e)},e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,o+"/badges",e)},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,r+"/badges/"+s,o)},e.prototype.preview=function(t,e,o,n){var r=encodeURIComponent(t);return I.get(this,r+"/badges/render",c({linkUrl:e,imageUrl:o},n))},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,r+"/badges/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/badges/"+s,o)},e}(v),_=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,o+"/custom_attributes",e)},e.prototype.set=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.put(this,s+"/custom_attributes/"+p,c({value:o},n))},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,r+"/custom_attributes/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/custom_attributes/"+s,o)},e}(v),w=function(t){function e(e,o,n){var r=t.call(this,c({url:e},n))||this;return r.resource2Type=o,r}return u(e,t),e.prototype.addNote=function(t,e,o,n,r,s){if(!r)throw new Error("Missing required content argument");var p=l([t,e,o,n].map(encodeURIComponent),4),i=p[0],u=p[1],a=p[2],m=p[3];return I.post(this,i+"/"+this.resource2Type+"/"+u+"/discussions/"+a+"/notes",c({body:r,noteId:m},s))},e.prototype.all=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/"+this.resource2Type+"/"+s+"/discussions",o)},e.prototype.create=function(t,e,o,n){if(!o)throw new Error("Missing required content argument");var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,s+"/"+this.resource2Type+"/"+p+"/discussions",c({body:o},n))},e.prototype.editNote=function(t,e,o,n,r,s){var p=l([t,e,o,n].map(encodeURIComponent),4),i=p[0],u=p[1],a=p[2],m=p[3];return I.put(this,i+"/"+this.resource2Type+"/"+u+"/discussions/"+a+"/notes/"+m,c({body:r},s))},e.prototype.removeNote=function(t,e,o,n,r){var s=l([t,e,o,n].map(encodeURIComponent),4),p=s[0],i=s[1],u=s[2],c=s[3];return I.del(this,p+"/"+this.resource2Type+"/"+i+"/discussions/"+u+"/notes/"+c,r)},e.prototype.show=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.get(this,s+"/"+this.resource2Type+"/"+p+"/discussions/"+i,n)},e}(v),k=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,o+"/boards",e)},e.prototype.create=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,n+"/boards",c({name:e},o))},e.prototype.createList=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,s+"/boards/"+p+"/lists",c({labelId:o},n))},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,r+"/boards/"+s,o)},e.prototype.editList=function(t,e,o,n,r){var s=l([t,e,o].map(encodeURIComponent),3),p=s[0],i=s[1],u=s[2];return I.put(this,p+"/boards/"+i+"/lists/"+u,c({position:n},r))},e.prototype.lists=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/boards/"+s+"/lists",o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,r+"/boards/"+s,o)},e.prototype.removeList=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.del(this,s+"/boards/"+p+"/lists/"+i,n)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/boards/"+s,o)},e.prototype.showList=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.get(this,s+"/boards/"+p+"/lists/"+i,n)},e}(v),q=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,o+"/labels",e)},e.prototype.create=function(t,e,o,n){var r=encodeURIComponent(t);return I.post(this,r+"/labels",c({name:e,color:o},n))},e.prototype.edit=function(t,e,o){var n=encodeURIComponent(t);return I.put(this,n+"/labels",c({name:e},o))},e.prototype.remove=function(t,e,o){var n=encodeURIComponent(t);return I.del(this,n+"/labels",c({name:e},o))},e.prototype.subscribe=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,r+"/issues/"+s+"/subscribe",o)},e.prototype.unsubscribe=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,r+"/issues/"+s+"/unsubscribe",o)},e}(v),P=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.all=function(t,e){void 0===e&&(e={});var o=e.includeInherited,n=a(e,["includeInherited"]),r=[encodeURIComponent(t),"members"];return o&&r.push("all"),I.get(this,r.join("/"),n)},e.prototype.add=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,s+"/members",c({userId:p,accessLevel:o},n))},e.prototype.edit=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.put(this,s+"/members/"+p,c({accessLevel:o},n))},e.prototype.show=function(t,e,o){void 0===o&&(o={});var n=o.includeInherited,r=a(o,["includeInherited"]),s=l([t,e].map(encodeURIComponent),2),p=s[0],i=s[1],u=[p,"members"];return n&&u.push("all"),u.push(i),I.get(this,u.join("/"),r)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,r+"/members/"+s,o)},e}(v),T=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,o+"/milestones",e)},e.prototype.create=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,n+"/milestones",c({title:e},o))},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,r+"/milestones/"+s,o)},e.prototype.issues=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/milestones/"+s+"/issues",o)},e.prototype.mergeRequests=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/milestones/"+s+"/merge_requests",o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/milestones/"+s,o)},e}(v),S=function(t){function e(e,o,n){var r=t.call(this,c({url:e},n))||this;return r.resource2Type=o,r}return u(e,t),e.prototype.all=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/"+this.resource2Type+"/"+s+"/notes",o)},e.prototype.create=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,s+"/"+this.resource2Type+"/"+p+"/notes",c({body:o},n))},e.prototype.edit=function(t,e,o,n,r){var s=l([t,e,o].map(encodeURIComponent),3),p=s[0],i=s[1],u=s[2];return I.put(this,p+"/"+this.resource2Type+"/"+i+"/notes/"+u,c({body:n},r))},e.prototype.remove=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.del(this,s+"/"+this.resource2Type+"/"+p+"/notes/"+i,n)},e.prototype.show=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.get(this,s+"/"+this.resource2Type+"/"+p+"/notes/"+i,n)},e}(v),x=function(t){function e(e,o){return t.call(this,c({url:["templates",e].join("/")},o))||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"",t)},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.post(this,""+o,e)},e}(v),E=function(t){function e(e,o){return t.call(this,c({url:e},o))||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,o+"/variables",e)},e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,o+"/variables",e)},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,r+"/variables/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,r+"/variables/"+s,o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,r+"/variables/"+s,o)},e}(v),A=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(U),M=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(b),G=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(_),L=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(k),O=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(P),B=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(T),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"groups/"+o+"/projects",e)},e.prototype.add=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"groups/"+r+"/projects/"+s,o)},e}(v),N=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(E),F=function(t){function e(e){return t.call(this,"groups",e)||this}return u(e,t),e}(q),z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"groups/"+o+"/epics",e)},e.prototype.create=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"groups/"+n+"/epics",c({title:e},o))},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"groups/"+r+"/epics/"+s,o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"groups/"+r+"/epics/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"groups/"+r+"/epics/"+s,o)},e}(v),V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"groups/"+r+"/epics/"+s+"/issues",o)},e.prototype.assign=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.post(this,"groups/"+s+"/epics/"+p+"/issues/"+i,n)},e.prototype.edit=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.put(this,"groups/"+s+"/epics/"+p+"/issues/"+i,n)},e.prototype.remove=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.del(this,"groups/"+s+"/epics/"+p+"/issues/"+i,n)},e}(v),K=function(t){function e(e){return t.call(this,"groups","epics",e)||this}return u(e,t),e}(S),J=function(t){function e(e){return t.call(this,"groups","epics",e)||this}return u(e,t),e}(w),H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"users",t)},e.prototype.activities=function(t){return I.get(this,"users/activities",t)},e.prototype.projects=function(t,e){var o=encodeURIComponent(t);return I.get(this,"users/"+o+"/projects",e)},e.prototype.block=function(t,e){var o=encodeURIComponent(t);return I.post(this,"users/"+o+"/block",e)},e.prototype.create=function(t){return I.post(this,"users",t)},e.prototype.current=function(t){return I.get(this,"user",t)},e.prototype.edit=function(t,e){var o=encodeURIComponent(t);return I.put(this,"users/"+o,e)},e.prototype.events=function(t,e){var o=encodeURIComponent(t);return I.get(this,"users/"+o+"/events",e)},e.prototype.search=function(t,e){return I.get(this,"users",c({search:t},e))},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"users/"+o,e)},e.prototype.remove=function(t,e){var o=encodeURIComponent(t);return I.del(this,"users/"+o,e)},e.prototype.unblock=function(t,e){var o=encodeURIComponent(t);return I.post(this,"users/"+o+"/unblock",e)},e}(v),X=function(t){function e(e){return t.call(this,"users",e)||this}return u(e,t),e}(_),W=function(t){return t?"users/"+encodeURIComponent(t)+"/emails":"user/emails"},Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){void 0===t&&(t={});var e=t.userId,o=a(t,["userId"]);return I.get(this,W(e),o)},e.prototype.add=function(t,e){void 0===e&&(e={});var o=e.userId,n=a(e,["userId"]);return I.post(this,W(o),c({email:t},n))},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"user/emails/"+o,e)},e.prototype.remove=function(t,e){void 0===e&&(e={});var o=e.userId,n=a(e,["userId"]),r=encodeURIComponent(t);return I.del(this,W(o)+"/"+r,n)},e}(v),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"users/"+o+"/impersonation_tokens",e)},e.prototype.add=function(t,e,o,n,r){var s=encodeURIComponent(t);return I.post(this,"users/"+s+"/impersonation_tokens",c({name:e,expiresAt:n,scopes:o},r))},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"users/"+r+"/impersonation_tokens/"+s,o)},e.prototype.revoke=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"users/"+r+"/impersonation_tokens/"+s,o)},e}(v),Z=function(t){return t?"users/"+encodeURIComponent(t)+"/keys":"user/keys"},$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){void 0===t&&(t={});var e=t.userId,o=a(t,["userId"]);return I.get(this,Z(e),o)},e.prototype.create=function(t,e,o){void 0===o&&(o={});var n=o.userId,r=a(o,["userId"]);return I.post(this,Z(n),c({title:t,key:e},r))},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"user/keys/"+o,e)},e.prototype.remove=function(t,e){void 0===e&&(e={});var o=e.userId,n=a(e,["userId"]),r=encodeURIComponent(t);return I.del(this,Z(o)+"/"+r,n)},e}(v),tt=function(t){return t?"users/"+encodeURIComponent(t)+"/gpg_keys":"users/gpg_keys"},et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){void 0===t&&(t={});var e=t.userId,o=a(t,["userId"]);return I.get(this,tt(e),o)},e.prototype.add=function(t,e){void 0===e&&(e={});var o=e.userId,n=a(e,["userId"]);return I.post(this,tt(o),c({key:t},n))},e.prototype.show=function(t,e){void 0===e&&(e={});var o=e.userId,n=a(e,["userId"]),r=encodeURIComponent(t);return I.get(this,tt(o)+"/"+r,n)},e.prototype.remove=function(t,e){void 0===e&&(e={});var o=e.userId,n=a(e,["userId"]),r=encodeURIComponent(t);return I.del(this,tt(o)+"/"+r,n)},e}(v),ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/repository/branches",e)},e.prototype.create=function(t,e,o,n){var r,s=encodeURIComponent(t),p=this.url.includes("v3")?"branchName":"branch";return I.post(this,"projects/"+s+"/repository/branches",c(((r={})[p]=e,r.ref=o,r),n))},e.prototype.protect=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/protected_branches",c({name:e},o))},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/repository/branches/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/repository/branches/"+s,o)},e.prototype.unprotect=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/repository/branches/"+s+"/unprotect",o)},e}(v),nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/repository/commits",e)},e.prototype.cherryPick=function(t,e,o,n){var r=encodeURIComponent(t);return I.post(this,"projects/"+r+"/repository/commits/"+e+"/cherry_pick",c({branch:o},n))},e.prototype.comments=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/commits/"+e+"/comments",o)},e.prototype.create=function(t,e,o,n,r){void 0===n&&(n=[]);var s=encodeURIComponent(t);return I.post(this,"projects/"+s+"/repository/commits",c({branch:e,commitMessage:o,actions:n},r))},e.prototype.createComment=function(t,e,o,n){var r=encodeURIComponent(t);return I.post(this,"projects/"+r+"/repository/commits/"+e+"/comments",c({note:o},n))},e.prototype.diff=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/commits/"+e+"/diff",o)},e.prototype.editStatus=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/statuses/"+e,o)},e.prototype.references=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/commits/"+e+"/refs",o)},e.prototype.show=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/commits/"+e,o)},e.prototype.status=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/commits/"+e+"/statuses",o)},e.prototype.mergeRequests=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/commits/"+e+"/merge_requests",o)},e}(v),rt=function(t){function e(e){return t.call(this,"projects","commits",e)||this}return u(e,t),e}(w),st=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.repositories=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/registry/repositories",e)},e.prototype.tags=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/registry/repositories/"+s+"/tags",o)},e.prototype.removeRepository=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/registry/repositories/"+s,o)},e.prototype.removeTag=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.del(this,"projects/"+s+"/registry/repositories/"+p+"/tags/"+i,n)},e.prototype.removeTags=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.del(this,"projects/"+s+"/registry/repositories/"+p+"/tags",c({tagNameRegex:o},n))},e.prototype.showTag=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.get(this,"projects/"+s+"/registry/repositories/"+p+"/tags/"+i,n)},e}(v),pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/deployments",e)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/deployments/"+s,o)},e.prototype.mergeRequests=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/deployments/"+s+"/merge_requests",o)},e}(v),it=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.add=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/deploy_keys",e)},e.prototype.all=function(t){var e,o=t.projectId,n=a(t,["projectId"]);return e=o?"projects/"+encodeURIComponent(o)+"/deploy_keys":"deploy_keys",I.get(this,e,n)},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/deploy_keys/"+s,o)},e.prototype.enable=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/deploy_keys/"+s+"/enable",o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/deploy_keys/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/deploy_keys/"+s,o)},e}(v),ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/environments",e)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/environments/"+s,o)},e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/environments",e)},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/environments/"+s,o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/environments/"+s,o)},e.prototype.stop=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/environments/"+s+"/stop",o)},e}(v),ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.addSpentTime=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,"projects/"+s+"/issues/"+p+"/add_spent_time",c({duration:o},n))},e.prototype.addTimeEstimate=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,"projects/"+s+"/issues/"+p+"/time_estimate",c({duration:o},n))},e.prototype.all=function(t){void 0===t&&(t={});var e,o=t.projectId,n=t.groupId,r=a(t,["projectId","groupId"]);return e=o?"projects/"+encodeURIComponent(o)+"/issues":n?"groups/"+encodeURIComponent(n)+"/issues":"issues",I.get(this,e,r)},e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/issues",e)},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/issues/"+s,o)},e.prototype.link=function(t,e,o,n,r){var s=l([t,e].map(encodeURIComponent),2),p=s[0],i=s[1],u=l([o,n].map(encodeURIComponent),2),a=u[0],m=u[1];return I.post(this,"projects/"+p+"/issues/"+i+"/links",c({targetProjectId:a,targetIssueId:m},r))},e.prototype.participants=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/issues/"+s+"/participants",o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/issues/"+s,o)},e.prototype.resetSpentTime=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/issues/"+s+"/reset_spent_time",o)},e.prototype.resetTimeEstimate=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/issues/"+s+"/reset_time_estimate",o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/issues/"+s,o)},e.prototype.subscribe=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/issues/"+s+"/subscribe",o)},e.prototype.timeStats=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/issues/"+s+"/time_stats",o)},e.prototype.unsubscribe=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/issues/"+s+"/unsubscribe",o)},e}(v),at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){void 0===t&&(t={});var e,o=t.projectId,n=t.groupId,r=a(t,["projectId","groupId"]);return e=o?"projects/"+encodeURIComponent(o)+"/issues_statistics":n?"groups/"+encodeURIComponent(n)+"/issues_statistics":"issues_statistics",I.get(this,e,r)},e}(v),mt=function(t){function e(e){return t.call(this,"projects","issues",e)||this}return u(e,t),e}(S),dt=function(t){function e(e){return t.call(this,"projects","issues",e)||this}return u(e,t),e}(w),lt=function(t){function e(e){return t.call(this,"issues",e)||this}return u(e,t),e}(j),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/jobs",e)},e.prototype.cancel=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/jobs/"+s+"/cancel",o)},e.prototype.downloadSingleArtifactFile=function(t,e,o,n){var r=n.stream,s=void 0!==r&&r,p=a(n,["stream"]),i=l([t,e].map(encodeURIComponent),2),u=i[0],c=i[1];return s?I.stream(this,"projects/"+u+"/jobs/"+c+"/artifacts/"+o,p):I.get(this,"projects/"+u+"/jobs/"+c+"/artifacts/"+o,p)},e.prototype.downloadSingleArtifactFileFromRef=function(t,e,o,n,r){var s=r.stream,p=void 0!==s&&s,i=a(r,["stream"]),u=l([t,e,n].map(encodeURIComponent),3),c=u[0],m=u[1],d=u[2];return p?I.stream(this,"projects/"+c+"/jobs/artifacts/"+m+"/raw/"+o+"?job="+d,i):I.get(this,"projects/"+c+"/jobs/artifacts/"+m+"/raw/"+o+"?job="+d,i)},e.prototype.downloadLatestArtifactFile=function(t,e,o,n){var r=n.stream,s=void 0!==r&&r,p=a(n,["stream"]),i=l([t,e,o].map(encodeURIComponent),3),u=i[0],c=i[1],m=i[2];return s?I.stream(this,"projects/"+u+"/jobs/artifacts/"+c+"/download?job="+m,p):I.get(this,"projects/"+u+"/jobs/artifacts/"+c+"/download?job="+m,p)},e.prototype.downloadTraceFile=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/jobs/"+s+"/trace",o)},e.prototype.erase=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/jobs/"+s+"/erase",o)},e.prototype.eraseArtifacts=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/jobs/"+s+"/artifacts",o)},e.prototype.keepArtifacts=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/jobs/"+s+"/artifacts/keep",o)},e.prototype.play=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/jobs/"+s+"/play",o)},e.prototype.retry=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/jobs/"+s+"/retry",o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/jobs/"+s,o)},e.prototype.showPipelineJobs=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/pipelines/"+s+"/jobs",o)},e}(v),ft=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(q),yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.accept=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/merge_requests/"+s+"/merge",o)},e.prototype.addSpentTime=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,"projects/"+s+"/merge_requests/"+p+"/add_spent_time",c({duration:o},n))},e.prototype.addTimeEstimate=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.post(this,"projects/"+s+"/merge_requests/"+p+"/time_estimate",c({duration:o},n))},e.prototype.all=function(t){var e,o=t.projectId,n=t.groupId,r=a(t,["projectId","groupId"]);return e=o?"projects/"+encodeURIComponent(o)+"/merge_requests":n?"groups/"+encodeURIComponent(n)+"/merge_requests":"merge_requests",I.get(this,e,r)},e.prototype.approve=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/merge_requests/"+s+"/approve",o)},e.prototype.approvals=function(t,e){void 0===e&&(e={});var o,n=e.mergerequestIId,r=a(e,["mergerequestIId"]),s=encodeURIComponent(t);n?o="projects/"+s+"/merge_requests/"+encodeURIComponent(n)+"/approvals":o="projects/"+s+"/approvals";return I.get(this,o,r)},e.prototype.approvalState=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/approval_state",o)},e.prototype.approvers=function(t,e,o,n){void 0===n&&(n={});var r,s=n.mergerequestIId,p=a(n,["mergerequestIId"]),i=encodeURIComponent(t);s?r="projects/"+i+"/merge_requests/"+encodeURIComponent(s)+"/approvers":r="projects/"+i+"/approvers";return I.put(this,r,c({approverIds:e,approverGroupIds:o},p))},e.prototype.cancelOnPipelineSucess=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/merge_requests/"+s+"/cancel_merge_when_pipeline_succeeds",o)},e.prototype.changes=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/changes",o)},e.prototype.closesIssues=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/closes_issues",o)},e.prototype.commits=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/commits",o)},e.prototype.create=function(t,e,o,n,r){var s=encodeURIComponent(t);return I.post(this,"projects/"+s+"/merge_requests",c({id:s,sourceBranch:e,targetBranch:o,title:n},r))},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/merge_requests/"+s,o)},e.prototype.editApprovals=function(t,e){void 0===e&&(e={});var o,n=e.mergerequestIId,r=a(e,["mergerequestIId"]),s=encodeURIComponent(t);n?o="projects/"+s+"/merge_requests/"+encodeURIComponent(n)+"/approvals":o="projects/"+s+"/approvals";return I.post(this,o,r)},e.prototype.participants=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/participants",o)},e.prototype.pipelines=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/pipelines",o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/merge_requests/"+s,o)},e.prototype.resetSpentTime=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/merge_requests/"+s+"/reset_spent_time",o)},e.prototype.resetTimeEstimate=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/merge_requests/"+s+"/reset_time_estimate",o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s,o)},e.prototype.timeStats=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/time_stats",o)},e.prototype.version=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.get(this,"projects/"+s+"/merge_requests/"+p+"/versions/"+i,n)},e.prototype.versions=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/merge_requests/"+s+"/versions",o)},e.prototype.unapprove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/merge_requests/"+s+"/unapprove",o)},e.prototype.unsubscribe=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/merge_requests/"+s+"/unsubscribe",o)},e}(v),vt=function(t){function e(e){return t.call(this,"merge_requests",e)||this}return u(e,t),e}(j),gt=function(t){function e(e){return t.call(this,"projects","merge_requests",e)||this}return u(e,t),e}(w),It=function(t){function e(e){return t.call(this,"projects","merge_requests",e)||this}return u(e,t),e}(S),Rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/packages",e)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/packages/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/packages/"+s,o)},e.prototype.showFiles=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/packages/"+s+"/package_files",o)},e}(v),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/pipelines",e)},e.prototype.create=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/pipeline",c({ref:e},o))},e.prototype.delete=function(t,e,o){var n=encodeURIComponent(t);return I.del(this,"projects/"+n+"/pipelines/"+e,o)},e.prototype.show=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/pipelines/"+e,o)},e.prototype.retry=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/pipelines/"+e+"/retry",o)},e.prototype.cancel=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/pipelines/"+e+"/cancel",o)},e.prototype.showJobs=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/pipelines/"+e+"/jobs",o)},e.prototype.allVariables=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/pipelines/"+s+"/variables",o)},e}(v),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/pipeline_schedules",e)},e.prototype.create=function(t,e,o,n,r){var s=encodeURIComponent(t);return I.post(this,"projects/"+s+"/pipeline_schedules",c({description:e,ref:o,cron:n},r))},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/pipeline_schedules/"+s,o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/pipeline_schedules/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/pipeline_schedules/"+s,o)},e.prototype.takeOwnership=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/pipeline_schedules/"+s+"/take_ownership",o)},e}(v),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/pipeline_schedules/"+s+"/variables",o)},e.prototype.create=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/pipeline_schedules/"+s+"/variables",o)},e.prototype.edit=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.put(this,"projects/"+s+"/pipeline_schedules/"+p+"/variables/"+i,n)},e.prototype.show=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.get(this,"projects/"+s+"/pipeline_schedules/"+p+"/variables/"+i,n)},e.prototype.remove=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.del(this,"projects/"+s+"/pipeline_schedules/"+p+"/variables/"+i,n)},e}(v),bt=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return u(o,t),o.prototype.all=function(t){return I.get(this,"projects",t)},o.prototype.archive=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/archive",e)},o.prototype.create=function(t){var e=t.userId,o=a(t,["userId"]),n=e?"projects/user/"+encodeURIComponent(e):"projects";return I.post(this,n,o)},o.prototype.edit=function(t,e){var o=encodeURIComponent(t);return I.put(this,"projects/"+o,e)},o.prototype.events=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/events",e)},o.prototype.fork=function(t,e){void 0===e&&(e={});var o=e.forkedFromId,n=a(e,["forkedFromId"]),r="projects/"+encodeURIComponent(t)+"/fork";return o&&(r+="/"+encodeURIComponent(o)),I.post(this,r,n)},o.prototype.forks=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/forks",e)},o.prototype.languages=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/languages",e)},o.prototype.mirrorPull=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/mirror/pull",e)},o.prototype.remove=function(t,e){var o=encodeURIComponent(t);return I.del(this,"projects/"+o,e)},o.prototype.removeFork=function(t,e){var o=encodeURIComponent(t);return I.del(this,"projects/"+o+"/fork",e)},o.prototype.search=function(t){return I.get(this,"projects",{search:t})},o.prototype.share=function(t,e,o,n){var r=encodeURIComponent(t);return I.post(this,"projects/"+r+"/share",c({groupId:e,groupAccess:o},n))},o.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o,e)},o.prototype.star=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/star",e)},o.prototype.statuses=function(t,e,o,n){var r=encodeURIComponent(t);return I.post(this,"projects/"+r+"/statuses/"+e,c({state:o},n))},o.prototype.transfer=function(t,e){var o=encodeURIComponent(t);return I.put(this,"projects/"+o+"/transfer",{namespace:e})},o.prototype.unarchive=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/unarchive",e)},o.prototype.unshare=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/share/"+s,o)},o.prototype.unstar=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/unstar",e)},o.prototype.upload=function(t,o,n){var r=void 0===n?{}:n,s=r.metadata,p=r.sudo,i=encodeURIComponent(t),u=new e,c={filename:Date.now().toString(),contentType:"application/octet-stream"};return u.append("file",o,Object.assign(c,s)),I.post(this,"projects/"+i+"/uploads",{sudo:p,form:u})},o}(v),_t=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(U),wt=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(b),kt=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(_),qt=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return u(o,t),o.prototype.download=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/export/download",e)},o.prototype.exportStatus=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/export",e)},o.prototype.import=function(t,o,n){var r=new e,s={filename:Date.now().toString()+".tar.gz",contentType:"application/octet-stream"};return r.append("file",t,s),r.append("path",o),I.post(this,"projects/import",c(c({},n),{form:r}))},o.prototype.importStatus=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/import",e)},o.prototype.schedule=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/export",e)},o}(v),Pt=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(k),Tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/hooks",e)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/hooks/"+s,o)},e.prototype.add=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/hooks",c({url:e},o))},e.prototype.edit=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.put(this,"projects/"+s+"/hooks/"+p,c({url:o},n))},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/hooks/"+s,o)},e}(v),St=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(P),xt=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(T),Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/snippets",e)},e.prototype.content=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/snippets/"+s+"/raw",o)},e.prototype.create=function(t,e,o,n,r,s){var p=encodeURIComponent(t);return I.post(this,"projects/"+p+"/snippets",c({title:e,fileName:o,code:n,visibility:r},s))},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/snippets/"+s,o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/snippets/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/snippets/"+s,o)},e.prototype.userAgentDetails=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/snippets/"+s+"/user_agent_detail",o)},e}(v),At=function(t){function e(e){return t.call(this,"projects","snippets",e)||this}return u(e,t),e}(S),Mt=function(t){function e(e){return t.call(this,"projects","snippets",e)||this}return u(e,t),e}(w),Gt=function(t){function e(e){return t.call(this,"issues",e)||this}return u(e,t),e}(j),Lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/protected_branches",e)},e.prototype.protect=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/protected_branches",c({name:e},o))},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/protected_branches/"+s,o)},e.prototype.unprotect=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/protected_branches/"+s,o)},e}(v),Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/protected_tags",e)},e.prototype.protect=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/protected_tags",c({name:e},o))},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/protected_tags/"+s,o)},e.prototype.unprotect=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/protected_tags/"+s,o)},e}(v),Bt=function(t){function e(e){return t.call(this,"projects",e)||this}return u(e,t),e}(E),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/push_rule",e)},e.prototype.edit=function(t,e){var o=encodeURIComponent(t);try{return I.put(this,"projects/"+o+"/push_rule",e)}catch(o){if(o.message.includes("exist"))return this.create(t,e);throw o}},e.prototype.remove=function(t,e){var o=encodeURIComponent(t);return I.del(this,"projects/"+o+"/push_rule",e)},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/push_rule",e)},e}(v),Nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/releases",e)},e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/releases",e)},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/releases/"+s,o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/releases/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/releases/"+s,o)},e}(v),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/releases/"+s+"/assets/links",o)},e.prototype.create=function(t,e,o,n,r){var s=l([t,e].map(encodeURIComponent),2),p=s[0],i=s[1];return I.post(this,"projects/"+p+"/releases/"+i+"/assets/links",c({name:o,url:n},r))},e.prototype.edit=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.put(this,"projects/"+s+"/releases/"+p+"/assets/links/"+i,n)},e.prototype.remove=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.del(this,"projects/"+s+"/releases/"+p+"/assets/links/"+i,n)},e.prototype.show=function(t,e,o,n){var r=l([t,e,o].map(encodeURIComponent),3),s=r[0],p=r[1],i=r[2];return I.get(this,"projects/"+s+"/releases/"+p+"/assets/links/"+i,n)},e}(v),zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.compare=function(t,e,o,n){var r=encodeURIComponent(t);return I.get(this,"projects/"+r+"/repository/compare",c({from:e,to:o},n))},e.prototype.contributors=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/repository/contributors",e)},e.prototype.mergeBase=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/merge_base",c({refs:e},o))},e.prototype.showArchive=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/repository/archive",e)},e.prototype.showBlob=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/blobs/"+e,o)},e.prototype.showBlobRaw=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/repository/blobs/"+e+"/raw",o)},e.prototype.tree=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/repository/tree",e)},e}(v),Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.create=function(t,e,o,n,r,s){var p=l([t,e].map(encodeURIComponent),2),i=p[0],u=p[1];return I.post(this,"projects/"+i+"/repository/files/"+u,c({branch:o,content:n,commitMessage:r},s))},e.prototype.edit=function(t,e,o,n,r,s){var p=l([t,e].map(encodeURIComponent),2),i=p[0],u=p[1];return I.put(this,"projects/"+i+"/repository/files/"+u,c({branch:o,content:n,commitMessage:r},s))},e.prototype.remove=function(t,e,o,n,r){var s=l([t,e].map(encodeURIComponent),2),p=s[0],i=s[1];return I.del(this,"projects/"+p+"/repository/files/"+i,c({branch:o,commitMessage:n},r))},e.prototype.show=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.get(this,"projects/"+s+"/repository/files/"+p,c({ref:o},n))},e.prototype.showBlame=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/repository/files/"+s+"/blame",o)},e.prototype.showRaw=function(t,e,o,n){var r=l([t,e].map(encodeURIComponent),2),s=r[0],p=r[1];return I.get(this,"projects/"+s+"/repository/files/"+p+"/raw",c({ref:o},n))},e}(v),Kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){var e=t.projectId,o=a(t,["projectId"]),n=e?"projects/"+encodeURIComponent(e)+"/runners":"runners/all";return I.get(this,n,o)},e.prototype.allOwned=function(t){return I.get(this,"runners",t)},e.prototype.edit=function(t,e){var o=encodeURIComponent(t);return I.put(this,"runners/"+o,e)},e.prototype.enable=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.post(this,"projects/"+r+"/runners",c({runnerId:s},o))},e.prototype.disable=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/runners/"+s,o)},e.prototype.jobs=function(t,e){var o=encodeURIComponent(t);return I.get(this,"runners/"+o+"/jobs",e)},e.prototype.remove=function(t,e){var o=encodeURIComponent(t);return I.del(this,"runners/"+o,e)},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"runners/"+o,e)},e}(v),Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.edit=function(t,e,o){var n=encodeURIComponent(t);return I.put(this,"projects/"+n+"/services/"+e,o)},e.prototype.remove=function(t,e,o){var n=encodeURIComponent(t);return I.del(this,"projects/"+n+"/services/"+e,o)},e.prototype.show=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/services/"+e,o)},e}(v),Ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/repository/tags",e)},e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/repository/tags",e)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/repository/tags/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/repository/tags/"+s,o)},e}(v),Xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"todos",t)},e.prototype.create=function(t,e,o){return I.post(this,"projects/"+t+"/merge_requests/"+e+"/todo",o)},e.prototype.done=function(t){var e=t.todoId,o=a(t,["todoId"]),n="mark_as_done";return e&&(n=e+"/"+n),I.del(this,"todos/"+n,o)},e}(v),Wt=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return u(o,t),o.prototype.add=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/triggers",e)},o.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/triggers",e)},o.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/triggers/"+s,o)},o.prototype.pipeline=function(t,o,n,r){void 0===r&&(r={});var s=r.sudo,p=a(r,["sudo"]),i=encodeURIComponent(t),u=new e;return u.append("ref",o),u.append("token",n),Object.entries(p).forEach((function(t){var e=l(t,2),o=e[0],n=e[1];u.append("variables["+o+"]",n)})),I.post(this,"projects/"+i+"/trigger/pipeline",{sudo:s,form:u})},o.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/triggers/"+s,o)},o.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/triggers/"+s,o)},o}(v),Yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/vulnerability_findings",e)},e}(v),Qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"application/settings",t)},e.prototype.edit=function(t){return I.put(this,"application/settings",t)},e}(v),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"broadcast_messages",t)},e.prototype.create=function(t){return I.post(this,"broadcast_messages",t)},e.prototype.edit=function(t,e){var o=encodeURIComponent(t);return I.put(this,"broadcast_messages/"+o,e)},e.prototype.remove=function(t){var e=encodeURIComponent(t);return I.del(this,"broadcast_messages/"+e)},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"broadcast_messages/"+o,e)},e}(v),$t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"events",t)},e}(v),te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"features",t)},e.prototype.set=function(t,e){var o=encodeURIComponent(t);return I.post(this,"features/"+o,e)},e}(v),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"geo_nodes",t)},e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,"geo_nodes/"+o,e)},e.prototype.edit=function(t,e){var o=encodeURIComponent(t);return I.put(this,"geo_nodes/"+o,e)},e.prototype.failures=function(t){return I.post(this,"geo_nodes/current/failures",t)},e.prototype.repair=function(t,e){var o=encodeURIComponent(t);return I.del(this,"geo_nodes/"+o,e)},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"geo_nodes/"+o,e)},e.prototype.status=function(t,e){var o=encodeURIComponent(t);return I.get(this,"geo_nodes/"+o+"/status",e)},e.prototype.statuses=function(t){return I.get(this,"geo_nodes/statuses",t)},e}(v),oe=function(t){function e(e){return t.call(this,"gitignores",e)||this}return u(e,t),e}(x),ne=function(t){function e(e){return t.call(this,"gitlab_ci_ymls",e)||this}return u(e,t),e}(x),re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"keys/"+o,e)},e}(v),se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"licence",t)},e.prototype.create=function(t){return I.post(this,"licence",t)},e}(v),pe=function(t){function e(e){return t.call(this,"licences",e)||this}return u(e,t),e}(x),ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.lint=function(t,e){return I.post(this,"ci/lint",c({content:t},e))},e}(v),ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){return I.get(this,"namespaces",t)},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"namespaces/"+o,e)},e}(v),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){var e=t.projectId,o=t.groupId,n=a(t,["projectId","groupId"]),r="";return e?r+="projects/"+encodeURIComponent(e)+"/":o&&(r+="groups/"+encodeURIComponent(o)+"/"),I.get(this,r+"notification_settings",n)},e.prototype.edit=function(t){var e=t.projectId,o=t.groupId,n=a(t,["projectId","groupId"]),r="";return e?r+="projects/"+encodeURIComponent(e)+"/":o&&(r+="groups/"+encodeURIComponent(o)+"/"),I.put(this,r+"notification_settings",n)},e}(v),ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.render=function(t,e){return I.post(this,"markdown",c({text:t},e))},e}(v),me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){void 0===t&&(t={});var e=t.projectId,o=a(t,["projectId"]),n=e?"projects/"+encodeURIComponent(e)+"/":"";return I.get(this,n+"pages/domains",o)},e.prototype.create=function(t,e,o){var n=encodeURIComponent(t);return I.post(this,"projects/"+n+"/pages/domains",c({domain:e},o))},e.prototype.edit=function(t,e,o){var n=encodeURIComponent(t);return I.put(this,"projects/"+n+"/pages/domains/"+e,o)},e.prototype.show=function(t,e,o){var n=encodeURIComponent(t);return I.get(this,"projects/"+n+"/pages/domains/"+e,o)},e.prototype.remove=function(t,e,o){var n=encodeURIComponent(t);return I.del(this,"projects/"+n+"/pages/domains/"+e,o)},e}(v),de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e,o){var n=o.projectId,r=o.groupId,s=a(o,["projectId","groupId"]),p="";return n?p+="projects/"+encodeURIComponent(n)+"/":r&&(p+="groups/"+encodeURIComponent(r)+"/"),I.get(this,p+"search",c({scope:t,search:e},s))},e}(v),le=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.queueMetrics=function(){return I.get(this,"sidekiq/queue_metrics")},e.prototype.processMetrics=function(){return I.get(this,"sidekiq/process_metrics")},e.prototype.jobStats=function(){return I.get(this,"sidekiq/job_stats")},e.prototype.compoundMetrics=function(){return I.get(this,"sidekiq/compound_metrics")},e}(v),he=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t){var e=t.public,o=a(t,["public"]),n=e?"snippets/public":"snippets";return I.get(this,n,o)},e.prototype.content=function(t,e){var o=encodeURIComponent(t);return I.get(this,"snippets/"+o+"/raw",e)},e.prototype.create=function(t,e,o,n,r){return I.post(this,"snippets",c({title:t,fileName:e,content:o,visibility:n},r))},e.prototype.edit=function(t,e){var o=encodeURIComponent(t);return I.put(this,"snippets/"+o,e)},e.prototype.remove=function(t,e){var o=encodeURIComponent(t);return I.del(this,"snippets/"+o,e)},e.prototype.show=function(t,e){var o=encodeURIComponent(t);return I.get(this,"snippets/"+o,e)},e.prototype.userAgentDetails=function(t,e){var o=encodeURIComponent(t);return I.get(this,"snippets/"+o+"/user_agent_detail",e)},e}(v),fe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.add=function(t,e){return I.post(this,"hooks",c({url:t},e))},e.prototype.all=function(t){return I.get(this,"hooks",t)},e.prototype.edit=function(t,e,o){var n=encodeURIComponent(t);return I.put(this,"hooks/"+n,c({url:e},o))},e.prototype.remove=function(t,e){var o=encodeURIComponent(t);return I.del(this,"hooks/"+o,e)},e}(v),ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.show=function(t){return I.get(this,"version",t)},e}(v),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.all=function(t,e){var o=encodeURIComponent(t);return I.get(this,"projects/"+o+"/wikis",e)},e.prototype.create=function(t,e){var o=encodeURIComponent(t);return I.post(this,"projects/"+o+"/wikis",e)},e.prototype.edit=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.put(this,"projects/"+r+"/wikis/"+s,o)},e.prototype.show=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.get(this,"projects/"+r+"/wikis/"+s,o)},e.prototype.remove=function(t,e,o){var n=l([t,e].map(encodeURIComponent),2),r=n[0],s=n[1];return I.del(this,"projects/"+r+"/wikis/"+s,o)},e}(v),ge=Object.freeze({__proto__:null,Groups:R,GroupAccessRequests:A,GroupBadges:M,GroupCustomAttributes:G,GroupIssueBoards:L,GroupMembers:O,GroupMilestones:B,GroupProjects:D,GroupVariables:N,GroupLabels:F,Epics:z,EpicIssues:V,EpicNotes:K,EpicDiscussions:J,Users:H,UserCustomAttributes:X,UserEmails:Y,UserImpersonationTokens:Q,UserKeys:$,UserGPGKeys:et,Branches:ot,Commits:nt,CommitDiscussions:rt,ContainerRegistry:st,Deployments:pt,DeployKeys:it,Environments:ut,Issues:ct,IssuesStatistics:at,IssueNotes:mt,IssueDiscussions:dt,IssueAwardEmojis:lt,Jobs:ht,Labels:ft,MergeRequests:yt,MergeRequestAwardEmojis:vt,MergeRequestDiscussions:gt,MergeRequestNotes:It,Packages:Rt,Pipelines:Ut,PipelineSchedules:Ct,PipelineScheduleVariables:jt,Projects:bt,ProjectAccessRequests:_t,ProjectBadges:wt,ProjectCustomAttributes:kt,ProjectImportExport:qt,ProjectIssueBoards:Pt,ProjectHooks:Tt,ProjectMembers:St,ProjectMilestones:xt,ProjectSnippets:Et,ProjectSnippetNotes:At,ProjectSnippetDiscussions:Mt,ProjectSnippetAwardEmojis:Gt,ProtectedBranches:Lt,ProtectedTags:Ot,ProjectVariables:Bt,PushRules:Dt,Releases:Nt,ReleaseLinks:Ft,Repositories:zt,RepositoryFiles:Vt,Runners:Kt,Services:Jt,Tags:Ht,Todos:Xt,Triggers:Wt,VulnerabilityFindings:Yt,ApplicationSettings:Qt,BroadcastMessages:Zt,Events:$t,FeatureFlags:te,GeoNodes:ee,GitignoreTemplates:oe,GitLabCIYMLTemplates:ne,Keys:re,Licence:se,LicenceTemplates:pe,Lint:ie,Namespaces:ue,NotificationSettings:ce,Markdown:ae,PagesDomains:me,Search:de,SidekiqMetrics:le,Snippets:he,SystemHooks:fe,Version:ye,Wikis:ve}),Ie=g({Groups:R,GroupAccessRequests:A,GroupBadges:M,GroupCustomAttributes:G,GroupIssueBoards:L,GroupMembers:O,GroupMilestones:B,GroupProjects:D,GroupVariables:N,GroupLabels:F,Epics:z,EpicIssues:V,EpicNotes:K,EpicDiscussions:J}),Re=g({Users:H,UserCustomAttributes:X,UserEmails:Y,UserImpersonationTokens:Q,UserKeys:$,UserGPGKeys:et}),Ue=g({Branches:ot,Commits:nt,CommitDiscussions:rt,ContainerRegistry:st,DeployKeys:it,Deployments:pt,Environments:ut,Issues:ct,IssuesStatistics:at,IssueAwardEmojis:lt,IssueNotes:mt,IssueDiscussions:dt,Jobs:ht,Labels:ft,MergeRequests:yt,MergeRequestAwardEmojis:vt,MergeRequestDiscussions:gt,MergeRequestNotes:It,Packages:Rt,Pipelines:Ut,PipelineSchedules:Ct,PipelineScheduleVariables:jt,Projects:bt,ProjectAccessRequests:_t,ProjectBadges:wt,ProjectCustomAttributes:kt,ProjectImportExport:qt,ProjectIssueBoards:Pt,ProjectHooks:Tt,ProjectMembers:St,ProjectMilestones:xt,ProjectSnippets:Et,ProjectSnippetNotes:At,ProjectSnippetDiscussions:Mt,ProjectSnippetAwardEmojis:Gt,ProtectedBranches:Lt,ProtectedTags:Ot,ProjectVariables:Bt,PushRules:Dt,Releases:Nt,ReleaseLinks:Ft,Repositories:zt,RepositoryFiles:Vt,Runners:Kt,Services:Jt,Tags:Ht,Triggers:Wt,VulnerabilityFindings:Yt}),Ce=g(ge);export{Qt as ApplicationSettings,ot as Branches,Zt as BroadcastMessages,rt as CommitDiscussions,nt as Commits,st as ContainerRegistry,it as DeployKeys,pt as Deployments,ut as Environments,J as EpicDiscussions,V as EpicIssues,K as EpicNotes,z as Epics,$t as Events,te as FeatureFlags,ee as GeoNodes,ne as GitLabCIYMLTemplates,oe as GitignoreTemplates,Ce as Gitlab,A as GroupAccessRequests,M as GroupBadges,G as GroupCustomAttributes,L as GroupIssueBoards,F as GroupLabels,O as GroupMembers,B as GroupMilestones,D as GroupProjects,N as GroupVariables,R as Groups,Ie as GroupsBundle,lt as IssueAwardEmojis,dt as IssueDiscussions,mt as IssueNotes,ct as Issues,at as IssuesStatistics,ht as Jobs,re as Keys,ft as Labels,se as Licence,pe as LicenceTemplates,ie as Lint,ae as Markdown,vt as MergeRequestAwardEmojis,gt as MergeRequestDiscussions,It as MergeRequestNotes,yt as MergeRequests,ue as Namespaces,ce as NotificationSettings,Rt as Packages,me as PagesDomains,jt as PipelineScheduleVariables,Ct as PipelineSchedules,Ut as Pipelines,_t as ProjectAccessRequests,wt as ProjectBadges,kt as ProjectCustomAttributes,Tt as ProjectHooks,qt as ProjectImportExport,Pt as ProjectIssueBoards,St as ProjectMembers,xt as ProjectMilestones,Gt as ProjectSnippetAwardEmojis,Mt as ProjectSnippetDiscussions,At as ProjectSnippetNotes,Et as ProjectSnippets,Bt as ProjectVariables,bt as Projects,Ue as ProjectsBundle,Lt as ProtectedBranches,Ot as ProtectedTags,Dt as PushRules,Ft as ReleaseLinks,Nt as Releases,zt as Repositories,Vt as RepositoryFiles,Kt as Runners,de as Search,Jt as Services,le as SidekiqMetrics,he as Snippets,fe as SystemHooks,Ht as Tags,Xt as Todos,Wt as Triggers,X as UserCustomAttributes,Y as UserEmails,et as UserGPGKeys,Q as UserImpersonationTokens,$ as UserKeys,H as Users,Re as UsersBundle,ye as Version,Yt as VulnerabilityFindings,ve as Wikis};