diff --git a/apitable.go/lib/common/http/request.go b/apitable.go/lib/common/http/request.go index e1628d1..d69c51e 100644 --- a/apitable.go/lib/common/http/request.go +++ b/apitable.go/lib/common/http/request.go @@ -17,7 +17,7 @@ const ( HTTP = "http" HTTPS = "https" - Domain = "api.apitable.com" + Domain = "aitable.ai" Path = "/" ) diff --git a/apitable.java/client/src/main/java/com/apitable/client/api/ApitableApiClient.java b/apitable.java/client/src/main/java/com/apitable/client/api/ApitableApiClient.java index 300eb95..6c043c5 100644 --- a/apitable.java/client/src/main/java/com/apitable/client/api/ApitableApiClient.java +++ b/apitable.java/client/src/main/java/com/apitable/client/api/ApitableApiClient.java @@ -34,7 +34,7 @@ */ public class ApitableApiClient { - private static final String DEFAULT_HOST = "https://api.apitable.com"; + private static final String DEFAULT_HOST = "https://aitable.ai"; private final ApiVersion apiVersion; diff --git a/apitable.js/apitable.browser.js b/apitable.js/apitable.browser.js index b81cf69..cdfa695 100644 --- a/apitable.js/apitable.browser.js +++ b/apitable.js/apitable.browser.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";var n=r(4),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=n.charAt(a):s<128?o+=i[s]:s<2048?o+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?o+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&n.charCodeAt(a)),o+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(i)})),e.exports=u}).call(this,r(21))},function(e,t,r){"use strict";var n=r(0),o=r(23),i=r(5),a=r(25),s=r(28),u=r(29),c=r(9);e.exports=function(e){return new Promise((function(t,l){var f=e.data,p=e.headers;n.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",y=e.auth.password||"";p.Authorization="Basic "+btoa(h+":"+y)}var b=a(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),i(b,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d};o(t,l,n),d=null}},d.onabort=function(){d&&(l(c("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){l(c("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),l(c(t,e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var m=r(30),v=(e.withCredentials||u(b))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}if("setRequestHeader"in d&&n.forEach(p,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),l(e),d=null)})),void 0===f&&(f=null),d.send(f)}))}},function(e,t,r){"use strict";var n=r(24);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){t=t||{};var r={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(o,(function(e){void 0!==t[e]&&(r[e]=t[e])})),n.forEach(i,(function(o){n.isObject(t[o])?r[o]=n.deepMerge(e[o],t[o]):void 0!==t[o]?r[o]=t[o]:n.isObject(e[o])?r[o]=n.deepMerge(e[o]):void 0!==e[o]&&(r[o]=e[o])})),n.forEach(a,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var s=o.concat(i).concat(a),u=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return n.forEach(u,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g,i=r(2),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return String(e)}}},a)},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1)for(var r=1;r=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(11);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(34),o=r(35),i=r(12);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(2),o=r(12),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,s(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,r,o,i,a,u,l,f,d,h,y,b,m){var v,g=t;if("function"==typeof l?g=l(r,g):g instanceof Date?g=h(g):"comma"===o&&s(g)&&(g=n.maybeMap(g,(function(e){return e instanceof Date?h(e):e})).join(",")),null===g){if(i)return u&&!b?u(r,p.encoder,m,"key"):r;g=""}if("string"==typeof(v=g)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||n.isBuffer(g))return u?[y(b?r:u(r,p.encoder,m,"key"))+"="+y(u(g,p.encoder,m,"value"))]:[y(r)+"="+y(String(g))];var w,O=[];if(void 0===g)return O;if(s(l))w=l;else{var E=Object.keys(g);w=f?E.sort(f):E}for(var x=0;x0?v+m:""}},function(e,t,r){"use strict";var n=r(2),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(s=a.exec(i))&&f=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:a[c]=o:a={0:o}}o=a}return o}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=l.split(t.delimiter,f),d=-1,h=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(b=i(b)?[b]:b),o.call(c,y)?c[y]=n.combine(c[y],b):c[y]=b}return c}(e,r):e,f=r.plainObjects?Object.create(null):{},p=Object.keys(l),d=0;d0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof a?Promise.resolve(r.value.v).then(c,l):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.RecordManager=void 0;var u=r(1),c=function(){function e(e){this.datasheet=e,this.datasheetId=e.datasheetId,this.apitable=e.apitable}return Object.defineProperty(e.prototype,"APIEndpoint",{get:function(){return"/datasheets/"+this.datasheetId+"/records"},enumerable:!1,configurable:!0}),e.prototype.queryAll=function(e){return s(this,arguments,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:t=0,r=0,i.label=1;case 1:return[4,a(this.apitable.request({path:this.APIEndpoint,params:n({pageSize:u.MAX_RECORD_SIZE,pageNum:++t},e),method:"get"}))];case 2:if(!(o=i.sent()).success)throw Error(o.message);return r=o.data.total,[4,a(o.data.records)];case 3:return[4,i.sent()];case 4:i.sent(),i.label=5;case 5:if(u.MAX_RECORD_SIZE*t<=r)return[3,1];i.label=6;case 6:return[2]}}))}))},e.prototype.query=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apitable.request({path:this.APIEndpoint,params:e,method:"get"})];case 1:return[2,t.sent()]}}))}))},e.prototype.get=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:if(!(t=Array.isArray(e)?e:[e]).length)throw new TypeError("recordIds cant be empty");return[4,this.apitable.request({path:this.APIEndpoint,params:{recordIds:t},method:"get"})];case 1:return[2,r.sent()]}}))}))},e.prototype.create=function(e,t){return void 0===t&&(t=this.apitable.config.fieldKey),o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.apitable.request({path:this.APIEndpoint,params:{fieldKey:t},method:"post",data:{records:e,fieldKey:t}})];case 1:return[2,r.sent()]}}))}))},e.prototype.update=function(e,t){return void 0===t&&(t=this.apitable.config.fieldKey),o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:if(!e.length)throw new TypeError("records cant be empty");return[4,this.apitable.request({path:this.APIEndpoint,params:{fieldKey:t},method:"patch",data:{records:e,fieldKey:t}})];case 1:return[2,r.sent()]}}))}))},e.prototype.delete=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=Array.isArray(e)?e:[e],[4,this.apitable.request({path:this.APIEndpoint,params:{recordIds:t},method:"delete"})];case 1:return[2,r.sent()]}}))}))},e}();t.RecordManager=c},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&t.length>r?t[r+1]:null},t.QPSController=function(e,r){return void 0===e&&(e=5),void 0===r&&(r=50),function(n){return o(void 0,void 0,void 0,(function(){var o,a,u,c,l,f;return i(this,(function(i){switch(i.label){case 0:return(o=t.getResourceId(n.url))?(a=(new Date).getTime(),u=s.APITable.QPSMap.get(o)||{count:1,lastReqTimestamp:a},c=u.count,l=u.lastReqTimestamp,Math.floor(a/1e3)<=Math.floor(l/1e3)?c0?f+r:0,[4,t.wait(f)]):[2,n];case 1:return i.sent(),[2,n]}}))}))}},t.mergeConfig=function(e){var t={host:a.DEFAULT_HOST,fieldKey:"name",requestTimeout:a.DEFAULT_REQUEST_TIMEOUT,logLevel:"Warn",disableClientUserAgent:!1};return n(n({},t),e)},t.isBrowser="undefined"!=typeof window},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(46),t),o(r(47),t),o(r(48),t),o(r(49),t),o(r(50),t),o(r(51),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,function(e){e[e.Datasheet=0]="Datasheet",e[e.Mirror=1]="Mirror",e[e.Folder=2]="Folder",e[e.Form=3]="Form",e[e.Dashboard=4]="Dashboard"}(t.NodeType||(t.NodeType={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APIMetaFieldPropertyFormatEnums=t.Conversion=t.TSymbolAlign=t.ViewType=t.RollUpFuncType=t.FieldType=void 0,function(e){e.Text="Text",e.Number="Number",e.SingleSelect="SingleSelect",e.MultiSelect="MultiSelect",e.DateTime="DateTime",e.Attachment="Attachment",e.MagicLink="MagicLink",e.URL="URL",e.Email="Email",e.Phone="Phone",e.Checkbox="Checkbox",e.Rating="Rating",e.Member="Member",e.MagicLookUp="MagicLookUp",e.Formula="Formula",e.Currency="Currency",e.Percent="Percent",e.SingleText="SingleText",e.AutoNumber="AutoNumber",e.CreatedTime="CreatedTime",e.LastModifiedTime="LastModifiedTime",e.CreatedBy="CreatedBy",e.LastModifiedBy="LastModifiedBy"}(t.FieldType||(t.FieldType={})),function(e){e.VALUES="VALUES",e.AVERAGE="AVERAGE",e.COUNT="COUNT",e.COUNTA="COUNTA",e.COUNTALL="COUNTALL",e.SUM="SUM",e.MIN="MIN",e.MAX="MAX",e.AND="AND",e.OR="OR",e.XOR="XOR",e.CONCATENATE="CONCATENATE",e.ARRAYJOIN="ARRAYJOIN",e.ARRAYUNIQUE="ARRAYUNIQUE",e.ARRAYCOMPACT="ARRAYCOMPACT"}(t.RollUpFuncType||(t.RollUpFuncType={})),function(e){e.Grid="Grid",e.Gallery="Gallery",e.Kanban="Kanban",e.Gantt="Gantt"}(t.ViewType||(t.ViewType={})),function(e){e.Default="Default",e.Left="Left",e.Right="Right"}(t.TSymbolAlign||(t.TSymbolAlign={})),function(e){e.Delete="delete",e.KeepText="keepText"}(t.Conversion||(t.Conversion={})),function(e){e.DateTime="DateTime",e.Number="Number",e.Percent="Percent",e.Currency="Currency"}(t.APIMetaFieldPropertyFormatEnums||(t.APIMetaFieldPropertyFormatEnums={}))}])})); \ No newline at end of file +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";var n=r(4),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=n.charAt(a):s<128?o+=i[s]:s<2048?o+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?o+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&n.charCodeAt(a)),o+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(i)})),e.exports=u}).call(this,r(21))},function(e,t,r){"use strict";var n=r(0),o=r(23),i=r(5),a=r(25),s=r(28),u=r(29),c=r(9);e.exports=function(e){return new Promise((function(t,l){var f=e.data,p=e.headers;n.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",y=e.auth.password||"";p.Authorization="Basic "+btoa(h+":"+y)}var b=a(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),i(b,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d};o(t,l,n),d=null}},d.onabort=function(){d&&(l(c("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){l(c("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),l(c(t,e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var m=r(30),v=(e.withCredentials||u(b))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}if("setRequestHeader"in d&&n.forEach(p,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),l(e),d=null)})),void 0===f&&(f=null),d.send(f)}))}},function(e,t,r){"use strict";var n=r(24);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){t=t||{};var r={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(o,(function(e){void 0!==t[e]&&(r[e]=t[e])})),n.forEach(i,(function(o){n.isObject(t[o])?r[o]=n.deepMerge(e[o],t[o]):void 0!==t[o]?r[o]=t[o]:n.isObject(e[o])?r[o]=n.deepMerge(e[o]):void 0!==e[o]&&(r[o]=e[o])})),n.forEach(a,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var s=o.concat(i).concat(a),u=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return n.forEach(u,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g,i=r(2),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return String(e)}}},a)},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1)for(var r=1;r=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(11);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(34),o=r(35),i=r(12);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(2),o=r(12),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,s(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,r,o,i,a,u,l,f,d,h,y,b,m){var v,g=t;if("function"==typeof l?g=l(r,g):g instanceof Date?g=h(g):"comma"===o&&s(g)&&(g=n.maybeMap(g,(function(e){return e instanceof Date?h(e):e})).join(",")),null===g){if(i)return u&&!b?u(r,p.encoder,m,"key"):r;g=""}if("string"==typeof(v=g)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||n.isBuffer(g))return u?[y(b?r:u(r,p.encoder,m,"key"))+"="+y(u(g,p.encoder,m,"value"))]:[y(r)+"="+y(String(g))];var w,O=[];if(void 0===g)return O;if(s(l))w=l;else{var E=Object.keys(g);w=f?E.sort(f):E}for(var x=0;x0?v+m:""}},function(e,t,r){"use strict";var n=r(2),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(s=a.exec(i))&&f=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:a[c]=o:a={0:o}}o=a}return o}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=l.split(t.delimiter,f),d=-1,h=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(b=i(b)?[b]:b),o.call(c,y)?c[y]=n.combine(c[y],b):c[y]=b}return c}(e,r):e,f=r.plainObjects?Object.create(null):{},p=Object.keys(l),d=0;d0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof a?Promise.resolve(r.value.v).then(c,l):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.RecordManager=void 0;var u=r(1),c=function(){function e(e){this.datasheet=e,this.datasheetId=e.datasheetId,this.apitable=e.apitable}return Object.defineProperty(e.prototype,"APIEndpoint",{get:function(){return"/datasheets/"+this.datasheetId+"/records"},enumerable:!1,configurable:!0}),e.prototype.queryAll=function(e){return s(this,arguments,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:t=0,r=0,i.label=1;case 1:return[4,a(this.apitable.request({path:this.APIEndpoint,params:n({pageSize:u.MAX_RECORD_SIZE,pageNum:++t},e),method:"get"}))];case 2:if(!(o=i.sent()).success)throw Error(o.message);return r=o.data.total,[4,a(o.data.records)];case 3:return[4,i.sent()];case 4:i.sent(),i.label=5;case 5:if(u.MAX_RECORD_SIZE*t<=r)return[3,1];i.label=6;case 6:return[2]}}))}))},e.prototype.query=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apitable.request({path:this.APIEndpoint,params:e,method:"get"})];case 1:return[2,t.sent()]}}))}))},e.prototype.get=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:if(!(t=Array.isArray(e)?e:[e]).length)throw new TypeError("recordIds cant be empty");return[4,this.apitable.request({path:this.APIEndpoint,params:{recordIds:t},method:"get"})];case 1:return[2,r.sent()]}}))}))},e.prototype.create=function(e,t){return void 0===t&&(t=this.apitable.config.fieldKey),o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.apitable.request({path:this.APIEndpoint,params:{fieldKey:t},method:"post",data:{records:e,fieldKey:t}})];case 1:return[2,r.sent()]}}))}))},e.prototype.update=function(e,t){return void 0===t&&(t=this.apitable.config.fieldKey),o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:if(!e.length)throw new TypeError("records cant be empty");return[4,this.apitable.request({path:this.APIEndpoint,params:{fieldKey:t},method:"patch",data:{records:e,fieldKey:t}})];case 1:return[2,r.sent()]}}))}))},e.prototype.delete=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=Array.isArray(e)?e:[e],[4,this.apitable.request({path:this.APIEndpoint,params:{recordIds:t},method:"delete"})];case 1:return[2,r.sent()]}}))}))},e}();t.RecordManager=c},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&t.length>r?t[r+1]:null},t.QPSController=function(e,r){return void 0===e&&(e=5),void 0===r&&(r=50),function(n){return o(void 0,void 0,void 0,(function(){var o,a,u,c,l,f;return i(this,(function(i){switch(i.label){case 0:return(o=t.getResourceId(n.url))?(a=(new Date).getTime(),u=s.APITable.QPSMap.get(o)||{count:1,lastReqTimestamp:a},c=u.count,l=u.lastReqTimestamp,Math.floor(a/1e3)<=Math.floor(l/1e3)?c0?f+r:0,[4,t.wait(f)]):[2,n];case 1:return i.sent(),[2,n]}}))}))}},t.mergeConfig=function(e){var t={host:a.DEFAULT_HOST,fieldKey:"name",requestTimeout:a.DEFAULT_REQUEST_TIMEOUT,logLevel:"Warn",disableClientUserAgent:!1};return n(n({},t),e)},t.isBrowser="undefined"!=typeof window},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(46),t),o(r(47),t),o(r(48),t),o(r(49),t),o(r(50),t),o(r(51),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,function(e){e[e.Datasheet=0]="Datasheet",e[e.Mirror=1]="Mirror",e[e.Folder=2]="Folder",e[e.Form=3]="Form",e[e.Dashboard=4]="Dashboard"}(t.NodeType||(t.NodeType={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APIMetaFieldPropertyFormatEnums=t.Conversion=t.TSymbolAlign=t.ViewType=t.RollUpFuncType=t.FieldType=void 0,function(e){e.Text="Text",e.Number="Number",e.SingleSelect="SingleSelect",e.MultiSelect="MultiSelect",e.DateTime="DateTime",e.Attachment="Attachment",e.MagicLink="MagicLink",e.URL="URL",e.Email="Email",e.Phone="Phone",e.Checkbox="Checkbox",e.Rating="Rating",e.Member="Member",e.MagicLookUp="MagicLookUp",e.Formula="Formula",e.Currency="Currency",e.Percent="Percent",e.SingleText="SingleText",e.AutoNumber="AutoNumber",e.CreatedTime="CreatedTime",e.LastModifiedTime="LastModifiedTime",e.CreatedBy="CreatedBy",e.LastModifiedBy="LastModifiedBy"}(t.FieldType||(t.FieldType={})),function(e){e.VALUES="VALUES",e.AVERAGE="AVERAGE",e.COUNT="COUNT",e.COUNTA="COUNTA",e.COUNTALL="COUNTALL",e.SUM="SUM",e.MIN="MIN",e.MAX="MAX",e.AND="AND",e.OR="OR",e.XOR="XOR",e.CONCATENATE="CONCATENATE",e.ARRAYJOIN="ARRAYJOIN",e.ARRAYUNIQUE="ARRAYUNIQUE",e.ARRAYCOMPACT="ARRAYCOMPACT"}(t.RollUpFuncType||(t.RollUpFuncType={})),function(e){e.Grid="Grid",e.Gallery="Gallery",e.Kanban="Kanban",e.Gantt="Gantt"}(t.ViewType||(t.ViewType={})),function(e){e.Default="Default",e.Left="Left",e.Right="Right"}(t.TSymbolAlign||(t.TSymbolAlign={})),function(e){e.Delete="delete",e.KeepText="keepText"}(t.Conversion||(t.Conversion={})),function(e){e.DateTime="DateTime",e.Number="Number",e.Percent="Percent",e.Currency="Currency"}(t.APIMetaFieldPropertyFormatEnums||(t.APIMetaFieldPropertyFormatEnums={}))}])})); \ No newline at end of file diff --git a/apitable.js/lib/const.ts b/apitable.js/lib/const.ts index 8a1cdb6..db8a982 100644 --- a/apitable.js/lib/const.ts +++ b/apitable.js/lib/const.ts @@ -4,7 +4,7 @@ export const MAX_RECORD_SIZE = 1000; export const QPS = 5; export const MIN_TIME_GAP = 1000 / QPS; // Maximum concurrency, 5 requests per second. export const DST_MAX_RECORDS = 50000; // Maximum number of records in a single datasheet. -export const DEFAULT_HOST = 'https://api.apitable.com'; +export const DEFAULT_HOST = 'https://aitable.ai'; export const FUSION_PATH_PREFIX = '/fusion'; export const DEFAULT_VERSION_PREFIX = '/fusion/v1'; export const DEFAULT_REQUEST_TIMEOUT = 60000; diff --git a/apitable.php/src/ApiTable.php b/apitable.php/src/ApiTable.php index fe8ea80..241fbeb 100644 --- a/apitable.php/src/ApiTable.php +++ b/apitable.php/src/ApiTable.php @@ -16,10 +16,10 @@ class ApiTable { /** * @param string $apiToken (required) your API token, for authentication. * @param string $fieldKey (optional)globally specifies the key of the query and returned field. use column names by default. when value is 'id', field id will be used as the query and return. (Using id can avoid code failure caused by column name modification) - * @param string $host (optional)destination server address, default: https://api.apitable.com + * @param string $host (optional)destination server address, default: https://aitable.ai * @param int $requestTimeout (optional)request expiration time, default 10s. */ - public static function auth($apiToken, $host = 'https://api.apitable.com', $fieldKey = 'name', $requestTimeout = 10) { + public static function auth($apiToken, $host = 'https://aitable.ai', $fieldKey = 'name', $requestTimeout = 10) { self::$apiToken = $apiToken; self::$requestTimeout = $requestTimeout; self::$host = $host; diff --git a/apitable.py/apitable/const.py b/apitable.py/apitable/const.py index 2c9b283..6ca1bbd 100644 --- a/apitable.py/apitable/const.py +++ b/apitable.py/apitable/const.py @@ -5,7 +5,7 @@ except KeyError: MAX_WRITE_RECORDS_PRE_REQ = 10 -API_BASE = "https://apitable.com" +API_BASE = "https://aitable.ai" API_ENDPOINT_DATASHEET = "/fusion/v1/datasheets"