diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 81913375f9..dd15b4f4dc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -55,9 +55,9 @@ /types/aframe/ @devpaul @bertoritger @twastvedt /types/agenda/ @meirgottlieb @princjef /types/agent-base/ @Shinigami92 -/types/aggregate-error/ @BendingBender /types/agora-rtc-sdk/ @menthays /types/airbnb-prop-types/ @milesj +/types/airtable/ @bvalosek /types/ajv-errors/ @afshawnlotfi /types/ajv-merge-patch/ @littlepiggy03 /types/ale-url-parser/ @msn0 @@ -69,12 +69,16 @@ /types/algoliasearch-helper/ @gburgett @haroenv @samouss /types/ali-app/ @taoqf /types/ali-oss/ @ptrdu +/types/align-text/ @claasahl /types/all-keys/ @BendingBender /types/all-property-names/ @BendingBender /types/allure-js-commons/ @zaqqaz /types/almost-equal/ @cmaddalozzo /types/alt/ @Shearerbeard /types/amap-js-api/ @breeze9527 +/types/amap-js-api-indoor-map/ @breeze9527 +/types/amap-js-api-map3d/ @breeze9527 +/types/amap-js-api-place-search/ @breeze9527 /types/amap-js-sdk/ @agasbzj /types/amazon-cognito-auth-js/ @scottescue /types/amazon-product-api/ @MattiLehtinen @alien35 @@ -268,7 +272,7 @@ /types/auto-bind/ @sseppola /types/auto-launch/ @rhysd @unindented /types/auto-sni/ @janwo -/types/autobahn/ @darkl @a904guy @valepu @glenroy37 +/types/autobahn/ @darkl @a904guy @valepu @glenroy37 @spcfran /types/autolinker/ @leonyu /types/autoprefixer/ @odnamrataizem @murt /types/autosize/ @kingdango @keika299 @NeekSandhu @@ -357,7 +361,7 @@ /types/better-curry/ @pocesar /types/better-queue/ @maozedong /types/better-scroll/ @stoneChen @cnjack -/types/better-sqlite3/ @Morfent @matrumz @sant123 @loghorn @andykais +/types/better-sqlite3/ @Morfent @matrumz @sant123 @loghorn @andykais @mrkstwrt /types/bezier-easing/ @ptlis /types/bezier-js/ @danmarshall @Epskampie /types/bgiframe/ @sumegizoltan @@ -387,7 +391,7 @@ /types/bl/ @Bartvds @reconbot /types/blacklist/ @mhegazy /types/blazy/ @julienpa -/types/blessed/ @brynbellomy @skellock +/types/blessed/ @brynbellomy @skellock @mamachanko /types/blissfuljs/ @fskorzec /types/blob-stream/ @erichillah /types/blob-to-buffer/ @nrlquaker @@ -462,6 +466,7 @@ /types/browserslist-useragent/ @nju33 /types/bs58/ @chrootsu @BendingBender /types/bs58/v3/ @chrootsu +/types/bser/ @claasahl /types/bson/ @horiuchi @CaselIT @justingrant /types/btoa/ @johngeorgewright @bricka /types/buble/ @Kocal @@ -476,7 +481,7 @@ /types/bufferstream/ @Bartvds /types/build-output-script/ @BendingBender /types/builtin-modules/ @ajafff -/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga @koblas @bondz @wuha-team @aleccool213 @danmana @kjellmorten @pc-jedi +/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga @koblas @bondz @wuha-team @aleccool213 @danmana @kjellmorten @pc-jedi @lenovouser /types/bull/v2/ @bgrieder @JProgrammer /types/bump-regex/ @silkentrance /types/bunnymq/ @cyrilschumacher @@ -498,7 +503,7 @@ /types/bytewise/ @danwbyrne /types/c3/ @mcliment @gerinjacob @denyo @dmitryshindin @timn /types/cache-manager/ @GausSim -/types/cacheable-request/ @BendingBender +/types/cacheable-request/ @BendingBender @paulmelnikow /types/cached-path-relative/ @TeamworkGuy2 /types/cadesplugin/ @Delagen @kmvi /types/cal-heatmap/ @RetroChrisB @@ -539,6 +544,7 @@ /types/cavy/ @tyler-hoffman /types/cbor/ @pushplay /types/ccap/ @taoqf +/types/center-align/ @claasahl /types/centra/ @twooster /types/cesium/ @Zuzon @hnipps @szechyjs @golyalpha /types/cfn-response/ @ivoisbelongtous @@ -567,6 +573,7 @@ /types/chalk-animation/ @BendingBender /types/chance/ @cbowdon @brikou @cafesanu /types/change-emitter/ @iskandersierra +/types/changelog-parser/ @adamzerella /types/chardet/ @Gebatzens /types/charm/ @Xananax /types/charset/ @cspotcode @@ -581,6 +588,7 @@ /types/cheerio/ @blittle @wmaurer @umarniz @LiJinyao @chennakrishna8 @AzSiAz @nwtgck /types/chess.js/ @JacobFischer /types/chessboardjs/ @sliverb @davidmpaz +/types/child-process-promise/ @TheDSCPL /types/chmodr/ @BendingBender /types/chordsheetjs/ @adamsbloom /types/chosen-js/ @borisyankov @denisname @@ -594,6 +602,7 @@ /types/chromedriver/ @pe8ter /types/cipher-base/ @adamzerella /types/circuit-breaker-js/ @DeTeam +/types/circular-dependency-plugin/ @jeremejevs /types/circular-json/ @jpevarnek /types/ckeditor/ @wittwert @stuartlong @viktorpegy /types/ckeditor/v2/ @wittwert @@ -642,6 +651,7 @@ /types/cloudflare-apps/ @MartynasZilinskas /types/clovelced-plugin-audiomanagement/ @marckassay /types/cls-hooked/ @aleung +/types/clui/ @farzadmf /types/clusterize.js/ @Pr1st0n /types/cmd-shim/ @cspotcode /types/co/ @doniyor2109 @@ -944,12 +954,11 @@ /types/debounce/ @denis-sokolov @joshuakgoldberg @wcarson /types/debounce-fn/ @BendingBender /types/debounce-promise/ @whtsky -/types/debug/ @swook @galtalmor @zamb3zi @brasten @npenin +/types/debug/ @swook @galtalmor @zamb3zi @brasten @npenin @kristianmitk /types/decay/ @enaeseth /types/decode-entities/ @waspothegreat /types/decode-uri-component/ @BendingBender /types/decompress/ @plantain-00 @jbethke -/types/decompress-response/ @DanielRosenwasser /types/decorum/ @dflor003 /types/dedent/ @douglasduteil /types/deep-assign/ @souldreamer @@ -1038,7 +1047,6 @@ /types/dom-clipboard-api/ @43081j /types/dom-helpers/ @mctep /types/dom-inputevent/ @diagramatics -/types/dom-loaded/ @ltetzlaff /types/dom-mediacapture-record/ @eliasmeire /types/dom-to-image/ @JipSterk /types/dom4/ @adidahiya @giladgray @@ -1069,7 +1077,7 @@ /types/download/ @nicojs /types/downloadjs/ @cwmoo740 @josuedevmark /types/dplayer/ @Guanyunhan -/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar @sulf @pablopunk @claudiopro +/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar @sulf @pablopunk @claudiopro @khawkinson /types/drag-timetable/ @chinkan /types/draggabilly/ @jaydubu /types/dragscroll/ @spkellydev @@ -1092,7 +1100,7 @@ /types/dv/ @taoqf /types/dvtng-jss/ @Ptival /types/dw-bxslider-4/ @namerci -/types/dwt/ @yushulx @jbh @lincoln2018 @Tom-Dynamsoft +/types/dwt/ @yushulx @jbh @lincoln2018 @Tom-Dynamsoft @dsueltenfuss /types/dygraphs/ @danvk /types/dymo-label-framework/ @thijskuipers /types/dynatable/ @francoismassart @@ -1144,12 +1152,13 @@ /types/electron-window-state/ @rhysd /types/electron-winstaller/ @shiftkey @unindented /types/elegant-spinner/ @danwbyrne -/types/element-ready/ @BendingBender /types/element-resize-detector/ @saranshkataria @franklixuefei /types/element-resize-event/ @rogierschouten @plgregoire /types/elementtree/ @dwieeb /types/elliptic/ @danwbyrne @Gilthoniel /types/elm/ @thSoft +/types/elo-rank/ @apavlinovic +/types/elv/ @garyaparker /types/email-templates/ @cyrilschumacher @gurisko @blankstar85 /types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north @BryanCrotaz /types/ember/v2/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north @@ -1300,7 +1309,7 @@ /types/express-brute-memcached/ @cyrilschumacher /types/express-brute-mongo/ @cyrilschumacher /types/express-brute-redis/ @scottharwell -/types/express-bunyan-logger/ @shreyjain1994 +/types/express-bunyan-logger/ @shreyjain1994 @mastermatt /types/express-busboy/ @pinguet62 /types/express-cluster/ @nenadalm /types/express-correlation-id/ @natemara @@ -1363,7 +1372,7 @@ /types/eyes/ @brynbellomy /types/ez-plus/ @AndersonFriaca /types/f1/ @neolwc -/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods @bmartinson @RogerioTeixeira @BradleyHill @bmkrol823 @glenngartner +/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods @bmartinson @RogerioTeixeira @BradleyHill @bmkrol823 @glenngartner @codertx /types/facebook-instant-games/ @menushka @oyvindjam /types/facebook-js-sdk/ @amritk @mahmoudzohdi @fluidsonic /types/facebook-pixel/ @noctishsu @@ -1430,8 +1439,6 @@ /types/file-exists/ @BendingBender /types/file-saver/ @cyrilschumacher @DaIgeb @chrismbarr /types/file-url/ @coderslagoon -/types/filenamify/ @rokt33r -/types/filenamify-url/ @cprecioso /types/filesize/ @GiedriusGrabauskas @renchap @Ky6uk @ffxsam /types/fill-pdf/ @westy92 /types/filter-console/ @BendingBender @@ -1464,13 +1471,12 @@ /types/first-run/ @BendingBender /types/fixed-data-table/ @pepaar @stephenjelfs /types/fixed-data-table-2/ @ilivit -/types/fkill/ @BendingBender /types/flagged-respawn/ @BendingBender /types/flat/ @chrootsu /types/fleximap/ @DanielRose /types/flexmonster/ @flexmonster /types/flexslider/ @diullei -/types/flickity/ @clmcgrath @wagich +/types/flickity/ @clmcgrath @wagich @aheber /types/flight/ @jonathanhedren /types/flightplan/ @borislavjivkov /types/flipsnap/ @kubosho @gsino @mayuki @@ -1478,7 +1484,7 @@ /types/flot/ @burlandm @Anticom @admiralsmaster /types/flowdoc/ @animify /types/flowjs/ @ryan10132 -/types/fluent/ @huy-nguyen +/types/fluent/ @huy-nguyen @jamesnimlos /types/fluent-ffmpeg/ @tcaesvk @DingWeizhe @mabidina /types/fluent-langneg/ @huy-nguyen /types/fluent-react/ @huy-nguyen @@ -1506,6 +1512,7 @@ /types/form-urlencoded/ @alepee /types/format-duration/ @Roaders /types/format-io/ @amitbeck +/types/format-number/ @codelovesme /types/format-unicorn/ @kruncher /types/formidable/ @Nemo157 /types/forms/ @suXinjke @@ -1721,13 +1728,11 @@ /types/get-folder-size/ @mszczepanczyk /types/get-func-name/ @BendingBender /types/get-node-dimensions/ @vincekovacs -/types/get-port/ @plantain-00 @BendingBender /types/get-range/ @BendingBender /types/get-res/ @satyarohith /types/get-stdin/ @DanielRosenwasser -/types/get-stream/ @douglasduteil @BendingBender /types/get-urls/ @BendingBender -/types/get-value/ @DanielRosenwasser +/types/get-value/ @DanielRosenwasser @TheMallen /types/getenv/ @impankratov /types/getopts/ @azasypkin /types/getos/ @BendingBender @@ -1796,6 +1801,7 @@ /types/google-cloud__kms/ @ben-tbotlabs /types/google-cloud__pubsub/ @pheromonez @LunaPg @msiviero /types/google-cloud__tasks/ @ifiokjr +/types/google-cloud__text-to-speech/ @benhjames /types/google-earth/ @icholy /types/google-images/ @dolanmiu /types/google-libphonenumber/ @leonyu @winfinit @@ -1824,7 +1830,7 @@ /types/gramps__rest-helpers/ @claude /types/graphite-udp/ @EricByers /types/graphlib-dot/ @DomParfitt -/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz @bradzacher @clayne11 @JCMais @langpavel @mc0 +/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz @bradzacher @clayne11 @JCMais @langpavel @mc0 @martijnwalraven /types/graphql-date/ @enaeseth /types/graphql-deduplicator/ @lfades /types/graphql-depth-limit/ @eritikass @@ -1851,6 +1857,7 @@ /types/grpc-error/ @danwbyrne /types/grunt/ @jeffmay @basarat /types/gsap/ @codebelt @ProbablePrime @philipbulley @leomeloxp @AdemHodzic +/types/gtag.js/ @rokt33r /types/gtin/ @RafaelKr /types/guardian__prosemirror-invisibles/ @dddotsev /types/guid/ @maroy1986 @@ -1891,6 +1898,7 @@ /types/gulp-inject/ @k-kagurazaka /types/gulp-insert/ @shantmarouti /types/gulp-install/ @peterjuras +/types/gulp-intercept/ @TokugawaTakesi /types/gulp-jade/ @berwyn /types/gulp-jasmine/ @andypyrope /types/gulp-jasmine-browser/ @tkrotoff @@ -1924,6 +1932,7 @@ /types/gulp-strip-debug/ @peterjuras /types/gulp-svg-sprite/ @tkqubo /types/gulp-svgmin/ @Aankhen +/types/gulp-tap/ @TokugawaTakesi /types/gulp-task-listing/ @joeskeen /types/gulp-template/ @pe8ter /types/gulp-tsd/ @k-kagurazaka @@ -1962,11 +1971,9 @@ /types/harmony-proxy/ @remojansen /types/has-ansi/ @BendingBender /types/has-emoji/ @BendingBender -/types/has-yarn/ @BendgingBender /types/hash-file/ @HiromiShikata /types/hash-stream/ @BendingBender /types/hash-sum/ @DanielRosenwasser -/types/hasha/ @BendgingBender /types/hasher/ @flyfishMT /types/hashids/ @pocesar /types/hashmap/ @outring @@ -1994,7 +2001,7 @@ /types/hexo-fs/ @segayuu /types/hexo-log/ @segayuu /types/hexo-util/ @segayuu -/types/highcharts/ @damianog @baltie @AlbertOzimek @hanssens @jgresham +/types/highcharts/ @damianog @baltie @AlbertOzimek @hanssens @jgresham @Arunkeshavareddy /types/highcharts-ng/ @scatcher /types/highland/ @Bartvds @hgwood @iwllyu @alvis @notbobthebuilder /types/highlight.js/ @nikeee @sourrust @joshuakgoldberg @@ -2028,9 +2035,10 @@ /types/html-webpack-template/ @bumbleblym /types/html2canvas/ @rwhepburn @tan9 @sschocke @Ristaaf /types/html5-history/ @akashishu777 +/types/html5-to-pdf/ @samalexander /types/html5plus/ @dcloudio /types/htmlbars-inline-precompile/ @chriskrycho -/types/htmlparser2/ @staticfunction @LinusU +/types/htmlparser2/ @staticfunction @LinusU @johandavidson /types/htmltojsx/ @basarat /types/http-assert/ @jkeylu @stripedpajamas /types/http-aws-es/ @marcogrcr @@ -2080,6 +2088,7 @@ /types/icheck/ @qcz /types/icon-gen/ @ffflorian /types/iconv/ @delphinus35 +/types/identicon.js/ @D0miH /types/idyll/ @iocat /types/idyll-ast/ @iocat /types/idyll-compiler/ @iocat @@ -2121,6 +2130,7 @@ /types/iniparser/ @chrootsu /types/init-package-json/ @kfarnung /types/ink/ @cprecioso +/types/ink-select-input/ @lukostry @shatodj /types/ink-spinner/ @lukostry /types/ink-table/ @lukostry /types/ink-testing-library/ @MancunianSam @@ -2128,7 +2138,7 @@ /types/inline-css/ @philipisapain /types/inline-style-prefixer/ @ahz @dpetrezselyova @franklixuefei /types/inputmask/ @dmester -/types/inquirer/ @tkQubo @ppathan @jouderianjr @bang88 @bitjson @synarque @jrockwood @kwkelly @Ailrun +/types/inquirer/ @tkQubo @ppathan @jouderianjr @bang88 @bitjson @synarque @jrockwood @kwkelly @Ailrun @chigix /types/inquirer-npm-name/ @manuth /types/insert-css/ @hvoecking /types/insert-module-globals/ @leonard-thieu @@ -2139,13 +2149,13 @@ /types/intercom-web/ @fongandrew @salbahra @onatm /types/intercomjs/ @spencerwi /types/interpret/ @BendingBender +/types/intersects/ @voxylu /types/intl/ @RagibHasin /types/intl-locales-supported/ @Slessi /types/intl-messageformat/ @mhegazy /types/intl-relativeformat/ @mohsen1 /types/intl-tel-input/ @fdnhkj @leonard-thieu @molnarm /types/intl-tel-input/v13/ @fdnhkj @leonard-thieu -/types/into-stream/ @BendingBender /types/intrinsic-scale/ @shalomdotnet /types/intro.js/ @anahkiasen /types/invariant/ @bennett000 @@ -2181,6 +2191,7 @@ /types/is-ci/ @atd-schubert /types/is-color/ @VitorLuizC /types/is-compressed/ @mhegazy +/types/is-date-object/ @adamzerella /types/is-docker/ @YashdalfTheGray /types/is-dotdir/ @BendingBender /types/is-dotfile/ @BendingBender @@ -2216,7 +2227,6 @@ /types/is-root/ @mhegazy /types/is-root-path/ @mhegazy /types/is-running/ @danwbyrne -/types/is-scoped/ @postcrafter /types/is-stream/ @me /types/is-text-path/ @mhegazy /types/is-touch-device/ @screendriver @@ -2444,7 +2454,7 @@ /types/js-beautify/ @JoshuaKGoldberg @hansrwindhoff /types/js-clipper/ @omni360 /types/js-combinatorics/ @outring -/types/js-cookie/ @theodorejb @BendingBender @alepee +/types/js-cookie/ @theodorejb @BendingBender @alepee @yutod /types/js-data-angular/ @reppners /types/js-fixtures/ @kazimanzurrashid /types/js-git/ @Bartvds @@ -2561,6 +2571,7 @@ /types/k6/ @MajorBreakfast /types/kafka-node/ @dansitu @bkim54 @sfrooster @amiram @insanehong /types/kafkajs/ @michal-b-kaminski +/types/kamailio-kemi/ @bonan /types/karma/ @tkrotoff @43081j @devoto13 /types/karma/v1/ @tkrotoff @43081j /types/karma-chai/ @JayAndCatchFire @@ -2598,7 +2609,6 @@ /types/klaw/v1/ @mceachen /types/klaw-sync/ @shiftkey /types/kms-json/ @sunnyone -/types/knex/ @tkQubo @MeLlamoPablo @mastermatt @micksatana @shreyjain1994 @joelshepherd /types/knex-postgis/ @vesse /types/knockback/ @borisyankov /types/knockout/ @borisyankov @Igorbek @moonpyk @EnableSoftware @BenjaminEckardt @ffMathy @ltlombardi @Retsam @@ -2693,7 +2703,6 @@ /types/lasso/ @darkwebdev /types/later/ @jasond-s /types/latest-semver/ @BendingBender -/types/latest-version/ @BendingBender /types/latinize/ @GiedriusGrabauskas /types/latlon-geohash/ @rimig /types/launchpad/ @rictic @@ -2749,14 +2758,14 @@ /types/leveldown/v1/ @tarruda @LinusU /types/levelup/ @MeirionHughes @danwbyrne /types/levelup/v1/ @blittle @tarruda -/types/leven/ @jmalonzo /types/levenshtein/ @geoffreak /types/libpq/ @Lodin /types/libsodium-wrappers/ @ffflorian /types/libsodium-wrappers-sumo/ @ffflorian /types/libxmljs/ @fdecampredon @ComFreek /types/libxslt/ @alejo90 -/types/license-checker/ @rogierschouten @unindented +/types/license-checker/ @rogierschouten @unindented @alechemy +/types/license-checker-webpack-plugin/ @ChaosinaCan /types/liftoff/ @BendingBender /types/lil-uri/ @wcarson /types/lil-uuid/ @Pr1st0n @@ -3220,7 +3229,6 @@ /types/media-typer/ @BendingBender /types/medium-editor/ @keika299 @pascaliske /types/megajs/ @danwbyrne -/types/mem/ @SamVerschueren /types/mem-cache/ @MutterPedro /types/mem-fs/ @MyFoodBag /types/mem-fs-editor/ @MyFoodBag @@ -3379,7 +3387,7 @@ /types/msgpack5/ @wokim @heycalmdown /types/msnodesql/ @borisyankov @SomaticIT /types/msportalfx-test/ @julioct -/types/mssql/ @jaminfarr @buzinas @mrrichar @elhaard @pkeuter @mcdado +/types/mssql/ @jaminfarr @buzinas @mrrichar @elhaard @pkeuter @mcdado @woodenconsulting /types/mu2/ @jedigo /types/mui-datatables/ @favna @ankithkonda /types/muicss/ @samuelneff @@ -3424,6 +3432,7 @@ /types/natural-compare/ @doniyor2109 /types/natural-compare-lite/ @doniyor2109 /types/natural-sort/ @a-morales @fluggo +/types/naver-whale/ @tbvjaos510 /types/navermaps/ @ckboyjiy /types/navigation/ @grahammendick /types/navigation-react/ @grahammendick @@ -3433,6 +3442,7 @@ /types/nconf/ @jedigo @jmthibault @ew73 /types/ncp/ @bartvds /types/ndarray/ @pawsong @taoqf +/types/ndn-js/ @yoursunny /types/nearley/ @deltaidea @BendingBender /types/neat-csv/ @calamitizer /types/nedb/ @reppners @anthonynichols @afharo @@ -3514,10 +3524,11 @@ /types/node-dijkstra/ @nokutu /types/node-dir/ @panuhorsmalahti /types/node-dogstatsd/ @chrisbobo @xzyfer +/types/node-downloader-helper/ @RemyJeancolas /types/node-emoji/ @jonestristand @styu @rimiti -/types/node-fetch/ @torstenwerner @nikcorg @vinaybedre @kyranet +/types/node-fetch/ @torstenwerner @nikcorg @vinaybedre @kyranet @AndrewLeedham /types/node-fibers/ @caryhaynie -/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung @joeflateau @Apologiz @timhwang21 @supaiku0 @andersk +/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung @joeflateau @Apologiz @timhwang21 @supaiku0 @andersk @saschazar21 /types/node-gcm/ @horiuchi /types/node-geocoder/ @rosek86 /types/node-getopt/ @kcauchy @@ -3565,6 +3576,7 @@ /types/node_redis/ @borisyankov /types/nodecredstash/ @migstopheles /types/nodegit/ @dolanmiu @tniessen @pvigier +/types/nodejs-license-file/ @trodi /types/nodemailer/ @rogierschouten @dex4er @bioball /types/nodemailer/v3/ @rogierschouten /types/nodemailer-direct-transport/ @rogierschouten @@ -3577,6 +3589,7 @@ /types/nodeunit/ @jedigo /types/noisejs/ @izmhr /types/nomnom/ @panopticoncentral +/types/nonogram-solver/ @ffflorian /types/nookies/ @andreasbergqvist /types/nopt/ @jbondc /types/normalize-package-data/ @jdxcode @@ -3591,15 +3604,12 @@ /types/nouislider/v7/ @acoreyj /types/novnc-core/ @smithkl42 @BendingBender /types/npm/ @SomaticIT -/types/npm-email/ @BendingBender -/types/npm-keyword/ @BendingBender /types/npm-license-crawler/ @ffflorian /types/npm-list-author-packages/ @ffflorian /types/npm-package-arg/ @mgroenhoff @OiYouYeahYou /types/npm-packlist/ @ajafff /types/npm-paths/ @BendingBender /types/npm-registry-package-info/ @ffflorian -/types/npm-user/ @BendingBender /types/npm-user-packages/ @BendingBender /types/npmlog/ @DanielMSchmidt @littlepiggy03 /types/ns-api/ @Archcry @@ -3656,6 +3666,7 @@ /types/okta__okta-vue/ @innovation-team /types/ol/ @yairtawil /types/omggif/ @ffflorian +/types/omit-empty/ @pastelsky /types/on-finished/ @czechboy0 @BendingBender /types/on-headers/ @jjeffery @BendingBender /types/on-wake-up/ @ajafff @@ -3668,7 +3679,7 @@ /types/onionoo/ @BendingBender /types/onoff/ @marcel-ernst @Kallu609 /types/ontime/ @Hirse -/types/open/ @Bartvds +/types/open/ @shinnn @SomaticIT @tlent @ffflorian /types/open-editor/ @BendingBender /types/open-graph/ @ffflorian /types/openapi-factory/ @runebaas @@ -3684,9 +3695,8 @@ /types/openlayers/v2/ @bolhovsky /types/openpgp/ @errietta @damonpam @po5i @ecamellini @SardineFish /types/openstack-wrapper/ @sanjaymadane -/types/opentok/ @westy92 @CatGuardian +/types/opentok/ @westy92 @CatGuardian @pronebird /types/opentype.js/ @danmarshall @edzis -/types/opn/ @shinnn @SomaticIT @tlent /types/opossum/ @quinnlangille @merufm @lance @mastermatt /types/optics-agent/ @crevil /types/optimist/ @soywiz @chbrown @@ -3712,34 +3722,16 @@ /types/owl.carousel/ @igorissen @KennethanCeyer /types/owlcarousel/ @dpiatkowski /types/p-all/ @BendingBender -/types/p-any/ @BendingBender -/types/p-cancelable/ @BendingBender -/types/p-catch-if/ @LinusU -/types/p-debounce/ @BendingBender /types/p-defer/ @SamVerschueren @BendingBender /types/p-do-whilst/ @BendingBender -/types/p-each-series/ @BendingBender -/types/p-every/ @BendingBender /types/p-forever/ @BendingBender /types/p-is-promise/ @BendingBender /types/p-lazy/ @BendingBender /types/p-loading/ @renjfk -/types/p-locate/ @BendingBender -/types/p-log/ @BendingBender -/types/p-map-series/ @BendingBender -/types/p-memoize/ @forabi /types/p-min-delay/ @BendingBender -/types/p-one/ @BendingBender -/types/p-progress/ @icopp -/types/p-props/ @BendingBender -/types/p-reduce/ @BendingBender /types/p-reflect/ @BendingBender -/types/p-retry/ @BendingBender -/types/p-series/ @BendingBender /types/p-settle/ @natesilva -/types/p-tap/ @BendingBender /types/p-time/ @BendingBender -/types/p-timeout/ @BendingBender /types/p-times/ @BendingBender /types/p-try/ @BendingBender @LinusU /types/p-wait-for/ @BendingBender @@ -3748,19 +3740,18 @@ /types/p-whilst/ @BendingBender /types/p2/ @clark-stevenson @jramstedt /types/p5/ @p5-types -/types/package-json/ @jinwoo @BendingBender /types/packery/ @piraveen @hanssens /types/pad/ @mhegazy /types/page/ @43081j /types/paho-mqtt/ @amikhalev -/types/pako/ @cappellin @calebegg +/types/pako/ @cappellin @calebegg @hlthi /types/palx/ @mikefowler /types/pangu/ @plantain-00 /types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly @albertorestifo @BehindTheMath @3af @jliuhtonen /types/paper/ @clark-stevenson @Xakaloz @sebaswebdev @rfried /types/parallel-transform/ @djcsdy /types/paralleljs/ @jbaldwin -/types/parcel-bundler/ @pinage404 +/types/parcel-bundler/ @pinage404 @nick-woodward /types/parcel-env/ @fathyb /types/parent-package-json/ @sgmccli /types/parents/ @TeamworkGuy2 @@ -3768,7 +3759,7 @@ /types/parity-pmr/ @leovujanic /types/parity-poe/ @leovujanic /types/park-miller/ @BendingBender -/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas @agoldis @AlexandreHetu +/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas @agoldis @AlexandreHetu @dplewis @yomybaby /types/parse/v1/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas /types/parse-columns/ @BendingBender /types/parse-filepath/ @BendingBender @@ -3821,7 +3812,7 @@ /types/passport-oauth2/ @pasieronen @WangZishi @EduardoAC @ivan94 /types/passport-oauth2-client-password/ @akaNightmare /types/passport-remember-me-extended/ @AylaJK -/types/passport-saml/ @cjbarth @dassennato @ksamborski +/types/passport-saml/ @cjbarth @dassennato @ksamborski @josecolella /types/passport-steam/ @kzay /types/passport-strategy/ @liorm /types/passport-twitter/ @staticfunction @@ -3835,7 +3826,6 @@ /types/path-is-absolute/ @mhegazy /types/path-is-inside/ @aomarks /types/path-regex/ @BendingBender -/types/path-type/ @BendingBender /types/pathfinding/ @BNedry /types/pathjs/ @lokeshpeta /types/pathwatcher/ @GlenCFL @@ -3907,9 +3897,7 @@ /types/piwik-tracker/ @lbguilherme /types/pixelmatch/ @iamolegga /types/pixi.js/ @clark-stevenson -/types/pkg-dir/ @NK-WEB-Git /types/pkg-up/ @forivall -/types/pkg-versions/ @BendingBender /types/pkgcloud/ @dantman /types/pkijs/ @microshine /types/platform/ @JakeH @@ -3939,6 +3927,8 @@ /types/pollyjs__persister-fs/ @feinoujc /types/pollyjs__utils/ @feinoujc /types/polyfill-service/ @Alorel +/types/polygon/ @Nielio +/types/polygons-intersect/ @Nielio /types/polylabel/ @DenisCarriere /types/polyline/ @Kern0 /types/polymer/ @lgrignon @laco0416 @@ -3978,10 +3968,12 @@ /types/pouchdb-upsert/ @keithdmoore @hotforfeature @apolkingg8 @zamb3zi /types/power-assert/ @vvakame /types/power-assert-formatter/ @vvakame +/types/powerapps-component-framework/ @jopursle /types/powerbi-visuals-tools/ @zBritva @Microsoft /types/preact-i18n/ @ltetzlaff /types/precise/ @codeanimal /types/precond/ @olsio +/types/prefixfree/ @ExE-Boss /types/preloadjs/ @endel /types/prelude-ls/ @AyaMorisawa /types/prettier/ @ikatyang @@ -3996,8 +3988,8 @@ /types/preval.macro/ @huan086 /types/printf/ @AluisioASG /types/priorityqueuejs/ @geoffreak -/types/prismic-dom/ @nickw444 @sbilstein -/types/prismjs/ @eriklieben @andrewiggins @mmiszy +/types/prismic-dom/ @nickw444 @sbilstein @douglasnomizo +/types/prismjs/ @RunDevelopment @ExE-Boss @eriklieben @andrewiggins @mmiszy /types/private-ip/ @coderslagoon /types/procfs-stats/ @cyrilschumacher /types/progress/ @sebastian-lenz @@ -4130,6 +4122,7 @@ /types/rangyinputs/ @ersimont /types/raphael/ @CheCoxshall /types/rappid/ @DenEwout +/types/rasha/ @Just1B /types/raspi/ @nebrius /types/raspi-board/ @nebrius /types/raspi-gpio/ @nebrius @@ -4161,7 +4154,7 @@ /types/rdflib/ @cenotelie /types/re-base/ @jordandrako /types/reach__router/ @kingdaro -/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @Jessidhia @pshrmn @saranshkataria +/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @Jessidhia @pshrmn @saranshkataria @lukyth /types/react/v15/ @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz /types/react-adal/ @dkorolev1 /types/react-albus/ @sseppola @conradreuter @kuirak @@ -4176,6 +4169,7 @@ /types/react-autocomplete/ @lstanden /types/react-autosuggest/ @nicolas-schmitt @pjo256 @robessog @tbayne @cdeutsch @rosskevin /types/react-avatar-editor/ @diogocorrea @gabsprates @lsenta @davidspiess +/types/react-axe/ @akshaykarthik /types/react-beautiful-dnd/ @varHarrie @bradleyayers @paustint @marknelissen @enricoboccadifuoco @lonyele @lukyth /types/react-better-password/ @mhuynh1 /types/react-big-calendar/ @piotrwitek @paustint @pikpok @eps1lon @strongpauly @janb87 @ldthorne @siavelis @@ -4190,7 +4184,7 @@ /types/react-breadcrumbs/ @guoyunhe /types/react-breadcrumbs-dynamic/ @mitsuruog /types/react-broadcast/ @kandros -/types/react-burger-menu/ @radziksh +/types/react-burger-menu/ @radziksh @dacevedo12 /types/react-cache/ @skovy /types/react-calendar-heatmap/ @9renpoto /types/react-calendar-timeline/ @radziksh @acemac @@ -4202,7 +4196,7 @@ /types/react-coinhive/ @sktbcbbs /types/react-collapse/ @Kimahriman /types/react-collapsible/ @knegusen -/types/react-color/ @LKay @markspolakovs @mntdn @nkgrnkgr @0815Strohhut +/types/react-color/ @LKay @markspolakovs @mntdn @nkgrnkgr @0815Strohhut @dnlfrst /types/react-confirm/ @santiagodoldan @marknelissen /types/react-content-loader/ @alaatm @samwalshnz /types/react-copy-to-clipboard/ @mabels @BernabeFelix @@ -4242,6 +4236,7 @@ /types/react-dropzone/v2/ @matdube @LynxEyes @goblindegook @benbayard /types/react-dynamic-number/ @eugrdn /types/react-easy-chart/ @danzel +/types/react-editext/ @alioguzhan /types/react-event-listener/ @asvetliakov /types/react-fa/ @flaub @patsissons @LKay /types/react-facebook-login/ @apare @jankarres @@ -4315,7 +4310,7 @@ /types/react-json/ @spielc /types/react-json-pretty/ @LKay /types/react-json-tree/ @gnestor @zainafzal08 -/types/react-jsonschema-form/ @iamdanfox @iplus26 @phbou72 @LucianBuzzo @sthenault @sbusch @medfreeman +/types/react-jsonschema-form/ @iamdanfox @iplus26 @phbou72 @LucianBuzzo @sthenault @sbusch @medfreeman @saadtazi /types/react-jss/ @eps1lon @jlaw90 /types/react-kawaii/ @ZhangYiJiang /types/react-lazyload/ @m0a @@ -4330,7 +4325,7 @@ /types/react-loader/ @artfuldev /types/react-lottie/ @Kana00 @Ricki-BumbleDev /types/react-mailchimp-subscribe/ @osdiab -/types/react-map-gl/ @rimig @fnberta +/types/react-map-gl/ @rimig @fnberta @sandersiim /types/react-maskedinput/ @LKay @lavoaster @CarlosBonetti /types/react-material-ui-form-validator/ @FrankBrullo /types/react-mce/ @morphologue @@ -4344,13 +4339,14 @@ /types/react-motion-loop/ @j-em /types/react-motion-slider/ @asvetliakov /types/react-motion-ui-pack/ @jsonunger -/types/react-native/ @alloy @huhuanming @iRoachie @skn0tt @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software @tkrotoff @a-tarasyuk @mvdam @esemesek @mrnickel @souvik-ghosh @nossbigg @saranshkataria +/types/react-native/ @alloy @huhuanming @iRoachie @skn0tt @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software @tkrotoff @a-tarasyuk @mvdam @esemesek @mrnickel @souvik-ghosh @nossbigg @saranshkataria @franzmoro /types/react-native-android-taskdescription/ @christianchown /types/react-native-auth0/ @ascariandrea @marknelissen /types/react-native-autocomplete-input/ @ifiokjr /types/react-native-background-timer/ @chillkroeteTTS /types/react-native-bluetooth-serial/ @RodrigoAWeber /types/react-native-calendars/ @Tyler-Zhang @DavidNorena @FabianMeul +/types/react-native-canvas/ @hmajid2301 /types/react-native-communications/ @huhuanming @PaitoAnderson /types/react-native-custom-tabs/ @philnova /types/react-native-datepicker/ @jacobbaskin @nossbigg @@ -4421,10 +4417,12 @@ /types/react-native-text-input-mask/ @RodrigoAWeber /types/react-native-toast-native/ @bm-software /types/react-native-touch-id/ @huhuanming @gazaret @jinshin1013 +/types/react-native-uuid/ @hmajid2301 /types/react-native-uuid-generator/ @burtek /types/react-native-vector-icons/ @iRoachie @timwangdev /types/react-native-version-number/ @VincentLanglet /types/react-native-video/ @huhuanming +/types/react-native-view-pdf/ @thesergiomiguel /types/react-native-zeroconf/ @mattapet /types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @magrinj @TizioFittizio @stigi @LinusU @jshosomichi @jakebooyah @brunoro @DenisFrezzato @mickaelw @maxdavidson @alechill @builtbyproxy @jkillian @jeroenvervaeke @chagasaway @denissb @skovhus @azrosen92 @hmajid2301 /types/react-navigation/v2/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @magrinj @TizioFittizio @stigi @LinusU @jshosomichi @jakebooyah @brunoro @DenisFrezzato @mickaelw @maxdavidson @alechill @builtbyproxy @jkillian @jeroenvervaeke @chagasaway @@ -4492,6 +4490,7 @@ /types/react-s-alert/ @mitsuruog /types/react-scroll/ @sudoplz @GiedriusGrabauskas /types/react-scroll-into-view-if-needed/ @angusfretwell @allanpope @jonathanly +/types/react-scrollable-anchor/ @AntoineDoubovetzky /types/react-scrollbar/ @stephenjelfs /types/react-scrollspy/ @ZhangYiJiang /types/react-select/ @claasahl @jonfreedman @@ -4513,6 +4512,7 @@ /types/react-sparklines/ @henrinormak /types/react-spinkit/ @tkqubo @mleko @pelotom @zzanol /types/react-spinkit/v1/ @tkqubo @mleko @pelotom +/types/react-spinner/ @jakeboone02 /types/react-splitter-layout/ @snaptags /types/react-star-rating-component/ @marpstar /types/react-sticky/ @curtisw0 @ajhyndman @@ -4524,7 +4524,7 @@ /types/react-svg-pan-zoom/ @huy-nguyen /types/react-swf/ @stepancar /types/react-swipe/ @DeividasBakanas @AAlakkad -/types/react-swipeable/ @GiedriusGrabauskas @mctep @horiuchi +/types/react-swipeable/ @GiedriusGrabauskas @mctep @horiuchi @adambowles /types/react-swipeable-views/ @mxl @DeividasBakanas /types/react-syntax-highlighter/ @NoHomey @ajgamble-milner /types/react-table/ @royxue @psakalo @Havret @andys8 @Gelio @@ -4539,6 +4539,7 @@ /types/react-test-renderer/v15/ @arvitaly @lochbrunner @lochbrunner @johnnyreilly /types/react-tether/ @ryprice /types/react-text-mask/ @guilhermehubner @cavarzan @needpower +/types/react-text-truncate/ @adriantoine /types/react-textarea-autosize/ @asvetliakov @zry656565 /types/react-timeago/ @koss-lebedev /types/react-timeout/ @kerwynrg @@ -4559,13 +4560,14 @@ /types/react-vertical-timeline-component/ @stephane-monnot /types/react-virtual-keyboard/ @bsurai /types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @Stevearzh @mgoszcz2 @brandonhall @sbusch +/types/react-virtualized-auto-sizer/ @otofu-square /types/react-virtualized-select/ @seansfkelley /types/react-visibility-sensor/ @JRasmusBm @gcangussu /types/react-webcam/ @squat /types/react-weui/ @tairan /types/react-widgets/ @rogierschouten @sanyatuning @frodehansen2 @r3nya @MBillemaz @georg94 @tzarger @vegtelenseg /types/react-widgets-moment/ @dawnmist -/types/react-window/ @martynaskadisa @heyimalex +/types/react-window/ @martynaskadisa @heyimalex @jgoz /types/react-window-size/ @jakejrichards /types/react-wow/ @mikepthomas /types/react-youtube/ @kgtkr @salguerooo @@ -4576,7 +4578,7 @@ /types/reactstrap/v4/ @alihammad @mfal @danilobjr @fabiopaiva /types/read/ @timjk /types/read-package-tree/ @mgroenhoff -/types/read-pkg/ @jdxcode +/types/read-pkg/ @jdxcode @arichardsmith /types/read-pkg-up/ @dudeofawesome @jdxcode /types/readable-stream/ @TeamworkGuy2 /types/readdir-enhanced/ @mrmlnc @@ -4588,7 +4590,7 @@ /types/rebass__grid/ @antonvasin @vittorio @lhache @lavoaster /types/recaptcha2/ @l-jonas /types/recase/ @18steps -/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @paulmelnikow @crusectrl @apalugniok @RobertStigsson @kousaku-maron @iflp +/types/recharts/ @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @crusectrl @apalugniok @RobertStigsson @kousaku-maron @iflp /types/recharts-scale/ @johnnyreilly /types/rechoir/ @BendingBender /types/recluster/ @dex4er @@ -4610,11 +4612,11 @@ /types/reduce-reducers/ @huy-nguyen @daliusd /types/redux-action/ @newraina /types/redux-action-utils/ @tkqubo -/types/redux-actions/ @jaysoo @alexgorbatchev @alechill @alexey-pelykh @7hi4g0 +/types/redux-actions/ @jaysoo @alexgorbatchev @alechill @alexey-pelykh @7hi4g0 @oddui /types/redux-async-queue/ @andreiho /types/redux-auth-wrapper/ @LKay /types/redux-auth-wrapper/v1/ @LKay -/types/redux-batched-subscribe/ @mDibyo +/types/redux-batched-subscribe/ @mDibyo @azizhk /types/redux-debounced/ @seansfkelley /types/redux-devtools/ @mc-petry /types/redux-devtools-dock-monitor/ @mc-petry @@ -4624,7 +4626,7 @@ /types/redux-first-router-link/ @janb87 /types/redux-first-router-restore-scroll/ @icopp /types/redux-first-routing/ @tlaziuk -/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin @ethanresnick @reggino @maddijoyce @smifun @mshaaban088 @esetnik @bwlt +/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin @ethanresnick @reggino @maddijoyce @smifun @mshaaban088 @esetnik @bwlt @mrsekut /types/redux-form/v7/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin @ethanresnick @reggino @maddijoyce @smifun @mshaaban088 @esetnik /types/redux-form/v6/ @carsonf @aikoven @LKay @bancek @mshaaban088 /types/redux-form/v4/ @aikoven @@ -4649,6 +4651,7 @@ /types/redux-recycle/ @LKay /types/redux-router/ @stepancar /types/redux-saga-tester/ @BenLorantfy @lawsumisu +/types/redux-seamless-immutable/ @SoaresMG /types/redux-sentry-middleware/ @dolezel /types/redux-shortcuts/ @tstirrat /types/redux-socket.io/ @snakeego @@ -4678,6 +4681,7 @@ /types/remarkable/ @makepost @chigix /types/remote-origin-url/ @BendingBender /types/remote-redux-devtools/ @ColinEberhardt @unindented @mamodom @colindekker +/types/remotedev-serialize/ @jaulz /types/remove-markdown/ @RagibHasin /types/rename/ @Aankhen /types/repeat-element/ @adamzerella @@ -4711,6 +4715,7 @@ /types/resolve-from/ @unional @BendingBender /types/resolve-from/v2/ @unional /types/resolve-global/ @BendingBender +/types/resolve-options/ @delprzemo /types/resolve-pkg/ @mabels @BendingBender /types/resourcejs/ @shaunluttin /types/response-time/ @urossmolnik @TonyPythoneer @danmana @@ -4743,6 +4748,7 @@ /types/rgrove__parse-xml/ @petejohanson /types/rheostat/ @SashaBayan @kourge @StefanWerW /types/rickshaw/ @niemyjski +/types/right-align/ @claasahl /types/rimraf/ @soywiz @e-cloud @bash /types/riot/ @Stubb0rn /types/riot-api-nodejs/ @zafixlrp @@ -4828,7 +4834,7 @@ /types/sane/ @BendingBender /types/sane-email-validation/ @ForbesLindesay /types/sanitize-filename/ @Nemo157 -/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester @WillGibson @sirMerr +/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester @WillGibson @sirMerr @johandavidson /types/sap__xsenv/ @mad-mike /types/sarif/ @rscrivens /types/sasl-anonymous/ @BendingBender @@ -4857,13 +4863,12 @@ /types/schema-registry/ @bonzzy /types/schwifty/ @ozum /types/scoped-http-client/ @mattvperry @rianadon -/types/screenfull/ @icholy @lionelb @joelshepherd @BendingBender -/types/screenfull/v3/ @icholy @lionelb @joelshepherd /types/screeps/ @MarkoSulamagi @NhanHo @bryanbecker @resir014 @Arcath @dmarcuse /types/screeps-profiler/ @ramblurr /types/script-ext-html-webpack-plugin/ @davecardwell /types/scriptjs/ @ssttevee /types/scroll-into-view/ @zivni +/types/scroll-to-element/ @kirillurgant /types/scroller/ @haskellcamargo /types/scrollparent/ @Sintifo /types/scrollreveal/ @Davidblkx @@ -4880,7 +4885,7 @@ /types/secp256k1/ @anler /types/seed-random/ @l-jonas /types/seededshuffle/ @urish -/types/seedrandom/ @kernhanda +/types/seedrandom/ @kernhanda @EugeneZ /types/seen/ @admvx /types/segment-analytics/ @fongandrew /types/select2/ @borisyankov @denisname @@ -5006,7 +5011,6 @@ /types/simplesmtp/ @rogierschouten /types/simplestorage.js/ @axelcostaspena @mxl /types/sindresorhus__class-names/ @BendingBender -/types/sindresorhus__df/ @whatknight /types/sindresorhus__djb2a/ @BendingBender /types/sindresorhus__fnv1a/ @BendingBender /types/sindresorhus__string-hash/ @BendingBender @@ -5038,14 +5042,15 @@ /types/slackdown/ @nju33 /types/slackify-html/ @hypexr /types/slash/ @BendingBender -/types/slate/ @andykent @majelbstoat @JanLoebel @YangusKhan @kalley @Kornil @isubasti @sgreav @jackall3n +/types/slate/ @andykent @majelbstoat @JanLoebel @YangusKhan @kalley @Kornil @isubasti @sgreav @jackall3n @benjiro /types/slate-base64-serializer/ @YangusKhan /types/slate-html-serializer/ @YangusKhan /types/slate-irc/ @elisee /types/slate-plain-serializer/ @YangusKhan @mkiefel -/types/slate-react/ @andykent @majelbstoat @JanLoebel @PatrickSachs @YangusKhan @isubasti @sgreav @Kornil @jackall3n +/types/slate-react/ @andykent @majelbstoat @JanLoebel @PatrickSachs @YangusKhan @isubasti @sgreav @Kornil @jackall3n @benjiro /types/sleep/ @rajarz /types/slice-ansi/ @dwieeb +/types/slick-carousel/ @Kocal /types/slickgrid/ @jbaldwin /types/slideout/ @ToastHawaii /types/slimerjs/ @alexwall @@ -5177,12 +5182,12 @@ /types/storybook__addon-jest/ @halfmatthalfcat /types/storybook__addon-knobs/ @joscha @martynaskadisa @amacleay @MLoughry @alanhchoi /types/storybook__addon-links/ @joscha @jessepinho -/types/storybook__addon-notes/ @joscha @amacleay @MLoughry /types/storybook__addon-options/ @joscha @simonhn @amacleay @gaetanmaisse @adam187 /types/storybook__addon-storyshots/ @bradleyayers /types/storybook__addon-viewport/ @Vinnl /types/storybook__addons/ @bmatcuk /types/storybook__channels/ @bmatcuk +/types/storybook__preact/ @9renpoto /types/storybook__react/ @joscha @wapgear @dandean /types/storybook__react-native/ @joscha @wapgear @alechill @iRoachie @ceyhuno /types/storybook__vue/ @pntgupta @jurgisrudaks @@ -5227,13 +5232,14 @@ /types/stripe/ @wjohnsto @codeanimal @sampsonjoliver @LinusU @brannon @kkamperschroer @starhoshi @bruun @galtalmor @htunnicliff @squirly @tzarger @ifiokjr @SimonSchick @yultyyev @cpsoinos @adamduren @saranshkataria @0xJoKe @delianides /types/stripe-checkout/ @cgwrench /types/stripe-v2/ @ejsmith @amritk @adamcmiel @jleider @galuszkak -/types/stripe-v3/ @ejsmith @amritk @adamcmiel @jleider @galuszkak @slangeder +/types/stripe-v3/ @ejsmith @amritk @adamcmiel @jleider @galuszkak @slangeder @marlosin /types/stripejs/ @RobinvanTienhoven @mattferderer /types/strong-cluster-control/ @shuntksh /types/strong-error-handler/ @blankstar85 /types/strong-log-transformer/ @azasypkin /types/strophe/ @DavidKDeutsch /types/strophe.js/ @DavidKDeutsch +/types/strophejs-plugin-roster/ @LeartS /types/structured-source/ @azu /types/styled-components/ @Igorbek @Igmat @lavoaster @Jessidhia @jkillian @eps1lon @flavordaaave /types/styled-components/v3/ @Igorbek @Igmat @@ -5241,7 +5247,7 @@ /types/styled-react-modal/ @Lavoaster /types/styled-system/ @maxdeviant @phobon @zephraph @damassi @alloy @maoueh @lavoaster @jschuler @adam187 @gretzky @chrislopresto /types/styled-theming/ @ArjanJ -/types/stylelint/ @alan-agius4 @filipsalpe +/types/stylelint/ @alan-agius4 @filipsalpe @43081j /types/stylelint/v7/ @alan-agius4 /types/stylelint-webpack-plugin/ @bahlo /types/stylenames/ @bengry @@ -5275,7 +5281,7 @@ /types/svg-sprite/ @tkqubo /types/svg-sprite-loader/ @rynclark /types/svg2png/ @hansrwindhoff @sccgithub -/types/svg4everybody/ @BendingBender +/types/svg4everybody/ @BendingBender @bryceosterhaus /types/svgjs.draggable/ @LiFeleSs /types/svgjs.resize/ @jkevingutierrez /types/svgo/ @bradleyayers @giladgray @Aankhen @@ -5335,7 +5341,7 @@ /types/tcp-ping/ @stegano /types/tcp-port-used/ @gautejohan /types/teddy/ @lannonbr -/types/tedious/ @rogierschouten @cjthompson @v-suhame +/types/tedious/ @rogierschouten @cjthompson @v-suhame @guiampm /types/tedious-connection-pool/ @sandorfr /types/telebot/ @mariotsi /types/temp/ @DanielRosenwasser @@ -5368,6 +5374,7 @@ /types/texzilla/ @m93a /types/tgfancy/ @Dabolus /types/theming/ @eps1lon +/types/then-eos/ @seangenabe /types/theo/ @petekp @laitine /types/thepiratebay/ @jsorrell /types/three/ @gyohk @florentpoujol @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @Pro @efokschaner @PsychoSTS @apurvaojas @NotWoods @Methuselah96 @Dukuo @JulianSSS @devilsparta @KonstantinLukaschenko @danyim @saranshkataria @psuter @@ -5422,6 +5429,7 @@ /types/topo/ @BendingBender /types/topojson/ @ricardo-mello @chenzhutian @denisname /types/topojson-client/ @denisname @ricardo-mello +/types/topojson-server/ @ricardo-mello @chenzhutian @denisname @russellporter /types/topojson-simplify/ @denisname @ricardo-mello /types/topojson-specification/ @denisname /types/toposort/ @danwbyrne @@ -5451,7 +5459,7 @@ /types/triplesec/ @threesquared /types/trouter/ @stahlstift /types/trunk8/ @niemyjski -/types/trusted-types/ @vrana +/types/trusted-types/ @vrana @engelsdamien /types/tryer/ @bengry /types/ts-nameof/ @dsherret /types/tspromise/ @soywiz @@ -5467,7 +5475,7 @@ /types/twig/ @soywiz @enko @mtizziani /types/twilio/ @nickiannone @ashleybrener /types/twilio-common/ @gatimus -/types/twilio-video/ @minddocdev @darioblanco +/types/twilio-video/ @minddocdev @darioblanco @ktsn /types/twit/ @Volox @sapphiredev @abraham @siwalikm @plhery @justgoscha /types/twitch-ext/ @beheh @FedeDR /types/twitter/ @BendingBender @@ -5488,6 +5496,7 @@ /types/typography/ @boyeborg @krzysztofzuraw @dominicfallows /types/typpy/ @BendingBender /types/tz-format/ @samverschueren +/types/tz-offset/ @RMHonor /types/ua-parser-js/ @superduper @legendecas @MeLlamoPablo /types/ua-string/ @BendingBender /types/uglify-es/ @alan-agius4 @@ -5512,10 +5521,12 @@ /types/underscore.string/ @rygine /types/undertaker/ @tkqubo @GiedriusGrabauskas /types/undertaker-registry/ @GiedriusGrabauskas +/types/uni-app/ @dcloudio /types/unidecode/ @vfernandestoptal /types/uniq/ @hansrwindhoff /types/uniqid/ @idchlife /types/unique-hash-stream/ @BendingBender +/types/unique-push-id/ @namick /types/unique-random/ @Kuniwak /types/unique-random-array/ @BendingBender /types/unique-string/ @BendingBender @@ -5527,7 +5538,6 @@ /types/unorm/ @chbrown /types/unsplash-js/ @markupcode /types/untildify/ @BendingBender -/types/unused-filename/ @BendingBender /types/unzip/ @coding2012 /types/unzipper/ @s73obrien @natemara @bartje321 /types/update-notifier/ @vvakame @nchen63 @bitjson @grinich @@ -5564,11 +5574,13 @@ /types/user-home/ @mhegazy /types/useragent/ @geoffreak /types/username/ @kayahr @krivachy +/types/uslug/ @rokt33r /types/utf8/ @zelein /types/utif/ @smajl @nkprince007 @massic80 /types/util-deprecate/ @BendingBender /types/util.promisify/ @adamvoss /types/utils-merge/ @chrootsu +/types/utm/ @civilizeddev /types/uuid/ @iamolivinius @felipeochoa @cjbarth /types/uuid-1345/ @mugeso /types/uuid-js/ @mhegazy @@ -5584,13 +5596,15 @@ /types/vali-date/ @SamVerschueren /types/valiant/ @whatasoda /types/valid-url/ @stevehipwell -/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq +/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq @keatz55 /types/validatorjs/ @LKay @danmana @MatiasOlivera /types/vanilla-modal/ @samnau /types/vanilla-tilt/ @BrunnerLivio +/types/vara/ @Chnapy /types/varint/ @dbrockman /types/vary/ @BendingBender /types/vast-client/ @jgainfort @kobawan +/types/vec2/ @Nielio /types/vec3/ @xstoudi /types/vectorious/ @erikgerrits /types/velocity-animate/ @smrq @@ -5658,7 +5672,6 @@ /types/walk/ @poppa /types/wallabyjs/ @andrewconnell /types/wallop/ @leemcd56 -/types/wallpaper/ @BendingBender /types/wampy/ @KSDaemon /types/warning/ @cvle /types/watch/ @soywiz @Perlmint @@ -5711,6 +5724,7 @@ /types/webpack-merge/v0/ @deevus /types/webpack-node-externals/ @mtraynham /types/webpack-notifier/ @bumbleblym +/types/webpack-plugin-serve/ @PlayMa256 /types/webpack-serve/ @rynclark @Jokcy @ZSkycat /types/webpack-serve/v1/ @rynclark @Jokcy @ZSkycat /types/webpack-sources/ @e-cloud @chriseppstein @@ -5772,10 +5786,12 @@ /types/word-list-json/ @dovidm /types/word2vector/ @renekeijzer /types/wordcloud/ @joeskeen +/types/wordpress__jest-console/ @mistic100 /types/words-to-numbers/ @James-Frowen /types/wordwrap/ @ark120202 /types/workbox-sw/ @wessberg /types/workbox-webpack-plugin/ @kgroat +/types/workbox-webpack-plugin/v3/ @kgroat /types/worker-threads-pool/ @BendingBender /types/workerpool/ @Alorel /types/wpapi/ @guoyunhe @@ -5801,7 +5817,7 @@ /types/xml-parser/ @mhfrantz /types/xml2js/ @michelsalib @jasonrm @ccurrens @edwardhinkle @BehindTheMath @claasahl /types/xml2json/ @dolanmiu -/types/xmlbuilder/ @wallymathieu +/types/xmlbuilder/ @wallymathieu @GaikwadPratik /types/xmldoc/ @Xstoudi @ajsheehan @notlaforge /types/xmldom/ @tkqubo /types/xmlpoke/ @garthk @@ -5834,7 +5850,7 @@ /types/ydn-db/ @yathit @gabrielmaldi /types/year-days/ @BendingBender /types/yeoman-assert/ @Toilal -/types/yeoman-generator/ @armorik83 @janslow @ikatyang @tasadar2 @haggen +/types/yeoman-generator/ @armorik83 @janslow @ikatyang @tasadar2 @haggen @chigix /types/yeoman-test/ @ikatyang /types/yesql/ @Sumolari /types/yn/ @BendingBender @@ -5850,6 +5866,7 @@ /types/yui/ @giabao /types/yup/ @dhardtke @vtserman @MoretonBayRC @sseppola @YashdalfTheGray @vincentjames501 @robertbullen @sat0yu @dancrumb /types/z-schema/ @pgonzal +/types/zeit__next-source-maps/ @ldthorne /types/zeit__next-typescript/ @icopp /types/zen-observable/ @aicest @JounQin @itomtom /types/zen-push/ @daprahamian diff --git a/README.es.md b/README.es.md index df675cbe41..4ba1be28fc 100644 --- a/README.es.md +++ b/README.es.md @@ -332,5 +332,3 @@ Es más apropiado importar este módulo utilizando la sintaxis `import foo = req Este proyecto es licenciado bajo la licencia MIT. Los derechos de autor de cada archivo de definición son respectivos de cada contribuidor listado al comienzo de cada archivo de definición. - -[![Analytics](https://ga-beacon.appspot.com/UA-47495295-4/borisyankov/DefinitelyTyped)](https://github.com/igrigorik/ga-beacon) diff --git a/README.ko.md b/README.ko.md index 224967a9dc..4314ccdc71 100644 --- a/README.ko.md +++ b/README.ko.md @@ -334,5 +334,3 @@ NPM 패키지의 경우, `node -p 'require("foo")'` 가 원하는 값이라면 ` 이 프로젝트는 MIT license 가 적용되어 있습니다. 각 자료형 정의(Type definition) 파일들의 저작권은 각 기여자들에게 있으며, 기여자들은 해당 자료형 정의(Type definition) 파일들의 맨 위에 나열되어 있습니다. - -[![Analytics](https://ga-beacon.appspot.com/UA-47495295-4/borisyankov/DefinitelyTyped)](https://github.com/igrigorik/ga-beacon) diff --git a/README.md b/README.md index b50272dbf4..27dbbd1638 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ When a package [bundles](http://www.typescriptlang.org/docs/handbook/declaration You can remove it by running `npm run not-needed -- typingsPackageName asOfVersion sourceRepoURL [libraryName]`. - `typingsPackageName`: This is the name of the directory to delete. -- `asOfVersion`: A stub will be published to `@types/foo` with this version. Should be higher than any currently published version. +- `asOfVersion`: A stub will be published to `@types/foo` with this version. Should be higher than any currently published version, and should be a version of `foo` on npm. - `sourceRepoURL`: This should point to the repository that contains the typings. - `libraryName`: Name of npm package that replaces the Definitely Typed types. Usually this is identical to "typingsPackageName", in which case you can omit it. @@ -452,5 +452,3 @@ GitHub doesn't [support](http://stackoverflow.com/questions/5646174/how-to-make- This project is licensed under the MIT license. Copyrights on the definition files are respective of each contributor listed at the beginning of each definition file. - -[![Analytics](https://ga-beacon.appspot.com/UA-47495295-4/borisyankov/DefinitelyTyped)](https://github.com/igrigorik/ga-beacon) diff --git a/README.ru.md b/README.ru.md index 9186c2ddd5..fc2eb49c47 100644 --- a/README.ru.md +++ b/README.ru.md @@ -346,8 +346,6 @@ GitHub не [поддерживает](http://stackoverflow.com/questions/564617 Авторские права на файлы определений принадлежат каждому участнику, указанному в начале каждого файла определения. -[![Analytics](https://ga-beacon.appspot.com/UA-47495295-4/borisyankov/DefinitelyTyped)](https://github.com/igrigorik/ga-beacon) - [![Build Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.types-publisher-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=13) В среднем пакеты публикуются на npm менее чем за 10000 секунд? [![Build Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.typescript-bot-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=14) Был ли typescript-bot активным на DefinitelyTyped в последние два часа? diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..ecd56b7e2e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,24 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml +jobs: +- job: npmRunTest + pool: + vmImage: 'Ubuntu 16.04' + demands: npm + + timeoutInMinutes: 360 + + steps: + - task: Npm@1 + displayName: 'npm install' + inputs: + verbose: false + + - script: 'git checkout -- . && npm run test' + displayName: 'npm run test' + +trigger: +- master + \ No newline at end of file diff --git a/notNeededPackages.json b/notNeededPackages.json index cf61daf58d..4df3f8e095 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -570,6 +570,12 @@ "sourceRepoURL": "https://github.com/eggjs/egg", "asOfVersion": "1.5.0" }, + { + "libraryName": "elastic-apm-node", + "typingsPackageName": "elastic-apm-node", + "sourceRepoURL": "https://github.com/elastic/apm-agent-nodejs", + "asOfVersion": "2.7.0" + }, { "libraryName": "electron", "typingsPackageName": "electron", @@ -786,6 +792,12 @@ "sourceRepoURL": "https://github.com/manuelbieh/Geolib", "asOfVersion": "2.0.23" }, + { + "libraryName": "get-port", + "typingsPackageName": "get-port", + "sourceRepoURL": "https://github.com/sindresorhus/get-port", + "asOfVersion": "4.2.0" + }, { "libraryName": "get-stream", "typingsPackageName": "get-stream", @@ -1410,6 +1422,12 @@ "sourceRepoURL": "http://onsen.io", "asOfVersion": "2.0.0" }, + { + "libraryName": "opn", + "typingsPackageName": "opn", + "sourceRepoURL": "https://github.com/sindresorhus/opn", + "asOfVersion": "5.5.0" + }, { "libraryName": "ora", "typingsPackageName": "ora", @@ -2124,6 +2142,12 @@ "sourceRepoURL": "https://servicestack.net/", "asOfVersion": "0.1.5" }, + { + "libraryName": "@storybook/addon-notes", + "typingsPackageName": "storybook__addon-notes", + "sourceRepoURL": "https://github.com/storybooks/storybook", + "asOfVersion": "5.0.0" + }, { "libraryName": "striptags", "typingsPackageName": "striptags", diff --git a/types/activestorage/index.d.ts b/types/activestorage/index.d.ts index e8214d2d8e..544c9bca60 100644 --- a/types/activestorage/index.d.ts +++ b/types/activestorage/index.d.ts @@ -13,7 +13,7 @@ export class DirectUpload { file: File; url: string; - constructor(file: File, url: string, delegate: DirectUploadDelegate) + constructor(file: File, url: string, delegate?: DirectUploadDelegate) create(callback: (error: Error, blob: Blob) => void): void; } diff --git a/types/airbnb-prop-types/airbnb-prop-types-tests.ts b/types/airbnb-prop-types/airbnb-prop-types-tests.ts index 7b79086848..9272fe6ddc 100644 --- a/types/airbnb-prop-types/airbnb-prop-types-tests.ts +++ b/types/airbnb-prop-types/airbnb-prop-types-tests.ts @@ -104,12 +104,13 @@ AirbnbPropTypes.forbidExtraProps({ // $ExpectType Requireable AirbnbPropTypes.integer(); -// $ExpectType Requireable<{}> -AirbnbPropTypes.keysOf(PropTypes.number); -// $ExpectType Requireable<{}> -AirbnbPropTypes.keysOf(PropTypes.number, 'foo'); -// $ExpectType Requireable<{}> -AirbnbPropTypes.keysOf(PropTypes.oneOf(['foo', 'bar'])); +const top = ((x?: T): T => x!)(); +type Top = typeof top; +declare function validateRequireableTop(x: React.Requireable): void; + +validateRequireableTop(AirbnbPropTypes.keysOf(PropTypes.number)); +validateRequireableTop(AirbnbPropTypes.keysOf(PropTypes.number, 'foo')); +validateRequireableTop(AirbnbPropTypes.keysOf(PropTypes.oneOf(['foo', 'bar']))); // $ExpectType Requireable AirbnbPropTypes.mutuallyExclusiveProps(PropTypes.number); @@ -137,8 +138,8 @@ AirbnbPropTypes.nonNegativeNumber(); // $ExpectType Requireable AirbnbPropTypes.numericString(); -// $ExpectType Requireable<{}> -AirbnbPropTypes.object(); +// $ExpectType Requireable +const props: PropTypes.Requireable = AirbnbPropTypes.object(); // $ExpectType Requireable<{ foo: string; }> AirbnbPropTypes.object<{ foo: string }>(); @@ -156,23 +157,17 @@ AirbnbPropTypes.requiredBy('foo', PropTypes.string); // $ExpectType Validator AirbnbPropTypes.requiredBy('bar', PropTypes.number, 42).isRequired; -// $ExpectType Requireable<{}> -AirbnbPropTypes.restrictedProp(); -// $ExpectType Requireable<{}> -AirbnbPropTypes.restrictedProp(() => 'Error'); -// $ExpectType Requireable<{}> -AirbnbPropTypes.restrictedProp(() => new Error('Error')); +validateRequireableTop(AirbnbPropTypes.restrictedProp()); +validateRequireableTop(AirbnbPropTypes.restrictedProp(() => 'Error')); +validateRequireableTop(AirbnbPropTypes.restrictedProp(() => new Error('Error'))); -// $ExpectType Requireable<{}> -AirbnbPropTypes.sequenceOf({ validator: PropTypes.number }); -// $ExpectType Requireable<{}> -AirbnbPropTypes.sequenceOf({ validator: PropTypes.number }, { validator: PropTypes.string }); -// $ExpectType Requireable<{}> -AirbnbPropTypes.sequenceOf( +validateRequireableTop(AirbnbPropTypes.sequenceOf({ validator: PropTypes.number })); +validateRequireableTop(AirbnbPropTypes.sequenceOf({ validator: PropTypes.number }, { validator: PropTypes.string })); +validateRequireableTop(AirbnbPropTypes.sequenceOf( { validator: PropTypes.number, min: 0, max: 10 }, { validator: PropTypes.string }, { validator: PropTypes.bool }, -); +)); interface ShapeShape { foo: string; diff --git a/types/airtable/airtable-tests.ts b/types/airtable/airtable-tests.ts new file mode 100644 index 0000000000..7d7dfbdc60 --- /dev/null +++ b/types/airtable/airtable-tests.ts @@ -0,0 +1,43 @@ +import * as Airtable from 'airtable'; + +interface Row extends Airtable.FieldSet { + field1: string; + attachments: Airtable.Attachment[]; +} + +const airtable = new Airtable(); + +const base = airtable.base('app id'); + +const table = base('table name') as Airtable.Table; + +async () => { + const query = table.select(); + { + const rows = await query.all(); + for (const row of rows) { + row.id; // $ExpectType string + row.fields.field1; // $ExpectType string + for (const attachment of row.fields.attachments) { + attachment.id; // $ExpectType string + attachment.filename; // $ExpectType string + attachment.size; // $ExpectType number + attachment.type; // $ExpectType string + attachment.url; // $ExpectType string + if (attachment.thumbnails) { + attachment.thumbnails.full.height; // $ExpectType number + attachment.thumbnails.full.width; // $ExpectType number + attachment.thumbnails.full.url; // $ExpectType string + + attachment.thumbnails.large.height; // $ExpectType number + attachment.thumbnails.large.width; // $ExpectType number + attachment.thumbnails.large.url; // $ExpectType string + + attachment.thumbnails.small.height; // $ExpectType number + attachment.thumbnails.small.width; // $ExpectType number + attachment.thumbnails.small.url; // $ExpectType string + } + } + } + } +}; diff --git a/types/airtable/index.d.ts b/types/airtable/index.d.ts new file mode 100644 index 0000000000..f3b6efa4ee --- /dev/null +++ b/types/airtable/index.d.ts @@ -0,0 +1,62 @@ +// Type definitions for airtable 0.5 +// Project: https://github.com/airtable/airtable.js +// Definitions by: Brandon Valosek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = Airtable; + +declare global { + class Airtable { + base(appId: string): Airtable.Base; + } + + namespace Airtable { + interface FieldSet { + [ key: string ]: undefined | string | ReadonlyArray; + } + + interface Base { + (tableName: string): Table<{}>; + } + + interface Table { + select(opt?: SelectOptions): Query; + } + + interface SelectOptions { + view?: string; + } + + interface Query { + all(): Promise>; + firstPage(): Promise>; + } + + type Response = ReadonlyArray>; + + interface Row { + id: string; + fields: TFields; + } + + interface Attachment { + id: string; + url: string; + filename: string; + size: number; + type: string; + thumbnails?: { + small: Thumbnail; + large: Thumbnail; + full: Thumbnail; + }; + } + + interface Thumbnail { + url: string; + width: number; + height: number; + } + } +} diff --git a/types/get-port/tsconfig.json b/types/airtable/tsconfig.json similarity index 94% rename from types/get-port/tsconfig.json rename to types/airtable/tsconfig.json index 0d9f3a8975..9ec625d762 100644 --- a/types/get-port/tsconfig.json +++ b/types/airtable/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "get-port-tests.ts" + "airtable-tests.ts" ] } diff --git a/types/storybook__addon-notes/tslint.json b/types/airtable/tslint.json similarity index 100% rename from types/storybook__addon-notes/tslint.json rename to types/airtable/tslint.json diff --git a/types/align-text/index.d.ts b/types/align-text/index.d.ts new file mode 100644 index 0000000000..ad72062b34 --- /dev/null +++ b/types/align-text/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for align-text 1.0 +// Project: https://github.com/jonschlinkert/align-text +// Definitions by: Claas Ahlrichs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +interface TransformResult { + /** + * the amount of indentation to use. Default is 0 when an object is returned. + */ + indent: number; + /** + * the character to use for indentation. Default is '' (empty string) when an object is returned. + */ + character: string; + /** + * leading characters to use at the beginning of each line. '' (empty string) when an object is returned. + */ + prefix: string; +} + +interface Callback { + /** + * @param len the length of the "current" line + * @param longest the length of the longest line + * @param line the current line (string) being aligned + * @param lines the array of all lines + */ + (len: number, longest: number, line: string, lines: string[]): + | number + | TransformResult; +} + +declare function align_text(text: string, fn?: number | Callback): string; +declare function align_text(text: any[], fn?: number | Callback): string[]; + +export = align_text; diff --git a/types/align-text/test/array.ts b/types/align-text/test/array.ts new file mode 100644 index 0000000000..4d5fef3479 --- /dev/null +++ b/types/align-text/test/array.ts @@ -0,0 +1,6 @@ +import align from "align-text"; + +const text = ["abc", true, 123456, { hello: "world" }]; +align(text, 4); + +align(text); diff --git a/types/align-text/test/center-complex.ts b/types/align-text/test/center-complex.ts new file mode 100644 index 0000000000..8520f92583 --- /dev/null +++ b/types/align-text/test/center-complex.ts @@ -0,0 +1,12 @@ +import align from "align-text"; + +function centerAlign(len: number, longest: number) { + return { + character: "\t", + indent: Math.floor((longest - len) / 2), + prefix: "~ " + }; +} + +const text = ["abc", "abc", "abc"]; +align(text, centerAlign); diff --git a/types/align-text/test/center-simple.ts b/types/align-text/test/center-simple.ts new file mode 100644 index 0000000000..5400551b81 --- /dev/null +++ b/types/align-text/test/center-simple.ts @@ -0,0 +1,8 @@ +import align from "align-text"; + +function centerAlign(len: number, longest: number) { + return Math.floor((longest - len) / 2); +} + +const text = ["abc", "abc", "abc"]; +align(text, centerAlign); diff --git a/types/align-text/test/simple.ts b/types/align-text/test/simple.ts new file mode 100644 index 0000000000..65ef81fcf0 --- /dev/null +++ b/types/align-text/test/simple.ts @@ -0,0 +1,8 @@ +import align from "align-text"; + +const text = ["abc", "abc", "abc"]; +align(text, 4); + +align("abc", 2); + +align("abc"); diff --git a/types/align-text/tsconfig.json b/types/align-text/tsconfig.json new file mode 100644 index 0000000000..bdea3b3399 --- /dev/null +++ b/types/align-text/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true + }, + "files": [ + "index.d.ts", + "test/simple.ts", + "test/center-simple.ts", + "test/center-complex.ts", + "test/array.ts" + ] +} diff --git a/types/align-text/tslint.json b/types/align-text/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/align-text/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/amap-js-api-autocomplete/amap-js-api-autocomplete-tests.ts b/types/amap-js-api-autocomplete/amap-js-api-autocomplete-tests.ts new file mode 100644 index 0000000000..fb1b0d9b6b --- /dev/null +++ b/types/amap-js-api-autocomplete/amap-js-api-autocomplete-tests.ts @@ -0,0 +1,108 @@ +declare const div: HTMLDivElement; + +const input = document.createElement('input'); +// $ExpectType Autocomplete +const autoComplete = new AMap.Autocomplete(); +// $ExpectType Autocomplete +new AMap.Autocomplete({}); +// $ExpectType Autocomplete +new AMap.Autocomplete({ + type: 'type', + city: 'city', + datatype: 'all', + citylimit: true, + input: 'input', + output: 'output', + outPutDirAuto: true +}); +// $ExpectType Autocomplete +new AMap.Autocomplete({ + type: 'type', + city: 'city', + datatype: 'all', + citylimit: true, + input, + output: div, + outPutDirAuto: true +}); + +autoComplete.search('keyword', (status, result) => { + const temp: 'error' | 'complete' | 'no_data' = status; + if (typeof result !== 'string') { + // $ExpectType number + result.count; + // $ExpectType string + result.info; + // $ExpectType Tip[] + result.tips; + { + const tip = result.tips[0]; + // $ExpectType string + tip.adcode; + // $ExpectType string + tip.address; + // $ExpectType any[] + tip.city; + // $ExpectType string + tip.district; + // $ExpectType string + tip.id; + // $ExpectType LngLat + tip.location; + // $ExpectType string + tip.name; + // $ExpectType string + tip.typecode; + } + } else { + // $ExpectType string + result; + } +}); + +// $ExpectType void +autoComplete.setType(); +// $ExpectType void +autoComplete.setType('type'); + +// $ExpectType void +autoComplete.setCity(); +// $ExpectType void +autoComplete.setCity('city'); + +// $ExpectType void +autoComplete.setCityLimit(false); + +autoComplete.on('complete', (event: AMap.Autocomplete.EventMap['complete']) => { + // $ExpectType "complete" + event.type; + // $ExpectType string + event.info; + if ('tips' in event) { + // $ExpectType number + event.count; + // $ExpectType Tip[] + event.tips; + } +}); + +autoComplete.on('error', (event: AMap.Autocomplete.EventMap['error']) => { + // $ExpectType "error" + event.type; + // $ExpectType string + event.info; +}); + +autoComplete.on('select', (event: AMap.Autocomplete.EventMap['select']) => { + // $ExpectType "select" + event.type; + // $ExpectType Tip + event.tip; +}); + +autoComplete.on('choose', (event: AMap.Autocomplete.EventMap['choose']) => { + // $ExpectType "choose" + event.type; + // $ExpectType Tip + event.tip; +}); diff --git a/types/amap-js-api-autocomplete/index.d.ts b/types/amap-js-api-autocomplete/index.d.ts new file mode 100644 index 0000000000..4bfc934395 --- /dev/null +++ b/types/amap-js-api-autocomplete/index.d.ts @@ -0,0 +1,144 @@ +// Type definitions for non-npm package amap-js-api-autocomplete 1.4 +// Project: https://lbs.amap.com/api/javascript-api/reference/search#m_AMap.Autocomplete +// Definitions by: breeze9527 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +declare namespace AMap { + namespace Autocomplete { + interface EventMap { + complete: Event<'complete', SearchResult | { info: string }>; + error: Event<'error', { info: string }>; + select: Event<'select', { tip: Tip }>; + choose: Event<'choose', { tip: Tip }>; + } + type DataType = 'all' | 'bus' | 'poi' | 'busline'; + interface Options { + /** + * 输入提示时限定POI类型,多个类型用“|”分隔 + */ + type?: string; + /** + * 输入提示时限定城市 + */ + city?: string; + /** + * 返回的数据类型 + */ + datatype?: DataType; + /** + * 是否强制限制在设置的城市内搜索 + */ + citylimit?: boolean; + /** + * 指定输入框 + */ + input?: string | HTMLInputElement; + /** + * 指定输出面板 + */ + output?: string | HTMLDivElement; + /** + * 是否在input位于页面较下方的时候自动将输入面板显示在input上方以避免被遮挡 + */ + outPutDirAuto?: boolean; + + // internal + closeResultOnScroll?: boolean; + lang?: Lang; + } + interface Tip { + /** + * 名称 + */ + name: string; + /** + * 所属区域 + */ + district: string; + /** + * 区域编码 + */ + adcode: string; + /** + * 地址 + */ + address: string; + /** + * 城市 + */ + city: any[]; + /** + * ID + */ + id: string; + /** + * 坐标经纬度 + */ + location: LngLat; + /** + * 类型编码 + */ + typecode: string; + } + interface SearchResult { + /** + * 查询状态说明 + */ + info: string; + /** + * 输入提示条数 + */ + count: number; + /** + * 输入提示列表 + */ + tips: Tip[]; + } + type SearchStatus = 'complete' | 'error' | 'no_data'; + } + class Autocomplete extends EventEmitter { + /** + * 输入提示,根据输入关键字提示匹配信息 + * @param options 选项 + */ + constructor(options?: Autocomplete.Options); + /** + * 根据输入关键字提示匹配信息 + * @param keyword 关键字 + * @param callback 回调 + */ + search( + keyword: string, + callback: (status: Autocomplete.SearchStatus, result: Autocomplete.SearchResult | string) => void + ): void; + /** + * 设置提示Poi类型,多个类型用“|”分隔 + * @param type Poi类型 + */ + setType(type?: string): void; + /** + * 设置城市 + * @param city 城市 + */ + setCity(city?: string): void; + /** + * 设置是否强制限制城市 + * @param cityLimit 是否强制限制城市 + */ + setCityLimit(cityLimit: boolean): void; + + // internal + /** + * 设置查询语言 + * @param lang 语言 + */ + setLang(lang?: Lang): void; + /** + * 返回查询语言 + */ + getLang(): Lang | undefined; + } +} diff --git a/types/amap-js-api-autocomplete/tsconfig.json b/types/amap-js-api-autocomplete/tsconfig.json new file mode 100644 index 0000000000..f6019445f5 --- /dev/null +++ b/types/amap-js-api-autocomplete/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noEmit": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amap-js-api-autocomplete-tests.ts" + ] +} diff --git a/types/elastic-apm-node/tslint.json b/types/amap-js-api-autocomplete/tslint.json similarity index 100% rename from types/elastic-apm-node/tslint.json rename to types/amap-js-api-autocomplete/tslint.json diff --git a/types/amap-js-api-geocoder/amap-js-api-geocoder-tests.ts b/types/amap-js-api-geocoder/amap-js-api-geocoder-tests.ts new file mode 100644 index 0000000000..51feb02694 --- /dev/null +++ b/types/amap-js-api-geocoder/amap-js-api-geocoder-tests.ts @@ -0,0 +1,227 @@ +declare const lnglat: AMap.LngLat; +declare const lnglatTuple: [number, number]; + +// $ExpectType Geocoder +new AMap.Geocoder(); +// $ExpectType Geocoder +new AMap.Geocoder({}); +// $ExpectType Geocoder +const geocoder = new AMap.Geocoder({ + city: 'city', + radius: 10, + lang: 'zh_cn', + batch: true, + extensions: 'all' +}); + +// $ExpectType void +geocoder.getLocation('address', (status, result) => { + // $ExpectType SearchStatus + status; + if (typeof result !== 'string') { + const geocode = result.geocodes[0]; + const addressComponent = geocode.addressComponent; + // $ExpectType string + result.info; + // $ExpectType string + result.resultNum; + // $ExpectType string + geocode.adcode; + // $ExpectType string + geocode.formattedAddress; + // $ExpectType string + geocode.level; + // $ExpectType LngLat + geocode.location; + // $ExpectType string + addressComponent.building; + // $ExpectType string + addressComponent.building; + // $ExpectType string + addressComponent.buildingType; + // $ExpectType string + addressComponent.city; + // $ExpectType string + addressComponent.citycode; + // $ExpectType string + addressComponent.district; + // $ExpectType string + addressComponent.neighborhood; + // $ExpectType string + addressComponent.neighborhoodType; + // $ExpectType string + addressComponent.province; + // $ExpectType string + addressComponent.street; + // $ExpectType string + addressComponent.streetNumber; + // $ExpectType string + addressComponent.township; + } else { + // $ExpectType string + result; + } +}); + +// $ExpectType void +geocoder.getLocation(['address', 'address'], () => { }); + +// $ExpectType void +geocoder.setCity(); +// $ExpectType void +geocoder.setCity('city'); + +// $ExpectType void +geocoder.getAddress(lnglat, (status, result) => { + // $ExpectType SearchStatus + status; + if (typeof result !== 'string') { + // $ExpectType string + result.info; + + // $ExpectType ReGeocode + const regeocode = result.regeocode; + // $ExpectType ReGeocodeAddressComponent + const addressComponent = regeocode.addressComponent; + { + // $ExpectType string + addressComponent.adcode; + // $ExpectType string + addressComponent.building; + // $ExpectType string + addressComponent.buildingType; + // $ExpectType BuildingArea[] + addressComponent.businessAreas; + { + const businessArea = addressComponent.businessAreas[0]; + // $ExpectType string + businessArea.id; + // $ExpectType LngLat + businessArea.location; + // $ExpectType string + businessArea.name; + } + // $ExpectType string + addressComponent.city; + // $ExpectType string + addressComponent.citycode; + // $ExpectType string + addressComponent.district; + // $ExpectType string + addressComponent.neighborhood; + // $ExpectType string + addressComponent.neighborhoodType; + // $ExpectType string + addressComponent.province; + // $ExpectType string + addressComponent.street; + // $ExpectType string + addressComponent.streetNumber; + // $ExpectType string + addressComponent.township; + } + // $ExpectType Cross[] + regeocode.crosses; + { + const cross = regeocode.crosses[0]; + // $ExpectType string + cross.direction; + // $ExpectType number + cross.distance; + // $ExpectType string + cross.first_id; + // $ExpectType string + cross.first_name; + // $ExpectType LngLat + cross.location; + // $ExpectType string + cross.second_id; + // $ExpectType string + cross.second_name; + } + // $ExpectType string + regeocode.formattedAddress; + // $ExpectType ReGeocodePoi[] + regeocode.pois; + { + const poi = regeocode.pois[0]; + // $ExpectType string + poi.address; + // $ExpectType string + poi.businessArea; + // $ExpectType string + poi.direction; + // $ExpectType number + poi.distance; + // $ExpectType string + poi.id; + // $ExpectType LngLat + poi.location; + // $ExpectType string + poi.name; + // $ExpectType string + poi.tel; + // $ExpectType string + poi.type; + } + // $ExpectType Road[] + regeocode.roads; + { + const road = regeocode.roads[0]; + // $ExpectType string + road.direction; + // $ExpectType number + road.distance; + // $ExpectType string + road.id; + // $ExpectType LngLat + road.location; + // $ExpectType string + road.name; + } + } else { + // $ExpectType string + result; + } +}); + +// $ExpectType void +geocoder.getAddress([lnglat, lnglat], (status, result) => { + if (typeof result !== 'string') { + // $ExpectType ReGeocode[] + result.regeocodes; + } +}); + +geocoder.on('error', (event: AMap.Geocoder.EventMap['error']) => { + // $ExpectType "error" + event.type; + // $ExpectType string + event.info; +}); + +geocoder.on('complete', (event: AMap.Geocoder.EventMap['complete']) => { + // $ExpectType "complete" + event.type; + if ('info' in event) { + // $ExpectType string + event.info; + } + if ('geocodes' in event) { + // $ExpectType string + event.resultNum; + } + if ('regeocode' in event) { + // $ExpectType ReGeocode + event.regeocode; + } + if ('regeocodes' in event) { + // $ExpectType ReGeocode[] + event.regeocodes; + } +}); + +// $ExpectType void +geocoder.getAddress(lnglatTuple, () => { }); +// $ExpectType void +geocoder.getAddress([lnglatTuple, lnglatTuple], () => { }); diff --git a/types/amap-js-api-geocoder/index.d.ts b/types/amap-js-api-geocoder/index.d.ts new file mode 100644 index 0000000000..91b0d12db5 --- /dev/null +++ b/types/amap-js-api-geocoder/index.d.ts @@ -0,0 +1,373 @@ +// Type definitions for non-npm package amap-js-api-geocoder 1.4 +// Project: https://lbs.amap.com/api/javascript-api/reference/lnglat-to-address#m_AMap.Geocoder +// Definitions by: breeze9527 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +declare namespace AMap { + namespace Geocoder { + interface EventMap { + complete: Event<'complete', GeocodeResult | {} | ReGeocodeResult | BatchReGeocodeResult>; + error: Event<'error', { info: string }>; + } + interface Options { + /** + * 城市 + */ + city?: string; + /** + * 中心点 + */ + radius?: number; + /** + * 语言类型 + */ + lang?: Lang; + /** + * 是否批量查询 + */ + batch?: boolean; + /** + * 是否返回详细信息 + */ + extensions?: 'base' | 'all'; + } + interface BuildingArea { + /** + * 唯一标识 + */ + id: string; + /** + * 名称 + */ + name: string; + /** + * 中心点经纬度 + */ + location: LngLat; + } + interface GeocodeAddressComponent { + /** + * 社区 + */ + neighborhood: string; + /** + * 社区类型 + */ + neighborhoodType: string; + /** + * 楼/大厦 + */ + building: string; + /** + * 楼类型 + */ + buildingType: string; + /** + * 省 + */ + province: string; + /** + * 城市 + */ + city: string; + /** + * 区 + */ + district: string; + /** + * 乡镇 + */ + township: string; + /** + * 城市编码 + */ + citycode: string; + /** + * 街道 + */ + street: string; + /** + * 门牌号 + */ + streetNumber: string; + } + interface ReGeocodeAddressComponent { + /** + * 城市编码 + */ + citycode: string; + /** + * 区域编码 + */ + adcode: string; + /** + * 所属商圈信息 + */ + businessAreas: BuildingArea[]; + /** + * 社区 + */ + neighborhoodType: string; + /** + * 社区类型 + */ + neighborhood: string; + /** + * 楼/大厦 + */ + building: string; + /** + * 楼类型 + */ + buildingType: string; + /** + * 街道 + */ + street: string; + /** + * 门牌号 + */ + streetNumber: string; + /** + * 省 + */ + province: string; + /** + * 城市 + */ + city: string; + /** + * 区 + */ + district: string; + /** + * 乡镇 + */ + township: string; + } + interface Geocode { + /** + * 地址组成元素 + */ + addressComponent: GeocodeAddressComponent; + /** + * 格式化地址 + */ + formattedAddress: string; + /** + * 坐标 + */ + location: LngLat; + /** + * 区域编码 + */ + adcode: string; + /** + * 给定地址匹配级别 + */ + level: string; + } + interface GeocodeResult { + /** + * 状态说明 + */ + info: string; + /** + * 地理编码结果数目 + */ + resultNum: string; + /** + * 地理编码结果 + */ + geocodes: Geocode[]; + } + interface Road { + /** + * 唯一标识 + */ + id: string; + /** + * 名称 + */ + name: string; + /** + * 道路离查询点最近距离 + */ + distance: number; + /** + * 道路上离查询点最近的点坐标 + */ + location: LngLat; + /** + * 与查询点的相对方位 + */ + direction: string; + } + interface Cross { + /** + * 道路离查询点最近距离 + */ + distance: number; + /** + * 与查询点的相对方位 + */ + direction: string; + /** + * 经纬度 + */ + location: LngLat; + /** + * 第一条道路id + */ + first_id: string; + /** + * 第一条道路名称 + */ + first_name: string; + /** + * 第二条道路id + */ + second_id: string; + /** + * 第二条道路名称 + */ + second_name: string; + } + interface ReGeocodePoi { + /** + * 唯一标识 + */ + id: string; + /** + * 名称 + */ + name: string; + /** + * 类型 + */ + type: string; + /** + * 电话 + */ + tel: string; + /** + * 该Poi到请求坐标的距离 + */ + distance: number; + /** + * 该Poi相对于请求坐标的方向 + */ + direction: string; + /** + * 址信息 + */ + address: string; + /** + * 坐标 + */ + location: LngLat; + /** + * 商圈名称 + */ + businessArea: string; + } + interface ReGeocodeAoi { + adcode: string; + area: string; + id: string; + location: LngLat; + name: string; + type: string; + } + interface ReGeocode { + /** + * 地址组成元素 + */ + addressComponent: ReGeocodeAddressComponent; + /** + * 格式化地址 + */ + formattedAddress: string; + /** + * 道路信息列表 + */ + roads: Road[]; + /** + * 道路路口列表 + */ + crosses: Cross[]; + /** + * 兴趣点列表 + */ + pois: ReGeocodePoi[]; + aois?: ReGeocodeAoi[]; + } + interface ReGeocodeResult { + /** + * 状态说明 + */ + info: string; + /** + * 逆地理编码结果 + */ + regeocode: ReGeocode; + } + interface BatchReGeocodeResult { + /** + * 状态说明 + */ + info: string; + /** + * 批量逆地理编码结果 + */ + regeocodes: ReGeocode[]; + } + type SearchStatus = 'complete' | 'no_data' | 'error'; + } + class Geocoder extends EventEmitter { + /** + * 地理编码与逆地理编码 + * @param options 选项 + */ + constructor(options?: Geocoder.Options); + /** + * 根据给定的地址描述进行解析 + * @param address 地址描述 + * @param callback 回调 + */ + getLocation( + address: string | string[], + callback: (status: Geocoder.SearchStatus, result: Geocoder.GeocodeResult | string) => void + ): void; + /** + * 设置地址描述所在城市 + * @param city 城市 + */ + setCity(city?: string): void; + /** + * 根据给定坐标进行解析 + * @param location 坐标 + * @param callback 回调 + */ + getAddress( + location: LocationValue, + callback: (status: Geocoder.SearchStatus, result: Geocoder.ReGeocodeResult | string) => void + ): void; + /** + * 根据给定坐标进行解析 + * @param locations 坐标数组 + * @param callback 回调 + */ + getAddress( + locations: LocationValue[], + callback: (status: Geocoder.SearchStatus, result: Geocoder.BatchReGeocodeResult | string) => void + ): void; + + // internal + setLang(lang?: Lang): void; + getLang(): Lang | undefined; + } +} diff --git a/types/amap-js-api-geocoder/tsconfig.json b/types/amap-js-api-geocoder/tsconfig.json new file mode 100644 index 0000000000..58571ba460 --- /dev/null +++ b/types/amap-js-api-geocoder/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noEmit": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amap-js-api-geocoder-tests.ts" + ] +} diff --git a/types/get-port/tslint.json b/types/amap-js-api-geocoder/tslint.json similarity index 100% rename from types/get-port/tslint.json rename to types/amap-js-api-geocoder/tslint.json diff --git a/types/amap-js-api-place-search/amap-js-api-place-search-tests.ts b/types/amap-js-api-place-search/amap-js-api-place-search-tests.ts new file mode 100644 index 0000000000..b4c787c301 --- /dev/null +++ b/types/amap-js-api-place-search/amap-js-api-place-search-tests.ts @@ -0,0 +1,435 @@ +declare const map: AMap.Map; +declare const div: HTMLElement; +declare const lnglat: AMap.LngLat; +declare const lnglatTuple: [number, number]; +declare const bounds: AMap.Bounds; +declare const polygon: AMap.Polygon; +declare const lang: AMap.Lang; + +// $ExpectType PlaceSearch +const placeSearch = new AMap.PlaceSearch(); +// $ExpectType PlaceSearch +new AMap.PlaceSearch({}); +// $ExpectType PlaceSearch +new AMap.PlaceSearch({ + city: '深圳', + citylimit: true, + children: 1, + type: '餐饮服务', + lang: 'zh_cn', + pageSize: 10, + pageIndex: 10, + extensions: 'all', + map, + panel: div, + showCover: true, + renderStyle: 'newpc', + autoFitView: true +}); + +// $ExpectType void +placeSearch.search('keyword', (status, result) => { + const temp: 'error' | 'complete' | 'no_data' = status; + // $ExpectType string | SearchResult + result; + if (typeof result !== 'string') { + // $ExpectType string + result.info; + // $ExpectType PoiList + result.poiList; + // $ExpectType string[] | undefined + result.keywordList; + // $ExpectType CityInfo[] | undefined + result.cityList; + + const poiList = result.poiList; + // $ExpectType number + poiList.pageIndex; + // $ExpectType number + poiList.pageSize; + // $ExpectType number + poiList.count; + + const poi = poiList.pois[0]; + // $ExpectType string + poi.address; + // $ExpectType number + poi.distance; + // $ExpectType string + poi.id; + // $ExpectType LngLat | null + poi.location; + // $ExpectType string + poi.name; + // $ExpectType string + poi.shopinfo; + // $ExpectType string + poi.tel; + // $ExpectType string + poi.type; + if ('website' in poi) { + // $ExpectType string + poi.adcode; + // $ExpectType string + poi.adname; + // $ExpectType string + poi.citycode; + // $ExpectType string + poi.cityname; + // $ExpectType boolean + poi.discount; + // $ExpectType string + poi.email; + // $ExpectType LngLat | null + poi.entr_location; + // $ExpectType LngLat | null + poi.exit_location; + // $ExpectType boolean + poi.groupbuy; + if (poi.indoor_map) { + const indoorData = poi.indoor_data; + // $ExpectType string + indoorData.cpid; + // $ExpectType string + indoorData.floor; + // $ExpectType string + indoorData.truefloor; + } + poi.pcode; + // $ExpectType PoiPhoto[] + poi.photos; + // $ExpectType string + poi.pname; + // $ExpectType string + poi.postcode; + // $ExpectType string + poi.website; + + const photo = poi.photos[0]; + // $ExpectType string + photo.title; + // $ExpectType string + photo.url; + // $ExpectType Groupbuy[] | undefined + poi.groupbuys; + if (poi.groupbuys) { + const groupbuy = poi.groupbuys[0]; + // $ExpectType string + groupbuy.title; + // $ExpectType string + groupbuy.type_code; + // $ExpectType string + groupbuy.type; + // $ExpectType string + groupbuy.detail; + // $ExpectType string + groupbuy.stime; + // $ExpectType string + groupbuy.etime; + // $ExpectType number + groupbuy.count; + // $ExpectType number + groupbuy.sold_num; + // $ExpectType number + groupbuy.original_price; + // $ExpectType number + groupbuy.groupbuy_price; + // $ExpectType number + groupbuy.discount; + // $ExpectType string + groupbuy.ticket_address; + // $ExpectType string + groupbuy.ticket_tel; + // $ExpectType PoiPhoto[] + groupbuy.photos; + // $ExpectType string + groupbuy.url; + // $ExpectType string + groupbuy.provider; + } + // $ExpectType Discount[] | undefined + poi.discounts; + if (poi.discounts) { + const discount = poi.discounts[0]; + // $ExpectType string + discount.title; + // $ExpectType string + discount.detail; + // $ExpectType string + discount.start_time; + // $ExpectType string + discount.end_time; + // $ExpectType number + discount.sold_num; + // $ExpectType PoiPhoto[] + discount.photos; + // $ExpectType string + discount.url; + // $ExpectType string + discount.provider; + } + if (poi.deep_type === 'CINEMA') { + // $ExpectType Cinema + const cinema = poi.cinema; + // $ExpectType string + cinema.intro; + // $ExpectType string + cinema.rating; + // $ExpectType string + cinema.deep_src; + // $ExpectType string + cinema.parking; + // $ExpectType string + cinema.opentime_GDF; + // $ExpectType string + cinema.opentime; + // $ExpectType PoiPhoto[] + cinema.photos; + } + if (poi.deep_type === 'DINING') { + // $ExpectType Dining + const dining = poi.dining; + // $ExpectType string + dining.cuisines; + // $ExpectType string + dining.tag; + // $ExpectType string + dining.intro; + // $ExpectType string + dining.rating; + // $ExpectType string + dining.cp_rating; + // $ExpectType string + dining.deep_src; + // $ExpectType string + dining.taste_rating; + // $ExpectType string + dining.environment_rating; + // $ExpectType string + dining.service_rating; + // $ExpectType string + dining.cost; + // $ExpectType string + dining.recommend; + // $ExpectType string + dining.atmosphere; + // $ExpectType string + dining.ordering_wap_url; + // $ExpectType string + dining.ordering_web_url; + // $ExpectType string + dining.ordering_app_url; + // $ExpectType string + dining.opentime_GDF; + // $ExpectType string + dining.opentime; + // $ExpectType string + dining.addition; + // $ExpectType PoiPhoto[] + dining.photos; + } + if (poi.deep_type === 'SCENIC') { + // $ExpectType Scenic + const scenic = poi.scenic; + // $ExpectType string + scenic.intro; + // $ExpectType string + scenic.rating; + // $ExpectType string + scenic.deep_src; + // $ExpectType string + scenic.level; + // $ExpectType string + scenic.price; + // $ExpectType string + scenic.season; + // $ExpectType string + scenic.recommend; + // $ExpectType string + scenic.theme; + // $ExpectType string + scenic.ordering_wap_url; + // $ExpectType string + scenic.ordering_web_url; + // $ExpectType string + scenic.opentime_GDF; + // $ExpectType string + scenic.opentime; + // $ExpectType PoiPhoto[] + scenic.photos; + } + if (poi.deep_type === 'HOTEL') { + // $ExpectType Hotel + const hotel = poi.hotel; + // $ExpectType string + hotel.rating; + // $ExpectType string + hotel.star; + // $ExpectType string + hotel.intro; + // $ExpectType string + hotel.lowest_price; + // $ExpectType string + hotel.faci_rating; + // $ExpectType string + hotel.health_rating; + // $ExpectType string + hotel.environment_rating; + // $ExpectType string + hotel.service_rating; + // $ExpectType string + hotel.traffic; + // $ExpectType string + hotel.addition; + // $ExpectType string + hotel.deep_src; + // $ExpectType PoiPhoto[] + hotel.photos; + } + } + + if (result.cityList) { + const city = result.cityList[0]; + // $ExpectType string + city.adcode; + // $ExpectType string + city.citycode; + // $ExpectType number + city.count; + // $ExpectType string + city.name; + } + } else { + // $ExpectType string + result; + } +}); + +// $ExpectType void +placeSearch.searchNearBy('keyword', lnglat, 10, (status, result) => { + const temp: 'error' | 'complete' | 'no_data' = status; + // $ExpectType string | SearchResult + result; +}); +// $ExpectType void +placeSearch.searchNearBy('keyword', lnglatTuple, 10, () => { }); + +// $ExpectType void +placeSearch.searchInBounds('keyword', bounds, (status, result) => { + const temp: 'error' | 'complete' | 'no_data' = status; + // $ExpectType string | SearchResult + result; +}); +// $ExpectType void +placeSearch.searchInBounds('keyword', polygon, () => { }); + +// $ExpectType void +placeSearch.getDetails('id', (status, result) => { + const temp: 'error' | 'complete' | 'no_data' = status; + // $ExpectType string | SearchResult + result; +}); + +// $ExpectType void +placeSearch.setType('type'); +// $ExpectType void +placeSearch.setType(); + +// $ExpectType void +placeSearch.setCityLimit(true); +// $ExpectType void +placeSearch.setCityLimit(); + +// $ExpectType void +placeSearch.setPageIndex(1); +// $ExpectType void +placeSearch.setPageIndex(); + +// $ExpectType void +placeSearch.setPageSize(1); +// $ExpectType void +placeSearch.setPageSize(); + +// $ExpectType void +placeSearch.setCity('city'); +// $ExpectType void +placeSearch.setCity(); + +// $ExpectType void +placeSearch.setLang(lang); +// $ExpectType void +placeSearch.setLang(); + +// $ExpectType "zh_cn" | "en" | "zh_en" | undefined +placeSearch.getLang(); + +// $ExpectType void +placeSearch.clear(); + +// $ExpectType void +placeSearch.poiOnAMAP({ + id: 'id', +}); +// $ExpectType void +placeSearch.poiOnAMAP({ + location: lnglat, + id: 'id', + name: 'name' +}); + +// $ExpectType void +placeSearch.detailOnAMAP({ + id: 'id', +}); +// $ExpectType void +placeSearch.detailOnAMAP({ + location: lnglat, + id: 'id', + name: 'name' +}); + +// $ExpectType void +placeSearch.open(); + +// $ExpectType void +placeSearch.close(); + +placeSearch.on('complete', (event: AMap.PlaceSearch.EventMap['complete']) => { + // $ExpectType "complete" + event.type; + // $ExpectType string + event.info; + // $ExpectType PoiList + event.poiList; + // $ExpectType string[] | undefined + event.keywordList; + // $ExpectType CityInfo[] | undefined + event.cityList; +}); + +placeSearch.on('listElementClick', (event: AMap.PlaceSearch.EventMap['listElementClick']) => { + // $ExpectType MouseEvent + event.event; + // $ExpectType string + event.id; + // $ExpectType number + event.index; + // $ExpectType Marker + event.marker; + // $ExpectType HTMLLIElement + event.listElement; +}); + +placeSearch.on('markerClick', (event: AMap.PlaceSearch.EventMap['markerClick']) => { + const markerEvent = event.event; + // $ExpectType Marker + markerEvent.target; + // $ExpectType string + event.id; + // $ExpectType number + event.index; + // $ExpectType Marker + event.marker; + // $ExpectType HTMLLIElement + event.listElement; +}); diff --git a/types/amap-js-api-place-search/index.d.ts b/types/amap-js-api-place-search/index.d.ts new file mode 100644 index 0000000000..4a333f3b2b --- /dev/null +++ b/types/amap-js-api-place-search/index.d.ts @@ -0,0 +1,737 @@ +// Type definitions for non-npm package amap-js-api-place-search 1.4 +// Project: https://lbs.amap.com/api/javascript-api/reference/search#m_AMap.PlaceSearch +// Definitions by: breeze9527 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +declare namespace AMap { + namespace PlaceSearch { + interface EventMap { + complete: Event<'complete', SearchResult>; + error: Event<'error', { info: string }>; + selectChanged: Event<'selectChanged', { + selected: SelectChangeEventData | EventMap['markerClick'] | EventMap['listElementClick']; + lastSelected: SelectChangeEventData | EventMap['markerClick'] | EventMap['listElementClick'] | null; + }>; + listElementClick: SelectChangeEvent<'listElementClick', MouseEvent>; + markerClick: SelectChangeEvent<'markerClick', Marker.EventMap['click']>; + // internal + renderComplete: Event<'renderComplete', { + result: SelectChangeEventData[]; + markers: Marker[]; + listElements: HTMLElement[]; + }>; + infoWindowClick: Event<'infoWindowClick', SelectChangeEventData & { + event: MouseEvent; + infoWindow: InfoWindow; + infoWindowContentDom: HTMLDivElement; + }>; + willClear: Event<'willClear', { + id: string; + index: number; + data: Poi[]; + }>; + markerDestoryed: Event<'markerDestoryed', SelectChangeEventData>; // typo in source code + listElementDetroyed: Event<'listElementDetroyed', SelectChangeEventData>; // typo too + } + + interface SelectChangeEventData { + /** + * 当前选中的POI的ID + */ + id: string; + /** + * 索引 + */ + index: number; + /** + * 当前选中的POI对应的在地图中的Marker对象 + */ + marker: Marker; + /** + * 当前选中的POI在结果面板中对应的列表项 + */ + listElement: HTMLLIElement; + /** + * 当前选中的POI的信息 + */ + data: Poi[]; + } + type SelectChangeEvent = Event; + interface PoiPhoto { + /** + * 图片名称 + */ + title: string; + /** + * 图片url + */ + url: string; + } + interface PoiBase { + /** + * 全局唯一ID + */ + id: string; + /** + * 名称 + */ + name: string; + /** + * 兴趣点类型 + */ + type: string; + /** + * 兴趣点经纬度 + */ + location: LngLat | null; + /** + * 地址 + */ + address: string; + /** + * 离中心点距离 + */ + distance: number; + /** + * 电话 + */ + tel: string; + shopinfo: string; + children?: any[]; // TODO Array<{location: LngLat | null}> + } + interface Groupbuy { + /** + * 团购标题 + */ + title: string; + /** + * 团购分类代码 + */ + type_code: string; + /** + * 团购分类 + */ + type: string; + /** + * 团购详情 + */ + detail: string; + /** + * 团购开始时间 + */ + stime: string; + /** + * 团购结束时间 + */ + etime: string; + /** + * 团购总量 + */ + count: number; + /** + * 已卖出数量 + */ + sold_num: number; + /** + * 原价 + */ + original_price: number; + /** + * 折扣价 + */ + groupbuy_price: number; + /** + * 折扣 + */ + discount: number; + /** + * 取票地址 + */ + ticket_address: string; + /** + * 取票电话 + */ + ticket_tel: string; + /** + * 图片信息 + */ + photos: PoiPhoto[]; + /** + * 来源url + */ + url: string; + /** + * 来源标识 + */ + provider: string; + } + interface Discount { + /** + * 优惠标题 + */ + title: string; + /** + * 优惠详情 + */ + detail: string; + /** + * 开始时间 + */ + start_time: string; + /** + * 结束时间 + */ + end_time: string; + /** + * 已卖出数量 + */ + sold_num: number; + /** + * 图片信息列表 + */ + photos: PoiPhoto[]; + /** + * 来源url + */ + url: string; + /** + * 来源标识 + */ + provider: string; + } + interface Cinema { + /** + * 简介 + */ + intro: string; + /** + * 综合评分 + */ + rating: string; + /** + * 信息来源 + */ + deep_src: string; + /** + * 停车场设施 + */ + parking: string; + /** + * 规范格式的营业时间 + */ + opentime_GDF: string; + /** + * 非规范格式的营业时间 + */ + opentime: string; + /** + * 图片信息列表 + */ + photos: PoiPhoto[]; + } + interface Dining { + /** + * 菜系 + */ + cuisines: string; + /** + * 标签 + */ + tag: string; + /** + * 简介 + */ + intro: string; + /** + * 综合评分 + */ + rating: string; + /** + * 单数据源的评分 + */ + cp_rating: string; + /** + * 信息来源 + */ + deep_src: string; + /** + * 口味评分 + */ + taste_rating: string; + /** + * 环境评分 + */ + environment_rating: string; + /** + * 服务评分 + */ + service_rating: string; + /** + * 人均消费 + */ + cost: string; + /** + * 特色菜 + */ + recommend: string; + /** + * 氛围 + */ + atmosphere: string; + /** + * 订餐wap链接 + */ + ordering_wap_url: string; + /** + * 订餐web链接 + */ + ordering_web_url: string; + /** + * 订餐APP URL + */ + ordering_app_url: string; + /** + * 规范格式的营业时间 + */ + opentime_GDF: string; + /** + * 非规范格式的营业时间 + */ + opentime: string; + /** + * 餐厅特色 + */ + addition: string; + /** + * 图片信息列表 + */ + photos: PoiPhoto[]; + } + interface Scenic { + /** + * 简介 + */ + intro: string; + /** + * 综合评分 + */ + rating: string; + /** + * 信息来源 + */ + deep_src: string; + /** + * 景区国标级别 + */ + level: string; + /** + * 门票价格 + */ + price: string; + /** + * 适合游玩的季节 + */ + season: string; + /** + * 推荐景点 + */ + recommend: string; + /** + * 景区主题 + */ + theme: string; + /** + * wap购票链接 + */ + ordering_wap_url: string; + /** + * web购票链接 + */ + ordering_web_url: string; + /** + * 规范格式的营业时间 + */ + opentime_GDF: string; + /** + * 非规范格式的营业时间 + */ + opentime: string; + /** + * 图片信息列表 + */ + photos: PoiPhoto[]; + } + interface Hotel { + /** + * 综合评分 + */ + rating: string; + /** + * 星级 + */ + star: string; + /** + * 简介 + */ + intro: string; + /** + * 最低房价 + */ + lowest_price: string; + /** + * 设施评分 + */ + faci_rating: string; + /** + * 卫生评分 + */ + health_rating: string; + /** + * 环境评分 + */ + environment_rating: string; + /** + * 服务评分 + */ + service_rating: string; + /** + * 交通提示 + */ + traffic: string; + /** + * 特色服务 + */ + addition: string; + /** + * 信息来源 + */ + deep_src: string; + /** + * 图片信息列表 + */ + photos: PoiPhoto[]; + } + type PoiExt = PoiBase & { + /** + * 网址 + */ + website: string; + /** + * 所在省份编码 + */ + pcode: string; + /** + * 所在城市编码 + */ + citycode: string; + /** + * 所在区域编码 + */ + adcode: string; + /** + * 邮编 + */ + postcode: string; + /** + * 所在省份 + */ + pname: string; + /** + * 所在城市名称 + */ + cityname: string; + /** + * 所在行政区名称 + */ + adname: string; + /** + * 电子邮箱 + */ + email: string; + /** + * 照片 + */ + photos: PoiPhoto[]; + /** + * 入口经纬度 + */ + entr_location: LngLat | null; + /** + * 出口经纬度 + */ + exit_location: LngLat | null; + /** + * @deprecated 是否有团购信息 + */ + groupbuy: boolean; + /** + * @deprecated 是否有优惠信息 + */ + discount: boolean; + } & ({ + indoor_map: true; + indoor_data: { + cpid: string; + floor: string; + truefloor: string; + }; + } | { + indoor_map: false; + }) & { + /** + * @deprecated 团购信息 + */ + groupbuys?: Groupbuy[]; + /** + * @deprecated 优惠信息 + */ + discounts?: Discount[]; + } & ({ + deep_type: 'CINEMA'; + /** + * @deprecated 影院类深度信息 + */ + cinema: Cinema; + } | { + deep_type: 'DINING'; + /** + * @deprecated 餐饮类深度信息 + */ + dining: Dining; + } | { + deep_type: 'SCENIC'; + /** + * @deprecated 景点类深度信息 + */ + scenic: Scenic; + } | { + deep_type: 'HOTEL'; + /** + * @deprecated 酒店类深度信息 + */ + hotel: Hotel; + }); + interface Options { + /** + * 兴趣点城市 + */ + city?: string; + /** + * 是否强制限制在设置的城市内搜索 + */ + citylimit?: boolean; + /** + * 是否按照层级展示子POI数据 + * children=1,展示子节点POI数据,children=0,不展示子节点数据 + */ + children?: number; + /** + * 兴趣点类别,多个类别用“|”分割 + */ + type?: string; + /** + * 检索语言类型 + */ + lang?: Lang; + /** + * 单页显示结果条数 + */ + pageSize?: number; + /** + * 页码 + */ + pageIndex?: number; + /** + * 是否返回详细信息 + * base返回基本地址信息;all返回基本+详细信息 + */ + extensions?: 'base' | 'all'; + /** + * Map对象 + */ + map?: Map; + /** + * 结果列表的HTML容器id或容器元素 + */ + panel?: string | HTMLElement; + /** + * 是否在地图上显示周边搜索的圆或者范围搜索的多边形 + */ + showCover?: boolean; + /** + * 绘制的UI风格 + */ + renderStyle?: 'newpc' | 'default'; + /** + * 是否自动调整地图视野使绘制的Marker点都处于视口的可见范围 + */ + autoFitView?: boolean; + + // internal + renderEngine?: string; + rankBy?: string; + } + interface PoiList { + /** + * Poi列表 + */ + pois: Poi[]; // PlaceSearchPoiBase[] | PlaceSearchPoiExt[]; + /** + * 页码 + */ + pageIndex: number; + /** + * 单页结果数 + */ + pageSize: number; + /** + * 查询结果总数 + */ + count: number; + } + interface CityInfo { + /** + * 建议城市名称 + */ + name: string; + /** + * 城市编码 + */ + citycode: string; + /** + * 行政区编码 + */ + adcode: string; + /** + * 该城市的建议结果数目 + */ + count: number; + } + interface SearchResult { + /** + * 成功状态说明 + */ + info: string; + /** + * 兴趣点列表 + */ + poiList: PoiList; + /** + * 建议关键字列表 + */ + keywordList?: string[]; + /** + * 城市建议列表 + */ + cityList?: CityInfo[]; + } + type Poi = PoiBase | PoiExt; + type SearchStatus = 'complete' | 'error' | 'no_data'; + } + class PlaceSearch extends EventEmitter { + /** + * 地点搜索服务 + * @param options 选项 + */ + constructor(options?: PlaceSearch.Options); + /** + * 根据关键字搜索 + * @param keyword 根据关键字搜索 + * @param callback 回调 + */ + search( + keyword: string, + callback: (status: PlaceSearch.SearchStatus, result: string | PlaceSearch.SearchResult) => void + ): void; + /** + * 周边查询 + * @param keyword 关键字 + * @param center 搜索中心 + * @param radius 搜索半径 + * @param callback 回调 + */ + searchNearBy( + keyword: string, + center: LocationValue, + radius: number, + callback: (status: PlaceSearch.SearchStatus, result: string | PlaceSearch.SearchResult) => void + ): void; + /** + * 根据范围和关键词进行范围查询 + * @param keyword 关键字 + * @param bounds 搜索范围 + * @param callback 回调 + */ + searchInBounds( + keyword: string, + bounds: Bounds | Polygon, + callback: (status: PlaceSearch.SearchStatus, result: string | PlaceSearch.SearchResult) => void + ): void; + /** + * 根据POIID 查询POI 详细信息 + * @param POIID POIID + * @param callback 搜索回调 + */ + getDetails( + POIID: string, + callback: (status: PlaceSearch.SearchStatus, result: string | PlaceSearch.SearchResult) => void + ): void; + /** + * 设置查询类别 + * @param type 查询类别 + */ + setType(type?: string): void; + /** + * 设置是否强制限制城市 + * @param limit 是否强制限制城市 + */ + setCityLimit(limit?: boolean): void; + /** + * 设置查询结果特定页数 + * @param pageIndex 页码 + */ + setPageIndex(pageIndex?: number): void; + /** + * 设置查询单页结果数 + * @param pageSize 结果数 + */ + setPageSize(pageSize?: number): void; + /** + * 设置查询城市 + * @param city 城市 + */ + setCity(city?: string): void; + /** + * 设置检索语言类型 + * @param lang 语言类型 + */ + setLang(lang?: Lang): void; + /** + * 获取检索语言类型 + */ + getLang(): Lang | undefined; + /** + * 清除搜索结果 + */ + clear(): void; + /** + * 唤起高德地图客户端marker页 + * @param obj 唤起参数 + */ + poiOnAMAP(obj: { location?: LocationValue; id: string; name?: string; }): void; + /** + * 唤起高德地图客户端POI详情页 + * @param obj 唤起参数 + */ + detailOnAMAP(obj: { location?: LocationValue; id: string; name?: string; }): void; + + // internal + open(): void; + close(): void; + } +} diff --git a/types/amap-js-api-place-search/tsconfig.json b/types/amap-js-api-place-search/tsconfig.json new file mode 100644 index 0000000000..e3259e1b01 --- /dev/null +++ b/types/amap-js-api-place-search/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noEmit": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amap-js-api-place-search-tests.ts" + ] +} diff --git a/types/opn/tslint.json b/types/amap-js-api-place-search/tslint.json similarity index 100% rename from types/opn/tslint.json rename to types/amap-js-api-place-search/tslint.json diff --git a/types/amap-js-api/amap-js-api-tests.ts b/types/amap-js-api/amap-js-api-tests.ts index ee7a2ac583..57f7fb07d2 100644 --- a/types/amap-js-api/amap-js-api-tests.ts +++ b/types/amap-js-api/amap-js-api-tests.ts @@ -2415,6 +2415,7 @@ const testInfoWindow = new AMap.InfoWindow({ closeWhenClickMap: false, content: 'content', size: [100, 100], + anchor: 'bottom-center', offset: new AMap.Pixel(10, 10), position: lnglat, showShadow: true @@ -2449,6 +2450,20 @@ testInfoWindow.setPosition(lnglatTuple); // $ExpectType LngLat | undefined testInfoWindow.getPosition(); +const testInfoWindowAnchor = testInfoWindow.getAnchor(); +if (testInfoWindowAnchor !== undefined) { + // $ExpectType Anchor + testInfoWindowAnchor; +} else { + // $ExpectType undefined + testInfoWindowAnchor; +} + +// $ExpectType void +testInfoWindow.setAnchor(); +// $ExpectType void +testInfoWindow.setAnchor(testInfoWindowAnchor); + // $ExpectType Size | undefined testInfoWindow.getSize(); @@ -2491,6 +2506,7 @@ new AMap.Marker({}); export const testMarker = new AMap.Marker({ map, position: lnglat, + anchor: 'bottom-center', offset: pixel, icon: 'iconUrl', content: 'htmlString', @@ -2526,6 +2542,20 @@ testMarker.markOnAMAP({ name: '123' }); +const testMarkerAnchor = testMarker.getAnchor(); +if (testMarkerAnchor) { + // $ExpectType Anchor + testMarkerAnchor; +} else { + // $ExpectType undefined + testMarkerAnchor; +} + +// $ExpectType void +testMarker.setAnchor(testMarkerAnchor); +// $ExpectType void +testMarker.setAnchor(); + // $ExpectType Pixel testMarker.getOffset(); @@ -3229,6 +3259,7 @@ const testText = new AMap.Text({ verticalAlign: 'top', map, position: lnglat, + anchor: 'bottom-center', offset: pixel, topWhenClick: true, bubble: true, @@ -3246,6 +3277,20 @@ const testText = new AMap.Text({ extData: { test: 1 } }); +const testTextAnchor = testText.getAnchor(); +if (testTextAnchor) { + // $ExpectType Anchor + testTextAnchor; +} else { + // $ExpectType undefined + testTextAnchor; +} + +// $ExpectType void +testText.setAnchor(testTextAnchor); +// $ExpectType void +testText.setAnchor(); + // $ExpectType string testText.getText(); @@ -3363,7 +3408,7 @@ testText.setShadow(icon); testText.setShadow('shadow url'); // $ExpectType void -testText.setExtData({test: 1}); +testText.setExtData({ test: 1 }); // $ExpectType {} | TextExtraData testText.getExtData(); diff --git a/types/amap-js-api/overlay/infoWindow.d.ts b/types/amap-js-api/overlay/infoWindow.d.ts index 1c9b69a9a3..7b51076351 100644 --- a/types/amap-js-api/overlay/infoWindow.d.ts +++ b/types/amap-js-api/overlay/infoWindow.d.ts @@ -6,6 +6,8 @@ declare namespace AMap { close: Event<'close', { target: I }>; } + type Anchor = 'top-left' | 'top-center' | 'top-right' | 'middle-left' | 'center' | 'middle-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; + interface Options extends Overlay.Options { /** * 是否自定义窗体 @@ -27,6 +29,10 @@ declare namespace AMap { * 信息窗体尺寸 */ size?: SizeValue; + /** + * 信息窗体锚点 + */ + anchor?: Anchor; /** * 信息窗体显示位置偏移量 */ @@ -82,6 +88,15 @@ declare namespace AMap { * 获取信息窗体显示基点位置 */ getPosition(): LngLat | undefined; + /** + * 获取锚点 + */ + getAnchor(): InfoWindow.Anchor | undefined; + /** + * 设置锚点 + * @param anchor 锚点 + */ + setAnchor(anchor?: InfoWindow.Anchor): void; /** * 设置信息窗体大小 * @param size 大小 diff --git a/types/amap-js-api/overlay/marker.d.ts b/types/amap-js-api/overlay/marker.d.ts index 42dddf394a..6e8183911c 100644 --- a/types/amap-js-api/overlay/marker.d.ts +++ b/types/amap-js-api/overlay/marker.d.ts @@ -25,11 +25,17 @@ declare namespace AMap { offset?: Pixel; } + type Anchor = 'top-left' | 'top-center' | 'top-right' | 'middle-left' | 'center' | 'middle-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; + interface Options extends Overlay.Options { /** * 点标记在地图上显示的位置 */ position?: LocationValue; + /** + * 标记锚点 + */ + anchor?: Anchor; /** * 点标记显示位置偏移量 */ @@ -117,6 +123,14 @@ declare namespace AMap { * @param obj 唤起参数 */ markOnAMAP(obj?: { name?: string, position?: LocationValue }): void; + /** + * 获取锚点 + */ + getAnchor(): Marker.Anchor | undefined; + /** + * 设置锚点 + */ + setAnchor(anchor?: Marker.Anchor): void; /** * 获取偏移量 */ diff --git a/types/amap-js-api/type-util.d.ts b/types/amap-js-api/type-util.d.ts index 1ced3d69c1..5edb14c615 100644 --- a/types/amap-js-api/type-util.d.ts +++ b/types/amap-js-api/type-util.d.ts @@ -1,12 +1,12 @@ -type Omit = { - [K in Exclude]: T[K] -}; +declare namespace AMap { + type Omit = { + [K in Exclude]: T[K] + }; -type OptionalKey = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; -// type OmitUndefined = Omit; -// type PickUndefined = Omit>; + type OptionalKey = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; -type Merge = - { [K in Exclude>]-?: O[K]; } & - { [K in Extract, OptionalKey>]?: O[K]; } & - T; + type Merge = + { [K in Exclude>]-?: O[K]; } & + { [K in Extract, OptionalKey>]?: O[K]; } & + T; +} diff --git a/types/angular-material/angular-material-tests.ts b/types/angular-material/angular-material-tests.ts index f29de44222..6deaa605d0 100644 --- a/types/angular-material/angular-material-tests.ts +++ b/types/angular-material/angular-material-tests.ts @@ -419,3 +419,14 @@ myApp.controller('StickyController', ($scope: TestScope, $mdSticky: ng.material. $mdSticky($scope, stickyElement); $mdSticky($scope, stickyElement, cloneStickyElement); }); + +function mdUtil($mdUtil: ng.material.IUtilService) { + // $ExpectType void + $mdUtil.enableScrolling(); + + // $ExpectType () => void + $mdUtil.debounce(() => {}); + + // $ExpectType () => string + $mdUtil.debounce((): string => ""); +} diff --git a/types/angular-material/index.d.ts b/types/angular-material/index.d.ts index 444e043210..11ec689cf1 100644 --- a/types/angular-material/index.d.ts +++ b/types/angular-material/index.d.ts @@ -517,5 +517,11 @@ declare module 'angular' { getLastInteractionType(): string|null; isUserInvoked(checkDelay?: number): boolean; } + + interface IUtilService { + // tslint:disable-next-line:ban-types debounce takes in a user provided function + debounce(func: T, wait?: number, scope?: any, invokeApply?: boolean): T; + enableScrolling(): void; + } } } diff --git a/types/applepayjs/tslint.json b/types/applepayjs/tslint.json index 65c83fb1e3..1c56ba06b6 100644 --- a/types/applepayjs/tslint.json +++ b/types/applepayjs/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { + "npm-naming": false, "dt-header": false } } diff --git a/types/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts index 4e43778473..536c0ff3f0 100644 --- a/types/arcgis-js-api/index.d.ts +++ b/types/arcgis-js-api/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript 4.10 +// Type definitions for ArcGIS API for JavaScript 4.11 // Project: http://js.arcgis.com // Definitions by: Esri // Bjorn Svensson @@ -88,7 +88,47 @@ declare namespace __esri { export type ItemTestCallback = (item: T, index: number) => boolean; - interface Collection extends Evented {} + export type CollectionAfterAddEventHandler = (event: CollectionAfterEvent) => void; + + export type CollectionAfterChangesEventHandler = (event: CollectionAfterChangesEvent) => void; + + export type CollectionAfterRemoveEventHandler = (event: CollectionAfterEvent) => void; + + export type CollectionChangeEventHandler = (event: CollectionChangeEvent) => void; + + export type CollectionBeforeAddEventHandler = (event: CollectionBeforeEvent) => void; + + export type CollectionBeforeChangesEventHandler = (event: CollectionBeforeEvent) => void; + + export type CollectionBeforeRemoveEventHandler = (event: CollectionBeforeEvent) => void; + + export interface CollectionAfterEvent { + item: T; + } + + export interface CollectionAfterChangesEvent {} + + export interface CollectionBeforeEvent { + item: T; + preventDefault(): void; + } + + export interface CollectionChangeEvent { + added: T[]; + removed: T[]; + moved: T[]; + } + + interface Collection extends Evented { + on(type: "after-add", listener: CollectionAfterAddEventHandler): IHandle; + on(type: "after-changes", listener: CollectionAfterChangesEventHandler): IHandle; + on(type: "after-remove", listener: CollectionAfterRemoveEventHandler): IHandle; + on(type: "before-add", listener: CollectionBeforeAddEventHandler): IHandle; + on(type: "before-changes", listener: CollectionBeforeChangesEventHandler): IHandle; + on(type: "before-remove", listener: CollectionBeforeRemoveEventHandler): IHandle; + on(type: "change", listener: CollectionChangeEventHandler): IHandle; + on(type: string, listener: (event: any) => void): IHandle; + } type Constructor = new (...params: any[]) => T; @@ -186,6 +226,10 @@ declare namespace __esri { export type FeatureLayerLayerviewDestroyEventHandler = (event: FeatureLayerLayerviewDestroyEvent) => void; + export type GeoJSONLayerLayerviewCreateEventHandler = (event: GeoJSONLayerLayerviewCreateEvent) => void; + + export type GeoJSONLayerLayerviewDestroyEventHandler = (event: GeoJSONLayerLayerviewDestroyEvent) => void; + export type GeoRSSLayerLayerviewCreateEventHandler = (event: GeoRSSLayerLayerviewCreateEvent) => void; export type GeoRSSLayerLayerviewDestroyEventHandler = (event: GeoRSSLayerLayerviewDestroyEvent) => void; @@ -509,7 +553,7 @@ declare namespace __esri { */ clone(): Color; /** - * Takes a named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another Color object and sets this color instance to the input value. + * Takes an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object and sets this color instance to the input value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#setColor) * @@ -562,7 +606,7 @@ declare namespace __esri { interface ColorConstructor { /** - * Creates a new color object by passing either a hex, rgba, or named color value. + * Creates a new color object by passing either a hex, rgb(a), hsl(a) or [named color value](https://www.w3.org/wiki/CSS/Properties/color/keywords). Hex, hsl(a) and named color values can be passed as a string: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) */ @@ -1068,7 +1112,7 @@ declare namespace __esri { * @param event The event payload. * */ - emit(type: string, event?: any): void; + emit(type: string, event?: any): boolean; /** * Indicates whether there is an event listener on the instance that matches the provided event name. * @@ -1083,11 +1127,11 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Evented.html#on) * - * @param type The name of event to listen for. + * @param type A event type, or an array of event types, to listen for. * @param listener The function to call when the event is fired. * */ - on(type: string, listener: EventHandler): IHandle; + on(type: string | string[], listener: EventHandler): IHandle; } interface EventedConstructor { @@ -1100,11 +1144,11 @@ declare namespace __esri { interface HandleOwner extends Accessor { /** - * Handle registry. + * Handle registry to help manage `handles`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) */ - handles: void; + handles: Handles; } interface HandleOwnerConstructor { @@ -1115,11 +1159,11 @@ declare namespace __esri { interface HandleOwnerProperties { /** - * Handle registry. + * Handle registry to help manage `handles`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) */ - handles?: void; + handles?: HandlesProperties; } interface Handles extends Accessor { @@ -1169,6 +1213,22 @@ declare namespace __esri { interface HandlesProperties {} + /** + * A handle to a [highlight](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) call result. The handle can be used to remove the installed highlight. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle) + */ + export interface Handle extends Object { + /** + * Removes the handle. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle) + * + * + */ + remove(): void; + } + interface JSONSupport { /** * Converts an instance of [this class]() to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. @@ -1422,37 +1482,13 @@ declare namespace __esri { error?: any; } - export type Executor = () => void; + export type Executor = (resolve: ResolveCallback, reject: RejectCallback) => void; export type FilterPredicateCallback = (value: any, index: number) => IPromise; - /** - * A function that will reject the promise created in [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#RejectCallback) - */ - export interface RejectCallback extends Object { - /** - * The error with which the promise rejected. Defined only if the promise is rejected. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#RejectCallback) - */ - error?: any; - } + export type RejectCallback = (error?: any) => void; - /** - * A function that will resolve the promise created in [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#ResolveCallback) - */ - export interface ResolveCallback extends Object { - /** - * The value with which the promise resolved. Defined only if the promise is fulfilled. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#ResolveCallback) - */ - value?: any | IPromise; - } + export type ResolveCallback = (value?: any | IPromise) => void; interface requireUtils { /** @@ -1529,7 +1565,7 @@ declare namespace __esri { remove(): void; } - export type PhaseCallback = (event: PhaseEvent) => void; + export type PhaseCallback = (event?: PhaseEvent) => void; /** * A set of [callbacks](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallback) that will be called at specific phases of the animation frame. @@ -1834,7 +1870,7 @@ declare namespace __esri { export const watchUtils: watchUtils; - export type EventAttachedCallback = (target: any, propName: string, obj: Accessor, eventName: string) => void; + export type EventAttachedCallback = (target?: any, propName?: string, obj?: Accessor, eventName?: string) => void; /** * Represents a watch created when an object invokes [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch). @@ -3728,6 +3764,18 @@ declare namespace __esri { * */ rotate(angleX: number, angleY: number, angleZ: number, params?: MeshRotateParams): Mesh; + /** + * Scales the mesh geometry by the specified factor. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [scale()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale) + * + * @param factor The amount to scale the geometry. + * @param params Additional parameters. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * @param params.origin The origin point for scaling. If not specified, the mesh will be scaled around the mesh extent center. + * + */ + scale(factor: number, params?: MeshScaleParams): Mesh; /** * Notifies that any cached values that depend on vertex attributes need to be recalculated. Use this method after modifying the vertex attributes in place so that values that depend on them (such as the calculation of the extent) are recalculated accordingly. * @@ -3754,8 +3802,9 @@ declare namespace __esri { * * @param location The location bottom center of the box. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.material The material to be used for the mesh. * @param params.imageFace The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box. * @@ -3768,13 +3817,26 @@ declare namespace __esri { * * @param location The location of the bottom center of the cylinder. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a specific unit is specified. * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). * @param params.material The material to be used for the mesh. * */ createCylinder(location: Point, params?: MeshCreateCylinderParams): Mesh; + /** + * Creates a new mesh geometry from a glTF model referenced by the `url` parameter. The spatial reference of the resulting mesh is the same as the `location` parameter. For more information on the supported glTF features you can read the [Visualizing points with 3D symbols](https://developers.arcgis.com/javascript/latest/guide/visualizing-points-3d/index.html) guide topic. Animations are currently not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromGLTF) + * + * @param location The location of the origin of the model. If the location doesn't contain a z value, z is assumed to be `0`. + * @param url The URL of the glTF model. The URL should point to a glTF file (.gltf or .glb) which can reference additional binary (.bin) and image files (.jpg, .png). + * @param params Additional parameters. + * @param params.geographic Whether the model coordinates should be relative to the geographic or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + */ + createFromGLTF(location: Point, url: string, params?: MeshCreateFromGLTFParams): IPromise; /** * Creates a new mesh geometry from a polygon geometry. The resulting mesh contains only a position vertex attribute and a single component with faces. The default shading will be set to `flat`. The spatial reference of the resulting mesh is the same as the input polygon. The resulting mesh will not contain any uv nor normal vertex attributes. * @@ -3793,9 +3855,10 @@ declare namespace __esri { * * @param location The location of the bottom center of the plane. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * @param params.facing Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`, * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.material The material to be used for the mesh. * */ @@ -3807,8 +3870,9 @@ declare namespace __esri { * * @param location The location of the bottom center of the sphere. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). * @param params.material The material to be used for the mesh. * @@ -3852,7 +3916,7 @@ declare namespace __esri { export interface MeshCreateBoxParams extends Object { /** - * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) */ @@ -3863,6 +3927,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + unit?: string; /** * The material to be used for the mesh. * @@ -3909,7 +3979,7 @@ declare namespace __esri { export interface MeshCreateCylinderParams extends Object { /** - * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a specific unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) */ @@ -3920,6 +3990,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + unit?: string; /** * The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). * @@ -3964,6 +4040,15 @@ declare namespace __esri { height?: number; } + export interface MeshCreateFromGLTFParams extends Object { + /** + * Whether the model coordinates should be relative to the geographic or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromGLTF) + */ + geographic?: boolean; + } + export interface MeshCreateFromPolygonParams extends Object { /** * The material to be used for the mesh. @@ -3984,7 +4069,7 @@ declare namespace __esri { export interface MeshCreatePlaneParams extends Object { /** - * A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) */ @@ -4001,6 +4086,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + unit?: string; /** * The material to be used for the mesh. * @@ -4035,7 +4126,7 @@ declare namespace __esri { export interface MeshCreateSphereParams extends Object { /** - * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) */ @@ -4046,6 +4137,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + unit?: string; /** * The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). * @@ -4114,6 +4211,21 @@ declare namespace __esri { origin?: Point; } + export interface MeshScaleParams extends Object { + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale) + */ + geographic?: boolean; + /** + * The origin point for scaling. If not specified, the mesh will be scaled around the mesh extent center. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale) + */ + origin?: Point; + } + export interface MeshVertexAttributesProperties extends Object { /** * A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry. @@ -4261,6 +4373,7 @@ declare namespace __esri { longitude: number; /** * The m-coordinate of the point in map units. + * > **M-values** (measure) allow attribute values to be stored at the vertex of a point. A common usage for storing a measurement in the vertices along a linear feature are [linear referencing](https://desktop.arcgis.com/en/arcmap/latest/extensions/roads-and-highways/advanced-linear-referencing-multiple-linear-referencing-methods.htm) applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#m) * @@ -4373,6 +4486,7 @@ declare namespace __esri { longitude?: number; /** * The m-coordinate of the point in map units. + * > **M-values** (measure) allow attribute values to be stored at the vertex of a point. A common usage for storing a measurement in the vertices along a linear feature are [linear referencing](https://desktop.arcgis.com/en/arcmap/latest/extensions/roads-and-highways/advanced-linear-referencing-multiple-linear-referencing-methods.htm) applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#m) * @@ -4530,7 +4644,7 @@ declare namespace __esri { interface PolygonConstructor { /** - * A polygon contains an array of [rings](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#rings) and a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#spatialReference). Each ring is represented as an array points. The first and last points of a ring must be the same. A polygon also has boolean-valued [hasM](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) and [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) fields. + * A polygon contains an array of [rings](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#rings) and a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#spatialReference). Each ring is represented as an array of points. The first and last points of a ring must be the same. A polygon also has boolean-valued [hasM](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) and [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) */ @@ -4784,59 +4898,6 @@ declare namespace __esri { export const projection: projection; - interface ScreenPoint extends Accessor { - /** - * X-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#x) - * - * @default 0 - */ - x: number; - /** - * Y-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#y) - * - * @default 0 - */ - y: number; - - /** - * Creates a deep clone of ScreenPoint object. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#clone) - * - * - */ - clone(): ScreenPoint; - } - - interface ScreenPointConstructor { - new (properties?: ScreenPointProperties): ScreenPoint; - } - - export const ScreenPoint: ScreenPointConstructor; - - interface ScreenPointProperties { - /** - * X-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#x) - * - * @default 0 - */ - x?: number; - /** - * Y-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#y) - * - * @default 0 - */ - y?: number; - } - interface SpatialReference extends Accessor, JSONSupport { /** * Indicates if the spatial reference refers to a geographic coordinate system. @@ -5006,7 +5067,7 @@ declare namespace __esri { */ data: HTMLImageElement | HTMLCanvasElement | ImageData; /** - * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. In all other cases it defaults to `false`. + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#transparent) * @@ -5056,7 +5117,7 @@ declare namespace __esri { */ data?: HTMLImageElement | HTMLCanvasElement | ImageData; /** - * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. In all other cases it defaults to `false`. + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#transparent) * @@ -5102,11 +5163,11 @@ declare namespace __esri { */ faces: Uint32Array; /** - * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * The material determines how the component is visualized. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) */ - material: MeshComponentMaterial; + material: MeshMaterial; /** * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: * @@ -5151,11 +5212,11 @@ declare namespace __esri { */ faces?: Uint32Array | number[] | Uint16Array; /** - * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * The material determines how the component is visualized. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) */ - material?: MeshComponentMaterialProperties; + material?: MeshMaterialProperties; /** * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: * @@ -5171,22 +5232,217 @@ declare namespace __esri { shading?: string; } - export interface MeshComponentMaterialProperties extends Object { + interface MeshMaterial extends Accessor { /** - * the material color. + * Specifies how transparency on the object is handled. If `alphaMode` is set to either `mask` or `auto` this property specifies the cutoff value below which masking happens (that is, the coresponding part of the Mesh is rendered fully transparent). * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaCutoff) + * + * @default 0.5 */ - color?: ValueMeshColorProperties | ImageMeshColorProperties; + alphaCutoff: number; + /** + * Specifies how transparency on the object is handled. See also `alphaCutoff`. + * + * | Type | Description | + * |------|-------------| + * | opaque | Alpha is ignored, and the object is rendered fully opaque. | + * | blend | Alpha values are used for gradual transparency, blending between the object and its background. | + * | mask | Alpha values are used for binary transparency, either displaying the object, or its background. See also `alphaCutoff`. | + * | auto | The implementation mixes the `mask` and `blend` settings, masking below `alphaCutoff` and blending above it. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaMode) + * + * @default "auto" + */ + alphaMode: string; + /** + * Allows to specify a single, uniform color for the mesh component. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#color) + */ + color: Color; + /** + * Allows to specify a texture to get color information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#colorTexture) + */ + colorTexture: MeshTexture; + /** + * Specifies whether both sides of each triangle are displayed, or only the front sides. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#doubleSided) + * + * @default true + */ + doubleSided: boolean; + /** + * Allows to specify a texture to get normal information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. Normal mapping requires also for tangents to be specified in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#normalTexture) + */ + normalTexture: MeshTexture; } - export interface MeshComponentMaterial extends AnonymousAccessor { + interface MeshMaterialConstructor { /** - * the material color. + * The material determines how a mesh component is visualized. Among other properties, MeshMaterial specifies a color that may be a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) value, as well as a colorTexture that may be a [MeshTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html)), which is mapped to the uv coordinate specified for each vertex in the [Mesh.vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes). * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html) */ - color: ValueMeshColor | ImageMeshColor; + + new (properties?: MeshMaterialProperties): MeshMaterial; + } + + export const MeshMaterial: MeshMaterialConstructor; + + interface MeshMaterialProperties { + /** + * Specifies how transparency on the object is handled. If `alphaMode` is set to either `mask` or `auto` this property specifies the cutoff value below which masking happens (that is, the coresponding part of the Mesh is rendered fully transparent). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaCutoff) + * + * @default 0.5 + */ + alphaCutoff?: number; + /** + * Specifies how transparency on the object is handled. See also `alphaCutoff`. + * + * | Type | Description | + * |------|-------------| + * | opaque | Alpha is ignored, and the object is rendered fully opaque. | + * | blend | Alpha values are used for gradual transparency, blending between the object and its background. | + * | mask | Alpha values are used for binary transparency, either displaying the object, or its background. See also `alphaCutoff`. | + * | auto | The implementation mixes the `mask` and `blend` settings, masking below `alphaCutoff` and blending above it. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaMode) + * + * @default "auto" + */ + alphaMode?: string; + /** + * Allows to specify a single, uniform color for the mesh component. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#color) + */ + color?: Color | number[] | string; + /** + * Allows to specify a texture to get color information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#colorTexture) + */ + colorTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; + /** + * Specifies whether both sides of each triangle are displayed, or only the front sides. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#doubleSided) + * + * @default true + */ + doubleSided?: boolean; + /** + * Allows to specify a texture to get normal information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. Normal mapping requires also for tangents to be specified in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#normalTexture) + */ + normalTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; + } + + interface MeshTexture extends Accessor { + /** + * A direct reference to the image data. The image data can be an [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). The data property is mutually exclusive with the url property, setting the data will clear the url (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#data) + */ + data: HTMLImageElement | HTMLCanvasElement | ImageData; + /** + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#transparent) + * + * @default undefined + */ + transparent: boolean; + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. The url property is mutually exclusive with the data property, setting the url will clear the data (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#url) + */ + url: string; + /** + * Specifies how uv coordinates outside the [0, 1] range are handled. One of "repeat", "clamp" or "mirror". Can also be specified separately for the two texture axes using an object: + * ```js + * { + * vertical: "clamp", + * horizontal: "repeat" + * } + * ``` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#wrap) + * + * @default "repeat" + */ + wrap: string | any; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#clone) + * + * + */ + clone(): MeshTexture; + } + + interface MeshTextureConstructor { + /** + * MeshTexture represents image data to be used for a MeshMaterial. It is mapped to the mesh by its uv vertex attributes. MeshTexture instances can be used with the [MeshComponent.material.colorTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) and [MeshComponent.material.normalTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) properties. Images can be referred to either by url or directly by data ( [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html) + */ + + new (properties?: MeshTextureProperties): MeshTexture; + } + + export const MeshTexture: MeshTextureConstructor; + + interface MeshTextureProperties { + /** + * A direct reference to the image data. The image data can be an [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). The data property is mutually exclusive with the url property, setting the data will clear the url (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#data) + */ + data?: HTMLImageElement | HTMLCanvasElement | ImageData; + /** + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#transparent) + * + * @default undefined + */ + transparent?: boolean; + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. The url property is mutually exclusive with the data property, setting the url will clear the data (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#url) + */ + url?: string; + /** + * Specifies how uv coordinates outside the [0, 1] range are handled. One of "repeat", "clamp" or "mirror". Can also be specified separately for the two texture axes using an object: + * ```js + * { + * vertical: "clamp", + * horizontal: "repeat" + * } + * ``` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#wrap) + * + * @default "repeat" + */ + wrap?: string | any; } interface meshUtils { @@ -5208,7 +5464,7 @@ declare namespace __esri { params?: meshUtilsCreateFromElevationParams ): IPromise; /** - * Georeferences vertices specified in a Cartesian coordinate system. This is useful when converting general 3D model meshes not typically georeferenced. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from a local (0, 0, 0) Cartesian system to the properly georeferenced coordinates at the specified `location`. The `location`'s coordinate system determines the units of the converted positions. If the coordinate system is WGS84, metric units are used. + * Georeferences vertices specified in a Cartesian coordinate system. This is useful when converting general 3D model meshes not typically georeferenced. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from a local (0, 0, 0) Cartesian system to the properly georeferenced coordinates at the specified `location`. The unit of the source data defaults to the unit of the `location`'s spatial reference. If the coordinate system is WGS84, metric units are used as the default. The unit of the source data may be specified in the additional `params` in which case a linear unit scale will automatically be applied to bring the source data in the unit of the spatial reference. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) * @@ -5216,6 +5472,7 @@ declare namespace __esri { * @param location The location at which to georeference the position and normal buffers. * @param params Optional parameters. * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system. + * @param params.unit Indicates the unit of the source data. A linear scale will be applied to the position attributes to convert the source data to the unit of the spatial reference at which the mesh is being georeferenced. By default the unit of the source data is assumed to be the same as the target spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * */ georeference( @@ -5233,7 +5490,7 @@ declare namespace __esri { */ merge(geometries: Mesh[]): Mesh; /** - * Projects georeferenced vertices to a Cartesian coordinate system. This is useful for converting existing scene geometry so that it can be used as source material for generating new 3D meshes. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from georeferenced coordinates at the specified `location` to a local (0, 0, 0) Cartesian system. The units of the input positions are determined by the `location`'s coordinate system. If the coordinate system is WGS84, metric units are used. + * Projects georeferenced vertices to a Cartesian coordinate system. This is useful for converting existing scene geometry so that it can be used as source material for generating new 3D meshes. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from georeferenced coordinates at the specified `location` to a local (0, 0, 0) Cartesian system. The unit of the resulting data defaults to the unit of the `location`'s spatial reference. If the coordinate system is WGS84, metric units are used as the default. The unit of the resulting data may be specified in the additional `params` in which case a linear unit scale will automatically be applied. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference) * @@ -5241,6 +5498,7 @@ declare namespace __esri { * @param location The location to which the position and normal buffers are georeferenced. * @param params Optional parameters. * @param params.geographic Indicates whether the coordinates are georeferenced relative to the globe or the projected coordinate system. + * @param params.unit Indicates the unit of the resulting data. A linear scale will be applied to the position attributes to convert the source data to the specified unit. By default the unit of the resulting data will be the same as the source spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * */ ungeoreference( @@ -5285,6 +5543,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) */ geographic?: boolean; + /** + * Indicates the unit of the source data. A linear scale will be applied to the position attributes to convert the source data to the unit of the spatial reference at which the mesh is being georeferenced. By default the unit of the source data is assumed to be the same as the target spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) + */ + unit?: string; } export interface meshUtilsUngeoreferenceParams extends Object { @@ -5294,6 +5558,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference) */ geographic?: boolean; + /** + * Indicates the unit of the resulting data. A linear scale will be applied to the position attributes to convert the source data to the specified unit. By default the unit of the resulting data will be the same as the source spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference) + */ + unit?: string; } /** @@ -5556,9 +5826,10 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#getEffectivePopupTemplate) * + * @param defaultPopupTemplateEnabled Whether support for default popup templates is enabled. When true, a default popup template may be created automatically if neither the graphic nor its layer have a popup template defined. * */ - getEffectivePopupTemplate(): PopupTemplate; + getEffectivePopupTemplate(defaultPopupTemplateEnabled?: boolean): PopupTemplate; /** * Sets a new value to the specified attribute. * @@ -5902,7 +6173,7 @@ declare namespace __esri { userId: string; /** - * Destroys the credential. When the credential is destroyed, you should remove any map layers that are using this credential. + * Destroys the credential. When the credential is destroyed, you should remove any map layers that are using this credential. Any tokens generated via OAuth will automatically be revoked. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#destroy) * @@ -6024,7 +6295,7 @@ declare namespace __esri { */ checkSignInStatus(resUrl: string): IPromise; /** - * Destroys all credentials. + * Destroys all credentials. It is good practice to call this method if working with an application that contains sign-out functionality as any tokens generated via OAuth will automatically be revoked. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#destroyCredentials) * @@ -6044,12 +6315,12 @@ declare namespace __esri { /** * Returns the [OAuthInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html) configuration for the passed in Portal server URL. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#findOauthInfo) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#findOAuthInfo) * * @param url The URL to a Portal. * */ - findOauthInfo(url: string): OAuthInfo; + findOAuthInfo(url: string): OAuthInfo; /** * Returns information about the server that is hosting the specified URL. * @@ -7049,6 +7320,15 @@ declare namespace __esri { */ readonly sublayers: Collection; + /** + * Loads the layer and all of its sublayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#loadAll) + * + * + */ + loadAll(): IPromise; + on(name: "layerview-create", eventHandler: BuildingSceneLayerLayerviewCreateEventHandler): IHandle; on(name: "layerview-destroy", eventHandler: BuildingSceneLayerLayerviewDestroyEventHandler): IHandle; @@ -7127,7 +7407,21 @@ declare namespace __esri { */ definitionExpression: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#listMode) + * + * @default show + */ + listMode: "show" | "hide"; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupEnabled) * @@ -7135,7 +7429,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) */ @@ -7152,6 +7446,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#type) */ readonly type: "building-component"; + + /** + * Creates a default popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: BuildingComponentSublayerCreatePopupTemplateOptions): PopupTemplate; } interface BuildingComponentSublayerConstructor { @@ -7170,7 +7476,21 @@ declare namespace __esri { */ definitionExpression?: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#listMode) + * + * @default show + */ + listMode?: "show" | "hide"; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupEnabled) * @@ -7178,7 +7498,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) */ @@ -7191,7 +7511,39 @@ declare namespace __esri { renderer?: RendererProperties; } + export interface BuildingComponentSublayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + interface BuildingGroupSublayer extends BuildingSublayer { + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#listMode) + * + * @default show + */ + listMode: "show" | "hide" | "hide-children"; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of sublayers. * @@ -7204,6 +7556,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#type) */ readonly type: "building-group"; + + /** + * Loads all contained sublayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#loadAll) + * + * + */ + loadAll(): IPromise; } interface BuildingGroupSublayerConstructor { @@ -7214,7 +7575,23 @@ declare namespace __esri { export const BuildingGroupSublayer: BuildingGroupSublayerConstructor; - interface BuildingGroupSublayerProperties extends BuildingSublayerProperties {} + interface BuildingGroupSublayerProperties extends BuildingSublayerProperties { + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#listMode) + * + * @default show + */ + listMode?: "show" | "hide" | "hide-children"; + } interface BuildingSublayer extends Accessor { /** @@ -7286,7 +7663,7 @@ declare namespace __esri { visible?: boolean; } - interface CSVLayer extends Layer { + interface CSVLayer extends Layer, PortalLayer, ScaleRangeLayer, TemporalLayer { /** * Copyright information for the layer. * @@ -7333,7 +7710,7 @@ declare namespace __esri { */ fields: Field[]; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) @@ -7355,14 +7732,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#latitudeField) */ latitudeField: string; - /** - * Indicates whether the layer will be included in the legend. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#legendEnabled) - * - * @default true - */ - legendEnabled: boolean; /** * The longitude field name. If not specified, the API will look for following field names in the CSV source: "lon", "lng", "long", "longitude", "x", "xcenter", "longitude83", "longdecdeg", "POINT-X". * @@ -7370,21 +7739,11 @@ declare namespace __esri { */ longitudeField: string; /** - * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) value, and greater than or equal to the service specification. + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#fields) containing a unique value or identifier for each feature in the layer. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) - * - * @default 0 + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#objectIdField) */ - maxScale: number; - /** - * The minimum scale (most zoomed out) at which the layer is visible in the view. If the map is zoomed out beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a minimum scale. The minScale value should always be larger than the [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) value, and lesser than or equal to the service specification. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) - * - * @default 0 - */ - minScale: number; + objectIdField: string; /** * An array of field names to include in the CSVLayer. If not specified, the layer will include all fields. * @@ -7392,7 +7751,7 @@ declare namespace __esri { */ outFields: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupEnabled) * @@ -7400,7 +7759,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) */ @@ -7436,6 +7795,17 @@ declare namespace __esri { */ url: string; + /** + * Creates a popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: CSVLayerCreatePopupTemplateOptions): PopupTemplate; /** * Creates query parameters that can be used to fetch features that satisfy the layer's current filters, and definitions. * @@ -7522,11 +7892,17 @@ declare namespace __esri { */ new (properties?: CSVLayerProperties): CSVLayer; + + fromJSON(json: any): CSVLayer; } export const CSVLayer: CSVLayerConstructor; - interface CSVLayerProperties extends LayerProperties { + interface CSVLayerProperties + extends LayerProperties, + PortalLayerProperties, + ScaleRangeLayerProperties, + TemporalLayerProperties { /** * Copyright information for the layer. * @@ -7573,7 +7949,7 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) @@ -7595,14 +7971,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#latitudeField) */ latitudeField?: string; - /** - * Indicates whether the layer will be included in the legend. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#legendEnabled) - * - * @default true - */ - legendEnabled?: boolean; /** * The longitude field name. If not specified, the API will look for following field names in the CSV source: "lon", "lng", "long", "longitude", "x", "xcenter", "longitude83", "longdecdeg", "POINT-X". * @@ -7610,21 +7978,11 @@ declare namespace __esri { */ longitudeField?: string; /** - * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) value, and greater than or equal to the service specification. + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#fields) containing a unique value or identifier for each feature in the layer. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) - * - * @default 0 + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#objectIdField) */ - maxScale?: number; - /** - * The minimum scale (most zoomed out) at which the layer is visible in the view. If the map is zoomed out beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a minimum scale. The minScale value should always be larger than the [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) value, and lesser than or equal to the service specification. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) - * - * @default 0 - */ - minScale?: number; + objectIdField?: string; /** * An array of field names to include in the CSVLayer. If not specified, the layer will include all fields. * @@ -7632,7 +7990,7 @@ declare namespace __esri { */ outFields?: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupEnabled) * @@ -7640,7 +7998,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) */ @@ -7677,6 +8035,23 @@ declare namespace __esri { url?: string; } + export interface CSVLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + export interface CSVLayerElevationInfo extends Object { /** * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values. @@ -7742,111 +8117,6 @@ declare namespace __esri { view: View; } - interface DynamicLayer { - /** - * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#portalItem) - */ - portalItem: PortalItem; - /** - * The URL to the REST endpoint of the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#url) - */ - url: string; - - /** - * This method fetches the image for the specified extent and size. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) - * - * @param extent The extent of the view. - * @param width The width of the view in pixels. - * @param height The height of the view in pixels. - * @param options The parameter options is an object with the following properties. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * - */ - fetchImage( - extent: Extent, - width: number, - height: number, - options?: DynamicLayerFetchImageOptions - ): IPromise; - /** - * This method returns a URL to an image for a given extent, width and height. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) - * - * @param extent The extent of the exported image. - * @param width The width of the view in pixels. - * @param height The height of the view in pixels. - * @param options The parameter options is an object with the following properties. - * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * - */ - getImageUrl( - extent: Extent, - width: number, - height: number, - options?: DynamicLayerGetImageUrlOptions - ): IPromise | string; - } - - interface DynamicLayerConstructor { - new (): DynamicLayer; - } - - export const DynamicLayer: DynamicLayerConstructor; - - interface DynamicLayerProperties { - /** - * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#portalItem) - */ - portalItem?: PortalItemProperties; - /** - * The URL to the REST endpoint of the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#url) - */ - url?: string; - } - - export interface DynamicLayerFetchImageOptions extends Object { - /** - * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) - */ - rotation?: number; - /** - * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) - */ - pixelRatio?: number; - } - - export interface DynamicLayerGetImageUrlOptions extends Object { - /** - * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) - */ - pixelRatio?: number; - /** - * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) - */ - rotation?: number; - } - interface ElevationLayer extends Layer, ArcGISCachedService, PortalLayer { /** * URL pointing to the Elevation layer resource on an ArcGIS Image Server. @@ -8053,7 +8323,7 @@ declare namespace __esri { demResolution: number; } - interface FeatureLayer extends Layer, PortalLayer, ScaleRangeLayer, RefreshableLayer { + interface FeatureLayer extends Layer, PortalLayer, ScaleRangeLayer, RefreshableLayer, TemporalLayer { /** * Describes the layer's supported capabilities. * @@ -8061,7 +8331,7 @@ declare namespace __esri { */ readonly capabilities: FeatureLayerCapabilities; /** - * The copyright text as defined by the map service. + * Copyright information for the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#copyright) */ @@ -8084,6 +8354,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#dynamicDataSource) */ dynamicDataSource: DynamicMapLayer | DynamicDataLayer; + /** + * The editor tracking fields, which record who adds or edits the data through the feature service and when edits are made. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#editFieldsInfo) + */ + readonly editFieldsInfo: EditFieldsInfo; /** * Specifies how features are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. * @@ -8109,19 +8385,11 @@ declare namespace __esri { */ readonly gdbVersion: string; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | extent | mesh + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ geometryType: string; - /** - * Indicates if attachments are enabled on the feature layer. Use `FeatureLayer.capabilities.data.supportsAttachment` instead. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#hasAttachments) - * - * @default false - */ - readonly hasAttachments: boolean; /** * Indicates whether the client-side features in the layer have `M` (measurement) values. Use the `supportsM` property in the FeatureLayer's [capabilities.data](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) object to verify if `M` values are supported on [feature service](https://developers.arcgis.com/rest/services-reference/feature-service.htm) features. * @@ -8145,9 +8413,16 @@ declare namespace __esri { */ historicMoment: Date; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. The [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true` for labels to display in the view. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * Returns `true` if the layer is loaded from a non-spatial table in a service. Non-spatial table does not have a spatial column that represents geographic features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#isTable) + * + * @default false + */ + isTable: boolean; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** - * * Currently only FeatureLayers with point and polygon geometries are supported. * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) @@ -8189,13 +8464,15 @@ declare namespace __esri { */ objectIdField: string; /** - * An array of field names from the service to include in the FeatureLayer. If not specified, the layer will only return the `OBJECTID` field. To fetch the values from all fields in the layer, use `["*"]`. This is particularly useful when editing features. + * An array of field names from the service to include with each feature. To fetch the values from all fields in the layer, use `["*"]`. Fields specified in `outFields` will be requested alongside with required fields for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) and setting the [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) for the layer. The required fields and `outFields` are used populate [FeatureLayerView.availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). Set this property to include the fields that will be used for client-side [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) and [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) if the fields are not part of required fields mentioned above. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) + * + * @default null */ outFields: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled) * @@ -8203,7 +8480,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) */ @@ -8263,12 +8540,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#templates) */ templates: FeatureTemplate[]; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token) - */ - readonly token: string; /** * The name of the field holding the type ID or subtypes for the features. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). * @@ -8282,7 +8553,7 @@ declare namespace __esri { */ types: FeatureType[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer, non-spatial table or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ @@ -8317,7 +8588,18 @@ declare namespace __esri { */ applyEdits(edits: FeatureLayerApplyEditsEdits): IPromise; /** - * Creates query parameters that can be used to fetch features that satisfy the layer's current filters, and definitions. + * Creates a popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: FeatureLayerCreatePopupTemplateOptions): PopupTemplate; + /** + * Creates query parameter object that can be used to fetch features that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#definitionExpression), [gdbVersion](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#gdbVersion), and [historicMoment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#historicMoment). It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities). It sets the query parameter's [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) property to `["*"]`. The results will include geometries of features and values for all [available fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields) for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) or all fields in the layer for [server side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createQuery) * @@ -8343,6 +8625,15 @@ declare namespace __esri { * */ getFeatureType(feature: Graphic): FeatureType; + /** + * Returns the [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) instance for a field name. This method first looks for the field by its `name`, and if not found does a case-insensitive search for it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#getField) + * + * @param fieldName Name of the field. + * + */ + getField(fieldName: string): Field; /** * Returns the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) associated with the given field name. The domain can be either a [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html) or [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html). * @@ -8436,7 +8727,7 @@ declare namespace __esri { interface FeatureLayerConstructor { /** - * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS Enterprise portal items; or from an array of client-side features. It is composed of discrete features, each of which has a [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered in either a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) as a [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with spatial context. Features also contain data [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) that provide additional information about the real-world feature it represents; attributes may be viewed in [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) windows and used for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) the layer. FeatureLayers may be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures), [analyzed](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html), and [rendered](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer) to visualize data in a spatial context. + * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS Enterprise portal items; or from an array of client-side features. The layer can be either a spatial (has geographic features) or non-spatial (table). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) */ @@ -8452,9 +8743,10 @@ declare namespace __esri { extends LayerProperties, PortalLayerProperties, ScaleRangeLayerProperties, - RefreshableLayerProperties { + RefreshableLayerProperties, + TemporalLayerProperties { /** - * The copyright text as defined by the map service. + * Copyright information for the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#copyright) */ @@ -8496,7 +8788,7 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | extent | mesh + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ @@ -8508,9 +8800,16 @@ declare namespace __esri { */ historicMoment?: DateProperties; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. The [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true` for labels to display in the view. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * Returns `true` if the layer is loaded from a non-spatial table in a service. Non-spatial table does not have a spatial column that represents geographic features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#isTable) + * + * @default false + */ + isTable?: boolean; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** - * * Currently only FeatureLayers with point and polygon geometries are supported. * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) @@ -8552,13 +8851,15 @@ declare namespace __esri { */ objectIdField?: string; /** - * An array of field names from the service to include in the FeatureLayer. If not specified, the layer will only return the `OBJECTID` field. To fetch the values from all fields in the layer, use `["*"]`. This is particularly useful when editing features. + * An array of field names from the service to include with each feature. To fetch the values from all fields in the layer, use `["*"]`. Fields specified in `outFields` will be requested alongside with required fields for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) and setting the [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) for the layer. The required fields and `outFields` are used populate [FeatureLayerView.availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). Set this property to include the fields that will be used for client-side [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) and [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) if the fields are not part of required fields mentioned above. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) + * + * @default null */ outFields?: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled) * @@ -8566,7 +8867,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) */ @@ -8627,13 +8928,45 @@ declare namespace __esri { */ types?: FeatureTypeProperties[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer, non-spatial table or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ url?: string; } + /** + * The fields that record who adds or edits data in the feature service and when the edit is made. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + export interface EditFieldsInfo extends Object { + /** + * The name of the field that stores the name of the user who created the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + creatorField: string; + /** + * The name of the field that stores the date and time the feature was created. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + creationDateField: string; + /** + * The name of the field that stores the name of the user who last edited the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + editorField: string; + /** + * The name of the field that stores the date and time the feature was last edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + editDateField: string; + } + /** * FeatureEditResult represents the result of adding, updating or deleting a feature. * @@ -8862,6 +9195,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsDistinct: boolean; + /** + * Indicates if the query operation supports `disjoint` [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsDisjointSpatialRelationship: boolean; /** * Indicates if the layer's query response includes the extent of features. At 10.3, this option is only available for hosted feature services. At 10.3.1, it is available for hosted and non-hosted feature services. * @@ -8869,7 +9208,7 @@ declare namespace __esri { */ supportsExtent: boolean; /** - * Indicates if the layer's query response contains geometry attributes, including shape area and length attributes. This operation is only supported in ArcGIS Online hosted feature services. + * Indicates if the layer's query response contains geometry attributes, including shape area and length attributes. This operation is supported in ArcGIS Online hosted feature services created since December 2016 and ArcGIS Enterprise feature services since version 10.7. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ @@ -8892,6 +9231,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsPagination: boolean; + /** + * Indicates if the query response includes the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsQueryGeometry: boolean; /** * Indicates if the query operation supports the projection of geometries onto a virtual grid. Requires an ArcGIS Server service 10.6.1 or greater. * @@ -8957,6 +9302,23 @@ declare namespace __esri { supportsPagination: boolean; } + export interface FeatureLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + export interface FeatureLayerElevationInfo extends Object { /** * Defines how the feature is placed with respect to the terrain surface. If the geometry consists of multiple points (e.g. lines or polygons), the elevation is evaluated separately for each point. See the table below for a list of possible values. @@ -9046,6 +9408,782 @@ declare namespace __esri { message: string; } + interface GeoJSONLayer extends Layer, ScaleRangeLayer, TemporalLayer { + /** + * Describes the layer's supported capabilities. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + readonly capabilities: GeoJSONLayerCapabilities; + /** + * Copyright information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#copyright) + */ + copyright: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#definitionExpression) + */ + definitionExpression: string; + /** + * The name of the layer's primary display field. The value of this property matches the name of one of the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#displayField) + */ + displayField: string; + /** + * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + elevationInfo: GeoJSONLayerElevationInfo; + /** + * Configures the method for decluttering overlapping features in the view. If this property is not set (or set to `null`), every feature is drawn individually. Currently this property is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) for point features with non-draped [Icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html) or [Text](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html) symbol layers. ![declutter](https://developers.arcgis.com/javascript/assets/img/samples/city-points-declutter.gif) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#featureReduction) + */ + featureReduction: GeoJSONLayerFeatureReduction; + /** + * An array of fields in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) + */ + fields: Field[]; + /** + * The geometry type of features in the layer. All features must be of the same type. **Possible Values:** point | multipoint | polyline | polygon + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#geometryType) + */ + geometryType: string; + /** + * Indicates whether the client-side features in the layer have `Z` (elevation) values. Refer to [elevationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) for details regarding placement and rendering of features with z-values in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Use the `supportsZ` property in the layer's [capabilities.data](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) object to verify if `Z` values are supported on the features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#hasZ) + * + * @default undefined + */ + readonly hasZ: boolean; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * > **Known Limitations** + * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) + */ + labelingInfo: LabelClass[]; + /** + * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) property. + * > **Known Limitations** + * * Currently 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only support one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) per feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelsVisible) + * + * @default true + */ + labelsVisible: boolean; + /** + * Indicates whether the layer will be included in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#legendEnabled) + * + * @default true + */ + legendEnabled: boolean; + /** + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) containing a unique value or identifier for each feature in the layer. `id` property of the feature object in the GeoJSON will be used as ObjectID. If `id` property is not present and `objectIDField` is not specified, `ObjectID` field will be generated for each feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField) + */ + objectIdField: string; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupEnabled) + * + * @default true + */ + popupEnabled: boolean; + /** + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) + */ + popupTemplate: PopupTemplate; + /** + * The renderer assigned to the layer. The renderer defines how to visualize each feature in the layer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions. If not specified, a default renderer will be generated based on the geometry type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#renderer) + */ + renderer: Renderer; + /** + * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true` ![screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-screenSize-perspective.png) `layer.screenSizePerspectiveEnabled = false` ![no-screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-no-screenSize-perspective.png) + * > **Known Limitations** Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes with point features located far from the ground surface. In these cases it may be better to turn off screen size perspective. As screen size perspective changes the size based on distance to the camera, it should be set to false when using {@link module:esri/renderers/Renderer#SizeVisualVariable size visual variables}. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#screenSizePerspectiveEnabled) + * + * @default true + */ + screenSizePerspectiveEnabled: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the GeoJSON file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference: SpatialReference; + /** + * An array of feature templates defined in the layer. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#templates) + */ + templates: FeatureTemplate[]; + /** + * The URL of the GeoJSON file. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#url) + */ + url: string; + + /** + * Applies edits to features in a layer. New features can be created and existing features can be updated or deleted on the cilent side. Feature geometries and/or attributes may be modified. If client-side features are added, removed or updated at runtime using [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) then use [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatures) to return updated features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + * + * @param edits Object containing features to be added, updated or deleted. + * @param edits.addFeatures Array of features to be added. Values of non nullable fields must be provided when adding new features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * @param edits.updateFeatures Array of features to be updated. Each feature must have valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). Values of non nullable fields must be provided when updating features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * @param edits.deleteFeatures An array of features or objects to be deleted. When an array of features is passed, each feature must have a valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). When an array of objects is used, each object must have a valid `objectId` property. + * + */ + applyEdits(edits: GeoJSONLayerApplyEditsEdits): IPromise; + /** + * Creates a popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: GeoJSONLayerCreatePopupTemplateOptions): PopupTemplate; + /** + * Creates query parameter object that can be used to fetch features that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#definitionExpression). It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities). It sets the query parameter's [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) property to `["*"]`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createQuery) + * + * + */ + createQuery(): Query; + /** + * Returns the [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) instance for a field name. This method first looks for the field by its `name`, and if not found does a case-insensitive search for it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#getField) + * + * @param fieldName Name of the field. + * + */ + getField(fieldName: string): Field; + /** + * Returns the Domain associated with the given field name. The domain can be either a CodedValueDomain or RangeDomain. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#getFieldDomain) + * + * @param fieldName Name of the field. + * @param options An object specifying additional options. See the object specification table below for the required properties of this object. + * @param options.feature The feature to which the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) is assigned. + * + */ + getFieldDomain(fieldName: string, options?: GeoJSONLayerGetFieldDomainOptions): Domain; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryExtent) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned. + * + */ + queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns the number of features that satisfy the query. If no parameters are specified, the total number of features satisfying the layer's configuration/filters is returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatureCount) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, the total number of features satisfying the layer's configuration/filters is returned. + * + */ + queryFeatureCount(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves. A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) features, which can be added to the [view's graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). This array will not be populated if zero results are found. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatures) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, then all features satisfying the layer's configuration/filters are returned. + * + */ + queryFeatures(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns an array of Object IDs for features that satisfy the input query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryObjectIds) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned. + * + */ + queryObjectIds(params?: Query | QueryProperties): IPromise; + + on(name: "layerview-create", eventHandler: GeoJSONLayerLayerviewCreateEventHandler): IHandle; + + on(name: "layerview-destroy", eventHandler: GeoJSONLayerLayerviewDestroyEventHandler): IHandle; + } + + interface GeoJSONLayerConstructor { + /** + * The GeoJSONLayer class is used to create a layer based on [GeoJSON](http://geojson.org/). GeoJSON is a format for encoding a variety of geographic data structures. The GeoJSON data must comply with the [RFC 7946 specification](https://tools.ietf.org/html/rfc7946) which states that the coordinates are in SpatialReference.WGS84. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) + */ + + new (properties?: GeoJSONLayerProperties): GeoJSONLayer; + } + + export const GeoJSONLayer: GeoJSONLayerConstructor; + + interface GeoJSONLayerProperties extends LayerProperties, ScaleRangeLayerProperties, TemporalLayerProperties { + /** + * Copyright information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#copyright) + */ + copyright?: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#definitionExpression) + */ + definitionExpression?: string; + /** + * The name of the layer's primary display field. The value of this property matches the name of one of the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#displayField) + */ + displayField?: string; + /** + * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + elevationInfo?: GeoJSONLayerElevationInfo; + /** + * Configures the method for decluttering overlapping features in the view. If this property is not set (or set to `null`), every feature is drawn individually. Currently this property is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) for point features with non-draped [Icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html) or [Text](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html) symbol layers. ![declutter](https://developers.arcgis.com/javascript/assets/img/samples/city-points-declutter.gif) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#featureReduction) + */ + featureReduction?: GeoJSONLayerFeatureReduction; + /** + * An array of fields in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) + */ + fields?: FieldProperties[]; + /** + * The geometry type of features in the layer. All features must be of the same type. **Possible Values:** point | multipoint | polyline | polygon + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#geometryType) + */ + geometryType?: string; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * > **Known Limitations** + * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) + */ + labelingInfo?: LabelClassProperties[]; + /** + * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) property. + * > **Known Limitations** + * * Currently 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only support one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) per feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelsVisible) + * + * @default true + */ + labelsVisible?: boolean; + /** + * Indicates whether the layer will be included in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#legendEnabled) + * + * @default true + */ + legendEnabled?: boolean; + /** + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) containing a unique value or identifier for each feature in the layer. `id` property of the feature object in the GeoJSON will be used as ObjectID. If `id` property is not present and `objectIDField` is not specified, `ObjectID` field will be generated for each feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField) + */ + objectIdField?: string; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupEnabled) + * + * @default true + */ + popupEnabled?: boolean; + /** + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) + */ + popupTemplate?: PopupTemplateProperties; + /** + * The renderer assigned to the layer. The renderer defines how to visualize each feature in the layer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions. If not specified, a default renderer will be generated based on the geometry type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#renderer) + */ + renderer?: RendererProperties; + /** + * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true` ![screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-screenSize-perspective.png) `layer.screenSizePerspectiveEnabled = false` ![no-screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-no-screenSize-perspective.png) + * > **Known Limitations** Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes with point features located far from the ground surface. In these cases it may be better to turn off screen size perspective. As screen size perspective changes the size based on distance to the camera, it should be set to false when using {@link module:esri/renderers/Renderer#SizeVisualVariable size visual variables}. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#screenSizePerspectiveEnabled) + * + * @default true + */ + screenSizePerspectiveEnabled?: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the GeoJSON file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference?: SpatialReferenceProperties; + /** + * An array of feature templates defined in the layer. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#templates) + */ + templates?: FeatureTemplateProperties[]; + /** + * The URL of the GeoJSON file. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#url) + */ + url?: string; + } + + export interface GeoJSONLayerApplyEditsEdits extends Object { + /** + * Array of features to be added. Values of non nullable fields must be provided when adding new features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + */ + addFeatures?: Graphic[]; + /** + * Array of features to be updated. Each feature must have valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). Values of non nullable fields must be provided when updating features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + */ + updateFeatures?: Graphic[]; + /** + * An array of features or objects to be deleted. When an array of features is passed, each feature must have a valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). When an array of objects is used, each object must have a valid `objectId` property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + */ + deleteFeatures?: Graphic[] | any[]; + } + + export interface GeoJSONLayerCapabilities extends Object { + /** + * Describes characteristics of the data in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + data: GeoJSONLayerCapabilitiesData; + /** + * Describes editing capabilities that can be performed on the features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + editing: GeoJSONLayerCapabilitiesEditing; + /** + * Describes operations that can be performed on features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + operations: GeoJSONLayerCapabilitiesOperations; + /** + * Describes [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) operations that can be performed on features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + query: GeoJSONLayerCapabilitiesQuery; + /** + * Indicates if the layer's query operation supports querying features or records related to features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + queryRelated: GeoJSONLayerCapabilitiesQueryRelated; + } + + export interface GeoJSONLayerCapabilitiesData extends Object { + /** + * Indicates if the attachment is enabled on the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsAttachment: boolean; + /** + * Indicates if the features in the layer support M values. Requires ArcGIS Server service 10.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsM: boolean; + /** + * Indicates if the features in the layer support Z values. Requires ArcGIS Server service 10.1 or greater. See [elevationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) for details regarding placement and rendering of features with z-values in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsZ: boolean; + } + + export interface GeoJSONLayerCapabilitiesEditing extends Object { + /** + * Indicates if anonymous users can delete features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDeleteByAnonymous: boolean; + /** + * Indicates if logged in users can delete features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDeleteByOthers: boolean; + /** + * Indicates if the geometry of the features in the layer can be edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsGeometryUpdate: boolean; + /** + * Indicates if the `globalid` values provided by the client are used in [applyEdits](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsGlobalId: boolean; + /** + * Indicates if the `rollbackOnFailure` parameter can be set to `true` or `false` when running the synchronizeReplica operation. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsRollbackOnFailure: boolean; + /** + * Indicates if anonymous users can update features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdateByAnonymous: boolean; + /** + * Indicates if logged in users can update features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdateByOthers: boolean; + /** + * Indicates if `m-values` must be provided when updating features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdateWithoutM: boolean; + /** + * Indicates if the layer supports uploading attachments by [UploadId](https://developers.arcgis.com/rest/services-reference/item.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUploadWithItemId: boolean; + } + + export interface GeoJSONLayerCapabilitiesOperations extends Object { + /** + * Indicates if new features can be [added](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) to the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsAdd: boolean; + /** + * Indicates if features can be [deleted](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) from the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDelete: boolean; + /** + * Indicates if features in the layer can be [updated](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdate: boolean; + /** + * Indicates if features in the layer can be [edited](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits). Use `supportsAdd`, `supportsUpdate` and `supportsDelete` to determine which editing operations are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsEditing: boolean; + /** + * Indicates if values of one or more field values in the layer can be updated. See the [Calculate REST operation](https://developers.arcgis.com/rest/services-reference/calculate-feature-service-layer-.htm) document for more information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsCalculate: boolean; + /** + * Indicates if features in the layer can be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatures). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQuery: boolean; + /** + * Indicates if the layer supports [REST API queryAttachments](https://developers.arcgis.com/rest/services-reference/query-attachments-feature-service-layer-.htm) operation, which is supported with hosted feature services at version 10.5 and greater. If `false`, [queryAttachments() method](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryAttachments) can only return attachments for one feature at a time. If `true`, `queryAttachments()` can return attachments for array of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQueryAttachments: boolean; + /** + * Indicates if the layer supports a SQL-92 expression or where clause. This operation is only supported in ArcGIS Online hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsValidateSql: boolean; + /** + * Indicates if resized attachments are supported in the layer. This is useful for showing thumbnails in [Popups](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsResizeAttachments: boolean; + } + + export interface GeoJSONLayerCapabilitiesQuery extends Object { + /** + * Indicates if the geometry centroid associated with each polygon feature can be returned. This operation is only supported in ArcGIS Online hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsCentroid: boolean; + /** + * Indicates if the layer's query operation supports a buffer distance for input geometries. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDistance: boolean; + /** + * Indicates if the layer supports queries for distinct values based on fields specified in the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#outFields). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDistinct: boolean; + /** + * Indicates if the query operation supports `disjoint` [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDisjointSpatialRelationship: boolean; + /** + * Indicates if the layer's query response includes the extent of features. At 10.3, this option is only available for hosted feature services. At 10.3.1, it is available for hosted and non-hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsExtent: boolean; + /** + * Indicates if the layer's query response contains geometry attributes, including shape area and length attributes. This operation is only supported in ArcGIS Online hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsGeometryProperties: boolean; + /** + * Indicates if the layer supports the [having](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#having) clause on the service. Requires an ArcGIS Server service 10.6.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsHavingClause: boolean; + /** + * Indicates if features returned in the query response can be ordered by one or more fields. Requires an ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsOrderBy: boolean; + /** + * Indicates if the query response supports pagination. Requires an ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsPagination: boolean; + /** + * Indicates if the query response includes the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQueryGeometry: boolean; + /** + * Indicates if the query operation supports the projection of geometries onto a virtual grid. Requires an ArcGIS Server service 10.6.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQuantization: boolean; + /** + * Indicates if the query operation supports quantization designed to be used in edit mode (highest resolution at the given spatial reference). Requires an ArcGIS Server service 10.6.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQuantizationEditMode: boolean; + /** + * Indicates if the number of features returned by the query operation can be controlled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsResultType: boolean; + /** + * Indicates if the query operation supports SQL expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsSqlExpression: boolean; + /** + * Indicates if the query operation supports using standardized queries. Learn more about [standardized queries here](http://server.arcgis.com/en/server/latest/administer/linux/about-standardized-queries.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsStandardizedQueriesOnly: boolean; + /** + * Indicates if the layer supports field-based statistical functions. Requires ArcGIS Server service 10.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsStatistics: boolean; + /** + * Indicates if the layer supports historic moment query. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsHistoricMoment: boolean; + } + + export interface GeoJSONLayerCapabilitiesQueryRelated extends Object { + /** + * Indicates if the layer's query response includes the number of features or records related to features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsCount: boolean; + /** + * Indicates if the related features or records returned in the query response can be ordered by one or more fields. Requires ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsOrderBy: boolean; + /** + * Indicates if the query response supports pagination for related features or records. Requires ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsPagination: boolean; + } + + export interface GeoJSONLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + + export interface GeoJSONLayerElevationInfo extends Object { + /** + * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values. + * + * Mode | Description + * ------|------------ + * on-the-ground | Graphics are draped on the terrain surface. This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [ObjectSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing up the terrain elevation and the result of `featureExpressionInfo` (if defined). This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html). + * absolute-height | Graphics are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account. + * relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + mode: string; + /** + * An elevation offset, which is added to the vertical position of the graphic. If `unit` is not defined, the offset is in `meters`. When `mode = "on-the-ground"`, this property has no effect. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + offset?: number; + /** + * This object contains information about setting a custom z-value on the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + featureExpressionInfo?: GeoJSONLayerElevationInfoFeatureExpressionInfo; + /** + * The unit for `featureExpressionInfo` and `offset` values. **Possible Values:** feet | meters | kilometers | miles | us-feet | yards + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + unit?: string; + } + + export interface GeoJSONLayerElevationInfoFeatureExpressionInfo extends Object { + /** + * An [Arcade expression](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) evaluating to a number that determines the z-value of the feature. When `mode = "on-the-ground"`, this property has no effect. For line and polygon geometries the result of the expression is the same for all vertices of a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + expression?: string; + } + + export interface GeoJSONLayerFeatureReduction extends Object { + /** + * Type of the decluttering method. The only supported type at the moment is `selection`. In this method, some of the overlapping features are hidden such that none of the remaining features intersect on screen. Label deconfliction also respects this option and hides labels that would overlap with the features of this layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#featureReduction) + */ + type: string; + } + + export interface GeoJSONLayerGetFieldDomainOptions extends Object { + /** + * The feature to which the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) is assigned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#getFieldDomain) + */ + feature: Graphic; + } + + export interface GeoJSONLayerLayerviewCreateEvent { + layerView: LayerView; + + view: View; + } + + export interface GeoJSONLayerLayerviewDestroyEvent { + layerView: LayerView; + + view: View; + } + interface GeoRSSLayer extends Layer, ScaleRangeLayer { /** * Symbol used to represent line features from the GeoRSS feed. @@ -9250,9 +10388,10 @@ declare namespace __esri { * Mode | Description * ------|------------ * on-the-ground | Graphics are placed on the terrain surface. - * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing up - * the terrain elevation, and the geometry's z-value (if present). In case `featureExpressionInfo` is defined, the result of the expression is used - * instead of the geometry’s z-value. absolute-height | Graphics are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. It doesn't take the elevation of the terrain into account. relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. In this mode z-values are ignored. + * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing the terrain elevation and the geometry's z-value (if present). In case `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. + * absolute-height | Graphics are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. It doesn't take the elevation of the terrain into account. + * relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. In this mode z-values are ignored. + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#elevationInfo) */ @@ -9377,7 +10516,7 @@ declare namespace __esri { */ pixelFilter: Function; /** - * Indicates whether to display popups when the layer is clicked. + * Indicates whether to display popups when the layer is clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupEnabled) * @@ -9390,12 +10529,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#portalItem) */ portalItem: PortalItem; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#token) - */ - readonly token: string; /** * Executes the [pixelFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#pixelFilter) function and redraws the layer. @@ -9437,7 +10570,7 @@ declare namespace __esri { */ pixelFilter?: Function; /** - * Indicates whether to display popups when the layer is clicked. + * Indicates whether to display popups when the layer is clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupEnabled) * @@ -9622,14 +10755,14 @@ declare namespace __esri { * ------|------------ * show | The layer is visible in the table of contents. * hide | The layer is hidden in the table of contents. - * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), hide the children layers from the table of contents. + * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) or [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html), hide the children layers from the table of contents. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#listMode) * * @default show */ - listMode: string; + listMode: "show" | "hide" | "hide-children"; /** * Indicates whether the layer's resources have loaded. When `true`, all the properties of the object can be accessed. * @@ -9667,6 +10800,15 @@ declare namespace __esri { */ visible: boolean; + /** + * Called by the views, such as [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), when the layer is added to the [Map.layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers) collection and a layer view must be created for it. **This method is used internally and there is no use case for invoking it directly**. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView) + * + * @param view The parent view. + * + */ + createLayerView(view: any): void; /** * Fetches custom attribution data for the layer when it becomes available. * @@ -9731,14 +10873,14 @@ declare namespace __esri { * ------|------------ * show | The layer is visible in the table of contents. * hide | The layer is hidden in the table of contents. - * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), hide the children layers from the table of contents. + * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) or [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html), hide the children layers from the table of contents. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#listMode) * * @default show */ - listMode?: string; + listMode?: "show" | "hide" | "hide-children"; /** * The opacity of the layer. This value can range between `1` and `0`, where `0` is 100 percent transparent and `1` is completely opaque. * @@ -9787,13 +10929,7 @@ declare namespace __esri { portalItem: PortalItem; } - interface MapImageLayer - extends Layer, - SublayersOwner, - ArcGISMapService, - DynamicLayer, - ScaleRangeLayer, - RefreshableLayer { + interface MapImageLayer extends Layer, SublayersOwner, ArcGISMapService, ScaleRangeLayer, RefreshableLayer { /** * A flat [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of all the [sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers) in the MapImageLayer including the sublayers of its sublayers. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). * @@ -9846,12 +10982,24 @@ declare namespace __esri { * @default true */ imageTransparency: boolean; + /** + * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#portalItem) + */ + portalItem: PortalItem; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) objects that allow you to alter the properties of one or more sublayers of the MapImageLayer. If this property is not specified, all the sublayers from the service are displayed as defined in the service. If an empty array is passed to this property then none of the sublayers from the service are displayed in the layer. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). They may be [added](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add), [removed](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#remove), or [reordered](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#reorder) using the [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) methods. Because [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) extends [Accessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html), its properties may be [watched](https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html#watchProperties). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers) */ sublayers: Collection; + /** + * The URL to the REST endpoint of the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#url) + */ + url: string; /** * Gets the parameters of the exported image to use when calling the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-map.htm). @@ -9872,6 +11020,44 @@ declare namespace __esri { height: number, options?: MapImageLayerCreateExportImageParametersOptions ): any; + /** + * This method fetches the image for the specified extent and size. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#fetchImage) + * + * @param extent The extent of the view. + * @param width The width of the view in pixels. + * @param height The height of the view in pixels. + * @param options The parameter options is an object with the following properties. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * + */ + fetchImage( + extent: Extent, + width: number, + height: number, + options?: MapImageLayerFetchImageOptions + ): IPromise; + /** + * This method returns a URL to an image for a given extent, width and height. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#getImageUrl) + * + * @param extent The extent of the exported image. + * @param width The width of the view in pixels. + * @param height The height of the view in pixels. + * @param options The parameter options is an object with the following properties. + * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * + */ + getImageUrl( + extent: Extent, + width: number, + height: number, + options?: MapImageLayerGetImageUrlOptions + ): IPromise | string; on(name: "layerview-create", eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; @@ -9895,7 +11081,6 @@ declare namespace __esri { interface MapImageLayerProperties extends LayerProperties, ArcGISMapServiceProperties, - DynamicLayerProperties, ScaleRangeLayerProperties, RefreshableLayerProperties { /** @@ -9944,12 +11129,24 @@ declare namespace __esri { * @default true */ imageTransparency?: boolean; + /** + * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#portalItem) + */ + portalItem?: PortalItemProperties; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) objects that allow you to alter the properties of one or more sublayers of the MapImageLayer. If this property is not specified, all the sublayers from the service are displayed as defined in the service. If an empty array is passed to this property then none of the sublayers from the service are displayed in the layer. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). They may be [added](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add), [removed](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#remove), or [reordered](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#reorder) using the [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) methods. Because [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) extends [Accessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html), its properties may be [watched](https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html#watchProperties). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers) */ sublayers?: CollectionProperties; + /** + * The URL to the REST endpoint of the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#url) + */ + url?: string; } export interface MapImageLayerLayerviewCreateEvent { @@ -9979,6 +11176,36 @@ declare namespace __esri { pixelRatio?: number; } + export interface MapImageLayerFetchImageOptions extends Object { + /** + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#fetchImage) + */ + rotation?: number; + /** + * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#fetchImage) + */ + pixelRatio?: number; + } + + export interface MapImageLayerGetImageUrlOptions extends Object { + /** + * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#getImageUrl) + */ + pixelRatio?: number; + /** + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#getImageUrl) + */ + rotation?: number; + } + interface MapNotesLayer extends Layer, PortalLayer, ScaleRangeLayer { on(name: "layerview-create", eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; @@ -10157,7 +11384,7 @@ declare namespace __esri { */ pixelType: string; /** - * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#popupTemplate) */ @@ -10182,6 +11409,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#rasterFields) */ rasterFields: Field[]; + /** + * The renderer assigned to the layer. The renderer defines how to visualize pixels in the layer. Depending on the renderer type, the pixels may be stretched across the color ramp, classified or have different symbols based on values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#renderer) + */ + renderer: Renderer; /** * Specifies the rule for how the requested image should be rendered. * @@ -10207,6 +11440,17 @@ declare namespace __esri { */ readonly version: number; + /** + * Creates a default popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: ArcGISImageServiceCreatePopupTemplateOptions): PopupTemplate; /** * Returns an image using the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-image.htm) that displays data from an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). * @@ -10328,7 +11572,7 @@ declare namespace __esri { */ pixelType?: string; /** - * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#popupTemplate) */ @@ -10353,6 +11597,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#rasterFields) */ rasterFields?: FieldProperties[]; + /** + * The renderer assigned to the layer. The renderer defines how to visualize pixels in the layer. Depending on the renderer type, the pixels may be stretched across the color ramp, classified or have different symbols based on values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#renderer) + */ + renderer?: RendererProperties; /** * Specifies the rule for how the requested image should be rendered. * @@ -10367,6 +11617,23 @@ declare namespace __esri { url?: string; } + export interface ArcGISImageServiceCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + interface ArcGISMapService { /** * Indicates the layer's supported capabilities. @@ -10400,12 +11667,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#spatialReference) */ readonly spatialReference: SpatialReference; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#token) - */ - readonly token: string; /** * The version of ArcGIS Server in which the map service is published. * @@ -10557,7 +11818,7 @@ declare namespace __esri { interface RefreshableLayer { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. + * Refresh interval of the layer in minutes. Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -10583,7 +11844,7 @@ declare namespace __esri { interface RefreshableLayerProperties { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. + * Refresh interval of the layer in minutes. Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -10660,12 +11921,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#spatialReference) */ spatialReference: SpatialReference; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#token) - */ - readonly token: string; /** * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. * @@ -10767,6 +12022,34 @@ declare namespace __esri { export const SublayersOwner: SublayersOwnerConstructor; + interface TemporalLayer { + /** + * The time info provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) time for each feature and the [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the layer. The `timeInfo` and its `startField` and `endField` properties must be set at the time of layer initialization if it is being set for [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) or [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) initialized from [client-side features](esri-layers-FeatureLayer.html#creating-a-featurelayer). The [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the timeInfo is automatically calculated based on `start` and `end` fields. The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#timeInfo) + * + * @default null + */ + timeInfo: TimeInfo; + } + + interface TemporalLayerConstructor { + new (): TemporalLayer; + } + + export const TemporalLayer: TemporalLayerConstructor; + + interface TemporalLayerProperties { + /** + * The time info provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) time for each feature and the [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the layer. The `timeInfo` and its `startField` and `endField` properties must be set at the time of layer initialization if it is being set for [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) or [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) initialized from [client-side features](esri-layers-FeatureLayer.html#creating-a-featurelayer). The [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the timeInfo is automatically calculated based on `start` and `end` fields. The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#timeInfo) + * + * @default null + */ + timeInfo?: TimeInfoProperties; + } + interface OpenStreetMapLayer extends WebTileLayer { on(name: "layerview-create", eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; @@ -10805,7 +12088,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudFilter.html#type) */ - readonly type: string; + readonly type: "value" | "bitfield" | "return"; } interface PointCloudFilterConstructor { @@ -10841,7 +12124,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudReturnFilter.html#includedReturns) */ - includedReturns: string[]; + includedReturns: ("firstOfMany" | "last" | "lastOfMany" | "single")[]; + /** + * For PointCloudReturnFilter the type is always `return`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudReturnFilter.html#type) + */ + readonly type: "return"; } interface PointCloudReturnFilterConstructor { @@ -10868,7 +12157,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudReturnFilter.html#includedReturns) */ - includedReturns?: string[]; + includedReturns?: ("firstOfMany" | "last" | "lastOfMany" | "single")[]; } interface PointCloudValueFilter extends PointCloudFilter { @@ -10879,7 +12168,13 @@ declare namespace __esri { * * @default "exclude" */ - mode: string; + mode: "include" | "exclude"; + /** + * For PointCloudValueFilter the type is always `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudValueFilter.html#type) + */ + readonly type: "value"; /** * An array of numeric values representing the classification codes that the filter should apply. * @@ -10910,7 +12205,7 @@ declare namespace __esri { * * @default "exclude" */ - mode?: string; + mode?: "include" | "exclude"; /** * An array of numeric values representing the classification codes that the filter should apply. * @@ -10937,7 +12232,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html#filters) */ - filters: PointCloudFilter[]; + filters: (PointCloudValueFilter | PointCloudReturnFilter)[]; /** * Indicates whether the layer will be included in the legend. * @@ -10990,7 +12285,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html#filters) */ - filters?: PointCloudFilterProperties[]; + filters?: (PointCloudValueFilterProperties | PointCloudReturnFilterProperties)[]; /** * Indicates whether the layer will be included in the legend. * @@ -11082,7 +12377,7 @@ declare namespace __esri { */ geometryType: string; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelsVisible) property of this layer must be set to `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. * > **Known Limitations** This property is only relevant to SceneLayers with [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. This property has no effect on SceneLayers with other geometry types. Each point can have only one label. Multiple [Label classes](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) with different [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelingInfo) @@ -11111,7 +12406,7 @@ declare namespace __esri { */ objectIdField: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupEnabled) * @@ -11119,7 +12414,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) */ @@ -11140,6 +12435,17 @@ declare namespace __esri { */ screenSizePerspectiveEnabled: boolean; + /** + * Creates a default popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: SceneLayerCreatePopupTemplateOptions): PopupTemplate; /** * Creates a query object that can be used to fetch features that satisfy the layer's current definition expression. The query should only be used on the layer and not on the layer view. * @@ -11254,7 +12560,7 @@ declare namespace __esri { */ geometryType?: string; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelsVisible) property of this layer must be set to `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. * > **Known Limitations** This property is only relevant to SceneLayers with [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. This property has no effect on SceneLayers with other geometry types. Each point can have only one label. Multiple [Label classes](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) with different [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelingInfo) @@ -11283,7 +12589,7 @@ declare namespace __esri { */ objectIdField?: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupEnabled) * @@ -11291,7 +12597,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) */ @@ -11325,6 +12631,23 @@ declare namespace __esri { view: View; } + export interface SceneLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + export interface SceneLayerElevationInfo extends Object { /** * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values. @@ -11369,13 +12692,13 @@ declare namespace __esri { interface StreamLayer extends FeatureLayer { /** - * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. + * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. **Use definitionExpression or geometryDefinition instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) */ readonly filter: StreamLayerFilter; /** - * An extent object used to filter features. Only features intersecting the extent are displayed in the view. Instead of using this property, use [StreamLayer.filter.geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) when creating the service or [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) when changing the spatial filter. + * An extent object used to filter features. Only features intersecting the extent are displayed in the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryDefinition) */ @@ -11394,7 +12717,7 @@ declare namespace __esri { purgeOptions: StreamLayerPurgeOptions; /** - * Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) on the layer. The filter is updated on all views that contain the layer. If the input `filterChanges` object is `undefined` or `null`, the spatial and attribute filters are removed. To update the filter on a single layer view associated with the layer, use the [StreamLayerView.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) method after getting the layer view object. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. + * Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) on the layer. The filter is updated on all views that contain the layer. If the input `filterChanges` object is `undefined` or `null`, the spatial and attribute filters are removed. To update the filter on a single layer view associated with the layer, use the [StreamLayerView.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) method after getting the layer view object. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. **Use [definitionExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#definitionExpression) or [geometryDefinition](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#definitionExpression) instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) * @@ -11426,13 +12749,13 @@ declare namespace __esri { interface StreamLayerProperties extends FeatureLayerProperties { /** - * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. + * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. **Use definitionExpression or geometryDefinition instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) */ filter?: StreamLayerFilter; /** - * An extent object used to filter features. Only features intersecting the extent are displayed in the view. Instead of using this property, use [StreamLayer.filter.geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) when creating the service or [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) when changing the spatial filter. + * An extent object used to filter features. Only features intersecting the extent are displayed in the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryDefinition) */ @@ -11515,6 +12838,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#contentType) */ contentType: string; + /** + * An array of [ExifInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo) + */ + exifInfo: ExifInfo[]; /** * The identifier for the attachment. * @@ -11564,7 +12893,7 @@ declare namespace __esri { interface AttachmentInfoConstructor { /** - * The AttachmentInfo class returns information about attachments associated with a feature. The contents of the attachment are streamed to the client. Attachments are available if the [FeatureLayer's capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * The `AttachmentInfo` class returns information about attachments associated with a feature. The contents of the attachment are streamed to the client. Attachments are available if the [FeatureLayer.capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) */ @@ -11583,6 +12912,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#contentType) */ contentType?: string; + /** + * An array of [ExifInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo) + */ + exifInfo?: ExifInfo[]; /** * The identifier for the attachment. * @@ -11621,6 +12956,47 @@ declare namespace __esri { url?: string; } + /** + * An array of [Exchangeable image file format](http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf) information for the attachment. You must set the attachment query's [returnMetadata](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#returnMetadata) to `true` to get the `exif` info associated with the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + export interface ExifInfo extends Object { + /** + * The file name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + name?: string; + /** + * Array of tag objects containing the following properties: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + tags?: ExifInfoTags[]; + } + + export interface ExifInfoTags extends Object { + /** + * The tag name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + name: string; + /** + * The tag description. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + description: string; + /** + * The value of the tag. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + value: any; + } + interface CodedValueDomain extends Domain { /** * An array of the coded values in the domain. See the object specification table below for the properties each item in the array should contain. @@ -12016,7 +13392,7 @@ declare namespace __esri { */ defaultValue: number | string | any | any; /** - * The domain associated with the field. + * The domain associated with the field. Domains are used to constrain the values allowed in a field. There are two types of domains: [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html) and [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#domain) * @@ -12105,7 +13481,7 @@ declare namespace __esri { */ defaultValue?: number | string | any | any; /** - * The domain associated with the field. + * The domain associated with the field. Domains are used to constrain the values allowed in a field. There are two types of domains: [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html) and [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#domain) * @@ -12168,6 +13544,47 @@ declare namespace __esri { | "xml"; } + interface fieldUtils { + /** + * Returns an array of field names used in the Arcade expression for calculating the Z values of features in the given feature layer's [FeatureLayer.elevationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getElevationFields) + * + * @param layer The featureLayer to extract fields required for calculating feature Z values. + * + */ + getElevationFields(layer: FeatureLayer): IPromise; + /** + * Returns an array of editor tracking field names for a given feature layer. It includes the fields from the [FeatureLayer.editFieldsInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#editFieldsInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getFeatureEditFields) + * + * @param layer The Feature Layer from which to extract editor tracking fields. + * + */ + getFeatureEditFields(layer: FeatureLayer): string[]; + /** + * Returns an array of field names used in the Arcade expression for labeling features in the given feature layer's [FeatureLayer.labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getLabelingFields) + * + * @param layer The Feature Layer from which to extract label fields. + * + */ + getLabelingFields(layer: FeatureLayer): IPromise; + /** + * Returns an array of field names related to time. It includes the fields from the [FeatureLayer.timeInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#timeInfo), and the `trackIdField`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getTimeFields) + * + * @param layer The Feature Layer from which to extract time fields. + * + */ + getTimeFields(layer: FeatureLayer): IPromise; + } + + export const fieldUtils: fieldUtils; + interface ImageParameters extends Accessor { /** * Dots per inch setting for an module:esri/layersMapImageLayer. @@ -12443,12 +13860,16 @@ declare namespace __esri { * Defines the content of label text for [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html). If working with [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), use [labelExpressionInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) instead. Attribute values may be included in labels using SQL syntax. To include an attribute value in a label, wrap the name of the field in square brackets `[]`. See the example snippet below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) + * + * @default null */ labelExpression: string; /** * Defines the content of label text for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). If working with [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), use [labelExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) instead. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) + * + * @default null */ labelExpressionInfo: LabelClassLabelExpressionInfo; /** @@ -12483,6 +13904,8 @@ declare namespace __esri { * Defines the symbol used for rendering the label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#symbol) + * + * @default null */ symbol: TextSymbol | LabelSymbol3D; /** @@ -12496,6 +13919,8 @@ declare namespace __esri { * > **Known Limitations** Only very basic SQL is currently supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) + * + * @default null */ where: string; @@ -12528,12 +13953,16 @@ declare namespace __esri { * Defines the content of label text for [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html). If working with [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), use [labelExpressionInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) instead. Attribute values may be included in labels using SQL syntax. To include an attribute value in a label, wrap the name of the field in square brackets `[]`. See the example snippet below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) + * + * @default null */ labelExpression?: string; /** * Defines the content of label text for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). If working with [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), use [labelExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) instead. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) + * + * @default null */ labelExpressionInfo?: LabelClassLabelExpressionInfo; /** @@ -12568,6 +13997,8 @@ declare namespace __esri { * Defines the symbol used for rendering the label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#symbol) + * + * @default null */ symbol?: TextSymbolProperties | LabelSymbol3DProperties; /** @@ -12581,6 +14012,8 @@ declare namespace __esri { * > **Known Limitations** Only very basic SQL is currently supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) + * + * @default null */ where?: string; } @@ -12777,6 +14210,12 @@ declare namespace __esri { * @default true */ ascending: boolean; + /** + * The rendering rule applied on items before mosaicking. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-MosaicRule.html#itemRenderingRule) + */ + itemRenderingRule: RasterFunction; /** * An array of raster Ids. All the rasters with the given list of raster Ids are selected to participate in the mosaic. The rasters will be visible at all pixel sizes regardless of the minimum and maximum pixel size range of the locked rasters. * @@ -12865,6 +14304,12 @@ declare namespace __esri { * @default true */ ascending?: boolean; + /** + * The rendering rule applied on items before mosaicking. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-MosaicRule.html#itemRenderingRule) + */ + itemRenderingRule?: RasterFunctionProperties; /** * An array of raster Ids. All the rasters with the given list of raster Ids are selected to participate in the mosaic. The rasters will be visible at all pixel sizes regardless of the minimum and maximum pixel size range of the locked rasters. * @@ -13096,7 +14541,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#variableName) */ - variableName: any; + variableName: string; } interface RasterFunctionConstructor { @@ -13139,7 +14584,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#variableName) */ - variableName?: any; + variableName?: string; } interface Relationship extends Accessor { @@ -13216,7 +14661,7 @@ declare namespace __esri { interface Sublayer extends Accessor { /** - * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. + * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. To see if you can use this property, check the `supportsSublayerDefinitionExpression` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#definitionExpression) */ @@ -13228,7 +14673,7 @@ declare namespace __esri { */ id: number; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelsVisible) property of the sublayer must be `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelingInfo) */ @@ -13255,6 +14700,21 @@ declare namespace __esri { * @default true */ legendEnabled: boolean; + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#listMode) + * + * @default show + */ + listMode: "show" | "hide" | "hide-children"; /** * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#minScale) value, and greater than or equal to the service specification. * @@ -13290,7 +14750,7 @@ declare namespace __esri { */ popupTemplate: PopupTemplate; /** - * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. + * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. To see if you can use this property, check the `supportsDynamicLayers` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not currently supported in renderers set on sublayers. * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6 map services (or later) created from ArcGIS Pro. @@ -13323,7 +14783,7 @@ declare namespace __esri { */ readonly url: string; /** - * Indicates if the layer is visible in the view. + * Indicates if the layer is visible in the view. To see if you can use this property, check the `supportsSublayerVisibility` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#visible) */ @@ -13344,7 +14804,7 @@ declare namespace __esri { * * */ - createFeatureLayer(): FeatureLayer; + createFeatureLayer(): IPromise; /** * Creates a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) object with default values representing the layer's state, including filters (definition expression) on the layer's features. * @@ -13354,7 +14814,7 @@ declare namespace __esri { */ createQuery(): Query; /** - * Executes a [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html) against features in the sublayer. + * Executes a [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html) against features in the sublayer. To see if you can use this property, check the `supportsQuery` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#queryFeatures) * @@ -13378,7 +14838,7 @@ declare namespace __esri { interface SublayerProperties { /** - * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. + * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. To see if you can use this property, check the `supportsSublayerDefinitionExpression` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#definitionExpression) */ @@ -13390,7 +14850,7 @@ declare namespace __esri { */ id?: number; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelsVisible) property of the sublayer must be `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelingInfo) */ @@ -13417,6 +14877,21 @@ declare namespace __esri { * @default true */ legendEnabled?: boolean; + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#listMode) + * + * @default show + */ + listMode?: "show" | "hide" | "hide-children"; /** * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#minScale) value, and greater than or equal to the service specification. * @@ -13452,7 +14927,7 @@ declare namespace __esri { */ popupTemplate?: PopupTemplateProperties; /** - * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. + * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. To see if you can use this property, check the `supportsDynamicLayers` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not currently supported in renderers set on sublayers. * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6 map services (or later) created from ArcGIS Pro. @@ -13479,7 +14954,7 @@ declare namespace __esri { */ title?: string; /** - * Indicates if the layer is visible in the view. + * Indicates if the layer is visible in the view. To see if you can use this property, check the `supportsSublayerVisibility` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#visible) */ @@ -13929,6 +15404,75 @@ declare namespace __esri { tileInfo?: TileInfoProperties; } + interface TimeInfo extends Accessor, JSONSupport { + /** + * The name of the field containing the end time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) + */ + endField: string; + /** + * The name of the field containing the start time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) + */ + startField: string; + /** + * The time extent defines the start time and end time for all data in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) + * + * @default null + */ + timeExtent: TimeExtent; + + /** + * Creates a deep clone of TimeInfo object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#clone) + * + * + */ + clone(): TimeInfo; + } + + interface TimeInfoConstructor { + /** + * Time info represents a temporal data of a time-aware layer. The time info provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) time for each feature and the [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html) + */ + + new (properties?: TimeInfoProperties): TimeInfo; + + fromJSON(json: any): TimeInfo; + } + + export const TimeInfo: TimeInfoConstructor; + + interface TimeInfoProperties { + /** + * The name of the field containing the end time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) + */ + endField?: string; + /** + * The name of the field containing the start time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) + */ + startField?: string; + /** + * The time extent defines the start time and end time for all data in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) + * + * @default null + */ + timeExtent?: TimeExtentProperties; + } + interface WMSSublayer extends Accessor { /** * Description for the WMS sublayer. This defaults to the value of the Abstract property from the WMS GetCapabilities request. @@ -14382,6 +15926,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#hasAttributionData) */ readonly hasAttributionData: boolean; + /** + * Resampling is enabled by default in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). This means that tile images are resampled at a lower level of detail and displayed at levels where tiles may not be available. Setting this property to `true` disables this behavior. Instead, if a tile is not available, a transparent image is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#resampling) + * + * @default true + */ + resampling: boolean; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) objects. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). Sublayer properties on TileLayer are read-only, with the following exceptions: * * [legendEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#legendEnabled) @@ -14462,6 +16014,14 @@ declare namespace __esri { RefreshableLayerProperties, ScaleRangeLayerProperties, PortalLayerProperties { + /** + * Resampling is enabled by default in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). This means that tile images are resampled at a lower level of detail and displayed at levels where tiles may not be available. Setting this property to `true` disables this behavior. Instead, if a tile is not available, a transparent image is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#resampling) + * + * @default true + */ + resampling?: boolean; /** * An array of tile servers used for changing map tiles. * @@ -14598,12 +16158,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#tileInfo) */ tileInfo: TileInfo; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#token) - */ - readonly token: string; /** * The URL to the vector tile service, or the URL to the style resource of vector tiles that will be used to render the layer. If specifying a URL to a style, the tiles are fetched from the tile servers specified in the style object. * @@ -15402,25 +16956,25 @@ declare namespace __esri { /** * Specifies a basemap for the map. The basemap is a set of tile layers that give geographic context to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and the other [operational layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers) in the map. This value can be an instance of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) or one of the strings listed in the table below. * - * Value | Description - * ------|------------ - * streets | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * satellite | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) - * hybrid | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) - * topo | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * gray | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * dark-gray | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * oceans | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) - * national-geographic | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) - * terrain | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) - * osm | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) - * dark-gray-vector | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * gray-vector | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * streets-vector | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * topo-vector | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * streets-night-vector | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) - * streets-relief-vector | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) - * streets-navigation-vector | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * Value | Source | Thumbnail + * ------|------- |---------- + * `topo` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `satellite` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) + * `hybrid` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) + * `dark-gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `national-geographic` | https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) + * `oceans` | https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer and https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) + * `osm` | [OpenStreetMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html) | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) + * `terrain` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) + * `dark-gray-vector` | [Dark Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=c11ce4f7801740b2905eb03ddc963ac8) | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray-vector` | [Light Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=8a2cba3b0ebf4140b7c0dc5ee149549a) | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `streets-vector` | [World Street Map [v2]](https://www.arcgis.com/home/item.html?id=de26a3cf4cc9451298ea173c4b324736) | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `streets-night-vector` | [World Street Map (Night) [v2]](https://www.arcgis.com/home/item.html?id=86f556a2d1fd468181855a35e344567f) | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) + * `streets-navigation-vector` | [World Navigation Map [v2]](https://www.arcgis.com/home/item.html?id=63c47b7177f946b49902c24129b87252) | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * `topo-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Topographic Map [v2]](https://www.arcgis.com/home/item.html?id=7dc6cea0b1764a1f9af2e679f642f0f5) | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets-relief-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Street Map (with Relief) [v2]](https://www.arcgis.com/home/item.html?id=b266e6d17fc345b498345613930fbd76) | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) @@ -15455,25 +17009,25 @@ declare namespace __esri { /** * Specifies a basemap for the map. The basemap is a set of tile layers that give geographic context to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and the other [operational layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers) in the map. This value can be an instance of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) or one of the strings listed in the table below. * - * Value | Description - * ------|------------ - * streets | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * satellite | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) - * hybrid | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) - * topo | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * gray | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * dark-gray | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * oceans | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) - * national-geographic | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) - * terrain | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) - * osm | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) - * dark-gray-vector | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * gray-vector | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * streets-vector | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * topo-vector | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * streets-night-vector | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) - * streets-relief-vector | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) - * streets-navigation-vector | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * Value | Source | Thumbnail + * ------|------- |---------- + * `topo` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `satellite` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) + * `hybrid` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) + * `dark-gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `national-geographic` | https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) + * `oceans` | https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer and https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) + * `osm` | [OpenStreetMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html) | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) + * `terrain` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) + * `dark-gray-vector` | [Dark Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=c11ce4f7801740b2905eb03ddc963ac8) | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray-vector` | [Light Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=8a2cba3b0ebf4140b7c0dc5ee149549a) | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `streets-vector` | [World Street Map [v2]](https://www.arcgis.com/home/item.html?id=de26a3cf4cc9451298ea173c4b324736) | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `streets-night-vector` | [World Street Map (Night) [v2]](https://www.arcgis.com/home/item.html?id=86f556a2d1fd468181855a35e344567f) | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) + * `streets-navigation-vector` | [World Navigation Map [v2]](https://www.arcgis.com/home/item.html?id=63c47b7177f946b49902c24129b87252) | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * `topo-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Topographic Map [v2]](https://www.arcgis.com/home/item.html?id=7dc6cea0b1764a1f9af2e679f642f0f5) | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets-relief-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Street Map (with Relief) [v2]](https://www.arcgis.com/home/item.html?id=b266e6d17fc345b498345613930fbd76) | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) @@ -15581,6 +17135,1128 @@ declare namespace __esri { */ export type pointCloudRenderersPointCloudUniqueValueRenderer = PointCloudUniqueValueRenderer; + /** + * A convenience module for importing [Content](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-Content.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing content elements one at a time like this: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html) + */ + namespace content { + /** + * Popup content element types. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#Content) + */ + export type Content = __esri.TextContent | __esri.MediaContent | __esri.FieldsContent | __esri.AttachmentsContent; + + /** + * TextContent defines descriptive text as an element within the [PopupTemplate's](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#TextContent) + */ + export type TextContent = __esri.TextContent; + export const TextContent: typeof __esri.TextContent; + + /** + * MediaContent contains an individual or array of chart and/or image media elements to display within a popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#MediaContent) + */ + export type MediaContent = __esri.MediaContent; + export const MediaContent: typeof __esri.MediaContent; + + /** + * FieldsContent represents the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) associated with a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#FieldsContent) + */ + export type FieldsContent = __esri.FieldsContent; + export const FieldsContent: typeof __esri.FieldsContent; + + /** + * AttachmentsContent represents an attachment element associated with a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#AttachmentsContent) + */ + export type AttachmentsContent = __esri.AttachmentsContent; + export const AttachmentsContent: typeof __esri.AttachmentsContent; + } + + interface AttachmentsContent extends Content, JSONSupport { + /** + * An array of [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) objects used to display within the popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#attachmentInfos) + */ + attachmentInfos: AttachmentInfo; + /** + * A string value indicating how to display the attachment. Possible values are: preview | list If `list` is specified, attachments show as links. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#displayType) + */ + displayType: string; + } + + interface AttachmentsContentConstructor { + /** + * An `AttachmentsContent` popup element represents an attachment element associated with a feature. This resource is available only if the [FeatureLayer.capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html) + */ + + new (properties?: AttachmentsContentProperties): AttachmentsContent; + + fromJSON(json: any): AttachmentsContent; + } + + export const AttachmentsContent: AttachmentsContentConstructor; + + interface AttachmentsContentProperties extends ContentProperties { + /** + * An array of [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) objects used to display within the popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#attachmentInfos) + */ + attachmentInfos?: AttachmentInfoProperties; + /** + * A string value indicating how to display the attachment. Possible values are: preview | list If `list` is specified, attachments show as links. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#displayType) + */ + displayType?: string; + } + + interface BarChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-BarChartMediaInfo.html#type) + * + * @default bar-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the BarChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-BarChartMediaInfo.html#clone) + * + * + */ + clone(): BarChartMediaInfo; + } + + interface BarChartMediaInfoConstructor { + /** + * A `BarChartMediaInfo` is a type of chart media element that represents a bar chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-BarChartMediaInfo.html) + */ + + new (properties?: BarChartMediaInfoProperties): BarChartMediaInfo; + + fromJSON(json: any): BarChartMediaInfo; + } + + export const BarChartMediaInfo: BarChartMediaInfoConstructor; + + interface BarChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface ColumnChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ColumnChartMediaInfo.html#type) + * + * @default column-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the ColumnChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ColumnChartMediaInfo.html#clone) + * + * + */ + clone(): ColumnChartMediaInfo; + } + + interface ColumnChartMediaInfoConstructor { + /** + * A `ColumnChartMediaInfo` is a type of chart media element that represents a column chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ColumnChartMediaInfo.html) + */ + + new (properties?: ColumnChartMediaInfoProperties): ColumnChartMediaInfo; + + fromJSON(json: any): ColumnChartMediaInfo; + } + + export const ColumnChartMediaInfo: ColumnChartMediaInfoConstructor; + + interface ColumnChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface Content extends Accessor, JSONSupport { + /** + * The type of popup element displayed. **Possible values**: text | fields | media | attachments + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-Content.html#type) + */ + readonly type: string; + } + + interface ContentConstructor { + /** + * Content elements define what should display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. There are four specific element types: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-Content.html) + */ + + new (properties?: ContentProperties): Content; + + fromJSON(json: any): Content; + } + + export const Content: ContentConstructor; + + interface ContentProperties {} + + interface FieldsContent extends Content, JSONSupport { + /** + * Array of [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). If the `fieldInfos` property is not provided directly within the content, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html#fieldInfos) + */ + fieldInfos: FieldInfo[]; + + /** + * Creates a deep clone of the FieldsContent class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html#clone) + * + * + */ + clone(): FieldsContent; + } + + interface FieldsContentConstructor { + /** + * A `FieldsContent` popup element represents the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) associated with a feature. If this is not set within the content, it will revert to whatever may be set within the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) + */ + + new (properties?: FieldsContentProperties): FieldsContent; + + fromJSON(json: any): FieldsContent; + } + + export const FieldsContent: FieldsContentConstructor; + + interface FieldsContentProperties extends ContentProperties { + /** + * Array of [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). If the `fieldInfos` property is not provided directly within the content, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html#fieldInfos) + */ + fieldInfos?: FieldInfoProperties[]; + } + + interface ImageMediaInfo extends JSONSupport, MediaInfo { + /** + * Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of `0` indicates auto refresh is not enabled. If the property does not exist, it is equivalent to having a value of `0`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#refreshInterval) + */ + refreshInterval: number; + /** + * The type of popup element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#type) + * + * @default image + */ + readonly type: string; + /** + * Defines the value format of the image media element and how the images should be retrieved. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#value) + */ + value: ImageMediaInfoValue; + + /** + * Creates a deep clone of the ImageMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#clone) + * + * + */ + clone(): ImageMediaInfo; + } + + interface ImageMediaInfoConstructor { + /** + * An `ImageMediaInfo` is a type of media element that represents images to display within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html) + */ + + new (properties?: ImageMediaInfoProperties): ImageMediaInfo; + + fromJSON(json: any): ImageMediaInfo; + } + + export const ImageMediaInfo: ImageMediaInfoConstructor; + + interface ImageMediaInfoProperties extends MediaInfoProperties { + /** + * Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of `0` indicates auto refresh is not enabled. If the property does not exist, it is equivalent to having a value of `0`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#refreshInterval) + */ + refreshInterval?: number; + /** + * Defines the value format of the image media element and how the images should be retrieved. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#value) + */ + value?: ImageMediaInfoValueProperties; + } + + interface LineChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-LineChartMediaInfo.html#type) + * + * @default line-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the LineChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-LineChartMediaInfo.html#clone) + * + * + */ + clone(): LineChartMediaInfo; + } + + interface LineChartMediaInfoConstructor { + /** + * A `LineChartMediaInfo` is a type of chart media element that represents a line chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-LineChartMediaInfo.html) + */ + + new (properties?: LineChartMediaInfoProperties): LineChartMediaInfo; + + fromJSON(json: any): LineChartMediaInfo; + } + + export const LineChartMediaInfo: LineChartMediaInfoConstructor; + + interface LineChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface MediaContent extends Content, JSONSupport { + /** + * Contains the media elements representing images or charts to display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). This can be an individual chart or image element, or an array containing a combination of any of these types. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos) + */ + mediaInfos: + | BarChartMediaInfo + | ColumnChartMediaInfo + | ImageMediaInfo + | LineChartMediaInfo + | PieChartMediaInfo + | any[]; + + /** + * Creates a deep clone of the MediaContent class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#clone) + * + * + */ + clone(): MediaContent; + } + + interface MediaContentConstructor { + /** + * A `MediaContent` popup element contains an individual or array of chart and/or image media elements to display within a popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html) + */ + + new (properties?: MediaContentProperties): MediaContent; + + fromJSON(json: any): MediaContent; + } + + export const MediaContent: MediaContentConstructor; + + interface MediaContentProperties extends ContentProperties { + /** + * Contains the media elements representing images or charts to display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). This can be an individual chart or image element, or an array containing a combination of any of these types. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos) + */ + mediaInfos?: + | BarChartMediaInfoProperties + | ColumnChartMediaInfoProperties + | ImageMediaInfoProperties + | LineChartMediaInfoProperties + | PieChartMediaInfoProperties + | any[]; + } + + interface ChartMediaInfo { + /** + * Defines the chart value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-ChartMediaInfo.html#value) + */ + value: ChartMediaInfoValue; + } + + interface ChartMediaInfoConstructor { + new (): ChartMediaInfo; + } + + export const ChartMediaInfo: ChartMediaInfoConstructor; + + interface ChartMediaInfoProperties { + /** + * Defines the chart value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-ChartMediaInfo.html#value) + */ + value?: ChartMediaInfoValueProperties; + } + + interface MediaInfo { + /** + * Defines a caption for the media. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#caption) + */ + caption: string; + /** + * The title of the media element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#title) + */ + title: string; + } + + interface MediaInfoConstructor { + new (): MediaInfo; + } + + export const MediaInfo: MediaInfoConstructor; + + interface MediaInfoProperties { + /** + * Defines a caption for the media. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#caption) + */ + caption?: string; + /** + * The title of the media element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#title) + */ + title?: string; + } + + interface PieChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-PieChartMediaInfo.html#type) + * + * @default pie-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the PieChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-PieChartMediaInfo.html#clone) + * + * + */ + clone(): PieChartMediaInfo; + } + + interface PieChartMediaInfoConstructor { + /** + * A `PieChartMediaInfo` is a type of chart media element that represents a pie chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-PieChartMediaInfo.html) + */ + + new (properties?: PieChartMediaInfoProperties): PieChartMediaInfo; + + fromJSON(json: any): PieChartMediaInfo; + } + + export const PieChartMediaInfo: PieChartMediaInfoConstructor; + + interface PieChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface ChartMediaInfoValue extends Accessor, JSONSupport { + /** + * An array of strings, with each string containing the name of a field to display in the chart. + * > In order to work with related fields within a chart, the fields must also be set in the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#fields) + */ + fields: string[]; + /** + * A string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#normalizeField) + */ + normalizeField: string; + /** + * An array of [ChartMediaInfoValueSeries](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html) objects which provide information of x/y data data that is plotted in a chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#series) + */ + series: ChartMediaInfoValueSeries[]; + /** + * String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#tooltipField) + */ + tooltipField: string; + } + + interface ChartMediaInfoValueConstructor { + new (properties?: ChartMediaInfoValueProperties): ChartMediaInfoValue; + + fromJSON(json: any): ChartMediaInfoValue; + } + + export const ChartMediaInfoValue: ChartMediaInfoValueConstructor; + + interface ChartMediaInfoValueProperties { + /** + * An array of strings, with each string containing the name of a field to display in the chart. + * > In order to work with related fields within a chart, the fields must also be set in the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#fields) + */ + fields?: string[]; + /** + * A string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#normalizeField) + */ + normalizeField?: string; + /** + * An array of [ChartMediaInfoValueSeries](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html) objects which provide information of x/y data data that is plotted in a chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#series) + */ + series?: ChartMediaInfoValueSeriesProperties[]; + /** + * String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#tooltipField) + */ + tooltipField?: string; + } + + interface ChartMediaInfoValueSeries extends Accessor { + /** + * String value indicating the tooltip for a series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#tooltipField) + */ + tooltipField: string; + /** + * Numerical value indicating the x-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#x) + */ + x: number; + /** + * Numerical value indicating the y-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#y) + */ + y: number; + + /** + * Creates a deep clone of the ChartMediaInfoValueSeries class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#clone) + * + * + */ + clone(): ChartMediaInfoValueSeries; + } + + interface ChartMediaInfoValueSeriesConstructor { + new (properties?: ChartMediaInfoValueSeriesProperties): ChartMediaInfoValueSeries; + } + + export const ChartMediaInfoValueSeries: ChartMediaInfoValueSeriesConstructor; + + interface ChartMediaInfoValueSeriesProperties { + /** + * String value indicating the tooltip for a series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#tooltipField) + */ + tooltipField?: string; + /** + * Numerical value indicating the x-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#x) + */ + x?: number; + /** + * Numerical value indicating the y-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#y) + */ + y?: number; + } + + interface ImageMediaInfoValue extends Accessor, JSONSupport { + /** + * A string containing a URL to be launched in a browser when a user clicks the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#linkURL) + */ + linkURL: string; + /** + * A string containing the URL to the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#sourceURL) + */ + sourceURL: string; + + /** + * Creates a deep clone of the ImageMediaInfoValue class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#clone) + * + * + */ + clone(): ImageMediaInfoValue; + } + + interface ImageMediaInfoValueConstructor { + new (properties?: ImageMediaInfoValueProperties): ImageMediaInfoValue; + + fromJSON(json: any): ImageMediaInfoValue; + } + + export const ImageMediaInfoValue: ImageMediaInfoValueConstructor; + + interface ImageMediaInfoValueProperties { + /** + * A string containing a URL to be launched in a browser when a user clicks the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#linkURL) + */ + linkURL?: string; + /** + * A string containing the URL to the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#sourceURL) + */ + sourceURL?: string; + } + + interface TextContent extends Content, JSONSupport { + /** + * The formatted string content to display. This may contain a field name enclosed in `{}`, such as `{FIELDNAME}`, or an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression name, referenced as `{expression/EXPRESSIONNAME}`. Text content may also leverage HTML tags such as ``, `

`, and `
` for formatting the look and feel of the content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html#text) + */ + text: string; + + /** + * Creates a deep clone of the TextContent class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html#clone) + * + * + */ + clone(): TextContent; + } + + interface TextContentConstructor { + /** + * A `TextContent` popup element is used to define descriptive text as an element within the [PopupTemplate's](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. The text may reference values returned from a field attribute or an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html) + */ + + new (properties?: TextContentProperties): TextContent; + + fromJSON(json: any): TextContent; + } + + export const TextContent: TextContentConstructor; + + interface TextContentProperties extends ContentProperties { + /** + * The formatted string content to display. This may contain a field name enclosed in `{}`, such as `{FIELDNAME}`, or an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression name, referenced as `{expression/EXPRESSIONNAME}`. Text content may also leverage HTML tags such as ``, `

`, and `
` for formatting the look and feel of the content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html#text) + */ + text?: string; + } + + /** + * AttachmentsContent represents an attachment element associated with a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#AttachmentsContent) + */ + export type contentAttachmentsContent = AttachmentsContent; + + /** + * Popup content element types. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#Content) + */ + export type contentContent = TextContent | MediaContent | FieldsContent | AttachmentsContent; + + /** + * FieldsContent represents the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) associated with a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#FieldsContent) + */ + export type contentFieldsContent = FieldsContent; + + /** + * MediaContent contains an individual or array of chart and/or image media elements to display within a popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#MediaContent) + */ + export type contentMediaContent = MediaContent; + + /** + * TextContent defines descriptive text as an element within the [PopupTemplate's](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#TextContent) + */ + export type contentTextContent = TextContent; + + interface ExpressionInfo extends Accessor, JSONSupport { + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to either a string, number, dictionary, or array. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#expression) + */ + expression: string; + /** + * The name of the expression. This is used to reference the value of the given `expression` in the popupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) property by wrapping it in curly braces and prefacing it with `expression/` (e.g. `{expression/expressionName}`). See the code snippets below for more examples. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#name) + */ + name: string; + /** + * Indicates the return type of the Arcade expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#returnType) + */ + returnType: string | number; + /** + * The title used to describe the value returned by the expression in the popup. This will display if the value is referenced in a [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#title) + */ + title: string; + + /** + * Creates a deep clone of the ExpressionInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#clone) + * + * + */ + clone(): ExpressionInfo; + } + + interface ExpressionInfoConstructor { + new (properties?: ExpressionInfoProperties): ExpressionInfo; + + fromJSON(json: any): ExpressionInfo; + } + + export const ExpressionInfo: ExpressionInfoConstructor; + + interface ExpressionInfoProperties { + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to either a string, number, dictionary, or array. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#expression) + */ + expression?: string; + /** + * The name of the expression. This is used to reference the value of the given `expression` in the popupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) property by wrapping it in curly braces and prefacing it with `expression/` (e.g. `{expression/expressionName}`). See the code snippets below for more examples. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#name) + */ + name?: string; + /** + * Indicates the return type of the Arcade expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#returnType) + */ + returnType?: string | number; + /** + * The title used to describe the value returned by the expression in the popup. This will display if the value is referenced in a [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html#title) + */ + title?: string; + } + + interface FieldInfo extends Accessor, JSONSupport { + /** + * The field name as defined by the service or the `name` of an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. Arcade expression names are defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#expressionInfos) property. When referencing Arcade expressions, you must preface the name with `expression/`, such as `expression/percent-total`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#fieldName) + */ + fieldName: string; + /** + * Class which provides formatting options for numerical or date fields and how they should display within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#format) + */ + format: FieldInfoFormat; + /** + * A Boolean determining whether users can edit this field. This is not applicable to Arcade expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#isEditable) + * + * @default false + */ + isEditable: boolean; + /** + * A string containing the field alias. Not applicable to Arcade expressions as the title is used instead. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#label) + */ + label: string; + /** + * Used in a `one:many` or `many:many` relationship to compute the statistics on the field to show in the popup. If the property is present, must be one of the following values: **Possible Values:** count | sum | min | max | avg | stddev | var + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#statisticType) + */ + statisticType: string; + /** + * A string determining what type of input box editors see when editing the field. Applies only to string fields. This is not applicable to Arcade expressions. If this property is present, it must be one of the following values: **Possible Values:** rich-text | text-area | text-box + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#stringFieldOption) + * + * @default text-box + */ + stringFieldOption: string; + /** + * A string providing an editing hint for editors of the field. This is not applicable to Arcade expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#tooltip) + */ + tooltip: string; + /** + * Indicates whether the field is visible in the popup window. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#visible) + * + * @default true + */ + visible: boolean; + + /** + * Creates a deep clone of the FieldInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#clone) + * + * + */ + clone(): FieldInfo; + } + + interface FieldInfoConstructor { + new (properties?: FieldInfoProperties): FieldInfo; + + fromJSON(json: any): FieldInfo; + } + + export const FieldInfo: FieldInfoConstructor; + + interface FieldInfoProperties { + /** + * The field name as defined by the service or the `name` of an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. Arcade expression names are defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#expressionInfos) property. When referencing Arcade expressions, you must preface the name with `expression/`, such as `expression/percent-total`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#fieldName) + */ + fieldName?: string; + /** + * Class which provides formatting options for numerical or date fields and how they should display within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#format) + */ + format?: FieldInfoFormatProperties; + /** + * A Boolean determining whether users can edit this field. This is not applicable to Arcade expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#isEditable) + * + * @default false + */ + isEditable?: boolean; + /** + * A string containing the field alias. Not applicable to Arcade expressions as the title is used instead. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#label) + */ + label?: string; + /** + * Used in a `one:many` or `many:many` relationship to compute the statistics on the field to show in the popup. If the property is present, must be one of the following values: **Possible Values:** count | sum | min | max | avg | stddev | var + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#statisticType) + */ + statisticType?: string; + /** + * A string determining what type of input box editors see when editing the field. Applies only to string fields. This is not applicable to Arcade expressions. If this property is present, it must be one of the following values: **Possible Values:** rich-text | text-area | text-box + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#stringFieldOption) + * + * @default text-box + */ + stringFieldOption?: string; + /** + * A string providing an editing hint for editors of the field. This is not applicable to Arcade expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#tooltip) + */ + tooltip?: string; + /** + * Indicates whether the field is visible in the popup window. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#visible) + * + * @default true + */ + visible?: boolean; + } + + interface LayerOptions extends Accessor, JSONSupport { + /** + * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). Indicates whether records without data should display within the popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-LayerOptions.html#showNoDataRecords) + * + * @default true + */ + showNoDataRecords: boolean; + + /** + * Creates a deep clone of the LayerOptions class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-LayerOptions.html#clone) + * + * + */ + clone(): LayerOptions; + } + + interface LayerOptionsConstructor { + new (properties?: LayerOptionsProperties): LayerOptions; + + fromJSON(json: any): LayerOptions; + } + + export const LayerOptions: LayerOptionsConstructor; + + interface LayerOptionsProperties { + /** + * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). Indicates whether records without data should display within the popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-LayerOptions.html#showNoDataRecords) + * + * @default true + */ + showNoDataRecords?: boolean; + } + + interface RelatedRecordsInfo extends Accessor, JSONSupport { + /** + * An array of [RelatedRecordsInfoFieldOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-RelatedRecordsInfoFieldOrder.html) objects indicating the field display order for the related records and whether they should be sorted in ascending `asc` or descending `desc` order. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-RelatedRecordsInfo.html#orderByFields) + */ + orderByFields: RelatedRecordsInfoFieldOrder[]; + /** + * Indicates whether to display related records in the popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-RelatedRecordsInfo.html#showRelatedRecords) + */ + showRelatedRecords: boolean; + + /** + * Creates a deep clone of the RelatedRecordsInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-RelatedRecordsInfo.html#clone) + * + * + */ + clone(): RelatedRecordsInfo; + } + + interface RelatedRecordsInfoConstructor { + new (properties?: RelatedRecordsInfoProperties): RelatedRecordsInfo; + + fromJSON(json: any): RelatedRecordsInfo; + } + + export const RelatedRecordsInfo: RelatedRecordsInfoConstructor; + + interface RelatedRecordsInfoProperties { + /** + * An array of [RelatedRecordsInfoFieldOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-RelatedRecordsInfoFieldOrder.html) objects indicating the field display order for the related records and whether they should be sorted in ascending `asc` or descending `desc` order. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-RelatedRecordsInfo.html#orderByFields) + */ + orderByFields?: RelatedRecordsInfoFieldOrderProperties[]; + /** + * Indicates whether to display related records in the popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-RelatedRecordsInfo.html#showRelatedRecords) + */ + showRelatedRecords?: boolean; + } + + interface FieldInfoFormat extends Accessor, JSONSupport { + /** + * Used only with `Date` fields. Specifies how the date should appear in a popup. **Possible Values**: short-date | short-date-le | long-date | day-short-month-year | long-month-day-year | short-date-long-time | short-date-le-long-time | short-date-short-time | short-date-le-short-time | short-date-short-time-24 | short-date-le-short-time-24 | short-date-short-time-24 | short-date-le-short-time-24 | long-month-year | short-month-year | year + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html#dateFormat) + */ + dateFormat: string; + /** + * Used only with `Number` fields. A value of `true` indicates the number should have a digit (or thousands) separator when the value appears in popups. A value of `false` means that no separator will be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html#digitSeparator) + * + * @default false + */ + digitSeparator: boolean; + /** + * Used only with `Number` fields to specify the number of supported decimal places that should appear in popups. Any places beyond this value are rounded. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html#places) + */ + places: number; + + /** + * Creates a deep clone of the FieldInfoFormat class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html#clone) + * + * + */ + clone(): FieldInfoFormat; + } + + interface FieldInfoFormatConstructor { + /** + * The `FieldInfoFormat` class is used with numerical or date fields to provide more detail about how the value should be displayed in a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html) + */ + + new (properties?: FieldInfoFormatProperties): FieldInfoFormat; + + fromJSON(json: any): FieldInfoFormat; + } + + export const FieldInfoFormat: FieldInfoFormatConstructor; + + interface FieldInfoFormatProperties { + /** + * Used only with `Date` fields. Specifies how the date should appear in a popup. **Possible Values**: short-date | short-date-le | long-date | day-short-month-year | long-month-day-year | short-date-long-time | short-date-le-long-time | short-date-short-time | short-date-le-short-time | short-date-short-time-24 | short-date-le-short-time-24 | short-date-short-time-24 | short-date-le-short-time-24 | long-month-year | short-month-year | year + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html#dateFormat) + */ + dateFormat?: string; + /** + * Used only with `Number` fields. A value of `true` indicates the number should have a digit (or thousands) separator when the value appears in popups. A value of `false` means that no separator will be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html#digitSeparator) + * + * @default false + */ + digitSeparator?: boolean; + /** + * Used only with `Number` fields to specify the number of supported decimal places that should appear in popups. Any places beyond this value are rounded. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-FieldInfoFormat.html#places) + */ + places?: number; + } + + interface RelatedRecordsInfoFieldOrder extends Accessor, JSONSupport { + /** + * The attribute value of the field selected that will drive the sorting of related records. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-RelatedRecordsInfoFieldOrder.html#field) + */ + field: string; + /** + * Set the ascending or descending sort order of the returned related records. **Possible Values**: asc | desc + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-RelatedRecordsInfoFieldOrder.html#order) + */ + order: string; + + /** + * Creates a deep clone of the RelatedRecordsInfoFieldOrder class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-RelatedRecordsInfoFieldOrder.html#clone) + * + * + */ + clone(): RelatedRecordsInfoFieldOrder; + } + + interface RelatedRecordsInfoFieldOrderConstructor { + new (properties?: RelatedRecordsInfoFieldOrderProperties): RelatedRecordsInfoFieldOrder; + + fromJSON(json: any): RelatedRecordsInfoFieldOrder; + } + + export const RelatedRecordsInfoFieldOrder: RelatedRecordsInfoFieldOrderConstructor; + + interface RelatedRecordsInfoFieldOrderProperties { + /** + * The attribute value of the field selected that will drive the sorting of related records. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-RelatedRecordsInfoFieldOrder.html#field) + */ + field?: string; + /** + * Set the ascending or descending sort order of the returned related records. **Possible Values**: asc | desc + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-RelatedRecordsInfoFieldOrder.html#order) + */ + order?: string; + } + interface PopupTemplate extends Accessor, JSONSupport { /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [action](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html) or [action toggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html) objects. Each object represents an action or function that may be executed by clicking the icon or image symbolizing them in the [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html). By default, every [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) has a `zoom-to` action styled with a magnifying glass icon ![popupTemplate-zoom-action](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/popuptemplate-zoom-action.png). When this icon is clicked, the view zooms in four LODs and centers on the selected feature. PopupTemplates do not have default actions. To override actions on the [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) using PopupTemplate see [overwriteActions](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#overwriteActions). Actions defined in a PopupTemplate will only appear in the [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) for features or layers that apply that particular PopupTemplate. The order of each action in the popup is the same order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). The [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#event:trigger-action) event in [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) fires each time an action in the popup is clicked. This event should be used to execute custom code for each action clicked. For example, if you would like to add a `zoom-out` action to the PopupTemplate that zooms the view out several LODs, you would define the zoom-out code in a separate function. Then you would call the custom `zoom-out` function in the [trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#event:trigger-action) event handler. See the sample code snippet below for more details on how this works. Actions are defined with the properties listed in the [ActionButton](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html) or [ActionToggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html) class. @@ -15592,12 +18268,12 @@ declare namespace __esri { * The template for defining and formatting a popup's content. Content may be defined with one of four types of values. * * **String** - A popup's content can be a simple text or string value referencing field values or [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions. Expressions must be defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#expressionInfos) property. * * **Popup elements** - You can also display content as popup elements. These elements can be used individually or combined. The order in which they are set determines how they display within the popup. See the items below describing each element. - * * **text** - A [TextContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Text.html) that provides descriptive text as content. - * * **media** - A [MediaContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media.html) that is used to display media such as [charts](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart.html) and/or [images](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html). - * * **fields** - A [FieldsContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Fields.html). that contains the fields to display within the content. If this is not set directly within the `content` property, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. - * * **attachments** - A [AttachmentsContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html) that contains attachments associated with the feature. + * * **text** - A [text content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html) that provides descriptive text as content. + * * **media** - A [media content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html) that is used to display media such as charts/images. + * * **fields** - A [fields content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html). that contains the fields to display within the content. If this is not set directly within the `content` property, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. + * * **attachments** - A [attachments content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html) that contains attachments associated with the feature. * * **promise** - The PopupTemplate's content may also be defined with a promise that resolves to any of the above-mentioned elements. This is useful for cases when you run a task or execute a query and want to display the results in the popup. Simply pass the promise to the popupTemplate's content and ensure that it resolves to a string or other popup element. - * * **function** - Content may be defined with a JavaScript function that returns any of the above-mentioned elements. This is handy when your popup requires additional processing or functionality than what is provided with the four content types listed above. For example, let’s assume that you would like to display charts using third-party JavaScript libraries or categorize information into separate tabs. In these cases, you can use a function that returns either a string, a reference to an HTML element, a popup element, or a promise. When the feature is clicked, the feature is passed as an argument to the function and provides access to the feature’s graphic and attributes. The function then executes and returns a value to display in the popup template. It is also possible to check a specific feature attribute and determine whether to apply a function based on its value. Out-of-the-box formatting functions can be used to format date, time, and number values. The syntax for using an out-of-the-box formatting function is: `{field-name:format-function-name(option-a: value, option-b: value)}` + * * **function** - Content may be defined with a JavaScript function that returns any of the above-mentioned elements. This is handy when your popup requires additional processing or functionality than what is provided with the four content types listed above. For example, let’s assume that you would like to display charts using third-party JavaScript libraries or categorize information into separate tabs. In these cases, you can use a function that returns either a string, a reference to an HTML element, a popup element, or a promise. When the feature is clicked, the feature is passed as an argument to the function and provides access to the feature’s graphic and attributes. Set the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#outFields) property to specify any fields needed for rendering the popup. The function then executes and returns a value to display in the popup template. It is also possible to check a specific feature attribute and determine whether to apply a function based on its value. Out-of-the-box formatting functions can be used to format date, time, and number values. The syntax for using an out-of-the-box formatting function is: `{field-name:format-function-name(option-a: value, option-b: value)}` * * * The formatter functions are described below: @@ -15613,15 +18289,15 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) */ - content: ContentElementContentElement | ContentElementContentElement[] | string | Function | IPromise; + content: Content | Content[] | string | Function | IPromise; /** - * An array of objects or [ExpressionInfo[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html) that reference [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions. + * An array of objects or [ExpressionInfo[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html) that reference [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#expressionInfos) */ expressionInfos: ExpressionInfo[]; /** - * An array of [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) that defines how fields in the dataset or values from [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions participate in a popup. Each object [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) contains properties for a single field or expression. + * An array of [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) that defines how fields in the dataset or values from [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions participate in a popup. Each object [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) contains properties for a single field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) */ @@ -15641,7 +18317,8 @@ declare namespace __esri { */ layerOptions: LayerOptions; /** - * An array of fields used in the PopupTemplate. Use this property to indicate what fields are required to fully render the PopupTemplate. To fetch the values from all fields, use `["*"]`. + * An array of field names used in the PopupTemplate. Use this property to indicate what fields are required to fully render the PopupTemplate. This is important if setting [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) via a function since any fields needed for successful rendering should be specified here. To fetch the values from all fields, use `["*"]`. + * > This will not fetch fields from related tables. If related features are needed, set this using [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#outFields) * @@ -15704,12 +18381,12 @@ declare namespace __esri { * The template for defining and formatting a popup's content. Content may be defined with one of four types of values. * * **String** - A popup's content can be a simple text or string value referencing field values or [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions. Expressions must be defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#expressionInfos) property. * * **Popup elements** - You can also display content as popup elements. These elements can be used individually or combined. The order in which they are set determines how they display within the popup. See the items below describing each element. - * * **text** - A [TextContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Text.html) that provides descriptive text as content. - * * **media** - A [MediaContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media.html) that is used to display media such as [charts](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart.html) and/or [images](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html). - * * **fields** - A [FieldsContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Fields.html). that contains the fields to display within the content. If this is not set directly within the `content` property, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. - * * **attachments** - A [AttachmentsContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html) that contains attachments associated with the feature. + * * **text** - A [text content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html) that provides descriptive text as content. + * * **media** - A [media content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html) that is used to display media such as charts/images. + * * **fields** - A [fields content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html). that contains the fields to display within the content. If this is not set directly within the `content` property, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. + * * **attachments** - A [attachments content element](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html) that contains attachments associated with the feature. * * **promise** - The PopupTemplate's content may also be defined with a promise that resolves to any of the above-mentioned elements. This is useful for cases when you run a task or execute a query and want to display the results in the popup. Simply pass the promise to the popupTemplate's content and ensure that it resolves to a string or other popup element. - * * **function** - Content may be defined with a JavaScript function that returns any of the above-mentioned elements. This is handy when your popup requires additional processing or functionality than what is provided with the four content types listed above. For example, let’s assume that you would like to display charts using third-party JavaScript libraries or categorize information into separate tabs. In these cases, you can use a function that returns either a string, a reference to an HTML element, a popup element, or a promise. When the feature is clicked, the feature is passed as an argument to the function and provides access to the feature’s graphic and attributes. The function then executes and returns a value to display in the popup template. It is also possible to check a specific feature attribute and determine whether to apply a function based on its value. Out-of-the-box formatting functions can be used to format date, time, and number values. The syntax for using an out-of-the-box formatting function is: `{field-name:format-function-name(option-a: value, option-b: value)}` + * * **function** - Content may be defined with a JavaScript function that returns any of the above-mentioned elements. This is handy when your popup requires additional processing or functionality than what is provided with the four content types listed above. For example, let’s assume that you would like to display charts using third-party JavaScript libraries or categorize information into separate tabs. In these cases, you can use a function that returns either a string, a reference to an HTML element, a popup element, or a promise. When the feature is clicked, the feature is passed as an argument to the function and provides access to the feature’s graphic and attributes. Set the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#outFields) property to specify any fields needed for rendering the popup. The function then executes and returns a value to display in the popup template. It is also possible to check a specific feature attribute and determine whether to apply a function based on its value. Out-of-the-box formatting functions can be used to format date, time, and number values. The syntax for using an out-of-the-box formatting function is: `{field-name:format-function-name(option-a: value, option-b: value)}` * * * The formatter functions are described below: @@ -15725,20 +18402,15 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) */ - content?: - | ContentElementContentElementProperties - | ContentElementContentElementProperties[] - | string - | Function - | IPromise; + content?: ContentProperties | ContentProperties[] | string | Function | IPromise; /** - * An array of objects or [ExpressionInfo[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html) that reference [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions. + * An array of objects or [ExpressionInfo[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html) that reference [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#expressionInfos) */ expressionInfos?: ExpressionInfoProperties[]; /** - * An array of [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) that defines how fields in the dataset or values from [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions participate in a popup. Each object [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) contains properties for a single field or expression. + * An array of [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) that defines how fields in the dataset or values from [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions participate in a popup. Each object [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) contains properties for a single field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) */ @@ -15758,7 +18430,8 @@ declare namespace __esri { */ layerOptions?: LayerOptionsProperties; /** - * An array of fields used in the PopupTemplate. Use this property to indicate what fields are required to fully render the PopupTemplate. To fetch the values from all fields, use `["*"]`. + * An array of field names used in the PopupTemplate. Use this property to indicate what fields are required to fully render the PopupTemplate. This is important if setting [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) via a function since any fields needed for successful rendering should be specified here. To fetch the values from all fields, use `["*"]`. + * > This will not fetch fields from related tables. If related features are needed, set this using [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#outFields) * @@ -15834,7 +18507,7 @@ declare namespace __esri { */ bingKey: string; /** - * Indicates whether an organization can list applications in the marketplace . + * Indicates whether an organization can list applications in the marketplace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#canListApps) */ @@ -16316,7 +18989,7 @@ declare namespace __esri { */ bingKey?: string; /** - * Indicates whether an organization can list applications in the marketplace . + * Indicates whether an organization can list applications in the marketplace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#canListApps) */ @@ -18024,15 +20697,12 @@ declare namespace __esri { */ namespace renderers { /** - * Renderer types. + * SimpleRenderer. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#Renderer) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#SimpleRenderer) */ - export type Renderer = - | __esri.ClassBreaksRenderer - | __esri.SimpleRenderer - | __esri.UniqueValueRenderer - | __esri.HeatmapRenderer; + export type SimpleRenderer = __esri.SimpleRenderer; + export const SimpleRenderer: typeof __esri.SimpleRenderer; /** * ClassBreaksRenderer. @@ -18042,14 +20712,6 @@ declare namespace __esri { export type ClassBreaksRenderer = __esri.ClassBreaksRenderer; export const ClassBreaksRenderer: typeof __esri.ClassBreaksRenderer; - /** - * SimpleRenderer. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#SimpleRenderer) - */ - export type SimpleRenderer = __esri.SimpleRenderer; - export const SimpleRenderer: typeof __esri.SimpleRenderer; - /** * UniqueValueRenderer. * @@ -18058,6 +20720,32 @@ declare namespace __esri { export type UniqueValueRenderer = __esri.UniqueValueRenderer; export const UniqueValueRenderer: typeof __esri.UniqueValueRenderer; + /** + * DotDensityRenderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#DotDensityRenderer) + */ + export type DotDensityRenderer = __esri.DotDensityRenderer; + export const DotDensityRenderer: typeof __esri.DotDensityRenderer; + + /** + * RendererWithVisualVariables. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#RendererWithVisualVariables) + */ + export type RendererWithVisualVariables = + | __esri.SimpleRenderer + | __esri.ClassBreaksRenderer + | __esri.UniqueValueRenderer + | __esri.DotDensityRenderer; + + /** + * RasterRenderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#RasterRenderer) + */ + export type RasterRenderer = __esri.ClassBreaksRenderer | __esri.UniqueValueRenderer; + /** * HeatmapRenderer. * @@ -18065,6 +20753,13 @@ declare namespace __esri { */ export type HeatmapRenderer = __esri.HeatmapRenderer; export const HeatmapRenderer: typeof __esri.HeatmapRenderer; + + /** + * Renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#Renderer) + */ + export type Renderer = __esri.HeatmapRenderer | __esri.RendererWithVisualVariables; } interface ClassBreaksRenderer extends Renderer, VisualVariablesRenderer { @@ -18149,6 +20844,45 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#valueExpressionTitle) */ valueExpressionTitle: string; + + /** + * Adds a class break to the renderer. You can provide the minimum, maximum and symbol values as individual arguments or by using the info object. The range of the break is greater than or equal to the minimum value and less than the maximum value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#addClassBreakInfo) + * + * @param min The minimum value to use in the break. This can be a number or an info object as defined in [classBreakInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classBreakInfos). + * @param max The maximum value to use in the break. + * @param symbol Symbol to use for the break. + * + */ + addClassBreakInfo(min: number | any, max: number, symbol: Symbol): void; + /** + * Creates a deep clone of the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#clone) + * + * + */ + clone(): ClassBreaksRenderer; + /** + * Returns the [classBreakInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classBreakInfos) information (as defined by the renderer) associated with the given graphic. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#getClassBreakInfo) + * + * @param graphic The graphic whose rendering information will be returned. + * + */ + getClassBreakInfo(graphic: Graphic): any; + /** + * Removes a break from the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#removeClassBreakInfo) + * + * @param min Minimum value in the break to remove + * @param max Maximum value in the break to remove. + * + */ + removeClassBreakInfo(min: number, max: number): void; } interface ClassBreaksRendererConstructor { @@ -18279,6 +21013,173 @@ declare namespace __esri { title: string; } + interface DotDensityRenderer extends Renderer { + /** + * Defines the variable(s) used to visualize density. This is an array of objects, each of which references a numeric field value or [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression used to drive the density. You must also set a color corresponding to each value. If you set a single attribute, `POPULATION` and match it with a color `black` and the [referenceDotValue](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue) is `100`, then number of black dots rendered for each feature will approximately equal the value of `POPULATION` divided by `100`. This property is limited to no more than 8 attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#attributes) + */ + attributes: AttributeColorInfo[]; + /** + * The color used to shade the polygon fill behind the dots. This can be autocast with a named string; hex string; array of rgb or rgba values; an object with `r`, `g`, `b`, and `a` properties; or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#backgroundColor) + * + * @default [0, 0, 0, 0.25] - black, semitransparent + */ + backgroundColor: Color; + /** + * Only applicable when two or more [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#attributes) are specified. When `true`, indicates that colors for overlapping dots will blend. For example, in a feature where a high density of blue dots exist on top of a high density of red dots, some of the dots may appear as purple dots if this property is `true`. When `false` only one color will be favored over the others in rendering. + * + * Blend enabled | Blend disabled + * --------------|--------------- + * ![dot-density-blend](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/dot-density-blend.png) | ![dot-density-no-blend](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/dot-density-no-blend.png) + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#blendDots) + * + * @default true + */ + blendDots: boolean; + /** + * An object providing options for configuring the renderer in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#legendOptions) + */ + legendOptions: DotDensityRendererLegendOptions; + /** + * The outline of the polygon. When not set, this renders using the default [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html). It is good practice to explicitly set this for every DotDensityRenderer. Either remove the outline altogether, or set it to a very thin, transparent style so it doesn't distract from the dot density. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#outline) + */ + outline: SimpleLineSymbol; + /** + * Defines the initial dot value used for visualizing density. If a [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) is provided, this value indicates the value of each dot at the [view.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) matching the value in [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale). If [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) is set, the dot value will be recalculated depending on the view scale. Note the value of `referenceDotValue` will remain constant even in this scenario. The variable dot value as displayed in the legend is recalculated using [calculateDotValue()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#calculateDotValue). If a [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) is not provided, the value specified in this property will apply to dots at all scales. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue) + */ + referenceDotValue: number; + /** + * When defined, the renderer will recalculate the dot value linearly based on the change in the view's scale using the [calculateDotValue()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#calculateDotValue) method. The rendering will maintain the density of points as drawn at the provided scale across various scales. However, the dot value will change as the user zooms in or out from the provided scale value, though the value of [referenceDotValue](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue) will remain constant. When the computed dot value reaches `1`, the dot value is no longer recalculated as the user zooms further in. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) + */ + referenceScale: number; + /** + * The type of renderer. For DotDensityRenderer this value is always `dot-density`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#type) + */ + readonly type: "dot-density"; + /** + * An array of [Size Visual Variable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html) objects. Only one [ScaleDependentStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#ScaleDependentStops) visual variable should be provided. This visual variable is used to vary the [outline](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#outline) width based on the [view.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale). See the snippet below for an example of this. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#visualVariables) + */ + visualVariables: ScaleDependentStops[]; + + /** + * Calculates an updated dot value for the given scale for the cases where a [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) is provided. This allows the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) to update the dot value as the user zooms in or out in the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#calculateDotValue) + * + * @param scale The view scale at which to calculate a new dot value. + * + */ + calculateDotValue(scale: number): number; + /** + * Creates a deep clone of the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#clone) + * + * + */ + clone(): DotDensityRenderer; + } + + interface DotDensityRendererConstructor { + /** + * DotDensityRenderer allows you to create dot density visualizations for polygon layers. Dot density visualizations randomly draw dots within each polygon to visualize the density of a population or some other variable. Each dot represents a fixed numeric value of an [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#attributes) or a subset of attributes. Unlike choropleth maps, field values used in dot density visualizations don't need to be normalized because the size of the polygon, together with the number of dots rendered within its boundaries, indicate the spatial density of that value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html) + */ + + new (properties?: DotDensityRendererProperties): DotDensityRenderer; + + fromJSON(json: any): DotDensityRenderer; + } + + export const DotDensityRenderer: DotDensityRendererConstructor; + + interface DotDensityRendererProperties extends RendererProperties { + /** + * Defines the variable(s) used to visualize density. This is an array of objects, each of which references a numeric field value or [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression used to drive the density. You must also set a color corresponding to each value. If you set a single attribute, `POPULATION` and match it with a color `black` and the [referenceDotValue](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue) is `100`, then number of black dots rendered for each feature will approximately equal the value of `POPULATION` divided by `100`. This property is limited to no more than 8 attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#attributes) + */ + attributes?: AttributeColorInfoProperties[]; + /** + * The color used to shade the polygon fill behind the dots. This can be autocast with a named string; hex string; array of rgb or rgba values; an object with `r`, `g`, `b`, and `a` properties; or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#backgroundColor) + * + * @default [0, 0, 0, 0.25] - black, semitransparent + */ + backgroundColor?: Color | number[] | string; + /** + * Only applicable when two or more [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#attributes) are specified. When `true`, indicates that colors for overlapping dots will blend. For example, in a feature where a high density of blue dots exist on top of a high density of red dots, some of the dots may appear as purple dots if this property is `true`. When `false` only one color will be favored over the others in rendering. + * + * Blend enabled | Blend disabled + * --------------|--------------- + * ![dot-density-blend](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/dot-density-blend.png) | ![dot-density-no-blend](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/dot-density-no-blend.png) + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#blendDots) + * + * @default true + */ + blendDots?: boolean; + /** + * An object providing options for configuring the renderer in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#legendOptions) + */ + legendOptions?: DotDensityRendererLegendOptions; + /** + * The outline of the polygon. When not set, this renders using the default [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html). It is good practice to explicitly set this for every DotDensityRenderer. Either remove the outline altogether, or set it to a very thin, transparent style so it doesn't distract from the dot density. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#outline) + */ + outline?: SimpleLineSymbolProperties; + /** + * Defines the initial dot value used for visualizing density. If a [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) is provided, this value indicates the value of each dot at the [view.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) matching the value in [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale). If [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) is set, the dot value will be recalculated depending on the view scale. Note the value of `referenceDotValue` will remain constant even in this scenario. The variable dot value as displayed in the legend is recalculated using [calculateDotValue()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#calculateDotValue). If a [referenceScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) is not provided, the value specified in this property will apply to dots at all scales. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue) + */ + referenceDotValue?: number; + /** + * When defined, the renderer will recalculate the dot value linearly based on the change in the view's scale using the [calculateDotValue()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#calculateDotValue) method. The rendering will maintain the density of points as drawn at the provided scale across various scales. However, the dot value will change as the user zooms in or out from the provided scale value, though the value of [referenceDotValue](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue) will remain constant. When the computed dot value reaches `1`, the dot value is no longer recalculated as the user zooms further in. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceScale) + */ + referenceScale?: number; + /** + * An array of [Size Visual Variable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html) objects. Only one [ScaleDependentStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#ScaleDependentStops) visual variable should be provided. This visual variable is used to vary the [outline](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#outline) width based on the [view.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale). See the snippet below for an example of this. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#visualVariables) + */ + visualVariables?: ScaleDependentStops[]; + } + + export interface DotDensityRendererLegendOptions extends Object { + /** + * Indicates the unit of the data being visualized. this will display next to the dot value in the title of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#legendOptions) + */ + unit?: string; + } + interface HeatmapRenderer extends Renderer { /** * The area of influence for each point in the layer. This is defined as a radius in pixels. The default is `10`, which means the pixels within a 10-pixel radius of the point's location are assigned an intensity value corresponding to their distance from the nearby point. Increasing this value creates a larger heatmap with more hotspots. Decreasing it makes a smaller heatmap with fewer hotspots. @@ -19055,7 +21956,7 @@ declare namespace __esri { */ authoringInfo: AuthoringInfo; /** - * The renderer type. **Possible values:** class-breaks | heatmap | simple | unique-value + * The renderer type. **Possible values:** class-breaks | heatmap | simple | unique-value | raster-stretch * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html#type) */ @@ -19462,7 +22363,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createAgeRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The view instance in which the visualization will be rendered. * @@ -19588,7 +22489,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * @@ -19770,7 +22671,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @@ -20002,7 +22903,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @@ -20260,6 +23161,146 @@ declare namespace __esri { authoringInfo: AuthoringInfo; } + /** + * This object contains a helper method for generating a [HeatmapRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html) for a point [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html) + */ + interface heatmap { + /** + * Generates a [HeatmapRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html) that may be applied directly to the layer used to call this method. The renderer represents points as a continuous surface using optimal colors for the indicated basemap. This method should be called when at least some points are visible in the input view's extent. If no points are visible in the view, then the response will not return a useful visualization. In most cases you will provide a `layer`, `basemap`, and optional `field` to generate this renderer. This is a scenario in which the statistics and the distribution of the data aren't well known and the user doesn't know what colors to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + * + * @param params Input parameters for generating a heatmap visualization based on data returned from a given field. See the table below for details of each parameter. + * @param params.layer The point layer for which the visualization is generated. + * @param params.view The view instance in which the visualization will be rendered. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. The value of the `field` is used as a multiplier in the heatmap, making areas with high field values hotter than areas where the features have low field values. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * @param params.heatmapScheme In authoring apps, the user may select a pre-defined heatmap scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.statistics A statistics object generated from the [heatmapStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. + * @param params.fadeToTransparent Indicates whether to fade the lower color stops to a transparent color to create a fuzzy boundary on the edge of the heatmap. A value of `false` makes a discrete boundary on the lower color stop. + * @param params.blurRadius The [blurRadius](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#blurRadius) in pixels that determines the area of influence of each point. A higher blur radius indicates points have more influence on surrounding points. + * @param params.minRatio The minimum [ratio](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-HeatmapColorStop.html#ratio) used in the [HeatmapRenderer.colorStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#colorStops) of the output renderer. + * @param params.maxRatio The maximum [ratio](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-HeatmapColorStop.html#ratio) used in the [HeatmapRenderer.colorStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#colorStops) of the output renderer. + * + */ + createRenderer(params: heatmapCreateRendererParams): IPromise; + } + + export const heatmap: heatmap; + + export interface heatmapCreateRendererParams extends Object { + /** + * The point layer for which the visualization is generated. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + */ + layer: FeatureLayer | CSVLayer | GeoJSONLayer; + /** + * The view instance in which the visualization will be rendered. + * + * [Read more...](global.html) + */ + view: MapView; + /** + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. The value of the `field` is used as a multiplier in the heatmap, making areas with high field values hotter than areas where the features have low field values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + */ + field?: string; + /** + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + * + * @default gray + */ + basemap?: string | Basemap; + /** + * In authoring apps, the user may select a pre-defined heatmap scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + */ + heatmapScheme?: HeatmapScheme; + /** + * A statistics object generated from the [heatmapStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + */ + statistics?: HeatmapStatisticsResult; + /** + * Indicates whether to fade the lower color stops to a transparent color to create a fuzzy boundary on the edge of the heatmap. A value of `false` makes a discrete boundary on the lower color stop. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + * + * @default true + */ + fadeToTransparent?: boolean; + /** + * The [blurRadius](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#blurRadius) in pixels that determines the area of influence of each point. A higher blur radius indicates points have more influence on surrounding points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + * + * @default 10 + */ + blurRadius?: number; + /** + * The minimum [ratio](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-HeatmapColorStop.html#ratio) used in the [HeatmapRenderer.colorStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#colorStops) of the output renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + * + * @default 0.01 + */ + minRatio?: number; + /** + * The maximum [ratio](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-HeatmapColorStop.html#ratio) used in the [HeatmapRenderer.colorStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#colorStops) of the output renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + * + * @default 1 + */ + maxRatio?: number; + } + + /** + * The result object of the [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) method. See the table below for details of each property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#HeatmapRendererResult) + */ + export interface HeatmapRendererResult extends Object { + /** + * The renderer object configured to best match the given basemap and the spread of the data. Set this on a layer's `renderer` property to update its visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#HeatmapRendererResult) + */ + renderer: HeatmapRenderer; + /** + * The color scheme used by the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#HeatmapRendererResult) + */ + scheme: HeatmapScheme; + /** + * Indicates whether default values are used in the absence of sufficient data and/or statistics from the layer. Default values are typically used when all features have the same field value or no value at all. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#HeatmapRendererResult) + */ + defaultValuesUsed: boolean; + /** + * Basic statistics returned from a query to the service for data from the given field name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#HeatmapRendererResult) + */ + statistics: HeatmapStatisticsResult; + /** + * The ID of the basemap used to determine the optimal color stops of the heatmap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#HeatmapRendererResult) + */ + basemapId: string; + } + /** * This object contains helper methods for generating location-only visualizations (not data-driven) in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). The [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) method generates a [SimpleRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html) object that may be applied directly to the layer. This renderer contains a single symbol with a color optimally selected based on the indicated basemap. * @@ -20305,7 +23346,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @@ -20421,7 +23462,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @@ -20601,7 +23642,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-predominance.html#createRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The view instance in which the visualization will be rendered. * @@ -20846,6 +23887,37 @@ declare namespace __esri { * */ createRenderer(params: relationshipCreateRendererParams): IPromise; + /** + * Updates a relationship renderer (bivariate choropleth) generated from [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer) based on the given input parameters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + * + * @param params Input parameters for updating a relationship visualization created in [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer). + * @param params.field1 A numeric field used to explore its relationship with `field2`. In the default visualization, the values of this field are rendered along the vertical axis of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * @param params.field2 A numeric field used to explore its relationship with `field1`. In the default visualization, the values of this field are rendered along the horizontal axis of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * @param params.focus + * Determines the orientation of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). This value does not change the renderer or symbology of any features in the layer. This affects the legend only. See the table below for a description of the possible values. See the class description at the top of this page for a more thorough explanation of how to read the legend. + * + * Value | Example | Description + * ------|-------------|-------- + * null | ![relationship-legend-null](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-null.png) | The legend renders as a square. The top right corner of the legend indicates that values from both `field1` and `field2` are considered high. | + * HH | ![relationship-legend-hh](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-hh.png) | The legend renders as a diamond with the focus on the top corner where values from both `field1` and `field2` are considered high. | + * HL | ![relationship-legend-hl](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-hl.png) | The legend renders as a diamond with the focus on the top corner where values from `field1` are high and values from `field2` are low. | + * LH | ![relationship-legend-lh](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-lh.png) | The legend renders as a diamond with the focus on the top corner where values from `field1` are low and values from `field2` are high. | + * LL | ![relationship-legend-ll](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-ll.png) | The legend renders as a diamond with the focus on the top corner where values from both `field1` and `field2` are considered low. | + * @param params.numClasses + * Indicates the number of classes by which to break up the values of each field. More classes give you more detail, but more colors, making the visualization more difficult to understand. There are only three possible values. + * + * 2 classes | 3 classes | 4 classes + * --|--|--- + * ![relationship-breaks-2](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-breaks-2.png) | ![relationship-breaks-3](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-breaks-3.png) | ![relationship-breaks-4](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-breaks-4.png) + * + * **Possible Values:** 2 | 3 | 4 + * @param params.colors The array of colors to be used by the symbols in the uniqueValueInfos of the renderer. + * @param params.renderer The relationship renderer (generated from [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer)) to update with the other parameters provided in this method. + * + */ + updateRenderer(params: relationshipUpdateRendererParams): IPromise; } export const relationship: relationship; @@ -20856,7 +23928,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The view instance in which the visualization will be rendered. * @@ -21042,6 +24114,103 @@ declare namespace __esri { showLegend?: boolean; } + export interface relationshipUpdateRendererParams extends Object { + /** + * A numeric field used to explore its relationship with `field2`. In the default visualization, the values of this field are rendered along the vertical axis of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + field1: relationshipUpdateRendererParamsField1; + /** + * A numeric field used to explore its relationship with `field1`. In the default visualization, the values of this field are rendered along the horizontal axis of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + field2: relationshipUpdateRendererParamsField2; + /** + * Determines the orientation of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). This value does not change the renderer or symbology of any features in the layer. This affects the legend only. See the table below for a description of the possible values. See the class description at the top of this page for a more thorough explanation of how to read the legend. + * + * Value | Example | Description + * ------|-------------|-------- + * null | ![relationship-legend-null](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-null.png) | The legend renders as a square. The top right corner of the legend indicates that values from both `field1` and `field2` are considered high. | + * HH | ![relationship-legend-hh](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-hh.png) | The legend renders as a diamond with the focus on the top corner where values from both `field1` and `field2` are considered high. | + * HL | ![relationship-legend-hl](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-hl.png) | The legend renders as a diamond with the focus on the top corner where values from `field1` are high and values from `field2` are low. | + * LH | ![relationship-legend-lh](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-lh.png) | The legend renders as a diamond with the focus on the top corner where values from `field1` are low and values from `field2` are high. | + * LL | ![relationship-legend-ll](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-legend-ll.png) | The legend renders as a diamond with the focus on the top corner where values from both `field1` and `field2` are considered low. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + focus?: string; + /** + * Indicates the number of classes by which to break up the values of each field. More classes give you more detail, but more colors, making the visualization more difficult to understand. There are only three possible values. + * + * 2 classes | 3 classes | 4 classes + * --|--|--- + * ![relationship-breaks-2](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-breaks-2.png) | ![relationship-breaks-3](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-breaks-3.png) | ![relationship-breaks-4](https://developers.arcgis.com/javascript/assets/img/apiref/renderers/smartmapping/relationship-breaks-4.png) + * + * **Possible Values:** 2 | 3 | 4 + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + numClasses: number; + /** + * The array of colors to be used by the symbols in the uniqueValueInfos of the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + colors: Color[]; + /** + * The relationship renderer (generated from [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer)) to update with the other parameters provided in this method. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + renderer: UniqueValueRenderer; + } + + export interface relationshipUpdateRendererParamsField1 extends Object { + /** + * The name of a numeric field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + field: string; + /** + * The name of a numeric field used to normalize the given `field`. In choropleth visualizations it is best practice to normalize your data values if they haven't already been normalized. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + normalizationField?: string; + /** + * The class breaks for the first field used in the relationship visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + classBreakInfos: ClassBreak[]; + } + + export interface relationshipUpdateRendererParamsField2 extends Object { + /** + * The name of a numeric field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + field: string; + /** + * The name of a numeric field used to normalize the given `field`. In choropleth visualizations it is best practice to normalize your data values if they haven't already been normalized. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + normalizationField?: string; + /** + * The class breaks for the second field used in the relationship visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#updateRenderer) + */ + classBreakInfos: ClassBreak[]; + } + /** * The result object of the [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer) method. See the table below for details of each property. * @@ -21381,7 +24550,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createAgeRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The view instance in which the visualization will be rendered. * @@ -21478,7 +24647,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @@ -21646,7 +24815,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @@ -21774,7 +24943,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @@ -22102,7 +25271,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @@ -22376,7 +25545,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @@ -22549,7 +25718,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ - layer: FeatureLayer | SceneLayer | CSVLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | GeoJSONLayer; /** * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @@ -22853,13 +26022,39 @@ declare namespace __esri { const __classBreaksMapped: classBreaks; export const classBreaks: typeof __classBreaksMapped.classBreaks; + /** + * An object describing a single class break generated from the [classBreaks()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) method. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreak) + */ + export interface ClassBreak extends Object { + /** + * The label describing the given class break for use in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreak) + */ + label: string; + /** + * The lower bound of the class break. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreak) + */ + minValue: number; + /** + * The upper bound of the class break. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreak) + */ + maxValue: number; + } + export interface classBreaksClassBreaksParams extends Object { /** * The layer from which to generate class breaks. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) */ - layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer | GeoJSONLayer; /** * The class breaks will be generated based on values of this field. If a field is provided, the values from the given field from all features will be queried in the service. * @@ -22953,7 +26148,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreaksResult) */ - classBreaksInfos: ClassBreaksResultClassBreaksInfos[]; + classBreakInfos: ClassBreak[]; /** * The minimum value of features in the dataset. This will be the lower bound of the lowest class break. * @@ -22974,25 +26169,105 @@ declare namespace __esri { normalizationTotal: number; } - export interface ClassBreaksResultClassBreaksInfos extends Object { + /** + * Function for generating statistics from a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) for a [HeatmapRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html) visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html) + */ + interface heatmapStatistics { /** - * The label describing the given class break for use in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). + * Returns an object containing various statistics describing the intensity values for a heatmap visualization of a given point [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) + * + * @param params See the table below for details of each parameter. + * @param params.layer The layer from which to generate statistics for the pixel intensity values and a given `field` if provided. + * @param params.view A [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance used to calculate pixel intensity values based on the features in the current view. + * @param params.field The name of the numeric field for which the statistics will be generated. + * @param params.blurRadius The area of influence for each point as a radius in pixels from the point. + * @param params.features A subset of features for which to calculate the statistics. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreaksResult) */ - label: string; + heatmapStatistics(params: heatmapStatisticsHeatmapStatisticsParams): IPromise; + } + + export const heatmapStatistics: heatmapStatistics; + + export interface heatmapStatisticsHeatmapStatisticsParams extends Object { /** - * The lower bound of the class break. + * The layer from which to generate statistics for the pixel intensity values and a given `field` if provided. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreaksResult) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) */ - minValue: number; + layer: FeatureLayer | CSVLayer | GeoJSONLayer; /** - * The upper bound of the class break. + * A [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance used to calculate pixel intensity values based on the features in the current view. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#ClassBreaksResult) + * [Read more...](global.html) */ - maxValue: number; + view: MapView; + /** + * The name of the numeric field for which the statistics will be generated. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) + */ + field?: string; + /** + * The area of influence for each point as a radius in pixels from the point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) + */ + blurRadius?: number; + /** + * A subset of features for which to calculate the statistics. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) + */ + features?: Graphic[]; + } + + /** + * The intensity value statistics returned from the [heatmapStatistics()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) function. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#HeatmapStatisticsResult) + */ + export interface HeatmapStatisticsResult extends Object { + /** + * The average of all pixel intensity values for the given view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#HeatmapStatisticsResult) + */ + avg: number; + /** + * The number of features evaluated in the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#HeatmapStatisticsResult) + */ + count?: number; + /** + * The maximum pixel intensity value of all pixels in the given view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#HeatmapStatisticsResult) + */ + max: number; + /** + * The minimum pixel intensity value of all pixels in the given view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#HeatmapStatisticsResult) + */ + min: number; + /** + * The standard deviation of the pixel intensity values of all pixels in the given view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#HeatmapStatisticsResult) + */ + stddev: number; + /** + * The summary statistics for all values returned from the field, if provided. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#HeatmapStatisticsResult) + */ + summaryStatistics?: SummaryStatisticsResult; } /** @@ -23042,7 +26317,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) */ - layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer | GeoJSONLayer; /** * The name of the numeric field for which the histogram will be generated. This property is ignored if a `valueExpression` is used. * @@ -23260,7 +26535,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ - layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer | GeoJSONLayer; /** * The name of the numeric field for which the summary statistics will be generated. This property is ignored if a `valueExpression` is used. * @@ -23365,7 +26640,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ - layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer | GeoJSONLayer; /** * The name of the numeric or string field from which the unique values will be obtained. This property is ignored if a `valueExpression` is used. * @@ -23488,7 +26763,7 @@ declare namespace __esri { * @param basemap The [Esri basemap string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or object that will be used with the returned theme(s). * */ - getThemes(basemap?: string | Basemap): any[]; + getThemes(basemap?: string | Basemap): Theme[]; } export const symbologyColor: symbologyColor; @@ -23832,6 +27107,38 @@ declare namespace __esri { basemapId: string; } + /** + * Describes a theme that pairs well with the given basemaps. See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-color.html#Theme) + */ + export interface Theme extends Object { + /** + * The name of the theme. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-color.html#Theme) + */ + name: string; + /** + * The label identifying the theme in UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-color.html#Theme) + */ + label: string; + /** + * Text describing the theme in the UI. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-color.html#Theme) + */ + description: string; + /** + * The Esri basemaps that pair well with the given theme. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-color.html#Theme) + */ + basemaps: string[]; + } + export interface ColorSchemeForMeshColorsForClassBreaks extends Object { /** * An array of hex color strings. Each color is assigned to a specific break in classed color visualizations. @@ -23922,6 +27229,132 @@ declare namespace __esri { numClasses: number; } + interface symbologyHeatmap { + /** + * Clones a heatmap scheme object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#cloneScheme) + * + * @param scheme The heatmap scheme object to clone. + * + */ + cloneScheme(scheme: HeatmapScheme): HeatmapScheme; + /** + * Returns a primary scheme and secondary schemes defining properties for heatmap visualizations in a point [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). The `basemap` parameter determines the color schemes of the heatmap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#getSchemes) + * + * @param params See the table below for details of each parameter that may be passed to this function. + * @param params.basemap The basemap to pair with the visualization. This value indicates the best colors for overlaying a heatmap against the given basemap. + * + */ + getSchemes(params: heatmapGetSchemesParams): HeatmapSchemes; + /** + * Returns metadata for the available themes. If a `basemap` is provided, returns themes that look best with the given basemap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#getThemes) + * + * @param basemap The [Esri basemap string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or object that will be used with the returned theme(s). + * + */ + getThemes(basemap?: string | Basemap): heatmapTheme[]; + } + + export const symbologyHeatmap: symbologyHeatmap; + + export interface heatmapGetSchemesParams extends Object { + /** + * The basemap to pair with the visualization. This value indicates the best colors for overlaying a heatmap against the given basemap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#getSchemes) + */ + basemap: string | Basemap; + } + + /** + * Properties defining the symbology scheme used to visualize point features as a heatmap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapScheme) + */ + export interface HeatmapScheme extends Object { + /** + * The unique id of the color scheme to usee in the visualization. The id is assigned based on the following template: `//`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapScheme) + */ + id: string; + /** + * A continuous color ramp used to construct a heatmap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapScheme) + */ + colors: Color[]; + /** + * The opacity of the heatmap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapScheme) + */ + opacity: number; + } + + /** + * The return object of the [getSchemes()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#getSchemes) method. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapSchemes) + */ + export interface HeatmapSchemes extends Object { + /** + * The heatmap color scheme best suited for the given basemap and geometry type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapSchemes) + */ + primaryScheme: HeatmapScheme; + /** + * Additional heatmap color schemes that may be used to visualize data overlaid on the given basemap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapSchemes) + */ + secondarySchemes: HeatmapScheme[]; + /** + * The ID of the basemap associated with the given schemes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#HeatmapSchemes) + */ + basemapId: string; + } + + /** + * Describes a theme that pairs well with the given basemaps. See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#Theme) + */ + export interface heatmapTheme extends Object { + /** + * The name of the theme. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#Theme) + */ + name: string; + /** + * The label identifying the theme in UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#Theme) + */ + label: string; + /** + * Text describing the theme in the UI. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#Theme) + */ + description: string; + /** + * The Esri basemaps that pair well with the given theme. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-symbology-heatmap.html#Theme) + */ + basemaps: string[]; + } + interface symbologyLocation { /** * Clones a location scheme object. @@ -25284,6 +28717,285 @@ declare namespace __esri { width: number; } + interface StretchRenderer extends Renderer { + /** + * The stretched values are mapped to this specified color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#colorRamp) + */ + colorRamp: ColorRamp; + /** + * The computeGamma automatically calculates best gamma value to render exported image based on empirical model. This is applicable to any stretch type when [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#useGamma) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#computeGamma) + */ + computeGamma: boolean; + /** + * When Dynamic Range Adjustment is `true`, the statistics based on the current display extent are calculated as you zoom and pan around the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#dynamicRangeAdjustment) + */ + dynamicRangeAdjustment: boolean; + /** + * The gamma values to be used if [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#useGamma) is set to `false`. Gamma refers to the degree of contrast between the mid-level gray values of a raster dataset. Gamma does not affect the black or white values in a raster dataset, only the middle values. By applying a gamma correction, you can control the overall brightness of an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#gamma) + */ + gamma: number[]; + /** + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the highest values to exclude from the stretch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#maxPercent) + */ + maxPercent: number; + /** + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the lowest values to exclude from the stretch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#minPercent) + */ + minPercent: number; + /** + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) is standard-deviation. Specifies the number of standard deviations to use. The values beyond the number of standard deviations become the [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax). The remaining values are linearly stretched between [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#numberOfStandardDeviations) + */ + numberOfStandardDeviations: number; + /** + * The outputMax denotes the Output Maximum, which is the highest pixel value for the histogram. The [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax) + */ + outputMax: number; + /** + * The outputMin denotes the Output Minimum, which is the lowest pixel value for the histogram. The [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) + */ + outputMin: number; + /** + * The Strength Level determines how much of the sigmoidal function will be used in the stretch. A low value such as 1 will only use the middle portion of the curve, which tends to produce dull and faint colors. A high value such as 6 will use the entire curve, which tends to produce bold and sharp colors. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#sigmoidStrengthLevel) + */ + sigmoidStrengthLevel: number; + /** + * The stretch type defines a histogram stretch that will be applied to the rasters to enhance their appearance. Stretching improves the appearance of the data by spreading the pixel values along a histogram from the minimum and maximum values defined by their bit depth. For example, an 8-bit raster dataset or mosaic dataset will be stretched from 0 to 255. Different stretches will produce different results in the raster display. The possible stretch types are listed below. + * + * Value | Description + * ------|------------ + * none | No stretch method will be applied, even if statistics exist. + * standard-deviation | This stretch type applies a linear stretch between the values defined by the standard deviation value. + * histogram-equalization | The pixel values are stretched to adjust the contrast using the histogram of the data. + * min-max | This stretch type applies a linear stretch based on the output minimum and output maximum pixel values, which are used as the endpoints for the histogram. + * percent-clip | This stretch type applies a linear stretch between the defined [minPercent](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#minPercent) and [maxPercent](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#maxPercent) pixel values. + * sigmoid | The Sigmoid contrast stretch is designed to highlight moderate pixel values in your imagery while maintaining sufficient contrast at the extremes. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) + */ + stretchType: "none" | "standard-deviation" | "histogram-equalization" | "min-max" | "percent-clip" | "sigmoid"; + /** + * The type of Renderer. For StretchRenderer this value is always `raster-stretch`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#type) + */ + readonly type: "raster-stretch"; + /** + * Denotes wether the [gamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#gamma) value should be used. When `useGamma` is `false`, the gamma is calculated from the statistics and histogram of the data. The [gamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#gamma) property is required if `useGamma` is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#useGamma) + */ + useGamma: boolean; + } + + interface StretchRendererConstructor { + /** + * StretchRenderer defines the symbology with a gradual ramp of colors for each pixel in a [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html) based on the pixel value. The StretchRenderer works well when you have a large range of values to display, such as in imagery, aerial photographs, or elevation models. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html) + */ + + new (properties?: StretchRendererProperties): StretchRenderer; + + fromJSON(json: any): StretchRenderer; + } + + export const StretchRenderer: StretchRendererConstructor; + + interface StretchRendererProperties extends RendererProperties { + /** + * The stretched values are mapped to this specified color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#colorRamp) + */ + colorRamp?: ColorRampProperties; + /** + * The computeGamma automatically calculates best gamma value to render exported image based on empirical model. This is applicable to any stretch type when [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#useGamma) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#computeGamma) + */ + computeGamma?: boolean; + /** + * When Dynamic Range Adjustment is `true`, the statistics based on the current display extent are calculated as you zoom and pan around the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#dynamicRangeAdjustment) + */ + dynamicRangeAdjustment?: boolean; + /** + * The gamma values to be used if [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#useGamma) is set to `false`. Gamma refers to the degree of contrast between the mid-level gray values of a raster dataset. Gamma does not affect the black or white values in a raster dataset, only the middle values. By applying a gamma correction, you can control the overall brightness of an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#gamma) + */ + gamma?: number[]; + /** + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the highest values to exclude from the stretch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#maxPercent) + */ + maxPercent?: number; + /** + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the lowest values to exclude from the stretch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#minPercent) + */ + minPercent?: number; + /** + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) is standard-deviation. Specifies the number of standard deviations to use. The values beyond the number of standard deviations become the [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax). The remaining values are linearly stretched between [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#numberOfStandardDeviations) + */ + numberOfStandardDeviations?: number; + /** + * The outputMax denotes the Output Maximum, which is the highest pixel value for the histogram. The [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax) + */ + outputMax?: number; + /** + * The outputMin denotes the Output Minimum, which is the lowest pixel value for the histogram. The [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#outputMin) + */ + outputMin?: number; + /** + * The Strength Level determines how much of the sigmoidal function will be used in the stretch. A low value such as 1 will only use the middle portion of the curve, which tends to produce dull and faint colors. A high value such as 6 will use the entire curve, which tends to produce bold and sharp colors. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#sigmoidStrengthLevel) + */ + sigmoidStrengthLevel?: number; + /** + * The stretch type defines a histogram stretch that will be applied to the rasters to enhance their appearance. Stretching improves the appearance of the data by spreading the pixel values along a histogram from the minimum and maximum values defined by their bit depth. For example, an 8-bit raster dataset or mosaic dataset will be stretched from 0 to 255. Different stretches will produce different results in the raster display. The possible stretch types are listed below. + * + * Value | Description + * ------|------------ + * none | No stretch method will be applied, even if statistics exist. + * standard-deviation | This stretch type applies a linear stretch between the values defined by the standard deviation value. + * histogram-equalization | The pixel values are stretched to adjust the contrast using the histogram of the data. + * min-max | This stretch type applies a linear stretch based on the output minimum and output maximum pixel values, which are used as the endpoints for the histogram. + * percent-clip | This stretch type applies a linear stretch between the defined [minPercent](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#minPercent) and [maxPercent](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#maxPercent) pixel values. + * sigmoid | The Sigmoid contrast stretch is designed to highlight moderate pixel values in your imagery while maintaining sufficient contrast at the extremes. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#stretchType) + */ + stretchType?: "none" | "standard-deviation" | "histogram-equalization" | "min-max" | "percent-clip" | "sigmoid"; + /** + * Denotes wether the [gamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#gamma) value should be used. When `useGamma` is `false`, the gamma is calculated from the statistics and histogram of the data. The [gamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#gamma) property is required if `useGamma` is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-StretchRenderer.html#useGamma) + */ + useGamma?: boolean; + } + + interface AttributeColorInfo extends Accessor, JSONSupport { + /** + * The color used to render dots representing the given [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#color) + */ + color: Color; + /** + * The name of the numeric attribute field to represent with dots with the reference dot value provided to the [DotDensityRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field) + */ + field: string; + /** + * The label used to describe the field or attribute in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#label) + */ + label: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to a number. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. The values returned from this expression are the data used to drive the visualization. This takes precedence over [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field). Therefore, this property is typically used as an alternative to [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#valueExpression) + */ + valueExpression: string; + /** + * The title identifying and describing the associated [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression as defined in the [valueExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#valueExpression) property. This is displayed as the label of the attribute in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) in the absence of one provided in the [label](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#label) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#valueExpressionTitle) + */ + valueExpressionTitle: string; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#clone) + * + * + */ + clone(): AttributeColorInfo; + } + + interface AttributeColorInfoConstructor { + /** + * Defines the symbology for a [DotDensityRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html) in the renderer's [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#attributes) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html) + */ + + new (properties?: AttributeColorInfoProperties): AttributeColorInfo; + + fromJSON(json: any): AttributeColorInfo; + } + + export const AttributeColorInfo: AttributeColorInfoConstructor; + + interface AttributeColorInfoProperties { + /** + * The color used to render dots representing the given [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#color) + */ + color?: Color | number[] | string; + /** + * The name of the numeric attribute field to represent with dots with the reference dot value provided to the [DotDensityRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html#referenceDotValue). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field) + */ + field?: string; + /** + * The label used to describe the field or attribute in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#label) + */ + label?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to a number. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. The values returned from this expression are the data used to drive the visualization. This takes precedence over [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field). Therefore, this property is typically used as an alternative to [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#field). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#valueExpression) + */ + valueExpression?: string; + /** + * The title identifying and describing the associated [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression as defined in the [valueExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#valueExpression) property. This is displayed as the label of the attribute in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) in the absence of one provided in the [label](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#label) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AttributeColorInfo.html#valueExpressionTitle) + */ + valueExpressionTitle?: string; + } + interface AuthoringInfo extends Accessor, JSONSupport { /** * Indicates which classification method was used if a classed color or classed size renderer was generated using one of the Smart Mapping functions. **Possible Values:** equal-interval | manual | natural-breaks | quantile | standard-deviation @@ -25291,6 +29003,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#classificationMethod) */ classificationMethod: string; + /** + * Indicates the color ramp was used to create the symbols for Unique Value or Class Breaks renderer for Imagery Layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#colorRamp) + */ + colorRamp: ColorRamp; /** * A numeric field used for generating a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html) along with [field2](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#field2). In the default visualization, the values of this field are rendered along the vertical axis of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -25371,6 +29089,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#classificationMethod) */ classificationMethod?: string; + /** + * Indicates the color ramp was used to create the symbols for Unique Value or Class Breaks renderer for Imagery Layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#colorRamp) + */ + colorRamp?: ColorRampProperties; /** * A numeric field used for generating a [relationship renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html) along with [field2](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfo.html#field2). In the default visualization, the values of this field are rendered along the vertical axis of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -26538,7 +30262,7 @@ declare namespace __esri { /** * Defines icon sizes in a size visual variable based on minimum and maximum bounds similar to the [BoundedMinMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#BoundedMinMax) case. However, this specification allows the developer to specify various min and max sizes based on the [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale). Features with values greater than the provided max value are assigned the specified maximum size for the given view scale. Likewise, features with values less than the provided min value are assigned the specified minimum size for the given view scale. Features with values between the min and the max are assigned a corresponding size linearly interpolated between the provided min and max size values for the given scale value. The object specification for this object is provided below. - * > **Known Limitations** Scale-dependent size visual variables are currently not supported in [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** Scale-dependent size visual variables are currently not supported in [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). :: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#ScaleDependentIcons) */ @@ -26562,7 +30286,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * This value must be `$view.scale`. + * See [valueExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#valueExpression). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#ScaleDependentIcons) */ @@ -26736,18 +30460,18 @@ declare namespace __esri { } interface OpacityStop extends Accessor, JSONSupport { - /** - * The opacity value (between `0` and `1`) used to render features with the given [value](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#value). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#color) - */ - color: Color; /** * A string value used to label the stop in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#label) */ label: string; + /** + * The opacity value (between `0.0` and `1.0`) used to render features with the given [value](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#value). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#opacity) + */ + opacity: number; /** * Specifies the data value to map to the given [opacity value](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#opacity). * @@ -26774,18 +30498,18 @@ declare namespace __esri { export const OpacityStop: OpacityStopConstructor; interface OpacityStopProperties { - /** - * The opacity value (between `0` and `1`) used to render features with the given [value](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#value). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#color) - */ - color?: Color | number[] | string; /** * A string value used to label the stop in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#label) */ label?: string; + /** + * The opacity value (between `0.0` and `1.0`) used to render features with the given [value](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#value). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#opacity) + */ + opacity?: number | number[] | string; /** * Specifies the data value to map to the given [opacity value](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-support-OpacityStop.html#opacity). * @@ -26961,6 +30685,13 @@ declare namespace __esri { */ export type renderersClassBreaksRenderer = ClassBreaksRenderer; + /** + * DotDensityRenderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#DotDensityRenderer) + */ + export type renderersDotDensityRenderer = DotDensityRenderer; + /** * HeatmapRenderer. * @@ -26969,11 +30700,29 @@ declare namespace __esri { export type renderersHeatmapRenderer = HeatmapRenderer; /** - * Renderer types. + * RasterRenderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#RasterRenderer) + */ + export type RasterRenderer = ClassBreaksRenderer | UniqueValueRenderer; + + /** + * Renderer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#Renderer) */ - export type renderersRenderer = ClassBreaksRenderer | SimpleRenderer | UniqueValueRenderer | HeatmapRenderer; + export type renderersRenderer = HeatmapRenderer | RendererWithVisualVariables; + + /** + * RendererWithVisualVariables. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers.html#RendererWithVisualVariables) + */ + export type RendererWithVisualVariables = + | SimpleRenderer + | ClassBreaksRenderer + | UniqueValueRenderer + | DotDensityRenderer; /** * SimpleRenderer. @@ -27296,983 +31045,6 @@ declare namespace __esri { export const ActionToggle: ActionToggleConstructor; - /** - * A convenience module for importing [ContentElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-ContentElement.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing content elements one at a time like this: - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html) - */ - namespace ContentElement { - /** - * Popup content element types. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#ContentElement) - */ - export type ContentElement = __esri.Text | __esri.Media | __esri.Fields | __esri.Attachments; - - /** - * TextContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Text) - */ - export type Text = __esri.Text; - export const Text: typeof __esri.Text; - - /** - * MediaContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Media) - */ - export type Media = __esri.Media; - export const Media: typeof __esri.Media; - - /** - * FieldsContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Fields) - */ - export type Fields = __esri.Fields; - export const Fields: typeof __esri.Fields; - - /** - * AttachmentsContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Attachments) - */ - export type Attachments = __esri.Attachments; - export const Attachments: typeof __esri.Attachments; - } - - interface Attachments extends ContentElementContentElement, JSONSupport { - /** - * An array of [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) objects used to display within the popup's content. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html#attachmentInfos) - */ - attachmentInfos: AttachmentInfo; - /** - * A string value indicating how to display the attachment. Possible values are: preview | list If `list` is specified, attachments show as links. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html#displayType) - */ - displayType: string; - - /** - * Creates a deep clone of the AttachmentsContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html#clone) - * - * - */ - clone(): Attachments; - } - - interface AttachmentsConstructor { - /** - * An AttachmentsContentElement represents an attachment element associated with a feature. This resource is available only if the [FeatureLayer's capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html) - */ - - new (properties?: AttachmentsProperties): Attachments; - - fromJSON(json: any): Attachments; - } - - export const Attachments: AttachmentsConstructor; - - interface AttachmentsProperties extends ContentElementContentElementProperties { - /** - * An array of [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) objects used to display within the popup's content. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html#attachmentInfos) - */ - attachmentInfos?: AttachmentInfoProperties; - /** - * A string value indicating how to display the attachment. Possible values are: preview | list If `list` is specified, attachments show as links. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Attachments.html#displayType) - */ - displayType?: string; - } - - interface ContentElementContentElement extends Accessor, JSONSupport { - /** - * The type of popup element displayed. **Possible values**: text | fields | media | attachments - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-ContentElement.html#type) - */ - readonly type: string; - } - - interface ContentElementContentElementConstructor { - /** - * Content elements define what should display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. There are four specific element types: - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-ContentElement.html) - */ - - new (properties?: ContentElementContentElementProperties): ContentElementContentElement; - - fromJSON(json: any): ContentElementContentElement; - } - - export const ContentElementContentElement: ContentElementContentElementConstructor; - - interface ContentElementContentElementProperties {} - - interface Fields extends ContentElementContentElement, JSONSupport { - /** - * Object array of [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html). If the `fieldInfos` property is not provided directly within the content, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Fields.html#fieldInfos) - */ - fieldInfos: FieldInfo[]; - - /** - * Creates a deep clone of the FieldsContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Fields.html#clone) - * - * - */ - clone(): Fields; - } - - interface FieldsConstructor { - /** - * A FieldsContentElement represents [fieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) associated with a feature. If this is not set within the content, it will revert to whatever may be set within the [PopupTemplate.Fieldinfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) property. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Fields.html) - */ - - new (properties?: FieldsProperties): Fields; - - fromJSON(json: any): Fields; - } - - export const Fields: FieldsConstructor; - - interface FieldsProperties extends ContentElementContentElementProperties { - /** - * Object array of [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html). If the `fieldInfos` property is not provided directly within the content, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Fields.html#fieldInfos) - */ - fieldInfos?: FieldInfoProperties[]; - } - - interface Media extends ContentElementContentElement, JSONSupport { - /** - * Contains the media elements representing images or charts to display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). This can be an individual chart or image element, or an array containing a combination of any of these types. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media.html#mediaInfos) - */ - mediaInfos: BarChart | ColumnChart | Image | LineChart | PieChart | any[]; - - /** - * Creates a deep clone of the MediaContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media.html#clone) - * - * - */ - clone(): Media; - } - - interface MediaConstructor { - /** - * A `MediaContentElement` represents an individual or array of [Media](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Media.html) elements to display within a popup's content. Examples of these types of media are [charts](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart.html) and/or [images](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media.html) - */ - - new (properties?: MediaProperties): Media; - - fromJSON(json: any): Media; - } - - export const Media: MediaConstructor; - - interface MediaProperties extends ContentElementContentElementProperties { - /** - * Contains the media elements representing images or charts to display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). This can be an individual chart or image element, or an array containing a combination of any of these types. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media.html#mediaInfos) - */ - mediaInfos?: - | BarChartProperties - | ColumnChartProperties - | ImageProperties - | LineChartProperties - | PieChartProperties - | any[]; - } - - interface BarChart extends Chart, JSONSupport { - /** - * Creates a deep clone of the MediaBarChartContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-BarChart.html#clone) - * - * - */ - clone(): BarChart; - } - - interface BarChartConstructor { - new (properties?: BarChartProperties): BarChart; - - fromJSON(json: any): BarChart; - } - - export const BarChart: BarChartConstructor; - - interface BarChartProperties extends ChartProperties {} - - interface Chart extends MediaMedia, JSONSupport { - /** - * Defines the chart value. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart.html#value) - */ - value: Value; - } - - interface ChartConstructor { - new (properties?: ChartProperties): Chart; - - fromJSON(json: any): Chart; - } - - export const Chart: ChartConstructor; - - interface ChartProperties extends MediaMediaProperties { - /** - * Defines the chart value. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart.html#value) - */ - value?: ValueProperties; - } - - interface Series extends Accessor { - /** - * String value indicating the tooltip for a series. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html#tooltipField) - */ - tooltipField: string; - /** - * Numerical value indicating the x-value for the chart series. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html#x) - */ - x: number; - /** - * Numerical value indicating the y-value for the chart series. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html#y) - */ - y: number; - - /** - * Creates a deep clone of the MediaInfoChartSeries class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html#clone) - * - * - */ - clone(): Series; - } - - interface SeriesConstructor { - new (properties?: SeriesProperties): Series; - } - - export const Series: SeriesConstructor; - - interface SeriesProperties { - /** - * String value indicating the tooltip for a series. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html#tooltipField) - */ - tooltipField?: string; - /** - * Numerical value indicating the x-value for the chart series. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html#x) - */ - x?: number; - /** - * Numerical value indicating the y-value for the chart series. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html#y) - */ - y?: number; - } - - interface Value extends Accessor, JSONSupport { - /** - * An array of strings, with each string containing the name of a field to display in the chart. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#fields) - */ - fields: string[]; - /** - * A string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#normalizeField) - */ - normalizeField: string; - /** - * An array of [Series](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html) objects which provide information of x/y data data that is plotted in a chart. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#series) - */ - series: Series[]; - /** - * Used for chart values. Defines a new Dojo theme, only valid for chart types. View the [Dojox Charting Theme Preview](https://download.dojotoolkit.org/release-1.10.0/dojo-release-1.10.0/dojox/charting/tests/theme_preview.html) to see some of the theme options. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#theme) - */ - theme: string; - /** - * String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#tooltipField) - */ - tooltipField: string; - - /** - * Creates a deep clone of the MediaInfoChartValue class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#clone) - * - * - */ - clone(): Value; - } - - interface ValueConstructor { - new (properties?: ValueProperties): Value; - - fromJSON(json: any): Value; - } - - export const Value: ValueConstructor; - - interface ValueProperties { - /** - * An array of strings, with each string containing the name of a field to display in the chart. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#fields) - */ - fields?: string[]; - /** - * A string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#normalizeField) - */ - normalizeField?: string; - /** - * An array of [Series](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Series.html) objects which provide information of x/y data data that is plotted in a chart. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#series) - */ - series?: SeriesProperties[]; - /** - * Used for chart values. Defines a new Dojo theme, only valid for chart types. View the [Dojox Charting Theme Preview](https://download.dojotoolkit.org/release-1.10.0/dojo-release-1.10.0/dojox/charting/tests/theme_preview.html) to see some of the theme options. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#theme) - */ - theme?: string; - /** - * String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Chart-Value.html#tooltipField) - */ - tooltipField?: string; - } - - interface ColumnChart extends Chart, JSONSupport { - /** - * Creates a deep clone of the MediaColumnChartContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-ColumnChart.html#clone) - * - * - */ - clone(): ColumnChart; - } - - interface ColumnChartConstructor { - new (properties?: ColumnChartProperties): ColumnChart; - - fromJSON(json: any): ColumnChart; - } - - export const ColumnChart: ColumnChartConstructor; - - interface ColumnChartProperties extends ChartProperties {} - - interface Image extends MediaMedia, JSONSupport { - /** - * Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of `0` indicates auto refresh is not enabled. If the property does not exist, it is equivalent to having a value of `0`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html#refreshInterval) - */ - refreshInterval: number; - /** - * Defines the value format of the image media element and how the images should be retrieved. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html#value) - */ - value: ImageValue; - - /** - * Creates a deep clone of the MediaImageContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html#clone) - * - * - */ - clone(): Image; - } - - interface ImageConstructor { - new (properties?: ImageProperties): Image; - - fromJSON(json: any): Image; - } - - export const Image: ImageConstructor; - - interface ImageProperties extends MediaMediaProperties { - /** - * Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of `0` indicates auto refresh is not enabled. If the property does not exist, it is equivalent to having a value of `0`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html#refreshInterval) - */ - refreshInterval?: number; - /** - * Defines the value format of the image media element and how the images should be retrieved. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image.html#value) - */ - value?: ImageValueProperties; - } - - interface ImageValue extends Accessor, JSONSupport { - /** - * A string containing a URL to be launched in a browser when a user clicks the image. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image-Value.html#linkURL) - */ - linkURL: string; - /** - * A string containing the URL to the image. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image-Value.html#sourceURL) - */ - sourceURL: string; - - /** - * Creates a deep clone of the MediaInfoImageValue class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image-Value.html#clone) - * - * - */ - clone(): ImageValue; - } - - interface ImageValueConstructor { - new (properties?: ImageValueProperties): ImageValue; - - fromJSON(json: any): ImageValue; - } - - export const ImageValue: ImageValueConstructor; - - interface ImageValueProperties { - /** - * A string containing a URL to be launched in a browser when a user clicks the image. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image-Value.html#linkURL) - */ - linkURL?: string; - /** - * A string containing the URL to the image. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Image-Value.html#sourceURL) - */ - sourceURL?: string; - } - - interface LineChart extends Chart, JSONSupport { - /** - * Creates a deep clone of the MediaLineChartContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-LineChart.html#clone) - * - * - */ - clone(): LineChart; - } - - interface LineChartConstructor { - new (properties?: LineChartProperties): LineChart; - - fromJSON(json: any): LineChart; - } - - export const LineChart: LineChartConstructor; - - interface LineChartProperties extends ChartProperties {} - - interface MediaMedia extends Accessor, JSONSupport { - /** - * Defines a caption for the media. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Media.html#caption) - */ - caption: string; - /** - * The title of the media element. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Media.html#title) - */ - title: string; - /** - * The type of media element displayed. **Possible values**: image | bar-chart | column-chart | line-chart | pie-chart - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Media.html#type) - */ - readonly type: string; - } - - interface MediaMediaConstructor { - new (properties?: MediaMediaProperties): MediaMedia; - - fromJSON(json: any): MediaMedia; - } - - export const MediaMedia: MediaMediaConstructor; - - interface MediaMediaProperties { - /** - * Defines a caption for the media. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Media.html#caption) - */ - caption?: string; - /** - * The title of the media element. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-Media.html#title) - */ - title?: string; - } - - interface PieChart extends Chart, JSONSupport { - /** - * Creates a deep clone of the MediaPieChartContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Media-PieChart.html#clone) - * - * - */ - clone(): PieChart; - } - - interface PieChartConstructor { - new (properties?: PieChartProperties): PieChart; - - fromJSON(json: any): PieChart; - } - - export const PieChart: PieChartConstructor; - - interface PieChartProperties extends ChartProperties {} - - interface Text extends ContentElementContentElement, JSONSupport { - /** - * The formatted string content to display. This may contain a field name enclosed in `{}`, such as `{FIELDNAME}`, or an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression name, referenced as `{expression/EXPRESSIONNAME}`. Text content may also leverage HTML tags such as ``, `

`, and `
` for formatting the look and feel of the content. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Text.html#text) - */ - text: string; - - /** - * Creates a deep clone of the TextContentElement class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Text.html#clone) - * - * - */ - clone(): Text; - } - - interface TextConstructor { - /** - * A `TextContentElement` is used to define descriptive text as an element within the [PopupTemplate's](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. The text may reference values returned from a field attribute or an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Text.html) - */ - - new (properties?: TextProperties): Text; - - fromJSON(json: any): Text; - } - - export const Text: TextConstructor; - - interface TextProperties extends ContentElementContentElementProperties { - /** - * The formatted string content to display. This may contain a field name enclosed in `{}`, such as `{FIELDNAME}`, or an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression name, referenced as `{expression/EXPRESSIONNAME}`. Text content may also leverage HTML tags such as ``, `

`, and `
` for formatting the look and feel of the content. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Text.html#text) - */ - text?: string; - } - - /** - * AttachmentsContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Attachments) - */ - export type ContentElementAttachments = Attachments; - - /** - * Popup content element types. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#ContentElement) - */ - export type supportContentElementContentElement = Text | Media | Fields | Attachments; - - /** - * FieldsContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Fields) - */ - export type ContentElementFields = Fields; - - /** - * MediaContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Media) - */ - export type ContentElementMedia = Media; - - /** - * TextContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Text) - */ - export type ContentElementText = Text; - - interface ExpressionInfo extends Accessor, JSONSupport { - /** - * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to either a string, number, dictionary, or array. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#expression) - */ - expression: string; - /** - * The name of the expression. This is used to reference the value of the given `expression` in the popupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) property by wrapping it in curly braces and prefacing it with `expression/` (e.g. `{expression/expressionName}`). See the code snippets below for more examples. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#name) - */ - name: string; - /** - * Indicates the return type of the Arcade expression. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#returnType) - */ - returnType: string | number; - /** - * The title used to describe the value returned by the expression in the popup. This will display if the value is referenced in a [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) table. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#title) - */ - title: string; - - /** - * Creates a deep clone of the ExpressionInfo class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#clone) - * - * - */ - clone(): ExpressionInfo; - } - - interface ExpressionInfoConstructor { - new (properties?: ExpressionInfoProperties): ExpressionInfo; - - fromJSON(json: any): ExpressionInfo; - } - - export const ExpressionInfo: ExpressionInfoConstructor; - - interface ExpressionInfoProperties { - /** - * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to either a string, number, dictionary, or array. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#expression) - */ - expression?: string; - /** - * The name of the expression. This is used to reference the value of the given `expression` in the popupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) property by wrapping it in curly braces and prefacing it with `expression/` (e.g. `{expression/expressionName}`). See the code snippets below for more examples. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#name) - */ - name?: string; - /** - * Indicates the return type of the Arcade expression. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#returnType) - */ - returnType?: string | number; - /** - * The title used to describe the value returned by the expression in the popup. This will display if the value is referenced in a [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) table. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#title) - */ - title?: string; - } - - interface FieldInfo extends Accessor, JSONSupport { - /** - * The field name as defined by the service or the `name` of an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. Arcade expression names are defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#expressionInfos) property. When referencing Arcade expressions, you must preface the name with `expression/`, such as `expression/percent-total`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#fieldName) - */ - fieldName: string; - /** - * Class which provides formatting options for numerical or date fields and how they should display within a popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#format) - */ - format: FieldInfoFormat; - /** - * A Boolean determining whether users can edit this field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#isEditable) - * - * @default false - */ - isEditable: boolean; - /** - * A string containing the field alias. Not applicable to Arcade expressions as the title is used instead. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#label) - */ - label: string; - /** - * Used in a `one:many` or `many:many` relationship to compute the statistics on the field to show in the popup. If the property is present, must be one of the following values: **Possible Values:** count | sum | min | max | avg | stddev | var - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#statisticType) - */ - statisticType: string; - /** - * A string determining what type of input box editors see when editing the field. Applies only to string fields. This is not applicable to Arcade expressions. If this property is present, it must be one of the following values: **Possible Values:** rich-text | text-area | text-box - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#stringFieldOption) - * - * @default text-box - */ - stringFieldOption: string; - /** - * A string providing an editing hint for editors of the field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#tooltip) - */ - tooltip: string; - /** - * Indicates whether the field is visible in the popup window. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#visible) - * - * @default true - */ - visible: boolean; - - /** - * Creates a deep clone of the FieldInfo class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#clone) - * - * - */ - clone(): FieldInfo; - } - - interface FieldInfoConstructor { - new (properties?: FieldInfoProperties): FieldInfo; - - fromJSON(json: any): FieldInfo; - } - - export const FieldInfo: FieldInfoConstructor; - - interface FieldInfoProperties { - /** - * The field name as defined by the service or the `name` of an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. Arcade expression names are defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#expressionInfos) property. When referencing Arcade expressions, you must preface the name with `expression/`, such as `expression/percent-total`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#fieldName) - */ - fieldName?: string; - /** - * Class which provides formatting options for numerical or date fields and how they should display within a popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#format) - */ - format?: FieldInfoFormatProperties; - /** - * A Boolean determining whether users can edit this field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#isEditable) - * - * @default false - */ - isEditable?: boolean; - /** - * A string containing the field alias. Not applicable to Arcade expressions as the title is used instead. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#label) - */ - label?: string; - /** - * Used in a `one:many` or `many:many` relationship to compute the statistics on the field to show in the popup. If the property is present, must be one of the following values: **Possible Values:** count | sum | min | max | avg | stddev | var - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#statisticType) - */ - statisticType?: string; - /** - * A string determining what type of input box editors see when editing the field. Applies only to string fields. This is not applicable to Arcade expressions. If this property is present, it must be one of the following values: **Possible Values:** rich-text | text-area | text-box - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#stringFieldOption) - * - * @default text-box - */ - stringFieldOption?: string; - /** - * A string providing an editing hint for editors of the field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#tooltip) - */ - tooltip?: string; - /** - * Indicates whether the field is visible in the popup window. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#visible) - * - * @default true - */ - visible?: boolean; - } - - interface FieldInfoFormat extends Accessor, JSONSupport { - /** - * Used only with `Date` fields. Specifies how the date should appear in a popup. **Possible Values**: short-date | short-date-le | long-date | day-short-month-year | long-month-day-year | short-date-long-time | short-date-le-long-time | short-date-short-time | short-date-le-short-time | short-date-short-time-24 | short-date-le-short-time-24 | short-date-short-time-24 | short-date-le-short-time-24 | long-month-year | short-month-year | year - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#dateFormat) - */ - dateFormat: string; - /** - * Used only with `Number` fields. A value of `true` indicates the number should have a digit (or thousands) separator when the value appears in popups. A value of `false` means that no separator will be used. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#digitSeparator) - * - * @default false - */ - digitSeparator: boolean; - /** - * Used only with `Number` fields to specify the number of supported decimal places that should appear in popups. Any places beyond this value are rounded. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#places) - */ - places: number; - } - - interface FieldInfoFormatConstructor { - /** - * An object used with numerical or date fields to provide more detail about how the value should be displayed in a popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html) - */ - - new (properties?: FieldInfoFormatProperties): FieldInfoFormat; - - fromJSON(json: any): FieldInfoFormat; - } - - export const FieldInfoFormat: FieldInfoFormatConstructor; - - interface FieldInfoFormatProperties { - /** - * Used only with `Date` fields. Specifies how the date should appear in a popup. **Possible Values**: short-date | short-date-le | long-date | day-short-month-year | long-month-day-year | short-date-long-time | short-date-le-long-time | short-date-short-time | short-date-le-short-time | short-date-short-time-24 | short-date-le-short-time-24 | short-date-short-time-24 | short-date-le-short-time-24 | long-month-year | short-month-year | year - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#dateFormat) - */ - dateFormat?: string; - /** - * Used only with `Number` fields. A value of `true` indicates the number should have a digit (or thousands) separator when the value appears in popups. A value of `false` means that no separator will be used. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#digitSeparator) - * - * @default false - */ - digitSeparator?: boolean; - /** - * Used only with `Number` fields to specify the number of supported decimal places that should appear in popups. Any places beyond this value are rounded. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#places) - */ - places?: number; - } - - interface LayerOptions extends Accessor, JSONSupport { - /** - * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). Indicates whether records without data should display within the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayerOptions.html#showNoDataRecords) - * - * @default true - */ - showNoDataRecords: boolean; - - /** - * Creates a deep clone of the LayerOptions class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayerOptions.html#clone) - * - * - */ - clone(): LayerOptions; - } - - interface LayerOptionsConstructor { - new (properties?: LayerOptionsProperties): LayerOptions; - - fromJSON(json: any): LayerOptions; - } - - export const LayerOptions: LayerOptionsConstructor; - - interface LayerOptionsProperties { - /** - * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). Indicates whether records without data should display within the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayerOptions.html#showNoDataRecords) - * - * @default true - */ - showNoDataRecords?: boolean; - } - interface LayersMixin { /** * A collection of operational [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). This property only contains interactive operational layers, such as [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [WebTileLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html) and {@link module:esri/layers/GraphicsLayer GraphicsLayers} that may be queried, assigned different renderers, analyzed, etc. It does not include [basemaps](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html). A [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) is a collection of one or more features, or {@link module:esri/Graphic graphics}, that represent real-world phenomena. Each feature contains a {@link module:esri/symbols/Symbol symbol} and [geographic data](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered on the map as a graphic with spatial context. Features within the layer may also contain data attributes that provide additional information that may be viewed in [popup windows](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) and used for {@link module:esri/renderers/Renderer rendering the layer}. Layers may be added in the [constructor](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#constructors-summary), with the [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#add) or [addMany()](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#addMany) methods, or directly to the layers collection using [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add) or [addMany()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#addMany). @@ -28295,11 +31067,11 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#add) * - * @param layer Layer or a Promise<Layer> to be added to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). + * @param layer Layer or a promise that resolves to a layer to add to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). * @param index A layer can be added at a specified index in the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). If no index is specified or the index specified is greater than the current number of layers, the layer is automatically appended to the list of layers in the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers) and the index is normalized. * */ - add(layer: Layer | IPromise, index?: number): void; + add(layer: Layer | IPromise, index?: number): void; /** * Adds a layer or an array of layers to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). * @@ -28381,100 +31153,6 @@ declare namespace __esri { layers?: CollectionProperties | LayerProperties[]; } - interface RelatedRecordsInfo extends Accessor, JSONSupport { - /** - * An array of [FieldOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html) objects indicating the field display order for the related records and whether they should be sorted in ascending `asc` or descending `desc` order. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#orderByFields) - */ - orderByFields: FieldOrder[]; - /** - * Indicates whether to display related records in the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#showRelatedRecords) - */ - showRelatedRecords: boolean; - - /** - * Creates a deep clone of the RelatedRecordsInfo class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#clone) - * - * - */ - clone(): RelatedRecordsInfo; - } - - interface RelatedRecordsInfoConstructor { - new (properties?: RelatedRecordsInfoProperties): RelatedRecordsInfo; - - fromJSON(json: any): RelatedRecordsInfo; - } - - export const RelatedRecordsInfo: RelatedRecordsInfoConstructor; - - interface RelatedRecordsInfoProperties { - /** - * An array of [FieldOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html) objects indicating the field display order for the related records and whether they should be sorted in ascending `asc` or descending `desc` order. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#orderByFields) - */ - orderByFields?: FieldOrderProperties[]; - /** - * Indicates whether to display related records in the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#showRelatedRecords) - */ - showRelatedRecords?: boolean; - } - - interface FieldOrder extends Accessor, JSONSupport { - /** - * The attribute value of the field selected that will drive the sorting of related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#field) - */ - field: string; - /** - * Set the ascending or descending sort order of the returned related records. **Possible Values**: asc | desc - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#order) - */ - order: string; - - /** - * Creates a deep clone of the FieldOrder class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#clone) - * - * - */ - clone(): FieldOrder; - } - - interface FieldOrderConstructor { - new (properties?: FieldOrderProperties): FieldOrder; - - fromJSON(json: any): FieldOrder; - } - - export const FieldOrder: FieldOrderConstructor; - - interface FieldOrderProperties { - /** - * The attribute value of the field selected that will drive the sorting of related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#field) - */ - field?: string; - /** - * Set the ascending or descending sort order of the returned related records. **Possible Values**: asc | desc - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#order) - */ - order?: string; - } - /** * A convenience module for importing [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing symbols one at a time like this: * @@ -28756,7 +31434,7 @@ declare namespace __esri { */ border: LineCallout3DBorder; /** - * The color of the callout line. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#color) * @@ -28810,7 +31488,7 @@ declare namespace __esri { */ border?: LineCallout3DBorderProperties; /** - * The color of the callout line. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#color) * @@ -28835,18 +31513,18 @@ declare namespace __esri { export interface LineCallout3DBorderProperties extends Object { /** - * The color of the callout line border. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line border. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#border) * * @default white */ - color?: Color; + color?: Color | number[] | string; } export interface LineCallout3DBorder extends AnonymousAccessor { /** - * The color of the callout line border. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line border. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#border) * @@ -28857,7 +31535,7 @@ declare namespace __esri { interface Edges3D extends Accessor, JSONSupport { /** - * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the edges. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) * @@ -28907,7 +31585,7 @@ declare namespace __esri { interface Edges3DProperties { /** - * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the edges. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) * @@ -29015,6 +31693,14 @@ declare namespace __esri { } interface ExtrudeSymbol3DLayer extends Symbol3DLayer { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. * @@ -29061,6 +31747,14 @@ declare namespace __esri { export const ExtrudeSymbol3DLayer: ExtrudeSymbol3DLayerConstructor; interface ExtrudeSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. * @@ -29110,6 +31804,14 @@ declare namespace __esri { } interface FillSymbol3DLayer extends Symbol3DLayer { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). This property applies only to [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbols. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) * @@ -29154,6 +31856,14 @@ declare namespace __esri { export const FillSymbol3DLayer: FillSymbol3DLayerConstructor; interface FillSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). This property applies only to [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbols. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) * @@ -29170,7 +31880,7 @@ declare namespace __esri { export interface FillSymbol3DLayerOutlineProperties extends Object { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -29185,7 +31895,7 @@ declare namespace __esri { export interface FillSymbol3DLayerOutline extends AnonymousAccessor { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -29318,6 +32028,12 @@ declare namespace __esri { * @default center */ anchor: string; + /** + * Defines the [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) relative to the center of the icon. It is specified as a ratio of the icon's dimensions. For example, a value of `{ x: 0, y: 0 }` designates the center of the icon, while a value of `{ x: -0.5, y: -0.5 }` causes the top-left corner of the icon to coincide with the feature geometry. This property only applies when [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) is set to `relative`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + anchorPosition: IconSymbol3DLayerAnchorPosition; /** * The outline of the icon. * @@ -29326,6 +32042,7 @@ declare namespace __esri { outline: IconSymbol3DLayerOutline; /** * The shape (`primitive`) or image URL (`href`) used to visualize the features. If both properties are present, `href` takes precedence and `primitive` is ignored. + * > **Known Limitations** Using this property to render an SVG path is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#resource) * @@ -29380,6 +32097,12 @@ declare namespace __esri { * @default center */ anchor?: string; + /** + * Defines the [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) relative to the center of the icon. It is specified as a ratio of the icon's dimensions. For example, a value of `{ x: 0, y: 0 }` designates the center of the icon, while a value of `{ x: -0.5, y: -0.5 }` causes the top-left corner of the icon to coincide with the feature geometry. This property only applies when [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) is set to `relative`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + anchorPosition?: IconSymbol3DLayerAnchorPosition; /** * The outline of the icon. * @@ -29388,6 +32111,7 @@ declare namespace __esri { outline?: IconSymbol3DLayerOutlineProperties; /** * The shape (`primitive`) or image URL (`href`) used to visualize the features. If both properties are present, `href` takes precedence and `primitive` is ignored. + * > **Known Limitations** Using this property to render an SVG path is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#resource) * @@ -29404,9 +32128,24 @@ declare namespace __esri { size?: number | string; } + export interface IconSymbol3DLayerAnchorPosition extends Object { + /** + * Value defining the position relative to the icon's width. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + x: number; + /** + * Value defining the position relative to the icon's height. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + y: number; + } + export interface IconSymbol3DLayerOutlineProperties extends Object { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#outline) * @@ -29425,7 +32164,7 @@ declare namespace __esri { export interface IconSymbol3DLayerOutline extends AnonymousAccessor { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#outline) * @@ -29453,6 +32192,7 @@ declare namespace __esri { * cross | ![s3d-icon-cross](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-cross.png) * x | ![s3d-icon-x](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-x.png) * kite | ![s3d-icon-kite](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-kite.png) + * triangle | ![s3d-icon-triangle](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-triangle.png) * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#resource) @@ -29690,7 +32430,7 @@ declare namespace __esri { interface MarkerSymbol extends Symbol { /** - * The angle of the marker in degrees. + * The angle of the marker relative to the screen in degrees. * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#angle) @@ -29700,7 +32440,6 @@ declare namespace __esri { angle: number; /** * The offset on the x-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#xoffset) * @@ -29709,7 +32448,6 @@ declare namespace __esri { xoffset: number; /** * The offset on the y-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#yoffset) * @@ -29734,7 +32472,7 @@ declare namespace __esri { interface MarkerSymbolProperties extends SymbolProperties { /** - * The angle of the marker in degrees. + * The angle of the marker relative to the screen in degrees. * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#angle) @@ -29744,7 +32482,6 @@ declare namespace __esri { angle?: number; /** * The offset on the x-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#xoffset) * @@ -29753,7 +32490,6 @@ declare namespace __esri { xoffset?: number | string; /** * The offset on the y-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#yoffset) * @@ -29817,6 +32553,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) */ anchorPosition: ObjectSymbol3DLayerAnchorPosition; + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * The depth, or diameter from north to south, of the object in meters. If `undefined`, the depth will be calculated to maintain the original proportions of the object. * @@ -29840,7 +32584,7 @@ declare namespace __esri { */ height: number; /** - * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in a specific format, which can be generated using the ArcGIS Pro SDK. [See these instructions](https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/ExportWeb3DObjectResource#exportweb3dobjectresource) to learn how to generate a custom 3D model for use in this property. + * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in glTF format. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#resource) * @@ -29919,6 +32663,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) */ anchorPosition?: ObjectSymbol3DLayerAnchorPosition; + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * The depth, or diameter from north to south, of the object in meters. If `undefined`, the depth will be calculated to maintain the original proportions of the object. * @@ -29942,7 +32694,7 @@ declare namespace __esri { */ height?: number; /** - * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in a specific format, which can be generated using the ArcGIS Pro SDK. [See these instructions](https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/ExportWeb3DObjectResource#exportweb3dobjectresource) to learn how to generate a custom 3D model for use in this property. + * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in glTF format. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#resource) * @@ -29972,10 +32724,23 @@ declare namespace __esri { } export interface ObjectSymbol3DLayerAnchorPosition extends Object { + /** + * Value defining the position relative to the x axis of the bounding box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) + */ x: number; - + /** + * Value defining the position relative to the y axis of the bounding box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) + */ y: number; - + /** + * Value defining the position relative to the z axis of the bounding box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) + */ z: number; } @@ -29998,7 +32763,7 @@ declare namespace __esri { */ primitive?: string; /** - * The URL to the 3D model. [See these instructions](https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/ExportWeb3DObjectResource#exportweb3dobjectresource) to learn how to create a custom 3D model. + * The URL to the 3D model in glTF format. The URL should point to a glTF file (.gltf or .glb) which can reference additional binary (.bin) and image files (.jpg, .png). See the guide topic on [Visualizing points with 3D symbols](https://developers.arcgis.com/javascript/latest/guide/visualizing-points-3d/index.html) to learn how to use a custom 3D model. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#resource) */ @@ -30006,6 +32771,14 @@ declare namespace __esri { } interface PathSymbol3DLayer extends Symbol3DLayer { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * The diameter of the tube in meters. * @@ -30046,6 +32819,14 @@ declare namespace __esri { export const PathSymbol3DLayer: PathSymbol3DLayerConstructor; interface PathSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * The diameter of the tube in meters. * @@ -30220,6 +33001,9 @@ declare namespace __esri { * * Use an [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) hosted on the same domain as the application. * * Install a proxy. * + * + * > **Known Limitations** Using this property to render SVG paths as images is not supported in IE11. + * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) */ url: string; @@ -30271,6 +33055,9 @@ declare namespace __esri { * * Use an [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) hosted on the same domain as the application. * * Install a proxy. * + * + * > **Known Limitations** Using this property to render SVG paths as images is not supported in IE11. + * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) */ url?: string; @@ -30290,7 +33077,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html#callout) */ - callout: Callout3D; + callout: LineCallout3D; /** * For PointSymbol3D the type is always `point-3d`. * @@ -30334,7 +33121,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html#callout) */ - callout?: Callout3DProperties; + callout?: LineCallout3DProperties; /** * Shifts the symbol along the vertical world axis by a given height. The height is set in screen space units like points or pixels. For points displayed with a [callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html#callout) `verticalOffset` should be set. * @@ -30676,7 +33463,7 @@ declare namespace __esri { outline: SimpleLineSymbol; /** * The SVG path of the icon. - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** This property is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html#path) */ @@ -30691,7 +33478,6 @@ declare namespace __esri { size: number; /** * The marker style. Possible values are in the table below. - * > **Known Limitations** The `triangle` value is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * Value | Description * ------|------------ @@ -30748,7 +33534,7 @@ declare namespace __esri { outline?: SimpleLineSymbolProperties; /** * The SVG path of the icon. - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** This property is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html#path) */ @@ -30763,7 +33549,6 @@ declare namespace __esri { size?: number | string; /** * The marker style. Possible values are in the table below. - * > **Known Limitations** The `triangle` value is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * Value | Description * ------|------------ @@ -30863,9 +33648,124 @@ declare namespace __esri { symbolConfig?: string; } + interface symbolUtils { + /** + * Returns a symbol representing the input [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). This method is useful when you need to know the exact visual properties of a [Graphic's symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol), particularly when the graphic comes from the result of a [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) and its symbol properties may be empty. A symbol's properties won't be populated when a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) defines the visualization of a layer rather than symbols set individually on each graphic of a layer. This is the case for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), and any other layer that has a `renderer` property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + * + * @param symbol The graphic from which to retrieve the displayed symbol. This commonly comes from a [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) operation. + * @param options Options for generating the display symbol of the input graphic. These must be specified if the input graphic comes from a layer with a renderer that has [visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) applied. See the object specification below. + * @param options.scale The [view scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) at which the symbol is displayed. + * @param options.viewingMode The [viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode) of the view, if the symbol is displayed in a SceneView. + * @param options.spatialReference The spatial reference of the view in which the symbol is displayed. + * @param options.resolution The [resolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#resolution) of the view at which the symbol is displayed. + * + */ + getDisplayedSymbol(symbol: Graphic, options?: symbolUtilsGetDisplayedSymbolOptions): IPromise; + /** + * Generates a preview image of a given symbol that can be displayed in a custom widget or other DOM element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + * + * @param symbol The symbol for which to generate a preview image. + * @param options Formatting options for the symbol preview image. + * @param options.node The parent node to append to the symbol. + * @param options.size The size of the symbol preview in points. + * @param options.maxSize The maximum size of the symbol preview in points. + * @param options.opacity The opacity of the layer represented by the `symbol`. + * @param options.scale Indicates whether to scale the symbol preview. + * @param options.disableUpsampling Indicates whether to disable upsampling for raster images. + * @param options.symbolConfig For "tall" symbols in portrait view, then the `tall` value should be used here. + * @param options.rotation The rotation of the symbol. + * + */ + renderPreviewHTML(symbol: Symbol, options?: symbolUtilsRenderPreviewHTMLOptions): IPromise; + } + + export const symbolUtils: symbolUtils; + + export interface symbolUtilsGetDisplayedSymbolOptions extends Object { + /** + * The [view scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) at which the symbol is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + scale?: number; + /** + * The [viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode) of the view, if the symbol is displayed in a SceneView. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + viewingMode?: string; + /** + * The spatial reference of the view in which the symbol is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + spatialReference?: SpatialReference; + /** + * The [resolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#resolution) of the view at which the symbol is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + resolution?: number; + } + + export interface symbolUtilsRenderPreviewHTMLOptions extends Object { + /** + * The parent node to append to the symbol. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + node?: HTMLElement; + /** + * The size of the symbol preview in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + size?: number; + /** + * The maximum size of the symbol preview in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + maxSize?: number; + /** + * The opacity of the layer represented by the `symbol`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + opacity?: number; + /** + * Indicates whether to scale the symbol preview. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + scale?: boolean; + /** + * Indicates whether to disable upsampling for raster images. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + disableUpsampling?: boolean; + /** + * For "tall" symbols in portrait view, then the `tall` value should be used here. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + symbolConfig?: string; + /** + * The rotation of the symbol. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + rotation?: string; + } + interface Symbol extends Accessor, JSONSupport { /** - * The color of the symbol. This can be autocast with a named string; hex string; array of rgb or rgba values; an object with `r`, `g`, `b`, and `a` properties; or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the symbol. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html#color) * @@ -30896,7 +33796,7 @@ declare namespace __esri { interface SymbolProperties { /** - * The color of the symbol. This can be autocast with a named string; hex string; array of rgb or rgba values; an object with `r`, `g`, `b`, and `a` properties; or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the symbol. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html#color) * @@ -31098,7 +33998,8 @@ declare namespace __esri { */ rotated: boolean; /** - * The text string to display in the view. + * The text string to display in the view. Long text strings will be split into multiple lines. The maximum length of each line is equal to this formula: (512 * [font.size](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#size)) / 24. + * > **Known Limitations** This property only applies when TextSymbol is used to define the symbol property of a [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html), and not for labelling purposes. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text) */ @@ -31240,7 +34141,8 @@ declare namespace __esri { */ rotated?: boolean; /** - * The text string to display in the view. + * The text string to display in the view. Long text strings will be split into multiple lines. The maximum length of each line is equal to this formula: (512 * [font.size](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#size)) / 24. + * > **Known Limitations** This property only applies when TextSymbol is used to define the symbol property of a [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html), and not for labelling purposes. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text) */ @@ -31363,7 +34265,7 @@ declare namespace __esri { export interface TextSymbol3DLayerHaloProperties extends Object { /** - * The color of the halo. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the halo. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html#halo) * @@ -31382,7 +34284,7 @@ declare namespace __esri { export interface TextSymbol3DLayerHalo extends AnonymousAccessor { /** - * The color of the halo. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the halo. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html#halo) * @@ -32141,7 +35043,7 @@ declare namespace __esri { * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - checkJobStatus(jobId: string, requestOptions?: any): IPromise; + checkJobStatus(jobId: string, requestOptions?: any): IPromise; /** * Sends a request to the server to execute a synchronous GP task. * @@ -32222,7 +35124,7 @@ declare namespace __esri { * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - submitJob(params: any, requestOptions?: any): IPromise; + submitJob(params: any, requestOptions?: any): IPromise; } interface GeoprocessorConstructor { @@ -32784,50 +35686,6 @@ declare namespace __esri { gdbVersion?: string; } - /** - * The AttachmentInfo returns information about attachments associated with a feature. This resource is available only if the [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) has attachments. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - export interface QueryTaskAttachmentInfo extends Object { - /** - * The content type of the attachment. For example, `image/jpeg`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/query-attachments-feature-service-layer-.htm) for more information on supported attachment types. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - contentType: string; - /** - * The identifier for the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - id: number; - /** - * The name of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - name: string; - /** - * The parent or the feature object id of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - parentObjectId: number; - /** - * The size of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - size: number; - /** - * The URL of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - url: string; - } - interface RouteTask extends Task { /** * Solves the route against the route layer with the route parameters. @@ -32956,6 +35814,93 @@ declare namespace __esri { score?: number; } + interface AlgorithmicColorRamp extends ColorRamp { + /** + * The algorithm used to generate the colors between the `fromColor` and `toColor`. Each algorithm uses different methods for generating the intervening colors. + * + * Possible Value | Description + * ---------------|------------ + * cie-lab | Blends the from and to colors without traversing the intervening hue space. + * lab-lch | The hue, saturation, value (hsv) algorithm is a linear traverse of colors between pairs: Color 1 H to Color 2 H, Color 1 S to Color 2 S, and Color 1 V to Color 2 V. + * hsv | The lab-lch algorithm is very similar to the cie-lab but does not seek the shortest path between colors. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#algorithm) + */ + algorithm: "cie-lab" | "lab-lch" | "hsv"; + /** + * The first color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#fromColor) + */ + fromColor: Color; + /** + * The last color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#toColor) + */ + toColor: Color; + /** + * A string value representing the color ramp type. This value is always `algorithmic`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#type) + * + * @default algorithmic + */ + readonly type: "algorithmic"; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#clone) + * + * + */ + clone(): AlgorithmicColorRamp; + } + + interface AlgorithmicColorRampConstructor { + /** + * Create an algorithmic color ramp to define the range of colors used in the renderer generated by the GenerateRendererTask. The algorithmic color ramp is defined by specifying two colors and the algorithm used to traverse the intervening color spaces. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html) + */ + + new (properties?: AlgorithmicColorRampProperties): AlgorithmicColorRamp; + + fromJSON(json: any): AlgorithmicColorRamp; + } + + export const AlgorithmicColorRamp: AlgorithmicColorRampConstructor; + + interface AlgorithmicColorRampProperties extends ColorRampProperties { + /** + * The algorithm used to generate the colors between the `fromColor` and `toColor`. Each algorithm uses different methods for generating the intervening colors. + * + * Possible Value | Description + * ---------------|------------ + * cie-lab | Blends the from and to colors without traversing the intervening hue space. + * lab-lch | The hue, saturation, value (hsv) algorithm is a linear traverse of colors between pairs: Color 1 H to Color 2 H, Color 1 S to Color 2 S, and Color 1 V to Color 2 V. + * hsv | The lab-lch algorithm is very similar to the cie-lab but does not seek the shortest path between colors. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#algorithm) + */ + algorithm?: "cie-lab" | "lab-lch" | "hsv"; + /** + * The first color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#fromColor) + */ + fromColor?: Color; + /** + * The last color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#toColor) + */ + toColor?: Color; + } + interface AreasAndLengthsParameters extends Accessor { /** * The area unit in which areas of polygons will be calculated. Use the strings listed below or [any other valid area unit](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.AreaUnit.Code.ACRE). **Possible Values:** acres | hectares | square-miles | square-kilometers | square-meters | square-feet | square-yards @@ -33046,12 +35991,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#attachmentTypes) */ attachmentTypes: string[]; - /** - * The definition expression to be applied to the layer. Only features that satisfy the definition expression and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#definitionExpression) - */ - definitionExpression: string; /** * An array of globalIds for the features in the layer being queried. The query results will return attachments only for specified global ids. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33070,6 +36009,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) */ objectIds: number[]; + /** + * If `true`, the [exif information](http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf) for the attachment will be included in [attachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#returnMetadata) + * + * @default false + */ + returnMetadata: boolean; /** * The file size of the attachment is specified in bytes. You can enter a file size range [1000,15000] to query for attachments. The query result will return all attachments within the specified file size range (1000 - 15000). Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33082,6 +36029,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#start) */ start: number; + /** + * The `where` clause to be applied to the layer. Only features that satisfy the `where` clause and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#where) + */ + where: string; /** * Creates a deep clone of AttachmentQuery object. @@ -33095,7 +36048,7 @@ declare namespace __esri { interface AttachmentQueryConstructor { /** - * This class defines parameters for executing queries for feature attachments from a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Once an AttachmentQuery object's properties are defined, it can then be passed into the [QueryTask.executeAttachmentQuery()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeAttachmentQuery) or [FeatureLayer.queryAttachments()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryAttachments) methods, which will return attachmentInfos grouped by the source feature objectIds. + * This class defines parameters for executing queries for feature attachments from a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Once an AttachmentQuery object's properties are defined, it can then be passed into the [QueryTask.executeAttachmentQuery()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeAttachmentQuery) or [FeatureLayer.queryAttachments()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryAttachments) methods, which will return [attachmentInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) grouped by the source feature objectIds. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html) */ @@ -33114,12 +36067,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#attachmentTypes) */ attachmentTypes?: string[]; - /** - * The definition expression to be applied to the layer. Only features that satisfy the definition expression and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#definitionExpression) - */ - definitionExpression?: string; /** * An array of globalIds for the features in the layer being queried. The query results will return attachments only for specified global ids. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33138,6 +36085,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) */ objectIds?: number[]; + /** + * If `true`, the [exif information](http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf) for the attachment will be included in [attachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#returnMetadata) + * + * @default false + */ + returnMetadata?: boolean; /** * The file size of the attachment is specified in bytes. You can enter a file size range [1000,15000] to query for attachments. The query result will return all attachments within the specified file size range (1000 - 15000). Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33150,6 +36105,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#start) */ start?: number; + /** + * The `where` clause to be applied to the layer. Only features that satisfy the `where` clause and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#where) + */ + where?: string; } interface BufferParameters extends Accessor { @@ -33257,7 +36218,7 @@ declare namespace __esri { unit?: string; } - interface ClosestFacilityParameters extends Accessor { + interface ClosestFacilityParameters extends Accessor, JSONSupport { /** * The list of network attribute names to be accumulated with the analysis, i.e., which attributes should be returned as part of the response. * @@ -33293,13 +36254,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsLengthUnits) */ - directionsLengthUnits: string; + directionsLengthUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. The default value is standard. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsOutputType) */ - directionsOutputType: string; + directionsOutputType: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -33316,8 +36289,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements: boolean; /** @@ -33349,7 +36320,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits: string; + outputGeometryPrecisionUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your RouteTask. * @@ -33363,7 +36346,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputLines) */ - outputLines: string; + outputLines: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known id of the spatial reference or the spatial reference object for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the map. * @@ -33399,7 +36382,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#restrictUTurns) */ - restrictUTurns: string; + restrictUTurns: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * Indicates whether the service should generate driving directions for each route. * @@ -33452,8 +36435,6 @@ declare namespace __esri { * When `true`, closest facility routes will be generated and returned in the route property of each [ClosestFacilitySolveResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilitySolveResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#returnRoutes) - * - * @default true */ returnRoutes: boolean; /** @@ -33467,7 +36448,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#timeOfDayUsage) */ - timeOfDayUsage: string; + timeOfDayUsage: "start" | "end"; /** * Options for traveling to or from the facility. Default values are defined by the network layer. * @@ -33479,13 +36460,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ - travelDirection: string; + travelDirection: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelMode) */ - travelMode: any; + travelMode: string; /** * If `true`, the hierarchy attribute for the network will be used in analysis. The default is defined in the routing network layer used by the [ClosestFacilityTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ClosestFacilityTask.html). * @@ -33494,15 +36475,6 @@ declare namespace __esri { * @default false */ useHierarchy: boolean; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface ClosestFacilityParametersConstructor { @@ -33513,6 +36485,8 @@ declare namespace __esri { */ new (properties?: ClosestFacilityParametersProperties): ClosestFacilityParameters; + + fromJSON(json: any): ClosestFacilityParameters; } export const ClosestFacilityParameters: ClosestFacilityParametersConstructor; @@ -33553,13 +36527,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsLengthUnits) */ - directionsLengthUnits?: string; + directionsLengthUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. The default value is standard. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsOutputType) */ - directionsOutputType?: string; + directionsOutputType?: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -33576,8 +36562,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements?: boolean; /** @@ -33609,7 +36593,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits?: string; + outputGeometryPrecisionUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your RouteTask. * @@ -33623,7 +36619,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputLines) */ - outputLines?: string; + outputLines?: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known id of the spatial reference or the spatial reference object for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the map. * @@ -33659,7 +36655,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#restrictUTurns) */ - restrictUTurns?: string; + restrictUTurns?: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * Indicates whether the service should generate driving directions for each route. * @@ -33712,8 +36708,6 @@ declare namespace __esri { * When `true`, closest facility routes will be generated and returned in the route property of each [ClosestFacilitySolveResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilitySolveResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#returnRoutes) - * - * @default true */ returnRoutes?: boolean; /** @@ -33727,7 +36721,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#timeOfDayUsage) */ - timeOfDayUsage?: string; + timeOfDayUsage?: "start" | "end"; /** * Options for traveling to or from the facility. Default values are defined by the network layer. * @@ -33739,13 +36733,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ - travelDirection?: string; + travelDirection?: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelMode) */ - travelMode?: any; + travelMode?: string; /** * If `true`, the hierarchy attribute for the network will be used in analysis. The default is defined in the routing network layer used by the [ClosestFacilityTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ClosestFacilityTask.html). * @@ -33893,9 +36887,34 @@ declare namespace __esri { routes?: GraphicProperties[]; } + interface ColorRamp extends Accessor, JSONSupport { + /** + * A string value representing the color ramp type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ColorRamp.html#type) + */ + readonly type: "algorithmic" | "multipart"; + } + + interface ColorRampConstructor { + /** + * A ColorRamp object is used to specify a range of colors that are applied to a group of symbols or pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ColorRamp.html) + */ + + new (properties?: ColorRampProperties): ColorRamp; + + fromJSON(json: any): ColorRamp; + } + + export const ColorRamp: ColorRampConstructor; + + interface ColorRampProperties {} + interface DataFile extends Accessor, JSONSupport { /** - * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the ItemID. + * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the itemID. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html#itemId) */ @@ -33918,7 +36937,7 @@ declare namespace __esri { interface DataFileProperties { /** - * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the ItemID. + * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the itemID. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html#itemId) */ @@ -33931,7 +36950,7 @@ declare namespace __esri { url?: string; } - interface DataLayer extends Accessor { + interface DataLayer extends Accessor, JSONSupport { /** * The geometry to apply to the spatial filter. The spatial relationship as specified by [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#spatialRelationship) is applied to this geometry while performing the query. * @@ -33963,31 +36982,26 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#spatialRelationship) */ spatialRelationship: string; + + type: void; /** * A where clause for the query. Any legal SQL where clause operating on the fields in the layer is allowed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#where) */ where: string; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#toJSON) - * - * - */ - toJSON(): any; } interface DataLayerConstructor { /** - * Input for properties of ClosestFacilityParameters,RouteParameters or ServiceAreaParameters. The DataLayer can be used to define the following for each paramater type: + * Input for properties of ClosestFacilityParameters, RouteParameters or ServiceAreaParameters. The DataLayer can be used to define the following for each parameter type: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html) */ new (properties?: DataLayerProperties): DataLayer; + + fromJSON(json: any): DataLayer; } export const DataLayer: DataLayerConstructor; @@ -34024,6 +37038,8 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#spatialRelationship) */ spatialRelationship?: string; + + type?: void; /** * A where clause for the query. Any legal SQL where clause operating on the fields in the layer is allowed. * @@ -34354,11 +37370,17 @@ declare namespace __esri { */ fields: Field[]; /** - * The geometry type of the FeatureSet. + * The geometry type of features in the FeatureSet. All features's geometry must be of the same type. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#geometryType) */ geometryType: string; + /** + * The [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) used to query the features. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). The query's [returnQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) must be set to `true` and the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) has to be `true` for the query to return query geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) + */ + queryGeometry: Geometry; /** * When a FeatureSet is used as input to Geoprocessor, the spatial reference is set to the map's spatial reference by default. This value can be changed. When a FeatureSet is returned from a task, the value is the result as returned from the server. * @@ -34401,11 +37423,17 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The geometry type of the FeatureSet. + * The geometry type of features in the FeatureSet. All features's geometry must be of the same type. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#geometryType) */ geometryType?: string; + /** + * The [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) used to query the features. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). The query's [returnQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) must be set to `true` and the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) has to be `true` for the query to return query geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) + */ + queryGeometry?: GeometryProperties; /** * When a FeatureSet is used as input to Geoprocessor, the spatial reference is set to the map's spatial reference by default. This value can be changed. When a FeatureSet is returned from a task, the value is the result as returned from the server. * @@ -35503,6 +38531,49 @@ declare namespace __esri { units?: string; } + interface MultipartColorRamp extends ColorRamp { + /** + * Define an array of algorithmic color ramps used to generate the multi part ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#colorRamps) + */ + colorRamps: AlgorithmicColorRamp[]; + /** + * A string value representing the color ramp type. This value is always `multipart`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#type) + * + * @default multipart + */ + readonly type: "multipart"; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#clone) + * + * + */ + clone(): MultipartColorRamp; + } + + interface MultipartColorRampConstructor { + new (properties?: MultipartColorRampProperties): MultipartColorRamp; + + fromJSON(json: any): MultipartColorRamp; + } + + export const MultipartColorRamp: MultipartColorRampConstructor; + + interface MultipartColorRampProperties extends ColorRampProperties { + /** + * Define an array of algorithmic color ramps used to generate the multi part ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#colorRamps) + */ + colorRamps?: AlgorithmicColorRampProperties[]; + } + interface NAMessage extends Accessor, JSONSupport { /** * A description of the network analyst message. @@ -35511,11 +38582,11 @@ declare namespace __esri { */ description: string; /** - * The network analyst message type. + * The network analyst message type. **Possible Values:** informative | process-definition | process-start | process-stop | warning | error | empty | abort * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-NAMessage.html#type) */ - type: any; + type: string; } interface NAMessageConstructor { @@ -35534,11 +38605,11 @@ declare namespace __esri { */ description?: string; /** - * The network analyst message type. + * The network analyst message type. **Possible Values:** informative | process-definition | process-start | process-stop | warning | error | empty | abort * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-NAMessage.html#type) */ - type?: any; + type?: string; } interface OffsetParameters extends Accessor { @@ -35989,7 +39060,7 @@ declare namespace __esri { */ scalebarUnit?: string; /** - * An array of [LegendLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LegendLayer.html) containing the id's of the layers that will be included in the legend. If `legendLayers` is not specified, all operational layers (non-tiled layers) will be present in the legend. To specify that no layers will be included in the legend set `legendLayer = []`. + * An array of [LegendLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LegendLayer.html) containing the id's of the layers that will be included in the legend. If `legendLayers` is not specified, all operational layers (non-tiled layers) except [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) will be present in the legend. To specify that no layers will be included in the legend set `legendLayer = []`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#layoutOptions) */ @@ -36288,6 +39359,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnM) */ returnM: boolean; + /** + * If `true`, the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) will be returned with the query results. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) and if the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) + * + * @default false + */ + returnQueryGeometry: boolean; /** * If `true`, and [returnGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnGeometry) is `true`, then z-values are included in the geometry. * @@ -36295,20 +39374,12 @@ declare namespace __esri { */ returnZ: boolean; /** - * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). See the [Types of spatial relationships that can be validated](https://desktop.arcgis.com/en/arcmap/latest/extensions/data-reviewer/types-of-spatial-relationships-that-can-be-validated.htm) document for more details about each spatial relationship. The possible values are listed in the table below: + * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. * - * Value | Description - * ------|------------- - * intersects | Returns features from the layer or layer view that intersect the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * contains | Returns features from the layer or layer view that are completely contained by the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * crosses | Returns features from the layer or layer view that cross the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * envelope-intersects | Returns features from the layer or layer view that intersect the envelope (or extent) of the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * index-intersects | The envelope of the query feature class intersects the index entry for the target feature class. - * overlaps | Returns features from the layer or layer view that overlap the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * touches | Returns features from the layer or layer view that touch the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * within | Returns features from the layer or layer view that are completely within the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * relation | Allows specification of any relationship defined using the [Shape Comparison Language](http://resources.esri.com/help/9.3/arcgisengine/dotnet/concepts_start.htm#40de6491-9b2d-440d-848b-2609efcd46b1.htm). If this value is specified, then the [relationParameter](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#relationParameter) must also be specified. * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) * @@ -36340,11 +39411,17 @@ declare namespace __esri { */ text: string; /** - * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. if `unit` is not specified, the unit is derived from the layer or layer view's [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html). - * > **Known Limitations** For service-based queries, this parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. - * **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * A time extent for a temporal query against [time-aware layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#timeInfo). For example, it can be used to discover all crimes that occurred during the night shift from 10 PM to 6 AM on a particular date. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#timeExtent) + */ + timeExtent: TimeExtent; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. If `units` is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service data spatial reference. For service-based queries, this parameter only applies if the layer's [capabilities.query.supportsDistance](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) + * + * @default null */ units: string; /** @@ -36568,6 +39645,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnM) */ returnM?: boolean; + /** + * If `true`, the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) will be returned with the query results. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) and if the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) + * + * @default false + */ + returnQueryGeometry?: boolean; /** * If `true`, and [returnGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnGeometry) is `true`, then z-values are included in the geometry. * @@ -36575,20 +39660,12 @@ declare namespace __esri { */ returnZ?: boolean; /** - * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). See the [Types of spatial relationships that can be validated](https://desktop.arcgis.com/en/arcmap/latest/extensions/data-reviewer/types-of-spatial-relationships-that-can-be-validated.htm) document for more details about each spatial relationship. The possible values are listed in the table below: + * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. * - * Value | Description - * ------|------------- - * intersects | Returns features from the layer or layer view that intersect the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * contains | Returns features from the layer or layer view that are completely contained by the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * crosses | Returns features from the layer or layer view that cross the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * envelope-intersects | Returns features from the layer or layer view that intersect the envelope (or extent) of the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * index-intersects | The envelope of the query feature class intersects the index entry for the target feature class. - * overlaps | Returns features from the layer or layer view that overlap the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * touches | Returns features from the layer or layer view that touch the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * within | Returns features from the layer or layer view that are completely within the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * relation | Allows specification of any relationship defined using the [Shape Comparison Language](http://resources.esri.com/help/9.3/arcgisengine/dotnet/concepts_start.htm#40de6491-9b2d-440d-848b-2609efcd46b1.htm). If this value is specified, then the [relationParameter](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#relationParameter) must also be specified. * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) * @@ -36620,11 +39697,17 @@ declare namespace __esri { */ text?: string; /** - * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. if `unit` is not specified, the unit is derived from the layer or layer view's [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html). - * > **Known Limitations** For service-based queries, this parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. - * **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * A time extent for a temporal query against [time-aware layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#timeInfo). For example, it can be used to discover all crimes that occurred during the night shift from 10 PM to 6 AM on a particular date. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#timeExtent) + */ + timeExtent?: TimeExtentProperties; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. If `units` is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service data spatial reference. For service-based queries, this parameter only applies if the layer's [capabilities.query.supportsDistance](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) + * + * @default null */ units?: string; /** @@ -36760,7 +39843,7 @@ declare namespace __esri { */ geometries2: Geometry[]; /** - * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParamater` parameter describes the spatial relationship and must be specified. + * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParameter` parameter describes the spatial relationship and must be specified. * * Value | Description * ------|------------ @@ -36818,7 +39901,7 @@ declare namespace __esri { */ geometries2?: GeometryProperties[]; /** - * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParamater` parameter describes the spatial relationship and must be specified. + * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParameter` parameter describes the spatial relationship and must be specified. * * Value | Description * ------|------------ @@ -36848,12 +39931,6 @@ declare namespace __esri { } interface RelationshipQuery extends Accessor, JSONSupport { - /** - * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) - */ - definitionExpression: string; /** * Specify the geodatabase version to query. * @@ -36910,6 +39987,12 @@ declare namespace __esri { * @default false */ returnGeometry: boolean; + /** + * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#where) + */ + where: string; /** * Creates a deep clone of RelationshipQuery object. @@ -36930,12 +40013,6 @@ declare namespace __esri { export const RelationshipQuery: RelationshipQueryConstructor; interface RelationshipQueryProperties { - /** - * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) - */ - definitionExpression?: string; /** * Specify the geodatabase version to query. * @@ -36992,9 +40069,15 @@ declare namespace __esri { * @default false */ returnGeometry?: boolean; + /** + * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#where) + */ + where?: string; } - interface RouteParameters extends Accessor { + interface RouteParameters extends Accessor, JSONSupport { /** * The list of network attribute names to be accumulated with the analysis. For example, which attributes should be returned as part of the response. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). You can specify any attribute names listed in the Service Directory under `Network Dataset -> Network Attributes` as `Usage Type: esriNAUTCost`. See also [Understanding the network attribute](http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000000m000000). * @@ -37006,7 +40089,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#attributeParameterValues) */ - attributeParameterValues: AttributeParamValue; + attributeParameterValues: AttributeParamValue[]; /** * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. * @@ -37024,15 +40107,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsLengthUnits) */ - directionsLengthUnits: string; + directionsLengthUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsOutputType) - * - * @default standard */ - directionsOutputType: string; + directionsOutputType: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -37049,8 +40142,6 @@ declare namespace __esri { * If `true`, avoids network elements restricted by barriers or restrictions specified in [restrictionAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictionAttributes). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements: boolean; /** @@ -37090,21 +40181,45 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits: string; + outputGeometryPrecisionUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** - * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). **Possible Values:** none | straight | true-shape | true-shape-with-measure + * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). + * + * Possible Value | Description + * ---------------|------------ + * none | No lines are returned + * straight | Only returns straight lines + * true-shape | Return the true shape of the lines + * true-shape-with-measure | Return the true shape of the lines with their measurements + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputLines) - * - * @default true-shape */ - outputLines: string; + outputLines: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If not specified, the geometries are returned in the spatial reference of the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outSpatialReference) */ - outSpatialReference: SpatialReference; + outSpatialReference: SpatialReference | string; + /** + * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#pointBarriers) + */ + pointBarriers: DataLayer | FeatureSet; /** * The set of polygon barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional `url` property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the `features` or `url` property should be specified. * @@ -37140,7 +40255,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictUTurns) */ - restrictUTurns: string; + restrictUTurns: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, barriers are returned with the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * @@ -37150,7 +40265,7 @@ declare namespace __esri { */ returnBarriers: boolean; /** - * If `true`, barriers are returned in the [directions property of each RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html#directions). + * Indicates whether the service should generate driving directions for each route. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnDirections) * @@ -37177,24 +40292,18 @@ declare namespace __esri { * If `true`, routes are generated and returned in the route property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnRoutes) - * - * @default true */ returnRoutes: boolean; /** * If `true`, stops are returned in the stops property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnStops) - * - * @default false */ returnStops: boolean; /** * If `true`, `z` values are returned in the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnZ) - * - * @default true */ returnZ: boolean; /** @@ -37220,32 +40329,29 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#travelMode) */ - travelMode: any; + travelMode: string; /** * If `true`, the hierarchy attribute for the network should be used in analysis. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useHierarchy) + * + * @default false */ useHierarchy: boolean; /** * A useful feature of the [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html) is the ability to constrain stop visits to certain times of day, or "time windows". If you were required to deliver orders to four homes and each customer was available during a limited time period during the day, the route task could help you find the most efficient path for making all the deliveries. Time windows are treated as a "soft" constraint. This means that although the solver attempts to honor time windows, if necessary, it will violate the time windows of some stops in order to reach them. Remember, the stops will be visited in the order they were added unless you set `RouteParameters.findBestSequence = true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useTimeWindows) + * + * @default false */ useTimeWindows: boolean; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface RouteParametersConstructor { new (properties?: RouteParametersProperties): RouteParameters; + + fromJSON(json: any): RouteParameters; } export const RouteParameters: RouteParametersConstructor; @@ -37262,7 +40368,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#attributeParameterValues) */ - attributeParameterValues?: AttributeParamValue; + attributeParameterValues?: AttributeParamValue[]; /** * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. * @@ -37280,15 +40386,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsLengthUnits) */ - directionsLengthUnits?: string; + directionsLengthUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsOutputType) - * - * @default standard */ - directionsOutputType?: string; + directionsOutputType?: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -37305,8 +40421,6 @@ declare namespace __esri { * If `true`, avoids network elements restricted by barriers or restrictions specified in [restrictionAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictionAttributes). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements?: boolean; /** @@ -37346,21 +40460,45 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits?: string; + outputGeometryPrecisionUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** - * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). **Possible Values:** none | straight | true-shape | true-shape-with-measure + * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). + * + * Possible Value | Description + * ---------------|------------ + * none | No lines are returned + * straight | Only returns straight lines + * true-shape | Return the true shape of the lines + * true-shape-with-measure | Return the true shape of the lines with their measurements + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputLines) - * - * @default true-shape */ - outputLines?: string; + outputLines?: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If not specified, the geometries are returned in the spatial reference of the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outSpatialReference) */ - outSpatialReference?: SpatialReferenceProperties; + outSpatialReference?: SpatialReferenceProperties | string; + /** + * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#pointBarriers) + */ + pointBarriers?: DataLayerProperties | FeatureSetProperties; /** * The set of polygon barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional `url` property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the `features` or `url` property should be specified. * @@ -37396,7 +40534,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictUTurns) */ - restrictUTurns?: string; + restrictUTurns?: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, barriers are returned with the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * @@ -37406,7 +40544,7 @@ declare namespace __esri { */ returnBarriers?: boolean; /** - * If `true`, barriers are returned in the [directions property of each RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html#directions). + * Indicates whether the service should generate driving directions for each route. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnDirections) * @@ -37433,24 +40571,18 @@ declare namespace __esri { * If `true`, routes are generated and returned in the route property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnRoutes) - * - * @default true */ returnRoutes?: boolean; /** * If `true`, stops are returned in the stops property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnStops) - * - * @default false */ returnStops?: boolean; /** * If `true`, `z` values are returned in the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnZ) - * - * @default true */ returnZ?: boolean; /** @@ -37476,17 +40608,21 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#travelMode) */ - travelMode?: any; + travelMode?: string; /** * If `true`, the hierarchy attribute for the network should be used in analysis. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useHierarchy) + * + * @default false */ useHierarchy?: boolean; /** * A useful feature of the [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html) is the ability to constrain stop visits to certain times of day, or "time windows". If you were required to deliver orders to four homes and each customer was available during a limited time period during the day, the route task could help you find the most efficient path for making all the deliveries. Time windows are treated as a "soft" constraint. This means that although the solver attempts to honor time windows, if necessary, it will violate the time windows of some stops in order to reach them. Remember, the stops will be visited in the order they were added unless you set `RouteParameters.findBestSequence = true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useTimeWindows) + * + * @default false */ useTimeWindows?: boolean; } @@ -37579,7 +40715,7 @@ declare namespace __esri { stops?: GraphicProperties[]; } - interface ServiceAreaParameters extends Accessor { + interface ServiceAreaParameters extends Accessor, JSONSupport { /** * The list of network attribute names to be accumulated with the analysis (i.e. which attributes should be returned as part of the response). The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). You can specify any attributes names listed in the Service Directory under `Network Dataset > Network Attributes` as `Usage Type: esriNAUTCost`. * @@ -37602,8 +40738,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements: boolean; /** @@ -37643,7 +40777,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits: string; + outputGeometryPrecisionUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -37657,13 +40803,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) */ - outputLines: string; + outputLines: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The type of output polygons to be generated in the result. The default is as defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). **Possible Values:** none | simplified | detailed * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputPolygons) */ - outputPolygons: string; + outputPolygons: "none" | "simplified" | "detailed"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the view. * @@ -37723,7 +40869,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#restrictUTurns) */ - restrictUTurns: string; + restrictUTurns: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, facilities will be returned with the analysis results. * @@ -37789,13 +40935,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelDirection) */ - travelDirection: string; + travelDirection: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelMode) */ - travelMode: any; + travelMode: string; /** * If `true`, the outermost polygon (at the maximum break value) will be trimmed. The default is defined in the network analysis layer in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -37815,22 +40961,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#trimPolygonDistanceUnits) */ - trimPolygonDistanceUnits: string; + trimPolygonDistanceUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * When `true`, the hierarchy attributes for the network will be used in the analysis. The default value is defined in the network layer. `useHierarchy` cannot be used in conjunction with [outputLines](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines). Requires an ArcGIS Server service version 10.1 or greater. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#useHierarchy) */ useHierarchy: boolean; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface ServiceAreaParametersConstructor { @@ -37841,6 +40990,8 @@ declare namespace __esri { */ new (properties?: ServiceAreaParametersProperties): ServiceAreaParameters; + + fromJSON(json: any): ServiceAreaParameters; } export const ServiceAreaParameters: ServiceAreaParametersConstructor; @@ -37868,8 +41019,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements?: boolean; /** @@ -37909,7 +41058,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits?: string; + outputGeometryPrecisionUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -37923,13 +41084,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) */ - outputLines?: string; + outputLines?: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The type of output polygons to be generated in the result. The default is as defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). **Possible Values:** none | simplified | detailed * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputPolygons) */ - outputPolygons?: string; + outputPolygons?: "none" | "simplified" | "detailed"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the view. * @@ -37989,7 +41150,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#restrictUTurns) */ - restrictUTurns?: string; + restrictUTurns?: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, facilities will be returned with the analysis results. * @@ -38055,13 +41216,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelDirection) */ - travelDirection?: string; + travelDirection?: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelMode) */ - travelMode?: any; + travelMode?: string; /** * If `true`, the outermost polygon (at the maximum break value) will be trimmed. The default is defined in the network analysis layer in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -38081,7 +41242,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#trimPolygonDistanceUnits) */ - trimPolygonDistanceUnits?: string; + trimPolygonDistanceUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * When `true`, the hierarchy attributes for the network will be used in the analysis. The default value is defined in the network layer. `useHierarchy` cannot be used in conjunction with [outputLines](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines). Requires an ArcGIS Server service version 10.1 or greater. * @@ -43129,6 +46302,67 @@ declare namespace __esri { user: string; } + interface TimeExtent extends JSONSupport { + /** + * The end time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) + * + * @default null + */ + end: Date; + /** + * The start time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) + * + * @default null + */ + start: Date; + + /** + * Creates a deep clone of TimeExtent object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#clone) + * + * + */ + clone(): TimeExtent; + } + + interface TimeExtentConstructor { + /** + * A period of time with definitive [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) dates. The time extent is used to [display](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) or [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) features that fall within the specified time period. To represent a single point in time set the [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) times to the same time value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html) + */ + + new (properties?: TimeExtentProperties): TimeExtent; + + fromJSON(json: any): TimeExtent; + } + + export const TimeExtent: TimeExtentConstructor; + + interface TimeExtentProperties { + /** + * The end time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) + * + * @default null + */ + end?: DateProperties; + /** + * The start time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) + * + * @default null + */ + start?: DateProperties; + } + interface Viewpoint extends Accessor, JSONSupport { /** * The viewpoint camera (3D only). @@ -43208,404 +46442,7 @@ declare namespace __esri { targetGeometry?: GeometryProperties; } - interface Draw extends Accessor { - /** - * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) - */ - activeAction: DrawAction; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#view) - */ - view: MapView; - - /** - * Complete the current active drawing. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#complete) - * - * - */ - complete(): void; - /** - * Creates an instance of the requested draw action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) - * - * @param drawAction - * Name of the [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) to create. See the table below for a list of possible values and type of draw action it creates. **Possible Values:** point | multipoint | polyline | polygon | rectangle | circle | ellipse - * - * Geometry type | Draw action instance - * ------------- | -------------------- - * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html) - * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html) - * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html) - * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html) - * rectangle, circle, ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html) - * @param drawOptions Object of the drawing options for the geometry to be created. - * @param drawOptions.mode - * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. - * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. - * click | Vertices are added when the pointer is clicked. - * - */ - create(drawAction: string, drawOptions?: DrawCreateDrawOptions): DrawAction; - /** - * Resets the drawing by clearing the active action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#reset) - * - * - */ - reset(): void; - } - - interface DrawConstructor { - /** - * The Draw class provides advanced drawing capabilities for developers who need complete control over creating temporary graphics with different geometries. For example, if you want to prevent users from drawing graphics with self-intersecting lines or overlapping polygons, then you can use this class to implement these rules. The draw experience is built upon draw actions, which use the view events to generate a set of coordinates for creating new geometries. Each geometry type has a corresponding draw action class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html) - */ - - new (properties?: DrawProperties): Draw; - } - - export const Draw: DrawConstructor; - - interface DrawProperties { - /** - * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) - */ - activeAction?: DrawActionProperties; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#view) - */ - view?: MapViewProperties; - } - - export interface DrawCreateDrawOptions extends Object { - /** - * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. - * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) - */ - mode?: string; - } - - interface DrawAction extends Accessor, Evented { - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) - */ - view: MapView; - - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) - * - * - */ - undo(): void; - } - - interface DrawActionConstructor { - /** - * DrawAction is the base class for all draw actions. DrawActions use the view events to generate a set of coordinates to create new geometries. Each serves a different purpose, allowing you to create a different type geometry such as [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), and [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) - */ - - new (properties?: DrawActionProperties): DrawAction; - } - - export const DrawAction: DrawActionConstructor; - - interface DrawActionProperties { - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) - */ - view?: MapViewProperties; - } - - interface MultipointDrawAction extends DrawAction { - /** - * Two-dimensional array of numbers representing the coordinates of each vertex that comprises the drawn geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface MultipointDrawActionConstructor { - new (properties?: MultipointDrawActionProperties): MultipointDrawAction; - } - - export const MultipointDrawAction: MultipointDrawActionConstructor; - - interface MultipointDrawActionProperties extends DrawActionProperties {} - - interface PointDrawAction extends DrawAction { - /** - * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#coordinates) - */ - readonly coordinates: number[]; - - /** - * Completes drawing the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface PointDrawActionConstructor { - new (properties?: PointDrawActionProperties): PointDrawAction; - } - - export const PointDrawAction: PointDrawActionConstructor; - - interface PointDrawActionProperties extends DrawActionProperties {} - - interface PolygonDrawAction extends DrawAction { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) - * - * @default hybrid - */ - mode: string; - /** - * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface PolygonDrawActionConstructor { - new (properties?: PolygonDrawActionProperties): PolygonDrawAction; - } - - export const PolygonDrawAction: PolygonDrawActionConstructor; - - interface PolygonDrawActionProperties extends DrawActionProperties { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) - * - * @default hybrid - */ - mode?: string; - } - - interface PolylineDrawAction extends DrawAction { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) - * - * @default hybrid - */ - mode: string; - /** - * Two-dimensional array of numbers representing the coordinates of each vertex that comprising the drawn geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the polyline geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface PolylineDrawActionConstructor { - new (properties?: PolylineDrawActionProperties): PolylineDrawAction; - } - - export const PolylineDrawAction: PolylineDrawActionConstructor; - - interface PolylineDrawActionProperties extends DrawActionProperties { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) - * - * @default hybrid - */ - mode?: string; - } - - interface SegmentDrawAction extends DrawAction { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#mode) - * - * @default freehand - */ - mode: string; - /** - * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#event:draw-complete) event. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface SegmentDrawActionConstructor { - new (properties?: SegmentDrawActionProperties): SegmentDrawAction; - } - - export const SegmentDrawAction: SegmentDrawActionConstructor; - - interface SegmentDrawActionProperties extends DrawActionProperties { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#mode) - * - * @default freehand - */ - mode?: string; - } - - /** - * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html) - */ - interface BaseLayerView2D { - /** - * References the layer this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) represents. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#layer) - */ - layer: Layer; + interface BaseLayerView2D extends LayerView { /** * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#tilesChanged) is called. * @@ -43677,7 +46514,32 @@ declare namespace __esri { tilesChanged(added: Tile[], removed: Tile[]): void; } - export const BaseLayerView2D: BaseLayerView2D; + interface BaseLayerView2DConstructor { + /** + * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html) + */ + + new (properties?: BaseLayerView2DProperties): BaseLayerView2D; + } + + export const BaseLayerView2D: BaseLayerView2DConstructor; + + interface BaseLayerView2DProperties extends LayerViewProperties { + /** + * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#tilesChanged) is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#tiles) + */ + tiles?: Tile[]; + /** + * References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) belongs to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#view) + */ + view?: MapViewProperties; + } export interface BaseLayerView2DRenderRenderParameters extends Object { /** @@ -43762,6 +46624,200 @@ declare namespace __esri { bounds: number[]; } + interface BaseLayerViewGL2D extends LayerView { + /** + * The WebGL rendering context associated to this layer view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#context) + */ + context: WebGLRenderingContext | any; + /** + * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tilesChanged) is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles) + */ + tiles: BaseLayerViewGL2DTile[]; + /** + * References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) belongs to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#view) + */ + view: MapView; + + /** + * Method called after the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) is created and right before it starts drawing the layer's content. Typically this method is implemented to start watching property changes on the layer and to initialize WebGL objects such as shaders. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#attach) + * + * + */ + attach(): void; + /** + * Method called after the layer is removed and the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) is about to be removed. Typically, this method is implemented to free resources like watchers and destroy WebGL objects such as shader programs. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#detach) + * + * + */ + detach(): void; + /** + * Method to implement that is responsible for providing objects hit at the specified screen coordinates. This method is called internally by the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) each time its [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#hitTest) + * + * @param x The x-coordinate in screen space of the desired hit. + * @param y The y-coordinate in screen space of the desired hit. + * + */ + hitTest(x: number, y: number): IPromise; + /** + * The method to implement that is responsible of drawing the content of the layer. This method is called every time the MapView's state changes, or if [requestRender()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#requestRender) has been called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + * + * @param renderParameters + * @param renderParameters.context The WebGL or WebGL 2 context. Its concrete type depends on system configuration. The initial state is guaranteed to be the default one. + * @param renderParameters.stationary The stationary state of the `MapView`. + * @param renderParameters.state The object that describes view state. + * + */ + render(renderParameters: BaseLayerViewGL2DRenderRenderParameters): void; + /** + * The [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) can call this method to ask the MapView to schedule a new rendering frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#requestRender) + * + * + */ + requestRender(): void; + /** + * Method to implement, which notifies of tiles being added or removed for the current view state. This function can be implemented to start and stop fetching new data, or allocate and dispose resources. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tilesChanged) + * + * @param added The tile objects added for the current view viewport. + * @param removed The tile objects removed from the view viewport. + * + */ + tilesChanged(added: BaseLayerViewGL2DTile[], removed: BaseLayerViewGL2DTile[]): void; + } + + interface BaseLayerViewGL2DConstructor { + /** + * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). In contrast to the related class [BaseLayerView2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html), this one exposes [WebGL](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext) rendering capabilities. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html) + */ + + new (properties?: BaseLayerViewGL2DProperties): BaseLayerViewGL2D; + } + + export const BaseLayerViewGL2D: BaseLayerViewGL2DConstructor; + + interface BaseLayerViewGL2DProperties extends LayerViewProperties { + /** + * The WebGL rendering context associated to this layer view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#context) + */ + context?: WebGLRenderingContext | any; + /** + * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tilesChanged) is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles) + */ + tiles?: BaseLayerViewGL2DTile[]; + /** + * References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) belongs to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#view) + */ + view?: MapViewProperties; + } + + export interface BaseLayerViewGL2DRenderRenderParameters extends Object { + /** + * The WebGL or WebGL 2 context. Its concrete type depends on system configuration. The initial state is guaranteed to be the default one. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + */ + context: WebGLRenderingContext | any; + /** + * The stationary state of the `MapView`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + */ + stationary: boolean; + /** + * The object that describes view state. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + */ + state: ViewState; + } + + /** + * Represents a tile reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + export interface BaseLayerViewGL2DTile extends Object { + /** + * The tile string identifier in the format `level/row/col/world` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + id: string; + /** + * The level identifier of the [LOD](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LOD.html) to which the tile belongs + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + level: number; + /** + * The row identifier. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + row: number; + /** + * The column identifier. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + col: number; + /** + * When the projection allows world wrapping (e.g. Web Mercator), identifies the instance of the world this tile's `level`/`row`/`col`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + world: number; + /** + * The number of map units per pixel in the tile. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + resolution: number; + /** + * The map scale at the tile's level. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + scale: number; + /** + * The coordinates of the top-left corner of the tile as an array of two numbers. The coordinates are in un-normalized map units. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + coords: number[]; + /** + * The bounds of the tile as an array of four numbers that be readily converted to an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + bounds: number[]; + } + interface ViewState { /** * Represents the view's center point as an array of two numbers `[x, y]`. @@ -44138,7 +47194,7 @@ declare namespace __esri { bindRenderTarget(): void; } - export type RenderContextCallback = (context: RenderContext) => void; + export type RenderContextCallback = (context?: RenderContext) => void; /** * Describes the lighting used by [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), derived from its sun lighting model. It consists of a directional Lambertian (`diffuse`) and a constant (`ambient`) term, which should be treated in the sense of the [Phong Reflection Model](https://en.wikipedia.org/wiki/Phong_reflection_model). @@ -44402,6 +47458,398 @@ declare namespace __esri { ui?: DefaultUIProperties; } + interface Draw extends Accessor { + /** + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#activeAction) + */ + activeAction: DrawAction; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#view) + */ + view: MapView; + + /** + * Complete the current active drawing. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#complete) + * + * + */ + complete(): void; + /** + * Creates an instance of the requested draw action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) + * + * @param drawAction + * Name of the [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html) to create. See the table below for a list of possible values and type of draw action it creates. **Possible Values:** point | multipoint | polyline | polygon | rectangle | circle | ellipse + * + * Geometry type | Draw action instance + * ------------- | -------------------- + * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html) + * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html) (only supported in [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html)) + * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html) + * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html) + * rectangle, circle, ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html) + * @param drawOptions Object of the drawing options for the geometry to be created. + * @param drawOptions.mode + * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. + * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. + * click | Vertices are added when the pointer is clicked. + * + */ + create(drawAction: string, drawOptions?: DrawCreateDrawOptions): DrawAction; + /** + * Resets the drawing by clearing the active action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#reset) + * + * + */ + reset(): void; + } + + interface DrawConstructor { + /** + * The Draw class provides advanced drawing capabilities for developers who need complete control over creating temporary graphics with different geometries. For example, if you want to prevent users from drawing graphics with self-intersecting lines or overlapping polygons, then you can use this class to implement these rules. The draw experience is built upon draw actions, which use the view events to generate a set of coordinates for creating new geometries. Each geometry type has a corresponding draw action class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html) + */ + + new (properties?: DrawProperties): Draw; + } + + export const Draw: DrawConstructor; + + interface DrawProperties { + /** + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#activeAction) + */ + activeAction?: DrawActionProperties; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#view) + */ + view?: MapViewProperties; + } + + export interface DrawCreateDrawOptions extends Object { + /** + * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. + * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) + */ + mode?: string; + } + + interface DrawAction extends Accessor, Evented { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#view) + */ + view: MapView; + + /** + * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#redo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canRedo) + * + * + */ + canRedo(): boolean; + /** + * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#undo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canUndo) + * + * + */ + canUndo(): boolean; + /** + * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#redo) + * + * + */ + redo(): void; + /** + * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#undo) + * + * + */ + undo(): void; + } + + interface DrawActionConstructor { + /** + * DrawAction is the base class for all draw actions. DrawActions use the view events to generate a set of coordinates to create new geometries. Each serves a different purpose, allowing you to create a different type geometry such as [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), and [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html) + */ + + new (properties?: DrawActionProperties): DrawAction; + } + + export const DrawAction: DrawActionConstructor; + + interface DrawActionProperties { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#view) + */ + view?: MapViewProperties; + } + + interface MultipointDrawAction extends DrawAction { + /** + * Two-dimensional array of numbers representing the coordinates of each vertex that comprises the drawn geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface MultipointDrawActionConstructor { + /** + * This class uses the view events to generate a set of coordinates to create a new [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry using [Draw](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html). When the [draw.create("multipoint")](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) method is called, a reference to MultipointDrawAction is returned. You can listen to [events](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#events-summary) on the MultipointDrawAction instance, which allows users to create a multipoint that meets criteria specified by the application. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html) + */ + + new (properties?: MultipointDrawActionProperties): MultipointDrawAction; + } + + export const MultipointDrawAction: MultipointDrawActionConstructor; + + interface MultipointDrawActionProperties extends DrawActionProperties {} + + interface PointDrawAction extends DrawAction { + /** + * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html#coordinates) + */ + readonly coordinates: number[]; + + /** + * Completes drawing the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface PointDrawActionConstructor { + new (properties?: PointDrawActionProperties): PointDrawAction; + } + + export const PointDrawAction: PointDrawActionConstructor; + + interface PointDrawActionProperties extends DrawActionProperties {} + + interface PolygonDrawAction extends DrawAction { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface PolygonDrawActionConstructor { + new (properties?: PolygonDrawActionProperties): PolygonDrawAction; + } + + export const PolygonDrawAction: PolygonDrawActionConstructor; + + interface PolygonDrawActionProperties extends DrawActionProperties { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#mode) + * + * @default hybrid + */ + mode?: string; + } + + interface PolylineDrawAction extends DrawAction { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polyline geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface PolylineDrawActionConstructor { + new (properties?: PolylineDrawActionProperties): PolylineDrawAction; + } + + export const PolylineDrawAction: PolylineDrawActionConstructor; + + interface PolylineDrawActionProperties extends DrawActionProperties { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#mode) + * + * @default hybrid + */ + mode?: string; + } + + interface SegmentDrawAction extends DrawAction { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#mode) + * + * @default freehand + */ + mode: string; + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#event:draw-complete) event. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface SegmentDrawActionConstructor { + new (properties?: SegmentDrawActionProperties): SegmentDrawAction; + } + + export const SegmentDrawAction: SegmentDrawActionConstructor; + + interface SegmentDrawActionProperties extends DrawActionProperties { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#mode) + * + * @default freehand + */ + mode?: string; + } + interface GroundView extends Accessor { /** * An elevation sampler that may be used to sample and query elevation values from the ground surface that is currently being displayed. The elevation sampler is not supported for [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and may be `null` while the ground surface display is being initialized. The resolution of the sampled values depends on the ground elevation display resolution (high resolution close to the camera, low resolution far away from the camera). Because of the dynamic nature of the display resolution, the [demResolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#demResolution) property of the returned sampler will always return `{ min: -1, max: -1 }. If higher or more consistent sample resolution is required, then consider creating a sampler at the desired resolution using ElevationLayer.createSampler or Ground.createSampler. @@ -44522,6 +47970,18 @@ declare namespace __esri { interface InputProperties {} interface CSVLayerView extends LayerView { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#effect) + */ + effect: FeatureEffect; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#filter) + */ + filter: FeatureFilter; /** * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. * @@ -44543,7 +48003,7 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. * > **Known Limitations** @@ -44614,13 +48074,19 @@ declare namespace __esri { queryObjectIds(params?: Query | QueryProperties): IPromise; } - interface CSVLayerViewConstructor { - new (properties?: CSVLayerViewProperties): CSVLayerView; - } - - export const CSVLayerView: CSVLayerViewConstructor; - interface CSVLayerViewProperties extends LayerViewProperties { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#effect) + */ + effect?: FeatureEffectProperties; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#filter) + */ + filter?: FeatureFilterProperties; /** * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. * @@ -44636,6 +48102,25 @@ declare namespace __esri { } interface FeatureLayerView extends LayerView { + /** + * A list of attribute fields fetched for each feature including fields required for layer [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo), [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo), and additional fields defined on the [FeatureLayer.outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields). The availableFields is populated when the layer view is finished [updating](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#updating). Use this list when setting [client-side filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) or querying features on the [client-side](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields) + */ + readonly availableFields: string[]; + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * > **Known Limitations** FeatureEffect is not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#effect) + */ + effect: FeatureEffect; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) + */ + filter: FeatureFilter; /** * The layer being viewed. * @@ -44663,11 +48148,11 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. If query parameters are not provided, the extent and count of all features available for drawing are returned. To query for the extent of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44685,7 +48170,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. To query for the count of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureCount) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44701,9 +48186,9 @@ declare namespace __esri { */ queryFeatureCount(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all features available for drawing are returned. To execute a query against all the features in a Feature Service rather than only those in the client, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all features available for drawing are returned along with their attributes specified in [availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). For client-side attribute queries, relevant fields must exist in [availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields) list for the query to be successful. To execute a query against all the features in a Feature Service rather than only those in the client, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44714,14 +48199,14 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) * - * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned along with their attributes specified in [availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ queryFeatures(params?: Query | QueryProperties): IPromise; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. To query for ObjectIDs of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryObjectIds) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44751,6 +48236,19 @@ declare namespace __esri { export const FeatureLayerView: FeatureLayerViewConstructor; interface FeatureLayerViewProperties extends LayerViewProperties { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * > **Known Limitations** FeatureEffect is not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#effect) + */ + effect?: FeatureEffectProperties; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) + */ + filter?: FeatureFilterProperties; /** * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. * @@ -44765,6 +48263,153 @@ declare namespace __esri { maximumNumberOfFeaturesExceeded?: boolean; } + interface GeoJSONLayerView extends LayerView { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#effect) + */ + effect: FeatureEffect; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#filter) + */ + filter: FeatureFilter; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to SceneView. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded: boolean; + + /** + * Highlights the given feature(s). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#highlight) + * + * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. + * + */ + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryExtent) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryFeatureCount) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatureCount(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all features available for drawing are returned. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryFeatures) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatures(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryObjectIds) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryObjectIds(params?: Query | QueryProperties): IPromise; + } + + interface GeoJSONLayerViewProperties extends LayerViewProperties { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#effect) + */ + effect?: FeatureEffectProperties; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#filter) + */ + filter?: FeatureFilterProperties; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures?: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to SceneView. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded?: boolean; + } + + interface GeoRSSLayerView extends LayerView { + /** + * Highlights the given feature(s). + * > **Known Limitations** Currently the highlight method is only supported in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoRSSLayerView.html#highlight) + * + * @param target The feature(s) to highlight. + * + */ + highlight(target?: Graphic | Graphic[]): Handle; + } + + interface GeoRSSLayerViewProperties extends LayerViewProperties {} + interface GraphicsLayerView extends LayerView { /** * Highlights the given feature(s). @@ -44775,7 +48420,7 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Returns all graphics available for drawing in the layer view as a [collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). * @@ -44786,18 +48431,6 @@ declare namespace __esri { queryGraphics(): Collection; } - interface GraphicsLayerViewConstructor { - /** - * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) in either a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GraphicsLayerView.html) - */ - - new (properties?: GraphicsLayerViewProperties): GraphicsLayerView; - } - - export const GraphicsLayerView: GraphicsLayerViewConstructor; - interface GraphicsLayerViewProperties extends LayerViewProperties {} interface ImageryLayerView extends LayerView { @@ -44872,12 +48505,6 @@ declare namespace __esri { readonly allVisiblePolylines: Collection; } - interface KMLLayerViewConstructor { - new (properties?: KMLLayerViewProperties): KMLLayerView; - } - - export const KMLLayerView: KMLLayerViewConstructor; - interface KMLLayerViewProperties extends LayerViewProperties {} /** @@ -44961,6 +48588,25 @@ declare namespace __esri { } interface SceneLayerView extends LayerView { + /** + * Applies a client-side [FeatureFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html) to the displayed data. For 3D object scene layers, only spatial filters are supported, that is, a filter where the geometry is set and spatialRelationship is one of `contains`, `intersects`, `disjoint`. For point scene layers, the full FeatureFilter functionality is supported. Only the features that satisfy the filter are displayed. Filters with unsupported fields are rejected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#filter) + */ + filter: FeatureFilter; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to point scene layers. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to point scene layers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded: boolean; + /** * Highlights the given feature(s). * @@ -44969,10 +48615,11 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns the 3D [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If query parameters are not provided, the extent and count of all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. * > To query for the extent of features directly from a Scene Service rather than those loaded for the current view, you must use the [SceneLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryExtent) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryExtent) * @@ -44983,6 +48630,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all loaded features is returned. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. * > To query for the count of features directly from a Scene Service rather than those loaded for the current view, you must use the [SceneLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryFeatureCount) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatureCount) * @@ -44993,6 +48641,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. Querying more than 10.000 features returns an error, unless num is specified in the Query. * > To execute a query against all the features in a Scene Service rather than only those loaded for the current view, you must use the [SceneLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryFeatures) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatures) * @@ -45003,6 +48652,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns an array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. * > To query for ObjectIDs of features directly from a Scene Service rather than those loaded for the current view, you must use the [SceneLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryObjectIds) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryObjectIds) * @@ -45012,20 +48662,27 @@ declare namespace __esri { queryObjectIds(params?: Query): IPromise; } - interface SceneLayerViewConstructor { + interface SceneLayerViewProperties extends LayerViewProperties { /** - * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * Applies a client-side [FeatureFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html) to the displayed data. For 3D object scene layers, only spatial filters are supported, that is, a filter where the geometry is set and spatialRelationship is one of `contains`, `intersects`, `disjoint`. For point scene layers, the full FeatureFilter functionality is supported. Only the features that satisfy the filter are displayed. Filters with unsupported fields are rejected. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#filter) */ - - new (properties?: SceneLayerViewProperties): SceneLayerView; + filter?: FeatureFilterProperties; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to point scene layers. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures?: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to point scene layers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded?: boolean; } - export const SceneLayerView: SceneLayerViewConstructor; - - interface SceneLayerViewProperties extends LayerViewProperties {} - interface StreamLayerView extends LayerView, Evented { /** * The error that explains an unsuccessful attempt to connect to the stream service or an unexpected disconnection from the stream service. @@ -45040,20 +48697,20 @@ declare namespace __esri { */ readonly connectionStatus: string; /** - * Contains the attribute and spatial filters used to filter messages sent to the given layer view by a stream service. To change the filter for only a single layer view, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) method. The layer view's filter is always updated when the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method of the associated stream layer instance is called. + * The geometry and attribute filter. Only the features that satisfy the filter are displayed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) */ - readonly filter: StreamLayerViewFilter; + readonly filter: FeatureFilter; /** - * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). + * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). **This property is deprecated. Use [queryFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryFeatures) method instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#graphics) */ graphics: Collection; /** - * Opens a web socket connection with the stream service to start receiving messages. This is called internally when the StreamLayer is added to a view. + * Opens a web socket connection with the stream service to start receiving messages. This is called internally when the StreamLayer is added to a view. **The layer will now automatically connect when it is added to a view.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connect) * @@ -45061,7 +48718,7 @@ declare namespace __esri { */ connect(): IPromise; /** - * Closes the web socket connection with the stream service. This is called internally when the StreamLayer is removed from a view. To verify when the connection is closed, watch the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) property. + * Closes the web socket connection with the stream service. This is called internally when the StreamLayer is removed from a view. To verify when the connection is closed, watch the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) property. **The layer will now automatically disconnect when it is removed a view.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#disconnect) * @@ -45069,7 +48726,7 @@ declare namespace __esri { */ disconnect(): void; /** - * Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) on the StreamLayerView. The filter is updated only on the layer view from which it is called. To update the filter on all layer views generated from a common layer, use the [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. If the input `filter` object is `undefined` or `null`, the spatial and attribute filters are removed. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. + * **This method is deprecated. Update [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) directly instead.** Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) on the StreamLayerView. The filter is updated only on the layer view from which it is called. To update the filter on all layer views generated from a common layer, use the [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. If the input `filter` object is `undefined` or `null`, the spatial and attribute filters are removed. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) * @@ -45097,7 +48754,7 @@ declare namespace __esri { interface StreamLayerViewProperties extends LayerViewProperties { /** - * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). + * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). **This property is deprecated. Use [queryFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryFeatures) method instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#graphics) */ @@ -45106,21 +48763,6 @@ declare namespace __esri { export interface StreamLayerViewDataReceivedEvent {} - export interface StreamLayerViewFilter extends Object { - /** - * A spatial filter for filtering features. Only features that intersect the given geometry are displayed in the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) - */ - geometry?: Extent; - /** - * A SQL where clause used to filter features by attributes. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) - */ - where?: string; - } - export interface StreamLayerViewUpdateFilterFilter extends Object { /** * A spatial filter for filtering features. Only features that intersect the given geometry are displayed in the view. If `null`, the spatial filter is cleared. @@ -45136,7 +48778,243 @@ declare namespace __esri { where?: string; } - interface MapView extends View, BreakpointsOwner { + interface FeatureEffect extends Accessor, JSONSupport { + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that do not meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) + */ + excludedEffect: string; + /** + * Indicates if labels for features that are [excluded](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) from the effect are visible. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedLabelsVisible) + * + * @default false + */ + excludedLabelsVisible: boolean; + /** + * The filter that drives the effect. Features that meet the requirements specified in the filter will have the [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) applied while features that do not meet meet the filter requirements will have the [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) applied. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) + */ + filter: FeatureFilter; + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) + */ + includedEffect: string; + + /** + * Creates a deep clone of FeatureEffect object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#clone) + * + * + */ + clone(): FeatureEffect; + } + + interface FeatureEffectConstructor { + /** + * FeatureEffect allows you to emphasize or deemphasize features that satisfy a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). The [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) properties allow you to apply [CSS filters](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) to features that are either included or excluded from the filter. Typically, you use `includedEffect` to emphasize features that are included in the filter and `excludedEffect` to deemphasize features excluded from the filter. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html) + */ + + new (properties?: FeatureEffectProperties): FeatureEffect; + + fromJSON(json: any): FeatureEffect; + } + + export const FeatureEffect: FeatureEffectConstructor; + + interface FeatureEffectProperties { + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that do not meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) + */ + excludedEffect?: string; + /** + * Indicates if labels for features that are [excluded](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) from the effect are visible. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedLabelsVisible) + * + * @default false + */ + excludedLabelsVisible?: boolean; + /** + * The filter that drives the effect. Features that meet the requirements specified in the filter will have the [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) applied while features that do not meet meet the filter requirements will have the [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) applied. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) + */ + filter?: FeatureFilterProperties; + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) + */ + includedEffect?: string; + } + + interface FeatureFilter extends Accessor, JSONSupport { + /** + * Specifies a search distance from a given [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in a spatial filter. The [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) indicates the unit of measurement. In essence, setting this property creates a buffer at the specified size around the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The filter will use that buffer to display features in the layer or layer view that adhere to the to the indicated [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship). + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `distance` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) + */ + distance: number; + /** + * The geometry to apply to the spatial filter. The spatial relationship as specified by [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) will indicate how the geometry should be used to filter features. + * > **Known Limitations** [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html) geometry types are currently not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) + */ + geometry: Geometry; + /** + * An array of objectIds of the features to be filtered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#objectIds) + */ + objectIds: number[]; + /** + * For spatial filters, this parameter defines the spatial relationship to filter features in the layer view against the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. + * + * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). + * > **Known Limitations** The filter of [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) with 3D object scene layers only supports the spatialRelationsship `contains`, `intersects` and `disjoint`. + * ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) + * + * @default intersects + */ + spatialRelationship: string; + /** + * A range of time with start and end date. Only the features that fall within this time extent will be displayed. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `timeExtent` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) + * + * @default null + */ + timeExtent: TimeExtent; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) is specified in a spatial filter. If `units` is not specified, the unit is derived from the filter [geometry's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) spatial reference. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) + * + * @default null + */ + units: string; + /** + * A where clause for the feature filter. Any legal SQL92 where clause operating on the fields in the layer is allowed. Be sure to have the correct sequence of single and double quotes when writing the where clause in JavaScript. The field to be used for `where` clause must be added to [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) list when the layer is initialized. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `where` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where) + */ + where: string; + + /** + * Creates a deep clone of FeatureFilter object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#clone) + * + * + */ + clone(): FeatureFilter; + /** + * Internal method. Enables a filter for rendering. A filter that is not enabled will be ignored in 2D rendering. This property is used to defer applying the result of a filter when it is set for the first time until after MT features have had their filterFlags updated + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#enable) + * + * + */ + enable(): void; + } + + interface FeatureFilterConstructor { + /** + * This class defines parameters for setting a client-side filter on a [layer view](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html). Once a FeatureFilter object's properties are defined, it can be used to set the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) property of the layer view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html) + */ + + new (properties?: FeatureFilterProperties): FeatureFilter; + + fromJSON(json: any): FeatureFilter; + } + + export const FeatureFilter: FeatureFilterConstructor; + + interface FeatureFilterProperties { + /** + * Specifies a search distance from a given [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in a spatial filter. The [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) indicates the unit of measurement. In essence, setting this property creates a buffer at the specified size around the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The filter will use that buffer to display features in the layer or layer view that adhere to the to the indicated [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship). + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `distance` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) + */ + distance?: number; + /** + * The geometry to apply to the spatial filter. The spatial relationship as specified by [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) will indicate how the geometry should be used to filter features. + * > **Known Limitations** [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html) geometry types are currently not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) + */ + geometry?: GeometryProperties; + /** + * An array of objectIds of the features to be filtered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#objectIds) + */ + objectIds?: number[]; + /** + * For spatial filters, this parameter defines the spatial relationship to filter features in the layer view against the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. + * + * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). + * > **Known Limitations** The filter of [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) with 3D object scene layers only supports the spatialRelationsship `contains`, `intersects` and `disjoint`. + * ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) + * + * @default intersects + */ + spatialRelationship?: string; + /** + * A range of time with start and end date. Only the features that fall within this time extent will be displayed. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `timeExtent` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) + * + * @default null + */ + timeExtent?: TimeExtentProperties; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) is specified in a spatial filter. If `units` is not specified, the unit is derived from the filter [geometry's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) spatial reference. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) + * + * @default null + */ + units?: string; + /** + * A where clause for the feature filter. Any legal SQL92 where clause operating on the fields in the layer is allowed. Be sure to have the correct sequence of single and double quotes when writing the where clause in JavaScript. The field to be used for `where` clause must be added to [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) list when the layer is initialized. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `where` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where) + */ + where?: string; + } + + interface MapView extends View, MapViewBase, BreakpointsOwner { /** * Represents the view's center point; when setting the center, you may pass a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) instance or an array of numbers representing a longitude/latitude pair (`[-100.4593, 36.9014]`). Setting the center immediately changes the current view. For animating the view, see [goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo). If set in the constructor, this property will be ignored if the [viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#viewpoint) or [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#extent) properties are also set in the constructor. The returned [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) object is always in the spatial reference of the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#map) and may be modified internally. To persist the returned object, create a clone using [Point.clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#clone). * @@ -45206,53 +49084,15 @@ declare namespace __esri { * */ focus(): void; - /** - * Sets the view to a given target. The target parameter can be one of the following: - * * `[longitude, latitude]` pair of coordinates - * * [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) (or array of [Geometry[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html)) - * * [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) (or array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)) - * * [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) - * * Object with a combination of `target`, `center` and `scale` properties (with `target` being any of the types listed above). The `center` property is provided as a convenience to animate the [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center) and is equivalent to specifying the `target` with the center [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). - * - * - * This function returns a promise which resolves as soon as the new view has been set to the target. If the transition is animated, then the ongoing animation can be obtained using [MapView.animation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#animation). If a tiled map service is used as the basemap and `snapToZoom` property is set to `true` in [constraints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints), the `goTo` method will zoom in to fit the defined `target`. If `snapToZoom` property is set to `false`, the `goTo` method will zoom to the exact `target`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @param target The target location/viewpoint to animate to. When using an object for `target`, use the properties in the table below. - * @param target.target The target of the animation. - * @param target.center The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center) to go to. - * @param target.scale The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) to go to. - * @param target.zoom The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#zoom) to go to. - * @param options Animation options. See properties below for object specifications. - * @param options.animate Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. - * @param options.duration The duration of the animation in milliseconds. - * @param options.easing The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out - * - */ - goTo( - target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | MapViewGoToTarget, - options?: MapViewGoToOptions - ): IPromise; - /** - * Indicates whether there is an event listener on the instance that matches the provided event name. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hasEventListener) - * - * - */ - hasEventListener(): void; /** * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). At 4.6 and later, a hit test will always return a result from [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html). However, the result will only indicate the ID and the name of the layer within the [vector tile style](https://doc.arcgis.com/en/arcgis-online/reference/tile-layers.htm#ESRI_SECTION1_8F68399EB47B48FF9EF46719FCC96978) that intersects the screen point. Detailed attribute and spatial information about the actual feature represented in the layer is not returned. HitTest results returned from VectorTileLayers are primarily used for [Vector tile style editor applications](https://maps.esri.com/jg/VectorBasemapStyleEditor/index.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) * - * @param screenPoint The screen coordinates of the click on the view. - * @param screenPoint.x The horizontal screen coordinate of the click on the view. - * @param screenPoint.y The vertical screen coordinate of the click on the view. + * @param screenPoint The screen coordinates (or native mouse event) of the click on the view. * */ - hitTest(screenPoint: MapViewHitTestScreenPoint): IPromise; + hitTest(screenPoint: ScreenPoint | MouseEvent): IPromise; /** * Registers an event handler on the instance. Call this method to hook an event with a listener. See the [Events summary table](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#events-summary) for a list of listened events. * @@ -45280,26 +49120,23 @@ declare namespace __esri { */ takeScreenshot(options?: MapViewTakeScreenshotOptions): IPromise; /** - * Converts the given screen point to a [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html) represents a point in terms of pixels relative to the top-left corner of the view. + * Converts the given screen point to a [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The screen point represents a point in terms of pixels relative to the top-left corner of the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toMap) * - * @param screenPoint The screen coordinates to convert. - * @param screenPoint.x The horizontal screen coordinate to convert. - * @param screenPoint.y The vertical screen coordinate to convert. + * @param screenPoint The location on the screen (or native mouse event) to convert. * */ - toMap(screenPoint: MapViewToMapScreenPoint): Point; + toMap(screenPoint: ScreenPoint | MouseEvent): Point; /** - * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html). The [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html) represents a point in terms of pixels relative to the top-left corner of the view. + * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a screen point. The screen point represents a point in terms of pixels relative to the top-left corner of the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toScreen) * * @param point A point geometry. - * @param screenPoint ScreenPoint object that will reference the result. * */ - toScreen(point: Point, screenPoint?: ScreenPoint): ScreenPoint; + toScreen(point: Point): ScreenPoint; on(name: "resize", eventHandler: MapViewResizeEventHandler): IHandle; @@ -45596,6 +49433,8 @@ declare namespace __esri { } export interface MapViewKeyUpEvent { + key: string; + native: any; stopPropagation: Function; @@ -45696,60 +49535,6 @@ declare namespace __esri { effectiveMaxScale?: number; } - export interface MapViewGoToOptions extends Object { - /** - * Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @default true - */ - animate?: boolean; - /** - * The duration of the animation in milliseconds. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @default 200 - */ - duration?: number; - /** - * The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @default ease - */ - easing?: string | Function; - } - - export interface MapViewGoToTarget extends Object { - /** - * The target of the animation. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - target?: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint; - /** - * The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center) to go to. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - center?: number[]; - /** - * The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) to go to. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - scale?: number; - /** - * The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#zoom) to go to. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - zoom?: number; - } - export interface MapViewHighlightOptionsProperties extends Object { /** * The color of the highlight. @@ -45804,21 +49589,6 @@ declare namespace __esri { fillOpacity?: number; } - export interface MapViewHitTestScreenPoint extends Object { - /** - * The horizontal screen coordinate of the click on the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) - */ - x: number; - /** - * The vertical screen coordinate of the click on the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) - */ - y: number; - } - export interface MapViewTakeScreenshotOptions extends Object { /** * The format of the resulting encoded data url. **Possible values**: jpg | png. @@ -45889,21 +49659,6 @@ declare namespace __esri { height?: number; } - export interface MapViewToMapScreenPoint extends Object { - /** - * The horizontal screen coordinate to convert. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toMap) - */ - x: number; - /** - * The vertical screen coordinate to convert. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toMap) - */ - y: number; - } - export interface MapViewMouseWheelEvent { deltaY: number; @@ -46040,6 +49795,26 @@ declare namespace __esri { width: number; } + /** + * An object representing a point on the screen. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#ScreenPoint) + */ + export interface ScreenPoint extends Object { + /** + * The x coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#ScreenPoint) + */ + x: number; + /** + * The y coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#ScreenPoint) + */ + y: number; + } + /** * Object returned when [takeScreenshot()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#takeScreenshot) promise resolves: * @@ -46060,6 +49835,97 @@ declare namespace __esri { data: ImageData; } + interface MapViewBase { + /** + * Sets the view to a given target. The target parameter can be one of the following: + * * `[longitude, latitude]` pair of coordinates + * * [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) (or array of [Geometry[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html)) + * * [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) (or array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)) + * * [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) + * * Object with a combination of `target`, `center` and `scale` properties (with `target` being any of the types listed above). The `center` property is provided as a convenience to animate the [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#center) and is equivalent to specifying the `target` with the center [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * + * This function returns a promise which resolves as soon as the new view has been set to the target. If the transition is animated, then the ongoing animation can be obtained using [MapView.animation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#animation). If a tiled map service is used as the basemap and `snapToZoom` property is set to `true` in [constraints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#constraints), the `goTo` method will zoom in to fit the defined `target`. If `snapToZoom` property is set to `false`, the `goTo` method will zoom to the exact `target`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @param target The target location/viewpoint to animate to. When using an object for `target`, use the properties in the table below. + * @param target.target The target of the animation. + * @param target.center The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#center) to go to. + * @param target.scale The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#scale) to go to. + * @param target.zoom The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#zoom) to go to. + * @param options Animation options. See properties below for object specifications. + * @param options.animate Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. + * @param options.duration The duration of the animation in milliseconds. + * @param options.easing The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out + * + */ + goTo( + target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | MapViewBaseGoToTarget, + options?: MapViewBaseGoToOptions + ): IPromise; + } + + interface MapViewBaseConstructor { + new (): MapViewBase; + } + + export const MapViewBase: MapViewBaseConstructor; + + export interface MapViewBaseGoToOptions extends Object { + /** + * Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @default true + */ + animate?: boolean; + /** + * The duration of the animation in milliseconds. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @default 200 + */ + duration?: number; + /** + * The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @default ease + */ + easing?: string | Function; + } + + export interface MapViewBaseGoToTarget extends Object { + /** + * The target of the animation. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + target?: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint; + /** + * The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#center) to go to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + center?: number[]; + /** + * The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#scale) to go to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + scale?: number; + /** + * The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#zoom) to go to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + zoom?: number; + } + export interface MapViewDragEventOrigin extends Object { x: number; @@ -46223,6 +50089,9 @@ declare namespace __esri { * // Disable automatic lighting updates by camera tracking * view.environment.lighting.cameraTrackingEnabled = true; * + * // Enable displaying shadows cast by the sun + * view.environment.lighting.directShadowsEnabled = true; + * * // Set a background color * var view = new SceneView({ * container: "view", @@ -46250,6 +50119,12 @@ declare namespace __esri { * @default null */ extent: Extent; + /** + * The view for the ground of the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#groundView) + */ + readonly groundView: GroundView; /** * Options for configuring the highlight. Use the highlight method on the appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature. * @@ -46350,24 +50225,20 @@ declare namespace __esri { options?: SceneViewGoToOptions ): IPromise; /** - * Indicates whether there is an event listener on the instance that matches the provided event name. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hasEventListener) - * - * - */ - hasEventListener(): void; - /** - * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). Draped graphics (i.e. graphics in layers where the [elevation mode](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) is `on-the-ground`) are currently **not** returned from this method, even when they intersect the input screen point. When the ground surface is hit, but no graphic is found, then the result of hitTest will be a single object with its mapPoint set to the point on the surface that was hit, but its graphic will be set to `null`. + * Returns graphics that intersect the specified screen coordinate. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) and [SceneView.graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#graphics). If no options are specified, graphics that are behind the ground surface will not be returned unless the ground surface is semi-transparent. Otherwise, using the [map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground) in the include and exclude options determines whether the ground surface prevents hit testing graphics that are under it. Starting with version 4.11, if a label intersects the specified screen coordinates then the result of the hitTest will contain the graphic associated with that label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) * - * @param screenPoint The screen coordinates of the click on the view. - * @param screenPoint.x The horizontal screen coordinate of the click on the view. - * @param screenPoint.y The vertical screen coordinate of the click on the view. + * @param screenPoint The screen coordinates (or native mouse event) of the click on the view. + * @param options Intersection test options. By default the [map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground) is excluded if its opacity is smaller than one. + * @param options.include A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. + * @param options.exclude A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * */ - hitTest(screenPoint: SceneViewHitTestScreenPoint): IPromise; + hitTest( + screenPoint: SceneViewScreenPoint | MouseEvent, + options?: SceneViewHitTestOptions + ): IPromise; /** * Registers an event handler on the instance. Call this method to hook an event with a listener. See the [Events summary table](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#events-summary) for a list of listened events. * @@ -46380,7 +50251,7 @@ declare namespace __esri { */ on(type: string | string[], modifiersOrHandler: string[] | EventHandler, handler?: EventHandler): IHandle; /** - * Create a screenshot of the current view. Screenshots include only elements that are rendered on the canvas (all geographical elements), but excludes overlayed DOM elements (UI, popups, measurement labels, etc.). By default, a screenshot of the whole view is created. Different options allow for creating different types of screenshots, including taking screenshots at different aspect ratios, different resolutions and creating thumbnails. Screenshots are always taken inside the padded area of the view (see [padding](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#padding)). + * Create a screenshot of the current view. Screenshots include only elements that are rendered on the canvas (all geographical elements), but excludes overlayed DOM elements (UI, popups, etc.). By default, a screenshot of the whole view is created. Different options allow for creating different types of screenshots, including taking screenshots at different aspect ratios, different resolutions and creating thumbnails. Screenshots are always taken inside the padded area of the view (see [padding](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#padding)). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#takeScreenshot) * @@ -46398,23 +50269,22 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) * - * @param screenPoint The screen coordinates to convert. - * @param screenPoint.x The horizontal screen coordinate to convert. - * @param screenPoint.y The vertical screen coordinate to convert. - * @param mapPoint The point object that will reference the result. + * @param screenPoint The location on the screen (or native mouse event) to convert. + * @param options Intersection test options. By default only the [map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground) and any [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) are included. + * @param options.include A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. + * @param options.exclude A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * */ - toMap(screenPoint: SceneViewToMapScreenPoint, mapPoint?: Point): Point; + toMap(screenPoint: SceneViewScreenPoint | MouseEvent, options?: SceneViewToMapOptions): Point; /** - * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html). + * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a screen point. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toScreen) * * @param point A point geometry. - * @param screenPoint ScreenPoint object that will reference the result. * */ - toScreen(point: Point, screenPoint?: ScreenPoint): ScreenPoint; + toScreen(point: Point): SceneViewScreenPoint; on(name: "resize", eventHandler: SceneViewResizeEventHandler): IHandle; @@ -46550,6 +50420,9 @@ declare namespace __esri { * // Disable automatic lighting updates by camera tracking * view.environment.lighting.cameraTrackingEnabled = true; * + * // Enable displaying shadows cast by the sun + * view.environment.lighting.directShadowsEnabled = true; + * * // Set a background color * var view = new SceneView({ * container: "view", @@ -46727,6 +50600,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) */ results: SceneViewHitTestResultResults[]; + /** + * Ground intersection result. The ground hit result will always be returned, even if the ground was excluded from the [hitTest](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + ground: HitTestResultGround; + /** + * The screen coordinates (or native mouse event) of the click on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + screenPoint: SceneViewScreenPoint | MouseEvent; } export interface SceneViewHoldEvent { @@ -46769,6 +50654,13 @@ declare namespace __esri { y: number; } + /** + * A layer or graphic to be used in [toMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) and [hitTest](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) filter options. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#IntersectItem) + */ + export type IntersectItem = Graphic | Layer | BuildingSublayer; + export interface SceneViewKeyDownEvent { key: string; @@ -46784,6 +50676,8 @@ declare namespace __esri { } export interface SceneViewKeyUpEvent { + key: string; + native: any; stopPropagation: Function; @@ -47238,7 +51132,7 @@ declare namespace __esri { */ date?: DateProperties; /** - * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. + * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. For more control on which 3D objects cast shadows use the `castShadows` property available on [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows), [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows), [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows), and [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) * @@ -47273,7 +51167,7 @@ declare namespace __esri { */ date?: Date; /** - * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. + * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. For more control on which 3D objects cast shadows use the `castShadows` property available on [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows), [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows), [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows), and [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) * @@ -47436,19 +51330,25 @@ declare namespace __esri { fillOpacity?: number; } - export interface SceneViewHitTestScreenPoint extends Object { + export interface SceneViewHitTestOptions extends Object { /** - * The horizontal screen coordinate of the click on the view. + * A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) */ - x: number; + include?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; /** - * The vertical screen coordinate of the click on the view. + * A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) */ - y: number; + exclude?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; } export interface SceneViewTakeScreenshotOptions extends Object { @@ -47515,18 +51415,44 @@ declare namespace __esri { height?: number; } - export interface SceneViewToMapScreenPoint extends Object { + export interface SceneViewToMapOptions extends Object { /** - * The horizontal screen coordinate to convert. + * A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) */ - x: number; + include?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; /** - * The vertical screen coordinate to convert. + * A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) */ + exclude?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; + } + + /** + * An object representing a point on the screen. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ScreenPoint) + */ + export interface SceneViewScreenPoint extends Object { + /** + * The x coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ScreenPoint) + */ + x: number; + /** + * The y coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ScreenPoint) + */ y: number; } @@ -47556,9 +51482,24 @@ declare namespace __esri { y: number; } + export interface HitTestResultGround extends Object { + /** + * The point at which the ground was hit while performing the hitTest. This may be `null` when the ground was not hit at all (for example by clicking on the sky). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + mapPoint: Point; + /** + * The distance from camera position to the ground hit. The distance will be `0` if the ground was not hit at all. In global scenes the distance will be in meters while in local scenes the distance will be in the unit of the spatial reference of the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + distance: number; + } + export interface SceneViewHitTestResultResults extends Object { /** - * A graphic present in the view that intersects the input screen coordinates. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties will be empty based on the context in which the graphic is fetched. + * A graphic present in the view that intersects the input screen coordinates. Starting with version 4.11, if a label intersects the input screen coordinates the corresponding graphic is returned. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties will be empty based on the context in which the graphic is fetched. Some layers do not have a [graphic.geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry) (for example: [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) and [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html) `PointCloudLayer`) The [graphic.attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) only includes attributes which are loaded by the client, for this reason it can be a subset of all attributes. [FeatureLayer.outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) with `["*"]` can be used to force all attributes to be present. The [graphic.symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) exists only for graphics coming from [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) or [view.graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics) but it is possible to compute the displayed symbology with [getDisplayedSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) */ @@ -47569,6 +51510,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) */ mapPoint: Point; + /** + * The distance from the camera position to the point geometry hit on this graphic. In global scenes the distance will be in meters while in local scenes the distance will be in the unit of the spatial reference of the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + distance: number; } interface DefaultUI extends UI { @@ -47644,10 +51591,10 @@ declare namespace __esri { * * @param component The component(s) to add to the UI. This can be a widget instance, HTML element, a string value representing a DOM node ID, or an array containing a combination of any of those types. See the example snippets below for code examples. Alternatively, you can pass an array of objects with the following specification. * @param component.component The component to add to the UI. This can be a widget instance, HTML element, a string value representing a DOM node ID. - * @param component.position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param component.position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * @param component.index The placement index of the component. This index shows where to place the component relative to other components. For example a value of `0` would place it topmost when position is top-*, leftmost for bottom-left and right most for bottom-right. - * @param position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual - * @param position.position The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * @param position.position The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * @param position.index The placement index of the component(s). This index shows where to place the component relative to other components. For example a value of `0` would place it topmost when position is top-*, leftmost for bottom-left and right most for bottom-right. * */ @@ -47657,7 +51604,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#empty) * - * @param position The position from which to remove all components. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param position The position from which to remove all components. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * */ empty(position?: string): void; @@ -47668,8 +51615,8 @@ declare namespace __esri { * * @param component The component(s) to move. This value can be a widget instance, HTML element, a string value representing a DOM node ID, or an array containing a combination of any of those types. See the example snippets below for code examples. Alternatively, you can pass an array of objects with the following specification. * @param component.component The component to move. This can be a widget instance, HTML element, a string value representing a DOM node ID. - * @param component.position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual - * @param position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param component.position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * @param position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * */ move(component: Widget | HTMLElement | string | any[] | UIMoveComponent, position?: string): void; @@ -47727,7 +51674,7 @@ declare namespace __esri { */ component: Widget | HTMLElement | string; /** - * The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add) */ @@ -47742,7 +51689,7 @@ declare namespace __esri { export interface UIAddPosition extends Object { /** - * The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add) */ @@ -47763,14 +51710,14 @@ declare namespace __esri { */ component: Widget | HTMLElement | string; /** - * The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#move) */ position?: string; } - interface View extends Accessor, corePromise, DOMContainer { + interface View extends Accessor, corePromise, Evented, DOMContainer { /** * Collection containing a flat list of all the created [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) related to the basemap, operational layers, and group layers in this view. * @@ -47789,12 +51736,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics) */ graphics: Collection; - /** - * The view for the ground of the map. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#groundView) - */ - readonly groundView: GroundView; /** * Options to configure input handling of the View. * @@ -47839,7 +51780,7 @@ declare namespace __esri { * When `true`, this property indicates whether the view successfully satisfied all dependencies, signaling that the following conditions are met. * * The view has a [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#map). If [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#map) is a [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html) or a [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html), then the map or scene must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#loaded). * * The view has a [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#container) with a size greater than `0`. - * * The view has a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#spatialReference). + * * The view has a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#spatialReference), a [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#center), and a [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#scale). These also can be inferred by setting an [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#extent). * * * When a view becomes ready it will resolve itself and invoke the callback defined in [when()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#when) where code can execute on a working view. Subsequent changes to a view's readiness would typically be handled by watching `view.ready` and providing logic for cases where the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#map) or [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#container) change. @@ -47875,8 +51816,6 @@ declare namespace __esri { * Indication whether the view is animating, being interacted with or resizing. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#stationary) - * - * @default true */ readonly stationary: boolean; /** @@ -47913,6 +51852,13 @@ declare namespace __esri { */ new (properties?: ViewProperties): View; + + /** + * Contains the collection of active views on the page. Only views that are [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#ready) appear in the collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#views) + */ + readonly views: Collection; } export const View: ViewConstructor; @@ -48158,7 +52104,7 @@ declare namespace __esri { interface WebMapConstructor { /** - * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-portal-for-arcgis-.htm) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-portal-for-arcgis-.htm) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). It defines the content, style, and bookmarks of your webmap, and it can be shared across multiple ArcGIS web and desktop applications. The webmap is saved as a JSON document that can be consumed by the ArcGIS API for JavaScript via the WebMap class to easily create compelling 2D applications. The JSON document is written according to the [webmap specification](https://developers.arcgis.com/web-map-specification/). Although you can easily create your own webmaps, there are many sample [webmaps in ArcGIS Online](https://webmaps.maps.arcgis.com/home/group.html?id=bf19f0a0871649c49f6743dbe8138ecb) that you can use to get started with the API. You may modify or add new content to these webmaps. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html) */ @@ -48213,6 +52159,51 @@ declare namespace __esri { widgets?: any; } + interface ColorBackground extends JSONSupport { + /** + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#color) + * + * @default black + */ + color: Color; + /** + * For ColorBackground the type is always `color`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#type) + */ + readonly type: string; + + /** + * Creates a deep clone of the object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#clone) + * + * + */ + clone(): ColorBackground; + } + + interface ColorBackgroundConstructor { + new (properties?: ColorBackgroundProperties): ColorBackground; + + fromJSON(json: any): ColorBackground; + } + + export const ColorBackground: ColorBackgroundConstructor; + + interface ColorBackgroundProperties { + /** + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#color) + * + * @default black + */ + color?: Color | number[] | string; + } + interface Bookmark extends Accessor { /** * The extent of the specified bookmark item. @@ -48271,6 +52262,14 @@ declare namespace __esri { } interface InitialViewProperties extends Accessor, corePromise { + /** + * The background color of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#background) + * + * @default null + */ + background: ColorBackground; /** * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * @@ -48301,6 +52300,14 @@ declare namespace __esri { export const InitialViewProperties: InitialViewPropertiesConstructor; interface InitialViewPropertiesProperties { + /** + * The background color of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#background) + * + * @default null + */ + background?: ColorBackgroundProperties; /** * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * @@ -48821,9 +52828,9 @@ declare namespace __esri { interface BackgroundProperties {} - interface ColorBackground extends Background, JSONSupport { + interface backgroundColorBackground extends Background, JSONSupport { /** - * The color of the background. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-ColorBackground.html#color) * @@ -48838,26 +52845,26 @@ declare namespace __esri { * * */ - clone(): ColorBackground; + clone(): backgroundColorBackground; } - interface ColorBackgroundConstructor { + interface backgroundColorBackgroundConstructor { /** * This type of [Background](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-Background.html) allows to set a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) as the background of a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). The view environment stars and atmosphere will show on top of the background when enabled. To have a clear background color only, make sure to set both the [view.environment.starsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) and [view.environment.atmosphereEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) properties to `false`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-ColorBackground.html) */ - new (properties?: ColorBackgroundProperties): ColorBackground; + new (properties?: backgroundColorBackgroundProperties): backgroundColorBackground; - fromJSON(json: any): ColorBackground; + fromJSON(json: any): backgroundColorBackground; } - export const ColorBackground: ColorBackgroundConstructor; + export const backgroundColorBackground: backgroundColorBackgroundConstructor; - interface ColorBackgroundProperties extends BackgroundProperties { + interface backgroundColorBackgroundProperties extends BackgroundProperties { /** - * The color of the background. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-ColorBackground.html#color) * @@ -49649,13 +53656,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#label) - */ - readonly label: string; + iconClass: string; /** * Unit system (imperial, metric) or specific unit used for displaying the area values. **Possible Values:** metric | imperial | square-inches | square-feet | square-us-feet | square-yards | square-miles | square-meters | square-kilometers | acres | ares | hectares * @@ -49716,6 +53717,12 @@ declare namespace __esri { export const AreaMeasurement2D: AreaMeasurement2DConstructor; interface AreaMeasurement2DProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#iconClass) + */ + iconClass?: string; /** * Unit system (imperial, metric) or specific unit used for displaying the area values. **Possible Values:** metric | imperial | square-inches | square-feet | square-us-feet | square-yards | square-miles | square-meters | square-kilometers | acres | ares | hectares * @@ -49790,13 +53797,14 @@ declare namespace __esri { */ readonly modes: string[]; /** - * The ViewModel's state. **Possible Values:** disabled | ready | measuring + * The ViewModel's state. **Possible Values:** disabled | ready | measuring | measured * * Value | Description * ------------|------------- * disabled | not ready yet * ready | ready for measuring * measuring | measuring has started + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D-AreaMeasurement2DViewModel.html#state) @@ -49985,6 +53993,7 @@ declare namespace __esri { * disabled | not ready yet * ready | ready for measuring * measuring | currently measuring + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#state) @@ -50116,7 +54125,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#iconClass) */ - readonly iconClass: string; + iconClass: string; /** * Text used to split attribution by [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) * @@ -50125,12 +54134,6 @@ declare namespace __esri { * @default | */ itemDelimiter: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#label) - */ - readonly label: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -50167,6 +54170,12 @@ declare namespace __esri { export const Attribution: AttributionConstructor; interface AttributionProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#iconClass) + */ + iconClass?: string; /** * Text used to split attribution by [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) * @@ -50266,12 +54275,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#iconClass) */ iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#label) - */ - readonly label: string; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance, or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -50750,19 +54753,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#bookmarks) */ - readonly bookmarks: Collection; + bookmarks: Collection; /** * The widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#label) - */ - readonly label: string; + iconClass: string; /** * The view from which the widget will operate. * @@ -50808,6 +54805,18 @@ declare namespace __esri { export const Bookmarks: BookmarksConstructor; interface BookmarksProperties extends WidgetProperties, GoToProperties { + /** + * A collection of [Bookmark](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html)s. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#bookmarks) + */ + bookmarks?: CollectionProperties; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#iconClass) + */ + iconClass?: string; /** * The view from which the widget will operate. * @@ -50834,7 +54843,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#bookmarks) */ - readonly bookmarks: Collection; + bookmarks: Collection; /** * The view model's state. **Possible Values:** loading | disabled * @@ -50868,6 +54877,12 @@ declare namespace __esri { export const BookmarksViewModel: BookmarksViewModelConstructor; interface BookmarksViewModelProperties extends GoToProperties { + /** + * A collection of [Bookmark](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html)s. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#bookmarks) + */ + bookmarks?: CollectionProperties; /** * The view from which the widget will operate. * @@ -51142,13 +55157,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#label) - */ - readonly label: string; + iconClass: string; /** * The view in which the Compass obtains and indicates camera [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading), using a (SceneView) or rotation (MapView). * @@ -51193,6 +55202,12 @@ declare namespace __esri { export const Compass: CompassConstructor; interface CompassProperties extends WidgetProperties, GoToProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#iconClass) + */ + iconClass?: string; /** * The view in which the Compass obtains and indicates camera [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading), using a (SceneView) or rotation (MapView). * @@ -51779,13 +55794,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#label) - */ - readonly label: string; + iconClass: string; /** * The maximum number of stops allowed for routing. * @@ -51874,6 +55883,12 @@ declare namespace __esri { export const Directions: DirectionsConstructor; interface DirectionsProperties extends WidgetProperties, GoToProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#iconClass) + */ + iconClass?: string; /** * The maximum number of stops allowed for routing. * @@ -51974,7 +55989,7 @@ declare namespace __esri { * * @default null | 'Driving Time' */ - readonly selectedTravelMode: DirectionsViewModelSelectedTravelMode; + selectedTravelMode: DirectionsViewModelSelectedTravelMode; /** * The Service Description object returned by the Route REST Endpoint. This object contains service specific details like available Cost attributes, supported Restrictions, default Attribute Parameter Values, Service Limits (like maximum input stop count), default Impedance Attribute, etc. This information is useful when implementing complex logistics scenarios operating with limitations or preferences on vehicle or stop properties, for example avoiding toll roads, dealing with hazardous materials, working with stop service times, etc. * @@ -52073,6 +56088,15 @@ declare namespace __esri { * */ highlightSegment(maneuver: Graphic): void; + /** + * This method should be called to load the view model's routing resources. + * > You must first call this before using `DirectionsViewModel`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#load) + * + * + */ + load(): IPromise; /** * Resets the state of the ViewModel, clearing off all the input stops, and results in the widget. The results persist in the map. * @@ -52092,12 +56116,6 @@ declare namespace __esri { } interface DirectionsViewModelConstructor { - /** - * Provides the communication and data manipulation logic for the [Directions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html) widget. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html) - */ - new (properties?: DirectionsViewModelProperties): DirectionsViewModel; } @@ -52138,6 +56156,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#routeSymbol) */ routeSymbol?: SimpleLineSymbolProperties; + /** + * The selected travel mode. More information can be found in the [ArcGIS Online documentation](https://doc.arcgis.com/en/arcgis-online/reference/travel-modes.htm#GUID-96DF7F50-E0B2-4BF3-8271-EB515D3F0107). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#selectedTravelMode) + * + * @default null | 'Driving Time' + */ + selectedTravelMode?: DirectionsViewModelSelectedTravelMode; /** * An array of graphics that define the stop locations along the route. * @@ -52465,7 +56491,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#SearchProperties) */ - sources?: Collection; + sources?: Collection; /** * Indicates whether to display suggestions as the user enters input text in the widget. * @@ -52576,6 +56602,7 @@ declare namespace __esri { * disabled | not ready yet * ready | ready for measuring * measuring | currently measuring + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state) @@ -52706,13 +56733,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#label) - */ - readonly label: string; + iconClass: string; /** * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Possible Values:** metric | imperial | inches | feet | us-feet | yards | miles | nautical-miles | meters | kilometers * @@ -52771,6 +56792,12 @@ declare namespace __esri { export const DistanceMeasurement2D: DistanceMeasurement2DConstructor; interface DistanceMeasurement2DProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#iconClass) + */ + iconClass?: string; /** * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Possible Values:** metric | imperial | inches | feet | us-feet | yards | miles | nautical-miles | meters | kilometers * @@ -52843,13 +56870,14 @@ declare namespace __esri { */ readonly modes: string[]; /** - * The view model's state. **Possible Values:** disabled | ready | measuring + * The view model's state. **Possible Values:** disabled | ready | measuring | measured * * Value | Description * ------------|------------- * disabled | not ready yet * ready | ready for measuring * measuring | measuring has started + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D-DistanceMeasurement2DViewModel.html#state) @@ -52925,6 +56953,787 @@ declare namespace __esri { geometry: any; } + interface Editor extends Widget { + /** + * A property indicating the current active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#activeWorkflow) + */ + readonly activeWorkflow: Workflow; + /** + * An array of string values which specifies what end users are allowed to edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description | Example + * ---------------|------------|---------- + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. | ![combinedcreate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_create.png) + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. | ![combinedupdate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_update.png) + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, `Add features` is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#allowedWorkflows) + */ + allowedWorkflows: string[]; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#iconClass) + */ + readonly iconClass: string; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) + */ + layerInfos: LayerInfo[]; + /** + * This property allows customization of supporting Editor widgets and their default behavior. These widgets include [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html), [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html), and [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html). + * > This property is useful for basic overrides of the default widgets. There may be some limitations to what the Editor can do with these overridden properties. For example, the Editor will always disable the `multipleSelectionEnabled` property in [Sketch.defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) no matter what is set within this property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) + */ + supportingWidgetDefaults: SupportingWidgetDefaults; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#view) + */ + view: MapView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the module:esri/widgets/Editor/EditorToggleViewModel class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#viewModel) + */ + viewModel: EditorViewModel; + + /** + * Cancels any active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#cancelWorkflow) + * + * + */ + cancelWorkflow(): void; + /** + * This is applicable if there is an active update workflow. If so, this method deletes the workflow feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#deleteFeatureFromWorkflow) + * + * + */ + deleteFeatureFromWorkflow(): void; + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#render) + * + * + */ + render(): any; + /** + * Initiates the `create` workflow by displaying the panel where feature creation begins. This method takes a [CreationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) object containing the layer(s) and template(s) to use. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startCreateWorkflowAtFeatureCreation) + * + * @param creationInfo An object containing information needed to create a new feature using the Editor widget. + * + */ + startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): void; + /** + * This method starts the Editor workflow where it waits for the feature to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startCreateWorkflowAtFeatureEdit) + * + * @param feature The feature to be edited. + * + */ + startCreateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Initiates the `create` workflow by displaying the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startCreateWorkflowAtFeatureTypeSelection) + * + * + */ + startCreateWorkflowAtFeatureTypeSelection(): void; + /** + * Starts the `update` workflow at the feature geometry and attribute editing panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateWorkflowAtFeatureEdit) + * + * @param feature The feature to be updated. + * + */ + startUpdateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Starts the `update` workflow using the current selected feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateWorkflowAtFeatureSelection) + * + * + */ + startUpdateWorkflowAtFeatureSelection(): void; + /** + * This method starts the Editor workflow where it waits for multiple features to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateWorkflowAtMultipleFeatureSelection) + * + * @param candidates An array of features to be updated. + * + */ + startUpdateWorkflowAtMultipleFeatureSelection(candidates: Graphic[]): void; + } + + interface EditorConstructor { + /** + * This widget provides an out-of-the-box editing experience to help streamline the editing experience within a web application. The widget has two different [Workflows](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html), `create` and `update`. These workflows allow you to either add features or edit and/or delete existing features within an editable feature layer. The widget automatically recognizes if there are editable feature layers within the map. If it recognizes that they are editable, the layers can be used by the widget. In addition, it is also possible to configure how the `Editor` behaves by setting its [layerInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) property. This property takes an array of configuration objects which allow you to configure the editing experience for these layers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) + */ + + new (properties?: EditorProperties): Editor; + } + + export const Editor: EditorConstructor; + + interface EditorProperties extends WidgetProperties { + /** + * An array of string values which specifies what end users are allowed to edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description | Example + * ---------------|------------|---------- + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. | ![combinedcreate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_create.png) + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. | ![combinedupdate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_update.png) + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, `Add features` is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#allowedWorkflows) + */ + allowedWorkflows?: string[]; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) + */ + layerInfos?: LayerInfo[]; + /** + * This property allows customization of supporting Editor widgets and their default behavior. These widgets include [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html), [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html), and [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html). + * > This property is useful for basic overrides of the default widgets. There may be some limitations to what the Editor can do with these overridden properties. For example, the Editor will always disable the `multipleSelectionEnabled` property in [Sketch.defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) no matter what is set within this property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) + */ + supportingWidgetDefaults?: SupportingWidgetDefaults; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#view) + */ + view?: MapViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the module:esri/widgets/Editor/EditorToggleViewModel class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#viewModel) + */ + viewModel?: EditorViewModelProperties; + } + + interface EditorViewModel extends Accessor { + /** + * A property indicating the current active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#activeWorkflow) + */ + readonly activeWorkflow: Workflow; + /** + * An array of string values which specifies what end users are allowed edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description + * ---------------|------------ + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, 'Add features' is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#allowedWorkflows) + */ + allowedWorkflows: string[]; + /** + * Convenience property that reads whether there are any editable layers that support the `create` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#canCreate) + */ + readonly canCreate: boolean; + /** + * Convenience property that reads whether there are any editable layers that support the `update` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#canUpdate) + */ + readonly canUpdate: boolean; + /** + * A collection of editable items based on configuration and available layers on the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#editableItems) + */ + readonly editableItems: Collection; + /** + * An array of objects containing information specific to any failed editing operations. In addition to the error(s), options to `retry()` or `cancel()` are provided. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#failures) + */ + readonly failures: EditorViewModelFailures[]; + /** + * The [FeatureFormViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureFormViewModel) + */ + featureFormViewModel: FeatureFormViewModel; + /** + * The [FeatureTemplatesViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureTemplatesViewModel) + */ + featureTemplatesViewModel: FeatureTemplatesViewModel; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#layerInfos) + */ + layerInfos: LayerInfo[]; + /** + * The [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#sketchViewModel) + */ + sketchViewModel: SketchViewModel; + /** + * The widget's state. Possible values are in the table below. + * + * Value | Description + * ------|------------ + * ready | Dependencies are met and has valid property values. + * disabled | Dependencies are missing and cannot provide valid inputs. + * editing-new-feature | The Editor is currently editing (creating) a new feature. + * editing-existing-feature | The Editor is currently editing an existing feature. + * awaiting-update-feature-candidate | The period when the application is awaiting the user's input after clicking update and multiple features are returned. Specify the feature to update. + * awaiting-feature-creation-info | This is the first step in the `create` workflow. A [CreationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) is required. + * awaiting-feature-to-update | This is the first step in the `update` workflow. A [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) is required. + * awaiting-feature-to-create | The waiting period for when a feature is created beforte attribute/geometry edits can be performed. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * When `true`, there is at least one edit request being processed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#syncing) + */ + readonly syncing: boolean; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#view) + */ + view: MapView; + + /** + * Cancels any active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#cancelWorkflow) + * + * + */ + cancelWorkflow(): void; + /** + * This is applicable if there is an active update workflow. If so, this method deletes the workflow feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#deleteFeatureFromWorkflow) + * + * + */ + deleteFeatureFromWorkflow(): void; + /** + * Initiates the `create` workflow by displaying the panel where feature creation begins. This method takes a [CreationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) object containing the layer(s) and template(s) to use. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startCreateWorkflowAtFeatureCreation) + * + * @param creationInfo An object containing information needed to create a new feature using the Editor widget. + * + */ + startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): void; + /** + * This method starts the Editor workflow where it waits for the feature to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startCreateWorkflowAtFeatureEdit) + * + * @param feature The feature to be updated. + * + */ + startCreateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Initiates the `create` workflow by displaying the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startCreateWorkflowAtFeatureTypeSelection) + * + * + */ + startCreateWorkflowAtFeatureTypeSelection(): void; + /** + * Starts the update workflow at the feature geometry and attribute editing panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startUpdateWorkflowAtFeatureEdit) + * + * @param feature The feature to be updated. + * + */ + startUpdateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Starts the `update` workflow using the current selected feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startUpdateWorkflowAtFeatureSelection) + * + * + */ + startUpdateWorkflowAtFeatureSelection(): void; + /** + * Starts the Editor workflow where it waits for multiple features to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startUpdateWorkflowAtMultipleFeatureSelection) + * + * + */ + startUpdateWorkflowAtMultipleFeatureSelection(): void; + } + + interface EditorViewModelConstructor { + new (properties?: EditorViewModelProperties): EditorViewModel; + } + + export const EditorViewModel: EditorViewModelConstructor; + + interface EditorViewModelProperties { + /** + * An array of string values which specifies what end users are allowed edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description + * ---------------|------------ + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, 'Add features' is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#allowedWorkflows) + */ + allowedWorkflows?: string[]; + /** + * The [FeatureFormViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureFormViewModel) + */ + featureFormViewModel?: FeatureFormViewModelProperties; + /** + * The [FeatureTemplatesViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureTemplatesViewModel) + */ + featureTemplatesViewModel?: FeatureTemplatesViewModelProperties; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#layerInfos) + */ + layerInfos?: LayerInfo[]; + /** + * The [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#sketchViewModel) + */ + sketchViewModel?: SketchViewModelProperties; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#view) + */ + view?: MapViewProperties; + } + + /** + * The editable item available within the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) + */ + export interface EditableItem extends Object { + /** + * *Read-only* The feature layer associated with the editable item. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) + */ + layer: FeatureLayer; + /** + * *Read-only* The workflow type that this item supports. Can be either, `update` or `create`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) + */ + supports: string; + } + + export interface EditorViewModelFailures extends Object { + /** + * The readonly error message. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#failures) + */ + error: Error; + } + + interface Workflow extends Accessor { + /** + * Shared workflow data. Can be either a [CreateWorkflowData](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) or a [UpdateWorkflowData](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#data) + */ + readonly data: CreateWorkflowData | UpdateWorkflowData; + /** + * This property indicates whether there is a next step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#hasNextStep) + */ + readonly hasNextStep: boolean; + /** + * This property indicates if there is a previous step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#hasPreviousStep) + */ + readonly hasPreviousStep: boolean; + /** + * Indicates whether the workflow is considered active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#started) + * + * @default false + */ + started: boolean; + /** + * The name of the current step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#stepId) + */ + readonly stepId: string; + /** + * Value indicating the workflow type. + * + * Possible Value | Description | Example + * ---------------|------------|---------- + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. | ![combinedcreate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_create.png) + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. | ![combinedupdate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_update.png) + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, `Add features` is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#type) + */ + readonly type: string; + + /** + * Cancels the active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#cancel) + * + * + */ + cancel(): void; + /** + * Call this method when the workflow is considered finished. This method is used to help process the editing results. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#commit) + * + * + */ + commit(): void; + /** + * Moves to the next step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#next) + * + * + */ + next(): void; + /** + * Moves to the previous step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#previous) + * + * + */ + previous(): void; + /** + * Resets the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#reset) + * + * + */ + reset(): void; + /** + * Starts the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#start) + * + * + */ + start(): void; + } + + interface WorkflowConstructor { + /** + * This class helps manage different stages of an editing workflow. A workflow can be thought of as one of two options: `create` and/or `update`. If adding a new feature, the `create` option is used whereas if editing an existing feature, the `update` option is used. Updating includes both editing geometry and attribute data and deleting features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html) + */ + + new (properties?: WorkflowProperties): Workflow; + } + + export const Workflow: WorkflowConstructor; + + interface WorkflowProperties { + /** + * Indicates whether the workflow is considered active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#started) + * + * @default false + */ + started?: boolean; + } + + /** + * This object contains data for the `create` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + export interface CreateWorkflowData extends Object { + /** + * The [creationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) associated with the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + creationInfo: CreationInfo; + /** + * The edits used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + edits: Edits; + /** + * The associated [EditorViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html) for this workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + viewModel: EditorViewModel; + } + + /** + * Object used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#Edits) + */ + export interface Edits extends Object { + /** + * The feature to be edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#Edits) + */ + feature: Graphic; + /** + * *Read-only* When true, the edited feature has been modified from its original state. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#Edits) + */ + modified: boolean; + } + + /** + * This object contains data for the `update` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + export interface UpdateWorkflowData extends Object { + /** + * An array of features to be updated. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + candidates: Graphic[]; + /** + * The [editable item](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) available within the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + editableItem: EditableItem; + /** + * The edits used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + edits: Edits; + /** + * The associated [EditorViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html) for this workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + viewModel: EditorViewModel; + } + + /** + * The information needed for creating a new feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) + */ + export interface CreationInfo extends Object { + /** + * The associated feature layer where the new feature is created. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) + */ + layer: FeatureLayer; + /** + * The associated feature template used to create the new feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) + */ + template: FeatureTemplate; + } + + /** + * Editor configurations used for an array of fields. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + export interface LayerInfo extends Object { + /** + * The associated feature layer containing the editable fields. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + layer: FeatureLayer; + /** + * The configuration options for displaying an array of fields within the widget. Take note that all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. + * > If this is set, in addition to overrides in the [supportingWidgetDefaults](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults), the overrides specified in the [supportingWidgetDefaults](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) property take precedence. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + fieldConfig?: FieldConfig[]; + /** + * Indicates whether to enable editing on the layer. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + enabled?: boolean; + /** + * Indicates whether to enable `Add feature` functionality. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + addEnabled?: boolean; + /** + * Indicates whether to enable `Update feature` functionality. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + updateEnabled?: boolean; + /** + * Indicates whether to enable the ability to delete features. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + deleteEnabled?: boolean; + } + + /** + * Set this to customize any supporting Editor widgets default behavior. These widgets include [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html), [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html), and [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + export interface SupportingWidgetDefaults extends Object { + /** + * An object containing properties specific for customizing the [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + featureForm?: SupportingWidgetDefaultsFeatureForm; + /** + * An object containing properties specific for customizing the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + featureTemplates?: SupportingWidgetDefaultsFeatureTemplates; + /** + * An object containing properties specific for customizng the [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + sketch?: SupportingWidgetDefaultsSketch; + } + + export interface SupportingWidgetDefaultsFeatureForm extends Object { + /** + * An array of [FieldConfig](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html) objects to use within the [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html). + * > Any [field configurations](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html) set within the [layerInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) property will be overridden if it is set here in the [supportingWidgetDefaults](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + fieldConfig?: FieldConfig[]; + /** + * String indicating the [[groupDisplay]](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#groupDisplay) and how they will be displayed to the end user. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + groupDisplay?: string; + } + + export interface SupportingWidgetDefaultsFeatureTemplates extends Object { + /** + * Aids in managing various template items and how they display within the widget. Please refer to [groupBy API reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#groupBy) for additional information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + groupBy?: string | GroupByFunction; + /** + * Indicates whether the [templates filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterEnabled) displays. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + filterEnabled?: boolean; + } + + export interface SupportingWidgetDefaultsSketch extends Object { + /** + * An object containing the [updateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) for the [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + updateOptions?: any; + /** + * The marker symbol used to symbolize any point feature updates. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + markerSymbol?: SimpleMarkerSymbol; + /** + * The polygon symbol used to symbolize any polygon feature updates. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + polygonSymbol?: SimpleFillSymbol; + /** + * The line symbol used to symbolize any line feature updates. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + polylineSymbol?: SimpleLineSymbol; + } + interface Expand extends Widget { /** * Automatically collapses the expand widget instance when the view's viewpoint updates. @@ -53217,6 +58026,14 @@ declare namespace __esri { } interface Feature extends Widget { + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. * @@ -53226,53 +58043,67 @@ declare namespace __esri { */ graphic: Graphic; /** - * The title for the feature. + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#map) + * + * @default null + */ + map: Map; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#spatialReference) + * + * @default null + */ + spatialReference: SpatialReference; + /** + * The title for the feature. You can disable this via the [visibleElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#visibleElements) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#title) * * @default null */ readonly title: string; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) - * - * @default null - */ - view: MapView | SceneView; /** * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) */ viewModel: FeatureViewModel; + /** + * The visible elements that are displayed within the widget's [graphic.popupTemplate.content](esri-PopupTemplate.html#content). This property provides the ability to turn individual elements of the widget's display on/off. See the [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) documentation for additional information on how these elements work. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#visibleElements) + */ + visibleElements: VisibleElements; /** - * Paginates to a specified [media](esri-PopupTemplate.html#media) info object. For example, you may have [media](esri-PopupTemplate.html#media) content which contains multiple `mediaInfos`. This method allows you to specify the index of the `mediaInfos` you wish to display. + * Paginates to a specified [media](esri-popup-content-MediaContent.html) info object. For example, you may have [media](esri-popup-content-MediaContent.html) content which contains multiple `mediaInfos`. This method allows you to specify the index of the `mediaInfos` you wish to display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#goToMedia) * - * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element to be updated. - * @param mediaInfoIndex The index position of the [media](esri-PopupTemplate.html#media) info object you wish to display. + * @param contentElementIndex The index position of the [media](esri-popup-content-MediaContent.html) content element to be updated. + * @param mediaInfoIndex The index position of the [media](esri-popup-content-MediaContent.html) info object you wish to display. * */ goToMedia(contentElementIndex: number, mediaInfoIndex: number): void; /** - * Paginates to the next [media](esri-PopupTemplate.html#media) info. + * Paginates to the next [media](esri-popup-content-MediaContent.html) info. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#nextMedia) * - * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * @param contentElementIndex The index position of the [media](esri-popup-content-MediaContent.html) content element. * */ nextMedia(contentElementIndex: number): void; /** - * Paginates to the previous [media](esri-PopupTemplate.html#media) info in the specified [media](esri-PopupTemplate.html#media) content element. + * Paginates to the previous [media](esri-popup-content-MediaContent.html) info in the specified [media](esri-popup-content-MediaContent.html) content element. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#previousMedia) * - * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * @param contentElementIndex The index position of the [media](esri-popup-content-MediaContent.html) content element. * */ previousMedia(contentElementIndex: number): void; @@ -53293,6 +58124,14 @@ declare namespace __esri { export const Feature: FeatureConstructor; interface FeatureProperties extends WidgetProperties { + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. * @@ -53302,34 +58141,56 @@ declare namespace __esri { */ graphic?: GraphicProperties; /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#map) * * @default null */ - view?: MapViewProperties | SceneViewProperties; + map?: MapProperties; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#spatialReference) + * + * @default null + */ + spatialReference?: SpatialReferenceProperties; /** * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) */ viewModel?: FeatureViewModelProperties; + /** + * The visible elements that are displayed within the widget's [graphic.popupTemplate.content](esri-PopupTemplate.html#content). This property provides the ability to turn individual elements of the widget's display on/off. See the [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) documentation for additional information on how these elements work. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#visibleElements) + */ + visibleElements?: VisibleElements; } interface FeatureViewModel extends Accessor { /** - * The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) of the feature. + * The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) of the feature. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#content) * * @default null */ - readonly content: string | any[] | HTMLElement | Widget; + readonly content: Content[] | Widget | HTMLElement | string; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. They are obtained from the feature's [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) attribute values and can be read: * * globally using the [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), or - * * per an individual content element. This element is defined with a type of fields on the PopupTemplate's content property. + * * per an individual content element. This element is defined with a [fieldsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) popup element set on the PopupTemplate content property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) * @@ -53344,28 +58205,38 @@ declare namespace __esri { * @default null */ graphic: Graphic; + /** + * A read-only property containing metadata regarding the last edit performed on a feature. This object has the following properties: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + readonly lastEditInfo: FeatureViewModelLastEditInfo; + /** + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#map) + * + * @default null + */ + map: Map; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#spatialReference) + * + * @default null + */ + spatialReference: SpatialReference; /** * The title for the feature. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#title) - * - * @default null */ readonly title: string; - /** - * The view associated with the Feature instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) - * - * @default null - */ - view: MapView | SceneView; /** * Indicates whether the feature is currently waiting for all of its content to finish loading. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#waitingForContent) - * - * @default true */ readonly waitingForContent: boolean; } @@ -53377,6 +58248,14 @@ declare namespace __esri { export const FeatureViewModel: FeatureViewModelConstructor; interface FeatureViewModelProperties { + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. * @@ -53386,13 +58265,21 @@ declare namespace __esri { */ graphic?: GraphicProperties; /** - * The view associated with the Feature instance. + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#map) * * @default null */ - view?: MapViewProperties | SceneViewProperties; + map?: MapProperties; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#spatialReference) + * + * @default null + */ + spatialReference?: SpatialReferenceProperties; } export interface FeatureViewModelFormattedAttributes extends Object { @@ -53403,13 +58290,82 @@ declare namespace __esri { */ global?: any; /** - * The formatted attributes for an individual content element. This is derived from the module:esri/PopupTemplate#fields content property of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) defined as type `fields`. + * The formatted attributes for an individual content element. This is derived from the module:esri/PopupTemplate PopupTemplate, or per an individual content element. This element is defined with a [fieldsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) popup element set on the PopupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) */ content?: any; } + export interface FeatureViewModelLastEditInfo extends Object { + /** + * User who performed the last edit on a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + user: string; + /** + * Date that the edit was performed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + date: string; + /** + * The type of edit that was performed on the feature. **Possible values:** edit | create + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + type: string; + } + + export interface VisibleContentElements extends Object { + /** + * Indicates whether to display any [AttachmentsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + attachments?: boolean; + /** + * Indicates whether to display any [FieldsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + fields?: boolean; + /** + * Indicates whether to display any [MediaContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + media?: boolean; + /** + * Indicates whether to display any [TextContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + text?: boolean; + } + + export interface VisibleElements extends Object { + /** + * Indicates whether the title associated with the feature displays. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleElements) + */ + title?: boolean; + /** + * Indicates whether content for the Feature displays, can also indicate the specific types of content elements by setting it via [VisibleContentElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements). The default value is `true`, everything displays. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleElements) + */ + content?: boolean | VisibleContentElements; + /** + * Indicates whether [lastEditInfo](esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) is displayed within the feature. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleElements) + */ + lastEditInfo?: boolean; + } + interface FeatureForm extends Widget { /** * The associated feature containing the editable attributes. A common way to access this is via the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) or [SceneView's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) `hitTest()` method. @@ -53419,7 +58375,7 @@ declare namespace __esri { feature: Graphic; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#fieldConfig) */ @@ -53498,7 +58454,7 @@ declare namespace __esri { feature?: GraphicProperties; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#fieldConfig) */ @@ -53540,7 +58496,7 @@ declare namespace __esri { feature: Graphic; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#fieldConfig) */ @@ -53571,6 +58527,12 @@ declare namespace __esri { * @default disabled */ readonly state: string; + /** + * Indicates whether all input fields are valid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#valid) + */ + valid: boolean; /** * Convenience method to find input fields. @@ -53620,7 +58582,7 @@ declare namespace __esri { feature?: GraphicProperties; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#fieldConfig) */ @@ -53631,6 +58593,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#layer) */ layer?: FeatureLayerProperties; + /** + * Indicates whether all input fields are valid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#valid) + */ + valid?: boolean; } interface FieldConfig extends Accessor { @@ -53706,6 +58674,15 @@ declare namespace __esri { * @default false */ required: boolean; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression: string; } interface FieldConfigConstructor { @@ -53787,6 +58764,15 @@ declare namespace __esri { * @default false */ required?: boolean; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression?: string; } interface FieldGroupConfig extends Accessor { @@ -53808,6 +58794,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#label) */ label: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression: string; } interface FieldGroupConfigConstructor { @@ -53835,6 +58830,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#label) */ label?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression?: string; } interface InputField extends Accessor { @@ -53967,6 +58971,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#description) */ description: string; + /** + * The result of `visibilityExpression`. Note, if `visibilityExpression` is not defined, the value of this property will be `undefined`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#evaluatedVisibility) + */ + readonly evaluatedVisibility: boolean; /** * The input fields belonging to this group. * @@ -53979,6 +58989,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#label) */ readonly label: string; + /** + * Arcade expression to determine whether this group is visible or not + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#visibilityExpression) + * + * @default null + */ + visibilityExpression: string; /** * The group's visibility. * @@ -54000,6 +59018,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#description) */ description?: string; + /** + * Arcade expression to determine whether this group is visible or not + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#visibilityExpression) + * + * @default null + */ + visibilityExpression?: string; } interface FeatureTemplates extends Widget { @@ -54017,6 +59043,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterFunction) */ filterFunction: FilterFunction; + /** + * Text used to filter items. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterText) + */ + filterText: string; /** * It is possible to group [template items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). This can aid in managing various template items and how they display within the widget. The values are discussed below. * @@ -54084,6 +59116,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterFunction) */ filterFunction?: FilterFunction; + /** + * Text used to filter items. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterText) + */ + filterText?: string; /** * It is possible to group [template items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). This can aid in managing various template items and how they display within the widget. The values are discussed below. * @@ -54168,13 +59206,21 @@ declare namespace __esri { readonly state: string; /** - * Use this method to apply a filter on the items. + * This method updates the [template items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html) with the provided filter. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html#refresh) * * */ refresh(): void; + /** + * Fires when a [template item](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html) is selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html#select) + * + * + */ + select(): void; } interface FeatureTemplatesViewModelConstructor { @@ -54247,6 +59293,14 @@ declare namespace __esri { */ readonly thumbnail: HTMLElement; + /** + * Creates a deep clone of the template item object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html#clone) + * + * + */ + clone(): TemplateItem; /** * Fetches the thumbnail used to display the template item. * @@ -54298,7 +59352,7 @@ declare namespace __esri { */ readonly items: TemplateItem[]; /** - * The name displayed in the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) widget indicating the grouped [TemplateItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). + * The label displayed in the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) widget indicating the grouped [TemplateItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItemGroup.html#label) */ @@ -54455,13 +59509,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#label) - */ - readonly label: string; + iconClass: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -54523,6 +59571,12 @@ declare namespace __esri { export const Home: HomeConstructor; interface HomeProperties extends WidgetProperties, GoToProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#iconClass) + */ + iconClass?: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -54623,13 +59677,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#label) - */ - readonly label: string; + iconClass: string; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -54690,6 +59738,12 @@ declare namespace __esri { export const LayerList: LayerListConstructor; interface LayerListProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#iconClass) + */ + iconClass?: string; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -54967,18 +60021,18 @@ declare namespace __esri { export type ListItemCreatedHandler = (event: any) => void; interface Legend extends Widget { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. The legend widget watches this property to hide or display the layer's legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#activeLayerInfos) + */ + activeLayerInfos: Collection; /** * The widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#label) - */ - readonly label: string; + iconClass: string; /** * Specifies a subset of the layers to display in the legend. If this property is not set, all layers in the map will display in the legend. Objects in this array are defined with the properties listed below. * @@ -54999,6 +60053,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#view) */ view: MapView | SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [LegendViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#viewModel) + */ + viewModel: LegendViewModel; /** * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. @@ -55023,6 +60083,18 @@ declare namespace __esri { export const Legend: LegendConstructor; interface LegendProperties extends WidgetProperties { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. The legend widget watches this property to hide or display the layer's legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#activeLayerInfos) + */ + activeLayerInfos?: CollectionProperties; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#iconClass) + */ + iconClass?: string; /** * Specifies a subset of the layers to display in the legend. If this property is not set, all layers in the map will display in the legend. Objects in this array are defined with the properties listed below. * @@ -55043,8 +60115,771 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#view) */ view?: MapViewProperties | SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [LegendViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#viewModel) + */ + viewModel?: LegendViewModelProperties; } + interface LegendViewModel extends Accessor { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. Use this property to hide or display the layer's symbols in the legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#activeLayerInfos) + */ + activeLayerInfos: Collection; + /** + * Specifies a subset of the layers in the map to display in the legend. If this property is not set, all operational layers in the map will display in the legend. This property can be used to control layer display order in the legend. Objects in this array are defined with the properties listed below. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + layerInfos: LegendViewModelLayerInfos[]; + /** + * The view model's state. **Possible Values:** ready | disabled + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#view) + */ + view: MapView | SceneView; + } + + interface LegendViewModelConstructor { + new (properties?: LegendViewModelProperties): LegendViewModel; + } + + export const LegendViewModel: LegendViewModelConstructor; + + interface LegendViewModelProperties { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. Use this property to hide or display the layer's symbols in the legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#activeLayerInfos) + */ + activeLayerInfos?: CollectionProperties; + /** + * Specifies a subset of the layers in the map to display in the legend. If this property is not set, all operational layers in the map will display in the legend. This property can be used to control layer display order in the legend. Objects in this array are defined with the properties listed below. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + layerInfos?: LegendViewModelLayerInfos[]; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + } + + export interface LegendViewModelLayerInfos extends Object { + /** + * Specify a title for the layer. If no title is specified the service name is used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + title?: string; + /** + * A layer to add to the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + layer?: Layer; + } + + interface ActiveLayerInfo extends Accessor { + /** + * A collection of child activeLayerInfos. This only applies to renderers of [Sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or the children of [GroupLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#children) + */ + children: Collection; + /** + * Indicates if the legend's display of the layer's renderer is driven by the scale of the view. This is true of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) renderers, any renderer that uses a `valueExpression` (Arcade expression), or another renderer such as [DotDensityRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#isScaleDriven) + */ + isScaleDriven: boolean; + /** + * The layer represented by the ActiveLayerInfo object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#layer) + */ + layer: Layer; + /** + * The legendElements is constructed using the layer [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html). It reflects the actual structure of the legend. Each `legendElement` has the following specification: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) + */ + legendElements: LegendElement[]; + /** + * The ActiveLayerInfo of the parent [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#parent) + */ + parent: ActiveLayerInfo; + /** + * Indicates if the activeLayerInfo is ready. It is set to `true` when all its [legendElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) are computed. It is set to `false` when the layer renderer changes so that the legendElements can recomputed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) + */ + ready: boolean; + /** + * The scale of the view instance in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#scale) + */ + scale: number; + /** + * The text string that represents the legend's title. This value is read from the `layerInfo` of the corresponding layer in the legend. If not provided, this value comes from the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#title) of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#title) + */ + title: string; + /** + * The version of the ActiveLayerInfo. It increases by `1` whenever [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) property of ActiveLayerInfo changes. This property should watched in the view for ActiveLayerInfo changes and update the DOM accordingly. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#version) + */ + version: number; + /** + * The view in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#view) + */ + view: View; + } + + interface ActiveLayerInfoConstructor { + new (properties?: ActiveLayerInfoProperties): ActiveLayerInfo; + } + + export const ActiveLayerInfo: ActiveLayerInfoConstructor; + + interface ActiveLayerInfoProperties { + /** + * A collection of child activeLayerInfos. This only applies to renderers of [Sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or the children of [GroupLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#children) + */ + children?: CollectionProperties; + /** + * Indicates if the legend's display of the layer's renderer is driven by the scale of the view. This is true of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) renderers, any renderer that uses a `valueExpression` (Arcade expression), or another renderer such as [DotDensityRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#isScaleDriven) + */ + isScaleDriven?: boolean; + /** + * The layer represented by the ActiveLayerInfo object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#layer) + */ + layer?: LayerProperties; + /** + * The legendElements is constructed using the layer [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html). It reflects the actual structure of the legend. Each `legendElement` has the following specification: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) + */ + legendElements?: LegendElement[]; + /** + * The ActiveLayerInfo of the parent [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#parent) + */ + parent?: ActiveLayerInfoProperties; + /** + * Indicates if the activeLayerInfo is ready. It is set to `true` when all its [legendElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) are computed. It is set to `false` when the layer renderer changes so that the legendElements can recomputed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) + */ + ready?: boolean; + /** + * The scale of the view instance in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#scale) + */ + scale?: number; + /** + * The text string that represents the legend's title. This value is read from the `layerInfo` of the corresponding layer in the legend. If not provided, this value comes from the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#title) of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#title) + */ + title?: string; + /** + * The version of the ActiveLayerInfo. It increases by `1` whenever [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) property of ActiveLayerInfo changes. This property should watched in the view for ActiveLayerInfo changes and update the DOM accordingly. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#version) + */ + version?: number; + /** + * The view in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#view) + */ + view?: ViewProperties; + } + + /** + * Describes the schema of the ColorRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + export interface ColorRampElement extends Object { + /** + * The type of this element is always `color-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + type: string; + /** + * The title of the color ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + title: string | RampTitle; + /** + * The color of the border surrounding the ramp. This corresponds with the outline color defined in the default symbol of the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + borderColor: Color; + /** + * The overlay color of the color ramp. This is typically transparent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + overlayColor: Color; + /** + * The individual color stops rendered in the legend that correspond to the color visual variable in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + infos: ColorRampStop[]; + } + + /** + * Describes the schema of the ColorRampStop element. Each ColorRampStop represents a single stop of the [ColorVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html) referenced in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + export interface ColorRampStop extends Object { + /** + * The label in the legend describing features with the given `color` and `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + label: string; + /** + * The value of the color visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + value: number; + /** + * The color of the visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + color: Color; + /** + * A number between `0` and `1` describing the position of the label on the color ramp. For example, in a color ramp with three stops, the first stop would have an offset of `0`, the second `0.5`, and the third `1`. These offsets are equally spaced for any given number of labels in the color ramp. The interval of each offset value is equal to 1 divided by the number of stops minus 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + offset: number; + } + + /** + * Describes the schema of the HeatmapRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + export interface HeatmapRampElement extends Object { + /** + * The type of this element is always `heatmap-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + type: string; + /** + * The title of the heatmap ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + title?: string | RampTitle; + /** + * The individual color stops rendered in the legend that correspond to the heatmap colorStops in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + infos: HeatmapRampStop[]; + } + + /** + * Describes the schema of the HeatmapRampStop element. Each HeatmapRampStop represents a single `colorStop` of the [Heatmap color stops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#colorStops) referenced in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + export interface HeatmapRampStop extends Object { + /** + * The label of the color stop displayed in the legend. Typically only the first and last stops have labels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + label: string; + /** + * The ratio of a pixel's intensity value to the minPixelIntensity of the renderer. The ratio of each pixel is matched to the corresponding color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + ratio: number; + /** + * The color of the pixel corresponding to the appropriate pixel `ratio`. This value is typically between `0` and `1`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + color: Color; + /** + * A number between `0` and `1` describing the position of the label on the ramp. For example, in a ramp with three stops, the first stop would have an offset of `0`, the second `0.5`, and the third `1`. These offset values are equally spaced for any given number of labels in the ramp. The interval of each offset value is equal to 1 divided by the number of stops minus 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + offset: number; + } + + /** + * Properties defining the scheme of each of the ImageSymbolTableElementInfo. This applies only to ImageryLayer renderers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + export interface ImageSymbolTableElementInfo extends Object { + /** + * The label of the category corresponding to the given image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + label?: string; + /** + * The data URI of the image representing a colored pixel in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + src: string; + /** + * The opacity of the image (`0` to `1`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + opacity: number; + /** + * The width of the image in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + width?: number; + /** + * The height of the image in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + height?: number; + } + + /** + * Properties defining the scheme of each of the supported [legendElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#LegendElement) + */ + export type LegendElement = + | SymbolTableElement + | ColorRampElement + | OpacityRampElement + | SizeRampElement + | HeatmapRampElement + | RelationshipRampElement; + + /** + * Describes the schema of the OpacityRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + export interface OpacityRampElement extends Object { + /** + * The type of this element is always `opacity-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + type: string; + /** + * The title of the opacity ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + title?: string | RampTitle; + /** + * The color of the border surrounding the ramp. This corresponds with the outline color defined in the default symbol of the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + borderColor: Color; + /** + * The overlay color of the color ramp. This is typically transparent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + overlayColor: Color; + /** + * The individual opacity stops rendered in the legend that correspond to the opacity visual variable in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + infos: OpacityRampStop[]; + } + + /** + * Describes the schema of the OpacityRampStop element. Each OpacityRampStop represents a single stop of the [OpacityVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html) referenced in the renderer. The opacity value of each stop is indicated in the [alpha](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#a) property of the `color` object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + export interface OpacityRampStop extends Object { + /** + * The label in the legend describing features with the given `color` and `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + label: string; + /** + * The value of the opacity visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + value: number; + /** + * The color of the visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html#stops). The opacity corresponding to the given `value` is indicated in the [alpha](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#a) property of the color object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + color: Color; + /** + * A number between `0` and `1` describing the position of the label on the ramp. For example, in a ramp with three stops, the first stop would have an offset of `0`, the second `0.5`, and the third `1`. These offsets are equally spaced for any given number of labels in the ramp. The interval of each offset value is equal to 1 divided by the number of stops minus 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + offset: number; + } + + /** + * Describes the schema of the RampTitle element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + export interface RampTitle extends Object { + /** + * The field name used in a visual variable of a renderer. This is used in the generated title of the corresponding ramp in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + field: string; + /** + * If provided, the normalization field name used in a visual variable of a renderer. This is used in the generated title of the corresponding ramp in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + normField: string; + /** + * If `true`, the legend formats to display the field and normalization field as a ratio. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + ratio: boolean; + /** + * If `true`, the legend formats to display the field and normalization field as a percentage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + ratioPercent: boolean; + /** + * If `true`, the legend formats to display the field and normalization field as a percentage of total. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + ratioPercentTotal: boolean; + } + + /** + * Describes the schema of the RelationshipLabels element. These labels are rendered in the corners of the square that represent the relationship renderer in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + export interface RelationshipLabels extends Object { + /** + * The label corresponding with the top corner of the legend if the focus is set to `HH`. This describes values that are considered high in both field 1 and field 2 (HH). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + top: string; + /** + * The label corresponding with the bottom corner of the legend if the focus is set to `HH`. This describes values that are considered low in both field 1 and field 2 (LL). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + bottom: string; + /** + * The label corresponding with the left corner of the legend (if the focus is set to `HH`). This describes features where the value of field 1 is high and the value of field 2 is low (HL). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + left: string; + /** + * The label corresponding with the right corner of the legend (if the focus is set to `HH`). This describes features where the value of field 2 is high and the value of field 1 is low (LH). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + right: string; + } + + /** + * Describes the schema of the RelationshipRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + export interface RelationshipRampElement extends Object { + /** + * The type of this element is always `relationship-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + type: string; + /** + * The number of classes for each field comprising the renderer. Can either be 2, 3, or 4. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + numClasses: number; + /** + * Determines the orientation of the Legend. Values can be `HH`, `HL`, `LH`, `LL`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + focus: string; + /** + * A 2-dimensional array of colors as displayed in the legend grid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + colors: Color[][]; + /** + * The labels for each corner of the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + labels: RelationshipLabels; + /** + * The rotation of the legend in degrees (0-360). `0` degrees displays the legend as a square with the `LL` cell in the bottom left corner of the legend and the `HH` cell in the top right corner. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + rotation: number; + /** + * The title of the renderer as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + title?: string; + /** + * Info objects associated with the relationship renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + infos?: any[]; + } + + /** + * Describes the schema of the RendererTitle element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + export interface RendererTitle extends Object { + /** + * The title of the renderer as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + title?: string; + /** + * The field name used in the renderer. This is used in the generated title of the renderer in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + field: string; + /** + * If a normalization field is provided to the renderer, this field is also used in the generated title for the renderer in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + normField: string; + /** + * Indicates if a percentage is used in the normalization of the renderer. This is used to create a more readable legend for that scenario. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + normByPct: boolean; + } + + /** + * Describes the schema of the SizeRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + export interface SizeRampElement extends Object { + /** + * The type of this element is always `size-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + type: string; + /** + * The title of the size ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + title?: string | RampTitle; + /** + * The individual size stops rendered in the legend that correspond to the size visual variable in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + infos: SizeRampStop[]; + } + + /** + * Describes the schema of the SizeRampStop element. Each SizeRampStop represents a single stop of the [SizeVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html) referenced in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + export interface SizeRampStop extends Object { + /** + * The label in the legend describing features with the given `symbol` and `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + label: string; + /** + * The value of the size visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + value?: any; + /** + * The symbol corresponding to the value of the stop in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + symbol: Symbol; + /** + * The size of the visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html#stops) in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + size?: number; + /** + * The width of the outline in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + outlineSize?: number; + /** + * The HTML element rendered in the legend representing features with the given value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + preview?: HTMLElement; + } + + /** + * Describes the schema of the SymbolTableElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). This legend element is used for [UniqueValueRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html) and [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + export interface SymbolTableElement extends Object { + /** + * The type of this element is always `symbol-table`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + type: string; + /** + * The title of the renderer as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + title?: string | RendererTitle; + /** + * Only used for renderers set to ImageryLayers. Indicates the type of renderer set on the layer (e.g. `stretched` or `Unique Values`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + legendType?: string; + /** + * An array of each symbol/category/break rendered for the symbol table. For example, this may be individual breaks for a ClassBreaksRenderer, or unique values for a UniqueValueRenderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + infos: SymbolTableElementType[]; + } + + /** + * Properties defining the scheme of the SymbolTableElementInfo. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + export interface SymbolTableElementInfo extends Object { + /** + * The title of the renderer as displayed in the Legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + label: string | RampTitle; + /** + * The value corresponding with the given `symbol` in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + value?: any; + /** + * The symbol for the corresponding `value` in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + symbol: Symbol; + /** + * The size of the symbol in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + size?: number; + /** + * A preview of the symbol element as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + preview?: HTMLElement; + } + + /** + * Properties defining the scheme of each SymbolTableElementType. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementType) + */ + export type SymbolTableElementType = ImageSymbolTableElementInfo | SymbolTableElementInfo; + export interface LegendLayerInfos extends Object { /** * Specifies a title for the layer to display above its symbols and descriptions. If no title is specified the service name is used. @@ -55119,12 +60954,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#iconClass) */ iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#label) - */ - readonly label: string; /** * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). * @@ -55299,13 +61128,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#label) - */ - readonly label: string; + iconClass: string; /** * Sets the layout of the widget to either `horizontal` or `vertical`. See the table below for a list of possible values. * @@ -55364,6 +61187,12 @@ declare namespace __esri { export const NavigationToggle: NavigationToggleConstructor; interface NavigationToggleProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#iconClass) + */ + iconClass?: string; /** * Sets the layout of the widget to either `horizontal` or `vertical`. See the table below for a list of possible values. * @@ -55474,6 +61303,19 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) */ actions: Collection; + /** + * Indicates whether [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) within the popup should display in a menu item. + * + * | actionsMenuEnabled = false | actionsMenuEnabled = true | + * | -------------------------- | ------------------------- | + * | ![actions49](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-49.png) | ![actions410](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-410.png) | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actionsMenuEnabled) + * + * @default true + */ + actionsMenuEnabled: boolean; /** * Position of the popup in relation to the selected feature. **Possible Values:** auto | top-center | top-right | bottom-left | bottom-center | bottom-right | Function * @@ -55526,6 +61368,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#currentDockPosition) */ readonly currentDockPosition: string; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * Indicates whether the placement of the popup is docked to the side of the view. Docking the popup allows for a better user experience, particularly when opening popups in apps on mobile devices. When a popup is "dockEnabled" it means the popup no longer points to the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) or the [location](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#location) assigned to it. Rather it is attached to a side, the top, or the bottom of the view. See [dockOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#dockOptions) to override default options related to docking the popup. * @@ -55734,6 +61584,19 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) */ actions?: CollectionProperties; + /** + * Indicates whether [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) within the popup should display in a menu item. + * + * | actionsMenuEnabled = false | actionsMenuEnabled = true | + * | -------------------------- | ------------------------- | + * | ![actions49](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-49.png) | ![actions410](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-410.png) | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actionsMenuEnabled) + * + * @default true + */ + actionsMenuEnabled?: boolean; /** * Position of the popup in relation to the selected feature. **Possible Values:** auto | top-center | top-right | bottom-left | bottom-center | bottom-right | Function * @@ -55780,6 +61643,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) */ content?: string | HTMLElement | WidgetProperties; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * Indicates whether the placement of the popup is docked to the side of the view. Docking the popup allows for a better user experience, particularly when opening popups in apps on mobile devices. When a popup is "dockEnabled" it means the popup no longer points to the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) or the [location](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#location) assigned to it. Rather it is attached to a side, the top, or the bottom of the view. See [dockOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#dockOptions) to override default options related to docking the popup. * @@ -55899,6 +61770,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#content) */ content: string | HTMLElement | Widget; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * The number of selected [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#features) available to the popup. * @@ -56082,6 +61961,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#content) */ content?: string | HTMLElement | WidgetProperties; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#title) of the poup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#selectedFeature). This value is `null` if no features are associated with the popup. * @@ -56305,13 +62192,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#label) - */ - readonly label: string; + iconClass: string; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -56360,6 +62241,12 @@ declare namespace __esri { export const Print: PrintConstructor; interface PrintProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#iconClass) + */ + iconClass?: string; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -56763,13 +62650,21 @@ declare namespace __esri { interface widgetsSearch extends Widget, GoTo { /** - * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) object currently selected. Can be either a [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) or a module:esri/widget/Search/LocatorSearchSource. + * The current active menu of the Search widget. **Possible Values:** none | suggestion | source | warning + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#activeMenu) + * + * @default none + */ + activeMenu: string; + /** + * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) object currently selected. Can be either a [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) or a module:esri/widget/Search/LocatorSearchSource. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#activeSource) * * @default null */ - readonly activeSource: FeatureLayerSearchSource | LocatorSearchSource; + readonly activeSource: LayerSearchSource | LocatorSearchSource; /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -56786,6 +62681,12 @@ declare namespace __esri { * @default "Find address or place" */ allPlaceholder: string; + /** + * The combined collection of [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) and [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources). The [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) displays first in the Search UI. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#allSources) + */ + readonly allSources: Collection; /** * Indicates whether to automatically select and zoom to the first geocoded result. If `false`, the [findAddressCandidates](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm) operation will still geocode the input string, but the top result will not be selected. To work with the geocoded results, you can set up a [search-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#event:search-complete) event handler and get the results through the event object. * @@ -56794,12 +62695,18 @@ declare namespace __esri { * @default true */ autoSelect: boolean; + /** + * A read-only property that is a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) and/or [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html). This property may contain [ArcGIS Portal](https://enterprise.arcgis.com/en/portal/) [locators](http://enterprise.arcgis.com/en/server/latest/publish-services/windows/geocode-services.htm) and any web map or web scene [configurable search sources](http://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm). This property is used to populate the Search UI if the [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) property is not set. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#defaultSources) + */ + readonly defaultSources: Collection; /** * The widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#iconClass) */ - readonly iconClass: string; + iconClass: string; /** * Indicates whether or not to include [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) in the Search UI. This can be a boolean value or a function that returns an array of Search [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources). * @@ -56808,12 +62715,6 @@ declare namespace __esri { * @default true */ includeDefaultSources: boolean | Function; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#label) - */ - readonly label: string; /** * Enables location services within the widget. ![locationEnabled](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/search-locationEnabled.png) * > The use of this property is only supported on secure origins. To use it, switch your application to a secure origin, such as HTTPS. Note that localhost is considered "potentially secure" and can be used for easy testing in browsers that supports [Window.isSecureContext](https://developer.mozilla.org/en-US/docs/Web/API/Window/isSecureContext#Browser_compatibility) (currently Chrome and Firefox). @@ -56856,11 +62757,9 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * A customized PopupTemplate for the selected feature. Note that specifying a wildcard {*} for the popupTemplate will return all fields in addition to search-specific fields. + * A customized [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) for the selected feature. Note that any templates defined on [allSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#allSources) take precedence over those defined directly on the template. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#popupTemplate) - * - * @default null */ popupTemplate: PopupTemplate; /** @@ -56912,7 +62811,7 @@ declare namespace __esri { readonly selectedResult: SearchResult; /** * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -56921,7 +62820,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) */ - sources: Collection; + sources: Collection; /** * An array of results from the [suggest method](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#suggest). This is available if working with a 10.3 or greater geocoding service that has [suggest capability loaded](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm) or a 10.3 or greater feature layer that supports pagination, i.e. `supportsPagination = true`. * @@ -57014,6 +62913,14 @@ declare namespace __esri { export const widgetsSearch: widgetsSearchConstructor; interface widgetsSearchProperties extends WidgetProperties, GoToProperties { + /** + * The current active menu of the Search widget. **Possible Values:** none | suggestion | source | warning + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#activeMenu) + * + * @default none + */ + activeMenu?: string; /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -57038,6 +62945,12 @@ declare namespace __esri { * @default true */ autoSelect?: boolean; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#iconClass) + */ + iconClass?: string; /** * Indicates whether or not to include [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) in the Search UI. This can be a boolean value or a function that returns an array of Search [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources). * @@ -57088,11 +63001,9 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * A customized PopupTemplate for the selected feature. Note that specifying a wildcard {*} for the popupTemplate will return all fields in addition to search-specific fields. + * A customized [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) for the selected feature. Note that any templates defined on [allSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#allSources) take precedence over those defined directly on the template. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#popupTemplate) - * - * @default null */ popupTemplate?: PopupTemplateProperties; /** @@ -57125,7 +63036,7 @@ declare namespace __esri { searchTerm?: string; /** * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -57134,7 +63045,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) */ - sources?: CollectionProperties; + sources?: CollectionProperties; /** * Enable suggestions for the widget. This is only available if working with a 10.3 or greater geocoding service that has [suggest capability loaded](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm) or a 10.3 or greater feature layer that supports pagination, i.e. `supportsPagination = true`. * @@ -57157,121 +63068,121 @@ declare namespace __esri { viewModel?: SearchViewModelProperties; } - interface FeatureLayerSearchSource extends SearchSource, JSONSupport { + interface LayerSearchSource extends SearchSource, JSONSupport { /** * The results are displayed using this field. Defaults to the layer's `displayField` or the first string field. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#displayField) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#displayField) */ displayField: string; /** * Indicates to only return results that match the search value exactly. This property only applies to `string` field searches. `exactMatch` is always `true` when searching fields of type `number`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#exactMatch) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#exactMatch) * * @default false */ exactMatch: boolean; /** - * The feature layer queried in the search. This is **required**. - * > Feature layers created from client-side graphics are not supported. + * The layer queried in the search. This is **required**. + * > Layers created from client-side graphics are not supported. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#featureLayer) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#layer) */ - featureLayer: FeatureLayer; + layer: Layer; /** * The name of the source for display. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#name) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#name) */ name: string; /** * An array of string values representing the names of fields in the feature layer to search. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchFields) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchFields) */ searchFields: string[]; /** * A template string used to display multiple fields in a defined order when results are displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchTemplate) */ searchTemplate: string; /** * A template string used to display multiple fields in a defined order when suggestions are displayed. This takes precedence over `displayField`. Field names in the template must have the following format: `{FieldName}`. An example suggestionTemplate could look something like: `Name: {OWNER}, Parcel: {PARCEL_ID}`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#suggestionTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#suggestionTemplate) */ suggestionTemplate: string; /** * Creates a deep clone of this object. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#clone) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#clone) * * */ - clone(): FeatureLayerSearchSource; + clone(): LayerSearchSource; } - interface FeatureLayerSearchSourceConstructor { + interface LayerSearchSourceConstructor { /** - * The following properties define a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html)-based [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) whose features may be searched by a [Search](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) widget instance. + * The following properties define a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html)-based [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) whose features may be searched by a [Search](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) widget instance. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) */ - new (properties?: FeatureLayerSearchSourceProperties): FeatureLayerSearchSource; + new (properties?: LayerSearchSourceProperties): LayerSearchSource; - fromJSON(json: any): FeatureLayerSearchSource; + fromJSON(json: any): LayerSearchSource; } - export const FeatureLayerSearchSource: FeatureLayerSearchSourceConstructor; + export const LayerSearchSource: LayerSearchSourceConstructor; - interface FeatureLayerSearchSourceProperties extends SearchSourceProperties { + interface LayerSearchSourceProperties extends SearchSourceProperties { /** * The results are displayed using this field. Defaults to the layer's `displayField` or the first string field. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#displayField) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#displayField) */ displayField?: string; /** * Indicates to only return results that match the search value exactly. This property only applies to `string` field searches. `exactMatch` is always `true` when searching fields of type `number`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#exactMatch) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#exactMatch) * * @default false */ exactMatch?: boolean; /** - * The feature layer queried in the search. This is **required**. - * > Feature layers created from client-side graphics are not supported. + * The layer queried in the search. This is **required**. + * > Layers created from client-side graphics are not supported. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#featureLayer) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#layer) */ - featureLayer?: FeatureLayerProperties; + layer?: LayerProperties; /** * The name of the source for display. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#name) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#name) */ name?: string; /** * An array of string values representing the names of fields in the feature layer to search. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchFields) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchFields) */ searchFields?: string[]; /** * A template string used to display multiple fields in a defined order when results are displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchTemplate) */ searchTemplate?: string; /** * A template string used to display multiple fields in a defined order when suggestions are displayed. This takes precedence over `displayField`. Field names in the template must have the following format: `{FieldName}`. An example suggestionTemplate could look something like: `Name: {OWNER}, Parcel: {PARCEL_ID}`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#suggestionTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#suggestionTemplate) */ suggestionTemplate?: string; } @@ -57522,7 +63433,7 @@ declare namespace __esri { popupEnabled: boolean; /** * The popup template used to display search results. If no popup is needed, set the source's popupTemplate to `null`. - * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. + * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#popupTemplate) */ @@ -57573,6 +63484,25 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#zoomScale) */ zoomScale: number; + + /** + * Method to provide parameters for a given search source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getResults) + * + * @param resultsParams An object that is passed as a parameter to get search results. + * + */ + getResults(resultsParams: GetResultsParameters): IPromise; + /** + * Method to provide parameters for search suggestions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getSuggestions) + * + * @param suggestionsParams An object that is passed as a parameter for search suggestions. + * + */ + getSuggestions(suggestionsParams: GetSuggestionsParameters): IPromise; } interface SearchSourceConstructor { @@ -57642,7 +63572,7 @@ declare namespace __esri { popupEnabled?: boolean; /** * The popup template used to display search results. If no popup is needed, set the source's popupTemplate to `null`. - * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. + * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#popupTemplate) */ @@ -57695,6 +63625,94 @@ declare namespace __esri { zoomScale?: number; } + /** + * Specifies the object that is passed as a parameter to [getResults()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getResults). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + export interface GetResultsParameters extends Object { + /** + * The key field used to find the result. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + exactMatch?: boolean; + /** + * The location value used by the Search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + location?: Point; + /** + * Indicates the maximum number of search results to return. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + maxResults?: number; + /** + * Indicates the index of the search source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + sourceIndex?: number; + /** + * Indicates the Spatial Refeference defined by the source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + spatialReference?: SpatialReference; + /** + * Indicates the Suggest Result that triggered the search for a result. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + suggestResult?: SuggestResult; + /** + * Indicates the view provided to the Search Widget using the source. + * + * [Read more...](global.html) + */ + view?: MapView | SceneView; + } + + /** + * Specifies the object that is passed as a parameter to [getSuggestions()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getSuggestions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + export interface GetSuggestionsParameters extends Object { + /** + * Indicates the maximum number of suggestions to return for the widget's input. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + maxSuggestions?: number; + /** + * Indicates the index of the search source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + sourceIndex?: number; + /** + * Indicates the Spatial Refeference defined by the source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + spatialReference?: SpatialReference; + /** + * Indicates search term used to find a suggestion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + suggestTerm?: string; + /** + * Indicates the view provided to the Search Widget using the source. + * + * [Read more...](global.html) + */ + view?: MapView | SceneView; + } + export interface SearchSourceFilter extends Object { /** * The where clause specified for filtering suggests or search results. @@ -57703,7 +63721,7 @@ declare namespace __esri { */ where?: string; /** - * The filter geometry for suggests or search results. + * The filter geometry for suggests or search results. [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) is the only supported geometry when working with [locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) sources. See [Find Address Candidates](https://developers.arcgis.com/rest/services-reference/find-address-candidates.htm) for additional information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#filter) */ @@ -57712,11 +63730,11 @@ declare namespace __esri { interface SearchViewModel extends Accessor, Evented, GoTo { /** - * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) object currently selected. Can be either a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or a [locator task](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). + * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) object currently selected. Can be either a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) or a [locator task](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#activeSource) */ - readonly activeSource: FeatureLayerSearchSource | LocatorSearchSource; + readonly activeSource: LayerSearchSource | LocatorSearchSource; /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -57738,7 +63756,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#allSources) */ - readonly allSources: Collection; + readonly allSources: Collection; /** * Indicates whether to automatically select and zoom to the first geocoded result. If `false`, the [findAddressCandidates](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm) operation will still geocode the input string, but the top result will not be selected. To work with the geocoded results, you can set up a [search-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#event:search-complete) event handler and get the results through the event object. * @@ -57748,11 +63766,11 @@ declare namespace __esri { */ autoSelect: boolean; /** - * A read-only property that is a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of module:esri/widgets/Search/FeaturelayerSource and/or [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html). This property may contain [ArcGIS Portal](https://enterprise.arcgis.com/en/portal/) [locators](http://enterprise.arcgis.com/en/server/latest/publish-services/windows/geocode-services.htm) and any web map or web scene [configurable search sources](http://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm). This property is used to populate the Search UI if the [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) property is not set. + * A read-only property that is a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) and/or [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html). This property may contain [ArcGIS Portal](https://enterprise.arcgis.com/en/portal/) [locators](http://enterprise.arcgis.com/en/server/latest/publish-services/windows/geocode-services.htm) and any web map or web scene [configurable search sources](http://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm). This property is used to populate the Search UI if the [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) property is not set. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) */ - readonly defaultSources: Collection; + readonly defaultSources: Collection; /** * The default [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html) for the search result. * @@ -57892,8 +63910,8 @@ declare namespace __esri { */ readonly selectedSuggestion: Geometry | SearchViewModelSuggestResult; /** - * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * The Search widget may be used to search features in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -57901,7 +63919,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) */ - sources: Collection; + sources: Collection; /** * The current state of the widget. This property was removed from [Search](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) and should now be accessed within the [SearchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html). **Possible Values:** ready | disabled | searching | loading * @@ -58125,8 +64143,8 @@ declare namespace __esri { */ searchTerm?: string; /** - * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * The Search widget may be used to search features in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -58134,7 +64152,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) */ - sources?: CollectionProperties; + sources?: CollectionProperties; /** * The millisecond delay after keyup and before making a [suggest](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#suggest) network request. * @@ -58801,12 +64819,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#createGraphic) */ readonly createGraphic: Graphic; + /** + * Default update options set for the Sketch widget. Update options set on this property will be overwritten if the update options are changed when [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + */ + readonly defaultUpdateOptions: SketchDefaultUpdateOptions; /** * The Sketch widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#iconClass) */ - readonly iconClass: string; + iconClass: string; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the Sketch widget. The Sketch widget adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -58834,11 +64858,11 @@ declare namespace __esri { */ readonly updateGraphics: Collection; /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the Sketch widget to a specific view. + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the Sketch widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#view) */ - view: MapView; + view: MapView | SceneView; /** * The view model for the Sketch widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) class to access all properties and methods on the Sketch widget. * @@ -58869,7 +64893,7 @@ declare namespace __esri { */ complete(): void; /** - * Create a graphic with a geometry specified in `tool`. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event:create) event will start firing. **Note:** Creating a circle geometry does not work in all spatial references. + * Create a graphic with a geometry specified in `tool`. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event:create) event will start firing. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#create) * @@ -58923,28 +64947,28 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) * - * @param graphics An array of graphics to be updated. Only graphics added to the Sketch widget's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property can be updated. + * @param graphics A graphic or an array of graphics to be updated. Only graphics added to SketchViewModel's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property can be updated. * @param updateOptions Update options for the graphics to be updated. * @param updateOptions.tool * Name of the update tool. Specifies the update operation for the selected graphics. **Possible Values:** * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * @param updateOptions.enableRotation Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * @param updateOptions.enableScaling Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. - * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * @param updateOptions.toggleToolOnClick Indicates if the graphic being updated can be toggled between `transform` and `reshape` update options. * */ - update(graphics: Graphic[], updateOptions?: SketchUpdateUpdateOptions): void; + update(graphics: Graphic | Graphic[], updateOptions?: SketchUpdateUpdateOptions): IPromise; } interface SketchConstructor { /** - * Sketch widget provides a simple UI for creating and updating graphics on the 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This significantly minimizes the code required for working with graphics in the view. It is intended to be used with [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) stored in its [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property. + * Sketch widget provides a simple UI for creating and updating graphics on a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). This significantly minimizes the code required for working with graphics in the view. It is intended to be used with [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) stored in its [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html) */ @@ -58955,6 +64979,12 @@ declare namespace __esri { export const Sketch: SketchConstructor; interface SketchProperties extends WidgetProperties { + /** + * The Sketch widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#iconClass) + */ + iconClass?: string; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the Sketch widget. The Sketch widget adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -58970,11 +65000,11 @@ declare namespace __esri { */ layout?: string; /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the Sketch widget to a specific view. + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the Sketch widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#view) */ - view?: MapViewProperties; + view?: MapViewProperties | SceneViewProperties; /** * The view model for the Sketch widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) class to access all properties and methods on the Sketch widget. * @@ -58997,11 +65027,11 @@ declare namespace __esri { */ readonly createGraphic: Graphic; /** - * Default update options set for the SketchViewModel. Update options set on this property will be overwritten if the update options are changed when [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) method is called. + * Default update options set for the SketchViewModel. Update options set on this property will be overridden by options passed to the [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) method. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) */ - readonly defaultUpdateOptions: SketchViewModelDefaultUpdateOptions; + defaultUpdateOptions: SketchViewModelDefaultUpdateOptions; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the SketchViewModel. The SketchViewModel adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -59078,7 +65108,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#view) */ - view: MapView; + view: MapView | SceneView; /** * Cancels the active operation and fires the [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:create) or [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:update) event and changes the event's state to `cancel`. @@ -59097,7 +65127,7 @@ declare namespace __esri { */ complete(): void; /** - * Create a graphic with a geometry specified in `tool` parameter. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:create) event will start firing. **Note:** Creating a circle geometry does not work in all spatial references. + * Create a graphic with a geometry specified in `tool` parameter. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:create) event will start firing. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) * @@ -59143,23 +65173,23 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) * - * @param graphics An array of graphics to be updated. Only graphics added to SketchViewModel's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#layer) property can be updated. + * @param graphics A graphic or an array of graphics to be updated. Only graphics added to SketchViewModel's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#layer) property can be updated. * @param updateOptions Update options for the graphics to be updated. * @param updateOptions.tool * Name of the update tool. Specifies the update operation for the selected graphics. **Possible Values:** * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) and [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * @param updateOptions.enableRotation Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * @param updateOptions.enableScaling Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. - * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * @param updateOptions.toggleToolOnClick Indicates if the graphic being updated can be toggled between `transform` and `reshape` update options. * */ - update(graphics: Graphic[], updateOptions?: SketchViewModelUpdateUpdateOptions): void; + update(graphics: Graphic | Graphic[], updateOptions?: SketchViewModelUpdateUpdateOptions): IPromise; } interface SketchViewModelConstructor { @@ -59175,6 +65205,12 @@ declare namespace __esri { export const SketchViewModel: SketchViewModelConstructor; interface SketchViewModelProperties { + /** + * Default update options set for the SketchViewModel. Update options set on this property will be overridden by options passed to the [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) method. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) + */ + defaultUpdateOptions?: SketchViewModelDefaultUpdateOptions; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the SketchViewModel. The SketchViewModel adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -59239,7 +65275,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#view) */ - view?: MapViewProperties; + view?: MapViewProperties | SceneViewProperties; } export interface SketchViewModelCreateCreateOptions extends Object { @@ -59260,13 +65296,13 @@ declare namespace __esri { export interface SketchViewModelDefaultUpdateOptions extends Object { /** - * Name of the update tool. The default tool is `move` for graphics with `point` and `multipoint` geometries and `transform` for graphics with `polygon` and `polyline` geometries. + * Name of the update tool. The default tool is `transform` for graphics with polygon and polyline geometries and `move` for graphics with point and multipoint geometries. However, if a graphic with point geometry uses a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), the default tool is `transform`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) */ tool?: string; /** - * Indicates if the `rotation` operation will be enabled when updating graphics. + * Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) * @@ -59274,7 +65310,7 @@ declare namespace __esri { */ enableRotation?: boolean; /** - * Indicates if the `scale` operation will be enabled when updating graphics. + * Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) * @@ -59282,7 +65318,15 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. + * Indicates whether more than one selection can be made at once. This pertains to shift+click interaction with the `transform` tool. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) + * + * @default true + */ + multipleSelectionEnabled?: boolean; + /** + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) * @@ -59305,9 +65349,9 @@ declare namespace __esri { * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) and [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) @@ -59330,7 +65374,7 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) * @@ -59510,15 +65554,64 @@ declare namespace __esri { mode?: string; } + export interface SketchDefaultUpdateOptions extends Object { + /** + * Name of the update tool. The default tool is `transform` for graphics with polygon and polyline geometries and `move` for graphics with point and multipoint geometries. However, if a graphic with point geometry uses a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), the default tool is `transform`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + */ + tool?: string; + /** + * Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + enableRotation?: boolean; + /** + * Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + enableScaling?: boolean; + /** + * Indicates whether more than one selection can be made at once. This pertains to shift+click interaction with the `transform` tool. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + multipleSelectionEnabled?: boolean; + /** + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default false + */ + preserveAspectRatio?: boolean; + /** + * Indicates if the graphic being updated can be toggled between `transform` and `reshape` update options. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + toggleToolOnClick?: boolean; + } + export interface SketchUpdateUpdateOptions extends Object { /** * Name of the update tool. Specifies the update operation for the selected graphics. **Possible Values:** * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) @@ -59541,7 +65634,7 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) * @@ -59683,6 +65776,7 @@ declare namespace __esri { * disabled | not ready yet * ready | ready for slicing * slicing | currently slicing + * sliced | finished slicing * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slice-SliceViewModel.html#state) @@ -59966,13 +66060,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#label) - */ - readonly label: string; + iconClass: string; /** * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). * @@ -60071,6 +66159,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#graphic) */ graphic?: GraphicProperties; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#iconClass) + */ + iconClass?: string; /** * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). * @@ -60389,16 +66483,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#id) */ id: string; + /** + * The widget's label. This property is useful whenever the widget is controlled by another one (e.g. [Expand](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html)) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#label) + */ + label: string; /** * A utility method used for building the value for a widget's `class` property. This aids in simplifying CSS class setup. - * > Prior to version 4.7, there were various approaches towards setting CSS classes. These were dependent upon variables, such as whether the classes were: - * * a single static class, - * * multiple static classes, or - * * dynamic classes. - * - * - * This helper method takes all of these approaches into account and simplifies it to use one single pattern to accommodate these multiple approaches. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#classes) * @@ -60480,6 +66573,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#id) */ id?: string; + /** + * The widget's label. This property is useful whenever the widget is controlled by another one (e.g. [Expand](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html)) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#label) + */ + label?: string; } interface Widgette { @@ -60547,13 +66646,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#label) - */ - readonly label: string; + iconClass: string; /** * Determines the layout/orientation of the Zoom widget. **Possible Values:** vertical | horizontal * @@ -60614,6 +66707,12 @@ declare namespace __esri { export const Zoom: ZoomConstructor; interface ZoomProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#iconClass) + */ + iconClass?: string; /** * Determines the layout/orientation of the Zoom widget. **Possible Values:** vertical | horizontal * @@ -60841,6 +66940,11 @@ declare module "esri/PopupTemplate" { export = PopupTemplate; } +declare module "esri/TimeExtent" { + import TimeExtent = __esri.TimeExtent; + export = TimeExtent; +} + declare module "esri/Viewpoint" { import Viewpoint = __esri.Viewpoint; export = Viewpoint; @@ -60926,11 +67030,6 @@ declare module "esri/geometry/Polyline" { export = Polyline; } -declare module "esri/geometry/ScreenPoint" { - import ScreenPoint = __esri.ScreenPoint; - export = ScreenPoint; -} - declare module "esri/geometry/SpatialReference" { import SpatialReference = __esri.SpatialReference; export = SpatialReference; @@ -60951,6 +67050,16 @@ declare module "esri/geometry/support/MeshComponent" { export = MeshComponent; } +declare module "esri/geometry/support/MeshMaterial" { + import MeshMaterial = __esri.MeshMaterial; + export = MeshMaterial; +} + +declare module "esri/geometry/support/MeshTexture" { + import MeshTexture = __esri.MeshTexture; + export = MeshTexture; +} + declare module "esri/geometry/support/ValueMeshColor" { import ValueMeshColor = __esri.ValueMeshColor; export = ValueMeshColor; @@ -61011,6 +67120,11 @@ declare module "esri/layers/FeatureLayer" { export = FeatureLayer; } +declare module "esri/layers/GeoJSONLayer" { + import GeoJSONLayer = __esri.GeoJSONLayer; + export = GeoJSONLayer; +} + declare module "esri/layers/GeoRSSLayer" { import GeoRSSLayer = __esri.GeoRSSLayer; export = GeoRSSLayer; @@ -61261,6 +67375,11 @@ declare module "esri/layers/support/TileMatrixSet" { export = TileMatrixSet; } +declare module "esri/layers/support/TimeInfo" { + import TimeInfo = __esri.TimeInfo; + export = TimeInfo; +} + declare module "esri/layers/support/WMSSublayer" { import WMSSublayer = __esri.WMSSublayer; export = WMSSublayer; @@ -61321,6 +67440,11 @@ declare module "esri/renderers/ClassBreaksRenderer" { export = ClassBreaksRenderer; } +declare module "esri/renderers/DotDensityRenderer" { + import DotDensityRenderer = __esri.DotDensityRenderer; + export = DotDensityRenderer; +} + declare module "esri/renderers/HeatmapRenderer" { import HeatmapRenderer = __esri.HeatmapRenderer; export = HeatmapRenderer; @@ -61341,6 +67465,11 @@ declare module "esri/renderers/UniqueValueRenderer" { export = UniqueValueRenderer; } +declare module "esri/renderers/StretchRenderer" { + import StretchRenderer = __esri.StretchRenderer; + export = StretchRenderer; +} + declare module "esri/renderers/PointCloudRenderer" { import PointCloudRenderer = __esri.PointCloudRenderer; export = PointCloudRenderer; @@ -61366,6 +67495,11 @@ declare module "esri/renderers/PointCloudUniqueValueRenderer" { export = PointCloudUniqueValueRenderer; } +declare module "esri/renderers/support/AttributeColorInfo" { + import AttributeColorInfo = __esri.AttributeColorInfo; + export = AttributeColorInfo; +} + declare module "esri/renderers/support/AuthoringInfo" { import AuthoringInfo = __esri.AuthoringInfo; export = AuthoringInfo; @@ -61431,109 +67565,99 @@ declare module "esri/support/actions/ActionToggle" { export = ActionToggle; } -declare module "esri/support/ExpressionInfo" { +declare module "esri/popup/ExpressionInfo" { import ExpressionInfo = __esri.ExpressionInfo; export = ExpressionInfo; } -declare module "esri/support/FieldInfo" { +declare module "esri/popup/FieldInfo" { import FieldInfo = __esri.FieldInfo; export = FieldInfo; } -declare module "esri/support/LayerOptions" { +declare module "esri/popup/LayerOptions" { import LayerOptions = __esri.LayerOptions; export = LayerOptions; } -declare module "esri/support/RelatedRecordsInfo" { +declare module "esri/popup/RelatedRecordsInfo" { import RelatedRecordsInfo = __esri.RelatedRecordsInfo; export = RelatedRecordsInfo; } -declare module "esri/support/ContentElement/Attachments" { - import Attachments = __esri.Attachments; - export = Attachments; +declare module "esri/popup/content/AttachmentsContent" { + import AttachmentsContent = __esri.AttachmentsContent; + export = AttachmentsContent; } -declare module "esri/support/ContentElement/ContentElement" { - import ContentElementContentElement = __esri.ContentElementContentElement; - export = ContentElementContentElement; +declare module "esri/popup/content/BarChartMediaInfo" { + import BarChartMediaInfo = __esri.BarChartMediaInfo; + export = BarChartMediaInfo; } -declare module "esri/support/ContentElement/Fields" { - import Fields = __esri.Fields; - export = Fields; +declare module "esri/popup/content/ColumnChartMediaInfo" { + import ColumnChartMediaInfo = __esri.ColumnChartMediaInfo; + export = ColumnChartMediaInfo; } -declare module "esri/support/ContentElement/Media" { - import Media = __esri.Media; - export = Media; +declare module "esri/popup/content/Content" { + import Content = __esri.Content; + export = Content; } -declare module "esri/support/ContentElement/Text" { - import Text = __esri.Text; - export = Text; +declare module "esri/popup/content/FieldsContent" { + import FieldsContent = __esri.FieldsContent; + export = FieldsContent; } -declare module "esri/support/ContentElement/Media/BarChart" { - import BarChart = __esri.BarChart; - export = BarChart; +declare module "esri/popup/content/ImageMediaInfo" { + import ImageMediaInfo = __esri.ImageMediaInfo; + export = ImageMediaInfo; } -declare module "esri/support/ContentElement/Media/Chart" { - import Chart = __esri.Chart; - export = Chart; +declare module "esri/popup/content/MediaContent" { + import MediaContent = __esri.MediaContent; + export = MediaContent; } -declare module "esri/support/ContentElement/Media/ColumnChart" { - import ColumnChart = __esri.ColumnChart; - export = ColumnChart; +declare module "esri/popup/content/LineChartMediaInfo" { + import LineChartMediaInfo = __esri.LineChartMediaInfo; + export = LineChartMediaInfo; } -declare module "esri/support/ContentElement/Media/LineChart" { - import LineChart = __esri.LineChart; - export = LineChart; +declare module "esri/popup/content/PieChartMediaInfo" { + import PieChartMediaInfo = __esri.PieChartMediaInfo; + export = PieChartMediaInfo; } -declare module "esri/support/ContentElement/Media/Media" { - import MediaMedia = __esri.MediaMedia; - export = MediaMedia; +declare module "esri/popup/content/TextContent" { + import TextContent = __esri.TextContent; + export = TextContent; } -declare module "esri/support/ContentElement/Media/PieChart" { - import PieChart = __esri.PieChart; - export = PieChart; +declare module "esri/popup/content/support/ChartMediaInfoValue" { + import ChartMediaInfoValue = __esri.ChartMediaInfoValue; + export = ChartMediaInfoValue; } -declare module "esri/support/ContentElement/Media/Chart/Series" { - import Series = __esri.Series; - export = Series; +declare module "esri/popup/content/support/ChartMediaInfoValueSeries" { + import ChartMediaInfoValueSeries = __esri.ChartMediaInfoValueSeries; + export = ChartMediaInfoValueSeries; } -declare module "esri/support/ContentElement/Media/Chart/Value" { - import Value = __esri.Value; - export = Value; +declare module "esri/popup/content/support/ImageMediaInfoValue" { + import ImageMediaInfoValue = __esri.ImageMediaInfoValue; + export = ImageMediaInfoValue; } -declare module "esri/support/ContentElement/Media/Image" { - import Image = __esri.Image; - export = Image; -} - -declare module "esri/support/ContentElement/Media/Image/Value" { - import ImageValue = __esri.ImageValue; - export = ImageValue; -} - -declare module "esri/support/FieldInfo/Format" { +declare module "esri/popup/support/FieldInfoFormat" { import FieldInfoFormat = __esri.FieldInfoFormat; export = FieldInfoFormat; } -declare module "esri/support/RelatedRecordsInfo/FieldOrder" { - import FieldOrder = __esri.FieldOrder; - export = FieldOrder; +declare module "esri/popup/support/RelatedRecordsInfoFieldOrder" { + import RelatedRecordsInfoFieldOrder = __esri.RelatedRecordsInfoFieldOrder; + export = RelatedRecordsInfoFieldOrder; } declare module "esri/symbols/ExtrudeSymbol3DLayer" { @@ -61756,6 +67880,11 @@ declare module "esri/tasks/support/AddressCandidate" { export = AddressCandidate; } +declare module "esri/tasks/support/AlgorithmicColorRamp" { + import AlgorithmicColorRamp = __esri.AlgorithmicColorRamp; + export = AlgorithmicColorRamp; +} + declare module "esri/tasks/support/AreasAndLengthsParameters" { import AreasAndLengthsParameters = __esri.AreasAndLengthsParameters; export = AreasAndLengthsParameters; @@ -61781,6 +67910,11 @@ declare module "esri/tasks/support/ClosestFacilitySolveResult" { export = ClosestFacilitySolveResult; } +declare module "esri/tasks/support/ColorRamp" { + import ColorRamp = __esri.ColorRamp; + export = ColorRamp; +} + declare module "esri/tasks/support/DataFile" { import DataFile = __esri.DataFile; export = DataFile; @@ -61876,6 +68010,11 @@ declare module "esri/tasks/support/LinearUnit" { export = LinearUnit; } +declare module "esri/tasks/support/MultipartColorRamp" { + import MultipartColorRamp = __esri.MultipartColorRamp; + export = MultipartColorRamp; +} + declare module "esri/tasks/support/NAMessage" { import NAMessage = __esri.NAMessage; export = NAMessage; @@ -62042,7 +68181,7 @@ declare module "esri/views/layers/LayerView" { } declare module "esri/views/layers/CSVLayerView" { - import CSVLayerView = __esri.CSVLayerView; + type CSVLayerView = __esri.CSVLayerView; export = CSVLayerView; } @@ -62051,8 +68190,18 @@ declare module "esri/views/layers/FeatureLayerView" { export = FeatureLayerView; } +declare module "esri/views/layers/GeoJSONLayerView" { + type GeoJSONLayerView = __esri.GeoJSONLayerView; + export = GeoJSONLayerView; +} + +declare module "esri/views/layers/GeoRSSLayerView" { + type GeoRSSLayerView = __esri.GeoRSSLayerView; + export = GeoRSSLayerView; +} + declare module "esri/views/layers/GraphicsLayerView" { - import GraphicsLayerView = __esri.GraphicsLayerView; + type GraphicsLayerView = __esri.GraphicsLayerView; export = GraphicsLayerView; } @@ -62062,12 +68211,12 @@ declare module "esri/views/layers/ImageryLayerView" { } declare module "esri/views/layers/KMLLayerView" { - import KMLLayerView = __esri.KMLLayerView; + type KMLLayerView = __esri.KMLLayerView; export = KMLLayerView; } declare module "esri/views/layers/SceneLayerView" { - import SceneLayerView = __esri.SceneLayerView; + type SceneLayerView = __esri.SceneLayerView; export = SceneLayerView; } @@ -62076,6 +68225,16 @@ declare module "esri/views/layers/StreamLayerView" { export = StreamLayerView; } +declare module "esri/views/layers/support/FeatureFilter" { + import FeatureFilter = __esri.FeatureFilter; + export = FeatureFilter; +} + +declare module "esri/views/layers/support/FeatureEffect" { + import FeatureEffect = __esri.FeatureEffect; + export = FeatureEffect; +} + declare module "esri/views/ui/UI" { import UI = __esri.UI; export = UI; @@ -62091,41 +68250,51 @@ declare module "esri/views/2d/ViewState" { export = ViewState; } -declare module "esri/views/2d/draw/Draw" { +declare module "esri/views/draw/Draw" { import Draw = __esri.Draw; export = Draw; } -declare module "esri/views/2d/draw/DrawAction" { +declare module "esri/views/draw/DrawAction" { import DrawAction = __esri.DrawAction; export = DrawAction; } -declare module "esri/views/2d/draw/PointDrawAction" { +declare module "esri/views/draw/PointDrawAction" { import PointDrawAction = __esri.PointDrawAction; export = PointDrawAction; } -declare module "esri/views/2d/draw/PolylineDrawAction" { +declare module "esri/views/draw/PolylineDrawAction" { import PolylineDrawAction = __esri.PolylineDrawAction; export = PolylineDrawAction; } -declare module "esri/views/2d/draw/PolygonDrawAction" { +declare module "esri/views/draw/PolygonDrawAction" { import PolygonDrawAction = __esri.PolygonDrawAction; export = PolygonDrawAction; } -declare module "esri/views/2d/draw/MultipointDrawAction" { +declare module "esri/views/draw/MultipointDrawAction" { import MultipointDrawAction = __esri.MultipointDrawAction; export = MultipointDrawAction; } -declare module "esri/views/2d/draw/SegmentDrawAction" { +declare module "esri/views/draw/SegmentDrawAction" { import SegmentDrawAction = __esri.SegmentDrawAction; export = SegmentDrawAction; } +declare module "esri/views/2d/layers/BaseLayerView2D" { + import BaseLayerView2D = __esri.BaseLayerView2D; + export = BaseLayerView2D; +} + +declare module "esri/views/2d/layers/BaseLayerViewGL2D" { + import BaseLayerViewGL2D = __esri.BaseLayerViewGL2D; + export = BaseLayerViewGL2D; +} + declare module "esri/webmap/Bookmark" { import Bookmark = __esri.Bookmark; export = Bookmark; @@ -62136,6 +68305,11 @@ declare module "esri/webmap/InitialViewProperties" { export = InitialViewProperties; } +declare module "esri/webmap/background/ColorBackground" { + import ColorBackground = __esri.ColorBackground; + export = ColorBackground; +} + declare module "esri/webscene/ApplicationProperties" { import ApplicationProperties = __esri.ApplicationProperties; export = ApplicationProperties; @@ -62192,8 +68366,8 @@ declare module "esri/webscene/background/Background" { } declare module "esri/webscene/background/ColorBackground" { - import ColorBackground = __esri.ColorBackground; - export = ColorBackground; + import backgroundColorBackground = __esri.backgroundColorBackground; + export = backgroundColorBackground; } declare module "esri/widgets/AreaMeasurement2D" { @@ -62256,6 +68430,11 @@ declare module "esri/widgets/DistanceMeasurement2D" { export = DistanceMeasurement2D; } +declare module "esri/widgets/Editor" { + import Editor = __esri.Editor; + export = Editor; +} + declare module "esri/widgets/Expand" { import Expand = __esri.Expand; export = Expand; @@ -62431,6 +68610,16 @@ declare module "esri/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewMode export = DistanceMeasurement2DViewModel; } +declare module "esri/widgets/Editor/EditorViewModel" { + import EditorViewModel = __esri.EditorViewModel; + export = EditorViewModel; +} + +declare module "esri/widgets/Editor/Workflow" { + import Workflow = __esri.Workflow; + export = Workflow; +} + declare module "esri/widgets/Expand/ExpandViewModel" { import ExpandViewModel = __esri.ExpandViewModel; export = ExpandViewModel; @@ -62506,6 +68695,16 @@ declare module "esri/widgets/LayerList/ListItemPanel" { export = ListItemPanel; } +declare module "esri/widgets/Legend/LegendViewModel" { + import LegendViewModel = __esri.LegendViewModel; + export = LegendViewModel; +} + +declare module "esri/widgets/Legend/support/ActiveLayerInfo" { + import ActiveLayerInfo = __esri.ActiveLayerInfo; + export = ActiveLayerInfo; +} + declare module "esri/widgets/Locate/LocateViewModel" { import LocateViewModel = __esri.LocateViewModel; export = LocateViewModel; @@ -62536,9 +68735,9 @@ declare module "esri/widgets/ScaleBar/ScaleBarViewModel" { export = ScaleBarViewModel; } -declare module "esri/widgets/Search/FeatureLayerSearchSource" { - import FeatureLayerSearchSource = __esri.FeatureLayerSearchSource; - export = FeatureLayerSearchSource; +declare module "esri/widgets/Search/LayerSearchSource" { + import LayerSearchSource = __esri.LayerSearchSource; + export = LayerSearchSource; } declare module "esri/widgets/Search/LocatorSearchSource" { @@ -62561,6 +68760,11 @@ declare module "esri/widgets/Search/SearchViewModel" { export = SearchViewModel; } +declare module "esri/widgets/Sketch/SketchViewModel" { + import SketchViewModel = __esri.SketchViewModel; + export = SketchViewModel; +} + declare module "esri/widgets/Slice/SliceViewModel" { import SliceViewModel = __esri.SliceViewModel; export = SliceViewModel; @@ -62576,11 +68780,6 @@ declare module "esri/widgets/Zoom/ZoomViewModel" { export = ZoomViewModel; } -declare module "esri/widgets/Sketch/SketchViewModel" { - import SketchViewModel = __esri.SketchViewModel; - export = SketchViewModel; -} - declare module "esri/core/Evented" { import Evented = __esri.Evented; export = Evented; @@ -62601,11 +68800,6 @@ declare module "esri/core/Promise" { export = corePromise; } -declare module "esri/layers/DynamicLayer" { - import DynamicLayer = __esri.DynamicLayer; - export = DynamicLayer; -} - declare module "esri/layers/mixins/ArcGISCachedService" { import ArcGISCachedService = __esri.ArcGISCachedService; export = ArcGISCachedService; @@ -62646,6 +68840,11 @@ declare module "esri/layers/mixins/SublayersOwner" { export = SublayersOwner; } +declare module "esri/layers/mixins/TemporalLayer" { + import TemporalLayer = __esri.TemporalLayer; + export = TemporalLayer; +} + declare module "esri/renderers/mixins/VisualVariablesRenderer" { import VisualVariablesRenderer = __esri.VisualVariablesRenderer; export = VisualVariablesRenderer; @@ -62656,6 +68855,16 @@ declare module "esri/support/actions/ActionBase" { export = ActionBase; } +declare module "esri/popup/content/mixins/ChartMediaInfo" { + import ChartMediaInfo = __esri.ChartMediaInfo; + export = ChartMediaInfo; +} + +declare module "esri/popup/content/mixins/MediaInfo" { + import MediaInfo = __esri.MediaInfo; + export = MediaInfo; +} + declare module "esri/support/LayersMixin" { import LayersMixin = __esri.LayersMixin; export = LayersMixin; @@ -62671,6 +68880,11 @@ declare module "esri/views/DOMContainer" { export = DOMContainer; } +declare module "esri/views/MapViewBase" { + import MapViewBase = __esri.MapViewBase; + export = MapViewBase; +} + declare module "esri/widgets/Widgette" { import Widgette = __esri.Widgette; export = Widgette; @@ -62806,11 +69020,21 @@ declare module "esri/geometry/support/webMercatorUtils" { export = webMercatorUtils; } +declare module "esri/layers/support/fieldUtils" { + import fieldUtils = __esri.fieldUtils; + export = fieldUtils; +} + declare module "esri/renderers/smartMapping/creators/color" { import color = __esri.color; export = color; } +declare module "esri/renderers/smartMapping/creators/heatmap" { + import heatmap = __esri.heatmap; + export = heatmap; +} + declare module "esri/renderers/smartMapping/creators/location" { import location = __esri.location; export = location; @@ -62851,6 +69075,11 @@ declare module "esri/renderers/smartMapping/statistics/classBreaks" { export = classBreaks; } +declare module "esri/renderers/smartMapping/statistics/heatmapStatistics" { + import heatmapStatistics = __esri.heatmapStatistics; + export = heatmapStatistics; +} + declare module "esri/renderers/smartMapping/statistics/histogram" { import histogram = __esri.histogram; export = histogram; @@ -62871,6 +69100,11 @@ declare module "esri/renderers/smartMapping/symbology/color" { export = symbologyColor; } +declare module "esri/renderers/smartMapping/symbology/heatmap" { + import symbologyHeatmap = __esri.symbologyHeatmap; + export = symbologyHeatmap; +} + declare module "esri/renderers/smartMapping/symbology/location" { import symbologyLocation = __esri.symbologyLocation; export = symbologyLocation; @@ -62901,9 +69135,9 @@ declare module "esri/renderers/support/jsonUtils" { export = supportJsonUtils; } -declare module "esri/support/ContentElement" { - import ContentElement = __esri.ContentElement; - export = ContentElement; +declare module "esri/popup/content" { + import content = __esri.content; + export = content; } declare module "esri/symbols/support/jsonUtils" { @@ -62916,9 +69150,9 @@ declare module "esri/symbols/support/symbolPreview" { export = symbolPreview; } -declare module "esri/views/2d/layers/BaseLayerView2D" { - import BaseLayerView2D = __esri.BaseLayerView2D; - export = BaseLayerView2D; +declare module "esri/symbols/support/symbolUtils" { + import symbolUtils = __esri.symbolUtils; + export = symbolUtils; } declare module "esri/views/3d/externalRenderers" { diff --git a/types/arcgis-js-api/v3/index.d.ts b/types/arcgis-js-api/v3/index.d.ts index e38c5c0356..e595cdb9cc 100644 --- a/types/arcgis-js-api/v3/index.d.ts +++ b/types/arcgis-js-api/v3/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript 3.27 +// Type definitions for ArcGIS API for JavaScript 3.28 // Project: https://developers.arcgis.com/javascript/3/ // Definitions by: Esri // Bjorn Svensson @@ -3477,19 +3477,19 @@ declare module "esri/basemaps" { var basemaps: { /** The Light Gray Canvas basemap is designed to be used as a neutral background map for overlaying and emphasizing other map layers. */ gray: any; - /** The World Imagery map is a detailed imagery map layer and labels that is designed to be used as a basemap for various maps and applications. */ + /** The World Imagery with Labels map is a detailed imagery map layer and labels that is designed to be used as a basemap for various maps and applications: https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer */ hybrid: any; /** The Ocean Basemap is designed to be used as a basemap by marine GIS professionals and as a reference map by anyone interested in ocean data. */ oceans: any; /** The OpenStreetMap is a community map layer that is designed to be used as a basemap for various maps and applications. */ osm: any; - /** The World Imagery map is a detailed imagery map layer that is designed to be used as a basemap for various maps and applications. */ + /** The World Imagery map is a detailed imagery map layer that is designed to be used as a basemap for various maps and applications: https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer. */ satellite: any; - /** The Streets basemap presents a multiscale street map for the world. */ + /** The Streets basemap presents a multiscale street map for the world: https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer. */ streets: any; /** The Terrain with Labels basemap is designed to be used to overlay and emphasize other thematic map layers. */ terrain: any; - /** The Topographic map includes boundaries, cities, water features, physiographic features, parks, landmarks, transportation, and buildings. */ + /** The Topographic map includes boundaries, cities, water features, physiographic features, parks, landmarks, transportation, and buildings: https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer */ topo: any; }; export = basemaps; @@ -9228,8 +9228,9 @@ declare module "esri/lang" { * @param data The data object used in the substitution. * @param template The template used for the substitution. * @param first When true, returns only the first property found in the data object. + * @param format The format object used in the substitution. */ - substitute(data: any, template?: string, first?: boolean): string; + substitute(data: any, template?: string, first?: boolean, format?: any): string; /** * Iterates through the argument array and searches for the identifier to which the argument value matches. * @param array The argument array for testing. @@ -10000,6 +10001,8 @@ declare module "esri/layers/FeatureLayer" { displayField: string; /** Indicates the field names for the editor fields. */ editFieldsInfo: any; + /** Applicable to ArcGIS Online hosted feature services. */ + editingInfo: any; /** The array of fields in the layer. */ fields: Field[]; /** The full extent of the layer. */ @@ -10054,6 +10057,8 @@ declare module "esri/layers/FeatureLayer" { supportsAttachmentsByUploadId: boolean; /** When true, the layer supports the Calculate REST operation when updating features. */ supportsCalculate: boolean; + /** If true, the layer supports a user-defined field description. */ + supportsFieldDescription: boolean; /** When true, the layer supports statistical functions in query operations. */ supportsStatistics: boolean; /** When true, the layer is suspended. */ @@ -10468,6 +10473,8 @@ declare module "esri/layers/Field" { class Field { /** The alias name for the field. */ alias: string; + /** A string that describes the default value set for a field. */ + defaultValue: string; /** Domain associated with the field. */ domain: Domain; /** Indicates whether the field is editable. */ diff --git a/types/archiver/tslint.json b/types/archiver/tslint.json index 10e16aef18..7bfbd50b5b 100644 --- a/types/archiver/tslint.json +++ b/types/archiver/tslint.json @@ -3,6 +3,7 @@ "rules": { // TODOs "ban-types": false, + "npm-naming": false, "dt-header": false } } diff --git a/types/async-retry/async-retry-tests.ts b/types/async-retry/async-retry-tests.ts index 20dfc62c4b..83b5ac84cf 100644 --- a/types/async-retry/async-retry-tests.ts +++ b/types/async-retry/async-retry-tests.ts @@ -7,6 +7,7 @@ const o: Options = { minTimeout: 3, maxTimeout: 4, randomize: true, + forever: false, onRetry: (e: Error) => 42 }; diff --git a/types/async-retry/index.d.ts b/types/async-retry/index.d.ts index 6b50c71b63..1ef5fe8be9 100644 --- a/types/async-retry/index.d.ts +++ b/types/async-retry/index.d.ts @@ -1,8 +1,12 @@ -// Type definitions for async-retry 1.2 +// Type definitions for async-retry 1.4 // Project: https://github.com/zeit/async-retry#readme // Definitions by: Albert Wu // Pablo Rodríguez +// Rafał Sawicki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { OperationOptions } from 'retry'; declare function AsyncRetry( fn: AsyncRetry.RetryFunction, @@ -10,13 +14,8 @@ declare function AsyncRetry( ): Promise; declare namespace AsyncRetry { - interface Options { - retries?: number; - factor?: number; - minTimeout?: number; - maxTimeout?: number; - randomize?: boolean; - onRetry?: (e: Error) => any; + interface Options extends OperationOptions { + onRetry?: (e: Error, attempt: number) => any; } type RetryFunction = (bail: (e: Error) => void, attempt: number) => A|Promise; diff --git a/types/auth0-js/auth0-js-tests.ts b/types/auth0-js/auth0-js-tests.ts index 6353cc1e40..61ab9bd524 100644 --- a/types/auth0-js/auth0-js-tests.ts +++ b/types/auth0-js/auth0-js-tests.ts @@ -179,7 +179,7 @@ webAuth.popup.signupAndLogin({ email: "", password: "", connection: "" }, (err, // do something with data }); -webAuth.login({username: 'bar', password: 'foo'}, (err, data) => {}); +webAuth.login({username: 'bar', password: 'foo', state: '1234'}, (err, data) => {}); webAuth.crossOriginAuthenticationCallback(); diff --git a/types/auth0-js/index.d.ts b/types/auth0-js/index.d.ts index 7e43da1c89..ac2d32c5ac 100644 --- a/types/auth0-js/index.d.ts +++ b/types/auth0-js/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Adrian Chia // Matt Durrant // Peter Blazejewicz +// Bartosz Kotrys // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -703,6 +704,15 @@ export interface CrossOriginLoginOptions { email?: string; password: string; realm?: string; + domain?: string; + clientID?: string; + redirectUri?: string; + responseType?: string; + responseMode?: string; + state?: string; + nonce?: string; + scope?: string; + audience?: string; } export interface LogoutOptions { diff --git a/types/aws-lambda-mock-context/tslint.json b/types/aws-lambda-mock-context/tslint.json index bafaae7817..f6fabe4180 100644 --- a/types/aws-lambda-mock-context/tslint.json +++ b/types/aws-lambda-mock-context/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO + "npm-naming": false, "dt-header": false } } diff --git a/types/aws-lambda/tslint.json b/types/aws-lambda/tslint.json index bafaae7817..f6fabe4180 100644 --- a/types/aws-lambda/tslint.json +++ b/types/aws-lambda/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO + "npm-naming": false, "dt-header": false } } diff --git a/types/axe-webdriverjs/axe-webdriverjs-tests.ts b/types/axe-webdriverjs/axe-webdriverjs-tests.ts index 47eeadc8c5..963e430c62 100644 --- a/types/axe-webdriverjs/axe-webdriverjs-tests.ts +++ b/types/axe-webdriverjs/axe-webdriverjs-tests.ts @@ -20,7 +20,11 @@ const inTest = async (webDriver: WebDriver) => { .disableRules("rule") .disableRules(["rule", "rule"]) .configure(spec) - .analyze((internalResults: AxeAnalysis) => {}); + .analyze((err: Error | null, internalResults: AxeAnalysis) => {}); + + const deprecatedAnalysis: AxeAnalysis = await AxeBuilder(webDriver).analyze( + (internalResults: AxeAnalysis) => {} + ); const inapplicable: Result[] = analysis.inapplicable; const incomplete: Result[] = analysis.incomplete; diff --git a/types/axe-webdriverjs/index.d.ts b/types/axe-webdriverjs/index.d.ts index c3bf23f788..4c08cdb5c7 100644 --- a/types/axe-webdriverjs/index.d.ts +++ b/types/axe-webdriverjs/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for axe-webdriverjs 2.0 +// Type definitions for axe-webdriverjs 2.1 // Project: https://github.com/dequelabs/axe-webdriverjs#readme // Definitions by: Joshua Goldberg +// Tyler Krupicka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 import { Result, RunOptions, Spec } from "axe-core"; import { WebDriver } from "selenium-webdriver"; @@ -16,6 +17,9 @@ export interface AxeAnalysis { violations: Result[]; } +export type DeprecatedAnalyzeCallback = (results: AxeAnalysis) => void; +export type AnalyzeCallback = (err: Error | null, results: AxeAnalysis) => void; + export interface AxeBuilder { /** * Includes a selector in analysis. @@ -74,7 +78,9 @@ export interface AxeBuilder { * Perform analysis and retrieve results. * @param callback Function to execute when analysis completes. */ - analyze(callback: (results: AxeAnalysis) => void): Promise; + analyze( + callback?: AnalyzeCallback | DeprecatedAnalyzeCallback + ): Promise; } export const AxeBuilder: { diff --git a/types/better-sqlite3/better-sqlite3-tests.ts b/types/better-sqlite3/better-sqlite3-tests.ts index f5a6c0e070..ac72affc05 100644 --- a/types/better-sqlite3/better-sqlite3-tests.ts +++ b/types/better-sqlite3/better-sqlite3-tests.ts @@ -11,7 +11,7 @@ const registrationOptions: Sqlite.RegistrationOptions = { }; let db: Sqlite.Database = Sqlite('.'); -db = new Sqlite('.', { memory: true }); +db = new Sqlite('.', { memory: true, verbose: () => {} }); db.exec('CREATE TABLE test (id INTEGER PRIMARY KEY NOT NULL, name TEXT NOT NULL);'); db.exec('INSERT INTO test(name) VALUES("name");'); db.pragma('data_version', { simple: true }); diff --git a/types/better-sqlite3/index.d.ts b/types/better-sqlite3/index.d.ts index 32a71d96af..57a17e897f 100644 --- a/types/better-sqlite3/index.d.ts +++ b/types/better-sqlite3/index.d.ts @@ -5,6 +5,7 @@ // Santiago Aguilar // Alessandro Vergani // Andrew Kaiser +// Mark Stewart // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 @@ -97,6 +98,7 @@ declare namespace Database { readonly?: boolean; fileMustExist?: boolean; timeout?: number; + verbose?: (message?: any, ...additionalArgs: any[]) => void; } interface PragmaOptions { diff --git a/types/bn.js/bn.js-tests.ts b/types/bn.js/bn.js-tests.ts index 738d5220d4..68d3754aab 100644 --- a/types/bn.js/bn.js-tests.ts +++ b/types/bn.js/bn.js-tests.ts @@ -16,3 +16,8 @@ const red = bn.toRed(ctx); const newRed = red.redAdd(new BN(1)); newRed.cmp(bn); newRed.fromRed(); + +const expected = new BN(0x4020); +const actualArray = new BN([0x40, 0x20]); +const actualUint8Array = new BN(new Uint8Array([0x40, 0x20])); +const actualString = new BN('0x4020'); diff --git a/types/bn.js/index.d.ts b/types/bn.js/index.d.ts index be04dbcc5f..4126f6f017 100644 --- a/types/bn.js/index.d.ts +++ b/types/bn.js/index.d.ts @@ -25,12 +25,12 @@ interface ReductionContext { declare class BN { constructor( - number: number | string | number[] | Buffer | BN, + number: number | string | number[] | Uint8Array | Buffer | BN, base?: number | 'hex', endian?: Endianness ); constructor( - number: number | string | number[] | Buffer | BN, + number: number | string | number[] | Uint8Array | Buffer | BN, endian?: Endianness ) diff --git a/types/bro-fs/index.d.ts b/types/bro-fs/index.d.ts index e0d11cddbe..e2d53cb8a1 100644 --- a/types/bro-fs/index.d.ts +++ b/types/bro-fs/index.d.ts @@ -44,6 +44,8 @@ export function isSupported(): boolean; export function mkdir(path: string): Promise; export function readdir(path: string | DirectoryEntry, options?: {deep?: boolean}): Promise; export function readFile(path: string | FileEntry, options: {type: 'ArrayBuffer'}): Promise; +export function readFile(path: string | FileEntry, options: {type: 'Blob'}): Promise; +export function readFile(path: string | FileEntry, options: {type: 'File'}): Promise; export function readFile(path: string | FileEntry, options?: {type?: TextType}): Promise; export function rename(oldPath: string | FileEntry, newPath: string, options?: {create?: boolean}): Promise; export function rmdir(path: string | DirectoryEntry): Promise; diff --git a/types/btoa/btoa-tests.ts b/types/btoa/btoa-tests.ts index 7ce230fcf7..d159bd5b7e 100644 --- a/types/btoa/btoa-tests.ts +++ b/types/btoa/btoa-tests.ts @@ -1,3 +1,5 @@ import btoa = require('btoa'); btoa('foo'); + +btoa(Buffer.from('foo')); diff --git a/types/btoa/index.d.ts b/types/btoa/index.d.ts index 4f16b77328..b4c06cf328 100644 --- a/types/btoa/index.d.ts +++ b/types/btoa/index.d.ts @@ -5,6 +5,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -declare function btoa(str: string): string; +/// + +declare function btoa(str: string | Buffer): string; export = btoa; diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 07de38e05d..648e2ba360 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -26,10 +26,12 @@ import { EventEmitter } from "events"; * Everytime the same queue is instantiated it tries to process all the old jobs that may exist from a previous unfinished session. */ declare const Bull: { - (queueName: string, opts?: Bull.QueueOptions): Bull.Queue; - (queueName: string, url: string, opts?: Bull.QueueOptions): Bull.Queue; // tslint:disable-line unified-signatures - new (queueName: string, opts?: Bull.QueueOptions): Bull.Queue; - new (queueName: string, url: string, opts?: Bull.QueueOptions): Bull.Queue; // tslint:disable-line unified-signatures + /* tslint:disable:no-unnecessary-generics unified-signatures */ + (queueName: string, opts?: Bull.QueueOptions): Bull.Queue; + (queueName: string, url: string, opts?: Bull.QueueOptions): Bull.Queue; + new (queueName: string, opts?: Bull.QueueOptions): Bull.Queue; + new (queueName: string, url: string, opts?: Bull.QueueOptions): Bull.Queue; + /* tslint:enable:no-unnecessary-generics unified-signatures */ }; declare namespace Bull { diff --git a/types/burns/burns-tests.ts b/types/burns/burns-tests.ts new file mode 100644 index 0000000000..e1fd41ad09 --- /dev/null +++ b/types/burns/burns-tests.ts @@ -0,0 +1,29 @@ +import burns from 'burns'; + +interface OrderData { + userName: string; + orderId: string; +} + +function handleEverything() { + console.log('Do absolutely nothing! 😄'); +} + +function sendEmail(message: string) { + console.log(message); +} + +function sendOrderShippedEmail(data: OrderData) { + sendEmail(`Hi ${data.userName}, Your order ${data.orderId} has been shipped`); +} + +burns.configure({ + defaultHandler: handleEverything +}); +burns.registerEvents({ + newPurchase: sendOrderShippedEmail +}); +burns.dispatch('newPurchase', { + userName: 'Johnny', + orderId: 'rand' +}); diff --git a/types/burns/index.d.ts b/types/burns/index.d.ts new file mode 100644 index 0000000000..d4633624be --- /dev/null +++ b/types/burns/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for burns 2.0 +// Project: https://github.com/shalvah/burns#readme +// Definitions by: Timothy Onyiuke +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare const _Burns: Burns; + +export interface Config { + defaultHandler?: any; + broadcaster?: any; + pusher?: any; +} + +declare class Burns { + configure(config?: Config): this; + + registerEvents(newEvents: Record): this; + + dispatch(eventName: string, eventData?: Record, exclude?: { exclude?: any }): this; +} + +export default _Burns; diff --git a/types/burns/tsconfig.json b/types/burns/tsconfig.json new file mode 100644 index 0000000000..703007ff15 --- /dev/null +++ b/types/burns/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "burns-tests.ts" + ] +} diff --git a/types/burns/tslint.json b/types/burns/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/burns/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/c3/tsconfig.json b/types/c3/tsconfig.json index aa923e91c0..60849b491f 100644 --- a/types/c3/tsconfig.json +++ b/types/c3/tsconfig.json @@ -11,7 +11,8 @@ "types": [], "paths": { "d3-scale": ["d3-scale/v1"], - "d3": ["d3/v4"] + "d3": ["d3/v4"], + "d3-array": ["d3-array/v1"] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/cacheable-request/index.d.ts b/types/cacheable-request/index.d.ts index 98d858d3f6..16e778274a 100644 --- a/types/cacheable-request/index.d.ts +++ b/types/cacheable-request/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for cacheable-request 6.0 // Project: https://github.com/lukechilds/cacheable-request#readme // Definitions by: BendingBender +// Paul Melnikow // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -20,7 +21,7 @@ declare const CacheableRequest: CacheableRequest; type RequestFn = typeof request; interface CacheableRequest { - new (requestFn: RequestFn, storageAdapter?: string | Store): ( + new (requestFn: RequestFn, storageAdapter?: string | CacheableRequest.StorageAdapter): ( opts: string | URL | (RequestOptions & CacheSemanticsOptions), cb?: (response: ServerResponse | ResponseLike) => void ) => CacheableRequest.Emitter; @@ -30,6 +31,8 @@ interface CacheableRequest { } declare namespace CacheableRequest { + type StorageAdapter = Store; + interface Options { /** * If the cache should be used. Setting this to `false` will completely bypass the cache for the current request. diff --git a/types/center-align/center-align-tests.ts b/types/center-align/center-align-tests.ts new file mode 100644 index 0000000000..c54c36ea44 --- /dev/null +++ b/types/center-align/center-align-tests.ts @@ -0,0 +1,17 @@ +import center from "center-align"; + +// multi-line sample +center([ + "Lorem ipsum dolor sit amet,", + "consectetur adipiscing", + "elit, sed do eiusmod tempor incididunt", + "ut labore et dolore", + "magna aliqua. Ut enim ad minim", + "veniam, quis" +]); + +// single-line samples +center("foo"); // => 'foo' (does nothing) +center("foo", 12); // => ' foo ' +center("foo", 10); // => ' foo ' +center("foo", 8); // => ' foo ' diff --git a/types/center-align/index.d.ts b/types/center-align/index.d.ts new file mode 100644 index 0000000000..47ff64b101 --- /dev/null +++ b/types/center-align/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for center-align 1.0 +// Project: https://github.com/jonschlinkert/center-align +// Definitions by: Claas Ahlrichs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +declare function center_align(val: string, width?: number): string; +declare function center_align(val: string[], width?: number): string[]; + +export = center_align; diff --git a/types/center-align/tsconfig.json b/types/center-align/tsconfig.json new file mode 100644 index 0000000000..538e2aa296 --- /dev/null +++ b/types/center-align/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": ["index.d.ts", "center-align-tests.ts"] +} diff --git a/types/center-align/tslint.json b/types/center-align/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/center-align/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/changelog-parser/changelog-parser-tests.ts b/types/changelog-parser/changelog-parser-tests.ts new file mode 100644 index 0000000000..69a5ffdab3 --- /dev/null +++ b/types/changelog-parser/changelog-parser-tests.ts @@ -0,0 +1,24 @@ +import parseChangelog = require('changelog-parser'); + +const options = { + filePath: 'path/to/CHANGELOG.md', + removeMarkdown: false +}; + +const fn = (obj: object): void => {}; + +parseChangelog({filePath: 'path/to/CHANGELOG.md'}, (error, result) => { + if (error) { + throw error; + } + + fn(result); +}); + +parseChangelog(options, (error, result) => {}); + +parseChangelog({filePath: 'path/to/CHANGELOG.md'}, (error) => {}); + +parseChangelog(options).then((result) => {}); + +parseChangelog('path/to/CHANGELOG.md').then((result) => {}); diff --git a/types/changelog-parser/index.d.ts b/types/changelog-parser/index.d.ts new file mode 100644 index 0000000000..a1799454c8 --- /dev/null +++ b/types/changelog-parser/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for changelog-parser 2.7 +// Project: https://github.com/hypermodules/changelog-parser +// Definitions by: Adam Zerella +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +interface Options { + /** + * Path to changelog file. + */ + filePath: string; + /** + * Removes the markdown markup from the changelog entries by default. + * You can change its value to false to keep the markdown. + */ + removeMarkdown: boolean; +} + +/** + * Change log parser for node. + */ +declare function parseChangelog(options: Partial|string, + callback?: (error: string|null, result: object) => void): Promise; + +export = parseChangelog; diff --git a/types/elastic-apm-node/tsconfig.json b/types/changelog-parser/tsconfig.json similarity index 88% rename from types/elastic-apm-node/tsconfig.json rename to types/changelog-parser/tsconfig.json index 336364b281..e40482d8e4 100644 --- a/types/elastic-apm-node/tsconfig.json +++ b/types/changelog-parser/tsconfig.json @@ -6,8 +6,8 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictFunctionTypes": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" @@ -18,7 +18,6 @@ }, "files": [ "index.d.ts", - "elastic-apm-node-tests.ts", - "start.d.ts" + "changelog-parser-tests.ts" ] } \ No newline at end of file diff --git a/types/changelog-parser/tslint.json b/types/changelog-parser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/changelog-parser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index 1321d5b83d..13f6268d9d 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -620,6 +620,7 @@ function test_filter() { allowed = filter.allow('rule', 'name', false); var apply: boolean = filter.applyTo(CKEDITOR.htmlParser.fragment.fromHtml('string'), true, false, 1); + apply = filter.applyTo(new CKEDITOR.htmlParser.element('name', null)); apply = filter.applyTo(new CKEDITOR.htmlParser.element('name', null), true, false, 1); var checked: boolean = filter.check(style); diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index 3d35877b9d..bf2d51b3db 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -1436,7 +1436,7 @@ declare namespace CKEDITOR { addFeature(feature: feature): boolean; addTransformations(transformations: Array>): void; allow(newRules: filter.allowedContentRules, featureName?: string, overrideCustom?: boolean): boolean; - applyTo(fragment: htmlParser.fragment | htmlParser.element, toHrml: boolean, transformOnly: boolean, enterMode: number): boolean; + applyTo(fragment: htmlParser.fragment | htmlParser.element, toHtml?: boolean, transformOnly?: boolean, enterMode?: number): boolean; check(test: filter.contentRule, applyTransformations?: boolean, strictCheck?: boolean): boolean; checkFeature(feature: feature): boolean; clone(): filter; diff --git a/types/classnames/tslint.json b/types/classnames/tslint.json index 946c3b6691..0831709701 100644 --- a/types/classnames/tslint.json +++ b/types/classnames/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO - "dt-header": false + "npm-naming": false, + "dt-header": false } } diff --git a/types/connect-history-api-fallback/index.d.ts b/types/connect-history-api-fallback/index.d.ts index a39fbfdbd6..b32e61e147 100644 --- a/types/connect-history-api-fallback/index.d.ts +++ b/types/connect-history-api-fallback/index.d.ts @@ -10,26 +10,28 @@ import { Url } from 'url'; import * as core from "express-serve-static-core"; -declare function historyApiFallback(options?: Options): core.RequestHandler; -declare namespace historyApiFallback {} export = historyApiFallback; -interface Options { - disableDotRule?: true; - htmlAcceptHeaders?: string[]; - index?: string; - logger?: typeof console.log; - rewrites?: Rewrite[]; - verbose?: boolean; -} +declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler; -interface Context { - match: RegExpMatchArray; - parsedUrl: Url; -} -type RewriteTo = (context: Context) => string; +declare namespace historyApiFallback { + interface Options { + disableDotRule?: true; + htmlAcceptHeaders?: string[]; + index?: string; + logger?: typeof console.log; + rewrites?: Rewrite[]; + verbose?: boolean; + } -interface Rewrite { - from: RegExp; - to: string | RegExp | RewriteTo; + interface Context { + match: RegExpMatchArray; + parsedUrl: Url; + } + type RewriteTo = (context: Context) => string; + + interface Rewrite { + from: RegExp; + to: string | RegExp | RewriteTo; + } } diff --git a/types/countries-and-timezones/index.d.ts b/types/countries-and-timezones/index.d.ts index 1012133d8e..3a84ea3b76 100644 --- a/types/countries-and-timezones/index.d.ts +++ b/types/countries-and-timezones/index.d.ts @@ -16,9 +16,9 @@ export interface Timezone { countries: string[]; } -export function getAllCountries(): Country[]; +export function getAllCountries(): {[key: string]: Country}; -export function getAllTimezones(): Timezone[]; +export function getAllTimezones(): {[key: string]: Timezone}; export function getCountriesForTimezone(timezoneId: string): Country[]; diff --git a/types/css-font-loading-module/tslint.json b/types/css-font-loading-module/tslint.json index 65c83fb1e3..1c56ba06b6 100644 --- a/types/css-font-loading-module/tslint.json +++ b/types/css-font-loading-module/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { + "npm-naming": false, "dt-header": false } } diff --git a/types/d3-array/d3-array-tests.ts b/types/d3-array/d3-array-tests.ts index b0d00d5d20..697543830b 100644 --- a/types/d3-array/d3-array-tests.ts +++ b/types/d3-array/d3-array-tests.ts @@ -70,7 +70,7 @@ const mixedObjectArray = [ ]; const mixedObjectOrUndefinedArray = [...mixedObjectArray, undefined]; -const mixedObjectArrayLike = mixedObjectArray as ArrayLike; +const mixedObjectArrayLike = mixedObjectArray as Iterable; let typedArray = Uint8Array.from(numbersArray); let readonlyNumbersArray = numbersArray as ReadonlyArray; @@ -81,55 +81,55 @@ const readonlyDateArray = dateArray as ReadonlyArray; const readonlyMixedObjectArray = mixedObjectArray as ReadonlyArray; const readonlyMixedObjectOrUndefinedArray = mixedObjectOrUndefinedArray as ReadonlyArray; -function accessorMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { +function accessorMixedObjectToNum(datum: MixedObject, index: number, array: Iterable): number { return datum.num; } -function accessorMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { +function accessorMixedObjectToStr(datum: MixedObject, index: number, array: Iterable): string { return datum.str; } -function accessorMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { +function accessorMixedObjectToNumeric(datum: MixedObject, index: number, array: Iterable): NumCoercible { return datum.numeric; } -function accessorMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { +function accessorMixedObjectToDate(datum: MixedObject, index: number, array: Iterable): Date { return datum.date; } -function accessorMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { +function accessorMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): number | undefined | null { return datum ? datum.num : undefined; } -function accessorMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { +function accessorMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): string | undefined | null { return datum ? datum.str : undefined; } -function accessorLikeMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { +function accessorLikeMixedObjectToNum(datum: MixedObject, index: number, array: Iterable): number { return datum.num; } -function accessorLikeMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { +function accessorLikeMixedObjectToStr(datum: MixedObject, index: number, array: Iterable): string { return datum.str; } -function accessorLikeMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { +function accessorLikeMixedObjectToNumeric(datum: MixedObject, index: number, array: Iterable): NumCoercible { return datum.numeric; } -function accessorLikeMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { +function accessorLikeMixedObjectToDate(datum: MixedObject, index: number, array: Iterable): Date { return datum.date; } -function accessorLikeMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { +function accessorLikeMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): number | undefined | null { return datum ? datum.num : undefined; } -function accessorLikeMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { +function accessorLikeMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): string | undefined | null { return datum ? datum.str : undefined; } -function accessorReadOnlyMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { +function accessorReadOnlyMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): number | undefined | null { return datum ? datum.num : undefined; } @@ -485,6 +485,12 @@ num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(201 num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 1); num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 3, 4); +// quickselect +numbersArray = d3Array.quickselect(numbersArray, 3); +numbersArray = d3Array.quickselect(numbersArray, 3, 0); +numbersArray = d3Array.quickselect(numbersArray, 3, 0, 5); +numbersArray = d3Array.quickselect(numbersArray, 3, 0, 5, d3Array.descending); + // ascending() ----------------------------------------------------------------- num = d3Array.ascending(undefined, 20); @@ -536,6 +542,23 @@ mergedArray = d3Array.merge([testArray1, [15, 30]]); // fails, type mismatch mergedArray = d3Array.merge(readonlyTestArrays); // inferred type mergedArray = d3Array.merge(readonlyTestArrays); // explicit type +interface ObjDefinition { + name: string; + amount: string; + date: string; +} + +const objArray: ObjDefinition[] = [ + { name: "jim", amount: "34.0", date: "11/12/2015" }, + { name: "carl", amount: "120.11", date: "11/12/2015" }, + { name: "stacy", amount: "12.01", date: "01/04/2016" }, + { name: "stacy", amount: "34.05", date: "01/04/2016" } +]; + +const grouped: Map = d3Array.group(objArray, d => d.name); +const rolledup: Map = d3Array.rollup(objArray, d => d.length, d => d.name); +const rolledup2: Map = d3Array.rollup(objArray, d => d.map(u => u.name).join(' '), d => d.name); + // cross() --------------------------------------------------------------------- let crossed: Array<[string, number]>; @@ -780,7 +803,7 @@ histoMixedObject_Date = histoMixedObject_Date.domain(timeScale.domain()); // fai domainFnDate = histoMixedObject_Date.domain(); histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([new Date(2014, 3, 15), new Date(2017, 4, 15)]); histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([domain[0], domain[domain.length]]); -histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain((values) => [values[0]!, values[values.length]!]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain((values) => [values[0]!, values[values.length]!]); // thresholds(...) ------------------------------------------------------------- @@ -935,8 +958,3 @@ num = d3Array.thresholdScott(readonlyNumbersArray, -1, 234); num = d3Array.thresholdSturges(numbersArray); num = d3Array.thresholdSturges(typedArray); num = d3Array.thresholdSturges(readonlyNumbersArray); - -// Deprecated ================================================================== - -const histDeprecatedNumber: d3Array.HistogramGenerator = d3Array.histogram(); -const histDeprecatedDate: d3Array.HistogramGenerator = d3Array.histogram(); diff --git a/types/d3-array/index.d.ts b/types/d3-array/index.d.ts index 16a0e659cb..5de77e4e10 100644 --- a/types/d3-array/index.d.ts +++ b/types/d3-array/index.d.ts @@ -1,13 +1,14 @@ -// Type definitions for D3JS d3-array module 1.2 +// Type definitions for D3JS d3-array module 2.0 // Project: https://github.com/d3/d3-array, https://d3js.org/d3-array // Definitions by: Alex Ford // Boris Yankov // Tom Wanzek -// denisname +// denisname , +// Hugues Stefanski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 1.2.1 +// Last module patch version validated against: 2.0.3 // -------------------------------------------------------------------------- // Shared Types and Interfaces @@ -32,128 +33,128 @@ export interface Numeric { /** * Return the maximum value in the array of strings using natural order. */ -export function max(array: ArrayLike): string | undefined; +export function max(array: Iterable): string | undefined; /** * Return the maximum value in the array of numbers using natural order. */ -export function max(array: ArrayLike): T | undefined; +export function max(array: Iterable): T | undefined; /** * Return the maximum value in the array using natural order and a projection function to map values to strings. */ -export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; +export function max(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => string | undefined | null): string | undefined; /** * Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values. */ -export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; +export function max(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => U | undefined | null): U | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike): string | undefined; +export function min(array: Iterable): string | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike): T | undefined; +export function min(array: Iterable): T | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; +export function min(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => string | undefined | null): string | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; +export function min(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => U | undefined | null): U | undefined; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike): [string, string] | [undefined, undefined]; +export function extent(array: Iterable): [string, string] | [undefined, undefined]; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike): [T, T] | [undefined, undefined]; +export function extent(array: Iterable): [T, T] | [undefined, undefined]; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): [string, string] | [undefined, undefined]; +export function extent(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => string | undefined | null): [string, string] | [undefined, undefined]; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): [U, U] | [undefined, undefined]; +export function extent(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => U | undefined | null): [U, U] | [undefined, undefined]; /** * Return the mean of an array of numbers */ -export function mean(array: ArrayLike): number | undefined; +export function mean(array: Iterable): number | undefined; /** * Return the mean of an array of numbers */ -export function mean(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function mean(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number | undefined; /** * Return the median of an array of numbers */ -export function median(array: ArrayLike): number | undefined; +export function median(array: Iterable): number | undefined; /** * Return the median of an array of numbers */ -export function median(array: ArrayLike, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function median(array: Iterable, accessor: (element: T, i: number, array: Iterable) => number | undefined | null): number | undefined; /** * Returns the p-quantile of an array of numbers */ -export function quantile(array: ArrayLike, p: number): number | undefined; +export function quantile(array: Iterable, p: number): number | undefined; -export function quantile(array: ArrayLike, p: number, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function quantile(array: Iterable, p: number, accessor: (element: T, i: number, array: Iterable) => number | undefined | null): number | undefined; /** * Compute the sum of an array of numbers. */ -export function sum(array: ArrayLike): number; +export function sum(array: Iterable): number; /** * Compute the sum of an array, using the given accessor to convert values to numbers. */ -export function sum(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number; +export function sum(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number; /** * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array of numbers. */ -export function deviation(array: ArrayLike): number | undefined; +export function deviation(array: Iterable): number | undefined; /** * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array, * using the given accessor to convert values to numbers. */ -export function deviation(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function deviation(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number | undefined; /** * Compute an unbiased estimator of the population variance of the given array of numbers. */ -export function variance(array: ArrayLike): number | undefined; +export function variance(array: Iterable): number | undefined; /** * Compute an unbiased estimator of the population variance of the given array, * using the given accessor to convert values to numbers. */ -export function variance(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function variance(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number | undefined; // -------------------------------------------------------------------------------------- // Searching Arrays // -------------------------------------------------------------------------------------- -export function scan(array: ArrayLike, comparator?: (a: number, b: number) => number): number | undefined; -export function scan(array: ArrayLike, comparator: (a: T, b: T) => number): number | undefined; +export function scan(array: Iterable, comparator?: (a: number, b: number) => number): number | undefined; +export function scan(array: Iterable, comparator: (a: T, b: T) => number): number | undefined; export function bisectLeft(array: ArrayLike, x: number, lo?: number, hi?: number): number; export function bisectLeft(array: ArrayLike, x: string, lo?: number, hi?: number): number; @@ -173,6 +174,44 @@ export interface Bisector { export function bisector(comparator: (a: T, b: U) => number): Bisector; export function bisector(accessor: (x: T) => U): Bisector; +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + */ +export function quickselect(array: ArrayLike, k: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + */ +export function quickselect(array: ArrayLike, k: number, left: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + * @param compare The compare function. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number, compare: (a: Primitive | undefined, b: Primitive | undefined) => number): T[]; + // NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. /** * Compares two primitive values for sorting (in ascending order). @@ -189,6 +228,22 @@ export function descending(a: Primitive | undefined, b: Primitive | undefined): // Transforming Arrays // -------------------------------------------------------------------------------------- +/** + * Groups the specified array of values into a Map from key to array of value. + * @param a The array to group. + * @param key The key function. + */ +export function group(a: Iterable, key: (value: TObject) => TKey): Map; + +/** + * Groups and reduces the specified array of values into a Map from key to value. + * + * @param a The array to group. + * @param reduce The reduce function. + * @param key The key function. + */ +export function rollup(a: Iterable, reduce: (value: TObject[]) => TReduce, key: (value: TObject) => TKey): Map; + /** * Returns the Cartesian product of the two arrays a and b. * For each element i in the specified array a and each element j in the specified array b, in order, @@ -197,7 +252,7 @@ export function descending(a: Primitive | undefined, b: Primitive | undefined): * @param a First input array. * @param b Second input array. */ -export function cross(a: ArrayLike, b: ArrayLike): Array<[S, T]>; +export function cross(a: Iterable, b: Iterable): Array<[S, T]>; /** * Returns the Cartesian product of the two arrays a and b. @@ -208,12 +263,12 @@ export function cross(a: ArrayLike, b: ArrayLike): Array<[S, T]>; * @param b Second input array. * @param reducer A reducer function taking as input an element from "a" and "b" and returning a reduced value. */ -export function cross(a: ArrayLike, b: ArrayLike, reducer: (a: S, b: T) => U): U[]; +export function cross(a: Iterable, b: Iterable, reducer: (a: S, b: T) => U): U[]; /** * Merges the specified arrays into a single array. */ -export function merge(arrays: ArrayLike>): T[]; +export function merge(arrays: Iterable>): T[]; /** * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1. @@ -221,7 +276,7 @@ export function merge(arrays: ArrayLike>): T[]; * * @param array Array of input elements */ -export function pairs(array: ArrayLike): Array<[T, T]>; +export function pairs(array: Iterable): Array<[T, T]>; /** * For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1. * Returns the resulting array of pair-wise reduced elements. @@ -230,7 +285,7 @@ export function pairs(array: ArrayLike): Array<[T, T]>; * @param array Array of input elements * @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value. */ -export function pairs(array: ArrayLike, reducer: (a: T, b: T) => U): U[]; +export function pairs(array: Iterable, reducer: (a: T, b: T) => U): U[]; /** * Returns a permutation of the specified array using the specified array of indexes. @@ -351,36 +406,6 @@ export type ThresholdNumberArrayGenerator = export type ThresholdDateArrayGenerator = (values: ArrayLike, min: Date, max: Date) => Value[]; -/** - * @deprecated Use ThresholdNumberArrayGenerator or ThresholdDateArrayGenerator. - */ -export type ThresholdArrayGenerator = ThresholdNumberArrayGenerator; - -/** - * @deprecated Use `HistogramGeneratorNumber` for `number` values and `HistogramGeneratorDate for `Date` values. - */ -export interface HistogramGenerator { - (data: ArrayLike): Array>; - - value(): (d: Datum, i: number, data: ArrayLike) => Value; - value(valueAccessor: (d: Datum, i: number, data: ArrayLike) => Value): this; - - domain(): (values: ArrayLike) => [Value, Value] | [undefined, undefined]; - domain(domain: [Value, Value]): this; - domain(domainAccessor: (values: ArrayLike) => [Value, Value] | [undefined, undefined]): this; - - /** - * Set the array of values to be used as thresholds in determining the bins. - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param thresholds Array of threshold values used for binning. The elements must - * be of the same type as the materialized values of the histogram. - */ - thresholds(thresholds: ArrayLike): this; -} - export interface HistogramCommon { (data: ArrayLike): Array>; @@ -419,9 +444,9 @@ export interface HistogramGeneratorDate e } export interface HistogramGeneratorNumber extends HistogramCommon { - domain(): (values: ArrayLike) => [number, number] | [undefined, undefined]; + domain(): (values: Iterable) => [number, number] | [undefined, undefined]; domain(domain: [number, number]): this; - domain(domainAccessor: (values: ArrayLike) => [number, number] | [undefined, undefined]): this; + domain(domainAccessor: (values: Iterable) => [number, number] | [undefined, undefined]): this; thresholds(): ThresholdCountGenerator | ThresholdNumberArrayGenerator; /** @@ -475,12 +500,6 @@ export function histogram(): HistogramGeneratorNumber; export function histogram(): HistogramGeneratorNumber; export function histogram(): HistogramGeneratorDate; -/** - * @deprecated Do not use Value generic which mixes number and Date types. Use either number or Date - * (in combination with undefined, as applicable) to obtain a type-specific histogram generator. - */ -export function histogram(): HistogramGenerator; - // -------------------------------------------------------------------------------------- // Histogram Thresholds // -------------------------------------------------------------------------------------- diff --git a/types/d3-array/v1/d3-array-tests.ts b/types/d3-array/v1/d3-array-tests.ts new file mode 100644 index 0000000000..01529191b8 --- /dev/null +++ b/types/d3-array/v1/d3-array-tests.ts @@ -0,0 +1,941 @@ +/** + * Typescript definition tests for d3/d3-array module + * + * Note: These tests are intended to test the definitions only + * in the sense of typing and call signature consistency. They + * are not intended as functional tests. + */ + +import * as d3Array from 'd3-array'; +import { scaleTime } from 'd3-scale'; +import { timeYear } from 'd3-time'; + +// ----------------------------------------------------------------------------- +// Preparatory Steps +// ----------------------------------------------------------------------------- + +class NumCoercible { + a: number; + + constructor(a: number) { + this.a = a; + } + valueOf() { + return this.a; + } +} + +class MixedObject { + num: number; + str: string; + numeric: NumCoercible; + date: Date; + + constructor(a: number, date: Date) { + this.num = a; + this.str = a.toString(); + this.numeric = new NumCoercible(a); + this.date = date; + } +} + +let num: number; +let undef: undefined; +let mixedObject: MixedObject; + +let numOrUndefined: number | undefined; +let strOrUndefined: string | undefined; +let numericOrUndefined: NumCoercible | undefined; +let dateOrUndefined: Date | undefined; +let mixedObjectOrUndefined: MixedObject | undefined; +let numOrUndefinedExtent: [number, number] | [undefined, undefined]; +let strOrUndefinedExtent: [string, string] | [undefined, undefined]; +let numericOrUndefinedExtent: [NumCoercible, NumCoercible] | [undefined, undefined]; +let dateMixedOrUndefined: [Date, Date] | [undefined, undefined]; +let mixedOrUndefinedExtent: [d3Array.Primitive | NumCoercible, d3Array.Primitive | NumCoercible] | [undefined, undefined]; +let dateOrUndefinedExtent: [Date, Date] | [undefined, undefined]; + +let numbersArray = [10, 20, 30, 40, 50]; +const numbersOrUndefinedArray = [10, 20, undefined, null, 40, 50]; +let stringyNumbersArray = ['10', '20', '30', '40', '50']; +const numericArray = [new NumCoercible(10), new NumCoercible(20), new NumCoercible(30), new NumCoercible(40), new NumCoercible(50)]; +let dateArray = [new Date(2016, 6, 1), new Date(2016, 7, 30), new Date(2015, 3, 15)]; + +const mixedObjectArray = [ + new MixedObject(10, new Date(2016, 6, 1)), + new MixedObject(20, new Date(2016, 7, 30)), + new MixedObject(30, new Date(2015, 3, 15)), + new MixedObject(40, new Date(2014, 3, 15)), + new MixedObject(50, new Date(2017, 4, 15)) +]; + +const mixedObjectOrUndefinedArray = [...mixedObjectArray, undefined]; +const mixedObjectArrayLike = mixedObjectArray as ArrayLike; + +let typedArray = Uint8Array.from(numbersArray); +let readonlyNumbersArray = numbersArray as ReadonlyArray; +const readonlyNumbersOrUndefinedArray = numbersOrUndefinedArray as ReadonlyArray; +const readonlyStringyNumbersArray = stringyNumbersArray as ReadonlyArray; +const readonlyNumericArray = numericArray as ReadonlyArray; +const readonlyDateArray = dateArray as ReadonlyArray; +const readonlyMixedObjectArray = mixedObjectArray as ReadonlyArray; +const readonlyMixedObjectOrUndefinedArray = mixedObjectOrUndefinedArray as ReadonlyArray; + +function accessorMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { + return datum.num; +} + +function accessorMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { + return datum.str; +} + +function accessorMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { + return datum.numeric; +} + +function accessorMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { + return datum.date; +} + +function accessorMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { + return datum ? datum.num : undefined; +} + +function accessorMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { + return datum ? datum.str : undefined; +} + +function accessorLikeMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { + return datum.num; +} + +function accessorLikeMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { + return datum.str; +} + +function accessorLikeMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { + return datum.numeric; +} + +function accessorLikeMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { + return datum.date; +} + +function accessorLikeMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { + return datum ? datum.num : undefined; +} + +function accessorLikeMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { + return datum ? datum.str : undefined; +} + +function accessorReadOnlyMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { + return datum ? datum.num : undefined; +} + +// ----------------------------------------------------------------------------- +// Test Statistics +// ----------------------------------------------------------------------------- + +// max() ----------------------------------------------------------------------- + +// without accessors + +numOrUndefined = d3Array.max(numbersArray); +strOrUndefined = d3Array.max(stringyNumbersArray); +numericOrUndefined = d3Array.max(numericArray); +dateOrUndefined = d3Array.max(dateArray); + +// ArrayLike test cases + +numOrUndefined = d3Array.max(typedArray); +numOrUndefined = d3Array.max(readonlyNumbersOrUndefinedArray); +strOrUndefined = d3Array.max(readonlyStringyNumbersArray); +numericOrUndefined = d3Array.max(readonlyNumericArray); +dateOrUndefined = d3Array.max(readonlyDateArray); + +// with accessors + +numOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToNum); +strOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToStr); +numericOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToNumeric); +dateOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToDate); +numOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToNumOrUndefined); +strOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToStrOrUndefined); +numOrUndefined = d3Array.max(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +numOrUndefined = d3Array.max(mixedObjectArrayLike, accessorLikeMixedObjectToNum); +numOrUndefined = d3Array.max(mixedObjectArray, accessorLikeMixedObjectToNum); +numOrUndefined = d3Array.max(mixedObjectArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +numOrUndefined = d3Array.max(mixedObjectArray, (d) => { + const l: MixedObject = d; + return l.num; +}); + +strOrUndefined = d3Array.max(mixedObjectArray, (d) => { + const l: MixedObject = d; + return l.str; +}); + +// $ExpectError +numOrUndefined = d3Array.max(readonlyNumbersArray, (d, i, a) => { a.push(3); return 0; }); + +// min() ----------------------------------------------------------------------- + +// without accessors + +numOrUndefined = d3Array.min(numbersArray); +strOrUndefined = d3Array.min(stringyNumbersArray); +numericOrUndefined = d3Array.min(numericArray); +dateOrUndefined = d3Array.min(dateArray); + +// ArrayLike test cases + +numOrUndefined = d3Array.min(typedArray); +numOrUndefined = d3Array.min(readonlyNumbersOrUndefinedArray); +strOrUndefined = d3Array.min(readonlyStringyNumbersArray); +numericOrUndefined = d3Array.min(readonlyNumericArray); +dateOrUndefined = d3Array.min(readonlyDateArray); + +// with accessors + +numOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToNum); +strOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToStr); +numericOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToNumeric); +dateOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToDate); +numOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToNumOrUndefined); +strOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToStrOrUndefined); +numOrUndefined = d3Array.min(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// extent() -------------------------------------------------------------------- + +// without accessors + +numOrUndefinedExtent = d3Array.extent(numbersArray); +strOrUndefinedExtent = d3Array.extent(stringyNumbersArray); +numericOrUndefinedExtent = d3Array.extent(numericArray); +dateOrUndefinedExtent = d3Array.extent(dateArray); + +// ArrayLike test cases + +numOrUndefinedExtent = d3Array.extent(typedArray); +numOrUndefinedExtent = d3Array.extent(readonlyNumbersOrUndefinedArray); +strOrUndefinedExtent = d3Array.extent(readonlyStringyNumbersArray); +numericOrUndefinedExtent = d3Array.extent(readonlyNumericArray); +dateOrUndefinedExtent = d3Array.extent(readonlyDateArray); + +// with accessors + +numOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToNum); +strOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToStr); +mixedOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToNumeric); +dateMixedOrUndefined = d3Array.extent(mixedObjectArray, accessorMixedObjectToDate); +numOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToNumOrUndefined); +strOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToStrOrUndefined); +numOrUndefinedExtent = d3Array.extent(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// mean() ---------------------------------------------------------------------- + +numOrUndefined = d3Array.mean(numbersArray); +numOrUndefined = d3Array.mean(numericArray); +numOrUndefined = d3Array.mean(numbersOrUndefinedArray); + +numOrUndefined = d3Array.mean(typedArray); +numOrUndefined = d3Array.mean(readonlyNumbersOrUndefinedArray); +numOrUndefined = d3Array.mean(readonlyNumericArray); +numOrUndefined = d3Array.mean(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.mean(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.mean(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.mean(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// median() -------------------------------------------------------------------- + +numOrUndefined = d3Array.median(numbersArray); +numOrUndefined = d3Array.median(numericArray); +numOrUndefined = d3Array.median(numbersOrUndefinedArray); + +numOrUndefined = d3Array.median(typedArray); +numOrUndefined = d3Array.median(readonlyNumbersArray); +numOrUndefined = d3Array.median(readonlyNumericArray); +numOrUndefined = d3Array.median(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.median(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.median(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.median(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// quantile() ------------------------------------------------------------------ + +numOrUndefined = d3Array.quantile(numbersArray, 0.5); +numOrUndefined = d3Array.quantile(numericArray, 0.5); +numOrUndefined = d3Array.quantile(numbersOrUndefinedArray, 0.5); + +numOrUndefined = d3Array.quantile(typedArray, 0.5); +numOrUndefined = d3Array.quantile(readonlyNumbersArray, 0.5); +numOrUndefined = d3Array.quantile(readonlyNumericArray, 0.5); +numOrUndefined = d3Array.quantile(readonlyNumbersOrUndefinedArray, 0.5); + +numOrUndefined = d3Array.quantile(mixedObjectArray, 0.5, accessorMixedObjectToNum); +numOrUndefined = d3Array.quantile(mixedObjectOrUndefinedArray, 0.5, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.quantile(readonlyMixedObjectOrUndefinedArray, 0.5, accessorReadOnlyMixedObjectToNumOrUndefined); + +// sum() ----------------------------------------------------------------------- + +numOrUndefined = d3Array.sum(numbersArray); +numOrUndefined = d3Array.sum(numericArray); +numOrUndefined = d3Array.sum(numbersOrUndefinedArray); + +numOrUndefined = d3Array.sum(typedArray); +numOrUndefined = d3Array.sum(readonlyNumbersArray); +numOrUndefined = d3Array.sum(readonlyNumericArray); +numOrUndefined = d3Array.sum(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.sum(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.sum(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.sum(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// deviation() ----------------------------------------------------------------- + +numOrUndefined = d3Array.deviation(numbersArray); +numOrUndefined = d3Array.deviation(numericArray); +numOrUndefined = d3Array.deviation(numbersOrUndefinedArray); + +numOrUndefined = d3Array.deviation(typedArray); +numOrUndefined = d3Array.deviation(readonlyNumbersArray); +numOrUndefined = d3Array.deviation(readonlyNumericArray); +numOrUndefined = d3Array.deviation(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.deviation(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.deviation(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.deviation(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// variance() ------------------------------------------------------------------ + +numOrUndefined = d3Array.variance(numbersArray); +numOrUndefined = d3Array.variance(numericArray); +numOrUndefined = d3Array.variance(numbersOrUndefinedArray); + +numOrUndefined = d3Array.variance(typedArray); +numOrUndefined = d3Array.variance(readonlyNumbersArray); +numOrUndefined = d3Array.variance(readonlyNumericArray); +numOrUndefined = d3Array.variance(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.variance(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.variance(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.variance(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// ----------------------------------------------------------------------------- +// Test Searching Arrays +// ----------------------------------------------------------------------------- + +numbersArray = [0, 2, 3, 4, 7, 8]; +stringyNumbersArray = ['0', '2', '3', '4', '7', '8']; +dateArray = [new Date(2010, 1, 1), new Date(2011, 1, 1), new Date(2012, 1, 1), new Date(2013, 1, 1)]; +typedArray = Uint8Array.from(numbersArray); + +// scan() ---------------------------------------------------------------------- + +numOrUndefined = d3Array.scan(numbersArray); +numOrUndefined = d3Array.scan(typedArray); +numOrUndefined = d3Array.scan(readonlyNumbersArray); + +numOrUndefined = d3Array.scan(mixedObjectArray, (a, b) => { + const aElem: MixedObject = a; + const bElem: MixedObject = b; + return a.num - b.num; +}); + +numOrUndefined = d3Array.scan(readonlyMixedObjectArray, (a, b) => { + const aElem: MixedObject = a; + const bElem: MixedObject = b; + return a.num - b.num; +}); + +numOrUndefined = d3Array.scan(mixedObjectOrUndefinedArray, (a, b) => { + const aElem: MixedObject | undefined = a; + const bElem: MixedObject | undefined = b; + return a && b ? a.num - b.num : NaN; +}); + +numOrUndefined = d3Array.scan(readonlyMixedObjectOrUndefinedArray, (a, b) => { + const aElem: MixedObject | undefined = a; + const bElem: MixedObject | undefined = b; + return a && b ? a.num - b.num : NaN; +}); + +// bisectLeft() ---------------------------------------------------------------- + +num = d3Array.bisectLeft(numbersArray, 4); +num = d3Array.bisectLeft(numbersArray, 4, 1); +num = d3Array.bisectLeft(numbersArray, 4, 1, 4); + +num = d3Array.bisectLeft(stringyNumbersArray, '21'); +num = d3Array.bisectLeft(stringyNumbersArray, '21', 1); +num = d3Array.bisectLeft(stringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectLeft(dateArray, new Date(2011, 2, 1)); +num = d3Array.bisectLeft(dateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectLeft(dateArray, new Date(2011, 2, 1), 1, 2); + +num = d3Array.bisectLeft(typedArray, 4); +num = d3Array.bisectLeft(typedArray, 4, 1); +num = d3Array.bisectLeft(typedArray, 4, 1, 4); + +num = d3Array.bisectLeft(readonlyNumbersArray, 4); +num = d3Array.bisectLeft(readonlyNumbersArray, 4, 1); +num = d3Array.bisectLeft(readonlyNumbersArray, 4, 1, 4); + +num = d3Array.bisectLeft(readonlyStringyNumbersArray, '21'); +num = d3Array.bisectLeft(readonlyStringyNumbersArray, '21', 1); +num = d3Array.bisectLeft(readonlyStringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectLeft(readonlyDateArray, new Date(2011, 2, 1)); +num = d3Array.bisectLeft(readonlyDateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectLeft(readonlyDateArray, new Date(2011, 2, 1), 1, 2); + +// bisectRight() --------------------------------------------------------------- + +num = d3Array.bisectRight(numbersArray, 4); +num = d3Array.bisectRight(numbersArray, 4, 1); +num = d3Array.bisectRight(numbersArray, 4, 1, 4); + +num = d3Array.bisectRight(stringyNumbersArray, '21'); +num = d3Array.bisectRight(stringyNumbersArray, '21', 1); +num = d3Array.bisectRight(stringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectRight(dateArray, new Date(2011, 2, 1)); +num = d3Array.bisectRight(dateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectRight(dateArray, new Date(2011, 2, 1), 1, 2); + +num = d3Array.bisectRight(typedArray, 4); +num = d3Array.bisectRight(typedArray, 4, 1); +num = d3Array.bisectRight(typedArray, 4, 1, 4); + +num = d3Array.bisectRight(readonlyNumbersArray, 4); +num = d3Array.bisectRight(readonlyNumbersArray, 4, 1); +num = d3Array.bisectRight(readonlyNumbersArray, 4, 1, 4); + +num = d3Array.bisectRight(readonlyStringyNumbersArray, '21'); +num = d3Array.bisectRight(readonlyStringyNumbersArray, '21', 1); +num = d3Array.bisectRight(readonlyStringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectRight(readonlyDateArray, new Date(2011, 2, 1)); +num = d3Array.bisectRight(readonlyDateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectRight(readonlyDateArray, new Date(2011, 2, 1), 1, 2); + +// bisect() -------------------------------------------------------------------- + +num = d3Array.bisect(numbersArray, 4); +num = d3Array.bisect(numbersArray, 4, 1); +num = d3Array.bisect(numbersArray, 4, 1, 4); + +num = d3Array.bisect(stringyNumbersArray, '21'); +num = d3Array.bisect(stringyNumbersArray, '21', 1); +num = d3Array.bisect(stringyNumbersArray, '21', 1, 4); + +num = d3Array.bisect(dateArray, new Date(2011, 2, 1)); +num = d3Array.bisect(dateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisect(dateArray, new Date(2011, 2, 1), 1, 2); + +num = d3Array.bisect(typedArray, 4); +num = d3Array.bisect(typedArray, 4, 1); +num = d3Array.bisect(typedArray, 4, 1, 4); + +num = d3Array.bisect(readonlyNumbersArray, 4); +num = d3Array.bisect(readonlyNumbersArray, 4, 1); +num = d3Array.bisect(readonlyNumbersArray, 4, 1, 4); + +num = d3Array.bisect(readonlyStringyNumbersArray, '21'); +num = d3Array.bisect(readonlyStringyNumbersArray, '21', 1); +num = d3Array.bisect(readonlyStringyNumbersArray, '21', 1, 4); + +num = d3Array.bisect(readonlyDateArray, new Date(2011, 2, 1)); +num = d3Array.bisect(readonlyDateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisect(readonlyDateArray, new Date(2011, 2, 1), 1, 2); + +// bisector() ------------------------------------------------------------------ + +mixedObjectArray.sort((a, b) => a.date.valueOf() - b.date.valueOf()); + +let mixedObjectDateBisectorObject: d3Array.Bisector; + +// define using accessor +mixedObjectDateBisectorObject = d3Array.bisector(el => el.date); + +// define using comparator +mixedObjectDateBisectorObject = d3Array.bisector((el, x) => + el.date.valueOf() - x.valueOf()); + +// bisect left +num = mixedObjectDateBisectorObject.left(mixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.left(mixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.left(mixedObjectArray, new Date(2015, 3, 14), 3, 4); + +num = mixedObjectDateBisectorObject.left(readonlyMixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.left(readonlyMixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.left(readonlyMixedObjectArray, new Date(2015, 3, 14), 3, 4); + +// bisect right +num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 3, 4); + +num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 3, 4); + +// ascending() ----------------------------------------------------------------- + +num = d3Array.ascending(undefined, 20); +num = d3Array.ascending(10, 20); +num = d3Array.ascending('10', '20'); +num = d3Array.ascending(new Date(2016, 6, 13), new Date(2016, 6, 14)); + +// descending() ---------------------------------------------------------------- + +num = d3Array.descending(undefined, 20); +num = d3Array.descending(10, 20); +num = d3Array.descending('10', '20'); +num = d3Array.descending(new Date(2016, 6, 13), new Date(2016, 6, 14)); + +// ----------------------------------------------------------------------------- +// Test Transforming Arrays +// ----------------------------------------------------------------------------- + +// merge() --------------------------------------------------------------------- + +const testArray1 = [ + new MixedObject(10, new Date(2016, 6, 1)), + new MixedObject(20, new Date(2016, 7, 30)), + new MixedObject(30, new Date(2015, 3, 15)), + new MixedObject(40, new Date(2014, 3, 15)), + new MixedObject(50, new Date(2017, 4, 15)) +]; + +const testArray2 = [ + new MixedObject(40, new Date(2016, 3, 1)), + new MixedObject(50, new Date(2016, 9, 30)), +]; + +let testArrays: MixedObject[][] = [testArray1, testArray2]; + +const readonlyTestArray1 = testArray1 as ReadonlyArray; +const readonlyTestArray2 = testArray2 as ReadonlyArray; +const readonlyTestArrays = [testArray1, testArray2] as ReadonlyArray>; + +let mergedArray: MixedObject[]; + +mergedArray = d3Array.merge(testArrays); // inferred type +mergedArray = d3Array.merge(testArrays); // explicit type +// $ExpectError +mergedArray = d3Array.merge([[10, 40, 30], [15, 30]]); // fails, type mismatch +// $ExpectError +mergedArray = d3Array.merge([testArray1, [15, 30]]); // fails, type mismatch + +mergedArray = d3Array.merge(readonlyTestArrays); // inferred type +mergedArray = d3Array.merge(readonlyTestArrays); // explicit type + +// cross() --------------------------------------------------------------------- + +let crossed: Array<[string, number]>; + +const chars = ['x', 'y']; +const nums = [1, 2]; + +crossed = d3Array.cross(chars, nums); +crossed = d3Array.cross(chars, nums); + +let strArray: string[] = d3Array.cross([2, 3], [5, 6], (a, b) => (a + b) + 'px'); +strArray = d3Array.cross([2, 3], [5, 6], (a, b) => { + const aa: number = a; + const bb: number = b; + return (aa + bb) + 'px'; +}); + +const readonlyChars = chars as ReadonlyArray; +const readonlyNums = new Uint8Array(nums); + +crossed = d3Array.cross(readonlyChars, readonlyNums); +crossed = d3Array.cross(readonlyChars, readonlyNums); + +strArray = d3Array.cross([2, 3] as ReadonlyArray, new Uint8ClampedArray([5, 6]), (a, b) => (a + b) + 'px'); +strArray = d3Array.cross([2, 3] as ReadonlyArray, new Uint8ClampedArray([5, 6]), (a, b) => { + const aa: number = a; + const bb: number = b; + return (aa + bb) + 'px'; +}); + +d3Array.cross(new Uint8Array([1, 2, 3, 4, 5]), new Uint8Array([10, 20, 30, 40, 50])); + +// pairs() --------------------------------------------------------------------- + +let pairs: Array<[MixedObject, MixedObject]>; + +pairs = d3Array.pairs(mergedArray); + +numbersArray = d3Array.pairs(mergedArray, (a, b) => b.num - a.num); +numbersArray = d3Array.pairs(mergedArray, (a, b) => { + const aa: MixedObject = a; + const bb: MixedObject = b; + return bb.num - aa.num; +}); + +const readonlyMergedArray = mergedArray as ReadonlyArray; +pairs = d3Array.pairs(readonlyMergedArray); + +numbersArray = d3Array.pairs(readonlyMergedArray, (a, b) => b.num - a.num); +numbersArray = d3Array.pairs(readonlyMergedArray, (a, b) => { + const aa: MixedObject = a; + const bb: MixedObject = b; + return bb.num - aa.num; +}); + +// permute() ------------------------------------------------------------------- + +// getting a permutation of array elements +mergedArray = d3Array.permute(mergedArray, [1, 0, 2, 5, 3, 4, 6]); +mergedArray = d3Array.permute(readonlyMergedArray, [1, 0, 2, 5, 3, 4, 6]); +mergedArray = d3Array.permute(readonlyMergedArray, nums); + +// Getting an ordered array with object properties + +const testObject = { + val: 10, + name: 'Test', + when: new Date(), + more: [10, 30, 40] +}; + +const p1: Array = d3Array.permute(testObject, ['name', 'val', 'when', 'more']); +const p2: Array = d3Array.permute(testObject, ['when', 'more']); +// $ExpectError +const p3 = d3Array.permute(testObject, ['when', 'unknown']); + +// range() --------------------------------------------------------------------- + +numbersArray = d3Array.range(10); +numbersArray = d3Array.range(1, 10); +numbersArray = d3Array.range(1, 10, 0.5); + +// shuffle() ------------------------------------------------------------------- + +mergedArray = d3Array.shuffle(mergedArray); +mergedArray = d3Array.shuffle(mergedArray, 1); +mergedArray = d3Array.shuffle(mergedArray, 1, 3); +// $ExpectError +mergedArray = d3Array.shuffle(readonlyMergedArray); // fails, shuffle mutates input array in-place + +// Test each TypedArray explicitly. Can't use ArrayLike in this case because shuffle is mutable and ArrayLike would include ReadonlyArray +const resultInt8: Int8Array = d3Array.shuffle(new Int8Array(numbersArray)); +const resultUint8: Uint8Array = d3Array.shuffle(new Uint8Array(numbersArray)); +const resultUint8Clamped: Uint8ClampedArray = d3Array.shuffle(new Uint8ClampedArray(numbersArray)); +const resultInt16: Int16Array = d3Array.shuffle(new Int16Array(numbersArray)); +const resultUint6: Uint16Array = d3Array.shuffle(new Uint16Array(numbersArray)); +const resultInt32: Int32Array = d3Array.shuffle(new Int32Array(numbersArray)); +const resultUint32: Uint32Array = d3Array.shuffle(new Uint32Array(numbersArray)); +const resultFloat32: Float32Array = d3Array.shuffle(new Float32Array(numbersArray)); +const resultFloat64: Float64Array = d3Array.shuffle(new Float64Array(numbersArray)); + +// ticks() --------------------------------------------------------------------- + +numbersArray = d3Array.ticks(1, 10, 5); + +// tickIncrement() ------------------------------------------------------------------ + +let numDiff: number = d3Array.tickIncrement(1, 10, 5); + +// tickStep() ------------------------------------------------------------------ + +numDiff = d3Array.tickStep(1, 10, 5); + +// transpose() ----------------------------------------------------------------- + +testArrays = d3Array.transpose([testArray1, testArray2]); +testArrays = d3Array.transpose([readonlyTestArray1, readonlyTestArray2] as ReadonlyArray>); + +// zip() ----------------------------------------------------------------------- + +testArrays = d3Array.zip(testArray1, testArray2); +testArrays = d3Array.zip(readonlyTestArray1, readonlyTestArray2); + +// ----------------------------------------------------------------------------- +// Test Histogram +// ----------------------------------------------------------------------------- + +const timeScale = scaleTime(); + +// Create histogram generator ================================================== + +// number - number +let histoNumber_Number: d3Array.HistogramGeneratorNumber; +histoNumber_Number = d3Array.histogram(); +histoNumber_Number = d3Array.histogram(); + +// MixedObject - number | undefined +let histoMixed_NumberOrUndefined: d3Array.HistogramGeneratorNumber; +histoMixed_NumberOrUndefined = d3Array.histogram(); + +// MixedObject | undefined - number | undefined +let histoMixedOrUndefined_NumberOrUndefined: d3Array.HistogramGeneratorNumber; +histoMixedOrUndefined_NumberOrUndefined = d3Array.histogram(); + +// MixedObject | undefined - number +let histoMixedOrUndefined_Number: d3Array.HistogramGeneratorNumber; +histoMixedOrUndefined_Number = d3Array.histogram(); + +// MixedObject - Date +let histoMixedObject_Date: d3Array.HistogramGeneratorDate; +histoMixedObject_Date = d3Array.histogram(); + +// MixedObject - Date | undefined +let histoMixedObject_DateOrUndefined: d3Array.HistogramGeneratorDate; +histoMixedObject_DateOrUndefined = d3Array.histogram(); + +let defaultHistogram: d3Array.HistogramGeneratorNumber; +defaultHistogram = d3Array.histogram(); + +// Configure histogram generator =============================================== + +// value(...) ------------------------------------------------------------------ + +let valueAccessorFn: (d: MixedObject, i: number, data: MixedObject[]) => Date; +valueAccessorFn = histoMixedObject_Date.value(); + +type valueAccessor = (d: D, i: number, data: D[]) => V; + +// number - number +const valueFnNumber_Number: valueAccessor = histoNumber_Number.value(); +histoNumber_Number = histoNumber_Number.value((d: number, i: number, data: ArrayLike) => { + return d - num; +}); + +// MixedObject - number | undefined +const valueFnMixedObject_NumberOrUndefined: valueAccessor = histoMixed_NumberOrUndefined.value(); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.value((d: MixedObject, i: number, data: ArrayLike) => { + return d.str === "NA" ? undefined : d.num; +}); + +// MixedObject | undefined - number | undefined +const valueFnMixedOrUndefined_NumberOrUndefined: valueAccessor = histoMixedOrUndefined_NumberOrUndefined.value(); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.value((d: MixedObject | undefined, i: number, data: ArrayLike) => { + return d ? d.num : undefined; +}); + +// MixedObject | undefined - number +const valueFnMixedOrUndefined_Number: valueAccessor = histoMixedOrUndefined_Number.value(); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.value((d: MixedObject | undefined, i: number, data: ArrayLike) => { + return d ? d.num : 0; +}); + +// MixedObject - Date +const valueFnMixedObject_Date: valueAccessor = histoMixedObject_Date.value(); +histoMixedObject_Date = histoMixedObject_Date.value((d: MixedObject, i: number, data: ArrayLike) => { + return d.date; +}); + +// MixedObject - Date | undefined +const valueFnMixedObject_DateOrUndefined: valueAccessor = histoMixedObject_DateOrUndefined.value(); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.value((d: MixedObject, i: number, data: ArrayLike) => { + return d.date; +}); + +// domain(...) ----------------------------------------------------------------- + +const domain = timeScale.domain(); +let domainFnNumber: (array: number[]) => [number, number] | [undefined, undefined]; +let domainFnNumberOrUndef: (array: Array) => [number, number] | [undefined, undefined]; +let domainFnDate: (values: Date[]) => [Date, Date]; + +// number - number +domainFnNumber = histoNumber_Number.domain(); +histoNumber_Number = histoNumber_Number.domain([0, 100]); +histoNumber_Number = histoNumber_Number.domain(d3Array.extent); + +// MixedObject - number | undefined +domainFnNumber = histoNumber_Number.domain(); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.domain([0, 100]); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.domain(d3Array.extent); + +// MixedObject | undefined - number | undefined +domainFnNumberOrUndef = histoMixedOrUndefined_NumberOrUndefined.domain(); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.domain([0, 100]); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.domain(d3Array.extent); + +// MixedObject | undefined - number +domainFnNumber = histoMixedOrUndefined_Number.domain(); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.domain([0, 100]); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.domain(d3Array.extent); + +// MixedObject - Date +domainFnDate = histoMixedObject_Date.domain(); +histoMixedObject_Date = histoMixedObject_Date.domain([new Date(2014, 3, 15), new Date(2017, 4, 15)]); +histoMixedObject_Date = histoMixedObject_Date.domain([domain[0], domain[domain.length]]); +histoMixedObject_Date = histoMixedObject_Date.domain((values) => [values[0], values[values.length]]); +// $ExpectError +histoMixedObject_Date = histoMixedObject_Date.domain(timeScale.domain()); // fails, as scale domain is an array with possibly more than the two elements expected by histogram + +// MixedObject - Date | undefined +domainFnDate = histoMixedObject_Date.domain(); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([new Date(2014, 3, 15), new Date(2017, 4, 15)]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([domain[0], domain[domain.length]]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain((values) => [values[0]!, values[values.length]!]); + +// thresholds(...) ------------------------------------------------------------- + +type thresholdsWithUndefinedCont = d3Array.ThresholdCountGenerator; +type thresholdsWithUndefinedArray = d3Array.ThresholdNumberArrayGenerator; + +let thresholds: d3Array.ThresholdCountGenerator | d3Array.ThresholdNumberArrayGenerator; +let thresholdsWithUndefined: thresholdsWithUndefinedCont | thresholdsWithUndefinedArray; +const thresholdsArray: d3Array.ThresholdNumberArrayGenerator = (x: ArrayLike) => [5, 10, 20]; + +let thresholdsDate: d3Array.ThresholdDateArrayGenerator; +let thresholdsDateOrUndefined: d3Array.ThresholdDateArrayGenerator; + +// number - number +thresholds = histoNumber_Number.thresholds(); +histoNumber_Number = histoNumber_Number.thresholds(3); +histoNumber_Number = histoNumber_Number.thresholds([5, 10, 20]); +histoNumber_Number = histoNumber_Number.thresholds(d3Array.thresholdScott); +histoNumber_Number = histoNumber_Number.thresholds(thresholdsArray); + +// MixedObject - number | undefined +thresholdsWithUndefined = histoMixed_NumberOrUndefined.thresholds(); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.thresholds(3); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.thresholds([5, 10, 20]); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.thresholds(d3Array.thresholdScott); + +// MixedObject | undefined - number | undefined +thresholdsWithUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds(); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds(3); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds([5, 10, 20]); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds(d3Array.thresholdScott); + +// MixedObject | undefined - number +thresholds = histoMixedOrUndefined_Number.thresholds(); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.thresholds(5); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.thresholds([5, 10, 20]); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.thresholds(d3Array.thresholdSturges); + +// MixedObject - Date +thresholdsDate = histoMixedObject_Date.thresholds(); +histoMixedObject_Date = histoMixedObject_Date.thresholds([new Date(2015, 11, 15), new Date(2016, 6, 1), new Date(2016, 8, 30)]); +histoMixedObject_Date = histoMixedObject_Date.thresholds(timeScale.ticks(timeYear)); +histoMixedObject_Date = histoMixedObject_Date.thresholds((values: ArrayLike) => [new Date(2015, 11, 15), new Date(2016, 6, 1), new Date(2016, 8, 30)]); +histoMixedObject_Date = histoMixedObject_Date.thresholds((values: ArrayLike, min: Date, max: Date) => { + const thresholds: Date[] = [values[0], values[2], values[4]]; + return thresholds; +}); +// $ExpectError +histoMixedObject_Date = histoMixedObject_Date.thresholds(d3Array.thresholdScott); + +// MixedObject - Date | undefined +thresholdsDateOrUndefined = histoMixedObject_DateOrUndefined.thresholds(); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.thresholds([new Date(2015, 11, 15), new Date(2016, 6, 1), new Date(2016, 8, 30)]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.thresholds(timeScale.ticks(timeYear)); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.thresholds((values: ArrayLike, min: Date, max: Date) => { + const thresholds: Date[] = [values[0]!, new Date(2015, 11, 15), values[values.length]!]; + return thresholds; +}); + +// Use histogram generator ===================================================== + +undef = d3Array.histogram()([])[0].x0 as undefined; +undef = d3Array.histogram()([undefined])[0].x0 as undefined; + +// number - number +let binsNumber_Number: Array>; +binsNumber_Number = histoNumber_Number([-1, 0, 1, 1, 3, 20, 234]); + +let binNumber_Number: d3Array.Bin; +binNumber_Number = binsNumber_Number[0]; + +num = binNumber_Number.length; +num = binNumber_Number[0]; +numOrUndefined = binNumber_Number.x0; +numOrUndefined = binNumber_Number.x1; + +// MixedObject - number | undefined +let binsNumberMixed_NumberOrUndefined: Array>; +binsNumberMixed_NumberOrUndefined = histoMixed_NumberOrUndefined(mixedObjectArray); + +let binNumberMixed_NumberOrUndefined: d3Array.Bin; +binNumberMixed_NumberOrUndefined = binsNumberMixed_NumberOrUndefined[0]; + +num = binNumberMixed_NumberOrUndefined.length; +mixedObject = binNumberMixed_NumberOrUndefined[0]; +numOrUndefined = binNumberMixed_NumberOrUndefined.x0; +numOrUndefined = binNumberMixed_NumberOrUndefined.x1; + +// MixedObject | undefined - number | undefined +let binsNumberMixedOrUndefined_NumberOrUndefined: Array>; +binsNumberMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined(mixedObjectArray); + +let binNumberMixedOrUndefined_NumberOrUndefined: d3Array.Bin; +binNumberMixedOrUndefined_NumberOrUndefined = binsNumberMixedOrUndefined_NumberOrUndefined[0]; + +num = binNumberMixedOrUndefined_NumberOrUndefined.length; +mixedObjectOrUndefined = binNumberMixedOrUndefined_NumberOrUndefined[0]; +numOrUndefined = binNumberMixedOrUndefined_NumberOrUndefined.x0; +numOrUndefined = binNumberMixedOrUndefined_NumberOrUndefined.x1; + +// MixedObject | undefined - number +let binsNumberMixedOrUndefined_Number: Array>; +binsNumberMixedOrUndefined_Number = histoMixedOrUndefined_Number(mixedObjectArray); + +let binNumberMixedOrUndefined_Number: d3Array.Bin; +binNumberMixedOrUndefined_Number = binsNumberMixedOrUndefined_Number[0]; + +num = binNumberMixedOrUndefined_Number.length; +mixedObjectOrUndefined = binNumberMixedOrUndefined_Number[0]; +numOrUndefined = binNumberMixedOrUndefined_Number.x0; +numOrUndefined = binNumberMixedOrUndefined_Number.x1; + +// MixedObject - Date +let binsMixedObject_Date: Array>; +binsMixedObject_Date = histoMixedObject_Date(mixedObjectArray); +binsMixedObject_Date = histoMixedObject_Date(readonlyMixedObjectArray); + +let binMixedObject_Date: d3Array.Bin; +binMixedObject_Date = binsMixedObject_Date[0]; + +num = binMixedObject_Date.length; +mixedObject = binMixedObject_Date[0]; +dateOrUndefined = binMixedObject_Date.x0; +dateOrUndefined = binMixedObject_Date.x1; + +// MixedObject - Date | undefined +let binsMixedObject_DateOrUndefined: Array>; +binsMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined(mixedObjectArray); + +let binMixedObject_DateOrUndefined: d3Array.Bin; +binMixedObject_DateOrUndefined = binsMixedObject_DateOrUndefined[0]; + +num = binMixedObject_DateOrUndefined.length; +mixedObject = binMixedObject_DateOrUndefined[0]; +dateOrUndefined = binMixedObject_DateOrUndefined.x0; +dateOrUndefined = binMixedObject_DateOrUndefined.x1; + +// Histogram Thresholds ======================================================== + +numbersArray = [-1, 0, 1, 1, 3, 20, 234]; +typedArray = new Uint8Array(numbersArray); +readonlyNumbersArray = numbersArray as ReadonlyArray; + +num = d3Array.thresholdFreedmanDiaconis(numbersArray, -1, 234); +num = d3Array.thresholdFreedmanDiaconis(typedArray, -1, 234); +num = d3Array.thresholdFreedmanDiaconis(readonlyNumbersArray, -1, 234); + +num = d3Array.thresholdScott(numbersArray, -1, 234); +num = d3Array.thresholdScott(typedArray, -1, 234); +num = d3Array.thresholdScott(readonlyNumbersArray, -1, 234); + +num = d3Array.thresholdSturges(numbersArray); +num = d3Array.thresholdSturges(typedArray); +num = d3Array.thresholdSturges(readonlyNumbersArray); + +// Deprecated ================================================================== + +const histDeprecatedNumber: d3Array.HistogramGenerator = d3Array.histogram(); +const histDeprecatedDate: d3Array.HistogramGenerator = d3Array.histogram(); diff --git a/types/d3-array/v1/index.d.ts b/types/d3-array/v1/index.d.ts new file mode 100644 index 0000000000..7320e1c223 --- /dev/null +++ b/types/d3-array/v1/index.d.ts @@ -0,0 +1,547 @@ +// Type definitions for D3JS d3-array module 1.2 +// Project: https://github.com/d3/d3-array +// Definitions by: Alex Ford +// Boris Yankov +// Tom Wanzek +// denisname , +// Hugues Stefanski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// Last module patch version validated against: 1.2.1 + +// -------------------------------------------------------------------------- +// Shared Types and Interfaces +// -------------------------------------------------------------------------- + +/** + * Administrivia: JavaScript primitive types and Date + */ +export type Primitive = number | string | boolean | Date; + +/** + * Administrivia: anything with a valueOf(): number method is comparable, so we allow it in numeric operations + */ +export interface Numeric { + valueOf(): number; +} + +// -------------------------------------------------------------------------------------- +// Descriptive Statistics +// -------------------------------------------------------------------------------------- + +/** + * Return the maximum value in the array of strings using natural order. + */ +export function max(array: ArrayLike): string | undefined; + +/** + * Return the maximum value in the array of numbers using natural order. + */ +export function max(array: ArrayLike): T | undefined; + +/** + * Return the maximum value in the array using natural order and a projection function to map values to strings. + */ +export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; + +/** + * Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values. + */ +export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike): string | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike): T | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike): [string, string] | [undefined, undefined]; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike): [T, T] | [undefined, undefined]; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): [string, string] | [undefined, undefined]; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): [U, U] | [undefined, undefined]; + +/** + * Return the mean of an array of numbers + */ +export function mean(array: ArrayLike): number | undefined; + +/** + * Return the mean of an array of numbers + */ +export function mean(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Return the median of an array of numbers + */ +export function median(array: ArrayLike): number | undefined; + +/** + * Return the median of an array of numbers + */ +export function median(array: ArrayLike, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Returns the p-quantile of an array of numbers + */ +export function quantile(array: ArrayLike, p: number): number | undefined; + +export function quantile(array: ArrayLike, p: number, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Compute the sum of an array of numbers. + */ +export function sum(array: ArrayLike): number; + +/** + * Compute the sum of an array, using the given accessor to convert values to numbers. + */ +export function sum(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number; + +/** + * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array of numbers. + */ +export function deviation(array: ArrayLike): number | undefined; + +/** + * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array, + * using the given accessor to convert values to numbers. + */ +export function deviation(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Compute an unbiased estimator of the population variance of the given array of numbers. + */ +export function variance(array: ArrayLike): number | undefined; + +/** + * Compute an unbiased estimator of the population variance of the given array, + * using the given accessor to convert values to numbers. + */ +export function variance(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; + +// -------------------------------------------------------------------------------------- +// Searching Arrays +// -------------------------------------------------------------------------------------- + +export function scan(array: ArrayLike, comparator?: (a: number, b: number) => number): number | undefined; +export function scan(array: ArrayLike, comparator: (a: T, b: T) => number): number | undefined; + +export function bisectLeft(array: ArrayLike, x: number, lo?: number, hi?: number): number; +export function bisectLeft(array: ArrayLike, x: string, lo?: number, hi?: number): number; +export function bisectLeft(array: ArrayLike, x: Date, lo?: number, hi?: number): number; + +export function bisectRight(array: ArrayLike, x: number, lo?: number, hi?: number): number; +export function bisectRight(array: ArrayLike, x: string, lo?: number, hi?: number): number; +export function bisectRight(array: ArrayLike, x: Date, lo?: number, hi?: number): number; + +export const bisect: typeof bisectRight; + +export interface Bisector { + left(array: ArrayLike, x: U, lo?: number, hi?: number): number; + right(array: ArrayLike, x: U, lo?: number, hi?: number): number; +} + +export function bisector(comparator: (a: T, b: U) => number): Bisector; +export function bisector(accessor: (x: T) => U): Bisector; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + */ +export function quickselect(array: ArrayLike, k: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + */ +export function quickselect(array: ArrayLike, k: number, left: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + * @param compare The compare function. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number, compare: (a: Primitive | undefined, b: Primitive | undefined) => number): T[]; + +// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. +/** + * Compares two primitive values for sorting (in ascending order). + */ +export function ascending(a: Primitive | undefined, b: Primitive | undefined): number; + +// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. +/** + * Compares two primitive values for sorting (in ascending order). + */ +export function descending(a: Primitive | undefined, b: Primitive | undefined): number; + +// -------------------------------------------------------------------------------------- +// Transforming Arrays +// -------------------------------------------------------------------------------------- + +/** + * Groups the specified array of values into a Map from key to array of value. + * @param a The array to group. + * @param key The key function. + */ +export function group(a: ArrayLike, key: (value: TObject) => TKey): Map; + +/** + * Groups and reduces the specified array of values into a Map from key to value. + * + * @param a The array to group. + * @param reduce The reduce function. + * @param key The key function. + */ +export function rollup(a: ArrayLike, reduce: (value: TObject[]) => TReduce, key: (value: TObject) => TKey): Map; + +/** + * Returns the Cartesian product of the two arrays a and b. + * For each element i in the specified array a and each element j in the specified array b, in order, + * it creates a two-element array for each pair. + * + * @param a First input array. + * @param b Second input array. + */ +export function cross(a: ArrayLike, b: ArrayLike): Array<[S, T]>; + +/** + * Returns the Cartesian product of the two arrays a and b. + * For each element i in the specified array a and each element j in the specified array b, in order, + * invokes the specified reducer function passing the element i and element j. + * + * @param a First input array. + * @param b Second input array. + * @param reducer A reducer function taking as input an element from "a" and "b" and returning a reduced value. + */ +export function cross(a: ArrayLike, b: ArrayLike, reducer: (a: S, b: T) => U): U[]; + +/** + * Merges the specified arrays into a single array. + */ +export function merge(arrays: ArrayLike>): T[]; + +/** + * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1. + * Returns the empty array if the input array has fewer than two elements. + * + * @param array Array of input elements + */ +export function pairs(array: ArrayLike): Array<[T, T]>; +/** + * For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1. + * Returns the resulting array of pair-wise reduced elements. + * Returns the empty array if the input array has fewer than two elements. + * + * @param array Array of input elements + * @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value. + */ +export function pairs(array: ArrayLike, reducer: (a: T, b: T) => U): U[]; + +/** + * Returns a permutation of the specified array using the specified array of indexes. + * The returned array contains the corresponding element in array for each index in indexes, in order. + * For example, `permute(["a", "b", "c"], [1, 2, 0]) // ["b", "c", "a"]` + */ +export function permute(array: { [key: number]: T }, keys: ArrayLike): T[]; + +/** + * Extract the values from an object into an array with a stable order. For example: + * `var object = {yield: 27, year: 1931, site: "University Farm"};` + * `d3.permute(object, ["site", "yield"]); // ["University Farm", 27]` + */ +export function permute(object: T, keys: ArrayLike): Array; + +/** + * Generates a 0-based numeric sequence. The output range does not include 'stop'. + */ +export function range(stop: number): number[]; + +/** + * Generates a numeric sequence starting from the given start and stop values. 'step' defaults to 1. The output range does not include 'stop'. + */ +export function range(start: number, stop: number, step?: number): number[]; + +/** + * Randomizes the order of the specified array using the Fisher–Yates shuffle. + */ +export function shuffle(array: T[], lo?: number, hi?: number): T[]; +export function shuffle(array: Int8Array, lo?: number, hi?: number): Int8Array; +export function shuffle(array: Uint8Array, lo?: number, hi?: number): Uint8Array; +export function shuffle(array: Uint8ClampedArray, lo?: number, hi?: number): Uint8ClampedArray; +export function shuffle(array: Int16Array, lo?: number, hi?: number): Int16Array; +export function shuffle(array: Uint16Array, lo?: number, hi?: number): Uint16Array; +export function shuffle(array: Int32Array, lo?: number, hi?: number): Int32Array; +export function shuffle(array: Uint32Array, lo?: number, hi?: number): Uint32Array; +export function shuffle(array: Float32Array, lo?: number, hi?: number): Float32Array; +export function shuffle(array: Float64Array, lo?: number, hi?: number): Float64Array; + +/** + * Generate an array of approximately count + 1 uniformly-spaced, nicely-rounded values between start and stop (inclusive). + * Each value is a power of ten multiplied by 1, 2 or 5. See also d3.tickIncrement, d3.tickStep and linear.ticks. + * + * Ticks are inclusive in the sense that they may include the specified start and stop values if (and only if) they are exact, + * nicely-rounded values consistent with the inferred step. More formally, each returned tick t satisfies start ≤ t and t ≤ stop. + * + * @param start Start value for ticks + * @param stop Stop value for ticks + * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. + */ +export function ticks(start: number, stop: number, count: number): number[]; + +/** + * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks: + * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5. + * + * Like d3.tickStep, except requires that start is always less than or equal to step, and if the tick step for the given start, + * stop and count would be less than one, returns the negative inverse tick step instead. + * + * This method is always guaranteed to return an integer, and is used by d3.ticks to avoid guarantee that the returned tick values + * are represented as precisely as possible in IEEE 754 floating point. + * + * @param start Start value for ticks + * @param stop Stop value for ticks + * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. + */ +export function tickIncrement(start: number, stop: number, count: number): number; + +/** + * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks: + * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5. + * + * Note that due to the limited precision of IEEE 754 floating point, the returned value may not be exact decimals; + * use d3-format to format numbers for human consumption. + * + * @param start Start value for ticks + * @param stop Stop value for ticks + * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. + */ +export function tickStep(start: number, stop: number, count: number): number; + +/** + * Transpose a matrix provided in Array of Arrays format. + */ +export function transpose(matrix: ArrayLike>): T[][]; + +/** + * Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays. + * The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array + * contains one-element arrays. With no arguments, the returned array is empty. + */ +export function zip(...arrays: Array>): T[][]; + +// -------------------------------------------------------------------------------------- +// Histogram +// -------------------------------------------------------------------------------------- + +export interface Bin extends Array { + x0: Value | undefined; + x1: Value | undefined; +} + +/** + * Type definition for threshold generator which returns the count of recommended thresholds + */ +export type ThresholdCountGenerator = + (values: ArrayLike, min: number, max: number) => number; + +/** + * Type definition for threshold generator which returns an array of recommended numbers thresholds + */ +export type ThresholdNumberArrayGenerator = + (values: ArrayLike, min: number, max: number) => Value[]; + +/** + * Type definition for threshold generator which returns an array of recommended dates thresholds + */ +export type ThresholdDateArrayGenerator = + (values: ArrayLike, min: Date, max: Date) => Value[]; + +/** + * @deprecated Use ThresholdNumberArrayGenerator or ThresholdDateArrayGenerator. + */ +export type ThresholdArrayGenerator = ThresholdNumberArrayGenerator; + +/** + * @deprecated Use `HistogramGeneratorNumber` for `number` values and `HistogramGeneratorDate for `Date` values. + */ +export interface HistogramGenerator { + (data: ArrayLike): Array>; + + value(): (d: Datum, i: number, data: ArrayLike) => Value; + value(valueAccessor: (d: Datum, i: number, data: ArrayLike) => Value): this; + + domain(): (values: ArrayLike) => [Value, Value] | [undefined, undefined]; + domain(domain: [Value, Value]): this; + domain(domainAccessor: (values: ArrayLike) => [Value, Value] | [undefined, undefined]): this; + + /** + * Set the array of values to be used as thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds Array of threshold values used for binning. The elements must + * be of the same type as the materialized values of the histogram. + */ + thresholds(thresholds: ArrayLike): this; +} + +export interface HistogramCommon { + (data: ArrayLike): Array>; + + value(): (d: Datum, i: number, data: ArrayLike) => Value; + value(valueAccessor: (d: Datum, i: number, data: ArrayLike) => Value): this; +} + +export interface HistogramGeneratorDate extends HistogramCommon { + domain(): (values: ArrayLike) => [Date, Date]; + domain(domain: [Date, Date]): this; + domain(domainAccessor: (values: ArrayLike) => [Date, Date]): this; + + thresholds(): ThresholdDateArrayGenerator; + /** + * Set the array of values to be used as thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds Array of threshold values used for binning. The elements must + * be of the same type as the materialized values of the histogram. + */ + thresholds(thresholds: ArrayLike): this; + /** + * Set a threshold accessor function, which returns the array of values to be used as + * thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds A function which accepts as arguments the array of materialized values, and + * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as + * thresholds in determining the bins. + */ + thresholds(thresholds: ThresholdDateArrayGenerator): this; +} + +export interface HistogramGeneratorNumber extends HistogramCommon { + domain(): (values: ArrayLike) => [number, number] | [undefined, undefined]; + domain(domain: [number, number]): this; + domain(domainAccessor: (values: ArrayLike) => [number, number] | [undefined, undefined]): this; + + thresholds(): ThresholdCountGenerator | ThresholdNumberArrayGenerator; + /** + * Divide the domain uniformly into approximately count bins. IMPORTANT: This threshold + * setting approach only works, when the materialized values are numbers! + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param count The desired number of uniform bins. + */ + thresholds(count: number): this; + /** + * Set a threshold accessor function, which returns the desired number of bins. + * Divides the domain uniformly into approximately count bins. IMPORTANT: This threshold + * setting approach only works, when the materialized values are numbers! + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param count A function which accepts as arguments the array of materialized values, and + * optionally the domain minimum and maximum. The function calculates and returns the suggested + * number of bins. + */ + thresholds(count: ThresholdCountGenerator): this; + /** + * Set the array of values to be used as thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds Array of threshold values used for binning. The elements must + * be of the same type as the materialized values of the histogram. + */ + thresholds(thresholds: ArrayLike): this; + /** + * Set a threshold accessor function, which returns the array of values to be used as + * thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds A function which accepts as arguments the array of materialized values, and + * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as + * thresholds in determining the bins. + */ + thresholds(thresholds: ThresholdNumberArrayGenerator): this; +} + +export function histogram(): HistogramGeneratorNumber; +export function histogram(): HistogramGeneratorNumber; +export function histogram(): HistogramGeneratorDate; + +/** + * @deprecated Do not use Value generic which mixes number and Date types. Use either number or Date + * (in combination with undefined, as applicable) to obtain a type-specific histogram generator. + */ +export function histogram(): HistogramGenerator; + +// -------------------------------------------------------------------------------------- +// Histogram Thresholds +// -------------------------------------------------------------------------------------- + +export function thresholdFreedmanDiaconis(values: ArrayLike, min: number, max: number): number; // of type ThresholdCountGenerator + +export function thresholdScott(values: ArrayLike, min: number, max: number): number; // of type ThresholdCountGenerator + +export function thresholdSturges(values: ArrayLike): number; // of type ThresholdCountGenerator diff --git a/types/d3-array/v1/tsconfig.json b/types/d3-array/v1/tsconfig.json new file mode 100644 index 0000000000..3edd84862c --- /dev/null +++ b/types/d3-array/v1/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "d3-array": [ + "d3-array/v1" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "d3-array-tests.ts" + ] +} \ No newline at end of file diff --git a/types/d3-array/v1/tslint.json b/types/d3-array/v1/tslint.json new file mode 100644 index 0000000000..54efb0b84e --- /dev/null +++ b/types/d3-array/v1/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false, + "no-unnecessary-generics": false + } +} diff --git a/types/d3-dsv/v0/tslint.json b/types/d3-dsv/v0/tslint.json index bafaae7817..f6fabe4180 100644 --- a/types/d3-dsv/v0/tslint.json +++ b/types/d3-dsv/v0/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO + "npm-naming": false, "dt-header": false } } diff --git a/types/d3/tsconfig.json b/types/d3/tsconfig.json index bc3e8cf886..9a4848b338 100644 --- a/types/d3/tsconfig.json +++ b/types/d3/tsconfig.json @@ -13,6 +13,11 @@ "typeRoots": [ "../" ], + "paths": { + "d3-array": [ + "d3-array/v1" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/d3/v4/tsconfig.json b/types/d3/v4/tsconfig.json index bf267af99d..6b2cee09dd 100644 --- a/types/d3/v4/tsconfig.json +++ b/types/d3/v4/tsconfig.json @@ -19,6 +19,9 @@ ], "d3": [ "d3/v4" + ], + "d3-array": [ + "d3-array/v1" ] }, "types": [], diff --git a/types/d3kit/tsconfig.json b/types/d3kit/tsconfig.json index 40e266f6f9..79051ab233 100644 --- a/types/d3kit/tsconfig.json +++ b/types/d3kit/tsconfig.json @@ -13,6 +13,11 @@ "typeRoots": [ "../" ], + "paths": { + "d3-array": [ + "d3-array/v1" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/debug/debug-tests.ts b/types/debug/debug-tests.ts index 92d6f5eb8e..42c3399aff 100644 --- a/types/debug/debug-tests.ts +++ b/types/debug/debug-tests.ts @@ -29,3 +29,7 @@ extendedLog("Testing this is also an IDebugger."); const extendedWithCustomDelimiter: debug1.Debugger = log.extend('with-delim', '.'); extendedWithCustomDelimiter("Testing this is an IDebugger, too."); + +debug2.log = console.log.bind(console); +const anotherLogger = debug2("DefinitelyTyped:error"); +anotherLogger("This should be printed to stdout"); diff --git a/types/debug/index.d.ts b/types/debug/index.d.ts index 715e7c145e..f4f5866af8 100644 --- a/types/debug/index.d.ts +++ b/types/debug/index.d.ts @@ -5,9 +5,10 @@ // John McLaughlin // Brasten Sager // Nicolas Penin +// Kristian Brünn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare var debug: debug.Debug & {debug: debug.Debug, default: debug.Debug}; +declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug }; export = debug; export as namespace debug; @@ -19,6 +20,7 @@ declare namespace debug { disable: () => string; enable: (namespaces: string) => void; enabled: (namespaces: string) => boolean; + log: (...args: any[]) => any; names: RegExp[]; skips: RegExp[]; diff --git a/types/diff-match-patch/tslint.json b/types/diff-match-patch/tslint.json index 65c83fb1e3..1c56ba06b6 100644 --- a/types/diff-match-patch/tslint.json +++ b/types/diff-match-patch/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { + "npm-naming": false, "dt-header": false } } diff --git a/types/domhandler/domhandler-tests.ts b/types/domhandler/domhandler-tests.ts index eea6441ad7..4b1c5406ec 100644 --- a/types/domhandler/domhandler-tests.ts +++ b/types/domhandler/domhandler-tests.ts @@ -1,6 +1,6 @@ -import { DomHandler, DomHandlerOptions, Node } from "domhandler"; +import { DomHandler, DomHandlerOptions, Node, DomElement } from "domhandler"; -const handler = new DomHandler((error: Error, dom: any) => { +const handler = new DomHandler((error: Error, dom: DomElement[]) => { if (error) console.error('There has been an error...'); else @@ -8,7 +8,7 @@ const handler = new DomHandler((error: Error, dom: any) => { }); handler.ontext = (data: string) => { console.log(data); }; handler.onreset = () => { console.log('We have a reset.'); }; -handler.onerror = (error: Error) => { console.error(Error); }; -handler.onopentag = (name: string, attribs) => { console.log(name, attribs); }; +handler.onerror = (error: Error) => { console.error(error); }; +handler.onopentag = (name: string, attribs: { [s: string]: string }) => { console.log(name, attribs); }; const dho: DomHandlerOptions = { normalizeWhitespace: true, withDomLvl1: true, withEndIndices: true, withStartIndices: true }; diff --git a/types/domhandler/index.d.ts b/types/domhandler/index.d.ts index 9d33055bbd..49dcd6325f 100644 --- a/types/domhandler/index.d.ts +++ b/types/domhandler/index.d.ts @@ -2,7 +2,6 @@ // Project: https://github.com/fb55/DomHandler#readme // Definitions by: Johan Davidsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 export interface DomHandlerOptions { /*** diff --git a/types/domutils/index.d.ts b/types/domutils/index.d.ts index 5300a68a8c..6790f9bf82 100644 --- a/types/domutils/index.d.ts +++ b/types/domutils/index.d.ts @@ -2,7 +2,6 @@ // Project: https://github.com/FB55/domutils#readme // Definitions by: Johan Davidsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 import { DomElement } from "domhandler"; /*** diff --git a/types/dotenv/dotenv-tests.ts b/types/dotenv/dotenv-tests.ts index 2776e6d202..9e57d1546f 100644 --- a/types/dotenv/dotenv-tests.ts +++ b/types/dotenv/dotenv-tests.ts @@ -3,7 +3,7 @@ import dotenv = require("dotenv"); const env = dotenv.config(); const dbUrl: string | null = env.error || !env.parsed ? null : env.parsed["BASIC"]; -dotenv.load({ +dotenv.config({ path: ".env-example", encoding: "utf8", debug: true diff --git a/types/dotenv/index.d.ts b/types/dotenv/index.d.ts index f8675ec22e..30b346b0bd 100644 --- a/types/dotenv/index.d.ts +++ b/types/dotenv/index.d.ts @@ -62,4 +62,5 @@ export interface DotenvConfigOutput { * */ export function config(options?: DotenvConfigOptions): DotenvConfigOutput; +/** @deprecated since v7.0.0 Use config instead. */ export const load: typeof config; diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 1a3eb0e39a..dd44093c52 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -10,6 +10,7 @@ // Ulf Schwekendiek // Pablo Varela // Claudio Procida +// Kevin Hawkinson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -211,6 +212,8 @@ declare namespace Draft { static isOptionKeyCommand(e: SyntheticKeyboardEvent): boolean; static hasCommandModifier(e: SyntheticKeyboardEvent): boolean; + + static isSoftNewlineEvent(e: SyntheticKeyboardEvent): boolean; } /** diff --git a/types/dwt/Dynamsoft.d.ts b/types/dwt/Dynamsoft.d.ts index 65569f61b3..38ddc3ef49 100644 --- a/types/dwt/Dynamsoft.d.ts +++ b/types/dwt/Dynamsoft.d.ts @@ -27,6 +27,7 @@ interface dwtEnv { DynamicContainers: string[]; DynamicDWTMap: {}; GetWebTwain(cid: string): WebTwain; + IfInstallDWTModuleWithZIP: boolean; IfUpdateService: boolean; IfUseActiveXForIE10Plus: boolean; JSVersion: string; diff --git a/types/dwt/index.d.ts b/types/dwt/index.d.ts index 04f600367d..3650529393 100644 --- a/types/dwt/index.d.ts +++ b/types/dwt/index.d.ts @@ -4,6 +4,7 @@ // Josh Hall // Lincoln Hu // Tom Kent +// Dave Sueltenfuss // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 diff --git a/types/egg-mock/tsconfig.json b/types/egg-mock/tsconfig.json index 86b33fc149..50edb7c401 100644 --- a/types/egg-mock/tsconfig.json +++ b/types/egg-mock/tsconfig.json @@ -4,7 +4,7 @@ "lib": [ "es6" ], - "noImplicitAny": true, + "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, "strictFunctionTypes": true, @@ -20,4 +20,4 @@ "index.d.ts", "egg-mock-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/elastic-apm-node/elastic-apm-node-tests.ts b/types/elastic-apm-node/elastic-apm-node-tests.ts deleted file mode 100644 index 2e98e84300..0000000000 --- a/types/elastic-apm-node/elastic-apm-node-tests.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { - Agent, - start -} from 'elastic-apm-node'; - -const agent: Agent = start({ - serviceName: '', - secretToken: '', - serverUrl: '' -}); -const started: boolean = agent.isStarted(); - -function testCallbacks() { - const testError: Error = new Error("Test Error"); - agent.captureError(testError, {error: "test"}, (err: Error) => err = testError); - agent.captureError(testError, {error: "test"}); - agent.captureError(testError); - - agent.addFilter((payload: any) => { - return payload; - }); - - agent.handleUncaughtExceptions((err: Error) => err = testError); - - agent.flush((test: any) => test); -} - -const customContext: boolean = agent.setCustomContext({ - id: "test id", - username: "test user", - email: "testEmail@test.com" -}); - -const userContext: boolean = agent.setUserContext({ - id: "test id", - username: "test user", - email: "testEmail@test.com" -}); - -const transactionName: any = agent.setTransactionName("new name"); - -const tags: any = agent.setTag("name", "value"); - -const addedTags: any = agent.addTags({name: "value"}); - -const startSpan: any = agent.startSpan(); - -const secondStartSpan: any = agent.startSpan("name", 13); - -const transaction = agent.startTransaction(); diff --git a/types/elastic-apm-node/index.d.ts b/types/elastic-apm-node/index.d.ts deleted file mode 100644 index 182a56782e..0000000000 --- a/types/elastic-apm-node/index.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Type definitions for Elastic APM Node.js Agent 1.x -// Project: https://www.elastic.co/solutions/apm, https://github.com/elastic/apm-agent-nodejs -// Definitions by: Shahaed Hasan -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 - -export = a; - -declare const a: a.Agent; - -declare namespace a { - interface Agent { - currentTransaction: any; - logger: any; - - start(opts?: AgentOptions): Agent; - isStarted(): boolean; - addFilter(filter: (payload: any) => any): void; - setUserContext(context: Context): boolean; - setCustomContext(context: any): boolean; - setTag(name: string, value: string): any; - addTags(tags: any): any; - captureError(error: Error | string | object, options?: object, callback?: (err?: any) => any): void; - startTransaction(name?: string, type?: string): any; - endTransaction(result?: any): any; - setTransactionName(name: string): any; - startSpan(name?: string, type?: any): any; - handleUncaughtExceptions(callback?: (err: Error) => any): any; - flush(callback?: any): any; - lambda(type: any, handler?: any): any; - } - - interface AgentOptions { - serviceName?: string; - secretToken?: string; - serverUrl?: string; - verifyServerCert?: boolean; - serviceVersion?: string; - active?: boolean; - instrument?: boolean; - asyncHooks?: boolean; - ignoreUrls?: Array; - ignoreUserAgents?: Array; - captureBody?: string; - errorOnAbortedRequests?: boolean; - abortedErrorThreshold?: number; - transactionSampleRate?: number; - hostname?: string; - frameworkName?: string; - frameworkVersion?: string; - logLevel?: string; - logger?: any; - captureExceptions?: boolean; - captureErrorLogStackTraces?: string; - captureSpanStackTraces?: boolean; - sourceLinesErrorAppFrames?: number; - sourceLinesErrorLibraryFrames?: number; - sourceLinesSpanAppFrames?: number; - sourceLinesSpanLibraryFrames?: number; - errorMessageMaxLength?: number; - stackTraceLimit?: number; - transactionMaxSpans?: number; - flushInterval?: number; - serverTimeout?: number; - maxQueueSize?: number; - filterHttpHeaders?: boolean; - disableInstrumentations?: string; - } - - interface Context { - id?: string; - username?: string; - email?: string; - } -} diff --git a/types/elastic-apm-node/start.d.ts b/types/elastic-apm-node/start.d.ts deleted file mode 100644 index 83cf99b4d5..0000000000 --- a/types/elastic-apm-node/start.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import * as agent from './'; -export = agent; diff --git a/types/elliptic/index.d.ts b/types/elliptic/index.d.ts index 7b1e885d6f..a6775225eb 100644 --- a/types/elliptic/index.d.ts +++ b/types/elliptic/index.d.ts @@ -4,7 +4,7 @@ // Gaylor Bosson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import BN = require('bn.js'); +import BN = require("bn.js"); // incomplete typings export const utils: any; @@ -29,10 +29,10 @@ export namespace curve { g: base.BasePoint; redN: BN; - constructor(type: string, conf: base.BaseCurveOptions) + constructor(type: string, conf: base.BaseCurveOptions); validate(point: base.BasePoint): boolean; - decodePoint(bytes: Buffer | string, enc?: 'hex'): base.BasePoint; + decodePoint(bytes: Buffer | string, enc?: "hex"): base.BasePoint; } namespace base { @@ -83,7 +83,12 @@ export namespace curve { constructor(conf: edwards.EdwardsConf); - point(x: BNInput, y: BNInput, z?: BNInput, t?: BNInput): edwards.EdwardsPoint; + point( + x: BNInput, + y: BNInput, + z?: BNInput, + t?: BNInput + ): edwards.EdwardsPoint; pointFromX(x: BNInput, odd?: boolean): edwards.EdwardsPoint; pointFromY(y: BNInput, odd?: boolean): edwards.EdwardsPoint; pointFromJSON(obj: BNInput[]): edwards.EdwardsPoint; @@ -144,7 +149,7 @@ export namespace curves { n: BN | undefined | null; hash: any; // ? - constructor(options: PresetCurve.Options) + constructor(options: PresetCurve.Options); } namespace PresetCurve { @@ -172,17 +177,47 @@ export class ec { g: any; hash: any; - constructor(options: string | curves.PresetCurve) + constructor(options: string | curves.PresetCurve); keyPair(options: ec.KeyPairOptions): ec.KeyPair; - keyFromPrivate(priv: Buffer | string | ec.KeyPair, enc?: string): ec.KeyPair; - keyFromPublic(pub: Buffer | string | {x: string, y: string} | ec.KeyPair, enc?: string): ec.KeyPair; + keyFromPrivate( + priv: Buffer | string | ec.KeyPair, + enc?: string + ): ec.KeyPair; + keyFromPublic( + pub: Buffer | string | { x: string; y: string } | ec.KeyPair, + enc?: string + ): ec.KeyPair; genKeyPair(options?: ec.GenKeyPairOptions): ec.KeyPair; - sign(msg: BNInput, key: Buffer | ec.KeyPair, enc: string, options?: ec.SignOptions): ec.Signature; - sign(msg: BNInput, key: Buffer | ec.KeyPair, options?: ec.SignOptions): ec.Signature; - verify(msg: BNInput, signature: ec.Signature | ec.SignatureOptions, key: Buffer | ec.KeyPair, enc?: string): boolean; - recoverPubKey(msg: BNInput, signature: ec.Signature | ec.SignatureOptions, j: number, enc?: string): any; - getKeyRecoveryParam(e: Error | undefined, signature: ec.Signature | ec.SignatureOptions, Q: BN, enc?: string): number; + sign( + msg: BNInput, + key: Buffer | ec.KeyPair, + enc: string, + options?: ec.SignOptions + ): ec.Signature; + sign( + msg: BNInput, + key: Buffer | ec.KeyPair, + options?: ec.SignOptions + ): ec.Signature; + verify( + msg: BNInput, + signature: ec.Signature | ec.SignatureOptions, + key: Buffer | ec.KeyPair, + enc?: string + ): boolean; + recoverPubKey( + msg: BNInput, + signature: ec.Signature | ec.SignatureOptions, + j: number, + enc?: string + ): any; + getKeyRecoveryParam( + e: Error | undefined, + signature: ec.Signature | ec.SignatureOptions, + Q: BN, + enc?: string + ): number; } export namespace ec { @@ -201,21 +236,32 @@ export namespace ec { } class KeyPair { - static fromPublic(ec: ec, pub: Buffer | string | {x: string, y: string} | KeyPair, enc?: string): KeyPair; - static fromPrivate(ec: ec, priv: Buffer | string | KeyPair, enc?: string): KeyPair; + static fromPublic( + ec: ec, + pub: Buffer | string | { x: string; y: string } | KeyPair, + enc?: string + ): KeyPair; + static fromPrivate( + ec: ec, + priv: Buffer | string | KeyPair, + enc?: string + ): KeyPair; ec: ec; - constructor(ec: ec, options: KeyPairOptions) + constructor(ec: ec, options: KeyPairOptions); - validate(): { readonly result: boolean, readonly reason: string }; + validate(): { readonly result: boolean; readonly reason: string }; getPublic(compact: boolean, enc?: string): any; // ? getPublic(enc?: string): any; // ? - getPrivate(enc?: 'hex'): Buffer | BN | string; + getPrivate(enc?: "hex"): Buffer | BN | string; derive(pub: any): any; // ? sign(msg: BNInput, enc: string, options?: SignOptions): Signature; sign(msg: BNInput, options?: SignOptions): Signature; - verify(msg: BNInput, signature: Signature | SignatureOptions): boolean; + verify( + msg: BNInput, + signature: Signature | SignatureOptions | string + ): boolean; inspect(): string; } @@ -224,7 +270,7 @@ export namespace ec { s: BN; recoveryParam: number | null; - constructor(options: SignatureOptions | Signature, enc?: string) + constructor(options: SignatureOptions | Signature, enc?: string); toDER(enc?: string | null): any; // ? } @@ -246,10 +292,14 @@ export namespace ec { export class eddsa { curve: curve.edwards; - constructor(name: 'ed25519'); + constructor(name: "ed25519"); sign(message: eddsa.Bytes, secret: eddsa.Bytes): eddsa.Signature; - verify(message: eddsa.Bytes, sig: eddsa.Bytes | eddsa.Signature, pub: eddsa.Bytes | eddsa.Point | eddsa.KeyPair): boolean; + verify( + message: eddsa.Bytes, + sig: eddsa.Bytes | eddsa.Signature, + pub: eddsa.Bytes | eddsa.Point | eddsa.KeyPair + ): boolean; hashInt(): BN; keyFromPublic(pub: eddsa.Bytes): eddsa.KeyPair; keyFromSecret(secret: eddsa.Bytes): eddsa.KeyPair; @@ -281,9 +331,9 @@ export namespace eddsa { secret(): Buffer; sign(message: Bytes): Signature; verify(message: Bytes, sig: Signature | Bytes): boolean; - getSecret(enc: 'hex'): string; + getSecret(enc: "hex"): string; getSecret(): Buffer; - getPublic(enc: 'hex'): string; + getPublic(enc: "hex"): string; getPublic(): Buffer; } diff --git a/types/elv/elv-tests.ts b/types/elv/elv-tests.ts new file mode 100644 index 0000000000..78689fc493 --- /dev/null +++ b/types/elv/elv-tests.ts @@ -0,0 +1,14 @@ +import elv = require('elv'); + +elv(''); // $ExpectType boolean + +elv.behavior.enableFalse; // $ExpectedType boolean +elv.behavior.enableNaN; // $ExpectedType boolean +elv.behavior.enableNull; // $ExpectedType boolean +elv.behavior.enableUndefined; // $ExpectedType boolean + +elv.coalesce(''); // $ExpectType any +elv.ncoalesce(''); // $ExpectType any +elv.populated(''); // $ExpectType boolean +elv.tryGet([], 0); // $ExpectType any +elv.tryGet([], 0, ''); // $ExpectType any diff --git a/types/elv/index.d.ts b/types/elv/index.d.ts new file mode 100644 index 0000000000..defab524f9 --- /dev/null +++ b/types/elv/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for elv 2.2 +// Project: https://github.com/dsfields/elv#readme +// Definitions by: Gary Parker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function elv(val: any): boolean; + +declare namespace elv { + const behavior: { + enableFalse: boolean + enableNaN: boolean + enableNull: boolean + enableUndefined: boolean + }; + function coalesce(...args: any[]): any; + function ncoalesce(...args: any[]): any; + function populated(val: any): boolean; + function tryGet(val: ReadonlyArray, index: number, def?: any): any; +} + +export = elv; diff --git a/types/elv/tsconfig.json b/types/elv/tsconfig.json new file mode 100644 index 0000000000..ae2286a85f --- /dev/null +++ b/types/elv/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "elv-tests.ts" + ] +} diff --git a/types/elv/tslint.json b/types/elv/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/elv/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ember-data/index.d.ts b/types/ember-data/index.d.ts index f5ff0c5d57..a98082a60e 100644 --- a/types/ember-data/index.d.ts +++ b/types/ember-data/index.d.ts @@ -16,8 +16,14 @@ import ModelRegistry from 'ember-data/types/registries/model'; import SerializerRegistry from 'ember-data/types/registries/serializer'; import AdapterRegistry from 'ember-data/types/registries/adapter'; -type AttributesFor = keyof Model; // TODO: filter to attr properties only (TS 2.8) -type RelationshipsFor = keyof Model; // TODO: filter to hasMany/belongsTo properties only (TS 2.8) +/** + The keys from the actual Model class, removing all the keys which come from + the base class. + */ +type ModelKeys = Exclude; + +type AttributesFor = ModelKeys; // TODO: filter to attr properties only (TS 2.8) +type RelationshipsFor = ModelKeys; // TODO: filter to hasMany/belongsTo properties only (TS 2.8) export interface ChangedAttributes { [key: string]: [any, any] | undefined; @@ -49,9 +55,9 @@ export namespace DS { */ function errorsArrayToHash(errors: any[]): {}; - interface RelationshipOptions { + interface RelationshipOptions { async?: boolean; - inverse?: RelationshipsFor | null; + inverse?: RelationshipsFor | null; polymorphic?: boolean; } @@ -457,12 +463,12 @@ export namespace DS { * Create a JSON representation of the record, using the serialization * strategy of the store's adapter. */ - serialize(options?: { includeId?: boolean }): {}; + serialize(options?: { includeId?: boolean }): object; /** * Use [DS.JSONSerializer](DS.JSONSerializer.html) to * get the JSON representation of a record. */ - toJSON(options: {}): {}; + toJSON(options?: { includeId?: boolean }): object; /** * Fired when the record is ready to be interacted with, * that is either loaded from the server or created locally. @@ -502,15 +508,15 @@ export namespace DS { * method if you want to allow the user to still `rollbackAttributes()` * after a delete was made. */ - deleteRecord(): any; + deleteRecord(): void; /** * Same as `deleteRecord`, but saves the record immediately. */ - destroyRecord(options?: {}): RSVP.Promise; + destroyRecord(options?: { adapterOptions?: object }): RSVP.Promise; /** * Unloads the record from the store. This will cause the record to be destroyed and freed up for garbage collection. */ - unloadRecord(): any; + unloadRecord(): void; /** * Returns an object, whose keys are changed properties, and value is * an [oldProp, newProp] array. @@ -520,16 +526,16 @@ export namespace DS { * If the model `hasDirtyAttributes` this function will discard any unsaved * changes. If the model `isNew` it will be removed from the store. */ - rollbackAttributes(): any; + rollbackAttributes(): void; /** * Save the record and persist any changes to the record to an * external source via the adapter. */ - save(options?: {}): RSVP.Promise; + save(options?: { adapterOptions?: object }): RSVP.Promise; /** * Reload the record from the adapter. */ - reload(): RSVP.Promise; + reload(options?: { adapterOptions?: object }): RSVP.Promise; /** * Get the reference for the specified belongsTo relationship. */ @@ -547,7 +553,7 @@ export namespace DS { this: T, callback: (name: string, details: RelationshipMeta) => void, binding?: any - ): any; + ): void; /** * Represents the model's class name as a string. This can be used to look up the model's class name through * `DS.Store`'s modelFor method. @@ -605,14 +611,14 @@ export namespace DS { static eachRelationship( callback: (name: string, details: RelationshipMeta) => void, binding?: any - ): any; + ): void; /** * Given a callback, iterates over each of the types related to a model, * invoking the callback with the related type's class. Each type will be * returned just once, regardless of how many different relationships it has * with a model. */ - static eachRelatedType(callback: Function, binding: any): any; + static eachRelatedType(callback: (name: string) => void, binding?: any): void; /** * A map whose keys are the attributes of the model (properties * described by DS.attr) and whose values are the meta object for the @@ -630,26 +636,27 @@ export namespace DS { * Iterates through the attributes of the model, calling the passed function on each * attribute. */ - static eachAttribute(callback: Function, binding: {}): any; + static eachAttribute>( + this: Class, + callback: ( + name: ModelKeys, + meta: AttributeMeta + ) => void, + binding?: any + ): void; /** * Iterates through the transformedAttributes of the model, calling * the passed function on each attribute. Note the callback will not be * called for any attributes that do not have an transformation type. */ - static eachTransformedAttribute(callback: Function, binding: {}): any; - /** - * Discards any unsaved changes to the given attribute. This feature is not enabled by default. You must enable `ds-rollback-attribute` and be running a canary build. - */ - rollbackAttribute(): any; - /** - * This Ember.js hook allows an object to be notified when a property - * is defined. - */ - didDefineProperty( - proto: {}, - key: string, - value: Ember.ComputedProperty - ): any; + static eachTransformedAttribute( + this: Class, + callback: ( + name: ModelKeys>, + type: keyof TransformRegistry + ) => void, + binding?: any + ): void; } /** * ### State @@ -700,7 +707,7 @@ export namespace DS { * Used to get the latest version of all of the records in this array * from the adapter. */ - update(): any; + update(): PromiseArray; /** * Saves all of the records in the `RecordArray`. */ @@ -782,7 +789,7 @@ export namespace DS { /** * `ids()` returns an array of the record ids in this relationship. */ - ids(): any[]; + ids(): string[]; /** * The meta data for the has-many relationship. */ @@ -948,7 +955,7 @@ export namespace DS { /** * Get snapshots of the underlying record array */ - snapshots(): any[]; + snapshots(): Snapshot[]; } class Snapshot { /** @@ -994,14 +1001,19 @@ export namespace DS { belongsTo>( keyName: L, options?: {} - ): Snapshot['record'][L] | string | null | undefined; + ): Snapshot | null | undefined; + belongsTo>( + keyName: L, + options: { id: true } + ): string | null | undefined; + /** * Returns the current value of a hasMany relationship. */ hasMany>( keyName: L, options?: { ids: false } - ): Array['record'][L]> | undefined; + ): Snapshot[] | undefined; hasMany>( keyName: L, options: { ids: true } @@ -1011,21 +1023,21 @@ export namespace DS { * function on each attribute. */ eachAttribute( - callback: (key: keyof M, meta: AttributeMeta) => void, + callback: (key: ModelKeys, meta: AttributeMeta) => void, binding?: {} - ): any; + ): void; /** * Iterates through all the relationships of the model, calling the passed * function on each relationship. */ eachRelationship( - callback: (key: keyof M, meta: RelationshipMeta) => void, + callback: (key: ModelKeys, meta: RelationshipMeta) => void, binding?: {} - ): any; + ): void; /** * Serializes the snapshot using the serializer for the model. */ - serialize(options: {}): {}; + serialize(options: O): object; } /** @@ -1095,7 +1107,8 @@ export namespace DS { */ query( modelName: K, - query: any + query: object, + options?: { adapterOptions?: object } ): AdapterPopulatedRecordArray & PromiseArray; /** @@ -1105,7 +1118,8 @@ export namespace DS { */ queryRecord( modelName: K, - query: any + query: object, + options?: { adapterOptions?: object } ): RSVP.Promise; /** * `findAll` asks the adapter's `findAll` method to find the records for the diff --git a/types/ember-data/test/model.ts b/types/ember-data/test/model.ts index 2085daf90a..356c607748 100644 --- a/types/ember-data/test/model.ts +++ b/types/ember-data/test/model.ts @@ -1,6 +1,7 @@ import Ember from 'ember'; import DS, { ChangedAttributes } from 'ember-data'; import { assertType } from "./lib/assert"; +import RSVP from 'rsvp'; const Person = DS.Model.extend({ firstName: DS.attr(), @@ -33,5 +34,26 @@ user.serialize(); user.serialize({ includeId: true }); user.serialize({ includeId: true }); -const attributes = user.changedAttributes(); -assertType(attributes); +const attributes: ChangedAttributes = user.changedAttributes(); + +user.rollbackAttributes(); // $ExpectType void + +let destroyResult: RSVP.Promise; +destroyResult = user.destroyRecord(); +destroyResult = user.destroyRecord({}); +destroyResult = user.destroyRecord({ adapterOptions: {}}); +destroyResult = user.destroyRecord({ adapterOptions: { waffles: 'are yummy' }}); + +user.deleteRecord(); // $ExpectType void + +user.unloadRecord(); // $ExpectType void + +let jsonified: object; +jsonified = user.toJSON(); +jsonified = user.toJSON({ includeId: true }); + +let reloaded: RSVP.Promise; +reloaded = user.reload(); +reloaded = user.reload({}); +reloaded = user.reload({ adapterOptions: {} }); +reloaded = user.reload({ adapterOptions: { fastAsCanBe: 'yessirree' } }); diff --git a/types/ember-data/test/relationships.ts b/types/ember-data/test/relationships.ts index 13a526ba6a..04aae75f0e 100644 --- a/types/ember-data/test/relationships.ts +++ b/types/ember-data/test/relationships.ts @@ -1,5 +1,7 @@ import Ember from 'ember'; import DS from 'ember-data'; +import TransformRegistry from 'ember-data/types/registries/transform'; +import { assertType } from './lib/assert'; declare const store: DS.Store; @@ -8,24 +10,65 @@ const Person = DS.Model.extend({ parent: DS.belongsTo('folder', { inverse: 'children' }) }); +// $ExpectType void +Person.eachAttribute(() => {}); +// $ExpectType void +Person.eachAttribute(() => {}, {}); +// $ExpectType void +Person.eachAttribute((name, meta) => { + assertType<'children' | 'parent'>(name); + assertType<{ + type: keyof TransformRegistry; + options: object; + name: 'children' | 'parent'; + parentType: DS.Model; + isAttribute: true; + }>(meta); +}); + +// $ExpectType void +Person.eachTransformedAttribute(() => {}); +// $ExpectType void +Person.eachTransformedAttribute(() => {}, {}); +// $ExpectType void +Person.eachTransformedAttribute((name, type) => { + assertType<'children' | 'parent'>(name); + let t: keyof TransformRegistry = type; +}); + const Polymorphic = DS.Model.extend({ paymentMethods: DS.hasMany('payment-method', { polymorphic: true }) }); +// $ExpectType void Polymorphic.eachRelationship(() => ''); +// $ExpectType void Polymorphic.eachRelationship(() => '', {}); +// $ExpectType void Polymorphic.eachRelationship((n, meta) => { let s: string = n; let m: 'belongsTo' | 'hasMany' = meta.kind; }); let p = Polymorphic.create(); +// $ExpectType void p.eachRelationship(() => ''); +// $ExpectType void p.eachRelationship(() => '', {}); +// $ExpectType void p.eachRelationship((n, meta) => { let s: string = n; let m: 'belongsTo' | 'hasMany' = meta.kind; }); +// $ExpectType void +Polymorphic.eachRelatedType(() => ''); +// $ExpectType void +Polymorphic.eachRelatedType(() => '', {}); +// $ExpectType void +Polymorphic.eachRelatedType((name) => { + let s: string = name; +}); + export class Comment extends DS.Model { author = DS.attr('string'); } diff --git a/types/ember-data/test/serializer.ts b/types/ember-data/test/serializer.ts index d38ced647a..490dc77493 100644 --- a/types/ember-data/test/serializer.ts +++ b/types/ember-data/test/serializer.ts @@ -1,6 +1,10 @@ import Ember from 'ember'; import DS from 'ember-data'; +interface Dict { + [key: string]: T | null | undefined; +} + const JsonApi = DS.JSONAPISerializer.extend({}); const Customized = DS.JSONAPISerializer.extend({ @@ -74,14 +78,16 @@ const SerializerUsingSnapshots = DS.RESTSerializer.extend({ DS.Serializer.extend({ serialize(snapshot: DS.Snapshot<'message-for-serializer'>, options: {}) { - let json: any = { + let json: Dict = { id: snapshot.id }; + // $ExpectType void snapshot.eachAttribute((key, attribute) => { json[key] = snapshot.attr(key); }); + // $ExpectType void snapshot.eachRelationship((key, relationship) => { if (relationship.kind === 'belongsTo') { json[key] = snapshot.belongsTo(key, { id: true }); diff --git a/types/ember-data/test/store.ts b/types/ember-data/test/store.ts index b6bb25993c..f692a668d9 100644 --- a/types/ember-data/test/store.ts +++ b/types/ember-data/test/store.ts @@ -24,6 +24,7 @@ let post = store.createRecord('post', { }); post.save(); // => POST to '/posts' +post.save({ adapterOptions: { makeItSo: 'number one ' } }); post.save().then(saved => { assertType(saved); }); diff --git a/types/ember/test/ember-module-tests.ts b/types/ember/test/ember-module-tests.ts index 5935578d3e..b37882a6cc 100644 --- a/types/ember/test/ember-module-tests.ts +++ b/types/ember/test/ember-module-tests.ts @@ -2,8 +2,12 @@ import Ember from 'ember'; // $ Ember.$; // $ExpectType JQueryStatic + +const top = ((x?: T): T => x!)(); +type Top = typeof top; +declare function expectTypeNativeArrayTop(x: Ember.NativeArray): void; // A -Ember.A(); // $ExpectType NativeArray<{}> +expectTypeNativeArrayTop(Ember.A()); Ember.A([1, 2]); // $ExpectType NativeArray // addListener Ember.addListener({ a: 'foo' }, 'a', {}, () => {}); diff --git a/types/ember__routing/-private/route-info.d.ts b/types/ember__routing/-private/route-info.d.ts new file mode 100644 index 0000000000..6cc971bd9c --- /dev/null +++ b/types/ember__routing/-private/route-info.d.ts @@ -0,0 +1,49 @@ +// https://api.emberjs.com/ember/3.6/classes/RouteInfo +/** + * A `RouteInfo` is an object that contains metadata about a specific route within a `Transition`. + * It is read-only and internally immutable. + * It is also not observable, because a `Transition` instance is never changed after creation. + */ +export default interface RouteInfo { + /** + * A reference to the childe route's `RouteInfo`. + * This can be used to traverse downward to the leafmost `RouteInfo`. + */ + readonly child: RouteInfo | null; + /** + * The final segment of the fully-qualified name of the route, like "index". + */ + readonly localName: string; + /** + * The dot-separated, fully-qualified name of the route, like "people.index". + */ + readonly name: string; + /** + * The ordered list of the names of the params required for this route. + * It will contain the same strings as `Object.keys(params)`, but here the order is significant. + * This allows users to correctly pass params into routes programmatically. + */ + readonly paramNames: string[]; + /** + * The values of the route's parameters. + * These are the same params that are received as arguments to the route's `model` hook. + * Contains only the parameters valid for this route, if any (params for parent or child routes are not merged). + */ + readonly params: { [key: string]: string | undefined }; + /** + * A reference to the parent route's `RouteInfo`. + * This can be used to traverse upward to the topmost `RouteInfo`. + */ + readonly parent: RouteInfo | null; + /** + * The values of any query params on this route. + */ + readonly queryParams: { [key: string]: string | undefined }; + /** + * Allows you to traverse through the linked list of `RouteInfo`s from the topmost to leafmost. + * Returns the first `RouteInfo` in the linked list for which the callback returns true. + * + * @param callback the callback to execute. + */ + find(callback: (item: RouteInfo) => boolean): RouteInfo | undefined; +} diff --git a/types/ember__routing/-private/transition.d.ts b/types/ember__routing/-private/transition.d.ts index 53d06f80e8..027e913aca 100644 --- a/types/ember__routing/-private/transition.d.ts +++ b/types/ember__routing/-private/transition.d.ts @@ -1,4 +1,17 @@ +import RouteInfo from './route-info'; + export default interface Transition { + /** + * This property is a `RouteInfo` object that represents where transition originated from. + * It's important to note that a `RouteInfo` is a linked list and this property is simply the head node of the list. + * In the case of an initial render, `from` will be set to `null`. + */ + readonly from: RouteInfo | null; + /** + * This property is a `RouteInfo` object that represents where the router is transitioning to. + * It's important to note that a `RouteInfo` is a linked list and this property is simply the leafmost route. + */ + readonly to: RouteInfo; /** * Aborts the Transition. Note you can also implicitly abort a transition * by initiating another transition while a previous one is underway. diff --git a/types/ember__routing/router-service.d.ts b/types/ember__routing/router-service.d.ts index decc36af34..07349dc765 100644 --- a/types/ember__routing/router-service.d.ts +++ b/types/ember__routing/router-service.d.ts @@ -1,3 +1,4 @@ +import RouteInfo from '@ember/routing/-private/route-info'; import Transition from '@ember/routing/-private/transition'; import Service from '@ember/service'; @@ -10,6 +11,12 @@ type RouteModel = object | string | number; */ export default class RouterService extends Service { // + /** + * A `RouteInfo` that represents the current leaf route. + * It is guaranteed to change whenever a route transition happens + * (even when that transition only changes parameters and doesn't change the active route) + */ + readonly currentRoute: RouteInfo; /** * Name of the current route. * This property represent the logical name of the route, @@ -212,4 +219,23 @@ export default class RouterService extends Service { modelsD: RouteModel, options?: { queryParams: object } ): string; + + // https://api.emberjs.com/ember/3.6/classes/RouterService/events/routeDidChange?anchor=routeDidChange + /** + * Register a callback for an event. + * + * The `routeWillChange` event is fired at the beginning of any attempted transition with a `Transition` object as the sole argument. + * This action can be used for aborting, redirecting, or decorating the transition from the currently active routes. + * + * The `routeDidChange` event only fires once a transition has settled. + * This includes aborts and error substates. + * Like the `routeWillChange` event it recieves a `Transition` as the sole argument. + * + * @param name the name of the event + * @param callback the callback to execute + */ + on( + name: 'routeDidChange' | 'routeWillChange', + callback: (transition: Transition) => void + ): RouterService; } diff --git a/types/ember__routing/test/router.ts b/types/ember__routing/test/router.ts index be1c16d821..cbba58c65d 100755 --- a/types/ember__routing/test/router.ts +++ b/types/ember__routing/test/router.ts @@ -1,4 +1,3 @@ -import { assertType } from './lib/assert'; import Router from '@ember/routing/router'; import Service, { inject as service } from '@ember/service'; import EmberObject, { get } from '@ember/object'; @@ -52,5 +51,33 @@ const RouterServiceConsumer = Service.extend({ const model = EmberObject.create(); get(this, 'router') .transitionTo('index', model, { queryParams: { search: 'ember' }}); - } + }, + onAndRouteInfo() { + const router = get(this, 'router'); + router + .on('routeWillChange', transition => { + const to = transition.to; + to.child; // $ExpectType RouteInfo | null + to.localName; // $ExpectType string + to.name; // $ExpectType string + to.paramNames; // $ExpectType string[] + to.params.foo; // $ExpectType string | undefined + to.parent; // $ExpectType RouteInfo | null + to.queryParams.foo; // $ExpectType string | undefined + to.find(info => info.name === 'foo'); // $ExpectType RouteInfo | undefined + }) + .on('routeDidChange', transition => { + const from = transition.from; + if (from) { + from.child; // $ExpectType RouteInfo | null + from.localName; // $ExpectType string + from.name; // $ExpectType string + from.paramNames; // $ExpectType string[] + from.params.foo; // $ExpectType string | undefined + from.parent; // $ExpectType RouteInfo | null + from.queryParams.foo; // $ExpectType string | undefined + from.find(info => info.name === 'foo'); // $ExpectType RouteInfo | undefined + } + }); + }, }); diff --git a/types/ember__routing/tsconfig.json b/types/ember__routing/tsconfig.json index c5bd434549..e7c16536f6 100644 --- a/types/ember__routing/tsconfig.json +++ b/types/ember__routing/tsconfig.json @@ -44,6 +44,7 @@ "router.d.ts", "types.d.ts", "-private/router-dsl.d.ts", + "-private/route-info.d.ts", "-private/transition.d.ts", "test/lib/assert.ts", "test/route.ts", diff --git a/types/express-http-proxy/express-http-proxy-tests.ts b/types/express-http-proxy/express-http-proxy-tests.ts index 56156369cc..c96ec0fc8d 100644 --- a/types/express-http-proxy/express-http-proxy-tests.ts +++ b/types/express-http-proxy/express-http-proxy-tests.ts @@ -26,3 +26,5 @@ proxy('www.google.com', { return headers; } }); + +proxy((req) => 'com.google.www'.split('.').reverse().join('.')); diff --git a/types/express-http-proxy/index.d.ts b/types/express-http-proxy/index.d.ts index 3a74bef6db..d1935f3bc3 100644 --- a/types/express-http-proxy/index.d.ts +++ b/types/express-http-proxy/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/villadora/express-http-proxy#readme // Definitions by: ulrichb // Daniel Schopf +// Gabriel Fournier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -15,6 +16,6 @@ interface ProxyOptions { userResHeaderDecorator?: (headers: IncomingHttpHeaders, userReq: Request, userRes: Response, proxyReq: Request, proxyRes: Response) => OutgoingHttpHeaders; } -declare function proxy(host: string, options?: ProxyOptions): RequestHandler; +declare function proxy(host: string|((req: Request) => string), options?: ProxyOptions): RequestHandler; export = proxy; diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index c4805a39a0..37038912fa 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -143,7 +143,7 @@ interface IDataURLOptions { interface IEvent { e: Event; target?: Object; - transform?: { corner: string }; + transform?: { corner: string, original: Object, width: number }; } interface IFillOptions { diff --git a/types/facepaint/facepaint-tests.ts b/types/facepaint/facepaint-tests.ts new file mode 100644 index 0000000000..63696381a8 --- /dev/null +++ b/types/facepaint/facepaint-tests.ts @@ -0,0 +1,10 @@ +import facepaint = require('facepaint'); + +facepaint([ + '@media(min-width: 420px)', + '@media(min-width: 920px)', + '@media(min-width: 1120px)' +], { + literal: true, + overlap: true +}); diff --git a/types/facepaint/index.d.ts b/types/facepaint/index.d.ts new file mode 100644 index 0000000000..5d23987a43 --- /dev/null +++ b/types/facepaint/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for facepaint 1.2 +// Project: https://github.com/emotion-js/facepaint +// Definitions by: Ciarán Curley +// Anton Samper Rivaya +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace facepaint { + type BaseArg = object | object[]; + type Arg = BaseArg | BaseArg[]; + + type Selector = string; + + interface DynamicStyle { + [key: string]: { + [key: string]: string | number; + }; + } + + interface DynamicStyleFunction { + (...args: Arg[]): DynamicStyle; + } + + interface Options { + literal?: boolean; + overlap?: boolean; + } +} + +declare function facepaint( + breakpoints: facepaint.Selector[], + options?: facepaint.Options +): facepaint.DynamicStyleFunction; + +export = facepaint; diff --git a/types/facepaint/tsconfig.json b/types/facepaint/tsconfig.json new file mode 100644 index 0000000000..75b133849f --- /dev/null +++ b/types/facepaint/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "facepaint-tests.ts" + ] +} diff --git a/types/facepaint/tslint.json b/types/facepaint/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/facepaint/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fast-ratelimit/fast-ratelimit-tests.ts b/types/fast-ratelimit/fast-ratelimit-tests.ts new file mode 100644 index 0000000000..2ca23b1fc9 --- /dev/null +++ b/types/fast-ratelimit/fast-ratelimit-tests.ts @@ -0,0 +1,22 @@ +import { FastRateLimit } from 'fast-ratelimit'; + +const limit = new FastRateLimit({ // $type: FastRateLimit + threshold: 20, + ttl: 60, +}); + +const someNamespace = 'some-namespace'; + +const consume = limit.consume(someNamespace); // $type: Promise +consume.then(() => {}); // User can send message. +consume.catch(() => {}); // Use cannot send message. + +const hasToken = limit.hasToken(someNamespace); // $type: Promise +hasToken.then(() => {}); // User has remaining token. +hasToken.catch(() => {}); // User does not have remaining token. + +// Synchronously check if user is allowed to send message. +const consumeSync = limit.consumeSync(someNamespace); // $type: boolean + +// Synchronously check if user has remaining token. +const hasTokenSync = limit.hasTokenSync(someNamespace); // $type: boolean diff --git a/types/fast-ratelimit/index.d.ts b/types/fast-ratelimit/index.d.ts new file mode 100644 index 0000000000..5306b364b1 --- /dev/null +++ b/types/fast-ratelimit/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for fast-ratelimit 2.2 +// Project: https://github.com/valeriansaliou/node-fast-ratelimit +// Definitions by: Jørgen Vatle +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Constructor options for fast-ratelimit. + * {@link https://github.com/valeriansaliou/node-fast-ratelimit#1-create-the-rate-limiter} + */ +export interface FastRateLimitOptions { + threshold: number; // available tokens over timespan + ttl: number; // time-to-live value of token bucket (in seconds) +} + +export class FastRateLimit { + /** + * FastRateLimit constructor + * @param options + */ + constructor(options: FastRateLimitOptions); + + /** + * FastRateLimit.prototype.consumeSync + */ + consumeSync(namespace: string): boolean; + + /** + * FastRateLimit.prototype.hasTokenSync + */ + hasTokenSync(namespace: string): boolean; + + /** + * FastRateLimit.prototype.consume + */ + consume(namespace: string): Promise; + + /** + * FastRateLimit.prototype.hasToken + */ + hasToken(namespace: string): Promise; +} diff --git a/types/fast-ratelimit/tsconfig.json b/types/fast-ratelimit/tsconfig.json new file mode 100644 index 0000000000..cb8a2f5d3d --- /dev/null +++ b/types/fast-ratelimit/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fast-ratelimit-tests.ts" + ] +} \ No newline at end of file diff --git a/types/fast-ratelimit/tslint.json b/types/fast-ratelimit/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/fast-ratelimit/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/find-down/find-down-tests.ts b/types/find-down/find-down-tests.ts new file mode 100644 index 0000000000..cc7ab9e81b --- /dev/null +++ b/types/find-down/find-down-tests.ts @@ -0,0 +1,13 @@ +import findDown = require('find-down'); + +findDown('unicorn.png').then(file => { + file; // $ExpectType string | null +}); + +findDown(['unicorn.png']).then(file => { + file; // $ExpectType string | null +}); + +findDown('unicorn.png', { cwd: '.' }).then(file => { + file; // $ExpectType string | null +}); diff --git a/types/find-down/index.d.ts b/types/find-down/index.d.ts new file mode 100644 index 0000000000..390c410b54 --- /dev/null +++ b/types/find-down/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for find-down 0.1 +// Project: https://github.com/sholladay/find-down +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace findDown { + interface Options { + /** Directory to end with. Default: `process.cwd()` */ + cwd?: string; + } +} + +declare function findDown(filename: string | string[], options?: findDown.Options): Promise; + +export = findDown; diff --git a/types/find-down/tsconfig.json b/types/find-down/tsconfig.json new file mode 100644 index 0000000000..6d397bf959 --- /dev/null +++ b/types/find-down/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "find-down-tests.ts" + ] +} diff --git a/types/find-down/tslint.json b/types/find-down/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/find-down/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/firefox-webext-browser/firefox-webext-browser-tests.ts b/types/firefox-webext-browser/firefox-webext-browser-tests.ts index 26ae079172..2ea924cfd3 100644 --- a/types/firefox-webext-browser/firefox-webext-browser-tests.ts +++ b/types/firefox-webext-browser/firefox-webext-browser-tests.ts @@ -12,3 +12,26 @@ const port = browser.runtime.connect(); port.postMessage(); // $ExpectError browser.bookmarks.getTree(); + +browser.proxy.onProxyError.addListener(error => { + console.error(`Proxy error: ${error.message}`); +}); + +browser.proxy.onRequest.addListener(d => { + console.log(d.requestId); +}, { + urls: ['test'] +}, ["requestHeaders"]); + +browser.webNavigation.onBeforeNavigate.addListener(d => { + console.log(d.url, d.timeStamp); +}, { + url: [ + {hostContains: 'something'}, + {hostPrefix: 'somethineelse'} + ] +}); + +browser.runtime.connect().onDisconnect.addListener(() => { + console.log('ok'); +}); diff --git a/types/firefox-webext-browser/index.d.ts b/types/firefox-webext-browser/index.d.ts index c0a8896e56..d7373635be 100644 --- a/types/firefox-webext-browser/index.d.ts +++ b/types/firefox-webext-browser/index.d.ts @@ -1,20 +1,18 @@ -// Type definitions for non-npm package WebExtension Development in FireFox 65.0 +// Type definitions for non-npm package WebExtension Development in FireFox 67.0 // Project: https://developer.mozilla.org/en-US/Add-ons/WebExtensions // Definitions by: Jasmin Bom // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 // Generated using script at github.com/jsmnbom/definitelytyped-firefox-webext-browser -interface WebExtEventBase any, TCallback> { - addListener: TAddListener; +interface WebExtEvent any> { + addListener(cb: TCallback): void; removeListener(cb: TCallback): void; hasListener(cb: TCallback): boolean; } -type WebExtEvent any> = WebExtEventBase<(callback: TCallback) => void, TCallback>; - interface Window { browser: typeof browser; } @@ -114,7 +112,7 @@ declare namespace browser._manifest { minimum_chrome_version?: string; minimum_opera_version?: string; icons?: { - [key: number]: string; + [key: number]: ExtensionFileUrl; }; incognito?: _WebExtensionManifestIncognito; background?: { @@ -365,6 +363,8 @@ declare namespace browser._manifest { type ExtensionURL = string; + type ExtensionFileUrl = string; + type ImageDataOrExtensionURL = string; type ExtensionID = string; @@ -416,8 +416,8 @@ declare namespace browser._manifest { } type IconPath = { - [key: number]: ExtensionURL; - } | ExtensionURL; + [key: number]: ExtensionFileUrl; + } | ExtensionFileUrl; type IconImageData = { [key: number]: ImageData; @@ -504,6 +504,8 @@ declare namespace browser._manifest { sidebar_text?: ThemeColor; sidebar_highlight?: ThemeColor; sidebar_highlight_text?: ThemeColor; + toolbar_field_highlight?: ThemeColor; + toolbar_field_highlight_text?: ThemeColor; }; icons?: { back?: ExtensionURL; @@ -650,7 +652,7 @@ declare namespace browser._manifest { | "pkcs11" | "sessions"; - type _WebExtensionManifestIncognito = "spanning"; + type _WebExtensionManifestIncognito = "not_allowed" | "spanning"; /** Defines the location the browserAction will appear by default. The default location is navbar. */ type _WebExtensionManifestBrowserActionDefaultArea = @@ -1317,7 +1319,7 @@ declare namespace browser.downloads { /** Indication of whether this download is thought to be safe or known to be suspicious. */ danger: DangerType; /** The file's MIME type. */ - mime: string; + mime?: string; /** Number of milliseconds between the unix epoch and when this download began. */ startTime: string; /** Number of milliseconds between the unix epoch and when this download ended. */ @@ -2676,7 +2678,7 @@ declare namespace browser.proxy { | "manual" | "autoConfig"; - type _ProxyOnRequestEvent void> = WebExtEventBase<(callback: T, filter: webRequest.RequestFilter, extraInfoSpec?: Array<"requestHeaders">) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: webRequest.RequestFilter, extraInfoSpec?: Array<"requestHeaders">): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* proxy properties */ /** Configures proxy settings. This setting's value is an object of type ProxyConfig. */ @@ -2736,10 +2744,10 @@ declare namespace browser.proxy { const onRequest: _ProxyOnRequestEvent; /** Notifies about proxy script errors. */ - const onError: WebExtEvent<(error: object) => void>; + const onError: WebExtEvent<(error: Error) => void>; /** Please use `proxy.onError`. */ - const onProxyError: WebExtEvent<(error: object) => void>; + const onProxyError: WebExtEvent<(error: Error) => void>; } /** @@ -2755,8 +2763,8 @@ declare namespace browser.runtime { interface Port { name: string; disconnect: () => void; - onDisconnect: events.Event; - onMessage: events.Event; + onDisconnect: WebExtEvent<() => void>; + onMessage: WebExtEvent<() => void>; postMessage: (message: object) => void; /** This property will **only** be present on ports passed to onConnect/onConnectExternal listeners. */ sender?: MessageSender; @@ -2900,10 +2908,10 @@ declare namespace browser.runtime { /** * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and * implement surveys. Maximum 255 characters. - * @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. + * @param [url] URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. * Set an empty string to not open a new tab upon uninstallation. */ - function setUninstallURL(url: string): Promise; + function setUninstallURL(url?: string): Promise; /** Reloads the app or extension. */ function reload(): void; @@ -3188,7 +3196,7 @@ declare namespace browser.storage { * @param changes Object mapping each key that changed to its corresponding `storage.StorageChange` for that item. * @param areaName The name of the storage area (`"sync"`, `"local"` or `"managed"`) the changes are for. */ - const onChanged: WebExtEvent<(changes: {[key: string]: StorageChange}, areaName: string) => void>; + const onChanged: WebExtEvent<(changes: StorageChange, areaName: string) => void>; } /** @@ -3258,7 +3266,7 @@ declare namespace browser.telemetry { usePingSender?: boolean; }): Promise; - /** Checks if Telemetry is enabled. */ + /** Checks if Telemetry upload is enabled. */ function canUpload(): Promise; /** @@ -3609,7 +3617,7 @@ declare namespace browser.webNavigation { url: events.UrlFilter[]; } - type _WebNavigationOnBeforeNavigateEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnCommittedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnDOMContentLoadedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnCompletedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnErrorOccurredEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnCreatedNavigationTargetEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnReferenceFragmentUpdatedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnHistoryStateUpdatedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* webNavigation functions */ /** @@ -4115,7 +4171,7 @@ declare namespace browser.webRequest { | "TLSv1.3" | "unknown"; - type _WebRequestOnBeforeRequestEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnBeforeRequestOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnBeforeRequestOptions[]): void; - type _WebRequestOnBeforeSendHeadersEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnBeforeSendHeadersOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnBeforeSendHeadersOptions[]): void; - type _WebRequestOnSendHeadersEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnSendHeadersOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnSendHeadersOptions[]): void; - type _WebRequestOnHeadersReceivedEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnHeadersReceivedOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnHeadersReceivedOptions[]): void; - type _WebRequestOnAuthRequiredEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnAuthRequiredOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnAuthRequiredOptions[]): void; - type _WebRequestOnResponseStartedEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnResponseStartedOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnResponseStartedOptions[]): void; - type _WebRequestOnBeforeRedirectEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnBeforeRedirectOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnBeforeRedirectOptions[]): void; - type _WebRequestOnCompletedEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnCompletedOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnCompletedOptions[]): void; - type _WebRequestOnErrorOccurredEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* webRequest properties */ /** @@ -7118,7 +7228,7 @@ declare namespace browser.tabs { | "Window" | "Application"; - type _TabsOnUpdatedEvent void> = WebExtEventBase<(callback: T, filter?: UpdateFilter) => void, T>; + }, tab: Tab) => void> { + addListener(cb: TCallback, filter?: UpdateFilter): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* tabs properties */ /** An ID which represents the absence of a browser tab. */ diff --git a/types/flatbuffers/tslint.json b/types/flatbuffers/tslint.json index 26bcea6634..a083d120e7 100644 --- a/types/flatbuffers/tslint.json +++ b/types/flatbuffers/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "dt-header": false + "npm-naming": false, + "dt-header": false } } diff --git a/types/flexmonster/index.d.ts b/types/flexmonster/index.d.ts index eeb8ed56d7..3f7772ed08 100644 --- a/types/flexmonster/index.d.ts +++ b/types/flexmonster/index.d.ts @@ -130,7 +130,7 @@ declare namespace Flexmonster { showCharts(type?: string, multiple?: boolean): void; showGrid(): void; showGridAndCharts(type?: string, position?: string, multiple?: boolean): void; - sortingMethod(hierarchyName: string, compareFunction: (a: string, b: string) => boolean): void; + sortingMethod(hierarchyName: string, compareFunction: (a: string, b: string) => number): void; sortValues(axisName: string, type: string, tuple: number[], measure: MeasureObject): void; toolbar: Toolbar; updateData(object: DataSource | object[]): void; @@ -485,6 +485,8 @@ declare namespace Flexmonster { maxSymbols?: number; currencySymbol?: string; currencySymbolAlign?: string; + negativeCurrencyFormat?: string; + positiveCurrencyFormat?: string; nullValue?: string; infinityValue?: string; divideByZeroValue?: string; diff --git a/types/fluent-react/index.d.ts b/types/fluent-react/index.d.ts index 5ffc93d874..b3fa7c9dec 100644 --- a/types/fluent-react/index.d.ts +++ b/types/fluent-react/index.d.ts @@ -2,7 +2,7 @@ // Project: http://projectfluent.org // Definitions by: Huy Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.3 import * as React from 'react'; import { @@ -76,7 +76,7 @@ export type Matching = { */ export type Shared< InjectedProps, - DecorationTargetProps extends Shared + DecorationTargetProps > = { [P in Extract]?: InjectedProps[P] extends DecorationTargetProps[P] ? DecorationTargetProps[P] : never; }; diff --git a/types/fluent/fluent-tests.ts b/types/fluent/fluent-tests.ts index d2fcd4a6c4..90b4bffa61 100644 --- a/types/fluent/fluent-tests.ts +++ b/types/fluent/fluent-tests.ts @@ -29,6 +29,7 @@ const bundle4 = new FluentBundle(['en-US'], { // FluentBundle addMessages examples: bundle1.addMessages('foo = Foo'); +bundle2.hasMessage('foo'); bundle2.getMessage('foo'); // FluentBundle addResource examples: @@ -42,3 +43,8 @@ bundle1.addMessages('hello = Hello, { $name }!'); const hello = bundle2.getMessage('hello'); bundle3.format(hello, { name: 'Jane' }, errors2); bundle3.format(hello, undefined, errors2); + +for (const [id, message] of bundle1.messages) { + bundle1.getMessage(id); + bundle1.format(message); +} diff --git a/types/fluent/index.d.ts b/types/fluent/index.d.ts index 56014044ab..8520443354 100644 --- a/types/fluent/index.d.ts +++ b/types/fluent/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for fluent 0.10 +// Type definitions for fluent 0.11 // Project: http://projectfluent.org -// Definitions by: Huy Nguyen +// Definitions by: Huy Nguyen , James Nimlos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -28,6 +28,8 @@ export class FluentResource extends Map { export class FluentBundle { constructor(locales: string | string[], options?: FluentBundleContructorOptions); + messages: IterableIterator<[string, FluentNode[]]>; + hasMessage(source: string): boolean; addMessages(source: string): string[]; getMessage(id: string): FluentNode[]; format(message: FluentNode[], args?: object, errors?: string[]): string; diff --git a/types/fluent/tsconfig.json b/types/fluent/tsconfig.json index 64e2460dcd..c08fe97570 100644 --- a/types/fluent/tsconfig.json +++ b/types/fluent/tsconfig.json @@ -4,6 +4,7 @@ "lib": [ "es6" ], + "target": "es6", "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/types/follow-redirects/follow-redirects-tests.ts b/types/follow-redirects/follow-redirects-tests.ts new file mode 100644 index 0000000000..96219ad2a8 --- /dev/null +++ b/types/follow-redirects/follow-redirects-tests.ts @@ -0,0 +1,32 @@ +import { http, https } from 'follow-redirects'; + +http.request({ + host: 'localhost', + path: '/a/b', + port: 8000, + maxRedirects: 12, +}, (response) => { + console.log(response.responseUrl, response.redirects); + response.on('data', (chunk) => { + console.log(chunk); + }); +}).on('error', (err) => { + console.error(err); +}); + +http.get('http://bit.ly/900913', (response) => { + response.on('data', (chunk) => { + console.log(chunk); + }); +}).on('error', (err) => { + console.error(err); +}); + +https.get('http://bit.ly/900913', (response) => { + console.log(response.responseUrl, response.redirects); + response.on('data', (chunk) => { + console.log(chunk); + }); +}).on('error', (err: Error) => { + console.error(err); +}); diff --git a/types/follow-redirects/http.d.ts b/types/follow-redirects/http.d.ts new file mode 100644 index 0000000000..43206e2838 --- /dev/null +++ b/types/follow-redirects/http.d.ts @@ -0,0 +1,3 @@ +import { http } from '.'; + +export = http; diff --git a/types/follow-redirects/https.d.ts b/types/follow-redirects/https.d.ts new file mode 100644 index 0000000000..12e081c8f5 --- /dev/null +++ b/types/follow-redirects/https.d.ts @@ -0,0 +1,3 @@ +import { https } from '.'; + +export = https; diff --git a/types/follow-redirects/index.d.ts b/types/follow-redirects/index.d.ts new file mode 100644 index 0000000000..e7144e1f7f --- /dev/null +++ b/types/follow-redirects/index.d.ts @@ -0,0 +1,118 @@ +// Type definitions for follow-redirects 1.5 +// Project: https://github.com/follow-redirects/follow-redirects +// Definitions by: Emily Klassen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +import * as coreHttp from 'http'; +import * as coreHttps from 'https'; +import { Writable } from 'stream'; + +export interface WrappableRequest { + getHeader?(...args: any[]): any; + setHeader(...args: any[]): any; + removeHeader(...args: any[]): any; + + abort?(...args: any[]): any; + flushHeaders?(...args: any[]): any; + setNoDelay?(...args: any[]): any; + setSocketKeepAlive?(...args: any[]): any; + setTimeout?(...args: any[]): any; +} +export interface WrappableResponse { + statusCode?: number; + headers: { + location?: string + }; + destroy(): any; +} + +export interface Scheme { + request(options: Options, callback?: (res: Response) => any): Request; +} + +export interface RedirectableRequest extends Writable { + setHeader: Request['setHeader']; + removeHeader: Request['removeHeader']; + abort: Request['abort']; + flushHeaders: Request['flushHeaders']; + getHeader: Request['getHeader']; + setNoDelay: Request['setNoDelay']; + setSocketKeepAlive: Request['setSocketKeepAlive']; + setTimeout: Request['setTimeout']; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "response", listener: (response: Response) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "response", response: Response): boolean; + emit(event: "error", err: Error): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "response", listener: (response: Response) => void): this; + on(event: "error", listener: (err: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "response", listener: (response: Response) => void): this; + once(event: "error", listener: (err: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "response", listener: (response: Response) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "response", listener: (response: Response) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; +} + +export interface RedirectScheme { + request( + options: string | Options & FollowOptions, + callback?: (res: Response & FollowResponse) => void + ): RedirectableRequest; + get( + options: string | Options & FollowOptions, + callback?: (res: Response & FollowResponse) => void + ): RedirectableRequest; +} + +export type Override = Pick> & U; +export interface FollowOptions { + maxRedirects?: number; + maxBodyLength?: number; +} + +export interface FollowResponse { + responseUrl: string; + redirects: Redirect[]; +} + +export interface Redirect { + url: string; + headers: coreHttp.IncomingHttpHeaders; + statusCode: number; +} + +export const http: Override>; +export const https: Override>; + +export type WrappedScheme> = Override ? Options : never, + T extends Scheme ? Request : never, + T extends Scheme ? Response : never +>>; + +export function wrap}>(protocols: T): { + [K in keyof T]: WrappedScheme +}; diff --git a/types/follow-redirects/tsconfig.json b/types/follow-redirects/tsconfig.json new file mode 100644 index 0000000000..1b3c66288e --- /dev/null +++ b/types/follow-redirects/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "http.d.ts", + "https.d.ts", + "follow-redirects-tests.ts" + ] +} diff --git a/types/follow-redirects/tslint.json b/types/follow-redirects/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/follow-redirects/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/force-graph/index.d.ts b/types/force-graph/index.d.ts index b9b056ce04..b78737e74e 100644 --- a/types/force-graph/index.d.ts +++ b/types/force-graph/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for force-graph >= 1.14 +// Type definitions for force-graph 1.14 // Project: https://github.com/vasturiano/force-graph // Definitions by: Peter Kimberley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -68,13 +68,19 @@ declare namespace ForceGraph { /** * Represents ForceGraph runtime object * @example: + * // Create an empty ForceGraph instance on an existing DOM element * let forceGraph = ForceGraph(); * forceGraph(myHtmlElement); - * forceGraph.graphData([]) + * forceGraph.graphData([]); + * + * // Destroy the ForceGraph instance + * forceGraph._destructor(); */ interface ForceGraphInstance { + // Init / de-init (element: HTMLElement): ForceGraphInstance; + _destructor(): void; // Data input graphData(data?: GraphData): ForceGraphInstance & GraphData; diff --git a/types/format-number/format-number-tests.ts b/types/format-number/format-number-tests.ts new file mode 100644 index 0000000000..72e3cecdba --- /dev/null +++ b/types/format-number/format-number-tests.ts @@ -0,0 +1,5 @@ +import createFormatNumber from "format-number"; + +createFormatNumber({ round: 2 }); // $ExpectType (number: number, overrideOptions?: { noUnits: boolean; noSeparator: boolean; } | undefined) => string + +createFormatNumber({ round: 2 })(12); // $ExpectType string diff --git a/types/format-number/index.d.ts b/types/format-number/index.d.ts new file mode 100644 index 0000000000..03eafefb45 --- /dev/null +++ b/types/format-number/index.d.ts @@ -0,0 +1,30 @@ +// Type definitions for format-number 2.0 +// Project: https://github.com/componitable/format-number +// Definitions by: Fedai Kaya +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default function(options?: { + negativeType?: "right" | "left" | "brackets" | null; + negativeLeftSymbol?: string; + negative?: "R" | null; + negativeRightSymbol?: string; + negativeLeftOut?: boolean; + negativeOut?: boolean; + prefix?: string; + suffix?: string; + integerSeparator?: string; + separator?: string; + decimalsSeparator?: string; + decimal?: string; + padLeft?: number; + padRight?: number; + round?: number; + truncate?: number; + allowedSeparators?: string[]; +}): ( + number: number, + overrideOptions?: { + noUnits: boolean; + noSeparator: boolean; + } +) => string; diff --git a/types/format-number/tsconfig.json b/types/format-number/tsconfig.json new file mode 100644 index 0000000000..77b1c052ad --- /dev/null +++ b/types/format-number/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "format-number-tests.ts"] +} diff --git a/types/format-number/tslint.json b/types/format-number/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/format-number/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/get-port/get-port-tests.ts b/types/get-port/get-port-tests.ts deleted file mode 100644 index 5e47c33c1a..0000000000 --- a/types/get-port/get-port-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ -import getPort = require('get-port'); - -// $ExpectType Promise -getPort(); -// $ExpectType Promise -getPort({ port: 3000 }); -// $ExpectType Promise -getPort({ port: [3000, 3001] }); -// $ExpectType Promise -getPort({ host: 'foo.local' }); diff --git a/types/get-port/index.d.ts b/types/get-port/index.d.ts deleted file mode 100644 index 9af3b311fc..0000000000 --- a/types/get-port/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Type definitions for get-port 4.0 -// Project: https://github.com/sindresorhus/get-port -// Definitions by: York Yao -// BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare function getPort(options?: { - port?: number | ReadonlyArray; - host?: string; -}): Promise; - -export = getPort; diff --git a/types/get-value/get-value-tests.ts b/types/get-value/get-value-tests.ts index 9e7534e000..c6cf6c7de4 100644 --- a/types/get-value/get-value-tests.ts +++ b/types/get-value/get-value-tests.ts @@ -6,6 +6,9 @@ get(obj, "a"); get(obj, "a.b"); get(obj, "a.b.c"); get(obj, "a.b.c.d"); +get(obj, ['a']); +get(obj, ['a', 'b', 'c']); +get(obj, ['a', 'b', 'c', 'd']); { const isEnumerable = Object.prototype.propertyIsEnumerable; diff --git a/types/get-value/index.d.ts b/types/get-value/index.d.ts index 70cf0286e7..04dabe5101 100644 --- a/types/get-value/index.d.ts +++ b/types/get-value/index.d.ts @@ -1,13 +1,14 @@ // Type definitions for get-value 3.0 // Project: https://github.com/jonschlinkert/get-value // Definitions by: Daniel Rosenwasser +// Mathew Allen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 export = get; declare function get(obj: T): T; -declare function get(obj: object, key: string, options?: get.Options): any; +declare function get(obj: object, key: string | string[], options?: get.Options): any; declare namespace get { interface Options { diff --git a/types/git-rev/tslint.json b/types/git-rev/tslint.json index 65c83fb1e3..1c56ba06b6 100644 --- a/types/git-rev/tslint.json +++ b/types/git-rev/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { + "npm-naming": false, "dt-header": false } } diff --git a/types/glob-parent/index.d.ts b/types/glob-parent/index.d.ts index 052bbcd1db..b41cc48c31 100644 --- a/types/glob-parent/index.d.ts +++ b/types/glob-parent/index.d.ts @@ -1,5 +1,5 @@ // Type definitions for glob-parent 3.1 -// Project: https://github.com/es128/glob-parent +// Project: https://github.com/gulpjs/glob-parent // Definitions by: mrmlnc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/google-apps-script/apis/admin/reports_v1.d.ts b/types/google-apps-script/apis/admin/reports_v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/adsense/v1.4.d.ts b/types/google-apps-script/apis/adsense/v1.4.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/adsense_v1_4.d.ts b/types/google-apps-script/apis/adsense_v1_4.d.ts new file mode 100644 index 0000000000..b093e051a1 --- /dev/null +++ b/types/google-apps-script/apis/adsense_v1_4.d.ts @@ -0,0 +1,434 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Adsense { + namespace Collection { + namespace Accounts { + namespace Adunits { + export interface CustomchannelsCollection { + // List all custom channels which the specified ad unit belongs to. + list(accountId: string, adClientId: string, adUnitId: string): Adsense.Schema.CustomChannels; + // List all custom channels which the specified ad unit belongs to. + list(accountId: string, adClientId: string, adUnitId: string, optionalArgs: object): Adsense.Schema.CustomChannels; + } + } + namespace Customchannels { + export interface AdunitsCollection { + // List all ad units in the specified custom channel. + list(accountId: string, adClientId: string, customChannelId: string): Adsense.Schema.AdUnits; + // List all ad units in the specified custom channel. + list(accountId: string, adClientId: string, customChannelId: string, optionalArgs: object): Adsense.Schema.AdUnits; + } + } + namespace Reports { + export interface SavedCollection { + // Generate an AdSense report based on the saved report ID sent in the query parameters. + generate(accountId: string, savedReportId: string): Adsense.Schema.AdsenseReportsGenerateResponse; + // Generate an AdSense report based on the saved report ID sent in the query parameters. + generate(accountId: string, savedReportId: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; + // List all saved reports in the specified AdSense account. + list(accountId: string): Adsense.Schema.SavedReports; + // List all saved reports in the specified AdSense account. + list(accountId: string, optionalArgs: object): Adsense.Schema.SavedReports; + } + } + export interface AdclientsCollection { + // Get Auto ad code for a given ad client. + getAdCode(accountId: string, adClientId: string): Adsense.Schema.AdCode; + // List all ad clients in the specified account. + list(accountId: string): Adsense.Schema.AdClients; + // List all ad clients in the specified account. + list(accountId: string, optionalArgs: object): Adsense.Schema.AdClients; + } + export interface AdunitsCollection { + Customchannels?: Adsense.Collection.Accounts.Adunits.CustomchannelsCollection; + // Gets the specified ad unit in the specified ad client for the specified account. + get(accountId: string, adClientId: string, adUnitId: string): Adsense.Schema.AdUnit; + // Get ad code for the specified ad unit. + getAdCode(accountId: string, adClientId: string, adUnitId: string): Adsense.Schema.AdCode; + // List all ad units in the specified ad client for the specified account. + list(accountId: string, adClientId: string): Adsense.Schema.AdUnits; + // List all ad units in the specified ad client for the specified account. + list(accountId: string, adClientId: string, optionalArgs: object): Adsense.Schema.AdUnits; + } + export interface AlertsCollection { + // List the alerts for the specified AdSense account. + list(accountId: string): Adsense.Schema.Alerts; + // List the alerts for the specified AdSense account. + list(accountId: string, optionalArgs: object): Adsense.Schema.Alerts; + // Dismiss (delete) the specified alert from the specified publisher AdSense account. + remove(accountId: string, alertId: string): void; + } + export interface CustomchannelsCollection { + Adunits?: Adsense.Collection.Accounts.Customchannels.AdunitsCollection; + // Get the specified custom channel from the specified ad client for the specified account. + get(accountId: string, adClientId: string, customChannelId: string): Adsense.Schema.CustomChannel; + // List all custom channels in the specified ad client for the specified account. + list(accountId: string, adClientId: string): Adsense.Schema.CustomChannels; + // List all custom channels in the specified ad client for the specified account. + list(accountId: string, adClientId: string, optionalArgs: object): Adsense.Schema.CustomChannels; + } + export interface PaymentsCollection { + // List the payments for the specified AdSense account. + list(accountId: string): Adsense.Schema.Payments; + } + export interface ReportsCollection { + Saved?: Adsense.Collection.Accounts.Reports.SavedCollection; + // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + generate(accountId: string, startDate: string, endDate: string): Adsense.Schema.AdsenseReportsGenerateResponse; + // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + generate(accountId: string, startDate: string, endDate: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; + } + export interface SavedadstylesCollection { + // List a specific saved ad style for the specified account. + get(accountId: string, savedAdStyleId: string): Adsense.Schema.SavedAdStyle; + // List all saved ad styles in the specified account. + list(accountId: string): Adsense.Schema.SavedAdStyles; + // List all saved ad styles in the specified account. + list(accountId: string, optionalArgs: object): Adsense.Schema.SavedAdStyles; + } + export interface UrlchannelsCollection { + // List all URL channels in the specified ad client for the specified account. + list(accountId: string, adClientId: string): Adsense.Schema.UrlChannels; + // List all URL channels in the specified ad client for the specified account. + list(accountId: string, adClientId: string, optionalArgs: object): Adsense.Schema.UrlChannels; + } + } + namespace Adunits { + export interface CustomchannelsCollection { + // List all custom channels which the specified ad unit belongs to. + list(adClientId: string, adUnitId: string): Adsense.Schema.CustomChannels; + // List all custom channels which the specified ad unit belongs to. + list(adClientId: string, adUnitId: string, optionalArgs: object): Adsense.Schema.CustomChannels; + } + } + namespace Customchannels { + export interface AdunitsCollection { + // List all ad units in the specified custom channel. + list(adClientId: string, customChannelId: string): Adsense.Schema.AdUnits; + // List all ad units in the specified custom channel. + list(adClientId: string, customChannelId: string, optionalArgs: object): Adsense.Schema.AdUnits; + } + } + namespace Metadata { + export interface DimensionsCollection { + // List the metadata for the dimensions available to this AdSense account. + list(): Adsense.Schema.Metadata; + } + export interface MetricsCollection { + // List the metadata for the metrics available to this AdSense account. + list(): Adsense.Schema.Metadata; + } + } + namespace Reports { + export interface SavedCollection { + // Generate an AdSense report based on the saved report ID sent in the query parameters. + generate(savedReportId: string): Adsense.Schema.AdsenseReportsGenerateResponse; + // Generate an AdSense report based on the saved report ID sent in the query parameters. + generate(savedReportId: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; + // List all saved reports in this AdSense account. + list(): Adsense.Schema.SavedReports; + // List all saved reports in this AdSense account. + list(optionalArgs: object): Adsense.Schema.SavedReports; + } + } + export interface AccountsCollection { + Adclients?: Adsense.Collection.Accounts.AdclientsCollection; + Adunits?: Adsense.Collection.Accounts.AdunitsCollection; + Alerts?: Adsense.Collection.Accounts.AlertsCollection; + Customchannels?: Adsense.Collection.Accounts.CustomchannelsCollection; + Payments?: Adsense.Collection.Accounts.PaymentsCollection; + Reports?: Adsense.Collection.Accounts.ReportsCollection; + Savedadstyles?: Adsense.Collection.Accounts.SavedadstylesCollection; + Urlchannels?: Adsense.Collection.Accounts.UrlchannelsCollection; + // Get information about the selected AdSense account. + get(accountId: string): Adsense.Schema.Account; + // Get information about the selected AdSense account. + get(accountId: string, optionalArgs: object): Adsense.Schema.Account; + // List all accounts available to this AdSense account. + list(): Adsense.Schema.Accounts; + // List all accounts available to this AdSense account. + list(optionalArgs: object): Adsense.Schema.Accounts; + } + export interface AdclientsCollection { + // List all ad clients in this AdSense account. + list(): Adsense.Schema.AdClients; + // List all ad clients in this AdSense account. + list(optionalArgs: object): Adsense.Schema.AdClients; + } + export interface AdunitsCollection { + Customchannels?: Adsense.Collection.Adunits.CustomchannelsCollection; + // Gets the specified ad unit in the specified ad client. + get(adClientId: string, adUnitId: string): Adsense.Schema.AdUnit; + // Get ad code for the specified ad unit. + getAdCode(adClientId: string, adUnitId: string): Adsense.Schema.AdCode; + // List all ad units in the specified ad client for this AdSense account. + list(adClientId: string): Adsense.Schema.AdUnits; + // List all ad units in the specified ad client for this AdSense account. + list(adClientId: string, optionalArgs: object): Adsense.Schema.AdUnits; + } + export interface AlertsCollection { + // List the alerts for this AdSense account. + list(): Adsense.Schema.Alerts; + // List the alerts for this AdSense account. + list(optionalArgs: object): Adsense.Schema.Alerts; + // Dismiss (delete) the specified alert from the publisher's AdSense account. + remove(alertId: string): void; + } + export interface CustomchannelsCollection { + Adunits?: Adsense.Collection.Customchannels.AdunitsCollection; + // Get the specified custom channel from the specified ad client. + get(adClientId: string, customChannelId: string): Adsense.Schema.CustomChannel; + // List all custom channels in the specified ad client for this AdSense account. + list(adClientId: string): Adsense.Schema.CustomChannels; + // List all custom channels in the specified ad client for this AdSense account. + list(adClientId: string, optionalArgs: object): Adsense.Schema.CustomChannels; + } + export interface MetadataCollection { + Dimensions?: Adsense.Collection.Metadata.DimensionsCollection; + Metrics?: Adsense.Collection.Metadata.MetricsCollection; + } + export interface PaymentsCollection { + // List the payments for this AdSense account. + list(): Adsense.Schema.Payments; + } + export interface ReportsCollection { + Saved?: Adsense.Collection.Reports.SavedCollection; + // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + generate(startDate: string, endDate: string): Adsense.Schema.AdsenseReportsGenerateResponse; + // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + generate(startDate: string, endDate: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; + } + export interface SavedadstylesCollection { + // Get a specific saved ad style from the user's account. + get(savedAdStyleId: string): Adsense.Schema.SavedAdStyle; + // List all saved ad styles in the user's account. + list(): Adsense.Schema.SavedAdStyles; + // List all saved ad styles in the user's account. + list(optionalArgs: object): Adsense.Schema.SavedAdStyles; + } + export interface UrlchannelsCollection { + // List all URL channels in the specified ad client for this AdSense account. + list(adClientId: string): Adsense.Schema.UrlChannels; + // List all URL channels in the specified ad client for this AdSense account. + list(adClientId: string, optionalArgs: object): Adsense.Schema.UrlChannels; + } + } + namespace Schema { + export interface Account { + creation_time?: string; + id?: string; + kind?: string; + name?: string; + premium?: boolean; + subAccounts?: Adsense.Schema.Account[]; + timezone?: string; + } + export interface Accounts { + etag?: string; + items?: Adsense.Schema.Account[]; + kind?: string; + nextPageToken?: string; + } + export interface AdClient { + arcOptIn?: boolean; + id?: string; + kind?: string; + productCode?: string; + supportsReporting?: boolean; + } + export interface AdClients { + etag?: string; + items?: Adsense.Schema.AdClient[]; + kind?: string; + nextPageToken?: string; + } + export interface AdCode { + adCode?: string; + ampBody?: string; + ampHead?: string; + kind?: string; + } + export interface AdStyle { + colors?: Adsense.Schema.AdStyleColors; + corners?: string; + font?: Adsense.Schema.AdStyleFont; + kind?: string; + } + export interface AdStyleColors { + background?: string; + border?: string; + text?: string; + title?: string; + url?: string; + } + export interface AdStyleFont { + family?: string; + size?: string; + } + export interface AdUnit { + code?: string; + contentAdsSettings?: Adsense.Schema.AdUnitContentAdsSettings; + customStyle?: Adsense.Schema.AdStyle; + feedAdsSettings?: Adsense.Schema.AdUnitFeedAdsSettings; + id?: string; + kind?: string; + mobileContentAdsSettings?: Adsense.Schema.AdUnitMobileContentAdsSettings; + name?: string; + savedStyleId?: string; + status?: string; + } + export interface AdUnitContentAdsSettings { + backupOption?: Adsense.Schema.AdUnitContentAdsSettingsBackupOption; + size?: string; + type?: string; + } + export interface AdUnitContentAdsSettingsBackupOption { + color?: string; + type?: string; + url?: string; + } + export interface AdUnitFeedAdsSettings { + adPosition?: string; + frequency?: number; + minimumWordCount?: number; + type?: string; + } + export interface AdUnitMobileContentAdsSettings { + markupLanguage?: string; + scriptingLanguage?: string; + size?: string; + type?: string; + } + export interface AdUnits { + etag?: string; + items?: Adsense.Schema.AdUnit[]; + kind?: string; + nextPageToken?: string; + } + export interface AdsenseReportsGenerateResponse { + averages?: string[]; + endDate?: string; + headers?: Adsense.Schema.AdsenseReportsGenerateResponseHeaders[]; + kind?: string; + rows?: String[][]; + startDate?: string; + totalMatchedRows?: string; + totals?: string[]; + warnings?: string[]; + } + export interface AdsenseReportsGenerateResponseHeaders { + currency?: string; + name?: string; + type?: string; + } + export interface Alert { + id?: string; + isDismissible?: boolean; + kind?: string; + message?: string; + severity?: string; + type?: string; + } + export interface Alerts { + items?: Adsense.Schema.Alert[]; + kind?: string; + } + export interface CustomChannel { + code?: string; + id?: string; + kind?: string; + name?: string; + targetingInfo?: Adsense.Schema.CustomChannelTargetingInfo; + } + export interface CustomChannelTargetingInfo { + adsAppearOn?: string; + description?: string; + location?: string; + siteLanguage?: string; + } + export interface CustomChannels { + etag?: string; + items?: Adsense.Schema.CustomChannel[]; + kind?: string; + nextPageToken?: string; + } + export interface Metadata { + items?: Adsense.Schema.ReportingMetadataEntry[]; + kind?: string; + } + export interface Payment { + id?: string; + kind?: string; + paymentAmount?: string; + paymentAmountCurrencyCode?: string; + paymentDate?: string; + } + export interface Payments { + items?: Adsense.Schema.Payment[]; + kind?: string; + } + export interface ReportingMetadataEntry { + compatibleDimensions?: string[]; + compatibleMetrics?: string[]; + id?: string; + kind?: string; + requiredDimensions?: string[]; + requiredMetrics?: string[]; + supportedProducts?: string[]; + } + export interface SavedAdStyle { + adStyle?: Adsense.Schema.AdStyle; + id?: string; + kind?: string; + name?: string; + } + export interface SavedAdStyles { + etag?: string; + items?: Adsense.Schema.SavedAdStyle[]; + kind?: string; + nextPageToken?: string; + } + export interface SavedReport { + id?: string; + kind?: string; + name?: string; + } + export interface SavedReports { + etag?: string; + items?: Adsense.Schema.SavedReport[]; + kind?: string; + nextPageToken?: string; + } + export interface UrlChannel { + id?: string; + kind?: string; + urlPattern?: string; + } + export interface UrlChannels { + etag?: string; + items?: Adsense.Schema.UrlChannel[]; + kind?: string; + nextPageToken?: string; + } + } + } + export interface Adsense { + Accounts?: Adsense.Collection.AccountsCollection; + Adclients?: Adsense.Collection.AdclientsCollection; + Adunits?: Adsense.Collection.AdunitsCollection; + Alerts?: Adsense.Collection.AlertsCollection; + Customchannels?: Adsense.Collection.CustomchannelsCollection; + Metadata?: Adsense.Collection.MetadataCollection; + Payments?: Adsense.Collection.PaymentsCollection; + Reports?: Adsense.Collection.ReportsCollection; + Savedadstyles?: Adsense.Collection.SavedadstylesCollection; + Urlchannels?: Adsense.Collection.UrlchannelsCollection; + } +} + +declare var Adsense: GoogleAppsScript.Adsense; diff --git a/types/google-apps-script/apis/analytics/v3.d.ts b/types/google-apps-script/apis/analytics/v3.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/analytics_v3.d.ts b/types/google-apps-script/apis/analytics_v3.d.ts new file mode 100644 index 0000000000..f97dd231d3 --- /dev/null +++ b/types/google-apps-script/apis/analytics_v3.d.ts @@ -0,0 +1,1339 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Analytics { + namespace Collection { + namespace Data { + export interface GaCollection { + // Returns Analytics data for a view (profile). + get(ids: string, start_date: string, end_date: string, metrics: string): Analytics.Schema.GaData; + // Returns Analytics data for a view (profile). + get(ids: string, start_date: string, end_date: string, metrics: string, optionalArgs: object): Analytics.Schema.GaData; + } + export interface McfCollection { + // Returns Analytics Multi-Channel Funnels data for a view (profile). + get(ids: string, start_date: string, end_date: string, metrics: string): Analytics.Schema.McfData; + // Returns Analytics Multi-Channel Funnels data for a view (profile). + get(ids: string, start_date: string, end_date: string, metrics: string, optionalArgs: object): Analytics.Schema.McfData; + } + export interface RealtimeCollection { + // Returns real time data for a view (profile). + get(ids: string, metrics: string): Analytics.Schema.RealtimeData; + // Returns real time data for a view (profile). + get(ids: string, metrics: string, optionalArgs: object): Analytics.Schema.RealtimeData; + } + } + namespace Management { + export interface AccountSummariesCollection { + // Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. + list(): Analytics.Schema.AccountSummaries; + // Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. + list(optionalArgs: object): Analytics.Schema.AccountSummaries; + } + export interface AccountUserLinksCollection { + // Adds a new user to the given account. + insert(resource: Schema.EntityUserLink, accountId: string): Analytics.Schema.EntityUserLink; + // Lists account-user links for a given account. + list(accountId: string): Analytics.Schema.EntityUserLinks; + // Lists account-user links for a given account. + list(accountId: string, optionalArgs: object): Analytics.Schema.EntityUserLinks; + // Removes a user from the given account. + remove(accountId: string, linkId: string): void; + // Updates permissions for an existing user on the given account. + update(resource: Schema.EntityUserLink, accountId: string, linkId: string): Analytics.Schema.EntityUserLink; + } + export interface AccountsCollection { + // Lists all accounts to which the user has access. + list(): Analytics.Schema.Accounts; + // Lists all accounts to which the user has access. + list(optionalArgs: object): Analytics.Schema.Accounts; + } + export interface ClientIdCollection { + // Hashes the given Client ID. + hashClientId(resource: Analytics.Schema.HashClientIdRequest): Analytics.Schema.HashClientIdResponse; + } + export interface CustomDataSourcesCollection { + // List custom data sources to which the user has access. + list(accountId: string, webPropertyId: string): Analytics.Schema.CustomDataSources; + // List custom data sources to which the user has access. + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.CustomDataSources; + } + export interface CustomDimensionsCollection { + // Get a custom dimension to which the user has access. + get(accountId: string, webPropertyId: string, customDimensionId: string): Analytics.Schema.CustomDimension; + // Create a new custom dimension. + insert(resource: Schema.CustomDimension, accountId: string, webPropertyId: string): Analytics.Schema.CustomDimension; + // Lists custom dimensions to which the user has access. + list(accountId: string, webPropertyId: string): Analytics.Schema.CustomDimensions; + // Lists custom dimensions to which the user has access. + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.CustomDimensions; + // Updates an existing custom dimension. This method supports patch semantics. + patch(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string): Analytics.Schema.CustomDimension; + // Updates an existing custom dimension. This method supports patch semantics. + patch(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string, optionalArgs: object): Analytics.Schema.CustomDimension; + // Updates an existing custom dimension. + update(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string): Analytics.Schema.CustomDimension; + // Updates an existing custom dimension. + update(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string, optionalArgs: object): Analytics.Schema.CustomDimension; + } + export interface CustomMetricsCollection { + // Get a custom metric to which the user has access. + get(accountId: string, webPropertyId: string, customMetricId: string): Analytics.Schema.CustomMetric; + // Create a new custom metric. + insert(resource: Schema.CustomMetric, accountId: string, webPropertyId: string): Analytics.Schema.CustomMetric; + // Lists custom metrics to which the user has access. + list(accountId: string, webPropertyId: string): Analytics.Schema.CustomMetrics; + // Lists custom metrics to which the user has access. + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.CustomMetrics; + // Updates an existing custom metric. This method supports patch semantics. + patch(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string): Analytics.Schema.CustomMetric; + // Updates an existing custom metric. This method supports patch semantics. + patch(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string, optionalArgs: object): Analytics.Schema.CustomMetric; + // Updates an existing custom metric. + update(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string): Analytics.Schema.CustomMetric; + // Updates an existing custom metric. + update(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string, optionalArgs: object): Analytics.Schema.CustomMetric; + } + export interface ExperimentsCollection { + // Returns an experiment to which the user has access. + get(accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics.Schema.Experiment; + // Create a new experiment. + insert(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Experiment; + // Lists experiments to which the user has access. + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Experiments; + // Lists experiments to which the user has access. + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.Experiments; + // Update an existing experiment. This method supports patch semantics. + patch(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics.Schema.Experiment; + // Delete an experiment. + remove(accountId: string, webPropertyId: string, profileId: string, experimentId: string): void; + // Update an existing experiment. + update(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics.Schema.Experiment; + } + export interface FiltersCollection { + // Returns a filters to which the user has access. + get(accountId: string, filterId: string): Analytics.Schema.Filter; + // Create a new filter. + insert(resource: Schema.Filter, accountId: string): Analytics.Schema.Filter; + // Lists all filters for an account + list(accountId: string): Analytics.Schema.Filters; + // Lists all filters for an account + list(accountId: string, optionalArgs: object): Analytics.Schema.Filters; + // Updates an existing filter. This method supports patch semantics. + patch(resource: Schema.Filter, accountId: string, filterId: string): Analytics.Schema.Filter; + // Delete a filter. + remove(accountId: string, filterId: string): Analytics.Schema.Filter; + // Updates an existing filter. + update(resource: Schema.Filter, accountId: string, filterId: string): Analytics.Schema.Filter; + } + export interface GoalsCollection { + // Gets a goal to which the user has access. + get(accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics.Schema.Goal; + // Create a new goal. + insert(resource: Analytics.Schema.Goal, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Goal; + // Lists goals to which the user has access. + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Goals; + // Lists goals to which the user has access. + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.Goals; + // Updates an existing goal. This method supports patch semantics. + patch(resource: Schema.Goal, accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics.Schema.Goal; + // Updates an existing goal. + update(resource: Schema.Goal, accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics.Schema.Goal; + } + export interface ProfileFilterLinksCollection { + // Returns a single profile filter link. + get(accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.ProfileFilterLink; + // Create a new profile filter link. + insert(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.ProfileFilterLink; + // Lists all profile filter links for a profile. + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.ProfileFilterLinks; + // Lists all profile filter links for a profile. + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.ProfileFilterLinks; + // Update an existing profile filter link. This method supports patch semantics. + patch(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.ProfileFilterLink; + // Delete a profile filter link. + remove(accountId: string, webPropertyId: string, profileId: string, linkId: string): void; + // Update an existing profile filter link. + update(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.ProfileFilterLink; + } + export interface ProfileUserLinksCollection { + // Adds a new user to the given view (profile). + insert(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.EntityUserLink; + // Lists profile-user links for a given view (profile). + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.EntityUserLinks; + // Lists profile-user links for a given view (profile). + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.EntityUserLinks; + // Removes a user from the given view (profile). + remove(accountId: string, webPropertyId: string, profileId: string, linkId: string): void; + // Updates permissions for an existing user on the given view (profile). + update(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.EntityUserLink; + } + export interface ProfilesCollection { + // Gets a view (profile) to which the user has access. + get(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Profile; + // Create a new view (profile). + insert(resource: Schema.Profile, accountId: string, webPropertyId: string): Analytics.Schema.Profile; + // Lists views (profiles) to which the user has access. + list(accountId: string, webPropertyId: string): Analytics.Schema.Profiles; + // Lists views (profiles) to which the user has access. + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.Profiles; + // Updates an existing view (profile). This method supports patch semantics. + patch(resource: Schema.Profile, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Profile; + // Deletes a view (profile). + remove(accountId: string, webPropertyId: string, profileId: string): void; + // Updates an existing view (profile). + update(resource: Schema.Profile, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Profile; + } + export interface RemarketingAudienceCollection { + // Gets a remarketing audience to which the user has access. + get(accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics.Schema.RemarketingAudience; + // Creates a new remarketing audience. + insert(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string): Analytics.Schema.RemarketingAudience; + // Lists remarketing audiences to which the user has access. + list(accountId: string, webPropertyId: string): Analytics.Schema.RemarketingAudiences; + // Lists remarketing audiences to which the user has access. + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.RemarketingAudiences; + // Updates an existing remarketing audience. This method supports patch semantics. + patch(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics.Schema.RemarketingAudience; + // Delete a remarketing audience. + remove(accountId: string, webPropertyId: string, remarketingAudienceId: string): void; + // Updates an existing remarketing audience. + update(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics.Schema.RemarketingAudience; + } + export interface SegmentsCollection { + // Lists segments to which the user has access. + list(): Analytics.Schema.Segments; + // Lists segments to which the user has access. + list(optionalArgs: object): Analytics.Schema.Segments; + } + export interface UnsampledReportsCollection { + // Returns a single unsampled report. + get(accountId: string, webPropertyId: string, profileId: string, unsampledReportId: string): Analytics.Schema.UnsampledReport; + // Create a new unsampled report. + insert(resource: Schema.UnsampledReport, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.UnsampledReport; + // Lists unsampled reports to which the user has access. + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.UnsampledReports; + // Lists unsampled reports to which the user has access. + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.UnsampledReports; + // Deletes an unsampled report. + remove(accountId: string, webPropertyId: string, profileId: string, unsampledReportId: string): void; + } + export interface UploadsCollection { + // Delete data associated with a previous upload. + deleteUploadData(resource: Schema.AnalyticsDataimportDeleteUploadDataRequest, accountId: string, webPropertyId: string, customDataSourceId: string): void; + // List uploads to which the user has access. + get(accountId: string, webPropertyId: string, customDataSourceId: string, uploadId: string): Analytics.Schema.Upload; + // List uploads to which the user has access. + list(accountId: string, webPropertyId: string, customDataSourceId: string): Analytics.Schema.Uploads; + // List uploads to which the user has access. + list(accountId: string, webPropertyId: string, customDataSourceId: string, optionalArgs: object): Analytics.Schema.Uploads; + // Upload data for a custom data source. + uploadData(accountId: string, webPropertyId: string, customDataSourceId: string): Analytics.Schema.Upload; + // Upload data for a custom data source. + uploadData(accountId: string, webPropertyId: string, customDataSourceId: string, mediaData: any): Analytics.Schema.Upload; + } + export interface WebPropertyAdWordsLinksCollection { + // Returns a web property-Google Ads link to which the user has access. + get(accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics.Schema.EntityAdWordsLink; + // Creates a webProperty-Google Ads link. + insert(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string): Analytics.Schema.EntityAdWordsLink; + // Lists webProperty-Google Ads links for a given web property. + list(accountId: string, webPropertyId: string): Analytics.Schema.EntityAdWordsLinks; + // Lists webProperty-Google Ads links for a given web property. + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.EntityAdWordsLinks; + // Updates an existing webProperty-Google Ads link. This method supports patch semantics. + patch(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics.Schema.EntityAdWordsLink; + // Deletes a web property-Google Ads link. + remove(accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): void; + // Updates an existing webProperty-Google Ads link. + update(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics.Schema.EntityAdWordsLink; + } + export interface WebpropertiesCollection { + // Gets a web property to which the user has access. + get(accountId: string, webPropertyId: string): Analytics.Schema.Webproperty; + // Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile. + insert(resource: Schema.Webproperty, accountId: string): Analytics.Schema.Webproperty; + // Lists web properties to which the user has access. + list(accountId: string): Analytics.Schema.Webproperties; + // Lists web properties to which the user has access. + list(accountId: string, optionalArgs: object): Analytics.Schema.Webproperties; + // Updates an existing web property. This method supports patch semantics. + patch(resource: Schema.Webproperty, accountId: string, webPropertyId: string): Analytics.Schema.Webproperty; + // Updates an existing web property. + update(resource: Schema.Webproperty, accountId: string, webPropertyId: string): Analytics.Schema.Webproperty; + } + export interface WebpropertyUserLinksCollection { + // Adds a new user to the given web property. + insert(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string): Analytics.Schema.EntityUserLink; + // Lists webProperty-user links for a given web property. + list(accountId: string, webPropertyId: string): Analytics.Schema.EntityUserLinks; + // Lists webProperty-user links for a given web property. + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.EntityUserLinks; + // Removes a user from the given web property. + remove(accountId: string, webPropertyId: string, linkId: string): void; + // Updates permissions for an existing user on the given web property. + update(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, linkId: string): Analytics.Schema.EntityUserLink; + } + } + namespace Metadata { + export interface ColumnsCollection { + // Lists all columns for a report type + list(reportType: string): Analytics.Schema.Columns; + } + } + namespace UserDeletion { + export interface UserDeletionRequestCollection { + // Insert or update a user deletion requests. + upsert(resource: Schema.UserDeletionRequest): Analytics.Schema.UserDeletionRequest; + } + } + export interface DataCollection { + Ga?: Analytics.Collection.Data.GaCollection; + Mcf?: Analytics.Collection.Data.McfCollection; + Realtime?: Analytics.Collection.Data.RealtimeCollection; + } + export interface ManagementCollection { + AccountSummaries?: Analytics.Collection.Management.AccountSummariesCollection; + AccountUserLinks?: Analytics.Collection.Management.AccountUserLinksCollection; + Accounts?: Analytics.Collection.Management.AccountsCollection; + ClientId?: Analytics.Collection.Management.ClientIdCollection; + CustomDataSources?: Analytics.Collection.Management.CustomDataSourcesCollection; + CustomDimensions?: Analytics.Collection.Management.CustomDimensionsCollection; + CustomMetrics?: Analytics.Collection.Management.CustomMetricsCollection; + Experiments?: Analytics.Collection.Management.ExperimentsCollection; + Filters?: Analytics.Collection.Management.FiltersCollection; + Goals?: Analytics.Collection.Management.GoalsCollection; + ProfileFilterLinks?: Analytics.Collection.Management.ProfileFilterLinksCollection; + ProfileUserLinks?: Analytics.Collection.Management.ProfileUserLinksCollection; + Profiles?: Analytics.Collection.Management.ProfilesCollection; + RemarketingAudience?: Analytics.Collection.Management.RemarketingAudienceCollection; + Segments?: Analytics.Collection.Management.SegmentsCollection; + UnsampledReports?: Analytics.Collection.Management.UnsampledReportsCollection; + Uploads?: Analytics.Collection.Management.UploadsCollection; + WebPropertyAdWordsLinks?: Analytics.Collection.Management.WebPropertyAdWordsLinksCollection; + Webproperties?: Analytics.Collection.Management.WebpropertiesCollection; + WebpropertyUserLinks?: Analytics.Collection.Management.WebpropertyUserLinksCollection; + } + export interface MetadataCollection { + Columns?: Analytics.Collection.Metadata.ColumnsCollection; + } + export interface ProvisioningCollection { + // Creates an account ticket. + createAccountTicket(resource: Schema.AccountTicket): Analytics.Schema.AccountTicket; + // Provision account. + createAccountTree(resource: Schema.AccountTreeRequest): Analytics.Schema.AccountTreeResponse; + } + export interface UserDeletionCollection { + UserDeletionRequest?: Analytics.Collection.UserDeletion.UserDeletionRequestCollection; + } + } + namespace Schema { + export interface Account { + childLink?: Analytics.Schema.AccountChildLink; + created?: string; + id?: string; + kind?: string; + name?: string; + permissions?: Analytics.Schema.AccountPermissions; + selfLink?: string; + starred?: boolean; + updated?: string; + } + export interface AccountChildLink { + href?: string; + type?: string; + } + export interface AccountPermissions { + effective?: string[]; + } + export interface AccountRef { + href?: string; + id?: string; + kind?: string; + name?: string; + } + export interface AccountSummaries { + items?: Analytics.Schema.AccountSummary[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface AccountSummary { + id?: string; + kind?: string; + name?: string; + starred?: boolean; + webProperties?: Analytics.Schema.WebPropertySummary[]; + } + export interface AccountTicket { + account?: Analytics.Schema.Account; + id?: string; + kind?: string; + profile?: Analytics.Schema.Profile; + redirectUri?: string; + webproperty?: Analytics.Schema.Webproperty; + } + export interface AccountTreeRequest { + accountName?: string; + kind?: string; + profileName?: string; + timezone?: string; + webpropertyName?: string; + websiteUrl?: string; + } + export interface AccountTreeResponse { + account?: Analytics.Schema.Account; + kind?: string; + profile?: Analytics.Schema.Profile; + webproperty?: Analytics.Schema.Webproperty; + } + export interface Accounts { + items?: Analytics.Schema.Account[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface AdWordsAccount { + autoTaggingEnabled?: boolean; + customerId?: string; + kind?: string; + } + export interface AnalyticsDataimportDeleteUploadDataRequest { + customDataImportUids?: string[]; + } + export interface Column { + attributes?: object; + id?: string; + kind?: string; + } + export interface Columns { + attributeNames?: string[]; + etag?: string; + items?: Analytics.Schema.Column[]; + kind?: string; + totalResults?: number; + } + export interface CustomDataSource { + accountId?: string; + childLink?: Analytics.Schema.CustomDataSourceChildLink; + created?: string; + description?: string; + id?: string; + importBehavior?: string; + kind?: string; + name?: string; + parentLink?: Analytics.Schema.CustomDataSourceParentLink; + profilesLinked?: string[]; + schema?: string[]; + selfLink?: string; + type?: string; + updated?: string; + uploadType?: string; + webPropertyId?: string; + } + export interface CustomDataSourceChildLink { + href?: string; + type?: string; + } + export interface CustomDataSourceParentLink { + href?: string; + type?: string; + } + export interface CustomDataSources { + items?: Analytics.Schema.CustomDataSource[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface CustomDimension { + accountId?: string; + active?: boolean; + created?: string; + id?: string; + index?: number; + kind?: string; + name?: string; + parentLink?: Analytics.Schema.CustomDimensionParentLink; + scope?: string; + selfLink?: string; + updated?: string; + webPropertyId?: string; + } + export interface CustomDimensionParentLink { + href?: string; + type?: string; + } + export interface CustomDimensions { + items?: Analytics.Schema.CustomDimension[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface CustomMetric { + accountId?: string; + active?: boolean; + created?: string; + id?: string; + index?: number; + kind?: string; + max_value?: string; + min_value?: string; + name?: string; + parentLink?: Analytics.Schema.CustomMetricParentLink; + scope?: string; + selfLink?: string; + type?: string; + updated?: string; + webPropertyId?: string; + } + export interface CustomMetricParentLink { + href?: string; + type?: string; + } + export interface CustomMetrics { + items?: Analytics.Schema.CustomMetric[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface EntityAdWordsLink { + adWordsAccounts?: Analytics.Schema.AdWordsAccount[]; + entity?: Analytics.Schema.EntityAdWordsLinkEntity; + id?: string; + kind?: string; + name?: string; + profileIds?: string[]; + selfLink?: string; + } + export interface EntityAdWordsLinkEntity { + webPropertyRef?: Analytics.Schema.WebPropertyRef; + } + export interface EntityAdWordsLinks { + items?: Analytics.Schema.EntityAdWordsLink[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + } + export interface EntityUserLink { + entity?: Analytics.Schema.EntityUserLinkEntity; + id?: string; + kind?: string; + permissions?: Analytics.Schema.EntityUserLinkPermissions; + selfLink?: string; + userRef?: Analytics.Schema.UserRef; + } + export interface EntityUserLinkEntity { + accountRef?: Analytics.Schema.AccountRef; + profileRef?: Analytics.Schema.ProfileRef; + webPropertyRef?: Analytics.Schema.WebPropertyRef; + } + export interface EntityUserLinkPermissions { + effective?: string[]; + local?: string[]; + } + export interface EntityUserLinks { + items?: Analytics.Schema.EntityUserLink[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + } + export interface Experiment { + accountId?: string; + created?: string; + description?: string; + editableInGaUi?: boolean; + endTime?: string; + equalWeighting?: boolean; + id?: string; + internalWebPropertyId?: string; + kind?: string; + minimumExperimentLengthInDays?: number; + name?: string; + objectiveMetric?: string; + optimizationType?: string; + parentLink?: Analytics.Schema.ExperimentParentLink; + profileId?: string; + reasonExperimentEnded?: string; + rewriteVariationUrlsAsOriginal?: boolean; + selfLink?: string; + servingFramework?: string; + snippet?: string; + startTime?: string; + status?: string; + trafficCoverage?: Number; + updated?: string; + variations?: Analytics.Schema.ExperimentVariations[]; + webPropertyId?: string; + winnerConfidenceLevel?: Number; + winnerFound?: boolean; + } + export interface ExperimentParentLink { + href?: string; + type?: string; + } + export interface ExperimentVariations { + name?: string; + status?: string; + url?: string; + weight?: Number; + won?: boolean; + } + export interface Experiments { + items?: Analytics.Schema.Experiment[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface Filter { + accountId?: string; + advancedDetails?: Analytics.Schema.FilterAdvancedDetails; + created?: string; + excludeDetails?: Analytics.Schema.FilterExpression; + id?: string; + includeDetails?: Analytics.Schema.FilterExpression; + kind?: string; + lowercaseDetails?: Analytics.Schema.FilterLowercaseDetails; + name?: string; + parentLink?: Analytics.Schema.FilterParentLink; + searchAndReplaceDetails?: Analytics.Schema.FilterSearchAndReplaceDetails; + selfLink?: string; + type?: string; + updated?: string; + uppercaseDetails?: Analytics.Schema.FilterUppercaseDetails; + } + export interface FilterAdvancedDetails { + caseSensitive?: boolean; + extractA?: string; + extractB?: string; + fieldA?: string; + fieldAIndex?: number; + fieldARequired?: boolean; + fieldB?: string; + fieldBIndex?: number; + fieldBRequired?: boolean; + outputConstructor?: string; + outputToField?: string; + outputToFieldIndex?: number; + overrideOutputField?: boolean; + } + export interface FilterExpression { + caseSensitive?: boolean; + expressionValue?: string; + field?: string; + fieldIndex?: number; + kind?: string; + matchType?: string; + } + export interface FilterLowercaseDetails { + field?: string; + fieldIndex?: number; + } + export interface FilterParentLink { + href?: string; + type?: string; + } + export interface FilterRef { + accountId?: string; + href?: string; + id?: string; + kind?: string; + name?: string; + } + export interface FilterSearchAndReplaceDetails { + caseSensitive?: boolean; + field?: string; + fieldIndex?: number; + replaceString?: string; + searchString?: string; + } + export interface FilterUppercaseDetails { + field?: string; + fieldIndex?: number; + } + export interface Filters { + items?: Analytics.Schema.Filter[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface GaData { + columnHeaders?: Analytics.Schema.GaDataColumnHeaders[]; + containsSampledData?: boolean; + dataLastRefreshed?: string; + dataTable?: Analytics.Schema.GaDataDataTable; + id?: string; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + profileInfo?: Analytics.Schema.GaDataProfileInfo; + query?: Analytics.Schema.GaDataQuery; + rows?: String[][]; + sampleSize?: string; + sampleSpace?: string; + selfLink?: string; + totalResults?: number; + totalsForAllResults?: object; + } + export interface GaDataColumnHeaders { + columnType?: string; + dataType?: string; + name?: string; + } + export interface GaDataDataTable { + cols?: Analytics.Schema.GaDataDataTableCols[]; + rows?: Analytics.Schema.GaDataDataTableRows[]; + } + export interface GaDataDataTableCols { + id?: string; + label?: string; + type?: string; + } + export interface GaDataDataTableRows { + c?: Analytics.Schema.GaDataDataTableRowsC[]; + } + export interface GaDataDataTableRowsC { + v?: string; + } + export interface GaDataProfileInfo { + accountId?: string; + internalWebPropertyId?: string; + profileId?: string; + profileName?: string; + tableId?: string; + webPropertyId?: string; + } + export interface GaDataQuery { + dimensions?: string; + end_date?: string; + filters?: string; + ids?: string; + max_results?: number; + metrics?: string[]; + samplingLevel?: string; + segment?: string; + sort?: string[]; + start_date?: string; + start_index?: number; + } + export interface Goal { + accountId?: string; + active?: boolean; + created?: string; + eventDetails?: Analytics.Schema.GoalEventDetails; + id?: string; + internalWebPropertyId?: string; + kind?: string; + name?: string; + parentLink?: Analytics.Schema.GoalParentLink; + profileId?: string; + selfLink?: string; + type?: string; + updated?: string; + urlDestinationDetails?: Analytics.Schema.GoalUrlDestinationDetails; + value?: Number; + visitNumPagesDetails?: Analytics.Schema.GoalVisitNumPagesDetails; + visitTimeOnSiteDetails?: Analytics.Schema.GoalVisitTimeOnSiteDetails; + webPropertyId?: string; + } + export interface GoalEventDetails { + eventConditions?: GoalEventDetailsEventConditions[]; + useEventValue?: boolean; + } + export interface GoalEventDetailsEventConditions { + comparisonType?: string; + comparisonValue?: string; + expression?: string; + matchType?: string; + type?: string; + } + export interface GoalParentLink { + href?: string; + type?: string; + } + export interface GoalUrlDestinationDetails { + caseSensitive?: boolean; + firstStepRequired?: boolean; + matchType?: string; + steps?: GoalUrlDestinationDetailsSteps[]; + url?: string; + } + export interface GoalUrlDestinationDetailsSteps { + name?: string; + number?: number; + url?: string; + } + export interface GoalVisitNumPagesDetails { + comparisonType?: string; + comparisonValue?: string; + } + export interface GoalVisitTimeOnSiteDetails { + comparisonType?: string; + comparisonValue?: string; + } + export interface Goals { + items?: Goal[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface HashClientIdRequest { + clientId?: string; + kind?: string; + webPropertyId?: string; + } + export interface HashClientIdResponse { + clientId?: string; + hashedClientId?: string; + kind?: string; + webPropertyId?: string; + } + export interface IncludeConditions { + daysToLookBack?: number; + isSmartList?: boolean; + kind?: string; + membershipDurationDays?: number; + segment?: string; + } + export interface LinkedForeignAccount { + accountId?: string; + eligibleForSearch?: boolean; + id?: string; + internalWebPropertyId?: string; + kind?: string; + linkedAccountId?: string; + remarketingAudienceId?: string; + status?: string; + type?: string; + webPropertyId?: string; + } + export interface McfData { + columnHeaders?: McfDataColumnHeaders[]; + containsSampledData?: boolean; + id?: string; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + profileInfo?: McfDataProfileInfo; + query?: McfDataQuery; + rows?: McfDataRows[][]; + sampleSize?: string; + sampleSpace?: string; + selfLink?: string; + totalResults?: number; + totalsForAllResults?: object; + } + export interface McfDataColumnHeaders { + columnType?: string; + dataType?: string; + name?: string; + } + export interface McfDataProfileInfo { + accountId?: string; + internalWebPropertyId?: string; + profileId?: string; + profileName?: string; + tableId?: string; + webPropertyId?: string; + } + export interface McfDataQuery { + dimensions?: string; + end_date?: string; + filters?: string; + ids?: string; + max_results?: number; + metrics?: string[]; + samplingLevel?: string; + segment?: string; + sort?: string[]; + start_date?: string; + start_index?: number; + } + export interface McfDataRows { + conversionPathValue?: McfDataRowsConversionPathValue[]; + primitiveValue?: string; + } + export interface McfDataRowsConversionPathValue { + interactionType?: string; + nodeValue?: string; + } + export interface Profile { + accountId?: string; + botFilteringEnabled?: boolean; + childLink?: ProfileChildLink; + created?: string; + currency?: string; + defaultPage?: string; + eCommerceTracking?: boolean; + enhancedECommerceTracking?: boolean; + excludeQueryParameters?: string; + id?: string; + internalWebPropertyId?: string; + kind?: string; + name?: string; + parentLink?: ProfileParentLink; + permissions?: ProfilePermissions; + selfLink?: string; + siteSearchCategoryParameters?: string; + siteSearchQueryParameters?: string; + starred?: boolean; + stripSiteSearchCategoryParameters?: boolean; + stripSiteSearchQueryParameters?: boolean; + timezone?: string; + type?: string; + updated?: string; + webPropertyId?: string; + websiteUrl?: string; + } + export interface ProfileChildLink { + href?: string; + type?: string; + } + export interface ProfileFilterLink { + filterRef?: Analytics.Schema.FilterRef; + id?: string; + kind?: string; + profileRef?: ProfileRef; + rank?: number; + selfLink?: string; + } + export interface ProfileFilterLinks { + items?: ProfileFilterLink[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface ProfileParentLink { + href?: string; + type?: string; + } + export interface ProfilePermissions { + effective?: string[]; + } + export interface ProfileRef { + accountId?: string; + href?: string; + id?: string; + internalWebPropertyId?: string; + kind?: string; + name?: string; + webPropertyId?: string; + } + export interface ProfileSummary { + id?: string; + kind?: string; + name?: string; + starred?: boolean; + type?: string; + } + export interface Profiles { + items?: Profile[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface RealtimeData { + columnHeaders?: RealtimeDataColumnHeaders[]; + id?: string; + kind?: string; + profileInfo?: RealtimeDataProfileInfo; + query?: RealtimeDataQuery; + rows?: String[][]; + selfLink?: string; + totalResults?: number; + totalsForAllResults?: object; + } + export interface RealtimeDataColumnHeaders { + columnType?: string; + dataType?: string; + name?: string; + } + export interface RealtimeDataProfileInfo { + accountId?: string; + internalWebPropertyId?: string; + profileId?: string; + profileName?: string; + tableId?: string; + webPropertyId?: string; + } + export interface RealtimeDataQuery { + dimensions?: string; + filters?: string; + ids?: string; + max_results?: number; + metrics?: string[]; + sort?: string[]; + } + export interface RemarketingAudience { + accountId?: string; + audienceDefinition?: RemarketingAudienceAudienceDefinition; + audienceType?: string; + created?: string; + description?: string; + id?: string; + internalWebPropertyId?: string; + kind?: string; + linkedAdAccounts?: LinkedForeignAccount[]; + linkedViews?: string[]; + name?: string; + stateBasedAudienceDefinition?: RemarketingAudienceStateBasedAudienceDefinition; + updated?: string; + webPropertyId?: string; + } + export interface RemarketingAudienceAudienceDefinition { + includeConditions?: IncludeConditions; + } + export interface RemarketingAudienceStateBasedAudienceDefinition { + excludeConditions?: RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions; + includeConditions?: IncludeConditions; + } + export interface RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions { + exclusionDuration?: string; + segment?: string; + } + export interface RemarketingAudiences { + items?: RemarketingAudience[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface Segment { + created?: string; + definition?: string; + id?: string; + kind?: string; + name?: string; + segmentId?: string; + selfLink?: string; + type?: string; + updated?: string; + } + export interface Segments { + items?: Segment[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface UnsampledReport { + accountId?: string; + cloudStorageDownloadDetails?: UnsampledReportCloudStorageDownloadDetails; + created?: string; + dimensions?: string; + downloadType?: string; + driveDownloadDetails?: UnsampledReportDriveDownloadDetails; + end_date?: string; + filters?: string; + id?: string; + kind?: string; + metrics?: string; + profileId?: string; + segment?: string; + selfLink?: string; + start_date?: string; + status?: string; + title?: string; + updated?: string; + webPropertyId?: string; + } + export interface UnsampledReportCloudStorageDownloadDetails { + bucketId?: string; + objectId?: string; + } + export interface UnsampledReportDriveDownloadDetails { + documentId?: string; + } + export interface UnsampledReports { + items?: UnsampledReport[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface Upload { + accountId?: string; + customDataSourceId?: string; + errors?: string[]; + id?: string; + kind?: string; + status?: string; + uploadTime?: string; + } + export interface Uploads { + items?: Upload[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + } + export interface UserDeletionRequest { + deletionRequestTime?: string; + firebaseProjectId?: string; + id?: UserDeletionRequestId; + kind?: string; + webPropertyId?: string; + } + export interface UserDeletionRequestId { + type?: string; + userId?: string; + } + export interface UserRef { + email?: string; + id?: string; + kind?: string; + } + export interface WebPropertyRef { + accountId?: string; + href?: string; + id?: string; + internalWebPropertyId?: string; + kind?: string; + name?: string; + } + export interface WebPropertySummary { + id?: string; + internalWebPropertyId?: string; + kind?: string; + level?: string; + name?: string; + profiles?: ProfileSummary[]; + starred?: boolean; + websiteUrl?: string; + } + export interface Webproperties { + items?: Webproperty[]; + itemsPerPage?: number; + kind?: string; + nextLink?: string; + previousLink?: string; + startIndex?: number; + totalResults?: number; + username?: string; + } + export interface Webproperty { + accountId?: string; + childLink?: WebpropertyChildLink; + created?: string; + dataRetentionResetOnNewActivity?: boolean; + dataRetentionTtl?: string; + defaultProfileId?: string; + id?: string; + industryVertical?: string; + internalWebPropertyId?: string; + kind?: string; + level?: string; + name?: string; + parentLink?: WebpropertyParentLink; + permissions?: WebpropertyPermissions; + profileCount?: number; + selfLink?: string; + starred?: boolean; + updated?: string; + websiteUrl?: string; + } + export interface WebpropertyChildLink { + href?: string; + type?: string; + } + export interface WebpropertyParentLink { + href?: string; + type?: string; + } + export interface WebpropertyPermissions { + effective?: string[]; + } + } + } + export interface Analytics { + Data?: Analytics.Collection.DataCollection; + Management?: Analytics.Collection.ManagementCollection; + Metadata?: Analytics.Collection.MetadataCollection; + Provisioning?: Analytics.Collection.ProvisioningCollection; + UserDeletion?: Analytics.Collection.UserDeletionCollection; + // Create a new instance of Account + newAccount(): Analytics.Schema.Account; + // Create a new instance of AccountChildLink + newAccountChildLink(): Analytics.Schema.AccountChildLink; + // Create a new instance of AccountPermissions + newAccountPermissions(): Analytics.Schema.AccountPermissions; + // Create a new instance of AccountRef + newAccountRef(): Analytics.Schema.AccountRef; + // Create a new instance of AccountTicket + newAccountTicket(): Analytics.Schema.AccountTicket; + // Create a new instance of AccountTreeRequest + newAccountTreeRequest(): Analytics.Schema.AccountTreeRequest; + // Create a new instance of AdWordsAccount + newAdWordsAccount(): Analytics.Schema.AdWordsAccount; + // Create a new instance of AnalyticsDataimportDeleteUploadDataRequest + newAnalyticsDataimportDeleteUploadDataRequest(): Analytics.Schema.AnalyticsDataimportDeleteUploadDataRequest; + // Create a new instance of CustomDimension + newCustomDimension(): Analytics.Schema.CustomDimension; + // Create a new instance of CustomDimensionParentLink + newCustomDimensionParentLink(): Analytics.Schema.CustomDimensionParentLink; + // Create a new instance of CustomMetric + newCustomMetric(): Analytics.Schema.CustomMetric; + // Create a new instance of CustomMetricParentLink + newCustomMetricParentLink(): Analytics.Schema.CustomMetricParentLink; + // Create a new instance of EntityAdWordsLink + newEntityAdWordsLink(): Analytics.Schema.EntityAdWordsLink; + // Create a new instance of EntityAdWordsLinkEntity + newEntityAdWordsLinkEntity(): Analytics.Schema.EntityAdWordsLinkEntity; + // Create a new instance of EntityUserLink + newEntityUserLink(): Analytics.Schema.EntityUserLink; + // Create a new instance of EntityUserLinkEntity + newEntityUserLinkEntity(): Analytics.Schema.EntityUserLinkEntity; + // Create a new instance of EntityUserLinkPermissions + newEntityUserLinkPermissions(): Analytics.Schema.EntityUserLinkPermissions; + // Create a new instance of Experiment + newExperiment(): Analytics.Schema.Experiment; + // Create a new instance of ExperimentParentLink + newExperimentParentLink(): Analytics.Schema.ExperimentParentLink; + // Create a new instance of ExperimentVariations + newExperimentVariations(): Analytics.Schema.ExperimentVariations; + // Create a new instance of Filter + newFilter(): Analytics.Schema.Filter; + // Create a new instance of FilterAdvancedDetails + newFilterAdvancedDetails(): Analytics.Schema.FilterAdvancedDetails; + // Create a new instance of FilterExpression + newFilterExpression(): Analytics.Schema.FilterExpression; + // Create a new instance of FilterLowercaseDetails + newFilterLowercaseDetails(): Analytics.Schema.FilterLowercaseDetails; + // Create a new instance of FilterParentLink + newFilterParentLink(): Analytics.Schema.FilterParentLink; + // Create a new instance of FilterRef + newFilterRef(): Analytics.Schema.FilterRef; + // Create a new instance of FilterSearchAndReplaceDetails + newFilterSearchAndReplaceDetails(): Analytics.Schema.FilterSearchAndReplaceDetails; + // Create a new instance of FilterUppercaseDetails + newFilterUppercaseDetails(): Analytics.Schema.FilterUppercaseDetails; + // Create a new instance of Goal + newGoal(): Analytics.Schema.Goal; + // Create a new instance of GoalEventDetails + newGoalEventDetails(): Analytics.Schema.GoalEventDetails; + // Create a new instance of GoalEventDetailsEventConditions + newGoalEventDetailsEventConditions(): Analytics.Schema.GoalEventDetailsEventConditions; + // Create a new instance of GoalParentLink + newGoalParentLink(): Analytics.Schema.GoalParentLink; + // Create a new instance of GoalUrlDestinationDetails + newGoalUrlDestinationDetails(): Analytics.Schema.GoalUrlDestinationDetails; + // Create a new instance of GoalUrlDestinationDetailsSteps + newGoalUrlDestinationDetailsSteps(): Analytics.Schema.GoalUrlDestinationDetailsSteps; + // Create a new instance of GoalVisitNumPagesDetails + newGoalVisitNumPagesDetails(): Analytics.Schema.GoalVisitNumPagesDetails; + // Create a new instance of GoalVisitTimeOnSiteDetails + newGoalVisitTimeOnSiteDetails(): Analytics.Schema.GoalVisitTimeOnSiteDetails; + // Create a new instance of HashClientIdRequest + newHashClientIdRequest(): Analytics.Schema.HashClientIdRequest; + // Create a new instance of IncludeConditions + newIncludeConditions(): Analytics.Schema.IncludeConditions; + // Create a new instance of LinkedForeignAccount + newLinkedForeignAccount(): Analytics.Schema.LinkedForeignAccount; + // Create a new instance of Profile + newProfile(): Analytics.Schema.Profile; + // Create a new instance of ProfileChildLink + newProfileChildLink(): Analytics.Schema.ProfileChildLink; + // Create a new instance of ProfileFilterLink + newProfileFilterLink(): Analytics.Schema.ProfileFilterLink; + // Create a new instance of ProfileParentLink + newProfileParentLink(): Analytics.Schema.ProfileParentLink; + // Create a new instance of ProfilePermissions + newProfilePermissions(): Analytics.Schema.ProfilePermissions; + // Create a new instance of ProfileRef + newProfileRef(): Analytics.Schema.ProfileRef; + // Create a new instance of RemarketingAudience + newRemarketingAudience(): Analytics.Schema.RemarketingAudience; + // Create a new instance of RemarketingAudienceAudienceDefinition + newRemarketingAudienceAudienceDefinition(): Analytics.Schema.RemarketingAudienceAudienceDefinition; + // Create a new instance of RemarketingAudienceStateBasedAudienceDefinition + newRemarketingAudienceStateBasedAudienceDefinition(): Analytics.Schema.RemarketingAudienceStateBasedAudienceDefinition; + // Create a new instance of RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions + newRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(): Analytics.Schema.RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions; + // Create a new instance of UnsampledReport + newUnsampledReport(): Analytics.Schema.UnsampledReport; + // Create a new instance of UnsampledReportCloudStorageDownloadDetails + newUnsampledReportCloudStorageDownloadDetails(): Analytics.Schema.UnsampledReportCloudStorageDownloadDetails; + // Create a new instance of UnsampledReportDriveDownloadDetails + newUnsampledReportDriveDownloadDetails(): Analytics.Schema.UnsampledReportDriveDownloadDetails; + // Create a new instance of UserDeletionRequest + newUserDeletionRequest(): Analytics.Schema.UserDeletionRequest; + // Create a new instance of UserDeletionRequestId + newUserDeletionRequestId(): Analytics.Schema.UserDeletionRequestId; + // Create a new instance of UserRef + newUserRef(): Analytics.Schema.UserRef; + // Create a new instance of WebPropertyRef + newWebPropertyRef(): Analytics.Schema.WebPropertyRef; + // Create a new instance of Webproperty + newWebproperty(): Analytics.Schema.Webproperty; + // Create a new instance of WebpropertyChildLink + newWebpropertyChildLink(): Analytics.Schema.WebpropertyChildLink; + // Create a new instance of WebpropertyParentLink + newWebpropertyParentLink(): Analytics.Schema.WebpropertyParentLink; + // Create a new instance of WebpropertyPermissions + newWebpropertyPermissions(): Analytics.Schema.WebpropertyPermissions; + } +} + +declare var Analytics: GoogleAppsScript.Analytics; diff --git a/types/google-apps-script/apis/analyticsreporting/v4.d.ts b/types/google-apps-script/apis/analyticsreporting/v4.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/analyticsreporting_v4.d.ts b/types/google-apps-script/apis/analyticsreporting_v4.d.ts new file mode 100644 index 0000000000..ee89c52701 --- /dev/null +++ b/types/google-apps-script/apis/analyticsreporting_v4.d.ts @@ -0,0 +1,361 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Analyticsreporting { + namespace Collection { + export interface ReportsCollection { + // Returns the Analytics data. + batchGet(resource: Schema.GetReportsRequest): Analyticsreporting.Schema.GetReportsResponse; + } + export interface UserActivityCollection { + // Returns User Activity data. + search(resource: Schema.SearchUserActivityRequest): Analyticsreporting.Schema.SearchUserActivityResponse; + } + } + namespace Schema { + export interface Activity { + activityTime?: string; + activityType?: string; + appview?: Analyticsreporting.Schema.ScreenviewData; + campaign?: string; + channelGrouping?: string; + customDimension?: Analyticsreporting.Schema.CustomDimension[]; + ecommerce?: Analyticsreporting.Schema.EcommerceData; + event?: Analyticsreporting.Schema.EventData; + goals?: Analyticsreporting.Schema.GoalSetData; + hostname?: string; + keyword?: string; + landingPagePath?: string; + medium?: string; + pageview?: Analyticsreporting.Schema.PageviewData; + source?: string; + } + export interface Cohort { + dateRange?: Analyticsreporting.Schema.DateRange; + name?: string; + type?: string; + } + export interface CohortGroup { + cohorts?: Analyticsreporting.Schema.Cohort[]; + lifetimeValue?: boolean; + } + export interface ColumnHeader { + dimensions?: string[]; + metricHeader?: Analyticsreporting.Schema.MetricHeader; + } + export interface CustomDimension { + index?: number; + value?: string; + } + export interface DateRange { + endDate?: string; + startDate?: string; + } + export interface DateRangeValues { + pivotValueRegions?: Analyticsreporting.Schema.PivotValueRegion[]; + values?: string[]; + } + export interface Dimension { + histogramBuckets?: string[]; + name?: string; + } + export interface DimensionFilter { + caseSensitive?: boolean; + dimensionName?: string; + expressions?: string[]; + not?: boolean; + operator?: string; + } + export interface DimensionFilterClause { + filters?: Analyticsreporting.Schema.DimensionFilter[]; + operator?: string; + } + export interface DynamicSegment { + name?: string; + sessionSegment?: Analyticsreporting.Schema.SegmentDefinition; + userSegment?: Analyticsreporting.Schema.SegmentDefinition; + } + export interface EcommerceData { + actionType?: string; + ecommerceType?: string; + products?: Analyticsreporting.Schema.ProductData[]; + transaction?: Analyticsreporting.Schema.TransactionData; + } + export interface EventData { + eventAction?: string; + eventCategory?: string; + eventCount?: string; + eventLabel?: string; + eventValue?: string; + } + export interface GetReportsRequest { + reportRequests?: Analyticsreporting.Schema.ReportRequest[]; + useResourceQuotas?: boolean; + } + export interface GetReportsResponse { + queryCost?: number; + reports?: Analyticsreporting.Schema.Report[]; + resourceQuotasRemaining?: Analyticsreporting.Schema.ResourceQuotasRemaining; + } + export interface GoalData { + goalCompletionLocation?: string; + goalCompletions?: string; + goalIndex?: number; + goalName?: string; + goalPreviousStep1?: string; + goalPreviousStep2?: string; + goalPreviousStep3?: string; + goalValue?: Number; + } + export interface GoalSetData { + goals?: Analyticsreporting.Schema.GoalData[]; + } + export interface Metric { + alias?: string; + expression?: string; + formattingType?: string; + } + export interface MetricFilter { + comparisonValue?: string; + metricName?: string; + not?: boolean; + operator?: string; + } + export interface MetricFilterClause { + filters?: Analyticsreporting.Schema.MetricFilter[]; + operator?: string; + } + export interface MetricHeader { + metricHeaderEntries?: Analyticsreporting.Schema.MetricHeaderEntry[]; + pivotHeaders?: Analyticsreporting.Schema.PivotHeader[]; + } + export interface MetricHeaderEntry { + name?: string; + type?: string; + } + export interface OrFiltersForSegment { + segmentFilterClauses?: Analyticsreporting.Schema.SegmentFilterClause[]; + } + export interface OrderBy { + fieldName?: string; + orderType?: string; + sortOrder?: string; + } + export interface PageviewData { + pagePath?: string; + pageTitle?: string; + } + export interface Pivot { + dimensionFilterClauses?: Analyticsreporting.Schema.DimensionFilterClause[]; + dimensions?: Analyticsreporting.Schema.Dimension[]; + maxGroupCount?: number; + metrics?: Analyticsreporting.Schema.Metric[]; + startGroup?: number; + } + export interface PivotHeader { + pivotHeaderEntries?: Analyticsreporting.Schema.PivotHeaderEntry[]; + totalPivotGroupsCount?: number; + } + export interface PivotHeaderEntry { + dimensionNames?: string[]; + dimensionValues?: string[]; + metric?: Analyticsreporting.Schema.MetricHeaderEntry; + } + export interface PivotValueRegion { + values?: string[]; + } + export interface ProductData { + itemRevenue?: Number; + productName?: string; + productQuantity?: string; + productSku?: string; + } + export interface Report { + columnHeader?: Analyticsreporting.Schema.ColumnHeader; + data?: Analyticsreporting.Schema.ReportData; + nextPageToken?: string; + } + export interface ReportData { + dataLastRefreshed?: string; + isDataGolden?: boolean; + maximums?: Analyticsreporting.Schema.DateRangeValues[]; + minimums?: Analyticsreporting.Schema.DateRangeValues[]; + rowCount?: number; + rows?: Analyticsreporting.Schema.ReportRow[]; + samplesReadCounts?: string[]; + samplingSpaceSizes?: string[]; + totals?: Analyticsreporting.Schema.DateRangeValues[]; + } + export interface ReportRequest { + cohortGroup?: Analyticsreporting.Schema.CohortGroup; + dateRanges?: Analyticsreporting.Schema.DateRange[]; + dimensionFilterClauses?: Analyticsreporting.Schema.DimensionFilterClause[]; + dimensions?: Analyticsreporting.Schema.Dimension[]; + filtersExpression?: string; + hideTotals?: boolean; + hideValueRanges?: boolean; + includeEmptyRows?: boolean; + metricFilterClauses?: Analyticsreporting.Schema.MetricFilterClause[]; + metrics?: Analyticsreporting.Schema.Metric[]; + orderBys?: Analyticsreporting.Schema.OrderBy[]; + pageSize?: number; + pageToken?: string; + pivots?: Analyticsreporting.Schema.Pivot[]; + samplingLevel?: string; + segments?: Analyticsreporting.Schema.Segment[]; + viewId?: string; + } + export interface ReportRow { + dimensions?: string[]; + metrics?: Analyticsreporting.Schema.DateRangeValues[]; + } + export interface ResourceQuotasRemaining { + dailyQuotaTokensRemaining?: number; + hourlyQuotaTokensRemaining?: number; + } + export interface ScreenviewData { + appName?: string; + mobileDeviceBranding?: string; + mobileDeviceModel?: string; + screenName?: string; + } + export interface SearchUserActivityRequest { + activityTypes?: string[]; + dateRange?: Analyticsreporting.Schema.DateRange; + pageSize?: number; + pageToken?: string; + user?: Analyticsreporting.Schema.User; + viewId?: string; + } + export interface SearchUserActivityResponse { + nextPageToken?: string; + sampleRate?: Number; + sessions?: Analyticsreporting.Schema.UserActivitySession[]; + totalRows?: number; + } + export interface Segment { + dynamicSegment?: Analyticsreporting.Schema.DynamicSegment; + segmentId?: string; + } + export interface SegmentDefinition { + segmentFilters?: Analyticsreporting.Schema.SegmentFilter[]; + } + export interface SegmentDimensionFilter { + caseSensitive?: boolean; + dimensionName?: string; + expressions?: string[]; + maxComparisonValue?: string; + minComparisonValue?: string; + operator?: string; + } + export interface SegmentFilter { + not?: boolean; + sequenceSegment?: Analyticsreporting.Schema.SequenceSegment; + simpleSegment?: Analyticsreporting.Schema.SimpleSegment; + } + export interface SegmentFilterClause { + dimensionFilter?: Analyticsreporting.Schema.SegmentDimensionFilter; + metricFilter?: Analyticsreporting.Schema.SegmentMetricFilter; + not?: boolean; + } + export interface SegmentMetricFilter { + comparisonValue?: string; + maxComparisonValue?: string; + metricName?: string; + operator?: string; + scope?: string; + } + export interface SegmentSequenceStep { + matchType?: string; + orFiltersForSegment?: Analyticsreporting.Schema.OrFiltersForSegment[]; + } + export interface SequenceSegment { + firstStepShouldMatchFirstHit?: boolean; + segmentSequenceSteps?: Analyticsreporting.Schema.SegmentSequenceStep[]; + } + export interface SimpleSegment { + orFiltersForSegment?: Analyticsreporting.Schema.OrFiltersForSegment[]; + } + export interface TransactionData { + transactionId?: string; + transactionRevenue?: Number; + transactionShipping?: Number; + transactionTax?: Number; + } + export interface User { + type?: string; + userId?: string; + } + export interface UserActivitySession { + activities?: Analyticsreporting.Schema.Activity[]; + dataSource?: string; + deviceCategory?: string; + platform?: string; + sessionDate?: string; + sessionId?: string; + } + } + } + export interface Analyticsreporting { + Reports?: Analyticsreporting.Collection.ReportsCollection; + UserActivity?: Analyticsreporting.Collection.UserActivityCollection; + // Create a new instance of Cohort + newCohort(): Analyticsreporting.Schema.Cohort; + // Create a new instance of CohortGroup + newCohortGroup(): Analyticsreporting.Schema.CohortGroup; + // Create a new instance of DateRange + newDateRange(): Analyticsreporting.Schema.DateRange; + // Create a new instance of Dimension + newDimension(): Analyticsreporting.Schema.Dimension; + // Create a new instance of DimensionFilter + newDimensionFilter(): Analyticsreporting.Schema.DimensionFilter; + // Create a new instance of DimensionFilterClause + newDimensionFilterClause(): Analyticsreporting.Schema.DimensionFilterClause; + // Create a new instance of DynamicSegment + newDynamicSegment(): Analyticsreporting.Schema.DynamicSegment; + // Create a new instance of GetReportsRequest + newGetReportsRequest(): Analyticsreporting.Schema.GetReportsRequest; + // Create a new instance of Metric + newMetric(): Analyticsreporting.Schema.Metric; + // Create a new instance of MetricFilter + newMetricFilter(): Analyticsreporting.Schema.MetricFilter; + // Create a new instance of MetricFilterClause + newMetricFilterClause(): Analyticsreporting.Schema.MetricFilterClause; + // Create a new instance of OrFiltersForSegment + newOrFiltersForSegment(): Analyticsreporting.Schema.OrFiltersForSegment; + // Create a new instance of OrderBy + newOrderBy(): Analyticsreporting.Schema.OrderBy; + // Create a new instance of Pivot + newPivot(): Analyticsreporting.Schema.Pivot; + // Create a new instance of ReportRequest + newReportRequest(): Analyticsreporting.Schema.ReportRequest; + // Create a new instance of SearchUserActivityRequest + newSearchUserActivityRequest(): Analyticsreporting.Schema.SearchUserActivityRequest; + // Create a new instance of Segment + newSegment(): Analyticsreporting.Schema.Segment; + // Create a new instance of SegmentDefinition + newSegmentDefinition(): Analyticsreporting.Schema.SegmentDefinition; + // Create a new instance of SegmentDimensionFilter + newSegmentDimensionFilter(): Analyticsreporting.Schema.SegmentDimensionFilter; + // Create a new instance of SegmentFilter + newSegmentFilter(): Analyticsreporting.Schema.SegmentFilter; + // Create a new instance of SegmentFilterClause + newSegmentFilterClause(): Analyticsreporting.Schema.SegmentFilterClause; + // Create a new instance of SegmentMetricFilter + newSegmentMetricFilter(): Analyticsreporting.Schema.SegmentMetricFilter; + // Create a new instance of SegmentSequenceStep + newSegmentSequenceStep(): Analyticsreporting.Schema.SegmentSequenceStep; + // Create a new instance of SequenceSegment + newSequenceSegment(): Analyticsreporting.Schema.SequenceSegment; + // Create a new instance of SimpleSegment + newSimpleSegment(): Analyticsreporting.Schema.SimpleSegment; + // Create a new instance of User + newUser(): Analyticsreporting.Schema.User; + } +} + +declare var Analyticsreporting: GoogleAppsScript.Analyticsreporting; diff --git a/types/google-apps-script/apis/appsactivity/v1.d.ts b/types/google-apps-script/apis/appsactivity/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/appsactivity_v1.d.ts b/types/google-apps-script/apis/appsactivity_v1.d.ts new file mode 100644 index 0000000000..866a62873b --- /dev/null +++ b/types/google-apps-script/apis/appsactivity_v1.d.ts @@ -0,0 +1,84 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Appsactivity { + namespace Collection { + export interface ActivitiesCollection { + // Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. + list(): Appsactivity.Schema.ListActivitiesResponse; + // Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. + list(optionalArgs: object): Appsactivity.Schema.ListActivitiesResponse; + } + } + namespace Schema { + export interface Activity { + combinedEvent?: Appsactivity.Schema.Event; + singleEvents?: Appsactivity.Schema.Event[]; + } + export interface Event { + additionalEventTypes?: string[]; + eventTimeMillis?: string; + fromUserDeletion?: boolean; + move?: Appsactivity.Schema.Move; + permissionChanges?: Appsactivity.Schema.PermissionChange[]; + primaryEventType?: string; + rename?: Appsactivity.Schema.Rename; + target?: Appsactivity.Schema.Target; + user?: Appsactivity.Schema.User; + } + export interface ListActivitiesResponse { + activities?: Appsactivity.Schema.Activity[]; + nextPageToken?: string; + } + export interface Move { + addedParents?: Appsactivity.Schema.Parent[]; + removedParents?: Appsactivity.Schema.Parent[]; + } + export interface Parent { + id?: string; + isRoot?: boolean; + title?: string; + } + export interface Permission { + name?: string; + permissionId?: string; + role?: string; + type?: string; + user?: Appsactivity.Schema.User; + withLink?: boolean; + } + export interface PermissionChange { + addedPermissions?: Appsactivity.Schema.Permission[]; + removedPermissions?: Appsactivity.Schema.Permission[]; + } + export interface Photo { + url?: string; + } + export interface Rename { + newTitle?: string; + oldTitle?: string; + } + export interface Target { + id?: string; + mimeType?: string; + name?: string; + } + export interface User { + isDeleted?: boolean; + isMe?: boolean; + name?: string; + permissionId?: string; + photo?: Appsactivity.Schema.Photo; + } + } + } + export interface Appsactivity { + Activities?: Appsactivity.Collection.ActivitiesCollection; + } +} + +declare var Appsactivity: GoogleAppsScript.Appsactivity; diff --git a/types/google-apps-script/apis/bigquery/v2.d.ts b/types/google-apps-script/apis/bigquery/v2.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/bigquery_v2.d.ts b/types/google-apps-script/apis/bigquery_v2.d.ts new file mode 100644 index 0000000000..d199f276e8 --- /dev/null +++ b/types/google-apps-script/apis/bigquery_v2.d.ts @@ -0,0 +1,799 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Bigquery { + namespace Collection { + export interface DatasetsCollection { + // Returns the dataset specified by datasetID. + get(projectId: string, datasetId: string): Bigquery.Schema.Dataset; + // Creates a new empty dataset. + insert(resource: Bigquery.Schema.Dataset, projectId: string): Bigquery.Schema.Dataset; + // Lists all datasets in the specified project to which you have been granted the READER dataset role. + list(projectId: string): Bigquery.Schema.DatasetList; + // Lists all datasets in the specified project to which you have been granted the READER dataset role. + list(projectId: string, optionalArgs: object): Bigquery.Schema.DatasetList; + // Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics. + patch(resource: Bigquery.Schema.Dataset, projectId: string, datasetId: string): Bigquery.Schema.Dataset; + // Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. + remove(projectId: string, datasetId: string): void; + // Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. + remove(projectId: string, datasetId: string, optionalArgs: object): void; + // Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. + update(resource: Bigquery.Schema.Dataset, projectId: string, datasetId: string): Bigquery.Schema.Dataset; + } + export interface JobsCollection { + // Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs. + cancel(projectId: string, jobId: string): Bigquery.Schema.JobCancelResponse; + // Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs. + cancel(projectId: string, jobId: string, optionalArgs: object): Bigquery.Schema.JobCancelResponse; + // Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. + get(projectId: string, jobId: string): Bigquery.Schema.Job; + // Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. + get(projectId: string, jobId: string, optionalArgs: object): Bigquery.Schema.Job; + // Retrieves the results of a query job. + getQueryResults(projectId: string, jobId: string): Bigquery.Schema.GetQueryResultsResponse; + // Retrieves the results of a query job. + getQueryResults(projectId: string, jobId: string, optionalArgs: object): Bigquery.Schema.GetQueryResultsResponse; + // Starts a new asynchronous job. Requires the Can View project role. + insert(resource: Bigquery.Schema.Job, projectId: string): Bigquery.Schema.Job; + // Starts a new asynchronous job. Requires the Can View project role. + insert(resource: Bigquery.Schema.Job, projectId: string, mediaData: any): Bigquery.Schema.Job; + // Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. + list(projectId: string): Bigquery.Schema.JobList; + // Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. + list(projectId: string, optionalArgs: object): Bigquery.Schema.JobList; + // Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. + query(resource: Bigquery.Schema.QueryRequest, projectId: string): Bigquery.Schema.QueryResponse; + } + export interface ProjectsCollection { + // Returns the email address of the service account for your project used for interactions with Google Cloud KMS. + getServiceAccount(projectId: string): Bigquery.Schema.GetServiceAccountResponse; + // Lists all projects to which you have been granted any project role. + list(): Bigquery.Schema.ProjectList; + // Lists all projects to which you have been granted any project role. + list(optionalArgs: object): Bigquery.Schema.ProjectList; + } + export interface TabledataCollection { + // Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role. + insertAll(resource: Bigquery.Schema.TableDataInsertAllRequest, projectId: string, datasetId: string, tableId: string): Bigquery.Schema.TableDataInsertAllResponse; + // Retrieves table data from a specified set of rows. Requires the READER dataset role. + list(projectId: string, datasetId: string, tableId: string): Bigquery.Schema.TableDataList; + // Retrieves table data from a specified set of rows. Requires the READER dataset role. + list(projectId: string, datasetId: string, tableId: string, optionalArgs: object): Bigquery.Schema.TableDataList; + } + export interface TablesCollection { + // Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. + get(projectId: string, datasetId: string, tableId: string): Bigquery.Schema.Table; + // Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. + get(projectId: string, datasetId: string, tableId: string, optionalArgs: object): Bigquery.Schema.Table; + // Creates a new, empty table in the dataset. + insert(resource: Bigquery.Schema.Table, projectId: string, datasetId: string): Bigquery.Schema.Table; + // Lists all tables in the specified dataset. Requires the READER dataset role. + list(projectId: string, datasetId: string): Bigquery.Schema.TableList; + // Lists all tables in the specified dataset. Requires the READER dataset role. + list(projectId: string, datasetId: string, optionalArgs: object): Bigquery.Schema.TableList; + // Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics. + patch(resource: Bigquery.Schema.Table, projectId: string, datasetId: string, tableId: string): Bigquery.Schema.Table; + // Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. + remove(projectId: string, datasetId: string, tableId: string): void; + // Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. + update(resource: Bigquery.Schema.Table, projectId: string, datasetId: string, tableId: string): Bigquery.Schema.Table; + } + } + namespace Schema { + export interface BigQueryModelTraining { + currentIteration?: number; + expectedTotalIterations?: string; + } + export interface BigtableColumn { + encoding?: string; + fieldName?: string; + onlyReadLatest?: boolean; + qualifierEncoded?: string; + qualifierString?: string; + type?: string; + } + export interface BigtableColumnFamily { + columns?: Bigquery.Schema.BigtableColumn[]; + encoding?: string; + familyId?: string; + onlyReadLatest?: boolean; + type?: string; + } + export interface BigtableOptions { + columnFamilies?: Bigquery.Schema.BigtableColumnFamily[]; + ignoreUnspecifiedColumnFamilies?: boolean; + readRowkeyAsString?: boolean; + } + export interface BqmlIterationResult { + durationMs?: string; + evalLoss?: Number; + index?: number; + learnRate?: Number; + trainingLoss?: Number; + } + export interface BqmlTrainingRun { + iterationResults?: Bigquery.Schema.BqmlIterationResult[]; + startTime?: string; + state?: string; + trainingOptions?: Bigquery.Schema.BqmlTrainingRunTrainingOptions; + } + export interface BqmlTrainingRunTrainingOptions { + earlyStop?: boolean; + l1Reg?: Number; + l2Reg?: Number; + learnRate?: Number; + learnRateStrategy?: string; + lineSearchInitLearnRate?: Number; + maxIteration?: string; + minRelProgress?: Number; + warmStart?: boolean; + } + export interface Clustering { + fields?: string[]; + } + export interface CsvOptions { + allowJaggedRows?: boolean; + allowQuotedNewlines?: boolean; + encoding?: string; + fieldDelimiter?: string; + quote?: string; + skipLeadingRows?: string; + } + export interface Dataset { + access?: Bigquery.Schema.DatasetAccess[]; + creationTime?: string; + datasetReference?: Bigquery.Schema.DatasetReference; + defaultPartitionExpirationMs?: string; + defaultTableExpirationMs?: string; + description?: string; + etag?: string; + friendlyName?: string; + id?: string; + kind?: string; + labels?: object; + lastModifiedTime?: string; + location?: string; + selfLink?: string; + } + export interface DatasetAccess { + domain?: string; + groupByEmail?: string; + iamMember?: string; + role?: string; + specialGroup?: string; + userByEmail?: string; + view?: Bigquery.Schema.TableReference; + } + export interface DatasetList { + datasets?: Bigquery.Schema.DatasetListDatasets[]; + etag?: string; + kind?: string; + nextPageToken?: string; + } + export interface DatasetListDatasets { + datasetReference?: Bigquery.Schema.DatasetReference; + friendlyName?: string; + id?: string; + kind?: string; + labels?: object; + location?: string; + } + export interface DatasetReference { + datasetId?: string; + projectId?: string; + } + export interface DestinationTableProperties { + description?: string; + friendlyName?: string; + labels?: object; + } + export interface EncryptionConfiguration { + kmsKeyName?: string; + } + export interface ErrorProto { + debugInfo?: string; + location?: string; + message?: string; + reason?: string; + } + export interface ExplainQueryStage { + completedParallelInputs?: string; + computeMsAvg?: string; + computeMsMax?: string; + computeRatioAvg?: Number; + computeRatioMax?: Number; + endMs?: string; + id?: string; + inputStages?: string[]; + name?: string; + parallelInputs?: string; + readMsAvg?: string; + readMsMax?: string; + readRatioAvg?: Number; + readRatioMax?: Number; + recordsRead?: string; + recordsWritten?: string; + shuffleOutputBytes?: string; + shuffleOutputBytesSpilled?: string; + startMs?: string; + status?: string; + steps?: Bigquery.Schema.ExplainQueryStep[]; + waitMsAvg?: string; + waitMsMax?: string; + waitRatioAvg?: Number; + waitRatioMax?: Number; + writeMsAvg?: string; + writeMsMax?: string; + writeRatioAvg?: Number; + writeRatioMax?: Number; + } + export interface ExplainQueryStep { + kind?: string; + substeps?: string[]; + } + export interface ExternalDataConfiguration { + autodetect?: boolean; + bigtableOptions?: Bigquery.Schema.BigtableOptions; + compression?: string; + csvOptions?: Bigquery.Schema.CsvOptions; + googleSheetsOptions?: Bigquery.Schema.GoogleSheetsOptions; + hivePartitioningMode?: string; + ignoreUnknownValues?: boolean; + maxBadRecords?: number; + schema?: Bigquery.Schema.TableSchema; + sourceFormat?: string; + sourceUris?: string[]; + } + export interface GetQueryResultsResponse { + cacheHit?: boolean; + errors?: Bigquery.Schema.ErrorProto[]; + etag?: string; + jobComplete?: boolean; + jobReference?: Bigquery.Schema.JobReference; + kind?: string; + numDmlAffectedRows?: string; + pageToken?: string; + rows?: Bigquery.Schema.TableRow[]; + schema?: Bigquery.Schema.TableSchema; + totalBytesProcessed?: string; + totalRows?: string; + } + export interface GetServiceAccountResponse { + email?: string; + kind?: string; + } + export interface GoogleSheetsOptions { + range?: string; + skipLeadingRows?: string; + } + export interface Job { + configuration?: Bigquery.Schema.JobConfiguration; + etag?: string; + id?: string; + jobReference?: Bigquery.Schema.JobReference; + kind?: string; + selfLink?: string; + statistics?: Bigquery.Schema.JobStatistics; + status?: Bigquery.Schema.JobStatus; + user_email?: string; + } + export interface JobCancelResponse { + job?: Bigquery.Schema.Job; + kind?: string; + } + export interface JobConfiguration { + copy?: Bigquery.Schema.JobConfigurationTableCopy; + dryRun?: boolean; + extract?: Bigquery.Schema.JobConfigurationExtract; + jobTimeoutMs?: string; + jobType?: string; + labels?: object; + load?: Bigquery.Schema.JobConfigurationLoad; + query?: Bigquery.Schema.JobConfigurationQuery; + } + export interface JobConfigurationExtract { + compression?: string; + destinationFormat?: string; + destinationUri?: string; + destinationUris?: string[]; + fieldDelimiter?: string; + printHeader?: boolean; + sourceTable?: Bigquery.Schema.TableReference; + } + export interface JobConfigurationLoad { + allowJaggedRows?: boolean; + allowQuotedNewlines?: boolean; + autodetect?: boolean; + clustering?: Bigquery.Schema.Clustering; + createDisposition?: string; + destinationEncryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; + destinationTable?: Bigquery.Schema.TableReference; + destinationTableProperties?: Bigquery.Schema.DestinationTableProperties; + encoding?: string; + fieldDelimiter?: string; + hivePartitioningMode?: string; + ignoreUnknownValues?: boolean; + maxBadRecords?: number; + nullMarker?: string; + projectionFields?: string[]; + quote?: string; + rangePartitioning?: Bigquery.Schema.RangePartitioning; + schema?: Bigquery.Schema.TableSchema; + schemaInline?: string; + schemaInlineFormat?: string; + schemaUpdateOptions?: string[]; + skipLeadingRows?: number; + sourceFormat?: string; + sourceUris?: string[]; + timePartitioning?: Bigquery.Schema.TimePartitioning; + useAvroLogicalTypes?: boolean; + writeDisposition?: string; + } + export interface JobConfigurationQuery { + allowLargeResults?: boolean; + clustering?: Bigquery.Schema.Clustering; + createDisposition?: string; + defaultDataset?: Bigquery.Schema.DatasetReference; + destinationEncryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; + destinationTable?: Bigquery.Schema.TableReference; + flattenResults?: boolean; + maximumBillingTier?: number; + maximumBytesBilled?: string; + parameterMode?: string; + preserveNulls?: boolean; + priority?: string; + query?: string; + queryParameters?: Bigquery.Schema.QueryParameter[]; + rangePartitioning?: Bigquery.Schema.RangePartitioning; + schemaUpdateOptions?: string[]; + tableDefinitions?: object; + timePartitioning?: Bigquery.Schema.TimePartitioning; + useLegacySql?: boolean; + useQueryCache?: boolean; + userDefinedFunctionResources?: Bigquery.Schema.UserDefinedFunctionResource[]; + writeDisposition?: string; + } + export interface JobConfigurationTableCopy { + createDisposition?: string; + destinationEncryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; + destinationTable?: Bigquery.Schema.TableReference; + sourceTable?: Bigquery.Schema.TableReference; + sourceTables?: Bigquery.Schema.TableReference[]; + writeDisposition?: string; + } + export interface JobList { + etag?: string; + jobs?: Bigquery.Schema.JobListJobs[]; + kind?: string; + nextPageToken?: string; + } + export interface JobListJobs { + configuration?: Bigquery.Schema.JobConfiguration; + errorResult?: Bigquery.Schema.ErrorProto; + id?: string; + jobReference?: Bigquery.Schema.JobReference; + kind?: string; + state?: string; + statistics?: Bigquery.Schema.JobStatistics; + status?: Bigquery.Schema.JobStatus; + user_email?: string; + } + export interface JobReference { + jobId?: string; + location?: string; + projectId?: string; + } + export interface JobStatistics { + completionRatio?: Number; + creationTime?: string; + endTime?: string; + extract?: Bigquery.Schema.JobStatistics4; + load?: Bigquery.Schema.JobStatistics3; + numChildJobs?: string; + parentJobId?: string; + query?: Bigquery.Schema.JobStatistics2; + quotaDeferments?: string[]; + reservationUsage?: Bigquery.Schema.JobStatisticsReservationUsage[]; + startTime?: string; + totalBytesProcessed?: string; + totalSlotMs?: string; + } + export interface JobStatistics2 { + billingTier?: number; + cacheHit?: boolean; + ddlOperationPerformed?: string; + ddlTargetRoutine?: Bigquery.Schema.RoutineReference; + ddlTargetTable?: Bigquery.Schema.TableReference; + estimatedBytesProcessed?: string; + modelTraining?: Bigquery.Schema.BigQueryModelTraining; + modelTrainingCurrentIteration?: number; + modelTrainingExpectedTotalIteration?: string; + numDmlAffectedRows?: string; + queryPlan?: Bigquery.Schema.ExplainQueryStage[]; + referencedTables?: Bigquery.Schema.TableReference[]; + reservationUsage?: Bigquery.Schema.JobStatistics2ReservationUsage[]; + schema?: Bigquery.Schema.TableSchema; + statementType?: string; + timeline?: Bigquery.Schema.QueryTimelineSample[]; + totalBytesBilled?: string; + totalBytesProcessed?: string; + totalBytesProcessedAccuracy?: string; + totalPartitionsProcessed?: string; + totalSlotMs?: string; + undeclaredQueryParameters?: Bigquery.Schema.QueryParameter[]; + } + export interface JobStatistics2ReservationUsage { + name?: string; + slotMs?: string; + } + export interface JobStatistics3 { + badRecords?: string; + inputFileBytes?: string; + inputFiles?: string; + outputBytes?: string; + outputRows?: string; + } + export interface JobStatistics4 { + destinationUriFileCounts?: string[]; + inputBytes?: string; + } + export interface JobStatisticsReservationUsage { + name?: string; + slotMs?: string; + } + export interface JobStatus { + errorResult?: Bigquery.Schema.ErrorProto; + errors?: Bigquery.Schema.ErrorProto[]; + state?: string; + } + export interface MaterializedViewDefinition { + lastRefreshTime?: string; + query?: string; + } + export interface ModelDefinition { + modelOptions?: Bigquery.Schema.ModelDefinitionModelOptions; + trainingRuns?: Bigquery.Schema.BqmlTrainingRun[]; + } + export interface ModelDefinitionModelOptions { + labels?: string[]; + lossType?: string; + modelType?: string; + } + export interface ProjectList { + etag?: string; + kind?: string; + nextPageToken?: string; + projects?: Bigquery.Schema.ProjectListProjects[]; + totalItems?: number; + } + export interface ProjectListProjects { + friendlyName?: string; + id?: string; + kind?: string; + numericId?: string; + projectReference?: Bigquery.Schema.ProjectReference; + } + export interface ProjectReference { + projectId?: string; + } + export interface QueryParameter { + name?: string; + parameterType?: Bigquery.Schema.QueryParameterType; + parameterValue?: Bigquery.Schema.QueryParameterValue; + } + export interface QueryParameterType { + arrayType?: Bigquery.Schema.QueryParameterType; + structTypes?: Bigquery.Schema.QueryParameterTypeStructTypes[]; + type?: string; + } + export interface QueryParameterTypeStructTypes { + description?: string; + name?: string; + type?: Bigquery.Schema.QueryParameterType; + } + export interface QueryParameterValue { + arrayValues?: Bigquery.Schema.QueryParameterValue[]; + structValues?: object; + value?: string; + } + export interface QueryRequest { + defaultDataset?: Bigquery.Schema.DatasetReference; + dryRun?: boolean; + kind?: string; + location?: string; + maxResults?: number; + parameterMode?: string; + preserveNulls?: boolean; + query?: string; + queryParameters?: Bigquery.Schema.QueryParameter[]; + timeoutMs?: number; + useLegacySql?: boolean; + useQueryCache?: boolean; + } + export interface QueryResponse { + cacheHit?: boolean; + errors?: Bigquery.Schema.ErrorProto[]; + jobComplete?: boolean; + jobReference?: Bigquery.Schema.JobReference; + kind?: string; + numDmlAffectedRows?: string; + pageToken?: string; + rows?: Bigquery.Schema.TableRow[]; + schema?: Bigquery.Schema.TableSchema; + totalBytesProcessed?: string; + totalRows?: string; + } + export interface QueryTimelineSample { + activeUnits?: string; + completedUnits?: string; + elapsedMs?: string; + pendingUnits?: string; + totalSlotMs?: string; + } + export interface RangePartitioning { + field?: string; + range?: Bigquery.Schema.RangePartitioningRange; + } + export interface RangePartitioningRange { + end?: string; + interval?: string; + start?: string; + } + export interface RoutineReference { + datasetId?: string; + projectId?: string; + routineId?: string; + } + export interface Streamingbuffer { + estimatedBytes?: string; + estimatedRows?: string; + oldestEntryTime?: string; + } + export interface Table { + clustering?: Bigquery.Schema.Clustering; + creationTime?: string; + description?: string; + encryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; + etag?: string; + expirationTime?: string; + externalDataConfiguration?: Bigquery.Schema.ExternalDataConfiguration; + friendlyName?: string; + id?: string; + kind?: string; + labels?: object; + lastModifiedTime?: string; + location?: string; + materializedView?: Bigquery.Schema.MaterializedViewDefinition; + model?: Bigquery.Schema.ModelDefinition; + numBytes?: string; + numLongTermBytes?: string; + numPhysicalBytes?: string; + numRows?: string; + rangePartitioning?: Bigquery.Schema.RangePartitioning; + requirePartitionFilter?: boolean; + schema?: Bigquery.Schema.TableSchema; + selfLink?: string; + streamingBuffer?: Bigquery.Schema.Streamingbuffer; + tableReference?: Bigquery.Schema.TableReference; + timePartitioning?: Bigquery.Schema.TimePartitioning; + type?: string; + view?: Bigquery.Schema.ViewDefinition; + } + export interface TableCell { + v?: object; + } + export interface TableDataInsertAllRequest { + ignoreUnknownValues?: boolean; + kind?: string; + rows?: Bigquery.Schema.TableDataInsertAllRequestRows[]; + skipInvalidRows?: boolean; + templateSuffix?: string; + } + export interface TableDataInsertAllRequestRows { + insertId?: string; + json?: object; + } + export interface TableDataInsertAllResponse { + insertErrors?: Bigquery.Schema.TableDataInsertAllResponseInsertErrors[]; + kind?: string; + } + export interface TableDataInsertAllResponseInsertErrors { + errors?: Bigquery.Schema.ErrorProto[]; + index?: number; + } + export interface TableDataList { + etag?: string; + kind?: string; + pageToken?: string; + rows?: Bigquery.Schema.TableRow[]; + totalRows?: string; + } + export interface TableFieldSchema { + categories?: Bigquery.Schema.TableFieldSchemaCategories; + description?: string; + fields?: Bigquery.Schema.TableFieldSchema[]; + mode?: string; + name?: string; + type?: string; + } + export interface TableFieldSchemaCategories { + names?: string[]; + } + export interface TableList { + etag?: string; + kind?: string; + nextPageToken?: string; + tables?: Bigquery.Schema.TableListTables[]; + totalItems?: number; + } + export interface TableListTables { + clustering?: Bigquery.Schema.Clustering; + creationTime?: string; + expirationTime?: string; + friendlyName?: string; + id?: string; + kind?: string; + labels?: object; + tableReference?: Bigquery.Schema.TableReference; + timePartitioning?: Bigquery.Schema.TimePartitioning; + type?: string; + view?: Bigquery.Schema.TableListTablesView; + } + export interface TableListTablesView { + useLegacySql?: boolean; + } + export interface TableReference { + datasetId?: string; + projectId?: string; + tableId?: string; + } + export interface TableRow { + f?: Bigquery.Schema.TableCell[]; + } + export interface TableSchema { + fields?: Bigquery.Schema.TableFieldSchema[]; + } + export interface TimePartitioning { + expirationMs?: string; + field?: string; + requirePartitionFilter?: boolean; + type?: string; + } + export interface UserDefinedFunctionResource { + inlineCode?: string; + resourceUri?: string; + } + export interface ViewDefinition { + query?: string; + useLegacySql?: boolean; + userDefinedFunctionResources?: Bigquery.Schema.UserDefinedFunctionResource[]; + } + } + } + export interface Bigquery { + Datasets?: Bigquery.Collection.DatasetsCollection; + Jobs?: Bigquery.Collection.JobsCollection; + Projects?: Bigquery.Collection.ProjectsCollection; + Tabledata?: Bigquery.Collection.TabledataCollection; + Tables?: Bigquery.Collection.TablesCollection; + // Create a new instance of BigQueryModelTraining + newBigQueryModelTraining(): Bigquery.Schema.BigQueryModelTraining; + // Create a new instance of BigtableColumn + newBigtableColumn(): Bigquery.Schema.BigtableColumn; + // Create a new instance of BigtableColumnFamily + newBigtableColumnFamily(): Bigquery.Schema.BigtableColumnFamily; + // Create a new instance of BigtableOptions + newBigtableOptions(): Bigquery.Schema.BigtableOptions; + // Create a new instance of BqmlIterationResult + newBqmlIterationResult(): Bigquery.Schema.BqmlIterationResult; + // Create a new instance of BqmlTrainingRun + newBqmlTrainingRun(): Bigquery.Schema.BqmlTrainingRun; + // Create a new instance of BqmlTrainingRunTrainingOptions + newBqmlTrainingRunTrainingOptions(): Bigquery.Schema.BqmlTrainingRunTrainingOptions; + // Create a new instance of Clustering + newClustering(): Bigquery.Schema.Clustering; + // Create a new instance of CsvOptions + newCsvOptions(): Bigquery.Schema.CsvOptions; + // Create a new instance of Dataset + newDataset(): Bigquery.Schema.Dataset; + // Create a new instance of DatasetAccess + newDatasetAccess(): Bigquery.Schema.DatasetAccess; + // Create a new instance of DatasetReference + newDatasetReference(): Bigquery.Schema.DatasetReference; + // Create a new instance of DestinationTableProperties + newDestinationTableProperties(): Bigquery.Schema.DestinationTableProperties; + // Create a new instance of EncryptionConfiguration + newEncryptionConfiguration(): Bigquery.Schema.EncryptionConfiguration; + // Create a new instance of ErrorProto + newErrorProto(): Bigquery.Schema.ErrorProto; + // Create a new instance of ExplainQueryStage + newExplainQueryStage(): Bigquery.Schema.ExplainQueryStage; + // Create a new instance of ExplainQueryStep + newExplainQueryStep(): Bigquery.Schema.ExplainQueryStep; + // Create a new instance of ExternalDataConfiguration + newExternalDataConfiguration(): Bigquery.Schema.ExternalDataConfiguration; + // Create a new instance of GoogleSheetsOptions + newGoogleSheetsOptions(): Bigquery.Schema.GoogleSheetsOptions; + // Create a new instance of Job + newJob(): Bigquery.Schema.Job; + // Create a new instance of JobConfiguration + newJobConfiguration(): Bigquery.Schema.JobConfiguration; + // Create a new instance of JobConfigurationExtract + newJobConfigurationExtract(): Bigquery.Schema.JobConfigurationExtract; + // Create a new instance of JobConfigurationLoad + newJobConfigurationLoad(): Bigquery.Schema.JobConfigurationLoad; + // Create a new instance of JobConfigurationQuery + newJobConfigurationQuery(): Bigquery.Schema.JobConfigurationQuery; + // Create a new instance of JobConfigurationTableCopy + newJobConfigurationTableCopy(): Bigquery.Schema.JobConfigurationTableCopy; + // Create a new instance of JobReference + newJobReference(): Bigquery.Schema.JobReference; + // Create a new instance of JobStatistics + newJobStatistics(): Bigquery.Schema.JobStatistics; + // Create a new instance of JobStatistics2 + newJobStatistics2(): Bigquery.Schema.JobStatistics2; + // Create a new instance of JobStatistics2ReservationUsage + newJobStatistics2ReservationUsage(): Bigquery.Schema.JobStatistics2ReservationUsage; + // Create a new instance of JobStatistics3 + newJobStatistics3(): Bigquery.Schema.JobStatistics3; + // Create a new instance of JobStatistics4 + newJobStatistics4(): Bigquery.Schema.JobStatistics4; + // Create a new instance of JobStatisticsReservationUsage + newJobStatisticsReservationUsage(): Bigquery.Schema.JobStatisticsReservationUsage; + // Create a new instance of JobStatus + newJobStatus(): Bigquery.Schema.JobStatus; + // Create a new instance of MaterializedViewDefinition + newMaterializedViewDefinition(): Bigquery.Schema.MaterializedViewDefinition; + // Create a new instance of ModelDefinition + newModelDefinition(): Bigquery.Schema.ModelDefinition; + // Create a new instance of ModelDefinitionModelOptions + newModelDefinitionModelOptions(): Bigquery.Schema.ModelDefinitionModelOptions; + // Create a new instance of QueryParameter + newQueryParameter(): Bigquery.Schema.QueryParameter; + // Create a new instance of QueryParameterType + newQueryParameterType(): Bigquery.Schema.QueryParameterType; + // Create a new instance of QueryParameterTypeStructTypes + newQueryParameterTypeStructTypes(): Bigquery.Schema.QueryParameterTypeStructTypes; + // Create a new instance of QueryParameterValue + newQueryParameterValue(): Bigquery.Schema.QueryParameterValue; + // Create a new instance of QueryRequest + newQueryRequest(): Bigquery.Schema.QueryRequest; + // Create a new instance of QueryTimelineSample + newQueryTimelineSample(): Bigquery.Schema.QueryTimelineSample; + // Create a new instance of RangePartitioning + newRangePartitioning(): Bigquery.Schema.RangePartitioning; + // Create a new instance of RangePartitioningRange + newRangePartitioningRange(): Bigquery.Schema.RangePartitioningRange; + // Create a new instance of RoutineReference + newRoutineReference(): Bigquery.Schema.RoutineReference; + // Create a new instance of Streamingbuffer + newStreamingbuffer(): Bigquery.Schema.Streamingbuffer; + // Create a new instance of Table + newTable(): Bigquery.Schema.Table; + // Create a new instance of TableDataInsertAllRequest + newTableDataInsertAllRequest(): Bigquery.Schema.TableDataInsertAllRequest; + // Create a new instance of TableDataInsertAllRequestRows + newTableDataInsertAllRequestRows(): Bigquery.Schema.TableDataInsertAllRequestRows; + // Create a new instance of TableFieldSchema + newTableFieldSchema(): Bigquery.Schema.TableFieldSchema; + // Create a new instance of TableFieldSchemaCategories + newTableFieldSchemaCategories(): Bigquery.Schema.TableFieldSchemaCategories; + // Create a new instance of TableReference + newTableReference(): Bigquery.Schema.TableReference; + // Create a new instance of TableSchema + newTableSchema(): Bigquery.Schema.TableSchema; + // Create a new instance of TimePartitioning + newTimePartitioning(): Bigquery.Schema.TimePartitioning; + // Create a new instance of UserDefinedFunctionResource + newUserDefinedFunctionResource(): Bigquery.Schema.UserDefinedFunctionResource; + // Create a new instance of ViewDefinition + newViewDefinition(): Bigquery.Schema.ViewDefinition; + } +} + +declare var Bigquery: GoogleAppsScript.Bigquery; diff --git a/types/google-apps-script/apis/calendar/v3.d.ts b/types/google-apps-script/apis/calendar_v3.d.ts similarity index 68% rename from types/google-apps-script/apis/calendar/v3.d.ts rename to types/google-apps-script/apis/calendar_v3.d.ts index 2d0d99af94..12b2676eec 100644 --- a/types/google-apps-script/apis/calendar/v3.d.ts +++ b/types/google-apps-script/apis/calendar_v3.d.ts @@ -1,90 +1,91 @@ -// Type definitions for Google Apps Script 2019-03-22 +// Type definitions for Google Apps Script 2019-03-25 // Project: https://developers.google.com/apps-script/ -// Definitions by: mtgto +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Calendar_v3 { + namespace Calendar { namespace Collection { export interface AclCollection { // Returns an access control rule. - get(calendarId: string, ruleId: string): Calendar_v3.Schema.AclRule; + get(calendarId: string, ruleId: string): Calendar.Schema.AclRule; // Returns an access control rule. - get(calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + get(calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Creates an access control rule. - insert(resource: Schema.AclRule, calendarId: string): Calendar_v3.Schema.AclRule; + insert(resource: Schema.AclRule, calendarId: string): Calendar.Schema.AclRule; // Creates an access control rule. - insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object): Calendar_v3.Schema.AclRule; + insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object): Calendar.Schema.AclRule; // Creates an access control rule. - insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Returns the rules in the access control list for the calendar. - list(calendarId: string): Calendar_v3.Schema.Acl; + list(calendarId: string): Calendar.Schema.Acl; // Returns the rules in the access control list for the calendar. - list(calendarId: string, optionalArgs: object): Calendar_v3.Schema.Acl; + list(calendarId: string, optionalArgs: object): Calendar.Schema.Acl; // Returns the rules in the access control list for the calendar. - list(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Acl; + list(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Acl; // Updates an access control rule. This method supports patch semantics. - patch(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar_v3.Schema.AclRule; + patch(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar.Schema.AclRule; // Updates an access control rule. This method supports patch semantics. - patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar_v3.Schema.AclRule; + patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar.Schema.AclRule; // Updates an access control rule. This method supports patch semantics. - patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Deletes an access control rule. remove(calendarId: string, ruleId: string): void; // Deletes an access control rule. remove(calendarId: string, ruleId: string, optionalArgs: object, headers: object): void; // Updates an access control rule. - update(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar_v3.Schema.AclRule; + update(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar.Schema.AclRule; // Updates an access control rule. - update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar_v3.Schema.AclRule; + update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar.Schema.AclRule; // Updates an access control rule. - update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Watch for changes to ACL resources. - watch(resource: Schema.Channel, calendarId: string): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string): Calendar.Schema.Channel; // Watch for changes to ACL resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to ACL resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Channel; } export interface CalendarListCollection { // Returns a calendar from the user's calendar list. - get(calendarId: string): Calendar_v3.Schema.CalendarListEntry; + get(calendarId: string): Calendar.Schema.CalendarListEntry; // Returns a calendar from the user's calendar list. - get(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + get(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Inserts an existing calendar into the user's calendar list. - insert(resource: Schema.CalendarListEntry): Calendar_v3.Schema.CalendarListEntry; + insert(resource: Schema.CalendarListEntry): Calendar.Schema.CalendarListEntry; // Inserts an existing calendar into the user's calendar list. - insert(resource: Schema.CalendarListEntry, optionalArgs: object): Calendar_v3.Schema.CalendarListEntry; + insert(resource: Schema.CalendarListEntry, optionalArgs: object): Calendar.Schema.CalendarListEntry; // Inserts an existing calendar into the user's calendar list. - insert(resource: Schema.CalendarListEntry, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + insert(resource: Schema.CalendarListEntry, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Returns the calendars on the user's calendar list. - list(): Calendar_v3.Schema.CalendarList; + list(): Calendar.Schema.CalendarList; // Returns the calendars on the user's calendar list. - list(optionalArgs: object): Calendar_v3.Schema.CalendarList; + list(optionalArgs: object): Calendar.Schema.CalendarList; // Returns the calendars on the user's calendar list. - list(optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarList; + list(optionalArgs: object, headers: object): Calendar.Schema.CalendarList; // Updates an existing calendar on the user's calendar list. This method supports patch semantics. - patch(resource: Schema.CalendarListEntry, calendarId: string): Calendar_v3.Schema.CalendarListEntry; + patch(resource: Schema.CalendarListEntry, calendarId: string): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. This method supports patch semantics. - patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar_v3.Schema.CalendarListEntry; + patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. This method supports patch semantics. - patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Removes a calendar from the user's calendar list. remove(calendarId: string): void; // Removes a calendar from the user's calendar list. remove(calendarId: string, optionalArgs: object, headers: object): void; // Updates an existing calendar on the user's calendar list. - update(resource: Schema.CalendarListEntry, calendarId: string): Calendar_v3.Schema.CalendarListEntry; + update(resource: Schema.CalendarListEntry, calendarId: string): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. - update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar_v3.Schema.CalendarListEntry; + update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. - update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Watch for changes to CalendarList resources. - watch(resource: Schema.Channel): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel): Calendar.Schema.Channel; // Watch for changes to CalendarList resources. - watch(resource: Schema.Channel, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to CalendarList resources. - watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar.Schema.Channel; } export interface CalendarsCollection { // Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. @@ -92,25 +93,25 @@ declare namespace GoogleAppsScript { // Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. clear(calendarId: string, optionalArgs: object, headers: object): void; // Returns metadata for a calendar. - get(calendarId: string): Calendar_v3.Schema.Calendar; + get(calendarId: string): Calendar.Schema.Calendar; // Returns metadata for a calendar. - get(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + get(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Calendar; // Creates a secondary calendar. - insert(resource: Schema.Calendar): Calendar_v3.Schema.Calendar; + insert(resource: Schema.Calendar): Calendar.Schema.Calendar; // Creates a secondary calendar. - insert(resource: Schema.Calendar, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + insert(resource: Schema.Calendar, optionalArgs: object, headers: object): Calendar.Schema.Calendar; // Updates metadata for a calendar. This method supports patch semantics. - patch(resource: Schema.Calendar, calendarId: string): Calendar_v3.Schema.Calendar; + patch(resource: Schema.Calendar, calendarId: string): Calendar.Schema.Calendar; // Updates metadata for a calendar. This method supports patch semantics. - patch(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + patch(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Calendar; // Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. remove(calendarId: string): void; // Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. remove(calendarId: string, optionalArgs: object, headers: object): void; // Updates metadata for a calendar. - update(resource: Schema.Calendar, calendarId: string): Calendar_v3.Schema.Calendar; + update(resource: Schema.Calendar, calendarId: string): Calendar.Schema.Calendar; // Updates metadata for a calendar. - update(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + update(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Calendar; } export interface ChannelsCollection { // Stop watching resources through this channel @@ -120,59 +121,59 @@ declare namespace GoogleAppsScript { } export interface ColorsCollection { // Returns the color definitions for calendars and events. - get(): Calendar_v3.Schema.Colors; + get(): Calendar.Schema.Colors; // Returns the color definitions for calendars and events. - get(optionalArgs: object, headers: object): Calendar_v3.Schema.Colors; + get(optionalArgs: object, headers: object): Calendar.Schema.Colors; } export interface EventsCollection { // Returns an event. - get(calendarId: string, eventId: string): Calendar_v3.Schema.Event; + get(calendarId: string, eventId: string): Calendar.Schema.Event; // Returns an event. - get(calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Event; + get(calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Event; // Returns an event. - get(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + get(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Imports an event. This operation is used to add a private copy of an existing event to a calendar. - import(resource: Schema.Event, calendarId: string): Calendar_v3.Schema.Event; + import(resource: Schema.Event, calendarId: string): Calendar.Schema.Event; // Imports an event. This operation is used to add a private copy of an existing event to a calendar. - import(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Event; + import(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar.Schema.Event; // Imports an event. This operation is used to add a private copy of an existing event to a calendar. - import(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + import(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Creates an event. - insert(resource: Schema.Event, calendarId: string): Calendar_v3.Schema.Event; + insert(resource: Schema.Event, calendarId: string): Calendar.Schema.Event; // Creates an event. - insert(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Event; + insert(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar.Schema.Event; // Creates an event. - insert(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + insert(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Returns instances of the specified recurring event. - instances(calendarId: string, eventId: string): Calendar_v3.Schema.Events; + instances(calendarId: string, eventId: string): Calendar.Schema.Events; // Returns instances of the specified recurring event. - instances(calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Events; + instances(calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Events; // Returns instances of the specified recurring event. - instances(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Events; + instances(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Events; // Returns events on the specified calendar. - list(calendarId: string): Calendar_v3.Schema.Events; + list(calendarId: string): Calendar.Schema.Events; // Returns events on the specified calendar. - list(calendarId: string, optionalArgs: object): Calendar_v3.Schema.Events; + list(calendarId: string, optionalArgs: object): Calendar.Schema.Events; // Returns events on the specified calendar. - list(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Events; + list(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Events; // Moves an event to another calendar, i.e. changes an event's organizer. - move(calendarId: string, eventId: string, destination: string): Calendar_v3.Schema.Event; + move(calendarId: string, eventId: string, destination: string): Calendar.Schema.Event; // Moves an event to another calendar, i.e. changes an event's organizer. - move(calendarId: string, eventId: string, destination: string, optionalArgs: object): Calendar_v3.Schema.Event; + move(calendarId: string, eventId: string, destination: string, optionalArgs: object): Calendar.Schema.Event; // Moves an event to another calendar, i.e. changes an event's organizer. - move(calendarId: string, eventId: string, destination: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + move(calendarId: string, eventId: string, destination: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Updates an event. This method supports patch semantics. - patch(resource: Schema.Event, calendarId: string, eventId: string): Calendar_v3.Schema.Event; + patch(resource: Schema.Event, calendarId: string, eventId: string): Calendar.Schema.Event; // Updates an event. This method supports patch semantics. - patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Event; + patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Event; // Updates an event. This method supports patch semantics. - patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Creates an event based on a simple text string. - quickAdd(calendarId: string, text: string): Calendar_v3.Schema.Event; + quickAdd(calendarId: string, text: string): Calendar.Schema.Event; // Creates an event based on a simple text string. - quickAdd(calendarId: string, text: string, optionalArgs: object): Calendar_v3.Schema.Event; + quickAdd(calendarId: string, text: string, optionalArgs: object): Calendar.Schema.Event; // Creates an event based on a simple text string. - quickAdd(calendarId: string, text: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + quickAdd(calendarId: string, text: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Deletes an event. remove(calendarId: string, eventId: string): void; // Deletes an event. @@ -180,47 +181,47 @@ declare namespace GoogleAppsScript { // Deletes an event. remove(calendarId: string, eventId: string, optionalArgs: object, headers: object): void; // Updates an event. - update(resource: Schema.Event, calendarId: string, eventId: string): Calendar_v3.Schema.Event; + update(resource: Schema.Event, calendarId: string, eventId: string): Calendar.Schema.Event; // Updates an event. - update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Event; + update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Event; // Updates an event. - update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Watch for changes to Events resources. - watch(resource: Schema.Channel, calendarId: string): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string): Calendar.Schema.Channel; // Watch for changes to Events resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to Events resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Channel; } export interface FreebusyCollection { // Returns free/busy information for a set of calendars. - query(resource: Schema.FreeBusyRequest): Calendar_v3.Schema.FreeBusyResponse; + query(resource: Schema.FreeBusyRequest): Calendar.Schema.FreeBusyResponse; // Returns free/busy information for a set of calendars. - query(resource: Schema.FreeBusyRequest, optionalArgs: object, headers: object): Calendar_v3.Schema.FreeBusyResponse; + query(resource: Schema.FreeBusyRequest, optionalArgs: object, headers: object): Calendar.Schema.FreeBusyResponse; } export interface SettingsCollection { // Returns a single user setting. - get(setting: string): Calendar_v3.Schema.Setting; + get(setting: string): Calendar.Schema.Setting; // Returns a single user setting. - get(setting: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Setting; + get(setting: string, optionalArgs: object, headers: object): Calendar.Schema.Setting; // Returns all user settings for the authenticated user. - list(): Calendar_v3.Schema.Settings; + list(): Calendar.Schema.Settings; // Returns all user settings for the authenticated user. - list(optionalArgs: object): Calendar_v3.Schema.Settings; + list(optionalArgs: object): Calendar.Schema.Settings; // Returns all user settings for the authenticated user. - list(optionalArgs: object, headers: object): Calendar_v3.Schema.Settings; + list(optionalArgs: object, headers: object): Calendar.Schema.Settings; // Watch for changes to Settings resources. - watch(resource: Schema.Channel): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel): Calendar.Schema.Channel; // Watch for changes to Settings resources. - watch(resource: Schema.Channel, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to Settings resources. - watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar.Schema.Channel; } } namespace Schema { export interface Acl { etag?: string; - items?: Calendar_v3.Schema.AclRule[]; + items?: Calendar.Schema.AclRule[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -230,14 +231,14 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; role?: string; - scope?: Calendar_v3.Schema.AclRuleScope; + scope?: Calendar.Schema.AclRuleScope; } export interface AclRuleScope { type?: string; value?: string; } export interface Calendar { - conferenceProperties?: Calendar_v3.Schema.ConferenceProperties; + conferenceProperties?: Calendar.Schema.ConferenceProperties; description?: string; etag?: string; id?: string; @@ -248,7 +249,7 @@ declare namespace GoogleAppsScript { } export interface CalendarList { etag?: string; - items?: Calendar_v3.Schema.CalendarListEntry[]; + items?: Calendar.Schema.CalendarListEntry[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -257,8 +258,8 @@ declare namespace GoogleAppsScript { accessRole?: string; backgroundColor?: string; colorId?: string; - conferenceProperties?: Calendar_v3.Schema.ConferenceProperties; - defaultReminders?: Calendar_v3.Schema.EventReminder[]; + conferenceProperties?: Calendar.Schema.ConferenceProperties; + defaultReminders?: Calendar.Schema.EventReminder[]; deleted?: boolean; description?: string; etag?: string; @@ -267,7 +268,7 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; location?: string; - notificationSettings?: Calendar_v3.Schema.CalendarListEntryNotificationSettings; + notificationSettings?: Calendar.Schema.CalendarListEntryNotificationSettings; primary?: boolean; selected?: boolean; summary?: string; @@ -275,7 +276,7 @@ declare namespace GoogleAppsScript { timeZone?: string; } export interface CalendarListEntryNotificationSettings { - notifications?: Calendar_v3.Schema.CalendarNotification[]; + notifications?: Calendar.Schema.CalendarNotification[]; } export interface CalendarNotification { method?: string; @@ -305,15 +306,15 @@ declare namespace GoogleAppsScript { } export interface ConferenceData { conferenceId?: string; - conferenceSolution?: Calendar_v3.Schema.ConferenceSolution; - createRequest?: Calendar_v3.Schema.CreateConferenceRequest; - entryPoints?: Calendar_v3.Schema.EntryPoint[]; + conferenceSolution?: Calendar.Schema.ConferenceSolution; + createRequest?: Calendar.Schema.CreateConferenceRequest; + entryPoints?: Calendar.Schema.EntryPoint[]; notes?: string; - parameters?: Calendar_v3.Schema.ConferenceParameters; + parameters?: Calendar.Schema.ConferenceParameters; signature?: string; } export interface ConferenceParameters { - addOnParameters?: Calendar_v3.Schema.ConferenceParametersAddOnParameters; + addOnParameters?: Calendar.Schema.ConferenceParametersAddOnParameters; } export interface ConferenceParametersAddOnParameters { parameters?: object; @@ -326,16 +327,16 @@ declare namespace GoogleAppsScript { } export interface ConferenceSolution { iconUri?: string; - key?: Calendar_v3.Schema.ConferenceSolutionKey; + key?: Calendar.Schema.ConferenceSolutionKey; name?: string; } export interface ConferenceSolutionKey { type?: string; } export interface CreateConferenceRequest { - conferenceSolutionKey?: Calendar_v3.Schema.ConferenceSolutionKey; + conferenceSolutionKey?: Calendar.Schema.ConferenceSolutionKey; requestId?: string; - status?: Calendar_v3.Schema.ConferenceRequestStatus; + status?: Calendar.Schema.ConferenceRequestStatus; } export interface EntryPoint { accessCode?: string; @@ -355,19 +356,19 @@ declare namespace GoogleAppsScript { } export interface Event { anyoneCanAddSelf?: boolean; - attachments?: Calendar_v3.Schema.EventAttachment[]; - attendees?: Calendar_v3.Schema.EventAttendee[]; + attachments?: Calendar.Schema.EventAttachment[]; + attendees?: Calendar.Schema.EventAttendee[]; attendeesOmitted?: boolean; colorId?: string; - conferenceData?: Calendar_v3.Schema.ConferenceData; + conferenceData?: Calendar.Schema.ConferenceData; created?: string; - creator?: Calendar_v3.Schema.EventCreator; + creator?: Calendar.Schema.EventCreator; description?: string; - end?: Calendar_v3.Schema.EventDateTime; + end?: Calendar.Schema.EventDateTime; endTimeUnspecified?: boolean; etag?: string; - extendedProperties?: Calendar_v3.Schema.EventExtendedProperties; - gadget?: Calendar_v3.Schema.EventGadget; + extendedProperties?: Calendar.Schema.EventExtendedProperties; + gadget?: Calendar.Schema.EventGadget; guestsCanInviteOthers?: boolean; guestsCanModify?: boolean; guestsCanSeeOtherGuests?: boolean; @@ -378,15 +379,15 @@ declare namespace GoogleAppsScript { kind?: string; location?: string; locked?: boolean; - organizer?: Calendar_v3.Schema.EventOrganizer; - originalStartTime?: Calendar_v3.Schema.EventDateTime; + organizer?: Calendar.Schema.EventOrganizer; + originalStartTime?: Calendar.Schema.EventDateTime; privateCopy?: boolean; recurrence?: string[]; recurringEventId?: string; - reminders?: Calendar_v3.Schema.EventReminders; + reminders?: Calendar.Schema.EventReminders; sequence?: number; - source?: Calendar_v3.Schema.EventSource; - start?: Calendar_v3.Schema.EventDateTime; + source?: Calendar.Schema.EventSource; + start?: Calendar.Schema.EventDateTime; status?: string; summary?: string; transparency?: string; @@ -448,7 +449,7 @@ declare namespace GoogleAppsScript { minutes?: number; } export interface EventReminders { - overrides?: Calendar_v3.Schema.EventReminder[]; + overrides?: Calendar.Schema.EventReminder[]; useDefault?: boolean; } export interface EventSource { @@ -457,10 +458,10 @@ declare namespace GoogleAppsScript { } export interface Events { accessRole?: string; - defaultReminders?: Calendar_v3.Schema.EventReminder[]; + defaultReminders?: Calendar.Schema.EventReminder[]; description?: string; etag?: string; - items?: Calendar_v3.Schema.Event[]; + items?: Calendar.Schema.Event[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -469,17 +470,17 @@ declare namespace GoogleAppsScript { updated?: string; } export interface FreeBusyCalendar { - busy?: Calendar_v3.Schema.TimePeriod[]; - errors?: Calendar_v3.Schema.Error[]; + busy?: Calendar.Schema.TimePeriod[]; + errors?: Calendar.Schema.Error[]; } export interface FreeBusyGroup { calendars?: string[]; - errors?: Calendar_v3.Schema.Error[]; + errors?: Calendar.Schema.Error[]; } export interface FreeBusyRequest { calendarExpansionMax?: number; groupExpansionMax?: number; - items?: Calendar_v3.Schema.FreeBusyRequestItem[]; + items?: Calendar.Schema.FreeBusyRequestItem[]; timeMax?: string; timeMin?: string; timeZone?: string; @@ -502,7 +503,7 @@ declare namespace GoogleAppsScript { } export interface Settings { etag?: string; - items?: Calendar_v3.Schema.Setting[]; + items?: Calendar.Schema.Setting[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -513,72 +514,74 @@ declare namespace GoogleAppsScript { } } } - export interface Calendar_v3 { - Acl?: Calendar_v3.Collection.AclCollection; - CalendarList?: Calendar_v3.Collection.CalendarListCollection; - Calendars?: Calendar_v3.Collection.CalendarsCollection; - Channels?: Calendar_v3.Collection.ChannelsCollection; - Colors?: Calendar_v3.Collection.ColorsCollection; - Events?: Calendar_v3.Collection.EventsCollection; - Freebusy?: Calendar_v3.Collection.FreebusyCollection; - Settings?: Calendar_v3.Collection.SettingsCollection; + export interface Calendar { + Acl?: Calendar.Collection.AclCollection; + CalendarList?: Calendar.Collection.CalendarListCollection; + Calendars?: Calendar.Collection.CalendarsCollection; + Channels?: Calendar.Collection.ChannelsCollection; + Colors?: Calendar.Collection.ColorsCollection; + Events?: Calendar.Collection.EventsCollection; + Freebusy?: Calendar.Collection.FreebusyCollection; + Settings?: Calendar.Collection.SettingsCollection; // Create a new instance of AclRule - newAclRule(): Calendar_v3.Schema.AclRule; + newAclRule(): Calendar.Schema.AclRule; // Create a new instance of AclRuleScope - newAclRuleScope(): Calendar_v3.Schema.AclRuleScope; + newAclRuleScope(): Calendar.Schema.AclRuleScope; // Create a new instance of Calendar - newCalendar(): Calendar_v3.Schema.Calendar; + newCalendar(): Calendar.Schema.Calendar; // Create a new instance of CalendarListEntry - newCalendarListEntry(): Calendar_v3.Schema.CalendarListEntry; + newCalendarListEntry(): Calendar.Schema.CalendarListEntry; // Create a new instance of CalendarListEntryNotificationSettings - newCalendarListEntryNotificationSettings(): Calendar_v3.Schema.CalendarListEntryNotificationSettings; + newCalendarListEntryNotificationSettings(): Calendar.Schema.CalendarListEntryNotificationSettings; // Create a new instance of CalendarNotification - newCalendarNotification(): Calendar_v3.Schema.CalendarNotification; + newCalendarNotification(): Calendar.Schema.CalendarNotification; // Create a new instance of Channel - newChannel(): Calendar_v3.Schema.Channel; + newChannel(): Calendar.Schema.Channel; // Create a new instance of ConferenceData - newConferenceData(): Calendar_v3.Schema.ConferenceData; + newConferenceData(): Calendar.Schema.ConferenceData; // Create a new instance of ConferenceParameters - newConferenceParameters(): Calendar_v3.Schema.ConferenceParameters; + newConferenceParameters(): Calendar.Schema.ConferenceParameters; // Create a new instance of ConferenceParametersAddOnParameters - newConferenceParametersAddOnParameters(): Calendar_v3.Schema.ConferenceParametersAddOnParameters; + newConferenceParametersAddOnParameters(): Calendar.Schema.ConferenceParametersAddOnParameters; // Create a new instance of ConferenceProperties - newConferenceProperties(): Calendar_v3.Schema.ConferenceProperties; + newConferenceProperties(): Calendar.Schema.ConferenceProperties; // Create a new instance of ConferenceRequestStatus - newConferenceRequestStatus(): Calendar_v3.Schema.ConferenceRequestStatus; + newConferenceRequestStatus(): Calendar.Schema.ConferenceRequestStatus; // Create a new instance of ConferenceSolution - newConferenceSolution(): Calendar_v3.Schema.ConferenceSolution; + newConferenceSolution(): Calendar.Schema.ConferenceSolution; // Create a new instance of ConferenceSolutionKey - newConferenceSolutionKey(): Calendar_v3.Schema.ConferenceSolutionKey; + newConferenceSolutionKey(): Calendar.Schema.ConferenceSolutionKey; // Create a new instance of CreateConferenceRequest - newCreateConferenceRequest(): Calendar_v3.Schema.CreateConferenceRequest; + newCreateConferenceRequest(): Calendar.Schema.CreateConferenceRequest; // Create a new instance of EntryPoint - newEntryPoint(): Calendar_v3.Schema.EntryPoint; + newEntryPoint(): Calendar.Schema.EntryPoint; // Create a new instance of Event - newEvent(): Calendar_v3.Schema.Event; + newEvent(): Calendar.Schema.Event; // Create a new instance of EventAttachment - newEventAttachment(): Calendar_v3.Schema.EventAttachment; + newEventAttachment(): Calendar.Schema.EventAttachment; // Create a new instance of EventAttendee - newEventAttendee(): Calendar_v3.Schema.EventAttendee; + newEventAttendee(): Calendar.Schema.EventAttendee; // Create a new instance of EventCreator - newEventCreator(): Calendar_v3.Schema.EventCreator; + newEventCreator(): Calendar.Schema.EventCreator; // Create a new instance of EventDateTime - newEventDateTime(): Calendar_v3.Schema.EventDateTime; + newEventDateTime(): Calendar.Schema.EventDateTime; // Create a new instance of EventExtendedProperties - newEventExtendedProperties(): Calendar_v3.Schema.EventExtendedProperties; + newEventExtendedProperties(): Calendar.Schema.EventExtendedProperties; // Create a new instance of EventGadget - newEventGadget(): Calendar_v3.Schema.EventGadget; + newEventGadget(): Calendar.Schema.EventGadget; // Create a new instance of EventOrganizer - newEventOrganizer(): Calendar_v3.Schema.EventOrganizer; + newEventOrganizer(): Calendar.Schema.EventOrganizer; // Create a new instance of EventReminder - newEventReminder(): Calendar_v3.Schema.EventReminder; + newEventReminder(): Calendar.Schema.EventReminder; // Create a new instance of EventReminders - newEventReminders(): Calendar_v3.Schema.EventReminders; + newEventReminders(): Calendar.Schema.EventReminders; // Create a new instance of EventSource - newEventSource(): Calendar_v3.Schema.EventSource; + newEventSource(): Calendar.Schema.EventSource; // Create a new instance of FreeBusyRequest - newFreeBusyRequest(): Calendar_v3.Schema.FreeBusyRequest; + newFreeBusyRequest(): Calendar.Schema.FreeBusyRequest; // Create a new instance of FreeBusyRequestItem - newFreeBusyRequestItem(): Calendar_v3.Schema.FreeBusyRequestItem; + newFreeBusyRequestItem(): Calendar.Schema.FreeBusyRequestItem; } } + +declare var Calendar: GoogleAppsScript.Calendar; diff --git a/types/google-apps-script/apis/classroom/v1.d.ts b/types/google-apps-script/apis/classroom/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/classroom_v1.d.ts b/types/google-apps-script/apis/classroom_v1.d.ts new file mode 100644 index 0000000000..e92af8a3d8 --- /dev/null +++ b/types/google-apps-script/apis/classroom_v1.d.ts @@ -0,0 +1,1195 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Classroom { + namespace Collection { + namespace Courses { + namespace CourseWork { + export interface StudentSubmissionsCollection { + // Returns a student submission. + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course, course work, or student submission or for + // access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + get(courseId: string, courseWorkId: string, id: string): Classroom.Schema.StudentSubmission; + // Returns a list of student submissions that the requester is permitted to + // view, factoring in the OAuth scopes of the request. + // `-` may be specified as the `course_work_id` to include student + // submissions for multiple course work items. + // Course students may only view their own work. Course teachers + // and domain administrators may view all student submissions. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work, or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + list(courseId: string, courseWorkId: string): Classroom.Schema.ListStudentSubmissionsResponse; + // Returns a list of student submissions that the requester is permitted to + // view, factoring in the OAuth scopes of the request. + // `-` may be specified as the `course_work_id` to include student + // submissions for multiple course work items. + // Course students may only view their own work. Course teachers + // and domain administrators may view all student submissions. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work, or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + list(courseId: string, courseWorkId: string, optionalArgs: object): Classroom.Schema.ListStudentSubmissionsResponse; + // Modifies attachments of student submission. + // Attachments may only be added to student submissions belonging to course + // work objects with a `workType` of `ASSIGNMENT`. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work, if the user is not permitted to modify + // attachments on the requested student submission, or for + // access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + modifyAttachments(resource: Schema.ModifyAttachmentsRequest, courseId: string, courseWorkId: string, id: string): Classroom.Schema.StudentSubmission; + // Updates one or more fields of a student submission. + // See google.StudentSubmission for details + // of which fields may be updated and who may change them. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding course work, if the user is not permitted to make the + // requested modification to the student submission, or for + // access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + patch(resource: Schema.StudentSubmission, courseId: string, courseWorkId: string, id: string): Classroom.Schema.StudentSubmission; + // Updates one or more fields of a student submission. + // See google.StudentSubmission for details + // of which fields may be updated and who may change them. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding course work, if the user is not permitted to make the + // requested modification to the student submission, or for + // access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + patch(resource: Schema.StudentSubmission, courseId: string, courseWorkId: string, id: string, optionalArgs: object): Classroom.Schema.StudentSubmission; + // Reclaims a student submission on behalf of the student that owns it. + // Reclaiming a student submission transfers ownership of attached Drive + // files to the student and updates the submission state. + // Only the student that owns the requested student submission may call this + // method, and only for a student submission that has been turned in. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work, unsubmit the requested student submission, + // or for access errors. + // * `FAILED_PRECONDITION` if the student submission has not been turned in. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + reclaim(resource: any, courseId: string, courseWorkId: string, id: string): void; + // Returns a student submission. + // Returning a student submission transfers ownership of attached Drive + // files to the student and may also update the submission state. + // Unlike the Classroom application, returning a student submission does not + // set assignedGrade to the draftGrade value. + // Only a teacher of the course that contains the requested student submission + // may call this method. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work, return the requested student submission, + // or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + return(resource: any, courseId: string, courseWorkId: string, id: string): void; + // Turns in a student submission. + // Turning in a student submission transfers ownership of attached Drive + // files to the teacher and may also update the submission state. + // This may only be called by the student that owns the specified student + // submission. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work, turn in the requested student submission, + // or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + turnIn(resource: any, courseId: string, courseWorkId: string, id: string): void; + } + } + export interface AliasesCollection { + // Creates an alias for a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to create the + // alias or for access errors. + // * `NOT_FOUND` if the course does not exist. + // * `ALREADY_EXISTS` if the alias already exists. + // * `FAILED_PRECONDITION` if the alias requested does not make sense for the + // requesting user or course (for example, if a user not in a domain + // attempts to access a domain-scoped alias). + create(resource: Schema.CourseAlias, courseId: string): Classroom.Schema.CourseAlias; + // Returns a list of aliases for a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // course or for access errors. + // * `NOT_FOUND` if the course does not exist. + list(courseId: string): Classroom.Schema.ListCourseAliasesResponse; + // Returns a list of aliases for a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // course or for access errors. + // * `NOT_FOUND` if the course does not exist. + list(courseId: string, optionalArgs: object): Classroom.Schema.ListCourseAliasesResponse; + // Deletes an alias of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to remove the + // alias or for access errors. + // * `NOT_FOUND` if the alias does not exist. + // * `FAILED_PRECONDITION` if the alias requested does not make sense for the + // requesting user or course (for example, if a user not in a domain + // attempts to delete a domain-scoped alias). + remove(courseId: string, alias: string): void; + } + export interface AnnouncementsCollection { + // Creates an announcement. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course, create announcements in the requested course, share a + // Drive attachment, or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + // * `FAILED_PRECONDITION` for the following request error: + // * AttachmentNotVisible + create(resource: Schema.Announcement, courseId: string): Classroom.Schema.Announcement; + // Returns an announcement. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or announcement, or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course or announcement does not exist. + get(courseId: string, id: string): Classroom.Schema.Announcement; + // Returns a list of announcements that the requester is permitted to view. + // Course students may only view `PUBLISHED` announcements. Course teachers + // and domain administrators may view all announcements. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access + // the requested course or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + list(courseId: string): Classroom.Schema.ListAnnouncementsResponse; + // Returns a list of announcements that the requester is permitted to view. + // Course students may only view `PUBLISHED` announcements. Course teachers + // and domain administrators may view all announcements. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access + // the requested course or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + list(courseId: string, optionalArgs: object): Classroom.Schema.ListAnnouncementsResponse; + // Modifies assignee mode and options of an announcement. + // Only a teacher of the course that contains the announcement may + // call this method. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course or course work does not exist. + modifyAssignees(resource: Schema.ModifyAnnouncementAssigneesRequest, courseId: string, id: string): Classroom.Schema.Announcement; + // Updates one or more fields of an announcement. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding announcement or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `FAILED_PRECONDITION` if the requested announcement has already been + // deleted. + // * `NOT_FOUND` if the requested course or announcement does not exist + patch(resource: Schema.Announcement, courseId: string, id: string): Classroom.Schema.Announcement; + // Updates one or more fields of an announcement. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding announcement or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `FAILED_PRECONDITION` if the requested announcement has already been + // deleted. + // * `NOT_FOUND` if the requested course or announcement does not exist + patch(resource: Schema.Announcement, courseId: string, id: string, optionalArgs: object): Classroom.Schema.Announcement; + // Deletes an announcement. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding announcement item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding announcement, if the requesting user is not permitted + // to delete the requested course or for access errors. + // * `FAILED_PRECONDITION` if the requested announcement has already been + // deleted. + // * `NOT_FOUND` if no course exists with the requested ID. + remove(courseId: string, id: string): void; + } + export interface CourseWorkCollection { + StudentSubmissions?: Classroom.Collection.Courses.CourseWork.StudentSubmissionsCollection; + // Creates course work. + // The resulting course work (and corresponding student submissions) are + // associated with the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // make the request. Classroom API requests to modify course work and student + // submissions must be made with an OAuth client ID from the associated + // Developer Console project. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course, create course work in the requested course, share a + // Drive attachment, or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + // * `FAILED_PRECONDITION` for the following request error: + // * AttachmentNotVisible + create(resource: Schema.CourseWork, courseId: string): Classroom.Schema.CourseWork; + // Returns course work. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work, or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course or course work does not exist. + get(courseId: string, id: string): Classroom.Schema.CourseWork; + // Returns a list of course work that the requester is permitted to view. + // Course students may only view `PUBLISHED` course work. Course teachers + // and domain administrators may view all course work. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access + // the requested course or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + list(courseId: string): Classroom.Schema.ListCourseWorkResponse; + // Returns a list of course work that the requester is permitted to view. + // Course students may only view `PUBLISHED` course work. Course teachers + // and domain administrators may view all course work. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access + // the requested course or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course does not exist. + list(courseId: string, optionalArgs: object): Classroom.Schema.ListCourseWorkResponse; + // Modifies assignee mode and options of a coursework. + // Only a teacher of the course that contains the coursework may + // call this method. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or course work or for access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `NOT_FOUND` if the requested course or course work does not exist. + modifyAssignees(resource: Schema.ModifyCourseWorkAssigneesRequest, courseId: string, id: string): Classroom.Schema.CourseWork; + // Updates one or more fields of a course work. + // See google.CourseWork for details + // of which fields may be updated and who may change them. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding course work, if the user is not permitted to make the + // requested modification to the student submission, or for + // access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `FAILED_PRECONDITION` if the requested course work has already been + // deleted. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + patch(resource: Schema.CourseWork, courseId: string, id: string): Classroom.Schema.CourseWork; + // Updates one or more fields of a course work. + // See google.CourseWork for details + // of which fields may be updated and who may change them. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding course work, if the user is not permitted to make the + // requested modification to the student submission, or for + // access errors. + // * `INVALID_ARGUMENT` if the request is malformed. + // * `FAILED_PRECONDITION` if the requested course work has already been + // deleted. + // * `NOT_FOUND` if the requested course, course work, or student submission + // does not exist. + patch(resource: Schema.CourseWork, courseId: string, id: string, optionalArgs: object): Classroom.Schema.CourseWork; + // Deletes a course work. + // This request must be made by the Developer Console project of the + // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + // create the corresponding course work item. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting developer project did not create + // the corresponding course work, if the requesting user is not permitted + // to delete the requested course or for access errors. + // * `FAILED_PRECONDITION` if the requested course work has already been + // deleted. + // * `NOT_FOUND` if no course exists with the requested ID. + remove(courseId: string, id: string): void; + } + export interface StudentsCollection { + // Adds a user as a student of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to create + // students in this course or for access errors. + // * `NOT_FOUND` if the requested course ID does not exist. + // * `FAILED_PRECONDITION` if the requested user's account is disabled, + // for the following request errors: + // * CourseMemberLimitReached + // * CourseNotModifiable + // * UserGroupsMembershipLimitReached + // * `ALREADY_EXISTS` if the user is already a student or teacher in the + // course. + create(resource: Schema.Student, courseId: string): Classroom.Schema.Student; + // Adds a user as a student of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to create + // students in this course or for access errors. + // * `NOT_FOUND` if the requested course ID does not exist. + // * `FAILED_PRECONDITION` if the requested user's account is disabled, + // for the following request errors: + // * CourseMemberLimitReached + // * CourseNotModifiable + // * UserGroupsMembershipLimitReached + // * `ALREADY_EXISTS` if the user is already a student or teacher in the + // course. + create(resource: Schema.Student, courseId: string, optionalArgs: object): Classroom.Schema.Student; + // Returns a student of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to view + // students of this course or for access errors. + // * `NOT_FOUND` if no student of this course has the requested ID or if the + // course does not exist. + get(courseId: string, userId: string): Classroom.Schema.Student; + // Returns a list of students of this course that the requester + // is permitted to view. + // This method returns the following error codes: + // * `NOT_FOUND` if the course does not exist. + // * `PERMISSION_DENIED` for access errors. + list(courseId: string): Classroom.Schema.ListStudentsResponse; + // Returns a list of students of this course that the requester + // is permitted to view. + // This method returns the following error codes: + // * `NOT_FOUND` if the course does not exist. + // * `PERMISSION_DENIED` for access errors. + list(courseId: string, optionalArgs: object): Classroom.Schema.ListStudentsResponse; + // Deletes a student of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to delete + // students of this course or for access errors. + // * `NOT_FOUND` if no student of this course has the requested ID or if the + // course does not exist. + remove(courseId: string, userId: string): void; + } + export interface TeachersCollection { + // Creates a teacher of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to create + // teachers in this course or for access errors. + // * `NOT_FOUND` if the requested course ID does not exist. + // * `FAILED_PRECONDITION` if the requested user's account is disabled, + // for the following request errors: + // * CourseMemberLimitReached + // * CourseNotModifiable + // * CourseTeacherLimitReached + // * UserGroupsMembershipLimitReached + // * `ALREADY_EXISTS` if the user is already a teacher or student in the + // course. + create(resource: Schema.Teacher, courseId: string): Classroom.Schema.Teacher; + // Returns a teacher of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to view + // teachers of this course or for access errors. + // * `NOT_FOUND` if no teacher of this course has the requested ID or if the + // course does not exist. + get(courseId: string, userId: string): Classroom.Schema.Teacher; + // Returns a list of teachers of this course that the requester + // is permitted to view. + // This method returns the following error codes: + // * `NOT_FOUND` if the course does not exist. + // * `PERMISSION_DENIED` for access errors. + list(courseId: string): Classroom.Schema.ListTeachersResponse; + // Returns a list of teachers of this course that the requester + // is permitted to view. + // This method returns the following error codes: + // * `NOT_FOUND` if the course does not exist. + // * `PERMISSION_DENIED` for access errors. + list(courseId: string, optionalArgs: object): Classroom.Schema.ListTeachersResponse; + // Deletes a teacher of a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to delete + // teachers of this course or for access errors. + // * `NOT_FOUND` if no teacher of this course has the requested ID or if the + // course does not exist. + // * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher + // of this course. + remove(courseId: string, userId: string): void; + } + } + namespace UserProfiles { + export interface GuardianInvitationsCollection { + // Creates a guardian invitation, and sends an email to the guardian asking + // them to confirm that they are the student's guardian. + // Once the guardian accepts the invitation, their `state` will change to + // `COMPLETED` and they will start receiving guardian notifications. A + // `Guardian` resource will also be created to represent the active guardian. + // The request object must have the `student_id` and + // `invited_email_address` fields set. Failing to set these fields, or + // setting any other fields in the request, will result in an error. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the current user does not have permission to + // manage guardians, if the guardian in question has already rejected + // too many requests for that student, if guardians are not enabled for the + // domain in question, or for other access errors. + // * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian + // link limit. + // * `INVALID_ARGUMENT` if the guardian email address is not valid (for + // example, if it is too long), or if the format of the student ID provided + // cannot be recognized (it is not an email address, nor a `user_id` from + // this API). This error will also be returned if read-only fields are set, + // or if the `state` field is set to to a value other than `PENDING`. + // * `NOT_FOUND` if the student ID provided is a valid student ID, but + // Classroom has no record of that student. + // * `ALREADY_EXISTS` if there is already a pending guardian invitation for + // the student and `invited_email_address` provided, or if the provided + // `invited_email_address` matches the Google account of an existing + // `Guardian` for this user. + create(resource: Schema.GuardianInvitation, studentId: string): Classroom.Schema.GuardianInvitation; + // Returns a specific guardian invitation. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to view + // guardian invitations for the student identified by the `student_id`, if + // guardians are not enabled for the domain in question, or for other + // access errors. + // * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + // be recognized (it is not an email address, nor a `student_id` from the + // API, nor the literal string `me`). + // * `NOT_FOUND` if Classroom cannot find any record of the given student or + // `invitation_id`. May also be returned if the student exists, but the + // requesting user does not have access to see that student. + get(studentId: string, invitationId: string): Classroom.Schema.GuardianInvitation; + // Returns a list of guardian invitations that the requesting user is + // permitted to view, filtered by the parameters provided. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + // user is not permitted to view guardian invitations for that student, if + // `"-"` is specified as the `student_id` and the user is not a domain + // administrator, if guardians are not enabled for the domain in question, + // or for other access errors. + // * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + // be recognized (it is not an email address, nor a `student_id` from the + // API, nor the literal string `me`). May also be returned if an invalid + // `page_token` or `state` is provided. + // * `NOT_FOUND` if a `student_id` is specified, and its format can be + // recognized, but Classroom has no record of that student. + list(studentId: string): Classroom.Schema.ListGuardianInvitationsResponse; + // Returns a list of guardian invitations that the requesting user is + // permitted to view, filtered by the parameters provided. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + // user is not permitted to view guardian invitations for that student, if + // `"-"` is specified as the `student_id` and the user is not a domain + // administrator, if guardians are not enabled for the domain in question, + // or for other access errors. + // * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + // be recognized (it is not an email address, nor a `student_id` from the + // API, nor the literal string `me`). May also be returned if an invalid + // `page_token` or `state` is provided. + // * `NOT_FOUND` if a `student_id` is specified, and its format can be + // recognized, but Classroom has no record of that student. + list(studentId: string, optionalArgs: object): Classroom.Schema.ListGuardianInvitationsResponse; + // Modifies a guardian invitation. + // Currently, the only valid modification is to change the `state` from + // `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the current user does not have permission to + // manage guardians, if guardians are not enabled for the domain in question + // or for other access errors. + // * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. + // * `INVALID_ARGUMENT` if the format of the student ID provided + // cannot be recognized (it is not an email address, nor a `user_id` from + // this API), or if the passed `GuardianInvitation` has a `state` other than + // `COMPLETE`, or if it modifies fields other than `state`. + // * `NOT_FOUND` if the student ID provided is a valid student ID, but + // Classroom has no record of that student, or if the `id` field does not + // refer to a guardian invitation known to Classroom. + patch(resource: Schema.GuardianInvitation, studentId: string, invitationId: string): Classroom.Schema.GuardianInvitation; + // Modifies a guardian invitation. + // Currently, the only valid modification is to change the `state` from + // `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the current user does not have permission to + // manage guardians, if guardians are not enabled for the domain in question + // or for other access errors. + // * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. + // * `INVALID_ARGUMENT` if the format of the student ID provided + // cannot be recognized (it is not an email address, nor a `user_id` from + // this API), or if the passed `GuardianInvitation` has a `state` other than + // `COMPLETE`, or if it modifies fields other than `state`. + // * `NOT_FOUND` if the student ID provided is a valid student ID, but + // Classroom has no record of that student, or if the `id` field does not + // refer to a guardian invitation known to Classroom. + patch(resource: Schema.GuardianInvitation, studentId: string, invitationId: string, optionalArgs: object): Classroom.Schema.GuardianInvitation; + } + export interface GuardiansCollection { + // Returns a specific guardian. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if no user that matches the provided `student_id` + // is visible to the requesting user, if the requesting user is not + // permitted to view guardian information for the student identified by the + // `student_id`, if guardians are not enabled for the domain in question, + // or for other access errors. + // * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + // be recognized (it is not an email address, nor a `student_id` from the + // API, nor the literal string `me`). + // * `NOT_FOUND` if the requesting user is permitted to view guardians for + // the requested `student_id`, but no `Guardian` record exists for that + // student that matches the provided `guardian_id`. + get(studentId: string, guardianId: string): Classroom.Schema.Guardian; + // Returns a list of guardians that the requesting user is permitted to + // view, restricted to those that match the request. + // To list guardians for any student that the requesting user may view + // guardians for, use the literal character `-` for the student ID. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + // user is not permitted to view guardian information for that student, if + // `"-"` is specified as the `student_id` and the user is not a domain + // administrator, if guardians are not enabled for the domain in question, + // if the `invited_email_address` filter is set by a user who is not a + // domain administrator, or for other access errors. + // * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + // be recognized (it is not an email address, nor a `student_id` from the + // API, nor the literal string `me`). May also be returned if an invalid + // `page_token` is provided. + // * `NOT_FOUND` if a `student_id` is specified, and its format can be + // recognized, but Classroom has no record of that student. + list(studentId: string): Classroom.Schema.ListGuardiansResponse; + // Returns a list of guardians that the requesting user is permitted to + // view, restricted to those that match the request. + // To list guardians for any student that the requesting user may view + // guardians for, use the literal character `-` for the student ID. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + // user is not permitted to view guardian information for that student, if + // `"-"` is specified as the `student_id` and the user is not a domain + // administrator, if guardians are not enabled for the domain in question, + // if the `invited_email_address` filter is set by a user who is not a + // domain administrator, or for other access errors. + // * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + // be recognized (it is not an email address, nor a `student_id` from the + // API, nor the literal string `me`). May also be returned if an invalid + // `page_token` is provided. + // * `NOT_FOUND` if a `student_id` is specified, and its format can be + // recognized, but Classroom has no record of that student. + list(studentId: string, optionalArgs: object): Classroom.Schema.ListGuardiansResponse; + // Deletes a guardian. + // The guardian will no longer receive guardian notifications and the guardian + // will no longer be accessible via the API. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if no user that matches the provided `student_id` + // is visible to the requesting user, if the requesting user is not + // permitted to manage guardians for the student identified by the + // `student_id`, if guardians are not enabled for the domain in question, + // or for other access errors. + // * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + // be recognized (it is not an email address, nor a `student_id` from the + // API). + // * `NOT_FOUND` if the requesting user is permitted to modify guardians for + // the requested `student_id`, but no `Guardian` record exists for that + // student with the provided `guardian_id`. + remove(studentId: string, guardianId: string): void; + } + } + export interface CoursesCollection { + Aliases?: Classroom.Collection.Courses.AliasesCollection; + Announcements?: Classroom.Collection.Courses.AnnouncementsCollection; + CourseWork?: Classroom.Collection.Courses.CourseWorkCollection; + Students?: Classroom.Collection.Courses.StudentsCollection; + Teachers?: Classroom.Collection.Courses.TeachersCollection; + // Creates a course. + // The user specified in `ownerId` is the owner of the created course + // and added as a teacher. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to create + // courses or for access errors. + // * `NOT_FOUND` if the primary teacher is not a valid user. + // * `FAILED_PRECONDITION` if the course owner's account is disabled or for + // the following request errors: + // * UserGroupsMembershipLimitReached + // * `ALREADY_EXISTS` if an alias was specified in the `id` and + // already exists. + create(resource: Schema.Course): Classroom.Schema.Course; + // Returns a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access the + // requested course or for access errors. + // * `NOT_FOUND` if no course exists with the requested ID. + get(id: string): Classroom.Schema.Course; + // Returns a list of courses that the requesting user is permitted to view, + // restricted to those that match the request. Returned courses are ordered by + // creation time, with the most recently created coming first. + // This method returns the following error codes: + // * `PERMISSION_DENIED` for access errors. + // * `INVALID_ARGUMENT` if the query argument is malformed. + // * `NOT_FOUND` if any users specified in the query arguments do not exist. + list(): Classroom.Schema.ListCoursesResponse; + // Returns a list of courses that the requesting user is permitted to view, + // restricted to those that match the request. Returned courses are ordered by + // creation time, with the most recently created coming first. + // This method returns the following error codes: + // * `PERMISSION_DENIED` for access errors. + // * `INVALID_ARGUMENT` if the query argument is malformed. + // * `NOT_FOUND` if any users specified in the query arguments do not exist. + list(optionalArgs: object): Classroom.Schema.ListCoursesResponse; + // Updates one or more fields in a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + // requested course or for access errors. + // * `NOT_FOUND` if no course exists with the requested ID. + // * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or + // if no update mask is supplied. + // * `FAILED_PRECONDITION` for the following request errors: + // * CourseNotModifiable + patch(resource: Schema.Course, id: string): Classroom.Schema.Course; + // Updates one or more fields in a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + // requested course or for access errors. + // * `NOT_FOUND` if no course exists with the requested ID. + // * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or + // if no update mask is supplied. + // * `FAILED_PRECONDITION` for the following request errors: + // * CourseNotModifiable + patch(resource: Schema.Course, id: string, optionalArgs: object): Classroom.Schema.Course; + // Deletes a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + // requested course or for access errors. + // * `NOT_FOUND` if no course exists with the requested ID. + remove(id: string): void; + // Updates a course. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + // requested course or for access errors. + // * `NOT_FOUND` if no course exists with the requested ID. + // * `FAILED_PRECONDITION` for the following request errors: + // * CourseNotModifiable + update(resource: Schema.Course, id: string): Classroom.Schema.Course; + } + export interface InvitationsCollection { + // Accepts an invitation, removing it and adding the invited user to the + // teachers or students (as appropriate) of the specified course. Only the + // invited user may accept an invitation. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to accept the + // requested invitation or for access errors. + // * `FAILED_PRECONDITION` for the following request errors: + // * CourseMemberLimitReached + // * CourseNotModifiable + // * CourseTeacherLimitReached + // * UserGroupsMembershipLimitReached + // * `NOT_FOUND` if no invitation exists with the requested ID. + accept(id: string): void; + // Creates an invitation. Only one invitation for a user and course may exist + // at a time. Delete and re-create an invitation to make changes. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to create + // invitations for this course or for access errors. + // * `NOT_FOUND` if the course or the user does not exist. + // * `FAILED_PRECONDITION` if the requested user's account is disabled or if + // the user already has this role or a role with greater permissions. + // * `ALREADY_EXISTS` if an invitation for the specified user and course + // already exists. + create(resource: Schema.Invitation): Classroom.Schema.Invitation; + // Returns an invitation. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to view the + // requested invitation or for access errors. + // * `NOT_FOUND` if no invitation exists with the requested ID. + get(id: string): Classroom.Schema.Invitation; + // Returns a list of invitations that the requesting user is permitted to + // view, restricted to those that match the list request. + // *Note:* At least one of `user_id` or `course_id` must be supplied. Both + // fields can be supplied. + // This method returns the following error codes: + // * `PERMISSION_DENIED` for access errors. + list(): Classroom.Schema.ListInvitationsResponse; + // Returns a list of invitations that the requesting user is permitted to + // view, restricted to those that match the list request. + // *Note:* At least one of `user_id` or `course_id` must be supplied. Both + // fields can be supplied. + // This method returns the following error codes: + // * `PERMISSION_DENIED` for access errors. + list(optionalArgs: object): Classroom.Schema.ListInvitationsResponse; + // Deletes an invitation. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + // requested invitation or for access errors. + // * `NOT_FOUND` if no invitation exists with the requested ID. + remove(id: string): void; + } + export interface RegistrationsCollection { + // Creates a `Registration`, causing Classroom to start sending notifications + // from the provided `feed` to the destination provided in `cloudPubSubTopic`. + // Returns the created `Registration`. Currently, this will be the same as + // the argument, but with server-assigned fields such as `expiry_time` and + // `id` filled in. + // Note that any value specified for the `expiry_time` or `id` fields will be + // ignored. + // While Classroom may validate the `cloudPubSubTopic` and return errors on a + // best effort basis, it is the caller's responsibility to ensure that it + // exists and that Classroom has permission to publish to it. + // This method may return the following error codes: + // * `PERMISSION_DENIED` if: + // * the authenticated user does not have permission to receive + // notifications from the requested field; or + // * the credential provided does not include the appropriate scope for + // the requested feed. + // * another access error is encountered. + // * `INVALID_ARGUMENT` if: + // * no `cloudPubsubTopic` is specified, or the specified + // `cloudPubsubTopic` is not valid; or + // * no `feed` is specified, or the specified `feed` is not valid. + // * `NOT_FOUND` if: + // * the specified `feed` cannot be located, or the requesting user does + // not have permission to determine whether or not it exists; or + // * the specified `cloudPubsubTopic` cannot be located, or Classroom has + // not been granted permission to publish to it. + create(resource: Schema.Registration): Classroom.Schema.Registration; + // Deletes a `Registration`, causing Classroom to stop sending notifications + // for that `Registration`. + remove(registrationId: string): void; + } + export interface UserProfilesCollection { + GuardianInvitations?: Classroom.Collection.UserProfiles.GuardianInvitationsCollection; + Guardians?: Classroom.Collection.UserProfiles.GuardiansCollection; + // Returns a user profile. + // This method returns the following error codes: + // * `PERMISSION_DENIED` if the requesting user is not permitted to access + // this user profile, if no profile exists with the requested ID, or for + // access errors. + get(userId: string): Classroom.Schema.UserProfile; + } + } + namespace Schema { + export interface Announcement { + alternateLink?: string; + assigneeMode?: string; + courseId?: string; + creationTime?: string; + creatorUserId?: string; + id?: string; + individualStudentsOptions?: Classroom.Schema.IndividualStudentsOptions; + materials?: Classroom.Schema.Material[]; + scheduledTime?: string; + state?: string; + text?: string; + updateTime?: string; + } + export interface Assignment { + studentWorkFolder?: Classroom.Schema.DriveFolder; + } + export interface AssignmentSubmission { + attachments?: Classroom.Schema.Attachment[]; + } + export interface Attachment { + driveFile?: Classroom.Schema.DriveFile; + form?: Classroom.Schema.Form; + link?: Classroom.Schema.Link; + youTubeVideo?: Classroom.Schema.YouTubeVideo; + } + export interface CloudPubsubTopic { + topicName?: string; + } + export interface Course { + alternateLink?: string; + calendarId?: string; + courseGroupEmail?: string; + courseMaterialSets?: Classroom.Schema.CourseMaterialSet[]; + courseState?: string; + creationTime?: string; + description?: string; + descriptionHeading?: string; + enrollmentCode?: string; + guardiansEnabled?: boolean; + id?: string; + name?: string; + ownerId?: string; + room?: string; + section?: string; + teacherFolder?: Classroom.Schema.DriveFolder; + teacherGroupEmail?: string; + updateTime?: string; + } + export interface CourseAlias { + alias?: string; + } + export interface CourseMaterial { + driveFile?: Classroom.Schema.DriveFile; + form?: Classroom.Schema.Form; + link?: Classroom.Schema.Link; + youTubeVideo?: Classroom.Schema.YouTubeVideo; + } + export interface CourseMaterialSet { + materials?: Classroom.Schema.CourseMaterial[]; + title?: string; + } + export interface CourseRosterChangesInfo { + courseId?: string; + } + export interface CourseWork { + alternateLink?: string; + assigneeMode?: string; + assignment?: Classroom.Schema.Assignment; + associatedWithDeveloper?: boolean; + courseId?: string; + creationTime?: string; + creatorUserId?: string; + description?: string; + dueDate?: Classroom.Schema.Date; + dueTime?: Classroom.Schema.TimeOfDay; + id?: string; + individualStudentsOptions?: Classroom.Schema.IndividualStudentsOptions; + materials?: Classroom.Schema.Material[]; + maxPoints?: Number; + multipleChoiceQuestion?: Classroom.Schema.MultipleChoiceQuestion; + scheduledTime?: string; + state?: string; + submissionModificationMode?: string; + title?: string; + updateTime?: string; + workType?: string; + } + export interface CourseWorkChangesInfo { + courseId?: string; + } + export interface Date { + day?: number; + month?: number; + year?: number; + } + export interface DriveFile { + alternateLink?: string; + id?: string; + thumbnailUrl?: string; + title?: string; + } + export interface DriveFolder { + alternateLink?: string; + id?: string; + title?: string; + } + export interface Feed { + courseRosterChangesInfo?: Classroom.Schema.CourseRosterChangesInfo; + courseWorkChangesInfo?: Classroom.Schema.CourseWorkChangesInfo; + feedType?: string; + } + export interface Form { + formUrl?: string; + responseUrl?: string; + thumbnailUrl?: string; + title?: string; + } + export interface GlobalPermission { + permission?: string; + } + export interface GradeHistory { + actorUserId?: string; + gradeChangeType?: string; + gradeTimestamp?: string; + maxPoints?: Number; + pointsEarned?: Number; + } + export interface Guardian { + guardianId?: string; + guardianProfile?: Classroom.Schema.UserProfile; + invitedEmailAddress?: string; + studentId?: string; + } + export interface GuardianInvitation { + creationTime?: string; + invitationId?: string; + invitedEmailAddress?: string; + state?: string; + studentId?: string; + } + export interface IndividualStudentsOptions { + studentIds?: string[]; + } + export interface Invitation { + courseId?: string; + id?: string; + role?: string; + userId?: string; + } + export interface Link { + thumbnailUrl?: string; + title?: string; + url?: string; + } + export interface ListAnnouncementsResponse { + announcements?: Classroom.Schema.Announcement[]; + nextPageToken?: string; + } + export interface ListCourseAliasesResponse { + aliases?: Classroom.Schema.CourseAlias[]; + nextPageToken?: string; + } + export interface ListCourseWorkResponse { + courseWork?: Classroom.Schema.CourseWork[]; + nextPageToken?: string; + } + export interface ListCoursesResponse { + courses?: Classroom.Schema.Course[]; + nextPageToken?: string; + } + export interface ListGuardianInvitationsResponse { + guardianInvitations?: Classroom.Schema.GuardianInvitation[]; + nextPageToken?: string; + } + export interface ListGuardiansResponse { + guardians?: Classroom.Schema.Guardian[]; + nextPageToken?: string; + } + export interface ListInvitationsResponse { + invitations?: Classroom.Schema.Invitation[]; + nextPageToken?: string; + } + export interface ListStudentSubmissionsResponse { + nextPageToken?: string; + studentSubmissions?: Classroom.Schema.StudentSubmission[]; + } + export interface ListStudentsResponse { + nextPageToken?: string; + students?: Classroom.Schema.Student[]; + } + export interface ListTeachersResponse { + nextPageToken?: string; + teachers?: Classroom.Schema.Teacher[]; + } + export interface Material { + driveFile?: Classroom.Schema.SharedDriveFile; + form?: Classroom.Schema.Form; + link?: Classroom.Schema.Link; + youtubeVideo?: Classroom.Schema.YouTubeVideo; + } + export interface ModifyAnnouncementAssigneesRequest { + assigneeMode?: string; + modifyIndividualStudentsOptions?: Classroom.Schema.ModifyIndividualStudentsOptions; + } + export interface ModifyAttachmentsRequest { + addAttachments?: Classroom.Schema.Attachment[]; + } + export interface ModifyCourseWorkAssigneesRequest { + assigneeMode?: string; + modifyIndividualStudentsOptions?: Classroom.Schema.ModifyIndividualStudentsOptions; + } + export interface ModifyIndividualStudentsOptions { + addStudentIds?: string[]; + removeStudentIds?: string[]; + } + export interface MultipleChoiceQuestion { + choices?: string[]; + } + export interface MultipleChoiceSubmission { + answer?: string; + } + export interface Name { + familyName?: string; + fullName?: string; + givenName?: string; + } + export interface Registration { + cloudPubsubTopic?: Classroom.Schema.CloudPubsubTopic; + expiryTime?: string; + feed?: Classroom.Schema.Feed; + registrationId?: string; + } + export interface SharedDriveFile { + driveFile?: Classroom.Schema.DriveFile; + shareMode?: string; + } + export interface ShortAnswerSubmission { + answer?: string; + } + export interface StateHistory { + actorUserId?: string; + state?: string; + stateTimestamp?: string; + } + export interface Student { + courseId?: string; + profile?: Classroom.Schema.UserProfile; + studentWorkFolder?: Classroom.Schema.DriveFolder; + userId?: string; + } + export interface StudentSubmission { + alternateLink?: string; + assignedGrade?: Number; + assignmentSubmission?: Classroom.Schema.AssignmentSubmission; + associatedWithDeveloper?: boolean; + courseId?: string; + courseWorkId?: string; + courseWorkType?: string; + creationTime?: string; + draftGrade?: Number; + id?: string; + late?: boolean; + multipleChoiceSubmission?: Classroom.Schema.MultipleChoiceSubmission; + shortAnswerSubmission?: Classroom.Schema.ShortAnswerSubmission; + state?: string; + submissionHistory?: Classroom.Schema.SubmissionHistory[]; + updateTime?: string; + userId?: string; + } + export interface SubmissionHistory { + gradeHistory?: Classroom.Schema.GradeHistory; + stateHistory?: Classroom.Schema.StateHistory; + } + export interface Teacher { + courseId?: string; + profile?: Classroom.Schema.UserProfile; + userId?: string; + } + export interface TimeOfDay { + hours?: number; + minutes?: number; + nanos?: number; + seconds?: number; + } + export interface UserProfile { + emailAddress?: string; + id?: string; + name?: Classroom.Schema.Name; + permissions?: Classroom.Schema.GlobalPermission[]; + photoUrl?: string; + verifiedTeacher?: boolean; + } + export interface YouTubeVideo { + alternateLink?: string; + id?: string; + thumbnailUrl?: string; + title?: string; + } + } + } + export interface Classroom { + Courses?: Classroom.Collection.CoursesCollection; + Invitations?: Classroom.Collection.InvitationsCollection; + Registrations?: Classroom.Collection.RegistrationsCollection; + UserProfiles?: Classroom.Collection.UserProfilesCollection; + // Create a new instance of Announcement + newAnnouncement(): Classroom.Schema.Announcement; + // Create a new instance of Assignment + newAssignment(): Classroom.Schema.Assignment; + // Create a new instance of AssignmentSubmission + newAssignmentSubmission(): Classroom.Schema.AssignmentSubmission; + // Create a new instance of Attachment + newAttachment(): Classroom.Schema.Attachment; + // Create a new instance of CloudPubsubTopic + newCloudPubsubTopic(): Classroom.Schema.CloudPubsubTopic; + // Create a new instance of Course + newCourse(): Classroom.Schema.Course; + // Create a new instance of CourseAlias + newCourseAlias(): Classroom.Schema.CourseAlias; + // Create a new instance of CourseMaterial + newCourseMaterial(): Classroom.Schema.CourseMaterial; + // Create a new instance of CourseMaterialSet + newCourseMaterialSet(): Classroom.Schema.CourseMaterialSet; + // Create a new instance of CourseRosterChangesInfo + newCourseRosterChangesInfo(): Classroom.Schema.CourseRosterChangesInfo; + // Create a new instance of CourseWork + newCourseWork(): Classroom.Schema.CourseWork; + // Create a new instance of CourseWorkChangesInfo + newCourseWorkChangesInfo(): Classroom.Schema.CourseWorkChangesInfo; + // Create a new instance of Date + newDate(): Classroom.Schema.Date; + // Create a new instance of DriveFile + newDriveFile(): Classroom.Schema.DriveFile; + // Create a new instance of DriveFolder + newDriveFolder(): Classroom.Schema.DriveFolder; + // Create a new instance of Feed + newFeed(): Classroom.Schema.Feed; + // Create a new instance of Form + newForm(): Classroom.Schema.Form; + // Create a new instance of GlobalPermission + newGlobalPermission(): Classroom.Schema.GlobalPermission; + // Create a new instance of GradeHistory + newGradeHistory(): Classroom.Schema.GradeHistory; + // Create a new instance of GuardianInvitation + newGuardianInvitation(): Classroom.Schema.GuardianInvitation; + // Create a new instance of IndividualStudentsOptions + newIndividualStudentsOptions(): Classroom.Schema.IndividualStudentsOptions; + // Create a new instance of Invitation + newInvitation(): Classroom.Schema.Invitation; + // Create a new instance of Link + newLink(): Classroom.Schema.Link; + // Create a new instance of Material + newMaterial(): Classroom.Schema.Material; + // Create a new instance of ModifyAnnouncementAssigneesRequest + newModifyAnnouncementAssigneesRequest(): Classroom.Schema.ModifyAnnouncementAssigneesRequest; + // Create a new instance of ModifyAttachmentsRequest + newModifyAttachmentsRequest(): Classroom.Schema.ModifyAttachmentsRequest; + // Create a new instance of ModifyCourseWorkAssigneesRequest + newModifyCourseWorkAssigneesRequest(): Classroom.Schema.ModifyCourseWorkAssigneesRequest; + // Create a new instance of ModifyIndividualStudentsOptions + newModifyIndividualStudentsOptions(): Classroom.Schema.ModifyIndividualStudentsOptions; + // Create a new instance of MultipleChoiceQuestion + newMultipleChoiceQuestion(): Classroom.Schema.MultipleChoiceQuestion; + // Create a new instance of MultipleChoiceSubmission + newMultipleChoiceSubmission(): Classroom.Schema.MultipleChoiceSubmission; + // Create a new instance of Name + newName(): Classroom.Schema.Name; + // Create a new instance of ReclaimStudentSubmissionRequest + newReclaimStudentSubmissionRequest(): any; + // Create a new instance of Registration + newRegistration(): Classroom.Schema.Registration; + // Create a new instance of ReturnStudentSubmissionRequest + newReturnStudentSubmissionRequest(): any; + // Create a new instance of SharedDriveFile + newSharedDriveFile(): Classroom.Schema.SharedDriveFile; + // Create a new instance of ShortAnswerSubmission + newShortAnswerSubmission(): Classroom.Schema.ShortAnswerSubmission; + // Create a new instance of StateHistory + newStateHistory(): Classroom.Schema.StateHistory; + // Create a new instance of Student + newStudent(): Classroom.Schema.Student; + // Create a new instance of StudentSubmission + newStudentSubmission(): Classroom.Schema.StudentSubmission; + // Create a new instance of SubmissionHistory + newSubmissionHistory(): Classroom.Schema.SubmissionHistory; + // Create a new instance of Teacher + newTeacher(): Classroom.Schema.Teacher; + // Create a new instance of TimeOfDay + newTimeOfDay(): Classroom.Schema.TimeOfDay; + // Create a new instance of TurnInStudentSubmissionRequest + newTurnInStudentSubmissionRequest(): any; + // Create a new instance of UserProfile + newUserProfile(): Classroom.Schema.UserProfile; + // Create a new instance of YouTubeVideo + newYouTubeVideo(): Classroom.Schema.YouTubeVideo; + } +} + +declare var Classroom: GoogleAppsScript.Classroom; diff --git a/types/google-apps-script/apis/content/v2.d.ts b/types/google-apps-script/apis/content/v2.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/content_v2.d.ts b/types/google-apps-script/apis/content_v2.d.ts new file mode 100644 index 0000000000..4fb398007a --- /dev/null +++ b/types/google-apps-script/apis/content_v2.d.ts @@ -0,0 +1,2366 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Content { + namespace Collection { + export interface AccountsCollection { + // Returns information about the authenticated user. + authinfo(): Content.Schema.AccountsAuthInfoResponse; + // Claims the website of a Merchant Center sub-account. + claimwebsite(merchantId: string, accountId: string): Content.Schema.AccountsClaimWebsiteResponse; + // Claims the website of a Merchant Center sub-account. + claimwebsite(merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountsClaimWebsiteResponse; + // Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. + custombatch(resource: Schema.AccountsCustomBatchRequest): Content.Schema.AccountsCustomBatchResponse; + // Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. + custombatch(resource: Schema.AccountsCustomBatchRequest, optionalArgs: object): Content.Schema.AccountsCustomBatchResponse; + // Retrieves a Merchant Center account. + get(merchantId: string, accountId: string): Content.Schema.Account; + // Creates a Merchant Center sub-account. + insert(resource: Schema.Account, merchantId: string): Content.Schema.Account; + // Creates a Merchant Center sub-account. + insert(resource: Schema.Account, merchantId: string, optionalArgs: object): Content.Schema.Account; + // Performs an action on a link between a Merchant Center account and another account. + link(resource: Schema.AccountsLinkRequest, merchantId: string, accountId: string): Content.Schema.AccountsLinkResponse; + // Lists the sub-accounts in your Merchant Center account. + list(merchantId: string): Content.Schema.AccountsListResponse; + // Lists the sub-accounts in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.AccountsListResponse; + // Updates a Merchant Center account. This method supports patch semantics. + patch(resource: Schema.Account, merchantId: string, accountId: string): Content.Schema.Account; + // Updates a Merchant Center account. This method supports patch semantics. + patch(resource: Schema.Account, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.Account; + // Deletes a Merchant Center sub-account. + remove(merchantId: string, accountId: string): void; + // Deletes a Merchant Center sub-account. + remove(merchantId: string, accountId: string, optionalArgs: object): void; + // Updates a Merchant Center account. + update(resource: Schema.Account, merchantId: string, accountId: string): Content.Schema.Account; + // Updates a Merchant Center account. + update(resource: Schema.Account, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.Account; + } + export interface AccountstatusesCollection { + // Retrieves multiple Merchant Center account statuses in a single request. + custombatch(resource: Schema.AccountstatusesCustomBatchRequest): Content.Schema.AccountstatusesCustomBatchResponse; + // Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts. + get(merchantId: string, accountId: string): Content.Schema.AccountStatus; + // Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts. + get(merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountStatus; + // Lists the statuses of the sub-accounts in your Merchant Center account. + list(merchantId: string): Content.Schema.AccountstatusesListResponse; + // Lists the statuses of the sub-accounts in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.AccountstatusesListResponse; + } + export interface AccounttaxCollection { + // Retrieves and updates tax settings of multiple accounts in a single request. + custombatch(resource: Schema.AccounttaxCustomBatchRequest): Content.Schema.AccounttaxCustomBatchResponse; + // Retrieves and updates tax settings of multiple accounts in a single request. + custombatch(resource: Schema.AccounttaxCustomBatchRequest, optionalArgs: object): Content.Schema.AccounttaxCustomBatchResponse; + // Retrieves the tax settings of the account. + get(merchantId: string, accountId: string): Content.Schema.AccountTax; + // Lists the tax settings of the sub-accounts in your Merchant Center account. + list(merchantId: string): Content.Schema.AccounttaxListResponse; + // Lists the tax settings of the sub-accounts in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.AccounttaxListResponse; + // Updates the tax settings of the account. This method supports patch semantics. + patch(resource: Schema.AccountTax, merchantId: string, accountId: string): Content.Schema.AccountTax; + // Updates the tax settings of the account. This method supports patch semantics. + patch(resource: Schema.AccountTax, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountTax; + // Updates the tax settings of the account. + update(resource: Schema.AccountTax, merchantId: string, accountId: string): Content.Schema.AccountTax; + // Updates the tax settings of the account. + update(resource: Schema.AccountTax, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountTax; + } + export interface DatafeedsCollection { + // Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request. + custombatch(resource: Schema.DatafeedsCustomBatchRequest): Content.Schema.DatafeedsCustomBatchResponse; + // Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request. + custombatch(resource: Schema.DatafeedsCustomBatchRequest, optionalArgs: object): Content.Schema.DatafeedsCustomBatchResponse; + // Invokes a fetch for the datafeed in your Merchant Center account. + fetchnow(merchantId: string, datafeedId: string): Content.Schema.DatafeedsFetchNowResponse; + // Invokes a fetch for the datafeed in your Merchant Center account. + fetchnow(merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.DatafeedsFetchNowResponse; + // Retrieves a datafeed configuration from your Merchant Center account. + get(merchantId: string, datafeedId: string): Content.Schema.Datafeed; + // Registers a datafeed configuration with your Merchant Center account. + insert(resource: Schema.Datafeed, merchantId: string): Content.Schema.Datafeed; + // Registers a datafeed configuration with your Merchant Center account. + insert(resource: Schema.Datafeed, merchantId: string, optionalArgs: object): Content.Schema.Datafeed; + // Lists the configurations for datafeeds in your Merchant Center account. + list(merchantId: string): Content.Schema.DatafeedsListResponse; + // Lists the configurations for datafeeds in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.DatafeedsListResponse; + // Updates a datafeed configuration of your Merchant Center account. This method supports patch semantics. + patch(resource: Schema.Datafeed, merchantId: string, datafeedId: string): Content.Schema.Datafeed; + // Updates a datafeed configuration of your Merchant Center account. This method supports patch semantics. + patch(resource: Schema.Datafeed, merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.Datafeed; + // Deletes a datafeed configuration from your Merchant Center account. + remove(merchantId: string, datafeedId: string): void; + // Deletes a datafeed configuration from your Merchant Center account. + remove(merchantId: string, datafeedId: string, optionalArgs: object): void; + // Updates a datafeed configuration of your Merchant Center account. + update(resource: Schema.Datafeed, merchantId: string, datafeedId: string): Content.Schema.Datafeed; + // Updates a datafeed configuration of your Merchant Center account. + update(resource: Schema.Datafeed, merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.Datafeed; + } + export interface DatafeedstatusesCollection { + // Gets multiple Merchant Center datafeed statuses in a single request. + custombatch(resource: Schema.DatafeedstatusesCustomBatchRequest): Content.Schema.DatafeedstatusesCustomBatchResponse; + // Retrieves the status of a datafeed from your Merchant Center account. + get(merchantId: string, datafeedId: string): Content.Schema.DatafeedStatus; + // Retrieves the status of a datafeed from your Merchant Center account. + get(merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.DatafeedStatus; + // Lists the statuses of the datafeeds in your Merchant Center account. + list(merchantId: string): Content.Schema.DatafeedstatusesListResponse; + // Lists the statuses of the datafeeds in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.DatafeedstatusesListResponse; + } + export interface InventoryCollection { + // Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. + custombatch(resource: Schema.InventoryCustomBatchRequest): Content.Schema.InventoryCustomBatchResponse; + // Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. + custombatch(resource: Schema.InventoryCustomBatchRequest, optionalArgs: object): Content.Schema.InventoryCustomBatchResponse; + // Updates price and availability of a product in your Merchant Center account. + set(resource: Schema.InventorySetRequest, merchantId: string, storeCode: string, productId: string): Content.Schema.InventorySetResponse; + // Updates price and availability of a product in your Merchant Center account. + set(resource: Schema.InventorySetRequest, merchantId: string, storeCode: string, productId: string, optionalArgs: object): Content.Schema.InventorySetResponse; + } + export interface LiasettingsCollection { + // Retrieves and/or updates the LIA settings of multiple accounts in a single request. + custombatch(resource: Schema.LiasettingsCustomBatchRequest): Content.Schema.LiasettingsCustomBatchResponse; + // Retrieves and/or updates the LIA settings of multiple accounts in a single request. + custombatch(resource: Schema.LiasettingsCustomBatchRequest, optionalArgs: object): Content.Schema.LiasettingsCustomBatchResponse; + // Retrieves the LIA settings of the account. + get(merchantId: string, accountId: string): Content.Schema.LiaSettings; + // Retrieves the list of accessible Google My Business accounts. + getaccessiblegmbaccounts(merchantId: string, accountId: string): Content.Schema.LiasettingsGetAccessibleGmbAccountsResponse; + // Lists the LIA settings of the sub-accounts in your Merchant Center account. + list(merchantId: string): Content.Schema.LiasettingsListResponse; + // Lists the LIA settings of the sub-accounts in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.LiasettingsListResponse; + // Retrieves the list of POS data providers that have active settings for the all eiligible countries. + listposdataproviders(): Content.Schema.LiasettingsListPosDataProvidersResponse; + // Updates the LIA settings of the account. This method supports patch semantics. + patch(resource: Schema.LiaSettings, merchantId: string, accountId: string): Content.Schema.LiaSettings; + // Updates the LIA settings of the account. This method supports patch semantics. + patch(resource: Schema.LiaSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.LiaSettings; + // Requests access to a specified Google My Business account. + requestgmbaccess(merchantId: string, accountId: string, gmbEmail: string): Content.Schema.LiasettingsRequestGmbAccessResponse; + // Requests inventory validation for the specified country. + requestinventoryverification(merchantId: string, accountId: string, country: string): Content.Schema.LiasettingsRequestInventoryVerificationResponse; + // Sets the inventory verification contract for the specified country. + setinventoryverificationcontact(merchantId: string, accountId: string, contactEmail: string, contactName: string, country: string, language: string): Content.Schema.LiasettingsSetInventoryVerificationContactResponse; + // Sets the POS data provider for the specified country. + setposdataprovider(merchantId: string, accountId: string, country: string): Content.Schema.LiasettingsSetPosDataProviderResponse; + // Sets the POS data provider for the specified country. + setposdataprovider(merchantId: string, accountId: string, country: string, optionalArgs: object): Content.Schema.LiasettingsSetPosDataProviderResponse; + // Updates the LIA settings of the account. + update(resource: Schema.LiaSettings, merchantId: string, accountId: string): Content.Schema.LiaSettings; + // Updates the LIA settings of the account. + update(resource: Schema.LiaSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.LiaSettings; + } + export interface OrderinvoicesCollection { + // Creates a charge invoice for a shipment group, and triggers a charge capture for non-facilitated payment orders. + createchargeinvoice(resource: Schema.OrderinvoicesCreateChargeInvoiceRequest, merchantId: string, orderId: string): Content.Schema.OrderinvoicesCreateChargeInvoiceResponse; + // Creates a refund invoice for one or more shipment groups, and triggers a refund for non-facilitated payment orders. This can only be used for line items that have previously been charged using createChargeInvoice. All amounts (except for the summary) are incremental with respect to the previous invoice. + createrefundinvoice(resource: Schema.OrderinvoicesCreateRefundInvoiceRequest, merchantId: string, orderId: string): Content.Schema.OrderinvoicesCreateRefundInvoiceResponse; + } + export interface OrderpaymentsCollection { + // Notify about successfully authorizing user's payment method for a given amount. + notifyauthapproved(resource: Schema.OrderpaymentsNotifyAuthApprovedRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyAuthApprovedResponse; + // Notify about failure to authorize user's payment method. + notifyauthdeclined(resource: Schema.OrderpaymentsNotifyAuthDeclinedRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyAuthDeclinedResponse; + // Notify about charge on user's selected payments method. + notifycharge(resource: Schema.OrderpaymentsNotifyChargeRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyChargeResponse; + // Notify about refund on user's selected payments method. + notifyrefund(resource: Schema.OrderpaymentsNotifyRefundRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyRefundResponse; + } + export interface OrderreportsCollection { + // Retrieves a report for disbursements from your Merchant Center account. + listdisbursements(merchantId: string, disbursementStartDate: string): Content.Schema.OrderreportsListDisbursementsResponse; + // Retrieves a report for disbursements from your Merchant Center account. + listdisbursements(merchantId: string, disbursementStartDate: string, optionalArgs: object): Content.Schema.OrderreportsListDisbursementsResponse; + // Retrieves a list of transactions for a disbursement from your Merchant Center account. + listtransactions(merchantId: string, disbursementId: string, transactionStartDate: string): Content.Schema.OrderreportsListTransactionsResponse; + // Retrieves a list of transactions for a disbursement from your Merchant Center account. + listtransactions(merchantId: string, disbursementId: string, transactionStartDate: string, optionalArgs: object): Content.Schema.OrderreportsListTransactionsResponse; + } + export interface OrderreturnsCollection { + // Retrieves an order return from your Merchant Center account. + get(merchantId: string, returnId: string): Content.Schema.MerchantOrderReturn; + // Lists order returns in your Merchant Center account. + list(merchantId: string): Content.Schema.OrderreturnsListResponse; + // Lists order returns in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.OrderreturnsListResponse; + } + export interface OrdersCollection { + // Marks an order as acknowledged. + acknowledge(resource: Schema.OrdersAcknowledgeRequest, merchantId: string, orderId: string): Content.Schema.OrdersAcknowledgeResponse; + // Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". + advancetestorder(merchantId: string, orderId: string): Content.Schema.OrdersAdvanceTestOrderResponse; + // Cancels all line items in an order, making a full refund. + cancel(resource: Schema.OrdersCancelRequest, merchantId: string, orderId: string): Content.Schema.OrdersCancelResponse; + // Cancels a line item, making a full refund. + cancellineitem(resource: Schema.OrdersCancelLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersCancelLineItemResponse; + // Sandbox only. Cancels a test order for customer-initiated cancellation. + canceltestorderbycustomer(resource: Schema.OrdersCancelTestOrderByCustomerRequest, merchantId: string, orderId: string): Content.Schema.OrdersCancelTestOrderByCustomerResponse; + // Sandbox only. Creates a test order. + createtestorder(resource: Schema.OrdersCreateTestOrderRequest, merchantId: string): Content.Schema.OrdersCreateTestOrderResponse; + // Sandbox only. Creates a test return. + createtestreturn(resource: Schema.OrdersCreateTestReturnRequest, merchantId: string, orderId: string): Content.Schema.OrdersCreateTestReturnResponse; + // Retrieves or modifies multiple orders in a single request. + custombatch(resource: Schema.OrdersCustomBatchRequest): Content.Schema.OrdersCustomBatchResponse; + // Retrieves an order from your Merchant Center account. + get(merchantId: string, orderId: string): Content.Schema.Order; + // Retrieves an order using merchant order ID. + getbymerchantorderid(merchantId: string, merchantOrderId: string): Content.Schema.OrdersGetByMerchantOrderIdResponse; + // Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. + gettestordertemplate(merchantId: string, templateName: string): Content.Schema.OrdersGetTestOrderTemplateResponse; + // Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. + gettestordertemplate(merchantId: string, templateName: string, optionalArgs: object): Content.Schema.OrdersGetTestOrderTemplateResponse; + // Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). + // Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return. + instorerefundlineitem(resource: Schema.OrdersInStoreRefundLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersInStoreRefundLineItemResponse; + // Lists the orders in your Merchant Center account. + list(merchantId: string): Content.Schema.OrdersListResponse; + // Lists the orders in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.OrdersListResponse; + // Deprecated, please use returnRefundLineItem instead. + refund(resource: Schema.OrdersRefundRequest, merchantId: string, orderId: string): Content.Schema.OrdersRefundResponse; + // Rejects return on an line item. + rejectreturnlineitem(resource: Schema.OrdersRejectReturnLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersRejectReturnLineItemResponse; + // Returns a line item. + returnlineitem(resource: Schema.OrdersReturnLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersReturnLineItemResponse; + // Returns and refunds a line item. Note that this method can only be called on fully shipped orders. + returnrefundlineitem(resource: Schema.OrdersReturnRefundLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersReturnRefundLineItemResponse; + // Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource. + setlineitemmetadata(resource: Schema.OrdersSetLineItemMetadataRequest, merchantId: string, orderId: string): Content.Schema.OrdersSetLineItemMetadataResponse; + // Marks line item(s) as shipped. + shiplineitems(resource: Schema.OrdersShipLineItemsRequest, merchantId: string, orderId: string): Content.Schema.OrdersShipLineItemsResponse; + // Updates ship by and delivery by dates for a line item. + updatelineitemshippingdetails(resource: Schema.OrdersUpdateLineItemShippingDetailsRequest, merchantId: string, orderId: string): Content.Schema.OrdersUpdateLineItemShippingDetailsResponse; + // Updates the merchant order ID for a given order. + updatemerchantorderid(resource: Schema.OrdersUpdateMerchantOrderIdRequest, merchantId: string, orderId: string): Content.Schema.OrdersUpdateMerchantOrderIdResponse; + // Updates a shipment's status, carrier, and/or tracking ID. + updateshipment(resource: Schema.OrdersUpdateShipmentRequest, merchantId: string, orderId: string): Content.Schema.OrdersUpdateShipmentResponse; + } + export interface PosCollection { + // Batches multiple POS-related calls in a single request. + custombatch(resource: Schema.PosCustomBatchRequest): Content.Schema.PosCustomBatchResponse; + // Batches multiple POS-related calls in a single request. + custombatch(resource: Schema.PosCustomBatchRequest, optionalArgs: object): Content.Schema.PosCustomBatchResponse; + // Retrieves information about the given store. + get(merchantId: string, targetMerchantId: string, storeCode: string): Content.Schema.PosStore; + // Creates a store for the given merchant. + insert(resource: Schema.PosStore, merchantId: string, targetMerchantId: string): Content.Schema.PosStore; + // Creates a store for the given merchant. + insert(resource: Schema.PosStore, merchantId: string, targetMerchantId: string, optionalArgs: object): Content.Schema.PosStore; + // Submit inventory for the given merchant. + inventory(resource: Schema.PosInventoryRequest, merchantId: string, targetMerchantId: string): Content.Schema.PosInventoryResponse; + // Submit inventory for the given merchant. + inventory(resource: Schema.PosInventoryRequest, merchantId: string, targetMerchantId: string, optionalArgs: object): Content.Schema.PosInventoryResponse; + // Lists the stores of the target merchant. + list(merchantId: string, targetMerchantId: string): Content.Schema.PosListResponse; + // Deletes a store for the given merchant. + remove(merchantId: string, targetMerchantId: string, storeCode: string): void; + // Deletes a store for the given merchant. + remove(merchantId: string, targetMerchantId: string, storeCode: string, optionalArgs: object): void; + // Submit a sale event for the given merchant. + sale(resource: Schema.PosSaleRequest, merchantId: string, targetMerchantId: string): Content.Schema.PosSaleResponse; + // Submit a sale event for the given merchant. + sale(resource: Schema.PosSaleRequest, merchantId: string, targetMerchantId: string, optionalArgs: object): Content.Schema.PosSaleResponse; + } + export interface ProductsCollection { + // Retrieves, inserts, and deletes multiple products in a single request. + custombatch(resource: Schema.ProductsCustomBatchRequest): Content.Schema.ProductsCustomBatchResponse; + // Retrieves, inserts, and deletes multiple products in a single request. + custombatch(resource: Schema.ProductsCustomBatchRequest, optionalArgs: object): Content.Schema.ProductsCustomBatchResponse; + // Retrieves a product from your Merchant Center account. + get(merchantId: string, productId: string): Content.Schema.Product; + // Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry. + insert(resource: Schema.Product, merchantId: string): Content.Schema.Product; + // Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry. + insert(resource: Schema.Product, merchantId: string, optionalArgs: object): Content.Schema.Product; + // Lists the products in your Merchant Center account. + list(merchantId: string): Content.Schema.ProductsListResponse; + // Lists the products in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.ProductsListResponse; + // Deletes a product from your Merchant Center account. + remove(merchantId: string, productId: string): void; + // Deletes a product from your Merchant Center account. + remove(merchantId: string, productId: string, optionalArgs: object): void; + } + export interface ProductstatusesCollection { + // Gets the statuses of multiple products in a single request. + custombatch(resource: Schema.ProductstatusesCustomBatchRequest): Content.Schema.ProductstatusesCustomBatchResponse; + // Gets the statuses of multiple products in a single request. + custombatch(resource: Schema.ProductstatusesCustomBatchRequest, optionalArgs: object): Content.Schema.ProductstatusesCustomBatchResponse; + // Gets the status of a product from your Merchant Center account. + get(merchantId: string, productId: string): Content.Schema.ProductStatus; + // Gets the status of a product from your Merchant Center account. + get(merchantId: string, productId: string, optionalArgs: object): Content.Schema.ProductStatus; + // Lists the statuses of the products in your Merchant Center account. + list(merchantId: string): Content.Schema.ProductstatusesListResponse; + // Lists the statuses of the products in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.ProductstatusesListResponse; + } + export interface ShippingsettingsCollection { + // Retrieves and updates the shipping settings of multiple accounts in a single request. + custombatch(resource: Schema.ShippingsettingsCustomBatchRequest): Content.Schema.ShippingsettingsCustomBatchResponse; + // Retrieves and updates the shipping settings of multiple accounts in a single request. + custombatch(resource: Schema.ShippingsettingsCustomBatchRequest, optionalArgs: object): Content.Schema.ShippingsettingsCustomBatchResponse; + // Retrieves the shipping settings of the account. + get(merchantId: string, accountId: string): Content.Schema.ShippingSettings; + // Retrieves supported carriers and carrier services for an account. + getsupportedcarriers(merchantId: string): Content.Schema.ShippingsettingsGetSupportedCarriersResponse; + // Retrieves supported holidays for an account. + getsupportedholidays(merchantId: string): Content.Schema.ShippingsettingsGetSupportedHolidaysResponse; + // Lists the shipping settings of the sub-accounts in your Merchant Center account. + list(merchantId: string): Content.Schema.ShippingsettingsListResponse; + // Lists the shipping settings of the sub-accounts in your Merchant Center account. + list(merchantId: string, optionalArgs: object): Content.Schema.ShippingsettingsListResponse; + // Updates the shipping settings of the account. This method supports patch semantics. + patch(resource: Schema.ShippingSettings, merchantId: string, accountId: string): Content.Schema.ShippingSettings; + // Updates the shipping settings of the account. This method supports patch semantics. + patch(resource: Schema.ShippingSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.ShippingSettings; + // Updates the shipping settings of the account. + update(resource: Schema.ShippingSettings, merchantId: string, accountId: string): Content.Schema.ShippingSettings; + // Updates the shipping settings of the account. + update(resource: Schema.ShippingSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.ShippingSettings; + } + } + namespace Schema { + export interface Account { + adultContent?: boolean; + adwordsLinks?: Content.Schema.AccountAdwordsLink[]; + businessInformation?: Content.Schema.AccountBusinessInformation; + googleMyBusinessLink?: Content.Schema.AccountGoogleMyBusinessLink; + id?: string; + kind?: string; + name?: string; + reviewsUrl?: string; + sellerId?: string; + users?: Content.Schema.AccountUser[]; + websiteUrl?: string; + youtubeChannelLinks?: Content.Schema.AccountYouTubeChannelLink[]; + } + export interface AccountAddress { + country?: string; + locality?: string; + postalCode?: string; + region?: string; + streetAddress?: string; + } + export interface AccountAdwordsLink { + adwordsId?: string; + status?: string; + } + export interface AccountBusinessInformation { + address?: Content.Schema.AccountAddress; + customerService?: Content.Schema.AccountCustomerService; + phoneNumber?: string; + } + export interface AccountCustomerService { + email?: string; + phoneNumber?: string; + url?: string; + } + export interface AccountGoogleMyBusinessLink { + gmbEmail?: string; + status?: string; + } + export interface AccountIdentifier { + aggregatorId?: string; + merchantId?: string; + } + export interface AccountStatus { + accountId?: string; + accountLevelIssues?: Content.Schema.AccountStatusAccountLevelIssue[]; + dataQualityIssues?: Content.Schema.AccountStatusDataQualityIssue[]; + kind?: string; + products?: Content.Schema.AccountStatusProducts[]; + websiteClaimed?: boolean; + } + export interface AccountStatusAccountLevelIssue { + country?: string; + destination?: string; + detail?: string; + documentation?: string; + id?: string; + severity?: string; + title?: string; + } + export interface AccountStatusDataQualityIssue { + country?: string; + destination?: string; + detail?: string; + displayedValue?: string; + exampleItems?: Content.Schema.AccountStatusExampleItem[]; + id?: string; + lastChecked?: string; + location?: string; + numItems?: number; + severity?: string; + submittedValue?: string; + } + export interface AccountStatusExampleItem { + itemId?: string; + link?: string; + submittedValue?: string; + title?: string; + valueOnLandingPage?: string; + } + export interface AccountStatusItemLevelIssue { + attributeName?: string; + code?: string; + description?: string; + detail?: string; + documentation?: string; + numItems?: string; + resolution?: string; + servability?: string; + } + export interface AccountStatusProducts { + channel?: string; + country?: string; + destination?: string; + itemLevelIssues?: Content.Schema.AccountStatusItemLevelIssue[]; + statistics?: Content.Schema.AccountStatusStatistics; + } + export interface AccountStatusStatistics { + active?: string; + disapproved?: string; + expiring?: string; + pending?: string; + } + export interface AccountTax { + accountId?: string; + kind?: string; + rules?: Content.Schema.AccountTaxTaxRule[]; + } + export interface AccountTaxTaxRule { + country?: string; + locationId?: string; + ratePercent?: string; + shippingTaxed?: boolean; + useGlobalRate?: boolean; + } + export interface AccountUser { + admin?: boolean; + emailAddress?: string; + orderManager?: boolean; + paymentsAnalyst?: boolean; + paymentsManager?: boolean; + } + export interface AccountYouTubeChannelLink { + channelId?: string; + status?: string; + } + export interface AccountsAuthInfoResponse { + accountIdentifiers?: Content.Schema.AccountIdentifier[]; + kind?: string; + } + export interface AccountsClaimWebsiteResponse { + kind?: string; + } + export interface AccountsCustomBatchRequest { + entries?: Content.Schema.AccountsCustomBatchRequestEntry[]; + } + export interface AccountsCustomBatchRequestEntry { + account?: Content.Schema.Account; + accountId?: string; + batchId?: number; + force?: boolean; + linkRequest?: Content.Schema.AccountsCustomBatchRequestEntryLinkRequest; + merchantId?: string; + method?: string; + overwrite?: boolean; + } + export interface AccountsCustomBatchRequestEntryLinkRequest { + action?: string; + linkType?: string; + linkedAccountId?: string; + } + export interface AccountsCustomBatchResponse { + entries?: Content.Schema.AccountsCustomBatchResponseEntry[]; + kind?: string; + } + export interface AccountsCustomBatchResponseEntry { + account?: Content.Schema.Account; + batchId?: number; + errors?: Content.Schema.Errors; + kind?: string; + linkStatus?: string; + } + export interface AccountsLinkRequest { + action?: string; + linkType?: string; + linkedAccountId?: string; + } + export interface AccountsLinkResponse { + kind?: string; + } + export interface AccountsListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.Account[]; + } + export interface AccountstatusesCustomBatchRequest { + entries?: Content.Schema.AccountstatusesCustomBatchRequestEntry[]; + } + export interface AccountstatusesCustomBatchRequestEntry { + accountId?: string; + batchId?: number; + destinations?: string[]; + merchantId?: string; + method?: string; + } + export interface AccountstatusesCustomBatchResponse { + entries?: Content.Schema.AccountstatusesCustomBatchResponseEntry[]; + kind?: string; + } + export interface AccountstatusesCustomBatchResponseEntry { + accountStatus?: Content.Schema.AccountStatus; + batchId?: number; + errors?: Content.Schema.Errors; + } + export interface AccountstatusesListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.AccountStatus[]; + } + export interface AccounttaxCustomBatchRequest { + entries?: Content.Schema.AccounttaxCustomBatchRequestEntry[]; + } + export interface AccounttaxCustomBatchRequestEntry { + accountId?: string; + accountTax?: Content.Schema.AccountTax; + batchId?: number; + merchantId?: string; + method?: string; + } + export interface AccounttaxCustomBatchResponse { + entries?: Content.Schema.AccounttaxCustomBatchResponseEntry[]; + kind?: string; + } + export interface AccounttaxCustomBatchResponseEntry { + accountTax?: Content.Schema.AccountTax; + batchId?: number; + errors?: Content.Schema.Errors; + kind?: string; + } + export interface AccounttaxListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.AccountTax[]; + } + export interface Amount { + pretax?: Content.Schema.Price; + tax?: Content.Schema.Price; + } + export interface CarrierRate { + carrierName?: string; + carrierService?: string; + flatAdjustment?: Content.Schema.Price; + name?: string; + originPostalCode?: string; + percentageAdjustment?: string; + } + export interface CarriersCarrier { + country?: string; + name?: string; + services?: string[]; + } + export interface CustomAttribute { + name?: string; + type?: string; + unit?: string; + value?: string; + } + export interface CustomGroup { + attributes?: Content.Schema.CustomAttribute[]; + name?: string; + } + export interface CustomerReturnReason { + description?: string; + reasonCode?: string; + } + export interface CutoffTime { + hour?: number; + minute?: number; + timezone?: string; + } + export interface Datafeed { + attributeLanguage?: string; + contentLanguage?: string; + contentType?: string; + fetchSchedule?: Content.Schema.DatafeedFetchSchedule; + fileName?: string; + format?: Content.Schema.DatafeedFormat; + id?: string; + intendedDestinations?: string[]; + kind?: string; + name?: string; + targetCountry?: string; + targets?: Content.Schema.DatafeedTarget[]; + } + export interface DatafeedFetchSchedule { + dayOfMonth?: number; + fetchUrl?: string; + hour?: number; + minuteOfHour?: number; + password?: string; + paused?: boolean; + timeZone?: string; + username?: string; + weekday?: string; + } + export interface DatafeedFormat { + columnDelimiter?: string; + fileEncoding?: string; + quotingMode?: string; + } + export interface DatafeedStatus { + country?: string; + datafeedId?: string; + errors?: Content.Schema.DatafeedStatusError[]; + itemsTotal?: string; + itemsValid?: string; + kind?: string; + language?: string; + lastUploadDate?: string; + processingStatus?: string; + warnings?: Content.Schema.DatafeedStatusError[]; + } + export interface DatafeedStatusError { + code?: string; + count?: string; + examples?: Content.Schema.DatafeedStatusExample[]; + message?: string; + } + export interface DatafeedStatusExample { + itemId?: string; + lineNumber?: string; + value?: string; + } + export interface DatafeedTarget { + country?: string; + excludedDestinations?: string[]; + includedDestinations?: string[]; + language?: string; + } + export interface DatafeedsCustomBatchRequest { + entries?: Content.Schema.DatafeedsCustomBatchRequestEntry[]; + } + export interface DatafeedsCustomBatchRequestEntry { + batchId?: number; + datafeed?: Content.Schema.Datafeed; + datafeedId?: string; + merchantId?: string; + method?: string; + } + export interface DatafeedsCustomBatchResponse { + entries?: Content.Schema.DatafeedsCustomBatchResponseEntry[]; + kind?: string; + } + export interface DatafeedsCustomBatchResponseEntry { + batchId?: number; + datafeed?: Content.Schema.Datafeed; + errors?: Content.Schema.Errors; + } + export interface DatafeedsFetchNowResponse { + kind?: string; + } + export interface DatafeedsListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.Datafeed[]; + } + export interface DatafeedstatusesCustomBatchRequest { + entries?: Content.Schema.DatafeedstatusesCustomBatchRequestEntry[]; + } + export interface DatafeedstatusesCustomBatchRequestEntry { + batchId?: number; + country?: string; + datafeedId?: string; + language?: string; + merchantId?: string; + method?: string; + } + export interface DatafeedstatusesCustomBatchResponse { + entries?: Content.Schema.DatafeedstatusesCustomBatchResponseEntry[]; + kind?: string; + } + export interface DatafeedstatusesCustomBatchResponseEntry { + batchId?: number; + datafeedStatus?: Content.Schema.DatafeedStatus; + errors?: Content.Schema.Errors; + } + export interface DatafeedstatusesListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.DatafeedStatus[]; + } + export interface DeliveryTime { + cutoffTime?: Content.Schema.CutoffTime; + holidayCutoffs?: Content.Schema.HolidayCutoff[]; + maxHandlingTimeInDays?: number; + maxTransitTimeInDays?: number; + minHandlingTimeInDays?: number; + minTransitTimeInDays?: number; + transitTimeTable?: Content.Schema.TransitTable; + } + export interface Error { + domain?: string; + message?: string; + reason?: string; + } + export interface Errors { + code?: number; + errors?: Content.Schema.Error[]; + message?: string; + } + export interface GmbAccounts { + accountId?: string; + gmbAccounts?: Content.Schema.GmbAccountsGmbAccount[]; + } + export interface GmbAccountsGmbAccount { + email?: string; + listingCount?: string; + name?: string; + type?: string; + } + export interface Headers { + locations?: Content.Schema.LocationIdSet[]; + numberOfItems?: string[]; + postalCodeGroupNames?: string[]; + prices?: Content.Schema.Price[]; + weights?: Content.Schema.Weight[]; + } + export interface HolidayCutoff { + deadlineDate?: string; + deadlineHour?: number; + deadlineTimezone?: string; + holidayId?: string; + visibleFromDate?: string; + } + export interface HolidaysHoliday { + countryCode?: string; + date?: string; + deliveryGuaranteeDate?: string; + deliveryGuaranteeHour?: string; + id?: string; + type?: string; + } + export interface Installment { + amount?: Content.Schema.Price; + months?: string; + } + export interface Inventory { + availability?: string; + customLabel0?: string; + customLabel1?: string; + customLabel2?: string; + customLabel3?: string; + customLabel4?: string; + installment?: Content.Schema.Installment; + instoreProductLocation?: string; + kind?: string; + loyaltyPoints?: Content.Schema.LoyaltyPoints; + pickup?: Content.Schema.InventoryPickup; + price?: Content.Schema.Price; + quantity?: number; + salePrice?: Content.Schema.Price; + salePriceEffectiveDate?: string; + sellOnGoogleQuantity?: number; + } + export interface InventoryCustomBatchRequest { + entries?: Content.Schema.InventoryCustomBatchRequestEntry[]; + } + export interface InventoryCustomBatchRequestEntry { + batchId?: number; + inventory?: Content.Schema.Inventory; + merchantId?: string; + productId?: string; + storeCode?: string; + } + export interface InventoryCustomBatchResponse { + entries?: Content.Schema.InventoryCustomBatchResponseEntry[]; + kind?: string; + } + export interface InventoryCustomBatchResponseEntry { + batchId?: number; + errors?: Content.Schema.Errors; + kind?: string; + } + export interface InventoryPickup { + pickupMethod?: string; + pickupSla?: string; + } + export interface InventorySetRequest { + availability?: string; + customLabel0?: string; + customLabel1?: string; + customLabel2?: string; + customLabel3?: string; + customLabel4?: string; + installment?: Content.Schema.Installment; + instoreProductLocation?: string; + loyaltyPoints?: Content.Schema.LoyaltyPoints; + pickup?: Content.Schema.InventoryPickup; + price?: Content.Schema.Price; + quantity?: number; + salePrice?: Content.Schema.Price; + salePriceEffectiveDate?: string; + sellOnGoogleQuantity?: number; + } + export interface InventorySetResponse { + kind?: string; + } + export interface InvoiceSummary { + additionalChargeSummaries?: Content.Schema.InvoiceSummaryAdditionalChargeSummary[]; + customerBalance?: Content.Schema.Amount; + googleBalance?: Content.Schema.Amount; + merchantBalance?: Content.Schema.Amount; + productTotal?: Content.Schema.Amount; + promotionSummaries?: Content.Schema.Promotion[]; + } + export interface InvoiceSummaryAdditionalChargeSummary { + totalAmount?: Content.Schema.Amount; + type?: string; + } + export interface LiaAboutPageSettings { + status?: string; + url?: string; + } + export interface LiaCountrySettings { + about?: Content.Schema.LiaAboutPageSettings; + country?: string; + hostedLocalStorefrontActive?: boolean; + inventory?: Content.Schema.LiaInventorySettings; + onDisplayToOrder?: Content.Schema.LiaOnDisplayToOrderSettings; + posDataProvider?: Content.Schema.LiaPosDataProvider; + storePickupActive?: boolean; + } + export interface LiaInventorySettings { + inventoryVerificationContactEmail?: string; + inventoryVerificationContactName?: string; + inventoryVerificationContactStatus?: string; + status?: string; + } + export interface LiaOnDisplayToOrderSettings { + shippingCostPolicyUrl?: string; + status?: string; + } + export interface LiaPosDataProvider { + posDataProviderId?: string; + posExternalAccountId?: string; + } + export interface LiaSettings { + accountId?: string; + countrySettings?: Content.Schema.LiaCountrySettings[]; + kind?: string; + } + export interface LiasettingsCustomBatchRequest { + entries?: Content.Schema.LiasettingsCustomBatchRequestEntry[]; + } + export interface LiasettingsCustomBatchRequestEntry { + accountId?: string; + batchId?: number; + contactEmail?: string; + contactName?: string; + country?: string; + gmbEmail?: string; + liaSettings?: Content.Schema.LiaSettings; + merchantId?: string; + method?: string; + posDataProviderId?: string; + posExternalAccountId?: string; + } + export interface LiasettingsCustomBatchResponse { + entries?: Content.Schema.LiasettingsCustomBatchResponseEntry[]; + kind?: string; + } + export interface LiasettingsCustomBatchResponseEntry { + batchId?: number; + errors?: Content.Schema.Errors; + gmbAccounts?: Content.Schema.GmbAccounts; + kind?: string; + liaSettings?: Content.Schema.LiaSettings; + posDataProviders?: Content.Schema.PosDataProviders[]; + } + export interface LiasettingsGetAccessibleGmbAccountsResponse { + accountId?: string; + gmbAccounts?: Content.Schema.GmbAccountsGmbAccount[]; + kind?: string; + } + export interface LiasettingsListPosDataProvidersResponse { + kind?: string; + posDataProviders?: Content.Schema.PosDataProviders[]; + } + export interface LiasettingsListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.LiaSettings[]; + } + export interface LiasettingsRequestGmbAccessResponse { + kind?: string; + } + export interface LiasettingsRequestInventoryVerificationResponse { + kind?: string; + } + export interface LiasettingsSetInventoryVerificationContactResponse { + kind?: string; + } + export interface LiasettingsSetPosDataProviderResponse { + kind?: string; + } + export interface LocationIdSet { + locationIds?: string[]; + } + export interface LoyaltyPoints { + name?: string; + pointsValue?: string; + ratio?: Number; + } + export interface MerchantOrderReturn { + creationDate?: string; + merchantOrderId?: string; + orderId?: string; + orderReturnId?: string; + returnItems?: Content.Schema.MerchantOrderReturnItem[]; + returnShipments?: Content.Schema.ReturnShipment[]; + } + export interface MerchantOrderReturnItem { + customerReturnReason?: Content.Schema.CustomerReturnReason; + itemId?: string; + merchantReturnReason?: Content.Schema.RefundReason; + product?: Content.Schema.OrderLineItemProduct; + returnShipmentIds?: string[]; + state?: string; + } + export interface Order { + acknowledged?: boolean; + channelType?: string; + customer?: Content.Schema.OrderCustomer; + deliveryDetails?: Content.Schema.OrderDeliveryDetails; + id?: string; + kind?: string; + lineItems?: Content.Schema.OrderLineItem[]; + merchantId?: string; + merchantOrderId?: string; + netAmount?: Content.Schema.Price; + paymentMethod?: Content.Schema.OrderPaymentMethod; + paymentStatus?: string; + placedDate?: string; + promotions?: Content.Schema.OrderLegacyPromotion[]; + refunds?: Content.Schema.OrderRefund[]; + shipments?: Content.Schema.OrderShipment[]; + shippingCost?: Content.Schema.Price; + shippingCostTax?: Content.Schema.Price; + shippingOption?: string; + status?: string; + taxCollector?: string; + } + export interface OrderAddress { + country?: string; + fullAddress?: string[]; + isPostOfficeBox?: boolean; + locality?: string; + postalCode?: string; + recipientName?: string; + region?: string; + streetAddress?: string[]; + } + export interface OrderCancellation { + actor?: string; + creationDate?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrderCustomer { + email?: string; + explicitMarketingPreference?: boolean; + fullName?: string; + marketingRightsInfo?: Content.Schema.OrderCustomerMarketingRightsInfo; + } + export interface OrderCustomerMarketingRightsInfo { + explicitMarketingPreference?: string; + lastUpdatedTimestamp?: string; + marketingEmailAddress?: string; + } + export interface OrderDeliveryDetails { + address?: Content.Schema.OrderAddress; + phoneNumber?: string; + } + export interface OrderLegacyPromotion { + benefits?: Content.Schema.OrderLegacyPromotionBenefit[]; + effectiveDates?: string; + genericRedemptionCode?: string; + id?: string; + longTitle?: string; + productApplicability?: string; + redemptionChannel?: string; + } + export interface OrderLegacyPromotionBenefit { + discount?: Content.Schema.Price; + offerIds?: string[]; + subType?: string; + taxImpact?: Content.Schema.Price; + type?: string; + } + export interface OrderLineItem { + annotations?: Content.Schema.OrderMerchantProvidedAnnotation[]; + cancellations?: Content.Schema.OrderCancellation[]; + id?: string; + price?: Content.Schema.Price; + product?: Content.Schema.OrderLineItemProduct; + quantityCanceled?: number; + quantityDelivered?: number; + quantityOrdered?: number; + quantityPending?: number; + quantityReturned?: number; + quantityShipped?: number; + returnInfo?: Content.Schema.OrderLineItemReturnInfo; + returns?: Content.Schema.OrderReturn[]; + shippingDetails?: Content.Schema.OrderLineItemShippingDetails; + tax?: Content.Schema.Price; + } + export interface OrderLineItemProduct { + brand?: string; + channel?: string; + condition?: string; + contentLanguage?: string; + fees?: Content.Schema.OrderLineItemProductFee[]; + gtin?: string; + id?: string; + imageLink?: string; + itemGroupId?: string; + mpn?: string; + offerId?: string; + price?: Content.Schema.Price; + shownImage?: string; + targetCountry?: string; + title?: string; + variantAttributes?: Content.Schema.OrderLineItemProductVariantAttribute[]; + } + export interface OrderLineItemProductFee { + amount?: Content.Schema.Price; + name?: string; + } + export interface OrderLineItemProductVariantAttribute { + dimension?: string; + value?: string; + } + export interface OrderLineItemReturnInfo { + daysToReturn?: number; + isReturnable?: boolean; + policyUrl?: string; + } + export interface OrderLineItemShippingDetails { + deliverByDate?: string; + method?: Content.Schema.OrderLineItemShippingDetailsMethod; + shipByDate?: string; + } + export interface OrderLineItemShippingDetailsMethod { + carrier?: string; + maxDaysInTransit?: number; + methodName?: string; + minDaysInTransit?: number; + } + export interface OrderMerchantProvidedAnnotation { + key?: string; + value?: string; + } + export interface OrderPaymentMethod { + billingAddress?: Content.Schema.OrderAddress; + expirationMonth?: number; + expirationYear?: number; + lastFourDigits?: string; + phoneNumber?: string; + type?: string; + } + export interface OrderRefund { + actor?: string; + amount?: Content.Schema.Price; + creationDate?: string; + reason?: string; + reasonText?: string; + } + export interface OrderReportDisbursement { + disbursementAmount?: Content.Schema.Price; + disbursementCreationDate?: string; + disbursementDate?: string; + disbursementId?: string; + merchantId?: string; + } + export interface OrderReportTransaction { + disbursementAmount?: Content.Schema.Price; + disbursementCreationDate?: string; + disbursementDate?: string; + disbursementId?: string; + merchantId?: string; + merchantOrderId?: string; + orderId?: string; + productAmount?: Content.Schema.Amount; + productAmountWithRemittedTax?: Content.Schema.ProductAmount; + transactionDate?: string; + } + export interface OrderReturn { + actor?: string; + creationDate?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrderShipment { + carrier?: string; + creationDate?: string; + deliveryDate?: string; + id?: string; + lineItems?: Content.Schema.OrderShipmentLineItemShipment[]; + status?: string; + trackingId?: string; + } + export interface OrderShipmentLineItemShipment { + lineItemId?: string; + productId?: string; + quantity?: number; + } + export interface OrderinvoicesCreateChargeInvoiceRequest { + invoiceId?: string; + invoiceSummary?: Content.Schema.InvoiceSummary; + lineItemInvoices?: Content.Schema.ShipmentInvoiceLineItemInvoice[]; + operationId?: string; + shipmentGroupId?: string; + } + export interface OrderinvoicesCreateChargeInvoiceResponse { + executionStatus?: string; + kind?: string; + } + export interface OrderinvoicesCreateRefundInvoiceRequest { + invoiceId?: string; + operationId?: string; + refundOnlyOption?: Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption; + returnOption?: Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption; + shipmentInvoices?: Content.Schema.ShipmentInvoice[]; + } + export interface OrderinvoicesCreateRefundInvoiceResponse { + executionStatus?: string; + kind?: string; + } + export interface OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption { + description?: string; + reason?: string; + } + export interface OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption { + description?: string; + reason?: string; + } + export interface OrderpaymentsNotifyAuthApprovedRequest { + authAmountPretax?: Content.Schema.Price; + authAmountTax?: Content.Schema.Price; + } + export interface OrderpaymentsNotifyAuthApprovedResponse { + executionStatus?: string; + kind?: string; + } + export interface OrderpaymentsNotifyAuthDeclinedRequest { + declineReason?: string; + } + export interface OrderpaymentsNotifyAuthDeclinedResponse { + executionStatus?: string; + kind?: string; + } + export interface OrderpaymentsNotifyChargeRequest { + chargeState?: string; + invoiceId?: string; + invoiceIds?: string[]; + } + export interface OrderpaymentsNotifyChargeResponse { + executionStatus?: string; + kind?: string; + } + export interface OrderpaymentsNotifyRefundRequest { + invoiceId?: string; + invoiceIds?: string[]; + refundState?: string; + } + export interface OrderpaymentsNotifyRefundResponse { + executionStatus?: string; + kind?: string; + } + export interface OrderreportsListDisbursementsResponse { + disbursements?: Content.Schema.OrderReportDisbursement[]; + kind?: string; + nextPageToken?: string; + } + export interface OrderreportsListTransactionsResponse { + kind?: string; + nextPageToken?: string; + transactions?: Content.Schema.OrderReportTransaction[]; + } + export interface OrderreturnsListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.MerchantOrderReturn[]; + } + export interface OrdersAcknowledgeRequest { + operationId?: string; + } + export interface OrdersAcknowledgeResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersAdvanceTestOrderResponse { + kind?: string; + } + export interface OrdersCancelLineItemRequest { + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + lineItemId?: string; + operationId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersCancelLineItemResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersCancelRequest { + operationId?: string; + reason?: string; + reasonText?: string; + } + export interface OrdersCancelResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersCancelTestOrderByCustomerRequest { + reason?: string; + } + export interface OrdersCancelTestOrderByCustomerResponse { + kind?: string; + } + export interface OrdersCreateTestOrderRequest { + country?: string; + templateName?: string; + testOrder?: Content.Schema.TestOrder; + } + export interface OrdersCreateTestOrderResponse { + kind?: string; + orderId?: string; + } + export interface OrdersCreateTestReturnRequest { + items?: Content.Schema.OrdersCustomBatchRequestEntryCreateTestReturnReturnItem[]; + } + export interface OrdersCreateTestReturnResponse { + kind?: string; + returnId?: string; + } + export interface OrdersCustomBatchRequest { + entries?: Content.Schema.OrdersCustomBatchRequestEntry[]; + } + export interface OrdersCustomBatchRequestEntry { + batchId?: number; + cancel?: Content.Schema.OrdersCustomBatchRequestEntryCancel; + cancelLineItem?: Content.Schema.OrdersCustomBatchRequestEntryCancelLineItem; + inStoreRefundLineItem?: Content.Schema.OrdersCustomBatchRequestEntryInStoreRefundLineItem; + merchantId?: string; + merchantOrderId?: string; + method?: string; + operationId?: string; + orderId?: string; + refund?: Content.Schema.OrdersCustomBatchRequestEntryRefund; + rejectReturnLineItem?: Content.Schema.OrdersCustomBatchRequestEntryRejectReturnLineItem; + returnLineItem?: Content.Schema.OrdersCustomBatchRequestEntryReturnLineItem; + returnRefundLineItem?: Content.Schema.OrdersCustomBatchRequestEntryReturnRefundLineItem; + setLineItemMetadata?: Content.Schema.OrdersCustomBatchRequestEntrySetLineItemMetadata; + shipLineItems?: Content.Schema.OrdersCustomBatchRequestEntryShipLineItems; + updateLineItemShippingDetails?: Content.Schema.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails; + updateShipment?: Content.Schema.OrdersCustomBatchRequestEntryUpdateShipment; + } + export interface OrdersCustomBatchRequestEntryCancel { + reason?: string; + reasonText?: string; + } + export interface OrdersCustomBatchRequestEntryCancelLineItem { + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + lineItemId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersCustomBatchRequestEntryCreateTestReturnReturnItem { + lineItemId?: string; + quantity?: number; + } + export interface OrdersCustomBatchRequestEntryInStoreRefundLineItem { + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + lineItemId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersCustomBatchRequestEntryRefund { + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + reason?: string; + reasonText?: string; + } + export interface OrdersCustomBatchRequestEntryRejectReturnLineItem { + lineItemId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersCustomBatchRequestEntryReturnLineItem { + lineItemId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersCustomBatchRequestEntryReturnRefundLineItem { + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + lineItemId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersCustomBatchRequestEntrySetLineItemMetadata { + annotations?: Content.Schema.OrderMerchantProvidedAnnotation[]; + lineItemId?: string; + productId?: string; + } + export interface OrdersCustomBatchRequestEntryShipLineItems { + carrier?: string; + lineItems?: Content.Schema.OrderShipmentLineItemShipment[]; + shipmentGroupId?: string; + shipmentId?: string; + shipmentInfos?: Content.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; + trackingId?: string; + } + export interface OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo { + carrier?: string; + shipmentId?: string; + trackingId?: string; + } + export interface OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails { + deliverByDate?: string; + lineItemId?: string; + productId?: string; + shipByDate?: string; + } + export interface OrdersCustomBatchRequestEntryUpdateShipment { + carrier?: string; + deliveryDate?: string; + shipmentId?: string; + status?: string; + trackingId?: string; + } + export interface OrdersCustomBatchResponse { + entries?: Content.Schema.OrdersCustomBatchResponseEntry[]; + kind?: string; + } + export interface OrdersCustomBatchResponseEntry { + batchId?: number; + errors?: Content.Schema.Errors; + executionStatus?: string; + kind?: string; + order?: Content.Schema.Order; + } + export interface OrdersGetByMerchantOrderIdResponse { + kind?: string; + order?: Content.Schema.Order; + } + export interface OrdersGetTestOrderTemplateResponse { + kind?: string; + template?: Content.Schema.TestOrder; + } + export interface OrdersInStoreRefundLineItemRequest { + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + lineItemId?: string; + operationId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersInStoreRefundLineItemResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.Order[]; + } + export interface OrdersRefundRequest { + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + operationId?: string; + reason?: string; + reasonText?: string; + } + export interface OrdersRefundResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersRejectReturnLineItemRequest { + lineItemId?: string; + operationId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersRejectReturnLineItemResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersReturnLineItemRequest { + lineItemId?: string; + operationId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersReturnLineItemResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersReturnRefundLineItemRequest { + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; + lineItemId?: string; + operationId?: string; + productId?: string; + quantity?: number; + reason?: string; + reasonText?: string; + } + export interface OrdersReturnRefundLineItemResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersSetLineItemMetadataRequest { + annotations?: Content.Schema.OrderMerchantProvidedAnnotation[]; + lineItemId?: string; + operationId?: string; + productId?: string; + } + export interface OrdersSetLineItemMetadataResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersShipLineItemsRequest { + carrier?: string; + lineItems?: Content.Schema.OrderShipmentLineItemShipment[]; + operationId?: string; + shipmentGroupId?: string; + shipmentId?: string; + shipmentInfos?: Content.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; + trackingId?: string; + } + export interface OrdersShipLineItemsResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersUpdateLineItemShippingDetailsRequest { + deliverByDate?: string; + lineItemId?: string; + operationId?: string; + productId?: string; + shipByDate?: string; + } + export interface OrdersUpdateLineItemShippingDetailsResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersUpdateMerchantOrderIdRequest { + merchantOrderId?: string; + operationId?: string; + } + export interface OrdersUpdateMerchantOrderIdResponse { + executionStatus?: string; + kind?: string; + } + export interface OrdersUpdateShipmentRequest { + carrier?: string; + deliveryDate?: string; + operationId?: string; + shipmentId?: string; + status?: string; + trackingId?: string; + } + export interface OrdersUpdateShipmentResponse { + executionStatus?: string; + kind?: string; + } + export interface PosCustomBatchRequest { + entries?: Content.Schema.PosCustomBatchRequestEntry[]; + } + export interface PosCustomBatchRequestEntry { + batchId?: number; + inventory?: Content.Schema.PosInventory; + merchantId?: string; + method?: string; + sale?: Content.Schema.PosSale; + store?: Content.Schema.PosStore; + storeCode?: string; + targetMerchantId?: string; + } + export interface PosCustomBatchResponse { + entries?: Content.Schema.PosCustomBatchResponseEntry[]; + kind?: string; + } + export interface PosCustomBatchResponseEntry { + batchId?: number; + errors?: Content.Schema.Errors; + inventory?: Content.Schema.PosInventory; + kind?: string; + sale?: Content.Schema.PosSale; + store?: Content.Schema.PosStore; + } + export interface PosDataProviders { + country?: string; + posDataProviders?: Content.Schema.PosDataProvidersPosDataProvider[]; + } + export interface PosDataProvidersPosDataProvider { + displayName?: string; + fullName?: string; + providerId?: string; + } + export interface PosInventory { + contentLanguage?: string; + gtin?: string; + itemId?: string; + kind?: string; + price?: Content.Schema.Price; + quantity?: string; + storeCode?: string; + targetCountry?: string; + timestamp?: string; + } + export interface PosInventoryRequest { + contentLanguage?: string; + gtin?: string; + itemId?: string; + price?: Content.Schema.Price; + quantity?: string; + storeCode?: string; + targetCountry?: string; + timestamp?: string; + } + export interface PosInventoryResponse { + contentLanguage?: string; + gtin?: string; + itemId?: string; + kind?: string; + price?: Content.Schema.Price; + quantity?: string; + storeCode?: string; + targetCountry?: string; + timestamp?: string; + } + export interface PosListResponse { + kind?: string; + resources?: Content.Schema.PosStore[]; + } + export interface PosSale { + contentLanguage?: string; + gtin?: string; + itemId?: string; + kind?: string; + price?: Content.Schema.Price; + quantity?: string; + saleId?: string; + storeCode?: string; + targetCountry?: string; + timestamp?: string; + } + export interface PosSaleRequest { + contentLanguage?: string; + gtin?: string; + itemId?: string; + price?: Content.Schema.Price; + quantity?: string; + saleId?: string; + storeCode?: string; + targetCountry?: string; + timestamp?: string; + } + export interface PosSaleResponse { + contentLanguage?: string; + gtin?: string; + itemId?: string; + kind?: string; + price?: Content.Schema.Price; + quantity?: string; + saleId?: string; + storeCode?: string; + targetCountry?: string; + timestamp?: string; + } + export interface PosStore { + kind?: string; + storeAddress?: string; + storeCode?: string; + } + export interface PostalCodeGroup { + country?: string; + name?: string; + postalCodeRanges?: Content.Schema.PostalCodeRange[]; + } + export interface PostalCodeRange { + postalCodeRangeBegin?: string; + postalCodeRangeEnd?: string; + } + export interface Price { + currency?: string; + value?: string; + } + export interface Product { + additionalImageLinks?: string[]; + additionalProductTypes?: string[]; + adult?: boolean; + adwordsGrouping?: string; + adwordsLabels?: string[]; + adwordsRedirect?: string; + ageGroup?: string; + aspects?: Content.Schema.ProductAspect[]; + availability?: string; + availabilityDate?: string; + brand?: string; + channel?: string; + color?: string; + condition?: string; + contentLanguage?: string; + costOfGoodsSold?: Content.Schema.Price; + customAttributes?: Content.Schema.CustomAttribute[]; + customGroups?: Content.Schema.CustomGroup[]; + customLabel0?: string; + customLabel1?: string; + customLabel2?: string; + customLabel3?: string; + customLabel4?: string; + description?: string; + destinations?: Content.Schema.ProductDestination[]; + displayAdsId?: string; + displayAdsLink?: string; + displayAdsSimilarIds?: string[]; + displayAdsTitle?: string; + displayAdsValue?: Number; + energyEfficiencyClass?: string; + expirationDate?: string; + gender?: string; + googleProductCategory?: string; + gtin?: string; + id?: string; + identifierExists?: boolean; + imageLink?: string; + installment?: Content.Schema.Installment; + isBundle?: boolean; + itemGroupId?: string; + kind?: string; + link?: string; + loyaltyPoints?: Content.Schema.LoyaltyPoints; + material?: string; + maxEnergyEfficiencyClass?: string; + maxHandlingTime?: string; + minEnergyEfficiencyClass?: string; + minHandlingTime?: string; + mobileLink?: string; + mpn?: string; + multipack?: string; + offerId?: string; + onlineOnly?: boolean; + pattern?: string; + price?: Content.Schema.Price; + productType?: string; + promotionIds?: string[]; + salePrice?: Content.Schema.Price; + salePriceEffectiveDate?: string; + sellOnGoogleQuantity?: string; + shipping?: Content.Schema.ProductShipping[]; + shippingHeight?: Content.Schema.ProductShippingDimension; + shippingLabel?: string; + shippingLength?: Content.Schema.ProductShippingDimension; + shippingWeight?: Content.Schema.ProductShippingWeight; + shippingWidth?: Content.Schema.ProductShippingDimension; + sizeSystem?: string; + sizeType?: string; + sizes?: string[]; + source?: string; + targetCountry?: string; + taxes?: Content.Schema.ProductTax[]; + title?: string; + unitPricingBaseMeasure?: Content.Schema.ProductUnitPricingBaseMeasure; + unitPricingMeasure?: Content.Schema.ProductUnitPricingMeasure; + validatedDestinations?: string[]; + warnings?: Content.Schema.Error[]; + } + export interface ProductAmount { + priceAmount?: Content.Schema.Price; + remittedTaxAmount?: Content.Schema.Price; + taxAmount?: Content.Schema.Price; + } + export interface ProductAspect { + aspectName?: string; + destinationName?: string; + intention?: string; + } + export interface ProductDestination { + destinationName?: string; + intention?: string; + } + export interface ProductShipping { + country?: string; + locationGroupName?: string; + locationId?: string; + postalCode?: string; + price?: Content.Schema.Price; + region?: string; + service?: string; + } + export interface ProductShippingDimension { + unit?: string; + value?: Number; + } + export interface ProductShippingWeight { + unit?: string; + value?: Number; + } + export interface ProductStatus { + creationDate?: string; + dataQualityIssues?: Content.Schema.ProductStatusDataQualityIssue[]; + destinationStatuses?: Content.Schema.ProductStatusDestinationStatus[]; + googleExpirationDate?: string; + itemLevelIssues?: Content.Schema.ProductStatusItemLevelIssue[]; + kind?: string; + lastUpdateDate?: string; + link?: string; + product?: Content.Schema.Product; + productId?: string; + title?: string; + } + export interface ProductStatusDataQualityIssue { + destination?: string; + detail?: string; + fetchStatus?: string; + id?: string; + location?: string; + severity?: string; + timestamp?: string; + valueOnLandingPage?: string; + valueProvided?: string; + } + export interface ProductStatusDestinationStatus { + approvalPending?: boolean; + approvalStatus?: string; + destination?: string; + intention?: string; + } + export interface ProductStatusItemLevelIssue { + attributeName?: string; + code?: string; + description?: string; + destination?: string; + detail?: string; + documentation?: string; + resolution?: string; + servability?: string; + } + export interface ProductTax { + country?: string; + locationId?: string; + postalCode?: string; + rate?: Number; + region?: string; + taxShip?: boolean; + } + export interface ProductUnitPricingBaseMeasure { + unit?: string; + value?: string; + } + export interface ProductUnitPricingMeasure { + unit?: string; + value?: Number; + } + export interface ProductsCustomBatchRequest { + entries?: Content.Schema.ProductsCustomBatchRequestEntry[]; + } + export interface ProductsCustomBatchRequestEntry { + batchId?: number; + merchantId?: string; + method?: string; + product?: Content.Schema.Product; + productId?: string; + } + export interface ProductsCustomBatchResponse { + entries?: Content.Schema.ProductsCustomBatchResponseEntry[]; + kind?: string; + } + export interface ProductsCustomBatchResponseEntry { + batchId?: number; + errors?: Content.Schema.Errors; + kind?: string; + product?: Content.Schema.Product; + } + export interface ProductsListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.Product[]; + } + export interface ProductstatusesCustomBatchRequest { + entries?: Content.Schema.ProductstatusesCustomBatchRequestEntry[]; + } + export interface ProductstatusesCustomBatchRequestEntry { + batchId?: number; + destinations?: string[]; + includeAttributes?: boolean; + merchantId?: string; + method?: string; + productId?: string; + } + export interface ProductstatusesCustomBatchResponse { + entries?: Content.Schema.ProductstatusesCustomBatchResponseEntry[]; + kind?: string; + } + export interface ProductstatusesCustomBatchResponseEntry { + batchId?: number; + errors?: Content.Schema.Errors; + kind?: string; + productStatus?: Content.Schema.ProductStatus; + } + export interface ProductstatusesListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.ProductStatus[]; + } + export interface Promotion { + promotionAmount?: Content.Schema.Amount; + promotionId?: string; + } + export interface RateGroup { + applicableShippingLabels?: string[]; + carrierRates?: Content.Schema.CarrierRate[]; + mainTable?: Content.Schema.Table; + name?: string; + singleValue?: Content.Schema.Value; + subtables?: Content.Schema.Table[]; + } + export interface RefundReason { + description?: string; + reasonCode?: string; + } + export interface ReturnShipment { + creationDate?: string; + deliveryDate?: string; + returnMethodType?: string; + shipmentId?: string; + shipmentTrackingInfos?: Content.Schema.ShipmentTrackingInfo[]; + shippingDate?: string; + state?: string; + } + export interface Row { + cells?: Content.Schema.Value[]; + } + export interface Service { + active?: boolean; + currency?: string; + deliveryCountry?: string; + deliveryTime?: Content.Schema.DeliveryTime; + eligibility?: string; + minimumOrderValue?: Content.Schema.Price; + name?: string; + rateGroups?: Content.Schema.RateGroup[]; + } + export interface ShipmentInvoice { + invoiceSummary?: Content.Schema.InvoiceSummary; + lineItemInvoices?: Content.Schema.ShipmentInvoiceLineItemInvoice[]; + shipmentGroupId?: string; + } + export interface ShipmentInvoiceLineItemInvoice { + lineItemId?: string; + productId?: string; + shipmentUnitIds?: string[]; + unitInvoice?: Content.Schema.UnitInvoice; + } + export interface ShipmentTrackingInfo { + carrier?: string; + trackingNumber?: string; + } + export interface ShippingSettings { + accountId?: string; + postalCodeGroups?: Content.Schema.PostalCodeGroup[]; + services?: Content.Schema.Service[]; + } + export interface ShippingsettingsCustomBatchRequest { + entries?: Content.Schema.ShippingsettingsCustomBatchRequestEntry[]; + } + export interface ShippingsettingsCustomBatchRequestEntry { + accountId?: string; + batchId?: number; + merchantId?: string; + method?: string; + shippingSettings?: Content.Schema.ShippingSettings; + } + export interface ShippingsettingsCustomBatchResponse { + entries?: Content.Schema.ShippingsettingsCustomBatchResponseEntry[]; + kind?: string; + } + export interface ShippingsettingsCustomBatchResponseEntry { + batchId?: number; + errors?: Content.Schema.Errors; + kind?: string; + shippingSettings?: Content.Schema.ShippingSettings; + } + export interface ShippingsettingsGetSupportedCarriersResponse { + carriers?: Content.Schema.CarriersCarrier[]; + kind?: string; + } + export interface ShippingsettingsGetSupportedHolidaysResponse { + holidays?: Content.Schema.HolidaysHoliday[]; + kind?: string; + } + export interface ShippingsettingsListResponse { + kind?: string; + nextPageToken?: string; + resources?: Content.Schema.ShippingSettings[]; + } + export interface Table { + columnHeaders?: Content.Schema.Headers; + name?: string; + rowHeaders?: Content.Schema.Headers; + rows?: Content.Schema.Row[]; + } + export interface TestOrder { + customer?: Content.Schema.TestOrderCustomer; + enableOrderinvoices?: boolean; + kind?: string; + lineItems?: Content.Schema.TestOrderLineItem[]; + notificationMode?: string; + paymentMethod?: Content.Schema.TestOrderPaymentMethod; + predefinedDeliveryAddress?: string; + promotions?: Content.Schema.OrderLegacyPromotion[]; + shippingCost?: Content.Schema.Price; + shippingCostTax?: Content.Schema.Price; + shippingOption?: string; + } + export interface TestOrderCustomer { + email?: string; + explicitMarketingPreference?: boolean; + fullName?: string; + marketingRightsInfo?: Content.Schema.TestOrderCustomerMarketingRightsInfo; + } + export interface TestOrderCustomerMarketingRightsInfo { + explicitMarketingPreference?: string; + lastUpdatedTimestamp?: string; + } + export interface TestOrderLineItem { + product?: Content.Schema.TestOrderLineItemProduct; + quantityOrdered?: number; + returnInfo?: Content.Schema.OrderLineItemReturnInfo; + shippingDetails?: Content.Schema.OrderLineItemShippingDetails; + unitTax?: Content.Schema.Price; + } + export interface TestOrderLineItemProduct { + brand?: string; + channel?: string; + condition?: string; + contentLanguage?: string; + gtin?: string; + imageLink?: string; + itemGroupId?: string; + mpn?: string; + offerId?: string; + price?: Content.Schema.Price; + targetCountry?: string; + title?: string; + variantAttributes?: Content.Schema.OrderLineItemProductVariantAttribute[]; + } + export interface TestOrderPaymentMethod { + expirationMonth?: number; + expirationYear?: number; + lastFourDigits?: string; + predefinedBillingAddress?: string; + type?: string; + } + export interface TransitTable { + postalCodeGroupNames?: string[]; + rows?: Content.Schema.TransitTableTransitTimeRow[]; + transitTimeLabels?: string[]; + } + export interface TransitTableTransitTimeRow { + values?: Content.Schema.TransitTableTransitTimeRowTransitTimeValue[]; + } + export interface TransitTableTransitTimeRowTransitTimeValue { + maxTransitTimeInDays?: number; + minTransitTimeInDays?: number; + } + export interface UnitInvoice { + additionalCharges?: Content.Schema.UnitInvoiceAdditionalCharge[]; + promotions?: Content.Schema.Promotion[]; + unitPricePretax?: Content.Schema.Price; + unitPriceTaxes?: Content.Schema.UnitInvoiceTaxLine[]; + } + export interface UnitInvoiceAdditionalCharge { + additionalChargeAmount?: Content.Schema.Amount; + additionalChargePromotions?: Content.Schema.Promotion[]; + type?: string; + } + export interface UnitInvoiceTaxLine { + taxAmount?: Content.Schema.Price; + taxName?: string; + taxType?: string; + } + export interface Value { + carrierRateName?: string; + flatRate?: Content.Schema.Price; + noShipping?: boolean; + pricePercentage?: string; + subtableName?: string; + } + export interface Weight { + unit?: string; + value?: string; + } + } + } + export interface Content { + Accounts?: Content.Collection.AccountsCollection; + Accountstatuses?: Content.Collection.AccountstatusesCollection; + Accounttax?: Content.Collection.AccounttaxCollection; + Datafeeds?: Content.Collection.DatafeedsCollection; + Datafeedstatuses?: Content.Collection.DatafeedstatusesCollection; + Inventory?: Content.Collection.InventoryCollection; + Liasettings?: Content.Collection.LiasettingsCollection; + Orderinvoices?: Content.Collection.OrderinvoicesCollection; + Orderpayments?: Content.Collection.OrderpaymentsCollection; + Orderreports?: Content.Collection.OrderreportsCollection; + Orderreturns?: Content.Collection.OrderreturnsCollection; + Orders?: Content.Collection.OrdersCollection; + Pos?: Content.Collection.PosCollection; + Products?: Content.Collection.ProductsCollection; + Productstatuses?: Content.Collection.ProductstatusesCollection; + Shippingsettings?: Content.Collection.ShippingsettingsCollection; + // Create a new instance of Account + newAccount(): Content.Schema.Account; + // Create a new instance of AccountAddress + newAccountAddress(): Content.Schema.AccountAddress; + // Create a new instance of AccountAdwordsLink + newAccountAdwordsLink(): Content.Schema.AccountAdwordsLink; + // Create a new instance of AccountBusinessInformation + newAccountBusinessInformation(): Content.Schema.AccountBusinessInformation; + // Create a new instance of AccountCustomerService + newAccountCustomerService(): Content.Schema.AccountCustomerService; + // Create a new instance of AccountGoogleMyBusinessLink + newAccountGoogleMyBusinessLink(): Content.Schema.AccountGoogleMyBusinessLink; + // Create a new instance of AccountTax + newAccountTax(): Content.Schema.AccountTax; + // Create a new instance of AccountTaxTaxRule + newAccountTaxTaxRule(): Content.Schema.AccountTaxTaxRule; + // Create a new instance of AccountUser + newAccountUser(): Content.Schema.AccountUser; + // Create a new instance of AccountYouTubeChannelLink + newAccountYouTubeChannelLink(): Content.Schema.AccountYouTubeChannelLink; + // Create a new instance of AccountsCustomBatchRequest + newAccountsCustomBatchRequest(): Content.Schema.AccountsCustomBatchRequest; + // Create a new instance of AccountsCustomBatchRequestEntry + newAccountsCustomBatchRequestEntry(): Content.Schema.AccountsCustomBatchRequestEntry; + // Create a new instance of AccountsCustomBatchRequestEntryLinkRequest + newAccountsCustomBatchRequestEntryLinkRequest(): Content.Schema.AccountsCustomBatchRequestEntryLinkRequest; + // Create a new instance of AccountsLinkRequest + newAccountsLinkRequest(): Content.Schema.AccountsLinkRequest; + // Create a new instance of AccountstatusesCustomBatchRequest + newAccountstatusesCustomBatchRequest(): Content.Schema.AccountstatusesCustomBatchRequest; + // Create a new instance of AccountstatusesCustomBatchRequestEntry + newAccountstatusesCustomBatchRequestEntry(): Content.Schema.AccountstatusesCustomBatchRequestEntry; + // Create a new instance of AccounttaxCustomBatchRequest + newAccounttaxCustomBatchRequest(): Content.Schema.AccounttaxCustomBatchRequest; + // Create a new instance of AccounttaxCustomBatchRequestEntry + newAccounttaxCustomBatchRequestEntry(): Content.Schema.AccounttaxCustomBatchRequestEntry; + // Create a new instance of Amount + newAmount(): Content.Schema.Amount; + // Create a new instance of CarrierRate + newCarrierRate(): Content.Schema.CarrierRate; + // Create a new instance of CustomAttribute + newCustomAttribute(): Content.Schema.CustomAttribute; + // Create a new instance of CustomGroup + newCustomGroup(): Content.Schema.CustomGroup; + // Create a new instance of CutoffTime + newCutoffTime(): Content.Schema.CutoffTime; + // Create a new instance of Datafeed + newDatafeed(): Content.Schema.Datafeed; + // Create a new instance of DatafeedFetchSchedule + newDatafeedFetchSchedule(): Content.Schema.DatafeedFetchSchedule; + // Create a new instance of DatafeedFormat + newDatafeedFormat(): Content.Schema.DatafeedFormat; + // Create a new instance of DatafeedTarget + newDatafeedTarget(): Content.Schema.DatafeedTarget; + // Create a new instance of DatafeedsCustomBatchRequest + newDatafeedsCustomBatchRequest(): Content.Schema.DatafeedsCustomBatchRequest; + // Create a new instance of DatafeedsCustomBatchRequestEntry + newDatafeedsCustomBatchRequestEntry(): Content.Schema.DatafeedsCustomBatchRequestEntry; + // Create a new instance of DatafeedstatusesCustomBatchRequest + newDatafeedstatusesCustomBatchRequest(): Content.Schema.DatafeedstatusesCustomBatchRequest; + // Create a new instance of DatafeedstatusesCustomBatchRequestEntry + newDatafeedstatusesCustomBatchRequestEntry(): Content.Schema.DatafeedstatusesCustomBatchRequestEntry; + // Create a new instance of DeliveryTime + newDeliveryTime(): Content.Schema.DeliveryTime; + // Create a new instance of Error + newError(): Content.Schema.Error; + // Create a new instance of Headers + newHeaders(): Content.Schema.Headers; + // Create a new instance of HolidayCutoff + newHolidayCutoff(): Content.Schema.HolidayCutoff; + // Create a new instance of Installment + newInstallment(): Content.Schema.Installment; + // Create a new instance of Inventory + newInventory(): Content.Schema.Inventory; + // Create a new instance of InventoryCustomBatchRequest + newInventoryCustomBatchRequest(): Content.Schema.InventoryCustomBatchRequest; + // Create a new instance of InventoryCustomBatchRequestEntry + newInventoryCustomBatchRequestEntry(): Content.Schema.InventoryCustomBatchRequestEntry; + // Create a new instance of InventoryPickup + newInventoryPickup(): Content.Schema.InventoryPickup; + // Create a new instance of InventorySetRequest + newInventorySetRequest(): Content.Schema.InventorySetRequest; + // Create a new instance of InvoiceSummary + newInvoiceSummary(): Content.Schema.InvoiceSummary; + // Create a new instance of InvoiceSummaryAdditionalChargeSummary + newInvoiceSummaryAdditionalChargeSummary(): Content.Schema.InvoiceSummaryAdditionalChargeSummary; + // Create a new instance of LiaAboutPageSettings + newLiaAboutPageSettings(): Content.Schema.LiaAboutPageSettings; + // Create a new instance of LiaCountrySettings + newLiaCountrySettings(): Content.Schema.LiaCountrySettings; + // Create a new instance of LiaInventorySettings + newLiaInventorySettings(): Content.Schema.LiaInventorySettings; + // Create a new instance of LiaOnDisplayToOrderSettings + newLiaOnDisplayToOrderSettings(): Content.Schema.LiaOnDisplayToOrderSettings; + // Create a new instance of LiaPosDataProvider + newLiaPosDataProvider(): Content.Schema.LiaPosDataProvider; + // Create a new instance of LiaSettings + newLiaSettings(): Content.Schema.LiaSettings; + // Create a new instance of LiasettingsCustomBatchRequest + newLiasettingsCustomBatchRequest(): Content.Schema.LiasettingsCustomBatchRequest; + // Create a new instance of LiasettingsCustomBatchRequestEntry + newLiasettingsCustomBatchRequestEntry(): Content.Schema.LiasettingsCustomBatchRequestEntry; + // Create a new instance of LocationIdSet + newLocationIdSet(): Content.Schema.LocationIdSet; + // Create a new instance of LoyaltyPoints + newLoyaltyPoints(): Content.Schema.LoyaltyPoints; + // Create a new instance of OrderLegacyPromotion + newOrderLegacyPromotion(): Content.Schema.OrderLegacyPromotion; + // Create a new instance of OrderLegacyPromotionBenefit + newOrderLegacyPromotionBenefit(): Content.Schema.OrderLegacyPromotionBenefit; + // Create a new instance of OrderLineItemProductVariantAttribute + newOrderLineItemProductVariantAttribute(): Content.Schema.OrderLineItemProductVariantAttribute; + // Create a new instance of OrderLineItemReturnInfo + newOrderLineItemReturnInfo(): Content.Schema.OrderLineItemReturnInfo; + // Create a new instance of OrderLineItemShippingDetails + newOrderLineItemShippingDetails(): Content.Schema.OrderLineItemShippingDetails; + // Create a new instance of OrderLineItemShippingDetailsMethod + newOrderLineItemShippingDetailsMethod(): Content.Schema.OrderLineItemShippingDetailsMethod; + // Create a new instance of OrderMerchantProvidedAnnotation + newOrderMerchantProvidedAnnotation(): Content.Schema.OrderMerchantProvidedAnnotation; + // Create a new instance of OrderShipmentLineItemShipment + newOrderShipmentLineItemShipment(): Content.Schema.OrderShipmentLineItemShipment; + // Create a new instance of OrderinvoicesCreateChargeInvoiceRequest + newOrderinvoicesCreateChargeInvoiceRequest(): Content.Schema.OrderinvoicesCreateChargeInvoiceRequest; + // Create a new instance of OrderinvoicesCreateRefundInvoiceRequest + newOrderinvoicesCreateRefundInvoiceRequest(): Content.Schema.OrderinvoicesCreateRefundInvoiceRequest; + // Create a new instance of OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption + newOrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption(): Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption; + // Create a new instance of OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption + newOrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption(): Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption; + // Create a new instance of OrderpaymentsNotifyAuthApprovedRequest + newOrderpaymentsNotifyAuthApprovedRequest(): Content.Schema.OrderpaymentsNotifyAuthApprovedRequest; + // Create a new instance of OrderpaymentsNotifyAuthDeclinedRequest + newOrderpaymentsNotifyAuthDeclinedRequest(): Content.Schema.OrderpaymentsNotifyAuthDeclinedRequest; + // Create a new instance of OrderpaymentsNotifyChargeRequest + newOrderpaymentsNotifyChargeRequest(): Content.Schema.OrderpaymentsNotifyChargeRequest; + // Create a new instance of OrderpaymentsNotifyRefundRequest + newOrderpaymentsNotifyRefundRequest(): Content.Schema.OrderpaymentsNotifyRefundRequest; + // Create a new instance of OrdersAcknowledgeRequest + newOrdersAcknowledgeRequest(): Content.Schema.OrdersAcknowledgeRequest; + // Create a new instance of OrdersCancelLineItemRequest + newOrdersCancelLineItemRequest(): Content.Schema.OrdersCancelLineItemRequest; + // Create a new instance of OrdersCancelRequest + newOrdersCancelRequest(): Content.Schema.OrdersCancelRequest; + // Create a new instance of OrdersCancelTestOrderByCustomerRequest + newOrdersCancelTestOrderByCustomerRequest(): Content.Schema.OrdersCancelTestOrderByCustomerRequest; + // Create a new instance of OrdersCreateTestOrderRequest + newOrdersCreateTestOrderRequest(): Content.Schema.OrdersCreateTestOrderRequest; + // Create a new instance of OrdersCreateTestReturnRequest + newOrdersCreateTestReturnRequest(): Content.Schema.OrdersCreateTestReturnRequest; + // Create a new instance of OrdersCustomBatchRequest + newOrdersCustomBatchRequest(): Content.Schema.OrdersCustomBatchRequest; + // Create a new instance of OrdersCustomBatchRequestEntry + newOrdersCustomBatchRequestEntry(): Content.Schema.OrdersCustomBatchRequestEntry; + // Create a new instance of OrdersCustomBatchRequestEntryCancel + newOrdersCustomBatchRequestEntryCancel(): Content.Schema.OrdersCustomBatchRequestEntryCancel; + // Create a new instance of OrdersCustomBatchRequestEntryCancelLineItem + newOrdersCustomBatchRequestEntryCancelLineItem(): Content.Schema.OrdersCustomBatchRequestEntryCancelLineItem; + // Create a new instance of OrdersCustomBatchRequestEntryCreateTestReturnReturnItem + newOrdersCustomBatchRequestEntryCreateTestReturnReturnItem(): Content.Schema.OrdersCustomBatchRequestEntryCreateTestReturnReturnItem; + // Create a new instance of OrdersCustomBatchRequestEntryInStoreRefundLineItem + newOrdersCustomBatchRequestEntryInStoreRefundLineItem(): Content.Schema.OrdersCustomBatchRequestEntryInStoreRefundLineItem; + // Create a new instance of OrdersCustomBatchRequestEntryRefund + newOrdersCustomBatchRequestEntryRefund(): Content.Schema.OrdersCustomBatchRequestEntryRefund; + // Create a new instance of OrdersCustomBatchRequestEntryRejectReturnLineItem + newOrdersCustomBatchRequestEntryRejectReturnLineItem(): Content.Schema.OrdersCustomBatchRequestEntryRejectReturnLineItem; + // Create a new instance of OrdersCustomBatchRequestEntryReturnLineItem + newOrdersCustomBatchRequestEntryReturnLineItem(): Content.Schema.OrdersCustomBatchRequestEntryReturnLineItem; + // Create a new instance of OrdersCustomBatchRequestEntryReturnRefundLineItem + newOrdersCustomBatchRequestEntryReturnRefundLineItem(): Content.Schema.OrdersCustomBatchRequestEntryReturnRefundLineItem; + // Create a new instance of OrdersCustomBatchRequestEntrySetLineItemMetadata + newOrdersCustomBatchRequestEntrySetLineItemMetadata(): Content.Schema.OrdersCustomBatchRequestEntrySetLineItemMetadata; + // Create a new instance of OrdersCustomBatchRequestEntryShipLineItems + newOrdersCustomBatchRequestEntryShipLineItems(): Content.Schema.OrdersCustomBatchRequestEntryShipLineItems; + // Create a new instance of OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo + newOrdersCustomBatchRequestEntryShipLineItemsShipmentInfo(): Content.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo; + // Create a new instance of OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails + newOrdersCustomBatchRequestEntryUpdateLineItemShippingDetails(): Content.Schema.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails; + // Create a new instance of OrdersCustomBatchRequestEntryUpdateShipment + newOrdersCustomBatchRequestEntryUpdateShipment(): Content.Schema.OrdersCustomBatchRequestEntryUpdateShipment; + // Create a new instance of OrdersInStoreRefundLineItemRequest + newOrdersInStoreRefundLineItemRequest(): Content.Schema.OrdersInStoreRefundLineItemRequest; + // Create a new instance of OrdersRefundRequest + newOrdersRefundRequest(): Content.Schema.OrdersRefundRequest; + // Create a new instance of OrdersRejectReturnLineItemRequest + newOrdersRejectReturnLineItemRequest(): Content.Schema.OrdersRejectReturnLineItemRequest; + // Create a new instance of OrdersReturnLineItemRequest + newOrdersReturnLineItemRequest(): Content.Schema.OrdersReturnLineItemRequest; + // Create a new instance of OrdersReturnRefundLineItemRequest + newOrdersReturnRefundLineItemRequest(): Content.Schema.OrdersReturnRefundLineItemRequest; + // Create a new instance of OrdersSetLineItemMetadataRequest + newOrdersSetLineItemMetadataRequest(): Content.Schema.OrdersSetLineItemMetadataRequest; + // Create a new instance of OrdersShipLineItemsRequest + newOrdersShipLineItemsRequest(): Content.Schema.OrdersShipLineItemsRequest; + // Create a new instance of OrdersUpdateLineItemShippingDetailsRequest + newOrdersUpdateLineItemShippingDetailsRequest(): Content.Schema.OrdersUpdateLineItemShippingDetailsRequest; + // Create a new instance of OrdersUpdateMerchantOrderIdRequest + newOrdersUpdateMerchantOrderIdRequest(): Content.Schema.OrdersUpdateMerchantOrderIdRequest; + // Create a new instance of OrdersUpdateShipmentRequest + newOrdersUpdateShipmentRequest(): Content.Schema.OrdersUpdateShipmentRequest; + // Create a new instance of PosCustomBatchRequest + newPosCustomBatchRequest(): Content.Schema.PosCustomBatchRequest; + // Create a new instance of PosCustomBatchRequestEntry + newPosCustomBatchRequestEntry(): Content.Schema.PosCustomBatchRequestEntry; + // Create a new instance of PosInventory + newPosInventory(): Content.Schema.PosInventory; + // Create a new instance of PosInventoryRequest + newPosInventoryRequest(): Content.Schema.PosInventoryRequest; + // Create a new instance of PosSale + newPosSale(): Content.Schema.PosSale; + // Create a new instance of PosSaleRequest + newPosSaleRequest(): Content.Schema.PosSaleRequest; + // Create a new instance of PosStore + newPosStore(): Content.Schema.PosStore; + // Create a new instance of PostalCodeGroup + newPostalCodeGroup(): Content.Schema.PostalCodeGroup; + // Create a new instance of PostalCodeRange + newPostalCodeRange(): Content.Schema.PostalCodeRange; + // Create a new instance of Price + newPrice(): Content.Schema.Price; + // Create a new instance of Product + newProduct(): Content.Schema.Product; + // Create a new instance of ProductAspect + newProductAspect(): Content.Schema.ProductAspect; + // Create a new instance of ProductDestination + newProductDestination(): Content.Schema.ProductDestination; + // Create a new instance of ProductShipping + newProductShipping(): Content.Schema.ProductShipping; + // Create a new instance of ProductShippingDimension + newProductShippingDimension(): Content.Schema.ProductShippingDimension; + // Create a new instance of ProductShippingWeight + newProductShippingWeight(): Content.Schema.ProductShippingWeight; + // Create a new instance of ProductTax + newProductTax(): Content.Schema.ProductTax; + // Create a new instance of ProductUnitPricingBaseMeasure + newProductUnitPricingBaseMeasure(): Content.Schema.ProductUnitPricingBaseMeasure; + // Create a new instance of ProductUnitPricingMeasure + newProductUnitPricingMeasure(): Content.Schema.ProductUnitPricingMeasure; + // Create a new instance of ProductsCustomBatchRequest + newProductsCustomBatchRequest(): Content.Schema.ProductsCustomBatchRequest; + // Create a new instance of ProductsCustomBatchRequestEntry + newProductsCustomBatchRequestEntry(): Content.Schema.ProductsCustomBatchRequestEntry; + // Create a new instance of ProductstatusesCustomBatchRequest + newProductstatusesCustomBatchRequest(): Content.Schema.ProductstatusesCustomBatchRequest; + // Create a new instance of ProductstatusesCustomBatchRequestEntry + newProductstatusesCustomBatchRequestEntry(): Content.Schema.ProductstatusesCustomBatchRequestEntry; + // Create a new instance of Promotion + newPromotion(): Content.Schema.Promotion; + // Create a new instance of RateGroup + newRateGroup(): Content.Schema.RateGroup; + // Create a new instance of Row + newRow(): Content.Schema.Row; + // Create a new instance of Service + newService(): Content.Schema.Service; + // Create a new instance of ShipmentInvoice + newShipmentInvoice(): Content.Schema.ShipmentInvoice; + // Create a new instance of ShipmentInvoiceLineItemInvoice + newShipmentInvoiceLineItemInvoice(): Content.Schema.ShipmentInvoiceLineItemInvoice; + // Create a new instance of ShippingSettings + newShippingSettings(): Content.Schema.ShippingSettings; + // Create a new instance of ShippingsettingsCustomBatchRequest + newShippingsettingsCustomBatchRequest(): Content.Schema.ShippingsettingsCustomBatchRequest; + // Create a new instance of ShippingsettingsCustomBatchRequestEntry + newShippingsettingsCustomBatchRequestEntry(): Content.Schema.ShippingsettingsCustomBatchRequestEntry; + // Create a new instance of Table + newTable(): Content.Schema.Table; + // Create a new instance of TestOrder + newTestOrder(): Content.Schema.TestOrder; + // Create a new instance of TestOrderCustomer + newTestOrderCustomer(): Content.Schema.TestOrderCustomer; + // Create a new instance of TestOrderCustomerMarketingRightsInfo + newTestOrderCustomerMarketingRightsInfo(): Content.Schema.TestOrderCustomerMarketingRightsInfo; + // Create a new instance of TestOrderLineItem + newTestOrderLineItem(): Content.Schema.TestOrderLineItem; + // Create a new instance of TestOrderLineItemProduct + newTestOrderLineItemProduct(): Content.Schema.TestOrderLineItemProduct; + // Create a new instance of TestOrderPaymentMethod + newTestOrderPaymentMethod(): Content.Schema.TestOrderPaymentMethod; + // Create a new instance of TransitTable + newTransitTable(): Content.Schema.TransitTable; + // Create a new instance of TransitTableTransitTimeRow + newTransitTableTransitTimeRow(): Content.Schema.TransitTableTransitTimeRow; + // Create a new instance of TransitTableTransitTimeRowTransitTimeValue + newTransitTableTransitTimeRowTransitTimeValue(): Content.Schema.TransitTableTransitTimeRowTransitTimeValue; + // Create a new instance of UnitInvoice + newUnitInvoice(): Content.Schema.UnitInvoice; + // Create a new instance of UnitInvoiceAdditionalCharge + newUnitInvoiceAdditionalCharge(): Content.Schema.UnitInvoiceAdditionalCharge; + // Create a new instance of UnitInvoiceTaxLine + newUnitInvoiceTaxLine(): Content.Schema.UnitInvoiceTaxLine; + // Create a new instance of Value + newValue(): Content.Schema.Value; + // Create a new instance of Weight + newWeight(): Content.Schema.Weight; + } +} + +declare var Content: GoogleAppsScript.Content; diff --git a/types/google-apps-script/apis/dfareporting/v2.8.d.ts b/types/google-apps-script/apis/dfareporting/v2.8.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/dfareporting/v3.0.d.ts b/types/google-apps-script/apis/dfareporting/v3.0.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/dfareporting/v3.1.d.ts b/types/google-apps-script/apis/dfareporting/v3.1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/dfareporting/v3.2.d.ts b/types/google-apps-script/apis/dfareporting/v3.2.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/dfareporting_v3_3.d.ts b/types/google-apps-script/apis/dfareporting_v3_3.d.ts new file mode 100644 index 0000000000..9461c1483f --- /dev/null +++ b/types/google-apps-script/apis/dfareporting_v3_3.d.ts @@ -0,0 +1,2761 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Dfareporting { + namespace Collection { + namespace Reports { + export interface CompatibleFieldsCollection { + // Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions. + query(resource: Schema.Report, profileId: string): Dfareporting.Schema.CompatibleFields; + } + export interface FilesCollection { + // Retrieves a report file. This method supports media download. + get(profileId: string, reportId: string, fileId: string): Dfareporting.Schema.File; + // Lists files for a report. + list(profileId: string, reportId: string): Dfareporting.Schema.FileList; + // Lists files for a report. + list(profileId: string, reportId: string, optionalArgs: object): Dfareporting.Schema.FileList; + } + } + export interface AccountActiveAdSummariesCollection { + // Gets the account's active ad summary by account ID. + get(profileId: string, summaryAccountId: string): Dfareporting.Schema.AccountActiveAdSummary; + } + export interface AccountPermissionGroupsCollection { + // Gets one account permission group by ID. + get(profileId: string, id: string): Dfareporting.Schema.AccountPermissionGroup; + // Retrieves the list of account permission groups. + list(profileId: string): Dfareporting.Schema.AccountPermissionGroupsListResponse; + } + export interface AccountPermissionsCollection { + // Gets one account permission by ID. + get(profileId: string, id: string): Dfareporting.Schema.AccountPermission; + // Retrieves the list of account permissions. + list(profileId: string): Dfareporting.Schema.AccountPermissionsListResponse; + } + export interface AccountUserProfilesCollection { + // Gets one account user profile by ID. + get(profileId: string, id: string): Dfareporting.Schema.AccountUserProfile; + // Inserts a new account user profile. + insert(resource: Schema.AccountUserProfile, profileId: string): Dfareporting.Schema.AccountUserProfile; + // Retrieves a list of account user profiles, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.AccountUserProfilesListResponse; + // Retrieves a list of account user profiles, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AccountUserProfilesListResponse; + // Updates an existing account user profile. This method supports patch semantics. + patch(resource: Schema.AccountUserProfile, profileId: string, id: string): Dfareporting.Schema.AccountUserProfile; + // Updates an existing account user profile. + update(resource: Schema.AccountUserProfile, profileId: string): Dfareporting.Schema.AccountUserProfile; + } + export interface AccountsCollection { + // Gets one account by ID. + get(profileId: string, id: string): Dfareporting.Schema.Account; + // Retrieves the list of accounts, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.AccountsListResponse; + // Retrieves the list of accounts, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AccountsListResponse; + // Updates an existing account. This method supports patch semantics. + patch(resource: Schema.Account, profileId: string, id: string): Dfareporting.Schema.Account; + // Updates an existing account. + update(resource: Schema.Account, profileId: string): Dfareporting.Schema.Account; + } + export interface AdsCollection { + // Gets one ad by ID. + get(profileId: string, id: string): Dfareporting.Schema.Ad; + // Inserts a new ad. + insert(resource: Schema.Ad, profileId: string): Dfareporting.Schema.Ad; + // Retrieves a list of ads, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.AdsListResponse; + // Retrieves a list of ads, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdsListResponse; + // Updates an existing ad. This method supports patch semantics. + patch(resource: Schema.Ad, profileId: string, id: string): Dfareporting.Schema.Ad; + // Updates an existing ad. + update(resource: Schema.Ad, profileId: string): Dfareporting.Schema.Ad; + } + export interface AdvertiserGroupsCollection { + // Gets one advertiser group by ID. + get(profileId: string, id: string): Dfareporting.Schema.AdvertiserGroup; + // Inserts a new advertiser group. + insert(resource: Schema.AdvertiserGroup, profileId: string): Dfareporting.Schema.AdvertiserGroup; + // Retrieves a list of advertiser groups, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.AdvertiserGroupsListResponse; + // Retrieves a list of advertiser groups, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdvertiserGroupsListResponse; + // Updates an existing advertiser group. This method supports patch semantics. + patch(resource: Schema.AdvertiserGroup, profileId: string, id: string): Dfareporting.Schema.AdvertiserGroup; + // Deletes an existing advertiser group. + remove(profileId: string, id: string): void; + // Updates an existing advertiser group. + update(resource: Schema.AdvertiserGroup, profileId: string): Dfareporting.Schema.AdvertiserGroup; + } + export interface AdvertiserLandingPagesCollection { + // Gets one landing page by ID. + get(profileId: string, id: string): Dfareporting.Schema.LandingPage; + // Inserts a new landing page. + insert(resource: Schema.LandingPage, profileId: string): Dfareporting.Schema.LandingPage; + // Retrieves a list of landing pages. + list(profileId: string): Dfareporting.Schema.AdvertiserLandingPagesListResponse; + // Retrieves a list of landing pages. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdvertiserLandingPagesListResponse; + // Updates an existing landing page. This method supports patch semantics. + patch(resource: Schema.LandingPage, profileId: string, id: string): Dfareporting.Schema.LandingPage; + // Updates an existing landing page. + update(resource: Schema.LandingPage, profileId: string): Dfareporting.Schema.LandingPage; + } + export interface AdvertisersCollection { + // Gets one advertiser by ID. + get(profileId: string, id: string): Dfareporting.Schema.Advertiser; + // Inserts a new advertiser. + insert(resource: Schema.Advertiser, profileId: string): Dfareporting.Schema.Advertiser; + // Retrieves a list of advertisers, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.AdvertisersListResponse; + // Retrieves a list of advertisers, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdvertisersListResponse; + // Updates an existing advertiser. This method supports patch semantics. + patch(resource: Schema.Advertiser, profileId: string, id: string): Dfareporting.Schema.Advertiser; + // Updates an existing advertiser. + update(resource: Schema.Advertiser, profileId: string): Dfareporting.Schema.Advertiser; + } + export interface BrowsersCollection { + // Retrieves a list of browsers. + list(profileId: string): Dfareporting.Schema.BrowsersListResponse; + } + export interface CampaignCreativeAssociationsCollection { + // Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already. + insert(resource: Schema.CampaignCreativeAssociation, profileId: string, campaignId: string): Dfareporting.Schema.CampaignCreativeAssociation; + // Retrieves the list of creative IDs associated with the specified campaign. This method supports paging. + list(profileId: string, campaignId: string): Dfareporting.Schema.CampaignCreativeAssociationsListResponse; + // Retrieves the list of creative IDs associated with the specified campaign. This method supports paging. + list(profileId: string, campaignId: string, optionalArgs: object): Dfareporting.Schema.CampaignCreativeAssociationsListResponse; + } + export interface CampaignsCollection { + // Gets one campaign by ID. + get(profileId: string, id: string): Dfareporting.Schema.Campaign; + // Inserts a new campaign. + insert(resource: Schema.Campaign, profileId: string): Dfareporting.Schema.Campaign; + // Retrieves a list of campaigns, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.CampaignsListResponse; + // Retrieves a list of campaigns, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CampaignsListResponse; + // Updates an existing campaign. This method supports patch semantics. + patch(resource: Schema.Campaign, profileId: string, id: string): Dfareporting.Schema.Campaign; + // Updates an existing campaign. + update(resource: Schema.Campaign, profileId: string): Dfareporting.Schema.Campaign; + } + export interface ChangeLogsCollection { + // Gets one change log by ID. + get(profileId: string, id: string): Dfareporting.Schema.ChangeLog; + // Retrieves a list of change logs. This method supports paging. + list(profileId: string): Dfareporting.Schema.ChangeLogsListResponse; + // Retrieves a list of change logs. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ChangeLogsListResponse; + } + export interface CitiesCollection { + // Retrieves a list of cities, possibly filtered. + list(profileId: string): Dfareporting.Schema.CitiesListResponse; + // Retrieves a list of cities, possibly filtered. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CitiesListResponse; + } + export interface ConnectionTypesCollection { + // Gets one connection type by ID. + get(profileId: string, id: string): Dfareporting.Schema.ConnectionType; + // Retrieves a list of connection types. + list(profileId: string): Dfareporting.Schema.ConnectionTypesListResponse; + } + export interface ContentCategoriesCollection { + // Gets one content category by ID. + get(profileId: string, id: string): Dfareporting.Schema.ContentCategory; + // Inserts a new content category. + insert(resource: Schema.ContentCategory, profileId: string): Dfareporting.Schema.ContentCategory; + // Retrieves a list of content categories, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.ContentCategoriesListResponse; + // Retrieves a list of content categories, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ContentCategoriesListResponse; + // Updates an existing content category. This method supports patch semantics. + patch(resource: Schema.ContentCategory, profileId: string, id: string): Dfareporting.Schema.ContentCategory; + // Deletes an existing content category. + remove(profileId: string, id: string): void; + // Updates an existing content category. + update(resource: Schema.ContentCategory, profileId: string): Dfareporting.Schema.ContentCategory; + } + export interface ConversionsCollection { + // Inserts conversions. + batchinsert(resource: Schema.ConversionsBatchInsertRequest, profileId: string): Dfareporting.Schema.ConversionsBatchInsertResponse; + // Updates existing conversions. + batchupdate(resource: Schema.ConversionsBatchUpdateRequest, profileId: string): Dfareporting.Schema.ConversionsBatchUpdateResponse; + } + export interface CountriesCollection { + // Gets one country by ID. + get(profileId: string, dartId: string): Dfareporting.Schema.Country; + // Retrieves a list of countries. + list(profileId: string): Dfareporting.Schema.CountriesListResponse; + } + export interface CreativeAssetsCollection { + // Inserts a new creative asset. + insert(resource: Schema.CreativeAssetMetadata, profileId: string, advertiserId: string): Dfareporting.Schema.CreativeAssetMetadata; + // Inserts a new creative asset. + insert(resource: Schema.CreativeAssetMetadata, profileId: string, advertiserId: string, mediaData: any): Dfareporting.Schema.CreativeAssetMetadata; + } + export interface CreativeFieldValuesCollection { + // Gets one creative field value by ID. + get(profileId: string, creativeFieldId: string, id: string): Dfareporting.Schema.CreativeFieldValue; + // Inserts a new creative field value. + insert(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string): Dfareporting.Schema.CreativeFieldValue; + // Retrieves a list of creative field values, possibly filtered. This method supports paging. + list(profileId: string, creativeFieldId: string): Dfareporting.Schema.CreativeFieldValuesListResponse; + // Retrieves a list of creative field values, possibly filtered. This method supports paging. + list(profileId: string, creativeFieldId: string, optionalArgs: object): Dfareporting.Schema.CreativeFieldValuesListResponse; + // Updates an existing creative field value. This method supports patch semantics. + patch(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string, id: string): Dfareporting.Schema.CreativeFieldValue; + // Deletes an existing creative field value. + remove(profileId: string, creativeFieldId: string, id: string): void; + // Updates an existing creative field value. + update(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string): Dfareporting.Schema.CreativeFieldValue; + } + export interface CreativeFieldsCollection { + // Gets one creative field by ID. + get(profileId: string, id: string): Dfareporting.Schema.CreativeField; + // Inserts a new creative field. + insert(resource: Schema.CreativeField, profileId: string): Dfareporting.Schema.CreativeField; + // Retrieves a list of creative fields, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.CreativeFieldsListResponse; + // Retrieves a list of creative fields, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CreativeFieldsListResponse; + // Updates an existing creative field. This method supports patch semantics. + patch(resource: Schema.CreativeField, profileId: string, id: string): Dfareporting.Schema.CreativeField; + // Deletes an existing creative field. + remove(profileId: string, id: string): void; + // Updates an existing creative field. + update(resource: Schema.CreativeField, profileId: string): Dfareporting.Schema.CreativeField; + } + export interface CreativeGroupsCollection { + // Gets one creative group by ID. + get(profileId: string, id: string): Dfareporting.Schema.CreativeGroup; + // Inserts a new creative group. + insert(resource: Schema.CreativeGroup, profileId: string): Dfareporting.Schema.CreativeGroup; + // Retrieves a list of creative groups, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.CreativeGroupsListResponse; + // Retrieves a list of creative groups, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CreativeGroupsListResponse; + // Updates an existing creative group. This method supports patch semantics. + patch(resource: Schema.CreativeGroup, profileId: string, id: string): Dfareporting.Schema.CreativeGroup; + // Updates an existing creative group. + update(resource: Schema.CreativeGroup, profileId: string): Dfareporting.Schema.CreativeGroup; + } + export interface CreativesCollection { + // Gets one creative by ID. + get(profileId: string, id: string): Dfareporting.Schema.Creative; + // Inserts a new creative. + insert(resource: Schema.Creative, profileId: string): Dfareporting.Schema.Creative; + // Retrieves a list of creatives, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.CreativesListResponse; + // Retrieves a list of creatives, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CreativesListResponse; + // Updates an existing creative. This method supports patch semantics. + patch(resource: Schema.Creative, profileId: string, id: string): Dfareporting.Schema.Creative; + // Updates an existing creative. + update(resource: Schema.Creative, profileId: string): Dfareporting.Schema.Creative; + } + export interface DimensionValuesCollection { + // Retrieves list of report dimension values for a list of filters. + query(resource: Schema.DimensionValueRequest, profileId: string): Dfareporting.Schema.DimensionValueList; + // Retrieves list of report dimension values for a list of filters. + query(resource: Schema.DimensionValueRequest, profileId: string, optionalArgs: object): Dfareporting.Schema.DimensionValueList; + } + export interface DirectorySitesCollection { + // Gets one directory site by ID. + get(profileId: string, id: string): Dfareporting.Schema.DirectorySite; + // Inserts a new directory site. + insert(resource: Schema.DirectorySite, profileId: string): Dfareporting.Schema.DirectorySite; + // Retrieves a list of directory sites, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.DirectorySitesListResponse; + // Retrieves a list of directory sites, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.DirectorySitesListResponse; + } + export interface DynamicTargetingKeysCollection { + // Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement. + insert(resource: Schema.DynamicTargetingKey, profileId: string): Dfareporting.Schema.DynamicTargetingKey; + // Retrieves a list of dynamic targeting keys. + list(profileId: string): Dfareporting.Schema.DynamicTargetingKeysListResponse; + // Retrieves a list of dynamic targeting keys. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.DynamicTargetingKeysListResponse; + // Deletes an existing dynamic targeting key. + remove(profileId: string, objectId: string, name: string, objectType: string): void; + } + export interface EventTagsCollection { + // Gets one event tag by ID. + get(profileId: string, id: string): Dfareporting.Schema.EventTag; + // Inserts a new event tag. + insert(resource: Schema.EventTag, profileId: string): Dfareporting.Schema.EventTag; + // Retrieves a list of event tags, possibly filtered. + list(profileId: string): Dfareporting.Schema.EventTagsListResponse; + // Retrieves a list of event tags, possibly filtered. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.EventTagsListResponse; + // Updates an existing event tag. This method supports patch semantics. + patch(resource: Schema.EventTag, profileId: string, id: string): Dfareporting.Schema.EventTag; + // Deletes an existing event tag. + remove(profileId: string, id: string): void; + // Updates an existing event tag. + update(resource: Schema.EventTag, profileId: string): Dfareporting.Schema.EventTag; + } + export interface FilesCollection { + // Retrieves a report file by its report ID and file ID. This method supports media download. + get(reportId: string, fileId: string): Dfareporting.Schema.File; + // Lists files for a user profile. + list(profileId: string): Dfareporting.Schema.FileList; + // Lists files for a user profile. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FileList; + } + export interface FloodlightActivitiesCollection { + // Generates a tag for a floodlight activity. + generatetag(profileId: string): Dfareporting.Schema.FloodlightActivitiesGenerateTagResponse; + // Generates a tag for a floodlight activity. + generatetag(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightActivitiesGenerateTagResponse; + // Gets one floodlight activity by ID. + get(profileId: string, id: string): Dfareporting.Schema.FloodlightActivity; + // Inserts a new floodlight activity. + insert(resource: Schema.FloodlightActivity, profileId: string): Dfareporting.Schema.FloodlightActivity; + // Retrieves a list of floodlight activities, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.FloodlightActivitiesListResponse; + // Retrieves a list of floodlight activities, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightActivitiesListResponse; + // Updates an existing floodlight activity. This method supports patch semantics. + patch(resource: Schema.FloodlightActivity, profileId: string, id: string): Dfareporting.Schema.FloodlightActivity; + // Deletes an existing floodlight activity. + remove(profileId: string, id: string): void; + // Updates an existing floodlight activity. + update(resource: Schema.FloodlightActivity, profileId: string): Dfareporting.Schema.FloodlightActivity; + } + export interface FloodlightActivityGroupsCollection { + // Gets one floodlight activity group by ID. + get(profileId: string, id: string): Dfareporting.Schema.FloodlightActivityGroup; + // Inserts a new floodlight activity group. + insert(resource: Schema.FloodlightActivityGroup, profileId: string): Dfareporting.Schema.FloodlightActivityGroup; + // Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.FloodlightActivityGroupsListResponse; + // Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightActivityGroupsListResponse; + // Updates an existing floodlight activity group. This method supports patch semantics. + patch(resource: Schema.FloodlightActivityGroup, profileId: string, id: string): Dfareporting.Schema.FloodlightActivityGroup; + // Updates an existing floodlight activity group. + update(resource: Schema.FloodlightActivityGroup, profileId: string): Dfareporting.Schema.FloodlightActivityGroup; + } + export interface FloodlightConfigurationsCollection { + // Gets one floodlight configuration by ID. + get(profileId: string, id: string): Dfareporting.Schema.FloodlightConfiguration; + // Retrieves a list of floodlight configurations, possibly filtered. + list(profileId: string): Dfareporting.Schema.FloodlightConfigurationsListResponse; + // Retrieves a list of floodlight configurations, possibly filtered. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightConfigurationsListResponse; + // Updates an existing floodlight configuration. This method supports patch semantics. + patch(resource: Schema.FloodlightConfiguration, profileId: string, id: string): Dfareporting.Schema.FloodlightConfiguration; + // Updates an existing floodlight configuration. + update(resource: Schema.FloodlightConfiguration, profileId: string): Dfareporting.Schema.FloodlightConfiguration; + } + export interface InventoryItemsCollection { + // Gets one inventory item by ID. + get(profileId: string, projectId: string, id: string): Dfareporting.Schema.InventoryItem; + // Retrieves a list of inventory items, possibly filtered. This method supports paging. + list(profileId: string, projectId: string): Dfareporting.Schema.InventoryItemsListResponse; + // Retrieves a list of inventory items, possibly filtered. This method supports paging. + list(profileId: string, projectId: string, optionalArgs: object): Dfareporting.Schema.InventoryItemsListResponse; + } + export interface LanguagesCollection { + // Retrieves a list of languages. + list(profileId: string): Dfareporting.Schema.LanguagesListResponse; + } + export interface MetrosCollection { + // Retrieves a list of metros. + list(profileId: string): Dfareporting.Schema.MetrosListResponse; + } + export interface MobileAppsCollection { + // Gets one mobile app by ID. + get(profileId: string, id: string): Dfareporting.Schema.MobileApp; + // Retrieves list of available mobile apps. + list(profileId: string): Dfareporting.Schema.MobileAppsListResponse; + // Retrieves list of available mobile apps. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.MobileAppsListResponse; + } + export interface MobileCarriersCollection { + // Gets one mobile carrier by ID. + get(profileId: string, id: string): Dfareporting.Schema.MobileCarrier; + // Retrieves a list of mobile carriers. + list(profileId: string): Dfareporting.Schema.MobileCarriersListResponse; + } + export interface OperatingSystemVersionsCollection { + // Gets one operating system version by ID. + get(profileId: string, id: string): Dfareporting.Schema.OperatingSystemVersion; + // Retrieves a list of operating system versions. + list(profileId: string): Dfareporting.Schema.OperatingSystemVersionsListResponse; + } + export interface OperatingSystemsCollection { + // Gets one operating system by DART ID. + get(profileId: string, dartId: string): Dfareporting.Schema.OperatingSystem; + // Retrieves a list of operating systems. + list(profileId: string): Dfareporting.Schema.OperatingSystemsListResponse; + } + export interface OrderDocumentsCollection { + // Gets one order document by ID. + get(profileId: string, projectId: string, id: string): Dfareporting.Schema.OrderDocument; + // Retrieves a list of order documents, possibly filtered. This method supports paging. + list(profileId: string, projectId: string): Dfareporting.Schema.OrderDocumentsListResponse; + // Retrieves a list of order documents, possibly filtered. This method supports paging. + list(profileId: string, projectId: string, optionalArgs: object): Dfareporting.Schema.OrderDocumentsListResponse; + } + export interface OrdersCollection { + // Gets one order by ID. + get(profileId: string, projectId: string, id: string): Dfareporting.Schema.Order; + // Retrieves a list of orders, possibly filtered. This method supports paging. + list(profileId: string, projectId: string): Dfareporting.Schema.OrdersListResponse; + // Retrieves a list of orders, possibly filtered. This method supports paging. + list(profileId: string, projectId: string, optionalArgs: object): Dfareporting.Schema.OrdersListResponse; + } + export interface PlacementGroupsCollection { + // Gets one placement group by ID. + get(profileId: string, id: string): Dfareporting.Schema.PlacementGroup; + // Inserts a new placement group. + insert(resource: Schema.PlacementGroup, profileId: string): Dfareporting.Schema.PlacementGroup; + // Retrieves a list of placement groups, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.PlacementGroupsListResponse; + // Retrieves a list of placement groups, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementGroupsListResponse; + // Updates an existing placement group. This method supports patch semantics. + patch(resource: Schema.PlacementGroup, profileId: string, id: string): Dfareporting.Schema.PlacementGroup; + // Updates an existing placement group. + update(resource: Schema.PlacementGroup, profileId: string): Dfareporting.Schema.PlacementGroup; + } + export interface PlacementStrategiesCollection { + // Gets one placement strategy by ID. + get(profileId: string, id: string): Dfareporting.Schema.PlacementStrategy; + // Inserts a new placement strategy. + insert(resource: Schema.PlacementStrategy, profileId: string): Dfareporting.Schema.PlacementStrategy; + // Retrieves a list of placement strategies, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.PlacementStrategiesListResponse; + // Retrieves a list of placement strategies, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementStrategiesListResponse; + // Updates an existing placement strategy. This method supports patch semantics. + patch(resource: Schema.PlacementStrategy, profileId: string, id: string): Dfareporting.Schema.PlacementStrategy; + // Deletes an existing placement strategy. + remove(profileId: string, id: string): void; + // Updates an existing placement strategy. + update(resource: Schema.PlacementStrategy, profileId: string): Dfareporting.Schema.PlacementStrategy; + } + export interface PlacementsCollection { + // Generates tags for a placement. + generatetags(profileId: string): Dfareporting.Schema.PlacementsGenerateTagsResponse; + // Generates tags for a placement. + generatetags(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementsGenerateTagsResponse; + // Gets one placement by ID. + get(profileId: string, id: string): Dfareporting.Schema.Placement; + // Inserts a new placement. + insert(resource: Schema.Placement, profileId: string): Dfareporting.Schema.Placement; + // Retrieves a list of placements, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.PlacementsListResponse; + // Retrieves a list of placements, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementsListResponse; + // Updates an existing placement. This method supports patch semantics. + patch(resource: Schema.Placement, profileId: string, id: string): Dfareporting.Schema.Placement; + // Updates an existing placement. + update(resource: Schema.Placement, profileId: string): Dfareporting.Schema.Placement; + } + export interface PlatformTypesCollection { + // Gets one platform type by ID. + get(profileId: string, id: string): Dfareporting.Schema.PlatformType; + // Retrieves a list of platform types. + list(profileId: string): Dfareporting.Schema.PlatformTypesListResponse; + } + export interface PostalCodesCollection { + // Gets one postal code by ID. + get(profileId: string, code: string): Dfareporting.Schema.PostalCode; + // Retrieves a list of postal codes. + list(profileId: string): Dfareporting.Schema.PostalCodesListResponse; + } + export interface ProjectsCollection { + // Gets one project by ID. + get(profileId: string, id: string): Dfareporting.Schema.Project; + // Retrieves a list of projects, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.ProjectsListResponse; + // Retrieves a list of projects, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ProjectsListResponse; + } + export interface RegionsCollection { + // Retrieves a list of regions. + list(profileId: string): Dfareporting.Schema.RegionsListResponse; + } + export interface RemarketingListSharesCollection { + // Gets one remarketing list share by remarketing list ID. + get(profileId: string, remarketingListId: string): Dfareporting.Schema.RemarketingListShare; + // Updates an existing remarketing list share. This method supports patch semantics. + patch(resource: Schema.RemarketingListShare, profileId: string, remarketingListId: string): Dfareporting.Schema.RemarketingListShare; + // Updates an existing remarketing list share. + update(resource: Schema.RemarketingListShare, profileId: string): Dfareporting.Schema.RemarketingListShare; + } + export interface RemarketingListsCollection { + // Gets one remarketing list by ID. + get(profileId: string, id: string): Dfareporting.Schema.RemarketingList; + // Inserts a new remarketing list. + insert(resource: Schema.RemarketingList, profileId: string): Dfareporting.Schema.RemarketingList; + // Retrieves a list of remarketing lists, possibly filtered. This method supports paging. + list(profileId: string, advertiserId: string): Dfareporting.Schema.RemarketingListsListResponse; + // Retrieves a list of remarketing lists, possibly filtered. This method supports paging. + list(profileId: string, advertiserId: string, optionalArgs: object): Dfareporting.Schema.RemarketingListsListResponse; + // Updates an existing remarketing list. This method supports patch semantics. + patch(resource: Schema.RemarketingList, profileId: string, id: string): Dfareporting.Schema.RemarketingList; + // Updates an existing remarketing list. + update(resource: Schema.RemarketingList, profileId: string): Dfareporting.Schema.RemarketingList; + } + export interface ReportsCollection { + CompatibleFields?: Dfareporting.Collection.Reports.CompatibleFieldsCollection; + Files?: Dfareporting.Collection.Reports.FilesCollection; + // Retrieves a report by its ID. + get(profileId: string, reportId: string): Dfareporting.Schema.Report; + // Creates a report. + insert(resource: Schema.Report, profileId: string): Dfareporting.Schema.Report; + // Retrieves list of reports. + list(profileId: string): Dfareporting.Schema.ReportList; + // Retrieves list of reports. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ReportList; + // Updates a report. This method supports patch semantics. + patch(resource: Schema.Report, profileId: string, reportId: string): Dfareporting.Schema.Report; + // Deletes a report by its ID. + remove(profileId: string, reportId: string): void; + // Runs a report. + run(profileId: string, reportId: string): Dfareporting.Schema.File; + // Runs a report. + run(profileId: string, reportId: string, optionalArgs: object): Dfareporting.Schema.File; + // Updates a report. + update(resource: Schema.Report, profileId: string, reportId: string): Dfareporting.Schema.Report; + } + export interface SitesCollection { + // Gets one site by ID. + get(profileId: string, id: string): Dfareporting.Schema.Site; + // Inserts a new site. + insert(resource: Schema.Site, profileId: string): Dfareporting.Schema.Site; + // Retrieves a list of sites, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.SitesListResponse; + // Retrieves a list of sites, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.SitesListResponse; + // Updates an existing site. This method supports patch semantics. + patch(resource: Schema.Site, profileId: string, id: string): Dfareporting.Schema.Site; + // Updates an existing site. + update(resource: Schema.Site, profileId: string): Dfareporting.Schema.Site; + } + export interface SizesCollection { + // Gets one size by ID. + get(profileId: string, id: string): Dfareporting.Schema.Size; + // Inserts a new size. + insert(resource: Schema.Size, profileId: string): Dfareporting.Schema.Size; + // Retrieves a list of sizes, possibly filtered. Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI. + list(profileId: string): Dfareporting.Schema.SizesListResponse; + // Retrieves a list of sizes, possibly filtered. Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.SizesListResponse; + } + export interface SubaccountsCollection { + // Gets one subaccount by ID. + get(profileId: string, id: string): Dfareporting.Schema.Subaccount; + // Inserts a new subaccount. + insert(resource: Schema.Subaccount, profileId: string): Dfareporting.Schema.Subaccount; + // Gets a list of subaccounts, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.SubaccountsListResponse; + // Gets a list of subaccounts, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.SubaccountsListResponse; + // Updates an existing subaccount. This method supports patch semantics. + patch(resource: Schema.Subaccount, profileId: string, id: string): Dfareporting.Schema.Subaccount; + // Updates an existing subaccount. + update(resource: Schema.Subaccount, profileId: string): Dfareporting.Schema.Subaccount; + } + export interface TargetableRemarketingListsCollection { + // Gets one remarketing list by ID. + get(profileId: string, id: string): Dfareporting.Schema.TargetableRemarketingList; + // Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging. + list(profileId: string, advertiserId: string): Dfareporting.Schema.TargetableRemarketingListsListResponse; + // Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging. + list(profileId: string, advertiserId: string, optionalArgs: object): Dfareporting.Schema.TargetableRemarketingListsListResponse; + } + export interface TargetingTemplatesCollection { + // Gets one targeting template by ID. + get(profileId: string, id: string): Dfareporting.Schema.TargetingTemplate; + // Inserts a new targeting template. + insert(resource: Schema.TargetingTemplate, profileId: string): Dfareporting.Schema.TargetingTemplate; + // Retrieves a list of targeting templates, optionally filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.TargetingTemplatesListResponse; + // Retrieves a list of targeting templates, optionally filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.TargetingTemplatesListResponse; + // Updates an existing targeting template. This method supports patch semantics. + patch(resource: Schema.TargetingTemplate, profileId: string, id: string): Dfareporting.Schema.TargetingTemplate; + // Updates an existing targeting template. + update(resource: Schema.TargetingTemplate, profileId: string): Dfareporting.Schema.TargetingTemplate; + } + export interface UserProfilesCollection { + // Gets one user profile by ID. + get(profileId: string): Dfareporting.Schema.UserProfile; + // Retrieves list of user profiles for a user. + list(): Dfareporting.Schema.UserProfileList; + } + export interface UserRolePermissionGroupsCollection { + // Gets one user role permission group by ID. + get(profileId: string, id: string): Dfareporting.Schema.UserRolePermissionGroup; + // Gets a list of all supported user role permission groups. + list(profileId: string): Dfareporting.Schema.UserRolePermissionGroupsListResponse; + } + export interface UserRolePermissionsCollection { + // Gets one user role permission by ID. + get(profileId: string, id: string): Dfareporting.Schema.UserRolePermission; + // Gets a list of user role permissions, possibly filtered. + list(profileId: string): Dfareporting.Schema.UserRolePermissionsListResponse; + // Gets a list of user role permissions, possibly filtered. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.UserRolePermissionsListResponse; + } + export interface UserRolesCollection { + // Gets one user role by ID. + get(profileId: string, id: string): Dfareporting.Schema.UserRole; + // Inserts a new user role. + insert(resource: Schema.UserRole, profileId: string): Dfareporting.Schema.UserRole; + // Retrieves a list of user roles, possibly filtered. This method supports paging. + list(profileId: string): Dfareporting.Schema.UserRolesListResponse; + // Retrieves a list of user roles, possibly filtered. This method supports paging. + list(profileId: string, optionalArgs: object): Dfareporting.Schema.UserRolesListResponse; + // Updates an existing user role. This method supports patch semantics. + patch(resource: Schema.UserRole, profileId: string, id: string): Dfareporting.Schema.UserRole; + // Deletes an existing user role. + remove(profileId: string, id: string): void; + // Updates an existing user role. + update(resource: Schema.UserRole, profileId: string): Dfareporting.Schema.UserRole; + } + export interface VideoFormatsCollection { + // Gets one video format by ID. + get(profileId: string, id: number): Dfareporting.Schema.VideoFormat; + // Lists available video formats. + list(profileId: string): Dfareporting.Schema.VideoFormatsListResponse; + } + } + namespace Schema { + export interface Account { + accountPermissionIds?: string[]; + accountProfile?: string; + active?: boolean; + activeAdsLimitTier?: string; + activeViewOptOut?: boolean; + availablePermissionIds?: string[]; + countryId?: string; + currencyId?: string; + defaultCreativeSizeId?: string; + description?: string; + id?: string; + kind?: string; + locale?: string; + maximumImageSize?: string; + name?: string; + nielsenOcrEnabled?: boolean; + reportsConfiguration?: Dfareporting.Schema.ReportsConfiguration; + shareReportsWithTwitter?: boolean; + teaserSizeLimit?: string; + } + export interface AccountActiveAdSummary { + accountId?: string; + activeAds?: string; + activeAdsLimitTier?: string; + availableAds?: string; + kind?: string; + } + export interface AccountPermission { + accountProfiles?: string[]; + id?: string; + kind?: string; + level?: string; + name?: string; + permissionGroupId?: string; + } + export interface AccountPermissionGroup { + id?: string; + kind?: string; + name?: string; + } + export interface AccountPermissionGroupsListResponse { + accountPermissionGroups?: Dfareporting.Schema.AccountPermissionGroup[]; + kind?: string; + } + export interface AccountPermissionsListResponse { + accountPermissions?: Dfareporting.Schema.AccountPermission[]; + kind?: string; + } + export interface AccountUserProfile { + accountId?: string; + active?: boolean; + advertiserFilter?: Dfareporting.Schema.ObjectFilter; + campaignFilter?: Dfareporting.Schema.ObjectFilter; + comments?: string; + email?: string; + id?: string; + kind?: string; + locale?: string; + name?: string; + siteFilter?: Dfareporting.Schema.ObjectFilter; + subaccountId?: string; + traffickerType?: string; + userAccessType?: string; + userRoleFilter?: Dfareporting.Schema.ObjectFilter; + userRoleId?: string; + } + export interface AccountUserProfilesListResponse { + accountUserProfiles?: Dfareporting.Schema.AccountUserProfile[]; + kind?: string; + nextPageToken?: string; + } + export interface AccountsListResponse { + accounts?: Dfareporting.Schema.Account[]; + kind?: string; + nextPageToken?: string; + } + export interface Activities { + filters?: Dfareporting.Schema.DimensionValue[]; + kind?: string; + metricNames?: string[]; + } + export interface Ad { + accountId?: string; + active?: boolean; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + archived?: boolean; + audienceSegmentId?: string; + campaignId?: string; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; + clickThroughUrlSuffixProperties?: Dfareporting.Schema.ClickThroughUrlSuffixProperties; + comments?: string; + compatibility?: string; + createInfo?: Dfareporting.Schema.LastModifiedInfo; + creativeGroupAssignments?: Dfareporting.Schema.CreativeGroupAssignment[]; + creativeRotation?: Dfareporting.Schema.CreativeRotation; + dayPartTargeting?: Dfareporting.Schema.DayPartTargeting; + defaultClickThroughEventTagProperties?: Dfareporting.Schema.DefaultClickThroughEventTagProperties; + deliverySchedule?: Dfareporting.Schema.DeliverySchedule; + dynamicClickTracker?: boolean; + endTime?: string; + eventTagOverrides?: Dfareporting.Schema.EventTagOverride[]; + geoTargeting?: Dfareporting.Schema.GeoTargeting; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + keyValueTargetingExpression?: Dfareporting.Schema.KeyValueTargetingExpression; + kind?: string; + languageTargeting?: Dfareporting.Schema.LanguageTargeting; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + name?: string; + placementAssignments?: Dfareporting.Schema.PlacementAssignment[]; + remarketingListExpression?: Dfareporting.Schema.ListTargetingExpression; + size?: Dfareporting.Schema.Size; + sslCompliant?: boolean; + sslRequired?: boolean; + startTime?: string; + subaccountId?: string; + targetingTemplateId?: string; + technologyTargeting?: Dfareporting.Schema.TechnologyTargeting; + type?: string; + } + export interface AdBlockingConfiguration { + clickThroughUrl?: string; + creativeBundleId?: string; + enabled?: boolean; + overrideClickThroughUrl?: boolean; + } + export interface AdSlot { + comment?: string; + compatibility?: string; + height?: string; + linkedPlacementId?: string; + name?: string; + paymentSourceType?: string; + primary?: boolean; + width?: string; + } + export interface AdsListResponse { + ads?: Dfareporting.Schema.Ad[]; + kind?: string; + nextPageToken?: string; + } + export interface Advertiser { + accountId?: string; + advertiserGroupId?: string; + clickThroughUrlSuffix?: string; + defaultClickThroughEventTagId?: string; + defaultEmail?: string; + floodlightConfigurationId?: string; + floodlightConfigurationIdDimensionValue?: Dfareporting.Schema.DimensionValue; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + kind?: string; + name?: string; + originalFloodlightConfigurationId?: string; + status?: string; + subaccountId?: string; + suspended?: boolean; + } + export interface AdvertiserGroup { + accountId?: string; + id?: string; + kind?: string; + name?: string; + } + export interface AdvertiserGroupsListResponse { + advertiserGroups?: Dfareporting.Schema.AdvertiserGroup[]; + kind?: string; + nextPageToken?: string; + } + export interface AdvertiserLandingPagesListResponse { + kind?: string; + landingPages?: Dfareporting.Schema.LandingPage[]; + nextPageToken?: string; + } + export interface AdvertisersListResponse { + advertisers?: Dfareporting.Schema.Advertiser[]; + kind?: string; + nextPageToken?: string; + } + export interface AudienceSegment { + allocation?: number; + id?: string; + name?: string; + } + export interface AudienceSegmentGroup { + audienceSegments?: Dfareporting.Schema.AudienceSegment[]; + id?: string; + name?: string; + } + export interface Browser { + browserVersionId?: string; + dartId?: string; + kind?: string; + majorVersion?: string; + minorVersion?: string; + name?: string; + } + export interface BrowsersListResponse { + browsers?: Dfareporting.Schema.Browser[]; + kind?: string; + } + export interface Campaign { + accountId?: string; + adBlockingConfiguration?: Dfareporting.Schema.AdBlockingConfiguration; + additionalCreativeOptimizationConfigurations?: Dfareporting.Schema.CreativeOptimizationConfiguration[]; + advertiserGroupId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + archived?: boolean; + audienceSegmentGroups?: Dfareporting.Schema.AudienceSegmentGroup[]; + billingInvoiceCode?: string; + clickThroughUrlSuffixProperties?: Dfareporting.Schema.ClickThroughUrlSuffixProperties; + comment?: string; + createInfo?: Dfareporting.Schema.LastModifiedInfo; + creativeGroupIds?: string[]; + creativeOptimizationConfiguration?: Dfareporting.Schema.CreativeOptimizationConfiguration; + defaultClickThroughEventTagProperties?: Dfareporting.Schema.DefaultClickThroughEventTagProperties; + defaultLandingPageId?: string; + endDate?: string; + eventTagOverrides?: Dfareporting.Schema.EventTagOverride[]; + externalId?: string; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + kind?: string; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + name?: string; + nielsenOcrEnabled?: boolean; + startDate?: string; + subaccountId?: string; + traffickerEmails?: string[]; + } + export interface CampaignCreativeAssociation { + creativeId?: string; + kind?: string; + } + export interface CampaignCreativeAssociationsListResponse { + campaignCreativeAssociations?: Dfareporting.Schema.CampaignCreativeAssociation[]; + kind?: string; + nextPageToken?: string; + } + export interface CampaignsListResponse { + campaigns?: Dfareporting.Schema.Campaign[]; + kind?: string; + nextPageToken?: string; + } + export interface ChangeLog { + accountId?: string; + action?: string; + changeTime?: string; + fieldName?: string; + id?: string; + kind?: string; + newValue?: string; + objectId?: string; + objectType?: string; + oldValue?: string; + subaccountId?: string; + transactionId?: string; + userProfileId?: string; + userProfileName?: string; + } + export interface ChangeLogsListResponse { + changeLogs?: Dfareporting.Schema.ChangeLog[]; + kind?: string; + nextPageToken?: string; + } + export interface CitiesListResponse { + cities?: Dfareporting.Schema.City[]; + kind?: string; + } + export interface City { + countryCode?: string; + countryDartId?: string; + dartId?: string; + kind?: string; + metroCode?: string; + metroDmaId?: string; + name?: string; + regionCode?: string; + regionDartId?: string; + } + export interface ClickTag { + clickThroughUrl?: Dfareporting.Schema.CreativeClickThroughUrl; + eventName?: string; + name?: string; + } + export interface ClickThroughUrl { + computedClickThroughUrl?: string; + customClickThroughUrl?: string; + defaultLandingPage?: boolean; + landingPageId?: string; + } + export interface ClickThroughUrlSuffixProperties { + clickThroughUrlSuffix?: string; + overrideInheritedSuffix?: boolean; + } + export interface CompanionClickThroughOverride { + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; + creativeId?: string; + } + export interface CompanionSetting { + companionsDisabled?: boolean; + enabledSizes?: Dfareporting.Schema.Size[]; + imageOnly?: boolean; + kind?: string; + } + export interface CompatibleFields { + crossDimensionReachReportCompatibleFields?: Dfareporting.Schema.CrossDimensionReachReportCompatibleFields; + floodlightReportCompatibleFields?: Dfareporting.Schema.FloodlightReportCompatibleFields; + kind?: string; + pathToConversionReportCompatibleFields?: Dfareporting.Schema.PathToConversionReportCompatibleFields; + reachReportCompatibleFields?: Dfareporting.Schema.ReachReportCompatibleFields; + reportCompatibleFields?: Dfareporting.Schema.ReportCompatibleFields; + } + export interface ConnectionType { + id?: string; + kind?: string; + name?: string; + } + export interface ConnectionTypesListResponse { + connectionTypes?: Dfareporting.Schema.ConnectionType[]; + kind?: string; + } + export interface ContentCategoriesListResponse { + contentCategories?: Dfareporting.Schema.ContentCategory[]; + kind?: string; + nextPageToken?: string; + } + export interface ContentCategory { + accountId?: string; + id?: string; + kind?: string; + name?: string; + } + export interface Conversion { + childDirectedTreatment?: boolean; + customVariables?: Dfareporting.Schema.CustomFloodlightVariable[]; + encryptedUserId?: string; + encryptedUserIdCandidates?: string[]; + floodlightActivityId?: string; + floodlightConfigurationId?: string; + gclid?: string; + kind?: string; + limitAdTracking?: boolean; + mobileDeviceId?: string; + nonPersonalizedAd?: boolean; + ordinal?: string; + quantity?: string; + timestampMicros?: string; + treatmentForUnderage?: boolean; + value?: Number; + } + export interface ConversionError { + code?: string; + kind?: string; + message?: string; + } + export interface ConversionStatus { + conversion?: Dfareporting.Schema.Conversion; + errors?: Dfareporting.Schema.ConversionError[]; + kind?: string; + } + export interface ConversionsBatchInsertRequest { + conversions?: Dfareporting.Schema.Conversion[]; + encryptionInfo?: Dfareporting.Schema.EncryptionInfo; + kind?: string; + } + export interface ConversionsBatchInsertResponse { + hasFailures?: boolean; + kind?: string; + status?: Dfareporting.Schema.ConversionStatus[]; + } + export interface ConversionsBatchUpdateRequest { + conversions?: Dfareporting.Schema.Conversion[]; + encryptionInfo?: Dfareporting.Schema.EncryptionInfo; + kind?: string; + } + export interface ConversionsBatchUpdateResponse { + hasFailures?: boolean; + kind?: string; + status?: Dfareporting.Schema.ConversionStatus[]; + } + export interface CountriesListResponse { + countries?: Dfareporting.Schema.Country[]; + kind?: string; + } + export interface Country { + countryCode?: string; + dartId?: string; + kind?: string; + name?: string; + sslEnabled?: boolean; + } + export interface Creative { + accountId?: string; + active?: boolean; + adParameters?: string; + adTagKeys?: string[]; + additionalSizes?: Dfareporting.Schema.Size[]; + advertiserId?: string; + allowScriptAccess?: boolean; + archived?: boolean; + artworkType?: string; + authoringSource?: string; + authoringTool?: string; + autoAdvanceImages?: boolean; + backgroundColor?: string; + backupImageClickThroughUrl?: Dfareporting.Schema.CreativeClickThroughUrl; + backupImageFeatures?: string[]; + backupImageReportingLabel?: string; + backupImageTargetWindow?: Dfareporting.Schema.TargetWindow; + clickTags?: Dfareporting.Schema.ClickTag[]; + commercialId?: string; + companionCreatives?: string[]; + compatibility?: string[]; + convertFlashToHtml5?: boolean; + counterCustomEvents?: Dfareporting.Schema.CreativeCustomEvent[]; + creativeAssetSelection?: Dfareporting.Schema.CreativeAssetSelection; + creativeAssets?: Dfareporting.Schema.CreativeAsset[]; + creativeFieldAssignments?: Dfareporting.Schema.CreativeFieldAssignment[]; + customKeyValues?: string[]; + dynamicAssetSelection?: boolean; + exitCustomEvents?: Dfareporting.Schema.CreativeCustomEvent[]; + fsCommand?: Dfareporting.Schema.FsCommand; + htmlCode?: string; + htmlCodeLocked?: boolean; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + kind?: string; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + latestTraffickedCreativeId?: string; + mediaDescription?: string; + mediaDuration?: Number; + name?: string; + overrideCss?: string; + progressOffset?: Dfareporting.Schema.VideoOffset; + redirectUrl?: string; + renderingId?: string; + renderingIdDimensionValue?: Dfareporting.Schema.DimensionValue; + requiredFlashPluginVersion?: string; + requiredFlashVersion?: number; + size?: Dfareporting.Schema.Size; + skipOffset?: Dfareporting.Schema.VideoOffset; + skippable?: boolean; + sslCompliant?: boolean; + sslOverride?: boolean; + studioAdvertiserId?: string; + studioCreativeId?: string; + studioTraffickedCreativeId?: string; + subaccountId?: string; + thirdPartyBackupImageImpressionsUrl?: string; + thirdPartyRichMediaImpressionsUrl?: string; + thirdPartyUrls?: Dfareporting.Schema.ThirdPartyTrackingUrl[]; + timerCustomEvents?: Dfareporting.Schema.CreativeCustomEvent[]; + totalFileSize?: string; + type?: string; + universalAdId?: Dfareporting.Schema.UniversalAdId; + version?: number; + } + export interface CreativeAsset { + actionScript3?: boolean; + active?: boolean; + additionalSizes?: Dfareporting.Schema.Size[]; + alignment?: string; + artworkType?: string; + assetIdentifier?: Dfareporting.Schema.CreativeAssetId; + audioBitRate?: number; + audioSampleRate?: number; + backupImageExit?: Dfareporting.Schema.CreativeCustomEvent; + bitRate?: number; + childAssetType?: string; + collapsedSize?: Dfareporting.Schema.Size; + companionCreativeIds?: string[]; + customStartTimeValue?: number; + detectedFeatures?: string[]; + displayType?: string; + duration?: number; + durationType?: string; + expandedDimension?: Dfareporting.Schema.Size; + fileSize?: string; + flashVersion?: number; + frameRate?: Number; + hideFlashObjects?: boolean; + hideSelectionBoxes?: boolean; + horizontallyLocked?: boolean; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + mediaDuration?: Number; + mimeType?: string; + offset?: Dfareporting.Schema.OffsetPosition; + orientation?: string; + originalBackup?: boolean; + politeLoad?: boolean; + position?: Dfareporting.Schema.OffsetPosition; + positionLeftUnit?: string; + positionTopUnit?: string; + progressiveServingUrl?: string; + pushdown?: boolean; + pushdownDuration?: Number; + role?: string; + size?: Dfareporting.Schema.Size; + sslCompliant?: boolean; + startTimeType?: string; + streamingServingUrl?: string; + transparency?: boolean; + verticallyLocked?: boolean; + windowMode?: string; + zIndex?: number; + zipFilename?: string; + zipFilesize?: string; + } + export interface CreativeAssetId { + name?: string; + type?: string; + } + export interface CreativeAssetMetadata { + assetIdentifier?: Dfareporting.Schema.CreativeAssetId; + clickTags?: Dfareporting.Schema.ClickTag[]; + detectedFeatures?: string[]; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + kind?: string; + warnedValidationRules?: string[]; + } + export interface CreativeAssetSelection { + defaultAssetId?: string; + rules?: Dfareporting.Schema.Rule[]; + } + export interface CreativeAssignment { + active?: boolean; + applyEventTags?: boolean; + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; + companionCreativeOverrides?: Dfareporting.Schema.CompanionClickThroughOverride[]; + creativeGroupAssignments?: Dfareporting.Schema.CreativeGroupAssignment[]; + creativeId?: string; + creativeIdDimensionValue?: Dfareporting.Schema.DimensionValue; + endTime?: string; + richMediaExitOverrides?: Dfareporting.Schema.RichMediaExitOverride[]; + sequence?: number; + sslCompliant?: boolean; + startTime?: string; + weight?: number; + } + export interface CreativeClickThroughUrl { + computedClickThroughUrl?: string; + customClickThroughUrl?: string; + landingPageId?: string; + } + export interface CreativeCustomEvent { + advertiserCustomEventId?: string; + advertiserCustomEventName?: string; + advertiserCustomEventType?: string; + artworkLabel?: string; + artworkType?: string; + exitClickThroughUrl?: Dfareporting.Schema.CreativeClickThroughUrl; + id?: string; + popupWindowProperties?: Dfareporting.Schema.PopupWindowProperties; + targetType?: string; + videoReportingId?: string; + } + export interface CreativeField { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + id?: string; + kind?: string; + name?: string; + subaccountId?: string; + } + export interface CreativeFieldAssignment { + creativeFieldId?: string; + creativeFieldValueId?: string; + } + export interface CreativeFieldValue { + id?: string; + kind?: string; + value?: string; + } + export interface CreativeFieldValuesListResponse { + creativeFieldValues?: Dfareporting.Schema.CreativeFieldValue[]; + kind?: string; + nextPageToken?: string; + } + export interface CreativeFieldsListResponse { + creativeFields?: Dfareporting.Schema.CreativeField[]; + kind?: string; + nextPageToken?: string; + } + export interface CreativeGroup { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + groupNumber?: number; + id?: string; + kind?: string; + name?: string; + subaccountId?: string; + } + export interface CreativeGroupAssignment { + creativeGroupId?: string; + creativeGroupNumber?: string; + } + export interface CreativeGroupsListResponse { + creativeGroups?: Dfareporting.Schema.CreativeGroup[]; + kind?: string; + nextPageToken?: string; + } + export interface CreativeOptimizationConfiguration { + id?: string; + name?: string; + optimizationActivitys?: Dfareporting.Schema.OptimizationActivity[]; + optimizationModel?: string; + } + export interface CreativeRotation { + creativeAssignments?: Dfareporting.Schema.CreativeAssignment[]; + creativeOptimizationConfigurationId?: string; + type?: string; + weightCalculationStrategy?: string; + } + export interface CreativesListResponse { + creatives?: Dfareporting.Schema.Creative[]; + kind?: string; + nextPageToken?: string; + } + export interface CrossDimensionReachReportCompatibleFields { + breakdown?: Dfareporting.Schema.Dimension[]; + dimensionFilters?: Dfareporting.Schema.Dimension[]; + kind?: string; + metrics?: Dfareporting.Schema.Metric[]; + overlapMetrics?: Dfareporting.Schema.Metric[]; + } + export interface CustomFloodlightVariable { + kind?: string; + type?: string; + value?: string; + } + export interface CustomRichMediaEvents { + filteredEventIds?: Dfareporting.Schema.DimensionValue[]; + kind?: string; + } + export interface CustomViewabilityMetric { + configuration?: Dfareporting.Schema.CustomViewabilityMetricConfiguration; + id?: string; + name?: string; + } + export interface CustomViewabilityMetricConfiguration { + audible?: boolean; + timeMillis?: number; + timePercent?: number; + viewabilityPercent?: number; + } + export interface DateRange { + endDate?: string; + kind?: string; + relativeDateRange?: string; + startDate?: string; + } + export interface DayPartTargeting { + daysOfWeek?: string[]; + hoursOfDay?: number[]; + userLocalTime?: boolean; + } + export interface DeepLink { + appUrl?: string; + fallbackUrl?: string; + kind?: string; + mobileApp?: Dfareporting.Schema.MobileApp; + remarketingListIds?: string[]; + } + export interface DefaultClickThroughEventTagProperties { + defaultClickThroughEventTagId?: string; + overrideInheritedEventTag?: boolean; + } + export interface DeliverySchedule { + frequencyCap?: Dfareporting.Schema.FrequencyCap; + hardCutoff?: boolean; + impressionRatio?: string; + priority?: string; + } + export interface DfpSettings { + dfpNetworkCode?: string; + dfpNetworkName?: string; + programmaticPlacementAccepted?: boolean; + pubPaidPlacementAccepted?: boolean; + publisherPortalOnly?: boolean; + } + export interface Dimension { + kind?: string; + name?: string; + } + export interface DimensionFilter { + dimensionName?: string; + kind?: string; + value?: string; + } + export interface DimensionValue { + dimensionName?: string; + etag?: string; + id?: string; + kind?: string; + matchType?: string; + value?: string; + } + export interface DimensionValueList { + etag?: string; + items?: Dfareporting.Schema.DimensionValue[]; + kind?: string; + nextPageToken?: string; + } + export interface DimensionValueRequest { + dimensionName?: string; + endDate?: string; + filters?: Dfareporting.Schema.DimensionFilter[]; + kind?: string; + startDate?: string; + } + export interface DirectorySite { + active?: boolean; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + inpageTagFormats?: string[]; + interstitialTagFormats?: string[]; + kind?: string; + name?: string; + settings?: Dfareporting.Schema.DirectorySiteSettings; + url?: string; + } + export interface DirectorySiteSettings { + activeViewOptOut?: boolean; + dfpSettings?: Dfareporting.Schema.DfpSettings; + instreamVideoPlacementAccepted?: boolean; + interstitialPlacementAccepted?: boolean; + } + export interface DirectorySitesListResponse { + directorySites?: Dfareporting.Schema.DirectorySite[]; + kind?: string; + nextPageToken?: string; + } + export interface DynamicTargetingKey { + kind?: string; + name?: string; + objectId?: string; + objectType?: string; + } + export interface DynamicTargetingKeysListResponse { + dynamicTargetingKeys?: Dfareporting.Schema.DynamicTargetingKey[]; + kind?: string; + } + export interface EncryptionInfo { + encryptionEntityId?: string; + encryptionEntityType?: string; + encryptionSource?: string; + kind?: string; + } + export interface EventTag { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + campaignId?: string; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; + enabledByDefault?: boolean; + excludeFromAdxRequests?: boolean; + id?: string; + kind?: string; + name?: string; + siteFilterType?: string; + siteIds?: string[]; + sslCompliant?: boolean; + status?: string; + subaccountId?: string; + type?: string; + url?: string; + urlEscapeLevels?: number; + } + export interface EventTagOverride { + enabled?: boolean; + id?: string; + } + export interface EventTagsListResponse { + eventTags?: Dfareporting.Schema.EventTag[]; + kind?: string; + } + export interface File { + dateRange?: Dfareporting.Schema.DateRange; + etag?: string; + fileName?: string; + format?: string; + id?: string; + kind?: string; + lastModifiedTime?: string; + reportId?: string; + status?: string; + urls?: Dfareporting.Schema.FileUrls; + } + export interface FileList { + etag?: string; + items?: Dfareporting.Schema.File[]; + kind?: string; + nextPageToken?: string; + } + export interface FileUrls { + apiUrl?: string; + browserUrl?: string; + } + export interface Flight { + endDate?: string; + rateOrCost?: string; + startDate?: string; + units?: string; + } + export interface FloodlightActivitiesGenerateTagResponse { + floodlightActivityTag?: string; + globalSiteTagGlobalSnippet?: string; + kind?: string; + } + export interface FloodlightActivitiesListResponse { + floodlightActivities?: Dfareporting.Schema.FloodlightActivity[]; + kind?: string; + nextPageToken?: string; + } + export interface FloodlightActivity { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + cacheBustingType?: string; + countingMethod?: string; + defaultTags?: Dfareporting.Schema.FloodlightActivityDynamicTag[]; + expectedUrl?: string; + floodlightActivityGroupId?: string; + floodlightActivityGroupName?: string; + floodlightActivityGroupTagString?: string; + floodlightActivityGroupType?: string; + floodlightConfigurationId?: string; + floodlightConfigurationIdDimensionValue?: Dfareporting.Schema.DimensionValue; + floodlightTagType?: string; + hidden?: boolean; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + kind?: string; + name?: string; + notes?: string; + publisherTags?: Dfareporting.Schema.FloodlightActivityPublisherDynamicTag[]; + secure?: boolean; + sslCompliant?: boolean; + sslRequired?: boolean; + subaccountId?: string; + tagFormat?: string; + tagString?: string; + userDefinedVariableTypes?: string[]; + } + export interface FloodlightActivityDynamicTag { + id?: string; + name?: string; + tag?: string; + } + export interface FloodlightActivityGroup { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + floodlightConfigurationId?: string; + floodlightConfigurationIdDimensionValue?: Dfareporting.Schema.DimensionValue; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + kind?: string; + name?: string; + subaccountId?: string; + tagString?: string; + type?: string; + } + export interface FloodlightActivityGroupsListResponse { + floodlightActivityGroups?: Dfareporting.Schema.FloodlightActivityGroup[]; + kind?: string; + nextPageToken?: string; + } + export interface FloodlightActivityPublisherDynamicTag { + clickThrough?: boolean; + directorySiteId?: string; + dynamicTag?: Dfareporting.Schema.FloodlightActivityDynamicTag; + siteId?: string; + siteIdDimensionValue?: Dfareporting.Schema.DimensionValue; + viewThrough?: boolean; + } + export interface FloodlightConfiguration { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + analyticsDataSharingEnabled?: boolean; + customViewabilityMetric?: Dfareporting.Schema.CustomViewabilityMetric; + exposureToConversionEnabled?: boolean; + firstDayOfWeek?: string; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + inAppAttributionTrackingEnabled?: boolean; + kind?: string; + lookbackConfiguration?: Dfareporting.Schema.LookbackConfiguration; + naturalSearchConversionAttributionOption?: string; + omnitureSettings?: Dfareporting.Schema.OmnitureSettings; + subaccountId?: string; + tagSettings?: Dfareporting.Schema.TagSettings; + thirdPartyAuthenticationTokens?: Dfareporting.Schema.ThirdPartyAuthenticationToken[]; + userDefinedVariableConfigurations?: Dfareporting.Schema.UserDefinedVariableConfiguration[]; + } + export interface FloodlightConfigurationsListResponse { + floodlightConfigurations?: Dfareporting.Schema.FloodlightConfiguration[]; + kind?: string; + } + export interface FloodlightReportCompatibleFields { + dimensionFilters?: Dfareporting.Schema.Dimension[]; + dimensions?: Dfareporting.Schema.Dimension[]; + kind?: string; + metrics?: Dfareporting.Schema.Metric[]; + } + export interface FrequencyCap { + duration?: string; + impressions?: string; + } + export interface FsCommand { + left?: number; + positionOption?: string; + top?: number; + windowHeight?: number; + windowWidth?: number; + } + export interface GeoTargeting { + cities?: Dfareporting.Schema.City[]; + countries?: Dfareporting.Schema.Country[]; + excludeCountries?: boolean; + metros?: Dfareporting.Schema.Metro[]; + postalCodes?: Dfareporting.Schema.PostalCode[]; + regions?: Dfareporting.Schema.Region[]; + } + export interface InventoryItem { + accountId?: string; + adSlots?: Dfareporting.Schema.AdSlot[]; + advertiserId?: string; + contentCategoryId?: string; + estimatedClickThroughRate?: string; + estimatedConversionRate?: string; + id?: string; + inPlan?: boolean; + kind?: string; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + name?: string; + negotiationChannelId?: string; + orderId?: string; + placementStrategyId?: string; + pricing?: Dfareporting.Schema.Pricing; + projectId?: string; + rfpId?: string; + siteId?: string; + subaccountId?: string; + type?: string; + } + export interface InventoryItemsListResponse { + inventoryItems?: Dfareporting.Schema.InventoryItem[]; + kind?: string; + nextPageToken?: string; + } + export interface KeyValueTargetingExpression { + expression?: string; + } + export interface LandingPage { + advertiserId?: string; + archived?: boolean; + deepLinks?: Dfareporting.Schema.DeepLink[]; + id?: string; + kind?: string; + name?: string; + url?: string; + } + export interface Language { + id?: string; + kind?: string; + languageCode?: string; + name?: string; + } + export interface LanguageTargeting { + languages?: Dfareporting.Schema.Language[]; + } + export interface LanguagesListResponse { + kind?: string; + languages?: Dfareporting.Schema.Language[]; + } + export interface LastModifiedInfo { + time?: string; + } + export interface ListPopulationClause { + terms?: Dfareporting.Schema.ListPopulationTerm[]; + } + export interface ListPopulationRule { + floodlightActivityId?: string; + floodlightActivityName?: string; + listPopulationClauses?: Dfareporting.Schema.ListPopulationClause[]; + } + export interface ListPopulationTerm { + contains?: boolean; + negation?: boolean; + operator?: string; + remarketingListId?: string; + type?: string; + value?: string; + variableFriendlyName?: string; + variableName?: string; + } + export interface ListTargetingExpression { + expression?: string; + } + export interface LookbackConfiguration { + clickDuration?: number; + postImpressionActivitiesDuration?: number; + } + export interface Metric { + kind?: string; + name?: string; + } + export interface Metro { + countryCode?: string; + countryDartId?: string; + dartId?: string; + dmaId?: string; + kind?: string; + metroCode?: string; + name?: string; + } + export interface MetrosListResponse { + kind?: string; + metros?: Dfareporting.Schema.Metro[]; + } + export interface MobileApp { + directory?: string; + id?: string; + kind?: string; + publisherName?: string; + title?: string; + } + export interface MobileAppsListResponse { + kind?: string; + mobileApps?: Dfareporting.Schema.MobileApp[]; + nextPageToken?: string; + } + export interface MobileCarrier { + countryCode?: string; + countryDartId?: string; + id?: string; + kind?: string; + name?: string; + } + export interface MobileCarriersListResponse { + kind?: string; + mobileCarriers?: Dfareporting.Schema.MobileCarrier[]; + } + export interface ObjectFilter { + kind?: string; + objectIds?: string[]; + status?: string; + } + export interface OffsetPosition { + left?: number; + top?: number; + } + export interface OmnitureSettings { + omnitureCostDataEnabled?: boolean; + omnitureIntegrationEnabled?: boolean; + } + export interface OperatingSystem { + dartId?: string; + desktop?: boolean; + kind?: string; + mobile?: boolean; + name?: string; + } + export interface OperatingSystemVersion { + id?: string; + kind?: string; + majorVersion?: string; + minorVersion?: string; + name?: string; + operatingSystem?: Dfareporting.Schema.OperatingSystem; + } + export interface OperatingSystemVersionsListResponse { + kind?: string; + operatingSystemVersions?: Dfareporting.Schema.OperatingSystemVersion[]; + } + export interface OperatingSystemsListResponse { + kind?: string; + operatingSystems?: Dfareporting.Schema.OperatingSystem[]; + } + export interface OptimizationActivity { + floodlightActivityId?: string; + floodlightActivityIdDimensionValue?: Dfareporting.Schema.DimensionValue; + weight?: number; + } + export interface Order { + accountId?: string; + advertiserId?: string; + approverUserProfileIds?: string[]; + buyerInvoiceId?: string; + buyerOrganizationName?: string; + comments?: string; + contacts?: Dfareporting.Schema.OrderContact[]; + id?: string; + kind?: string; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + name?: string; + notes?: string; + planningTermId?: string; + projectId?: string; + sellerOrderId?: string; + sellerOrganizationName?: string; + siteId?: string[]; + siteNames?: string[]; + subaccountId?: string; + termsAndConditions?: string; + } + export interface OrderContact { + contactInfo?: string; + contactName?: string; + contactTitle?: string; + contactType?: string; + signatureUserProfileId?: string; + } + export interface OrderDocument { + accountId?: string; + advertiserId?: string; + amendedOrderDocumentId?: string; + approvedByUserProfileIds?: string[]; + cancelled?: boolean; + createdInfo?: Dfareporting.Schema.LastModifiedInfo; + effectiveDate?: string; + id?: string; + kind?: string; + lastSentRecipients?: string[]; + lastSentTime?: string; + orderId?: string; + projectId?: string; + signed?: boolean; + subaccountId?: string; + title?: string; + type?: string; + } + export interface OrderDocumentsListResponse { + kind?: string; + nextPageToken?: string; + orderDocuments?: Dfareporting.Schema.OrderDocument[]; + } + export interface OrdersListResponse { + kind?: string; + nextPageToken?: string; + orders?: Dfareporting.Schema.Order[]; + } + export interface PathToConversionReportCompatibleFields { + conversionDimensions?: Dfareporting.Schema.Dimension[]; + customFloodlightVariables?: Dfareporting.Schema.Dimension[]; + kind?: string; + metrics?: Dfareporting.Schema.Metric[]; + perInteractionDimensions?: Dfareporting.Schema.Dimension[]; + } + export interface Placement { + accountId?: string; + adBlockingOptOut?: boolean; + additionalSizes?: Dfareporting.Schema.Size[]; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + archived?: boolean; + campaignId?: string; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; + comment?: string; + compatibility?: string; + contentCategoryId?: string; + createInfo?: Dfareporting.Schema.LastModifiedInfo; + directorySiteId?: string; + directorySiteIdDimensionValue?: Dfareporting.Schema.DimensionValue; + externalId?: string; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + keyName?: string; + kind?: string; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + lookbackConfiguration?: Dfareporting.Schema.LookbackConfiguration; + name?: string; + paymentApproved?: boolean; + paymentSource?: string; + placementGroupId?: string; + placementGroupIdDimensionValue?: Dfareporting.Schema.DimensionValue; + placementStrategyId?: string; + pricingSchedule?: Dfareporting.Schema.PricingSchedule; + primary?: boolean; + publisherUpdateInfo?: Dfareporting.Schema.LastModifiedInfo; + siteId?: string; + siteIdDimensionValue?: Dfareporting.Schema.DimensionValue; + size?: Dfareporting.Schema.Size; + sslRequired?: boolean; + status?: string; + subaccountId?: string; + tagFormats?: string[]; + tagSetting?: Dfareporting.Schema.TagSetting; + videoActiveViewOptOut?: boolean; + videoSettings?: Dfareporting.Schema.VideoSettings; + vpaidAdapterChoice?: string; + } + export interface PlacementAssignment { + active?: boolean; + placementId?: string; + placementIdDimensionValue?: Dfareporting.Schema.DimensionValue; + sslRequired?: boolean; + } + export interface PlacementGroup { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + archived?: boolean; + campaignId?: string; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; + childPlacementIds?: string[]; + comment?: string; + contentCategoryId?: string; + createInfo?: Dfareporting.Schema.LastModifiedInfo; + directorySiteId?: string; + directorySiteIdDimensionValue?: Dfareporting.Schema.DimensionValue; + externalId?: string; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + kind?: string; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + name?: string; + placementGroupType?: string; + placementStrategyId?: string; + pricingSchedule?: Dfareporting.Schema.PricingSchedule; + primaryPlacementId?: string; + primaryPlacementIdDimensionValue?: Dfareporting.Schema.DimensionValue; + siteId?: string; + siteIdDimensionValue?: Dfareporting.Schema.DimensionValue; + subaccountId?: string; + } + export interface PlacementGroupsListResponse { + kind?: string; + nextPageToken?: string; + placementGroups?: Dfareporting.Schema.PlacementGroup[]; + } + export interface PlacementStrategiesListResponse { + kind?: string; + nextPageToken?: string; + placementStrategies?: Dfareporting.Schema.PlacementStrategy[]; + } + export interface PlacementStrategy { + accountId?: string; + id?: string; + kind?: string; + name?: string; + } + export interface PlacementTag { + placementId?: string; + tagDatas?: Dfareporting.Schema.TagData[]; + } + export interface PlacementsGenerateTagsResponse { + kind?: string; + placementTags?: Dfareporting.Schema.PlacementTag[]; + } + export interface PlacementsListResponse { + kind?: string; + nextPageToken?: string; + placements?: Dfareporting.Schema.Placement[]; + } + export interface PlatformType { + id?: string; + kind?: string; + name?: string; + } + export interface PlatformTypesListResponse { + kind?: string; + platformTypes?: Dfareporting.Schema.PlatformType[]; + } + export interface PopupWindowProperties { + dimension?: Dfareporting.Schema.Size; + offset?: Dfareporting.Schema.OffsetPosition; + positionType?: string; + showAddressBar?: boolean; + showMenuBar?: boolean; + showScrollBar?: boolean; + showStatusBar?: boolean; + showToolBar?: boolean; + title?: string; + } + export interface PostalCode { + code?: string; + countryCode?: string; + countryDartId?: string; + id?: string; + kind?: string; + } + export interface PostalCodesListResponse { + kind?: string; + postalCodes?: Dfareporting.Schema.PostalCode[]; + } + export interface Pricing { + capCostType?: string; + endDate?: string; + flights?: Dfareporting.Schema.Flight[]; + groupType?: string; + pricingType?: string; + startDate?: string; + } + export interface PricingSchedule { + capCostOption?: string; + disregardOverdelivery?: boolean; + endDate?: string; + flighted?: boolean; + floodlightActivityId?: string; + pricingPeriods?: Dfareporting.Schema.PricingSchedulePricingPeriod[]; + pricingType?: string; + startDate?: string; + testingStartDate?: string; + } + export interface PricingSchedulePricingPeriod { + endDate?: string; + pricingComment?: string; + rateOrCostNanos?: string; + startDate?: string; + units?: string; + } + export interface Project { + accountId?: string; + advertiserId?: string; + audienceAgeGroup?: string; + audienceGender?: string; + budget?: string; + clientBillingCode?: string; + clientName?: string; + endDate?: string; + id?: string; + kind?: string; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + name?: string; + overview?: string; + startDate?: string; + subaccountId?: string; + targetClicks?: string; + targetConversions?: string; + targetCpaNanos?: string; + targetCpcNanos?: string; + targetCpmActiveViewNanos?: string; + targetCpmNanos?: string; + targetImpressions?: string; + } + export interface ProjectsListResponse { + kind?: string; + nextPageToken?: string; + projects?: Dfareporting.Schema.Project[]; + } + export interface ReachReportCompatibleFields { + dimensionFilters?: Dfareporting.Schema.Dimension[]; + dimensions?: Dfareporting.Schema.Dimension[]; + kind?: string; + metrics?: Dfareporting.Schema.Metric[]; + pivotedActivityMetrics?: Dfareporting.Schema.Metric[]; + reachByFrequencyMetrics?: Dfareporting.Schema.Metric[]; + } + export interface Recipient { + deliveryType?: string; + email?: string; + kind?: string; + } + export interface Region { + countryCode?: string; + countryDartId?: string; + dartId?: string; + kind?: string; + name?: string; + regionCode?: string; + } + export interface RegionsListResponse { + kind?: string; + regions?: Dfareporting.Schema.Region[]; + } + export interface RemarketingList { + accountId?: string; + active?: boolean; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + description?: string; + id?: string; + kind?: string; + lifeSpan?: string; + listPopulationRule?: Dfareporting.Schema.ListPopulationRule; + listSize?: string; + listSource?: string; + name?: string; + subaccountId?: string; + } + export interface RemarketingListShare { + kind?: string; + remarketingListId?: string; + sharedAccountIds?: string[]; + sharedAdvertiserIds?: string[]; + } + export interface RemarketingListsListResponse { + kind?: string; + nextPageToken?: string; + remarketingLists?: Dfareporting.Schema.RemarketingList[]; + } + export interface Report { + accountId?: string; + criteria?: Dfareporting.Schema.ReportCriteria; + crossDimensionReachCriteria?: Dfareporting.Schema.ReportCrossDimensionReachCriteria; + delivery?: Dfareporting.Schema.ReportDelivery; + etag?: string; + fileName?: string; + floodlightCriteria?: Dfareporting.Schema.ReportFloodlightCriteria; + format?: string; + id?: string; + kind?: string; + lastModifiedTime?: string; + name?: string; + ownerProfileId?: string; + pathToConversionCriteria?: Dfareporting.Schema.ReportPathToConversionCriteria; + reachCriteria?: Dfareporting.Schema.ReportReachCriteria; + schedule?: Dfareporting.Schema.ReportSchedule; + subAccountId?: string; + type?: string; + } + export interface ReportCompatibleFields { + dimensionFilters?: Dfareporting.Schema.Dimension[]; + dimensions?: Dfareporting.Schema.Dimension[]; + kind?: string; + metrics?: Dfareporting.Schema.Metric[]; + pivotedActivityMetrics?: Dfareporting.Schema.Metric[]; + } + export interface ReportCriteria { + activities?: Dfareporting.Schema.Activities; + customRichMediaEvents?: Dfareporting.Schema.CustomRichMediaEvents; + dateRange?: Dfareporting.Schema.DateRange; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; + dimensions?: Dfareporting.Schema.SortedDimension[]; + metricNames?: string[]; + } + export interface ReportCrossDimensionReachCriteria { + breakdown?: Dfareporting.Schema.SortedDimension[]; + dateRange?: Dfareporting.Schema.DateRange; + dimension?: string; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; + metricNames?: string[]; + overlapMetricNames?: string[]; + pivoted?: boolean; + } + export interface ReportDelivery { + emailOwner?: boolean; + emailOwnerDeliveryType?: string; + message?: string; + recipients?: Dfareporting.Schema.Recipient[]; + } + export interface ReportFloodlightCriteria { + customRichMediaEvents?: Dfareporting.Schema.DimensionValue[]; + dateRange?: Dfareporting.Schema.DateRange; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; + dimensions?: Dfareporting.Schema.SortedDimension[]; + floodlightConfigId?: Dfareporting.Schema.DimensionValue; + metricNames?: string[]; + reportProperties?: Dfareporting.Schema.ReportFloodlightCriteriaReportProperties; + } + export interface ReportFloodlightCriteriaReportProperties { + includeAttributedIPConversions?: boolean; + includeUnattributedCookieConversions?: boolean; + includeUnattributedIPConversions?: boolean; + } + export interface ReportList { + etag?: string; + items?: Dfareporting.Schema.Report[]; + kind?: string; + nextPageToken?: string; + } + export interface ReportPathToConversionCriteria { + activityFilters?: Dfareporting.Schema.DimensionValue[]; + conversionDimensions?: Dfareporting.Schema.SortedDimension[]; + customFloodlightVariables?: Dfareporting.Schema.SortedDimension[]; + customRichMediaEvents?: Dfareporting.Schema.DimensionValue[]; + dateRange?: Dfareporting.Schema.DateRange; + floodlightConfigId?: Dfareporting.Schema.DimensionValue; + metricNames?: string[]; + perInteractionDimensions?: Dfareporting.Schema.SortedDimension[]; + reportProperties?: Dfareporting.Schema.ReportPathToConversionCriteriaReportProperties; + } + export interface ReportPathToConversionCriteriaReportProperties { + clicksLookbackWindow?: number; + impressionsLookbackWindow?: number; + includeAttributedIPConversions?: boolean; + includeUnattributedCookieConversions?: boolean; + includeUnattributedIPConversions?: boolean; + maximumClickInteractions?: number; + maximumImpressionInteractions?: number; + maximumInteractionGap?: number; + pivotOnInteractionPath?: boolean; + } + export interface ReportReachCriteria { + activities?: Dfareporting.Schema.Activities; + customRichMediaEvents?: Dfareporting.Schema.CustomRichMediaEvents; + dateRange?: Dfareporting.Schema.DateRange; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; + dimensions?: Dfareporting.Schema.SortedDimension[]; + enableAllDimensionCombinations?: boolean; + metricNames?: string[]; + reachByFrequencyMetricNames?: string[]; + } + export interface ReportSchedule { + active?: boolean; + every?: number; + expirationDate?: string; + repeats?: string; + repeatsOnWeekDays?: string[]; + runsOnDayOfMonth?: string; + startDate?: string; + } + export interface ReportsConfiguration { + exposureToConversionEnabled?: boolean; + lookbackConfiguration?: Dfareporting.Schema.LookbackConfiguration; + reportGenerationTimeZoneId?: string; + } + export interface RichMediaExitOverride { + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; + enabled?: boolean; + exitId?: string; + } + export interface Rule { + assetId?: string; + name?: string; + targetingTemplateId?: string; + } + export interface Site { + accountId?: string; + approved?: boolean; + directorySiteId?: string; + directorySiteIdDimensionValue?: Dfareporting.Schema.DimensionValue; + id?: string; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + keyName?: string; + kind?: string; + name?: string; + siteContacts?: Dfareporting.Schema.SiteContact[]; + siteSettings?: Dfareporting.Schema.SiteSettings; + subaccountId?: string; + videoSettings?: Dfareporting.Schema.SiteVideoSettings; + } + export interface SiteCompanionSetting { + companionsDisabled?: boolean; + enabledSizes?: Dfareporting.Schema.Size[]; + imageOnly?: boolean; + kind?: string; + } + export interface SiteContact { + address?: string; + contactType?: string; + email?: string; + firstName?: string; + id?: string; + lastName?: string; + phone?: string; + title?: string; + } + export interface SiteSettings { + activeViewOptOut?: boolean; + adBlockingOptOut?: boolean; + disableNewCookie?: boolean; + tagSetting?: Dfareporting.Schema.TagSetting; + videoActiveViewOptOutTemplate?: boolean; + vpaidAdapterChoiceTemplate?: string; + } + export interface SiteSkippableSetting { + kind?: string; + progressOffset?: Dfareporting.Schema.VideoOffset; + skipOffset?: Dfareporting.Schema.VideoOffset; + skippable?: boolean; + } + export interface SiteTranscodeSetting { + enabledVideoFormats?: number[]; + kind?: string; + } + export interface SiteVideoSettings { + companionSettings?: Dfareporting.Schema.SiteCompanionSetting; + kind?: string; + orientation?: string; + skippableSettings?: Dfareporting.Schema.SiteSkippableSetting; + transcodeSettings?: Dfareporting.Schema.SiteTranscodeSetting; + } + export interface SitesListResponse { + kind?: string; + nextPageToken?: string; + sites?: Dfareporting.Schema.Site[]; + } + export interface Size { + height?: number; + iab?: boolean; + id?: string; + kind?: string; + width?: number; + } + export interface SizesListResponse { + kind?: string; + sizes?: Dfareporting.Schema.Size[]; + } + export interface SkippableSetting { + kind?: string; + progressOffset?: Dfareporting.Schema.VideoOffset; + skipOffset?: Dfareporting.Schema.VideoOffset; + skippable?: boolean; + } + export interface SortedDimension { + kind?: string; + name?: string; + sortOrder?: string; + } + export interface Subaccount { + accountId?: string; + availablePermissionIds?: string[]; + id?: string; + kind?: string; + name?: string; + } + export interface SubaccountsListResponse { + kind?: string; + nextPageToken?: string; + subaccounts?: Dfareporting.Schema.Subaccount[]; + } + export interface TagData { + adId?: string; + clickTag?: string; + creativeId?: string; + format?: string; + impressionTag?: string; + } + export interface TagSetting { + additionalKeyValues?: string; + includeClickThroughUrls?: boolean; + includeClickTracking?: boolean; + keywordOption?: string; + } + export interface TagSettings { + dynamicTagEnabled?: boolean; + imageTagEnabled?: boolean; + } + export interface TargetWindow { + customHtml?: string; + targetWindowOption?: string; + } + export interface TargetableRemarketingList { + accountId?: string; + active?: boolean; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + description?: string; + id?: string; + kind?: string; + lifeSpan?: string; + listSize?: string; + listSource?: string; + name?: string; + subaccountId?: string; + } + export interface TargetableRemarketingListsListResponse { + kind?: string; + nextPageToken?: string; + targetableRemarketingLists?: Dfareporting.Schema.TargetableRemarketingList[]; + } + export interface TargetingTemplate { + accountId?: string; + advertiserId?: string; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + dayPartTargeting?: Dfareporting.Schema.DayPartTargeting; + geoTargeting?: Dfareporting.Schema.GeoTargeting; + id?: string; + keyValueTargetingExpression?: Dfareporting.Schema.KeyValueTargetingExpression; + kind?: string; + languageTargeting?: Dfareporting.Schema.LanguageTargeting; + listTargetingExpression?: Dfareporting.Schema.ListTargetingExpression; + name?: string; + subaccountId?: string; + technologyTargeting?: Dfareporting.Schema.TechnologyTargeting; + } + export interface TargetingTemplatesListResponse { + kind?: string; + nextPageToken?: string; + targetingTemplates?: Dfareporting.Schema.TargetingTemplate[]; + } + export interface TechnologyTargeting { + browsers?: Dfareporting.Schema.Browser[]; + connectionTypes?: Dfareporting.Schema.ConnectionType[]; + mobileCarriers?: Dfareporting.Schema.MobileCarrier[]; + operatingSystemVersions?: Dfareporting.Schema.OperatingSystemVersion[]; + operatingSystems?: Dfareporting.Schema.OperatingSystem[]; + platformTypes?: Dfareporting.Schema.PlatformType[]; + } + export interface ThirdPartyAuthenticationToken { + name?: string; + value?: string; + } + export interface ThirdPartyTrackingUrl { + thirdPartyUrlType?: string; + url?: string; + } + export interface TranscodeSetting { + enabledVideoFormats?: number[]; + kind?: string; + } + export interface UniversalAdId { + registry?: string; + value?: string; + } + export interface UserDefinedVariableConfiguration { + dataType?: string; + reportName?: string; + variableType?: string; + } + export interface UserProfile { + accountId?: string; + accountName?: string; + etag?: string; + kind?: string; + profileId?: string; + subAccountId?: string; + subAccountName?: string; + userName?: string; + } + export interface UserProfileList { + etag?: string; + items?: Dfareporting.Schema.UserProfile[]; + kind?: string; + } + export interface UserRole { + accountId?: string; + defaultUserRole?: boolean; + id?: string; + kind?: string; + name?: string; + parentUserRoleId?: string; + permissions?: Dfareporting.Schema.UserRolePermission[]; + subaccountId?: string; + } + export interface UserRolePermission { + availability?: string; + id?: string; + kind?: string; + name?: string; + permissionGroupId?: string; + } + export interface UserRolePermissionGroup { + id?: string; + kind?: string; + name?: string; + } + export interface UserRolePermissionGroupsListResponse { + kind?: string; + userRolePermissionGroups?: Dfareporting.Schema.UserRolePermissionGroup[]; + } + export interface UserRolePermissionsListResponse { + kind?: string; + userRolePermissions?: Dfareporting.Schema.UserRolePermission[]; + } + export interface UserRolesListResponse { + kind?: string; + nextPageToken?: string; + userRoles?: Dfareporting.Schema.UserRole[]; + } + export interface VideoFormat { + fileType?: string; + id?: number; + kind?: string; + resolution?: Dfareporting.Schema.Size; + targetBitRate?: number; + } + export interface VideoFormatsListResponse { + kind?: string; + videoFormats?: Dfareporting.Schema.VideoFormat[]; + } + export interface VideoOffset { + offsetPercentage?: number; + offsetSeconds?: number; + } + export interface VideoSettings { + companionSettings?: Dfareporting.Schema.CompanionSetting; + kind?: string; + orientation?: string; + skippableSettings?: Dfareporting.Schema.SkippableSetting; + transcodeSettings?: Dfareporting.Schema.TranscodeSetting; + } + } + } + export interface Dfareporting { + AccountActiveAdSummaries?: Dfareporting.Collection.AccountActiveAdSummariesCollection; + AccountPermissionGroups?: Dfareporting.Collection.AccountPermissionGroupsCollection; + AccountPermissions?: Dfareporting.Collection.AccountPermissionsCollection; + AccountUserProfiles?: Dfareporting.Collection.AccountUserProfilesCollection; + Accounts?: Dfareporting.Collection.AccountsCollection; + Ads?: Dfareporting.Collection.AdsCollection; + AdvertiserGroups?: Dfareporting.Collection.AdvertiserGroupsCollection; + AdvertiserLandingPages?: Dfareporting.Collection.AdvertiserLandingPagesCollection; + Advertisers?: Dfareporting.Collection.AdvertisersCollection; + Browsers?: Dfareporting.Collection.BrowsersCollection; + CampaignCreativeAssociations?: Dfareporting.Collection.CampaignCreativeAssociationsCollection; + Campaigns?: Dfareporting.Collection.CampaignsCollection; + ChangeLogs?: Dfareporting.Collection.ChangeLogsCollection; + Cities?: Dfareporting.Collection.CitiesCollection; + ConnectionTypes?: Dfareporting.Collection.ConnectionTypesCollection; + ContentCategories?: Dfareporting.Collection.ContentCategoriesCollection; + Conversions?: Dfareporting.Collection.ConversionsCollection; + Countries?: Dfareporting.Collection.CountriesCollection; + CreativeAssets?: Dfareporting.Collection.CreativeAssetsCollection; + CreativeFieldValues?: Dfareporting.Collection.CreativeFieldValuesCollection; + CreativeFields?: Dfareporting.Collection.CreativeFieldsCollection; + CreativeGroups?: Dfareporting.Collection.CreativeGroupsCollection; + Creatives?: Dfareporting.Collection.CreativesCollection; + DimensionValues?: Dfareporting.Collection.DimensionValuesCollection; + DirectorySites?: Dfareporting.Collection.DirectorySitesCollection; + DynamicTargetingKeys?: Dfareporting.Collection.DynamicTargetingKeysCollection; + EventTags?: Dfareporting.Collection.EventTagsCollection; + Files?: Dfareporting.Collection.FilesCollection; + FloodlightActivities?: Dfareporting.Collection.FloodlightActivitiesCollection; + FloodlightActivityGroups?: Dfareporting.Collection.FloodlightActivityGroupsCollection; + FloodlightConfigurations?: Dfareporting.Collection.FloodlightConfigurationsCollection; + InventoryItems?: Dfareporting.Collection.InventoryItemsCollection; + Languages?: Dfareporting.Collection.LanguagesCollection; + Metros?: Dfareporting.Collection.MetrosCollection; + MobileApps?: Dfareporting.Collection.MobileAppsCollection; + MobileCarriers?: Dfareporting.Collection.MobileCarriersCollection; + OperatingSystemVersions?: Dfareporting.Collection.OperatingSystemVersionsCollection; + OperatingSystems?: Dfareporting.Collection.OperatingSystemsCollection; + OrderDocuments?: Dfareporting.Collection.OrderDocumentsCollection; + Orders?: Dfareporting.Collection.OrdersCollection; + PlacementGroups?: Dfareporting.Collection.PlacementGroupsCollection; + PlacementStrategies?: Dfareporting.Collection.PlacementStrategiesCollection; + Placements?: Dfareporting.Collection.PlacementsCollection; + PlatformTypes?: Dfareporting.Collection.PlatformTypesCollection; + PostalCodes?: Dfareporting.Collection.PostalCodesCollection; + Projects?: Dfareporting.Collection.ProjectsCollection; + Regions?: Dfareporting.Collection.RegionsCollection; + RemarketingListShares?: Dfareporting.Collection.RemarketingListSharesCollection; + RemarketingLists?: Dfareporting.Collection.RemarketingListsCollection; + Reports?: Dfareporting.Collection.ReportsCollection; + Sites?: Dfareporting.Collection.SitesCollection; + Sizes?: Dfareporting.Collection.SizesCollection; + Subaccounts?: Dfareporting.Collection.SubaccountsCollection; + TargetableRemarketingLists?: Dfareporting.Collection.TargetableRemarketingListsCollection; + TargetingTemplates?: Dfareporting.Collection.TargetingTemplatesCollection; + UserProfiles?: Dfareporting.Collection.UserProfilesCollection; + UserRolePermissionGroups?: Dfareporting.Collection.UserRolePermissionGroupsCollection; + UserRolePermissions?: Dfareporting.Collection.UserRolePermissionsCollection; + UserRoles?: Dfareporting.Collection.UserRolesCollection; + VideoFormats?: Dfareporting.Collection.VideoFormatsCollection; + // Create a new instance of Account + newAccount(): Dfareporting.Schema.Account; + // Create a new instance of AccountUserProfile + newAccountUserProfile(): Dfareporting.Schema.AccountUserProfile; + // Create a new instance of Activities + newActivities(): Dfareporting.Schema.Activities; + // Create a new instance of Ad + newAd(): Dfareporting.Schema.Ad; + // Create a new instance of AdBlockingConfiguration + newAdBlockingConfiguration(): Dfareporting.Schema.AdBlockingConfiguration; + // Create a new instance of Advertiser + newAdvertiser(): Dfareporting.Schema.Advertiser; + // Create a new instance of AdvertiserGroup + newAdvertiserGroup(): Dfareporting.Schema.AdvertiserGroup; + // Create a new instance of AudienceSegment + newAudienceSegment(): Dfareporting.Schema.AudienceSegment; + // Create a new instance of AudienceSegmentGroup + newAudienceSegmentGroup(): Dfareporting.Schema.AudienceSegmentGroup; + // Create a new instance of Browser + newBrowser(): Dfareporting.Schema.Browser; + // Create a new instance of Campaign + newCampaign(): Dfareporting.Schema.Campaign; + // Create a new instance of CampaignCreativeAssociation + newCampaignCreativeAssociation(): Dfareporting.Schema.CampaignCreativeAssociation; + // Create a new instance of City + newCity(): Dfareporting.Schema.City; + // Create a new instance of ClickTag + newClickTag(): Dfareporting.Schema.ClickTag; + // Create a new instance of ClickThroughUrl + newClickThroughUrl(): Dfareporting.Schema.ClickThroughUrl; + // Create a new instance of ClickThroughUrlSuffixProperties + newClickThroughUrlSuffixProperties(): Dfareporting.Schema.ClickThroughUrlSuffixProperties; + // Create a new instance of CompanionClickThroughOverride + newCompanionClickThroughOverride(): Dfareporting.Schema.CompanionClickThroughOverride; + // Create a new instance of CompanionSetting + newCompanionSetting(): Dfareporting.Schema.CompanionSetting; + // Create a new instance of ConnectionType + newConnectionType(): Dfareporting.Schema.ConnectionType; + // Create a new instance of ContentCategory + newContentCategory(): Dfareporting.Schema.ContentCategory; + // Create a new instance of Conversion + newConversion(): Dfareporting.Schema.Conversion; + // Create a new instance of ConversionsBatchInsertRequest + newConversionsBatchInsertRequest(): Dfareporting.Schema.ConversionsBatchInsertRequest; + // Create a new instance of ConversionsBatchUpdateRequest + newConversionsBatchUpdateRequest(): Dfareporting.Schema.ConversionsBatchUpdateRequest; + // Create a new instance of Country + newCountry(): Dfareporting.Schema.Country; + // Create a new instance of Creative + newCreative(): Dfareporting.Schema.Creative; + // Create a new instance of CreativeAsset + newCreativeAsset(): Dfareporting.Schema.CreativeAsset; + // Create a new instance of CreativeAssetId + newCreativeAssetId(): Dfareporting.Schema.CreativeAssetId; + // Create a new instance of CreativeAssetMetadata + newCreativeAssetMetadata(): Dfareporting.Schema.CreativeAssetMetadata; + // Create a new instance of CreativeAssetSelection + newCreativeAssetSelection(): Dfareporting.Schema.CreativeAssetSelection; + // Create a new instance of CreativeAssignment + newCreativeAssignment(): Dfareporting.Schema.CreativeAssignment; + // Create a new instance of CreativeClickThroughUrl + newCreativeClickThroughUrl(): Dfareporting.Schema.CreativeClickThroughUrl; + // Create a new instance of CreativeCustomEvent + newCreativeCustomEvent(): Dfareporting.Schema.CreativeCustomEvent; + // Create a new instance of CreativeField + newCreativeField(): Dfareporting.Schema.CreativeField; + // Create a new instance of CreativeFieldAssignment + newCreativeFieldAssignment(): Dfareporting.Schema.CreativeFieldAssignment; + // Create a new instance of CreativeFieldValue + newCreativeFieldValue(): Dfareporting.Schema.CreativeFieldValue; + // Create a new instance of CreativeGroup + newCreativeGroup(): Dfareporting.Schema.CreativeGroup; + // Create a new instance of CreativeGroupAssignment + newCreativeGroupAssignment(): Dfareporting.Schema.CreativeGroupAssignment; + // Create a new instance of CreativeOptimizationConfiguration + newCreativeOptimizationConfiguration(): Dfareporting.Schema.CreativeOptimizationConfiguration; + // Create a new instance of CreativeRotation + newCreativeRotation(): Dfareporting.Schema.CreativeRotation; + // Create a new instance of CustomFloodlightVariable + newCustomFloodlightVariable(): Dfareporting.Schema.CustomFloodlightVariable; + // Create a new instance of CustomRichMediaEvents + newCustomRichMediaEvents(): Dfareporting.Schema.CustomRichMediaEvents; + // Create a new instance of CustomViewabilityMetric + newCustomViewabilityMetric(): Dfareporting.Schema.CustomViewabilityMetric; + // Create a new instance of CustomViewabilityMetricConfiguration + newCustomViewabilityMetricConfiguration(): Dfareporting.Schema.CustomViewabilityMetricConfiguration; + // Create a new instance of DateRange + newDateRange(): Dfareporting.Schema.DateRange; + // Create a new instance of DayPartTargeting + newDayPartTargeting(): Dfareporting.Schema.DayPartTargeting; + // Create a new instance of DeepLink + newDeepLink(): Dfareporting.Schema.DeepLink; + // Create a new instance of DefaultClickThroughEventTagProperties + newDefaultClickThroughEventTagProperties(): Dfareporting.Schema.DefaultClickThroughEventTagProperties; + // Create a new instance of DeliverySchedule + newDeliverySchedule(): Dfareporting.Schema.DeliverySchedule; + // Create a new instance of DfpSettings + newDfpSettings(): Dfareporting.Schema.DfpSettings; + // Create a new instance of DimensionFilter + newDimensionFilter(): Dfareporting.Schema.DimensionFilter; + // Create a new instance of DimensionValue + newDimensionValue(): Dfareporting.Schema.DimensionValue; + // Create a new instance of DimensionValueRequest + newDimensionValueRequest(): Dfareporting.Schema.DimensionValueRequest; + // Create a new instance of DirectorySite + newDirectorySite(): Dfareporting.Schema.DirectorySite; + // Create a new instance of DirectorySiteSettings + newDirectorySiteSettings(): Dfareporting.Schema.DirectorySiteSettings; + // Create a new instance of DynamicTargetingKey + newDynamicTargetingKey(): Dfareporting.Schema.DynamicTargetingKey; + // Create a new instance of EncryptionInfo + newEncryptionInfo(): Dfareporting.Schema.EncryptionInfo; + // Create a new instance of EventTag + newEventTag(): Dfareporting.Schema.EventTag; + // Create a new instance of EventTagOverride + newEventTagOverride(): Dfareporting.Schema.EventTagOverride; + // Create a new instance of FloodlightActivity + newFloodlightActivity(): Dfareporting.Schema.FloodlightActivity; + // Create a new instance of FloodlightActivityDynamicTag + newFloodlightActivityDynamicTag(): Dfareporting.Schema.FloodlightActivityDynamicTag; + // Create a new instance of FloodlightActivityGroup + newFloodlightActivityGroup(): Dfareporting.Schema.FloodlightActivityGroup; + // Create a new instance of FloodlightActivityPublisherDynamicTag + newFloodlightActivityPublisherDynamicTag(): Dfareporting.Schema.FloodlightActivityPublisherDynamicTag; + // Create a new instance of FloodlightConfiguration + newFloodlightConfiguration(): Dfareporting.Schema.FloodlightConfiguration; + // Create a new instance of FrequencyCap + newFrequencyCap(): Dfareporting.Schema.FrequencyCap; + // Create a new instance of FsCommand + newFsCommand(): Dfareporting.Schema.FsCommand; + // Create a new instance of GeoTargeting + newGeoTargeting(): Dfareporting.Schema.GeoTargeting; + // Create a new instance of KeyValueTargetingExpression + newKeyValueTargetingExpression(): Dfareporting.Schema.KeyValueTargetingExpression; + // Create a new instance of LandingPage + newLandingPage(): Dfareporting.Schema.LandingPage; + // Create a new instance of Language + newLanguage(): Dfareporting.Schema.Language; + // Create a new instance of LanguageTargeting + newLanguageTargeting(): Dfareporting.Schema.LanguageTargeting; + // Create a new instance of LastModifiedInfo + newLastModifiedInfo(): Dfareporting.Schema.LastModifiedInfo; + // Create a new instance of ListPopulationClause + newListPopulationClause(): Dfareporting.Schema.ListPopulationClause; + // Create a new instance of ListPopulationRule + newListPopulationRule(): Dfareporting.Schema.ListPopulationRule; + // Create a new instance of ListPopulationTerm + newListPopulationTerm(): Dfareporting.Schema.ListPopulationTerm; + // Create a new instance of ListTargetingExpression + newListTargetingExpression(): Dfareporting.Schema.ListTargetingExpression; + // Create a new instance of LookbackConfiguration + newLookbackConfiguration(): Dfareporting.Schema.LookbackConfiguration; + // Create a new instance of Metro + newMetro(): Dfareporting.Schema.Metro; + // Create a new instance of MobileApp + newMobileApp(): Dfareporting.Schema.MobileApp; + // Create a new instance of MobileCarrier + newMobileCarrier(): Dfareporting.Schema.MobileCarrier; + // Create a new instance of ObjectFilter + newObjectFilter(): Dfareporting.Schema.ObjectFilter; + // Create a new instance of OffsetPosition + newOffsetPosition(): Dfareporting.Schema.OffsetPosition; + // Create a new instance of OmnitureSettings + newOmnitureSettings(): Dfareporting.Schema.OmnitureSettings; + // Create a new instance of OperatingSystem + newOperatingSystem(): Dfareporting.Schema.OperatingSystem; + // Create a new instance of OperatingSystemVersion + newOperatingSystemVersion(): Dfareporting.Schema.OperatingSystemVersion; + // Create a new instance of OptimizationActivity + newOptimizationActivity(): Dfareporting.Schema.OptimizationActivity; + // Create a new instance of Placement + newPlacement(): Dfareporting.Schema.Placement; + // Create a new instance of PlacementAssignment + newPlacementAssignment(): Dfareporting.Schema.PlacementAssignment; + // Create a new instance of PlacementGroup + newPlacementGroup(): Dfareporting.Schema.PlacementGroup; + // Create a new instance of PlacementStrategy + newPlacementStrategy(): Dfareporting.Schema.PlacementStrategy; + // Create a new instance of PlatformType + newPlatformType(): Dfareporting.Schema.PlatformType; + // Create a new instance of PopupWindowProperties + newPopupWindowProperties(): Dfareporting.Schema.PopupWindowProperties; + // Create a new instance of PostalCode + newPostalCode(): Dfareporting.Schema.PostalCode; + // Create a new instance of PricingSchedule + newPricingSchedule(): Dfareporting.Schema.PricingSchedule; + // Create a new instance of PricingSchedulePricingPeriod + newPricingSchedulePricingPeriod(): Dfareporting.Schema.PricingSchedulePricingPeriod; + // Create a new instance of Recipient + newRecipient(): Dfareporting.Schema.Recipient; + // Create a new instance of Region + newRegion(): Dfareporting.Schema.Region; + // Create a new instance of RemarketingList + newRemarketingList(): Dfareporting.Schema.RemarketingList; + // Create a new instance of RemarketingListShare + newRemarketingListShare(): Dfareporting.Schema.RemarketingListShare; + // Create a new instance of Report + newReport(): Dfareporting.Schema.Report; + // Create a new instance of ReportCriteria + newReportCriteria(): Dfareporting.Schema.ReportCriteria; + // Create a new instance of ReportCrossDimensionReachCriteria + newReportCrossDimensionReachCriteria(): Dfareporting.Schema.ReportCrossDimensionReachCriteria; + // Create a new instance of ReportDelivery + newReportDelivery(): Dfareporting.Schema.ReportDelivery; + // Create a new instance of ReportFloodlightCriteria + newReportFloodlightCriteria(): Dfareporting.Schema.ReportFloodlightCriteria; + // Create a new instance of ReportFloodlightCriteriaReportProperties + newReportFloodlightCriteriaReportProperties(): Dfareporting.Schema.ReportFloodlightCriteriaReportProperties; + // Create a new instance of ReportPathToConversionCriteria + newReportPathToConversionCriteria(): Dfareporting.Schema.ReportPathToConversionCriteria; + // Create a new instance of ReportPathToConversionCriteriaReportProperties + newReportPathToConversionCriteriaReportProperties(): Dfareporting.Schema.ReportPathToConversionCriteriaReportProperties; + // Create a new instance of ReportReachCriteria + newReportReachCriteria(): Dfareporting.Schema.ReportReachCriteria; + // Create a new instance of ReportSchedule + newReportSchedule(): Dfareporting.Schema.ReportSchedule; + // Create a new instance of ReportsConfiguration + newReportsConfiguration(): Dfareporting.Schema.ReportsConfiguration; + // Create a new instance of RichMediaExitOverride + newRichMediaExitOverride(): Dfareporting.Schema.RichMediaExitOverride; + // Create a new instance of Rule + newRule(): Dfareporting.Schema.Rule; + // Create a new instance of Site + newSite(): Dfareporting.Schema.Site; + // Create a new instance of SiteCompanionSetting + newSiteCompanionSetting(): Dfareporting.Schema.SiteCompanionSetting; + // Create a new instance of SiteContact + newSiteContact(): Dfareporting.Schema.SiteContact; + // Create a new instance of SiteSettings + newSiteSettings(): Dfareporting.Schema.SiteSettings; + // Create a new instance of SiteSkippableSetting + newSiteSkippableSetting(): Dfareporting.Schema.SiteSkippableSetting; + // Create a new instance of SiteTranscodeSetting + newSiteTranscodeSetting(): Dfareporting.Schema.SiteTranscodeSetting; + // Create a new instance of SiteVideoSettings + newSiteVideoSettings(): Dfareporting.Schema.SiteVideoSettings; + // Create a new instance of Size + newSize(): Dfareporting.Schema.Size; + // Create a new instance of SkippableSetting + newSkippableSetting(): Dfareporting.Schema.SkippableSetting; + // Create a new instance of SortedDimension + newSortedDimension(): Dfareporting.Schema.SortedDimension; + // Create a new instance of Subaccount + newSubaccount(): Dfareporting.Schema.Subaccount; + // Create a new instance of TagSetting + newTagSetting(): Dfareporting.Schema.TagSetting; + // Create a new instance of TagSettings + newTagSettings(): Dfareporting.Schema.TagSettings; + // Create a new instance of TargetWindow + newTargetWindow(): Dfareporting.Schema.TargetWindow; + // Create a new instance of TargetingTemplate + newTargetingTemplate(): Dfareporting.Schema.TargetingTemplate; + // Create a new instance of TechnologyTargeting + newTechnologyTargeting(): Dfareporting.Schema.TechnologyTargeting; + // Create a new instance of ThirdPartyAuthenticationToken + newThirdPartyAuthenticationToken(): Dfareporting.Schema.ThirdPartyAuthenticationToken; + // Create a new instance of ThirdPartyTrackingUrl + newThirdPartyTrackingUrl(): Dfareporting.Schema.ThirdPartyTrackingUrl; + // Create a new instance of TranscodeSetting + newTranscodeSetting(): Dfareporting.Schema.TranscodeSetting; + // Create a new instance of UniversalAdId + newUniversalAdId(): Dfareporting.Schema.UniversalAdId; + // Create a new instance of UserDefinedVariableConfiguration + newUserDefinedVariableConfiguration(): Dfareporting.Schema.UserDefinedVariableConfiguration; + // Create a new instance of UserRole + newUserRole(): Dfareporting.Schema.UserRole; + // Create a new instance of UserRolePermission + newUserRolePermission(): Dfareporting.Schema.UserRolePermission; + // Create a new instance of VideoOffset + newVideoOffset(): Dfareporting.Schema.VideoOffset; + // Create a new instance of VideoSettings + newVideoSettings(): Dfareporting.Schema.VideoSettings; + } +} + +declare var Dfareporting: GoogleAppsScript.Dfareporting; diff --git a/types/google-apps-script/apis/admin/directory_v1.d.ts b/types/google-apps-script/apis/directory_v1.d.ts similarity index 68% rename from types/google-apps-script/apis/admin/directory_v1.d.ts rename to types/google-apps-script/apis/directory_v1.d.ts index fc4ae9b931..156fb4eb12 100644 --- a/types/google-apps-script/apis/admin/directory_v1.d.ts +++ b/types/google-apps-script/apis/directory_v1.d.ts @@ -1,17 +1,18 @@ -// Type definitions for Google Apps Script 2019-03-22 +// Type definitions for Google Apps Script 2019-03-25 // Project: https://developers.google.com/apps-script/ -// Definitions by: mtgto +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Admin_directory_v1 { + namespace AdminDirectory { namespace Collection { namespace Groups { export interface AliasesCollection { // Add a alias for the group - insert(resource: Schema.Alias, groupKey: string): Admin_directory_v1.Schema.Alias; + insert(resource: Schema.Alias, groupKey: string): AdminDirectory.Schema.Alias; // List all aliases for a group - list(groupKey: string): Admin_directory_v1.Schema.Aliases; + list(groupKey: string): AdminDirectory.Schema.Aliases; // Remove a alias for the group remove(groupKey: string, alias: string): void; } @@ -19,94 +20,94 @@ declare namespace GoogleAppsScript { namespace Resources { export interface BuildingsCollection { // Retrieves a building. - get(customer: string, buildingId: string): Admin_directory_v1.Schema.Building; + get(customer: string, buildingId: string): AdminDirectory.Schema.Building; // Inserts a building. - insert(resource: Schema.Building, customer: string): Admin_directory_v1.Schema.Building; + insert(resource: Schema.Building, customer: string): AdminDirectory.Schema.Building; // Inserts a building. - insert(resource: Schema.Building, customer: string, optionalArgs: object): Admin_directory_v1.Schema.Building; + insert(resource: Schema.Building, customer: string, optionalArgs: object): AdminDirectory.Schema.Building; // Retrieves a list of buildings for an account. - list(customer: string): Admin_directory_v1.Schema.Buildings; + list(customer: string): AdminDirectory.Schema.Buildings; // Retrieves a list of buildings for an account. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Buildings; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Buildings; // Updates a building. This method supports patch semantics. - patch(resource: Schema.Building, customer: string, buildingId: string): Admin_directory_v1.Schema.Building; + patch(resource: Schema.Building, customer: string, buildingId: string): AdminDirectory.Schema.Building; // Updates a building. This method supports patch semantics. - patch(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): Admin_directory_v1.Schema.Building; + patch(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): AdminDirectory.Schema.Building; // Deletes a building. remove(customer: string, buildingId: string): void; // Updates a building. - update(resource: Schema.Building, customer: string, buildingId: string): Admin_directory_v1.Schema.Building; + update(resource: Schema.Building, customer: string, buildingId: string): AdminDirectory.Schema.Building; // Updates a building. - update(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): Admin_directory_v1.Schema.Building; + update(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): AdminDirectory.Schema.Building; } export interface CalendarsCollection { // Retrieves a calendar resource. - get(customer: string, calendarResourceId: string): Admin_directory_v1.Schema.CalendarResource; + get(customer: string, calendarResourceId: string): AdminDirectory.Schema.CalendarResource; // Inserts a calendar resource. - insert(resource: Schema.CalendarResource, customer: string): Admin_directory_v1.Schema.CalendarResource; + insert(resource: Schema.CalendarResource, customer: string): AdminDirectory.Schema.CalendarResource; // Retrieves a list of calendar resources for an account. - list(customer: string): Admin_directory_v1.Schema.CalendarResources; + list(customer: string): AdminDirectory.Schema.CalendarResources; // Retrieves a list of calendar resources for an account. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.CalendarResources; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.CalendarResources; // Updates a calendar resource. // This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. This method supports patch semantics. - patch(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): Admin_directory_v1.Schema.CalendarResource; + patch(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): AdminDirectory.Schema.CalendarResource; // Deletes a calendar resource. remove(customer: string, calendarResourceId: string): void; // Updates a calendar resource. // This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. - update(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): Admin_directory_v1.Schema.CalendarResource; + update(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): AdminDirectory.Schema.CalendarResource; } export interface FeaturesCollection { // Retrieves a feature. - get(customer: string, featureKey: string): Admin_directory_v1.Schema.Feature; + get(customer: string, featureKey: string): AdminDirectory.Schema.Feature; // Inserts a feature. - insert(resource: Schema.Feature, customer: string): Admin_directory_v1.Schema.Feature; + insert(resource: Schema.Feature, customer: string): AdminDirectory.Schema.Feature; // Retrieves a list of features for an account. - list(customer: string): Admin_directory_v1.Schema.Features; + list(customer: string): AdminDirectory.Schema.Features; // Retrieves a list of features for an account. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Features; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Features; // Updates a feature. This method supports patch semantics. - patch(resource: Schema.Feature, customer: string, featureKey: string): Admin_directory_v1.Schema.Feature; + patch(resource: Schema.Feature, customer: string, featureKey: string): AdminDirectory.Schema.Feature; // Deletes a feature. remove(customer: string, featureKey: string): void; // Renames a feature. rename(resource: Schema.FeatureRename, customer: string, oldName: string): void; // Updates a feature. - update(resource: Schema.Feature, customer: string, featureKey: string): Admin_directory_v1.Schema.Feature; + update(resource: Schema.Feature, customer: string, featureKey: string): AdminDirectory.Schema.Feature; } } namespace Users { export interface AliasesCollection { // Add a alias for the user - insert(resource: Schema.Alias, userKey: string): Admin_directory_v1.Schema.Alias; + insert(resource: Schema.Alias, userKey: string): AdminDirectory.Schema.Alias; // List all aliases for a user - list(userKey: string): Admin_directory_v1.Schema.Aliases; + list(userKey: string): AdminDirectory.Schema.Aliases; // List all aliases for a user - list(userKey: string, optionalArgs: object): Admin_directory_v1.Schema.Aliases; + list(userKey: string, optionalArgs: object): AdminDirectory.Schema.Aliases; // Remove a alias for the user remove(userKey: string, alias: string): void; // Watch for changes in user aliases list - watch(resource: Schema.Channel, userKey: string): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel, userKey: string): AdminDirectory.Schema.Channel; // Watch for changes in user aliases list - watch(resource: Schema.Channel, userKey: string, optionalArgs: object): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel, userKey: string, optionalArgs: object): AdminDirectory.Schema.Channel; } export interface PhotosCollection { // Retrieve photo of a user - get(userKey: string): Admin_directory_v1.Schema.UserPhoto; + get(userKey: string): AdminDirectory.Schema.UserPhoto; // Add a photo for the user. This method supports patch semantics. - patch(resource: Schema.UserPhoto, userKey: string): Admin_directory_v1.Schema.UserPhoto; + patch(resource: Schema.UserPhoto, userKey: string): AdminDirectory.Schema.UserPhoto; // Remove photos for the user remove(userKey: string): void; // Add a photo for the user - update(resource: Schema.UserPhoto, userKey: string): Admin_directory_v1.Schema.UserPhoto; + update(resource: Schema.UserPhoto, userKey: string): AdminDirectory.Schema.UserPhoto; } } export interface AspsCollection { // Get information about an ASP issued by a user. - get(userKey: string, codeId: number): Admin_directory_v1.Schema.Asp; + get(userKey: string, codeId: number): AdminDirectory.Schema.Asp; // List the ASPs issued by a user. - list(userKey: string): Admin_directory_v1.Schema.Asps; + list(userKey: string): AdminDirectory.Schema.Asps; // Delete an ASP issued by a user. remove(userKey: string, codeId: number): void; } @@ -118,225 +119,225 @@ declare namespace GoogleAppsScript { // Take action on Chrome OS Device action(resource: Schema.ChromeOsDeviceAction, customerId: string, resourceId: string): void; // Retrieve Chrome OS Device - get(customerId: string, deviceId: string): Admin_directory_v1.Schema.ChromeOsDevice; + get(customerId: string, deviceId: string): AdminDirectory.Schema.ChromeOsDevice; // Retrieve Chrome OS Device - get(customerId: string, deviceId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevice; + get(customerId: string, deviceId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevice; // Retrieve all Chrome OS Devices of a customer (paginated) - list(customerId: string): Admin_directory_v1.Schema.ChromeOsDevices; + list(customerId: string): AdminDirectory.Schema.ChromeOsDevices; // Retrieve all Chrome OS Devices of a customer (paginated) - list(customerId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevices; + list(customerId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevices; // Move or insert multiple Chrome OS Devices to organizational unit moveDevicesToOu(resource: Schema.ChromeOsMoveDevicesToOu, customerId: string, orgUnitPath: string): void; // Update Chrome OS Device. This method supports patch semantics. - patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): Admin_directory_v1.Schema.ChromeOsDevice; + patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): AdminDirectory.Schema.ChromeOsDevice; // Update Chrome OS Device. This method supports patch semantics. - patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevice; + patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevice; // Update Chrome OS Device - update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): Admin_directory_v1.Schema.ChromeOsDevice; + update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): AdminDirectory.Schema.ChromeOsDevice; // Update Chrome OS Device - update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevice; + update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevice; } export interface CustomersCollection { // Retrieves a customer. - get(customerKey: string): Admin_directory_v1.Schema.Customer; + get(customerKey: string): AdminDirectory.Schema.Customer; // Updates a customer. This method supports patch semantics. - patch(resource: Schema.Customer, customerKey: string): Admin_directory_v1.Schema.Customer; + patch(resource: Schema.Customer, customerKey: string): AdminDirectory.Schema.Customer; // Updates a customer. - update(resource: Schema.Customer, customerKey: string): Admin_directory_v1.Schema.Customer; + update(resource: Schema.Customer, customerKey: string): AdminDirectory.Schema.Customer; } export interface DomainAliasesCollection { // Retrieves a domain alias of the customer. - get(customer: string, domainAliasName: string): Admin_directory_v1.Schema.DomainAlias; + get(customer: string, domainAliasName: string): AdminDirectory.Schema.DomainAlias; // Inserts a Domain alias of the customer. - insert(resource: Schema.DomainAlias, customer: string): Admin_directory_v1.Schema.DomainAlias; + insert(resource: Schema.DomainAlias, customer: string): AdminDirectory.Schema.DomainAlias; // Lists the domain aliases of the customer. - list(customer: string): Admin_directory_v1.Schema.DomainAliases; + list(customer: string): AdminDirectory.Schema.DomainAliases; // Lists the domain aliases of the customer. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.DomainAliases; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.DomainAliases; // Deletes a Domain Alias of the customer. remove(customer: string, domainAliasName: string): void; } export interface DomainsCollection { // Retrieves a domain of the customer. - get(customer: string, domainName: string): Admin_directory_v1.Schema.Domains; + get(customer: string, domainName: string): AdminDirectory.Schema.Domains; // Inserts a domain of the customer. - insert(resource: Schema.Domains, customer: string): Admin_directory_v1.Schema.Domains; + insert(resource: Schema.Domains, customer: string): AdminDirectory.Schema.Domains; // Lists the domains of the customer. - list(customer: string): Admin_directory_v1.Schema.Domains2; + list(customer: string): AdminDirectory.Schema.Domains2; // Deletes a domain of the customer. remove(customer: string, domainName: string): void; } export interface GroupsCollection { - Aliases?: Admin_directory_v1.Collection.Groups.AliasesCollection; + Aliases?: AdminDirectory.Collection.Groups.AliasesCollection; // Retrieve Group - get(groupKey: string): Admin_directory_v1.Schema.Group; + get(groupKey: string): AdminDirectory.Schema.Group; // Create Group - insert(resource: Schema.Group): Admin_directory_v1.Schema.Group; + insert(resource: Schema.Group): AdminDirectory.Schema.Group; // Retrieve all groups of a domain or of a user given a userKey (paginated) - list(): Admin_directory_v1.Schema.Groups; + list(): AdminDirectory.Schema.Groups; // Retrieve all groups of a domain or of a user given a userKey (paginated) - list(optionalArgs: object): Admin_directory_v1.Schema.Groups; + list(optionalArgs: object): AdminDirectory.Schema.Groups; // Update Group. This method supports patch semantics. - patch(resource: Schema.Group, groupKey: string): Admin_directory_v1.Schema.Group; + patch(resource: Schema.Group, groupKey: string): AdminDirectory.Schema.Group; // Delete Group remove(groupKey: string): void; // Update Group - update(resource: Schema.Group, groupKey: string): Admin_directory_v1.Schema.Group; + update(resource: Schema.Group, groupKey: string): AdminDirectory.Schema.Group; } export interface MembersCollection { // Retrieve Group Member - get(groupKey: string, memberKey: string): Admin_directory_v1.Schema.Member; + get(groupKey: string, memberKey: string): AdminDirectory.Schema.Member; // Checks whether the given user is a member of the group. Membership can be direct or nested. - hasMember(groupKey: string, memberKey: string): Admin_directory_v1.Schema.MembersHasMember; + hasMember(groupKey: string, memberKey: string): AdminDirectory.Schema.MembersHasMember; // Add user to the specified group. - insert(resource: Schema.Member, groupKey: string): Admin_directory_v1.Schema.Member; + insert(resource: Schema.Member, groupKey: string): AdminDirectory.Schema.Member; // Retrieve all members in a group (paginated) - list(groupKey: string): Admin_directory_v1.Schema.Members; + list(groupKey: string): AdminDirectory.Schema.Members; // Retrieve all members in a group (paginated) - list(groupKey: string, optionalArgs: object): Admin_directory_v1.Schema.Members; + list(groupKey: string, optionalArgs: object): AdminDirectory.Schema.Members; // Update membership of a user in the specified group. This method supports patch semantics. - patch(resource: Schema.Member, groupKey: string, memberKey: string): Admin_directory_v1.Schema.Member; + patch(resource: Schema.Member, groupKey: string, memberKey: string): AdminDirectory.Schema.Member; // Remove membership. remove(groupKey: string, memberKey: string): void; // Update membership of a user in the specified group. - update(resource: Schema.Member, groupKey: string, memberKey: string): Admin_directory_v1.Schema.Member; + update(resource: Schema.Member, groupKey: string, memberKey: string): AdminDirectory.Schema.Member; } export interface MobiledevicesCollection { // Take action on Mobile Device action(resource: Schema.MobileDeviceAction, customerId: string, resourceId: string): void; // Retrieve Mobile Device - get(customerId: string, resourceId: string): Admin_directory_v1.Schema.MobileDevice; + get(customerId: string, resourceId: string): AdminDirectory.Schema.MobileDevice; // Retrieve Mobile Device - get(customerId: string, resourceId: string, optionalArgs: object): Admin_directory_v1.Schema.MobileDevice; + get(customerId: string, resourceId: string, optionalArgs: object): AdminDirectory.Schema.MobileDevice; // Retrieve all Mobile Devices of a customer (paginated) - list(customerId: string): Admin_directory_v1.Schema.MobileDevices; + list(customerId: string): AdminDirectory.Schema.MobileDevices; // Retrieve all Mobile Devices of a customer (paginated) - list(customerId: string, optionalArgs: object): Admin_directory_v1.Schema.MobileDevices; + list(customerId: string, optionalArgs: object): AdminDirectory.Schema.MobileDevices; // Delete Mobile Device remove(customerId: string, resourceId: string): void; } export interface NotificationsCollection { // Retrieves a notification. - get(customer: string, notificationId: string): Admin_directory_v1.Schema.Notification; + get(customer: string, notificationId: string): AdminDirectory.Schema.Notification; // Retrieves a list of notifications. - list(customer: string): Admin_directory_v1.Schema.Notifications; + list(customer: string): AdminDirectory.Schema.Notifications; // Retrieves a list of notifications. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Notifications; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Notifications; // Updates a notification. This method supports patch semantics. - patch(resource: Schema.Notification, customer: string, notificationId: string): Admin_directory_v1.Schema.Notification; + patch(resource: Schema.Notification, customer: string, notificationId: string): AdminDirectory.Schema.Notification; // Deletes a notification remove(customer: string, notificationId: string): void; // Updates a notification. - update(resource: Schema.Notification, customer: string, notificationId: string): Admin_directory_v1.Schema.Notification; + update(resource: Schema.Notification, customer: string, notificationId: string): AdminDirectory.Schema.Notification; } export interface OrgunitsCollection { // Retrieve organizational unit - get(customerId: string, orgUnitPath: string[]): Admin_directory_v1.Schema.OrgUnit; + get(customerId: string, orgUnitPath: string[]): AdminDirectory.Schema.OrgUnit; // Add organizational unit - insert(resource: Schema.OrgUnit, customerId: string): Admin_directory_v1.Schema.OrgUnit; + insert(resource: Schema.OrgUnit, customerId: string): AdminDirectory.Schema.OrgUnit; // Retrieve all organizational units - list(customerId: string): Admin_directory_v1.Schema.OrgUnits; + list(customerId: string): AdminDirectory.Schema.OrgUnits; // Retrieve all organizational units - list(customerId: string, optionalArgs: object): Admin_directory_v1.Schema.OrgUnits; + list(customerId: string, optionalArgs: object): AdminDirectory.Schema.OrgUnits; // Update organizational unit. This method supports patch semantics. - patch(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): Admin_directory_v1.Schema.OrgUnit; + patch(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): AdminDirectory.Schema.OrgUnit; // Remove organizational unit remove(customerId: string, orgUnitPath: string[]): void; // Update organizational unit - update(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): Admin_directory_v1.Schema.OrgUnit; + update(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): AdminDirectory.Schema.OrgUnit; } export interface PrivilegesCollection { // Retrieves a paginated list of all privileges for a customer. - list(customer: string): Admin_directory_v1.Schema.Privileges; + list(customer: string): AdminDirectory.Schema.Privileges; } export interface ResolvedAppAccessSettingsCollection { // Retrieves resolved app access settings of the logged in user. - GetSettings(): Admin_directory_v1.Schema.AppAccessCollections; + GetSettings(): AdminDirectory.Schema.AppAccessCollections; // Retrieves the list of apps trusted by the admin of the logged in user. - ListTrustedApps(): Admin_directory_v1.Schema.TrustedApps; + ListTrustedApps(): AdminDirectory.Schema.TrustedApps; } export interface ResourcesCollection { - Buildings?: Admin_directory_v1.Collection.Resources.BuildingsCollection; - Calendars?: Admin_directory_v1.Collection.Resources.CalendarsCollection; - Features?: Admin_directory_v1.Collection.Resources.FeaturesCollection; + Buildings?: AdminDirectory.Collection.Resources.BuildingsCollection; + Calendars?: AdminDirectory.Collection.Resources.CalendarsCollection; + Features?: AdminDirectory.Collection.Resources.FeaturesCollection; } export interface RoleAssignmentsCollection { // Retrieve a role assignment. - get(customer: string, roleAssignmentId: string): Admin_directory_v1.Schema.RoleAssignment; + get(customer: string, roleAssignmentId: string): AdminDirectory.Schema.RoleAssignment; // Creates a role assignment. - insert(resource: Schema.RoleAssignment, customer: string): Admin_directory_v1.Schema.RoleAssignment; + insert(resource: Schema.RoleAssignment, customer: string): AdminDirectory.Schema.RoleAssignment; // Retrieves a paginated list of all roleAssignments. - list(customer: string): Admin_directory_v1.Schema.RoleAssignments; + list(customer: string): AdminDirectory.Schema.RoleAssignments; // Retrieves a paginated list of all roleAssignments. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.RoleAssignments; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.RoleAssignments; // Deletes a role assignment. remove(customer: string, roleAssignmentId: string): void; } export interface RolesCollection { // Retrieves a role. - get(customer: string, roleId: string): Admin_directory_v1.Schema.Role; + get(customer: string, roleId: string): AdminDirectory.Schema.Role; // Creates a role. - insert(resource: Schema.Role, customer: string): Admin_directory_v1.Schema.Role; + insert(resource: Schema.Role, customer: string): AdminDirectory.Schema.Role; // Retrieves a paginated list of all the roles in a domain. - list(customer: string): Admin_directory_v1.Schema.Roles; + list(customer: string): AdminDirectory.Schema.Roles; // Retrieves a paginated list of all the roles in a domain. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Roles; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Roles; // Updates a role. This method supports patch semantics. - patch(resource: Schema.Role, customer: string, roleId: string): Admin_directory_v1.Schema.Role; + patch(resource: Schema.Role, customer: string, roleId: string): AdminDirectory.Schema.Role; // Deletes a role. remove(customer: string, roleId: string): void; // Updates a role. - update(resource: Schema.Role, customer: string, roleId: string): Admin_directory_v1.Schema.Role; + update(resource: Schema.Role, customer: string, roleId: string): AdminDirectory.Schema.Role; } export interface SchemasCollection { // Retrieve schema - get(customerId: string, schemaKey: string): Admin_directory_v1.Schema.Schema; + get(customerId: string, schemaKey: string): AdminDirectory.Schema.Schema; // Create schema. - insert(resource: Schema.Schema, customerId: string): Admin_directory_v1.Schema.Schema; + insert(resource: Schema.Schema, customerId: string): AdminDirectory.Schema.Schema; // Retrieve all schemas for a customer - list(customerId: string): Admin_directory_v1.Schema.Schemas; + list(customerId: string): AdminDirectory.Schema.Schemas; // Update schema. This method supports patch semantics. - patch(resource: Schema.Schema, customerId: string, schemaKey: string): Admin_directory_v1.Schema.Schema; + patch(resource: Schema.Schema, customerId: string, schemaKey: string): AdminDirectory.Schema.Schema; // Delete schema remove(customerId: string, schemaKey: string): void; // Update schema - update(resource: Schema.Schema, customerId: string, schemaKey: string): Admin_directory_v1.Schema.Schema; + update(resource: Schema.Schema, customerId: string, schemaKey: string): AdminDirectory.Schema.Schema; } export interface TokensCollection { // Get information about an access token issued by a user. - get(userKey: string, clientId: string): Admin_directory_v1.Schema.Token; + get(userKey: string, clientId: string): AdminDirectory.Schema.Token; // Returns the set of tokens specified user has issued to 3rd party applications. - list(userKey: string): Admin_directory_v1.Schema.Tokens; + list(userKey: string): AdminDirectory.Schema.Tokens; // Delete all access tokens issued by a user for an application. remove(userKey: string, clientId: string): void; } export interface UsersCollection { - Aliases?: Admin_directory_v1.Collection.Users.AliasesCollection; - Photos?: Admin_directory_v1.Collection.Users.PhotosCollection; + Aliases?: AdminDirectory.Collection.Users.AliasesCollection; + Photos?: AdminDirectory.Collection.Users.PhotosCollection; // retrieve user - get(userKey: string): Admin_directory_v1.Schema.User; + get(userKey: string): AdminDirectory.Schema.User; // retrieve user - get(userKey: string, optionalArgs: object): Admin_directory_v1.Schema.User; + get(userKey: string, optionalArgs: object): AdminDirectory.Schema.User; // create user. - insert(resource: Schema.User): Admin_directory_v1.Schema.User; + insert(resource: Schema.User): AdminDirectory.Schema.User; // Retrieve either deleted users or all users in a domain (paginated) - list(): Admin_directory_v1.Schema.Users; + list(): AdminDirectory.Schema.Users; // Retrieve either deleted users or all users in a domain (paginated) - list(optionalArgs: object): Admin_directory_v1.Schema.Users; + list(optionalArgs: object): AdminDirectory.Schema.Users; // change admin status of a user makeAdmin(resource: Schema.UserMakeAdmin, userKey: string): void; // update user. This method supports patch semantics. - patch(resource: Schema.User, userKey: string): Admin_directory_v1.Schema.User; + patch(resource: Schema.User, userKey: string): AdminDirectory.Schema.User; // Delete user remove(userKey: string): void; // Undelete a deleted user undelete(resource: Schema.UserUndelete, userKey: string): void; // update user - update(resource: Schema.User, userKey: string): Admin_directory_v1.Schema.User; + update(resource: Schema.User, userKey: string): AdminDirectory.Schema.User; // Watch for changes in users list - watch(resource: Schema.Channel): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel): AdminDirectory.Schema.Channel; // Watch for changes in users list - watch(resource: Schema.Channel, optionalArgs: object): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object): AdminDirectory.Schema.Channel; } export interface VerificationCodesCollection { // Generate new backup verification codes for the user. @@ -344,7 +345,7 @@ declare namespace GoogleAppsScript { // Invalidate the current backup verification codes for the user. invalidate(userKey: string): void; // Returns the current set of valid backup verification codes for the specified user. - list(userKey: string): Admin_directory_v1.Schema.VerificationCodes; + list(userKey: string): AdminDirectory.Schema.VerificationCodes; } } namespace Schema { @@ -381,14 +382,14 @@ declare namespace GoogleAppsScript { } export interface Asps { etag?: string; - items?: Admin_directory_v1.Schema.Asp[]; + items?: AdminDirectory.Schema.Asp[]; kind?: string; } export interface Building { - address?: Admin_directory_v1.Schema.BuildingAddress; + address?: AdminDirectory.Schema.BuildingAddress; buildingId?: string; buildingName?: string; - coordinates?: Admin_directory_v1.Schema.BuildingCoordinates; + coordinates?: AdminDirectory.Schema.BuildingCoordinates; description?: string; etags?: string; floorNames?: string[]; @@ -408,7 +409,7 @@ declare namespace GoogleAppsScript { longitude?: Number; } export interface Buildings { - buildings?: Admin_directory_v1.Schema.Building[]; + buildings?: AdminDirectory.Schema.Building[]; etag?: string; kind?: string; nextPageToken?: string; @@ -432,7 +433,7 @@ declare namespace GoogleAppsScript { } export interface CalendarResources { etag?: string; - items?: Admin_directory_v1.Schema.CalendarResource[]; + items?: AdminDirectory.Schema.CalendarResource[]; kind?: string; nextPageToken?: string; } @@ -449,15 +450,15 @@ declare namespace GoogleAppsScript { type?: string; } export interface ChromeOsDevice { - activeTimeRanges?: Admin_directory_v1.Schema.ChromeOsDeviceActiveTimeRanges[]; + activeTimeRanges?: AdminDirectory.Schema.ChromeOsDeviceActiveTimeRanges[]; annotatedAssetId?: string; annotatedLocation?: string; annotatedUser?: string; bootMode?: string; - cpuStatusReports?: Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReports[]; - deviceFiles?: Admin_directory_v1.Schema.ChromeOsDeviceDeviceFiles[]; + cpuStatusReports?: AdminDirectory.Schema.ChromeOsDeviceCpuStatusReports[]; + deviceFiles?: AdminDirectory.Schema.ChromeOsDeviceDeviceFiles[]; deviceId?: string; - diskVolumeReports?: Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReports[]; + diskVolumeReports?: AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReports[]; etag?: string; ethernetMacAddress?: string; firmwareVersion?: string; @@ -472,13 +473,13 @@ declare namespace GoogleAppsScript { orgUnitPath?: string; osVersion?: string; platformVersion?: string; - recentUsers?: Admin_directory_v1.Schema.ChromeOsDeviceRecentUsers[]; + recentUsers?: AdminDirectory.Schema.ChromeOsDeviceRecentUsers[]; serialNumber?: string; status?: string; supportEndDate?: string; - systemRamFreeReports?: Admin_directory_v1.Schema.ChromeOsDeviceSystemRamFreeReports[]; + systemRamFreeReports?: AdminDirectory.Schema.ChromeOsDeviceSystemRamFreeReports[]; systemRamTotal?: string; - tpmVersionInfo?: Admin_directory_v1.Schema.ChromeOsDeviceTpmVersionInfo; + tpmVersionInfo?: AdminDirectory.Schema.ChromeOsDeviceTpmVersionInfo; willAutoRenew?: boolean; } export interface ChromeOsDeviceAction { @@ -490,7 +491,7 @@ declare namespace GoogleAppsScript { date?: string; } export interface ChromeOsDeviceCpuStatusReports { - cpuTemperatureInfo?: Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo[]; + cpuTemperatureInfo?: AdminDirectory.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo[]; cpuUtilizationPercentageInfo?: number[]; reportTime?: string; } @@ -505,7 +506,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface ChromeOsDeviceDiskVolumeReports { - volumeInfo?: Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo[]; + volumeInfo?: AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo[]; } export interface ChromeOsDeviceDiskVolumeReportsVolumeInfo { storageFree?: string; @@ -529,7 +530,7 @@ declare namespace GoogleAppsScript { vendorSpecific?: string; } export interface ChromeOsDevices { - chromeosdevices?: Admin_directory_v1.Schema.ChromeOsDevice[]; + chromeosdevices?: AdminDirectory.Schema.ChromeOsDevice[]; etag?: string; kind?: string; nextPageToken?: string; @@ -546,7 +547,7 @@ declare namespace GoogleAppsScript { kind?: string; language?: string; phoneNumber?: string; - postalAddress?: Admin_directory_v1.Schema.CustomerPostalAddress; + postalAddress?: AdminDirectory.Schema.CustomerPostalAddress; } export interface CustomerPostalAddress { addressLine1?: string; @@ -568,13 +569,13 @@ declare namespace GoogleAppsScript { verified?: boolean; } export interface DomainAliases { - domainAliases?: Admin_directory_v1.Schema.DomainAlias[]; + domainAliases?: AdminDirectory.Schema.DomainAlias[]; etag?: string; kind?: string; } export interface Domains { creationTime?: string; - domainAliases?: Admin_directory_v1.Schema.DomainAlias[]; + domainAliases?: AdminDirectory.Schema.DomainAlias[]; domainName?: string; etag?: string; isPrimary?: boolean; @@ -582,7 +583,7 @@ declare namespace GoogleAppsScript { verified?: boolean; } export interface Domains2 { - domains?: Admin_directory_v1.Schema.Domains[]; + domains?: AdminDirectory.Schema.Domains[]; etag?: string; kind?: string; } @@ -592,14 +593,14 @@ declare namespace GoogleAppsScript { name?: string; } export interface FeatureInstance { - feature?: Admin_directory_v1.Schema.Feature; + feature?: AdminDirectory.Schema.Feature; } export interface FeatureRename { newName?: string; } export interface Features { etag?: string; - features?: Admin_directory_v1.Schema.Feature[]; + features?: AdminDirectory.Schema.Feature[]; kind?: string; nextPageToken?: string; } @@ -617,7 +618,7 @@ declare namespace GoogleAppsScript { } export interface Groups { etag?: string; - groups?: Admin_directory_v1.Schema.Group[]; + groups?: AdminDirectory.Schema.Group[]; kind?: string; nextPageToken?: string; } @@ -634,7 +635,7 @@ declare namespace GoogleAppsScript { export interface Members { etag?: string; kind?: string; - members?: Admin_directory_v1.Schema.Member[]; + members?: AdminDirectory.Schema.Member[]; nextPageToken?: string; } export interface MembersHasMember { @@ -642,7 +643,7 @@ declare namespace GoogleAppsScript { } export interface MobileDevice { adbStatus?: boolean; - applications?: Admin_directory_v1.Schema.MobileDeviceApplications[]; + applications?: AdminDirectory.Schema.MobileDeviceApplications[]; basebandVersion?: string; bootloaderVersion?: string; brand?: string; @@ -695,7 +696,7 @@ declare namespace GoogleAppsScript { export interface MobileDevices { etag?: string; kind?: string; - mobiledevices?: Admin_directory_v1.Schema.MobileDevice[]; + mobiledevices?: AdminDirectory.Schema.MobileDevice[]; nextPageToken?: string; } export interface Notification { @@ -710,7 +711,7 @@ declare namespace GoogleAppsScript { } export interface Notifications { etag?: string; - items?: Admin_directory_v1.Schema.Notification[]; + items?: AdminDirectory.Schema.Notification[]; kind?: string; nextPageToken?: string; unreadNotificationsCount?: number; @@ -729,10 +730,10 @@ declare namespace GoogleAppsScript { export interface OrgUnits { etag?: string; kind?: string; - organizationUnits?: Admin_directory_v1.Schema.OrgUnit[]; + organizationUnits?: AdminDirectory.Schema.OrgUnit[]; } export interface Privilege { - childPrivileges?: Admin_directory_v1.Schema.Privilege[]; + childPrivileges?: AdminDirectory.Schema.Privilege[]; etag?: string; isOuScopable?: boolean; kind?: string; @@ -742,7 +743,7 @@ declare namespace GoogleAppsScript { } export interface Privileges { etag?: string; - items?: Admin_directory_v1.Schema.Privilege[]; + items?: AdminDirectory.Schema.Privilege[]; kind?: string; } export interface Role { @@ -753,7 +754,7 @@ declare namespace GoogleAppsScript { roleDescription?: string; roleId?: string; roleName?: string; - rolePrivileges?: Admin_directory_v1.Schema.RoleRolePrivileges[]; + rolePrivileges?: AdminDirectory.Schema.RoleRolePrivileges[]; } export interface RoleAssignment { assignedTo?: string; @@ -766,7 +767,7 @@ declare namespace GoogleAppsScript { } export interface RoleAssignments { etag?: string; - items?: Admin_directory_v1.Schema.RoleAssignment[]; + items?: AdminDirectory.Schema.RoleAssignment[]; kind?: string; nextPageToken?: string; } @@ -776,14 +777,14 @@ declare namespace GoogleAppsScript { } export interface Roles { etag?: string; - items?: Admin_directory_v1.Schema.Role[]; + items?: AdminDirectory.Schema.Role[]; kind?: string; nextPageToken?: string; } export interface Schema { displayName?: string; etag?: string; - fields?: Admin_directory_v1.Schema.SchemaFieldSpec[]; + fields?: AdminDirectory.Schema.SchemaFieldSpec[]; kind?: string; schemaId?: string; schemaName?: string; @@ -797,7 +798,7 @@ declare namespace GoogleAppsScript { indexed?: boolean; kind?: string; multiValued?: boolean; - numericIndexingSpec?: Admin_directory_v1.Schema.SchemaFieldSpecNumericIndexingSpec; + numericIndexingSpec?: AdminDirectory.Schema.SchemaFieldSpecNumericIndexingSpec; readAccessType?: string; } export interface SchemaFieldSpecNumericIndexingSpec { @@ -807,7 +808,7 @@ declare namespace GoogleAppsScript { export interface Schemas { etag?: string; kind?: string; - schemas?: Admin_directory_v1.Schema.Schema[]; + schemas?: AdminDirectory.Schema.Schema[]; } export interface Token { anonymous?: boolean; @@ -821,7 +822,7 @@ declare namespace GoogleAppsScript { } export interface Tokens { etag?: string; - items?: Admin_directory_v1.Schema.Token[]; + items?: AdminDirectory.Schema.Token[]; kind?: string; } export interface TrustedAppId { @@ -835,7 +836,7 @@ declare namespace GoogleAppsScript { etag?: string; kind?: string; nextPageToken?: string; - trustedApps?: Admin_directory_v1.Schema.TrustedAppId[]; + trustedApps?: AdminDirectory.Schema.TrustedAppId[]; } export interface User { addresses?: object; @@ -866,7 +867,7 @@ declare namespace GoogleAppsScript { languages?: object; lastLoginTime?: string; locations?: object; - name?: Admin_directory_v1.Schema.UserName; + name?: AdminDirectory.Schema.UserName; nonEditableAliases?: string[]; notes?: object; orgUnitPath?: string; @@ -1018,7 +1019,7 @@ declare namespace GoogleAppsScript { kind?: string; nextPageToken?: string; trigger_event?: string; - users?: Admin_directory_v1.Schema.User[]; + users?: AdminDirectory.Schema.User[]; } export interface VerificationCode { etag?: string; @@ -1028,111 +1029,113 @@ declare namespace GoogleAppsScript { } export interface VerificationCodes { etag?: string; - items?: Admin_directory_v1.Schema.VerificationCode[]; + items?: AdminDirectory.Schema.VerificationCode[]; kind?: string; } } } - export interface Admin_directory_v1 { - Asps?: Admin_directory_v1.Collection.AspsCollection; - Channels?: Admin_directory_v1.Collection.ChannelsCollection; - Chromeosdevices?: Admin_directory_v1.Collection.ChromeosdevicesCollection; - Customers?: Admin_directory_v1.Collection.CustomersCollection; - DomainAliases?: Admin_directory_v1.Collection.DomainAliasesCollection; - Domains?: Admin_directory_v1.Collection.DomainsCollection; - Groups?: Admin_directory_v1.Collection.GroupsCollection; - Members?: Admin_directory_v1.Collection.MembersCollection; - Mobiledevices?: Admin_directory_v1.Collection.MobiledevicesCollection; - Notifications?: Admin_directory_v1.Collection.NotificationsCollection; - Orgunits?: Admin_directory_v1.Collection.OrgunitsCollection; - Privileges?: Admin_directory_v1.Collection.PrivilegesCollection; - ResolvedAppAccessSettings?: Admin_directory_v1.Collection.ResolvedAppAccessSettingsCollection; - Resources?: Admin_directory_v1.Collection.ResourcesCollection; - RoleAssignments?: Admin_directory_v1.Collection.RoleAssignmentsCollection; - Roles?: Admin_directory_v1.Collection.RolesCollection; - Schemas?: Admin_directory_v1.Collection.SchemasCollection; - Tokens?: Admin_directory_v1.Collection.TokensCollection; - Users?: Admin_directory_v1.Collection.UsersCollection; - VerificationCodes?: Admin_directory_v1.Collection.VerificationCodesCollection; + export interface AdminDirectory { + Asps?: AdminDirectory.Collection.AspsCollection; + Channels?: AdminDirectory.Collection.ChannelsCollection; + Chromeosdevices?: AdminDirectory.Collection.ChromeosdevicesCollection; + Customers?: AdminDirectory.Collection.CustomersCollection; + DomainAliases?: AdminDirectory.Collection.DomainAliasesCollection; + Domains?: AdminDirectory.Collection.DomainsCollection; + Groups?: AdminDirectory.Collection.GroupsCollection; + Members?: AdminDirectory.Collection.MembersCollection; + Mobiledevices?: AdminDirectory.Collection.MobiledevicesCollection; + Notifications?: AdminDirectory.Collection.NotificationsCollection; + Orgunits?: AdminDirectory.Collection.OrgunitsCollection; + Privileges?: AdminDirectory.Collection.PrivilegesCollection; + ResolvedAppAccessSettings?: AdminDirectory.Collection.ResolvedAppAccessSettingsCollection; + Resources?: AdminDirectory.Collection.ResourcesCollection; + RoleAssignments?: AdminDirectory.Collection.RoleAssignmentsCollection; + Roles?: AdminDirectory.Collection.RolesCollection; + Schemas?: AdminDirectory.Collection.SchemasCollection; + Tokens?: AdminDirectory.Collection.TokensCollection; + Users?: AdminDirectory.Collection.UsersCollection; + VerificationCodes?: AdminDirectory.Collection.VerificationCodesCollection; // Create a new instance of Alias - newAlias(): Admin_directory_v1.Schema.Alias; + newAlias(): AdminDirectory.Schema.Alias; // Create a new instance of Building - newBuilding(): Admin_directory_v1.Schema.Building; + newBuilding(): AdminDirectory.Schema.Building; // Create a new instance of BuildingAddress - newBuildingAddress(): Admin_directory_v1.Schema.BuildingAddress; + newBuildingAddress(): AdminDirectory.Schema.BuildingAddress; // Create a new instance of BuildingCoordinates - newBuildingCoordinates(): Admin_directory_v1.Schema.BuildingCoordinates; + newBuildingCoordinates(): AdminDirectory.Schema.BuildingCoordinates; // Create a new instance of CalendarResource - newCalendarResource(): Admin_directory_v1.Schema.CalendarResource; + newCalendarResource(): AdminDirectory.Schema.CalendarResource; // Create a new instance of Channel - newChannel(): Admin_directory_v1.Schema.Channel; + newChannel(): AdminDirectory.Schema.Channel; // Create a new instance of ChromeOsDevice - newChromeOsDevice(): Admin_directory_v1.Schema.ChromeOsDevice; + newChromeOsDevice(): AdminDirectory.Schema.ChromeOsDevice; // Create a new instance of ChromeOsDeviceAction - newChromeOsDeviceAction(): Admin_directory_v1.Schema.ChromeOsDeviceAction; + newChromeOsDeviceAction(): AdminDirectory.Schema.ChromeOsDeviceAction; // Create a new instance of ChromeOsDeviceActiveTimeRanges - newChromeOsDeviceActiveTimeRanges(): Admin_directory_v1.Schema.ChromeOsDeviceActiveTimeRanges; + newChromeOsDeviceActiveTimeRanges(): AdminDirectory.Schema.ChromeOsDeviceActiveTimeRanges; // Create a new instance of ChromeOsDeviceCpuStatusReports - newChromeOsDeviceCpuStatusReports(): Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReports; + newChromeOsDeviceCpuStatusReports(): AdminDirectory.Schema.ChromeOsDeviceCpuStatusReports; // Create a new instance of ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo - newChromeOsDeviceCpuStatusReportsCpuTemperatureInfo(): Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo; + newChromeOsDeviceCpuStatusReportsCpuTemperatureInfo(): AdminDirectory.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo; // Create a new instance of ChromeOsDeviceDeviceFiles - newChromeOsDeviceDeviceFiles(): Admin_directory_v1.Schema.ChromeOsDeviceDeviceFiles; + newChromeOsDeviceDeviceFiles(): AdminDirectory.Schema.ChromeOsDeviceDeviceFiles; // Create a new instance of ChromeOsDeviceDiskVolumeReports - newChromeOsDeviceDiskVolumeReports(): Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReports; + newChromeOsDeviceDiskVolumeReports(): AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReports; // Create a new instance of ChromeOsDeviceDiskVolumeReportsVolumeInfo - newChromeOsDeviceDiskVolumeReportsVolumeInfo(): Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo; + newChromeOsDeviceDiskVolumeReportsVolumeInfo(): AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo; // Create a new instance of ChromeOsDeviceRecentUsers - newChromeOsDeviceRecentUsers(): Admin_directory_v1.Schema.ChromeOsDeviceRecentUsers; + newChromeOsDeviceRecentUsers(): AdminDirectory.Schema.ChromeOsDeviceRecentUsers; // Create a new instance of ChromeOsDeviceSystemRamFreeReports - newChromeOsDeviceSystemRamFreeReports(): Admin_directory_v1.Schema.ChromeOsDeviceSystemRamFreeReports; + newChromeOsDeviceSystemRamFreeReports(): AdminDirectory.Schema.ChromeOsDeviceSystemRamFreeReports; // Create a new instance of ChromeOsDeviceTpmVersionInfo - newChromeOsDeviceTpmVersionInfo(): Admin_directory_v1.Schema.ChromeOsDeviceTpmVersionInfo; + newChromeOsDeviceTpmVersionInfo(): AdminDirectory.Schema.ChromeOsDeviceTpmVersionInfo; // Create a new instance of ChromeOsMoveDevicesToOu - newChromeOsMoveDevicesToOu(): Admin_directory_v1.Schema.ChromeOsMoveDevicesToOu; + newChromeOsMoveDevicesToOu(): AdminDirectory.Schema.ChromeOsMoveDevicesToOu; // Create a new instance of Customer - newCustomer(): Admin_directory_v1.Schema.Customer; + newCustomer(): AdminDirectory.Schema.Customer; // Create a new instance of CustomerPostalAddress - newCustomerPostalAddress(): Admin_directory_v1.Schema.CustomerPostalAddress; + newCustomerPostalAddress(): AdminDirectory.Schema.CustomerPostalAddress; // Create a new instance of DomainAlias - newDomainAlias(): Admin_directory_v1.Schema.DomainAlias; + newDomainAlias(): AdminDirectory.Schema.DomainAlias; // Create a new instance of Domains - newDomains(): Admin_directory_v1.Schema.Domains; + newDomains(): AdminDirectory.Schema.Domains; // Create a new instance of Feature - newFeature(): Admin_directory_v1.Schema.Feature; + newFeature(): AdminDirectory.Schema.Feature; // Create a new instance of FeatureRename - newFeatureRename(): Admin_directory_v1.Schema.FeatureRename; + newFeatureRename(): AdminDirectory.Schema.FeatureRename; // Create a new instance of Group - newGroup(): Admin_directory_v1.Schema.Group; + newGroup(): AdminDirectory.Schema.Group; // Create a new instance of Member - newMember(): Admin_directory_v1.Schema.Member; + newMember(): AdminDirectory.Schema.Member; // Create a new instance of MobileDeviceAction - newMobileDeviceAction(): Admin_directory_v1.Schema.MobileDeviceAction; + newMobileDeviceAction(): AdminDirectory.Schema.MobileDeviceAction; // Create a new instance of Notification - newNotification(): Admin_directory_v1.Schema.Notification; + newNotification(): AdminDirectory.Schema.Notification; // Create a new instance of OrgUnit - newOrgUnit(): Admin_directory_v1.Schema.OrgUnit; + newOrgUnit(): AdminDirectory.Schema.OrgUnit; // Create a new instance of Role - newRole(): Admin_directory_v1.Schema.Role; + newRole(): AdminDirectory.Schema.Role; // Create a new instance of RoleAssignment - newRoleAssignment(): Admin_directory_v1.Schema.RoleAssignment; + newRoleAssignment(): AdminDirectory.Schema.RoleAssignment; // Create a new instance of RoleRolePrivileges - newRoleRolePrivileges(): Admin_directory_v1.Schema.RoleRolePrivileges; + newRoleRolePrivileges(): AdminDirectory.Schema.RoleRolePrivileges; // Create a new instance of Schema - newSchema(): Admin_directory_v1.Schema.Schema; + newSchema(): AdminDirectory.Schema.Schema; // Create a new instance of SchemaFieldSpec - newSchemaFieldSpec(): Admin_directory_v1.Schema.SchemaFieldSpec; + newSchemaFieldSpec(): AdminDirectory.Schema.SchemaFieldSpec; // Create a new instance of SchemaFieldSpecNumericIndexingSpec - newSchemaFieldSpecNumericIndexingSpec(): Admin_directory_v1.Schema.SchemaFieldSpecNumericIndexingSpec; + newSchemaFieldSpecNumericIndexingSpec(): AdminDirectory.Schema.SchemaFieldSpecNumericIndexingSpec; // Create a new instance of User - newUser(): Admin_directory_v1.Schema.User; + newUser(): AdminDirectory.Schema.User; // Create a new instance of UserMakeAdmin - newUserMakeAdmin(): Admin_directory_v1.Schema.UserMakeAdmin; + newUserMakeAdmin(): AdminDirectory.Schema.UserMakeAdmin; // Create a new instance of UserName - newUserName(): Admin_directory_v1.Schema.UserName; + newUserName(): AdminDirectory.Schema.UserName; // Create a new instance of UserPhoto - newUserPhoto(): Admin_directory_v1.Schema.UserPhoto; + newUserPhoto(): AdminDirectory.Schema.UserPhoto; // Create a new instance of UserUndelete - newUserUndelete(): Admin_directory_v1.Schema.UserUndelete; + newUserUndelete(): AdminDirectory.Schema.UserUndelete; } } + +declare var AdminDirectory: GoogleAppsScript.AdminDirectory; diff --git a/types/google-apps-script/apis/docs_v1.d.ts b/types/google-apps-script/apis/docs_v1.d.ts new file mode 100644 index 0000000000..39dc4bde0e --- /dev/null +++ b/types/google-apps-script/apis/docs_v1.d.ts @@ -0,0 +1,910 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Docs { + namespace Collection { + export interface DocumentsCollection { + // Applies one or more updates to the document. + // Each request is validated before + // being applied. If any request is not valid, then the entire request will + // fail and nothing will be applied. + // Some requests have replies to + // give you some information about how they are applied. Other requests do + // not need to return information; these each return an empty reply. + // The order of replies matches that of the requests. + // For example, suppose you call batchUpdate with four updates, and only the + // third one returns information. The response would have two empty replies, + // the reply to the third request, and another empty reply, in that order. + // Because other users may be editing the document, the document + // might not exactly reflect your changes: your changes may + // be altered with respect to collaborator changes. If there are no + // collaborators, the document should reflect your changes. In any case, + // the updates in your request are guaranteed to be applied together + // atomically. + batchUpdate(resource: Schema.BatchUpdateDocumentRequest, documentId: string): Docs.Schema.BatchUpdateDocumentResponse; + // Creates a blank document using the title given in the request. Other fields + // in the request, including any provided content, are ignored. + // Returns the created document. + create(resource: Schema.Document): Docs.Schema.Document; + // Gets the latest version of the specified document. + get(documentId: string): Docs.Schema.Document; + // Gets the latest version of the specified document. + get(documentId: string, optionalArgs: object): Docs.Schema.Document; + } + } + namespace Schema { + export interface AutoText { + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTextStyleChanges?: object; + textStyle?: Docs.Schema.TextStyle; + type?: string; + } + export interface Background { + color?: Docs.Schema.OptionalColor; + } + export interface BackgroundSuggestionState { + backgroundColorSuggested?: boolean; + } + export interface BatchUpdateDocumentRequest { + requests?: Docs.Schema.Request[]; + writeControl?: Docs.Schema.WriteControl; + } + export interface BatchUpdateDocumentResponse { + documentId?: string; + replies?: Docs.Schema.Response[]; + writeControl?: Docs.Schema.WriteControl; + } + export interface Body { + content?: Docs.Schema.StructuralElement[]; + } + export interface Bullet { + listId?: string; + nestingLevel?: number; + textStyle?: Docs.Schema.TextStyle; + } + export interface BulletSuggestionState { + listIdSuggested?: boolean; + nestingLevelSuggested?: boolean; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; + } + export interface Color { + rgbColor?: Docs.Schema.RgbColor; + } + export interface ColumnBreak { + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTextStyleChanges?: object; + textStyle?: Docs.Schema.TextStyle; + } + export interface CreateNamedRangeRequest { + name?: string; + range?: Docs.Schema.Range; + } + export interface CreateNamedRangeResponse { + namedRangeId?: string; + } + export interface CreateParagraphBulletsRequest { + bulletPreset?: string; + range?: Docs.Schema.Range; + } + export interface CropProperties { + angle?: Number; + offsetBottom?: Number; + offsetLeft?: Number; + offsetRight?: Number; + offsetTop?: Number; + } + export interface CropPropertiesSuggestionState { + angleSuggested?: boolean; + offsetBottomSuggested?: boolean; + offsetLeftSuggested?: boolean; + offsetRightSuggested?: boolean; + offsetTopSuggested?: boolean; + } + export interface DeleteContentRangeRequest { + range?: Docs.Schema.Range; + } + export interface DeleteNamedRangeRequest { + name?: string; + namedRangeId?: string; + } + export interface DeleteParagraphBulletsRequest { + range?: Docs.Schema.Range; + } + export interface DeletePositionedObjectRequest { + objectId?: string; + } + export interface DeleteTableColumnRequest { + tableCellLocation?: Docs.Schema.TableCellLocation; + } + export interface DeleteTableRowRequest { + tableCellLocation?: Docs.Schema.TableCellLocation; + } + export interface Dimension { + magnitude?: Number; + unit?: string; + } + export interface Document { + body?: Docs.Schema.Body; + documentId?: string; + documentStyle?: Docs.Schema.DocumentStyle; + footers?: object; + footnotes?: object; + headers?: object; + inlineObjects?: object; + lists?: object; + namedRanges?: object; + namedStyles?: Docs.Schema.NamedStyles; + positionedObjects?: object; + revisionId?: string; + suggestedDocumentStyleChanges?: object; + suggestedNamedStylesChanges?: object; + suggestionsViewMode?: string; + title?: string; + } + export interface DocumentStyle { + background?: Docs.Schema.Background; + defaultFooterId?: string; + defaultHeaderId?: string; + evenPageFooterId?: string; + evenPageHeaderId?: string; + firstPageFooterId?: string; + firstPageHeaderId?: string; + marginBottom?: Docs.Schema.Dimension; + marginLeft?: Docs.Schema.Dimension; + marginRight?: Docs.Schema.Dimension; + marginTop?: Docs.Schema.Dimension; + pageNumberStart?: number; + pageSize?: Docs.Schema.Size; + useEvenPageHeaderFooter?: boolean; + useFirstPageHeaderFooter?: boolean; + } + export interface DocumentStyleSuggestionState { + backgroundSuggestionState?: Docs.Schema.BackgroundSuggestionState; + defaultFooterIdSuggested?: boolean; + defaultHeaderIdSuggested?: boolean; + evenPageFooterIdSuggested?: boolean; + evenPageHeaderIdSuggested?: boolean; + firstPageFooterIdSuggested?: boolean; + firstPageHeaderIdSuggested?: boolean; + marginBottomSuggested?: boolean; + marginLeftSuggested?: boolean; + marginRightSuggested?: boolean; + marginTopSuggested?: boolean; + pageNumberStartSuggested?: boolean; + pageSizeSuggestionState?: Docs.Schema.SizeSuggestionState; + useEvenPageHeaderFooterSuggested?: boolean; + useFirstPageHeaderFooterSuggested?: boolean; + } + export interface EmbeddedObject { + description?: string; + embeddedDrawingProperties?: any; + embeddedObjectBorder?: Docs.Schema.EmbeddedObjectBorder; + imageProperties?: Docs.Schema.ImageProperties; + linkedContentReference?: Docs.Schema.LinkedContentReference; + marginBottom?: Docs.Schema.Dimension; + marginLeft?: Docs.Schema.Dimension; + marginRight?: Docs.Schema.Dimension; + marginTop?: Docs.Schema.Dimension; + size?: Docs.Schema.Size; + title?: string; + } + export interface EmbeddedObjectBorder { + color?: Docs.Schema.OptionalColor; + dashStyle?: string; + propertyState?: string; + width?: Docs.Schema.Dimension; + } + export interface EmbeddedObjectBorderSuggestionState { + colorSuggested?: boolean; + dashStyleSuggested?: boolean; + propertyStateSuggested?: boolean; + widthSuggested?: boolean; + } + export interface EmbeddedObjectSuggestionState { + descriptionSuggested?: boolean; + embeddedDrawingPropertiesSuggestionState?: any; + embeddedObjectBorderSuggestionState?: Docs.Schema.EmbeddedObjectBorderSuggestionState; + imagePropertiesSuggestionState?: Docs.Schema.ImagePropertiesSuggestionState; + linkedContentReferenceSuggestionState?: Docs.Schema.LinkedContentReferenceSuggestionState; + marginBottomSuggested?: boolean; + marginLeftSuggested?: boolean; + marginRightSuggested?: boolean; + marginTopSuggested?: boolean; + sizeSuggestionState?: Docs.Schema.SizeSuggestionState; + titleSuggested?: boolean; + } + export interface EndOfSegmentLocation { + segmentId?: string; + } + export interface Equation { + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + } + export interface Footer { + content?: Docs.Schema.StructuralElement[]; + footerId?: string; + } + export interface Footnote { + content?: Docs.Schema.StructuralElement[]; + footnoteId?: string; + } + export interface FootnoteReference { + footnoteId?: string; + footnoteNumber?: string; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTextStyleChanges?: object; + textStyle?: Docs.Schema.TextStyle; + } + export interface Header { + content?: Docs.Schema.StructuralElement[]; + headerId?: string; + } + export interface HorizontalRule { + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTextStyleChanges?: object; + textStyle?: Docs.Schema.TextStyle; + } + export interface ImageProperties { + angle?: Number; + brightness?: Number; + contentUri?: string; + contrast?: Number; + cropProperties?: Docs.Schema.CropProperties; + sourceUri?: string; + transparency?: Number; + } + export interface ImagePropertiesSuggestionState { + angleSuggested?: boolean; + brightnessSuggested?: boolean; + contentUriSuggested?: boolean; + contrastSuggested?: boolean; + cropPropertiesSuggestionState?: Docs.Schema.CropPropertiesSuggestionState; + sourceUriSuggested?: boolean; + transparencySuggested?: boolean; + } + export interface InlineObject { + inlineObjectProperties?: Docs.Schema.InlineObjectProperties; + objectId?: string; + suggestedDeletionIds?: string[]; + suggestedInlineObjectPropertiesChanges?: object; + suggestedInsertionId?: string; + } + export interface InlineObjectElement { + inlineObjectId?: string; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTextStyleChanges?: object; + textStyle?: Docs.Schema.TextStyle; + } + export interface InlineObjectProperties { + embeddedObject?: Docs.Schema.EmbeddedObject; + } + export interface InlineObjectPropertiesSuggestionState { + embeddedObjectSuggestionState?: Docs.Schema.EmbeddedObjectSuggestionState; + } + export interface InsertInlineImageRequest { + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; + objectSize?: Docs.Schema.Size; + uri?: string; + } + export interface InsertInlineImageResponse { + objectId?: string; + } + export interface InsertInlineSheetsChartResponse { + objectId?: string; + } + export interface InsertPageBreakRequest { + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; + } + export interface InsertTableRequest { + columns?: number; + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; + rows?: number; + } + export interface InsertTableRowRequest { + insertBelow?: boolean; + tableCellLocation?: Docs.Schema.TableCellLocation; + } + export interface InsertTextRequest { + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; + text?: string; + } + export interface Link { + bookmarkId?: string; + headingId?: string; + url?: string; + } + export interface LinkedContentReference { + sheetsChartReference?: Docs.Schema.SheetsChartReference; + } + export interface LinkedContentReferenceSuggestionState { + sheetsChartReferenceSuggestionState?: Docs.Schema.SheetsChartReferenceSuggestionState; + } + export interface List { + listProperties?: Docs.Schema.ListProperties; + suggestedDeletionIds?: string[]; + suggestedInsertionId?: string; + suggestedListPropertiesChanges?: object; + } + export interface ListProperties { + nestingLevels?: Docs.Schema.NestingLevel[]; + } + export interface ListPropertiesSuggestionState { + nestingLevelsSuggestionStates?: Docs.Schema.NestingLevelSuggestionState[]; + } + export interface Location { + index?: number; + segmentId?: string; + } + export interface NamedRange { + name?: string; + namedRangeId?: string; + ranges?: Docs.Schema.Range[]; + } + export interface NamedRanges { + name?: string; + namedRanges?: Docs.Schema.NamedRange[]; + } + export interface NamedStyle { + namedStyleType?: string; + paragraphStyle?: Docs.Schema.ParagraphStyle; + textStyle?: Docs.Schema.TextStyle; + } + export interface NamedStyleSuggestionState { + namedStyleType?: string; + paragraphStyleSuggestionState?: Docs.Schema.ParagraphStyleSuggestionState; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; + } + export interface NamedStyles { + styles?: Docs.Schema.NamedStyle[]; + } + export interface NamedStylesSuggestionState { + stylesSuggestionStates?: Docs.Schema.NamedStyleSuggestionState[]; + } + export interface NestingLevel { + bulletAlignment?: string; + glyphFormat?: string; + glyphSymbol?: string; + glyphType?: string; + indentFirstLine?: Docs.Schema.Dimension; + indentStart?: Docs.Schema.Dimension; + startNumber?: number; + textStyle?: Docs.Schema.TextStyle; + } + export interface NestingLevelSuggestionState { + bulletAlignmentSuggested?: boolean; + glyphFormatSuggested?: boolean; + glyphSymbolSuggested?: boolean; + glyphTypeSuggested?: boolean; + indentFirstLineSuggested?: boolean; + indentStartSuggested?: boolean; + startNumberSuggested?: boolean; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; + } + export interface ObjectReferences { + objectIds?: string[]; + } + export interface OptionalColor { + color?: Docs.Schema.Color; + } + export interface PageBreak { + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTextStyleChanges?: object; + textStyle?: Docs.Schema.TextStyle; + } + export interface Paragraph { + bullet?: Docs.Schema.Bullet; + elements?: Docs.Schema.ParagraphElement[]; + paragraphStyle?: Docs.Schema.ParagraphStyle; + positionedObjectIds?: string[]; + suggestedBulletChanges?: object; + suggestedParagraphStyleChanges?: object; + suggestedPositionedObjectIds?: object; + } + export interface ParagraphBorder { + color?: Docs.Schema.OptionalColor; + dashStyle?: string; + padding?: Docs.Schema.Dimension; + width?: Docs.Schema.Dimension; + } + export interface ParagraphElement { + autoText?: Docs.Schema.AutoText; + columnBreak?: Docs.Schema.ColumnBreak; + endIndex?: number; + equation?: Docs.Schema.Equation; + footnoteReference?: Docs.Schema.FootnoteReference; + horizontalRule?: Docs.Schema.HorizontalRule; + inlineObjectElement?: Docs.Schema.InlineObjectElement; + pageBreak?: Docs.Schema.PageBreak; + startIndex?: number; + textRun?: Docs.Schema.TextRun; + } + export interface ParagraphStyle { + alignment?: string; + avoidWidowAndOrphan?: boolean; + borderBetween?: Docs.Schema.ParagraphBorder; + borderBottom?: Docs.Schema.ParagraphBorder; + borderLeft?: Docs.Schema.ParagraphBorder; + borderRight?: Docs.Schema.ParagraphBorder; + borderTop?: Docs.Schema.ParagraphBorder; + direction?: string; + headingId?: string; + indentEnd?: Docs.Schema.Dimension; + indentFirstLine?: Docs.Schema.Dimension; + indentStart?: Docs.Schema.Dimension; + keepLinesTogether?: boolean; + keepWithNext?: boolean; + lineSpacing?: Number; + namedStyleType?: string; + shading?: Docs.Schema.Shading; + spaceAbove?: Docs.Schema.Dimension; + spaceBelow?: Docs.Schema.Dimension; + spacingMode?: string; + tabStops?: Docs.Schema.TabStop[]; + } + export interface ParagraphStyleSuggestionState { + alignmentSuggested?: boolean; + avoidWidowAndOrphanSuggested?: boolean; + borderBetweenSuggested?: boolean; + borderBottomSuggested?: boolean; + borderLeftSuggested?: boolean; + borderRightSuggested?: boolean; + borderTopSuggested?: boolean; + directionSuggested?: boolean; + headingIdSuggested?: boolean; + indentEndSuggested?: boolean; + indentFirstLineSuggested?: boolean; + indentStartSuggested?: boolean; + keepLinesTogetherSuggested?: boolean; + keepWithNextSuggested?: boolean; + lineSpacingSuggested?: boolean; + namedStyleTypeSuggested?: boolean; + shadingSuggestionState?: Docs.Schema.ShadingSuggestionState; + spaceAboveSuggested?: boolean; + spaceBelowSuggested?: boolean; + spacingModeSuggested?: boolean; + } + export interface PositionedObject { + objectId?: string; + positionedObjectProperties?: Docs.Schema.PositionedObjectProperties; + suggestedDeletionIds?: string[]; + suggestedInsertionId?: string; + suggestedPositionedObjectPropertiesChanges?: object; + } + export interface PositionedObjectPositioning { + layout?: string; + leftOffset?: Docs.Schema.Dimension; + topOffset?: Docs.Schema.Dimension; + } + export interface PositionedObjectPositioningSuggestionState { + layoutSuggested?: boolean; + leftOffsetSuggested?: boolean; + topOffsetSuggested?: boolean; + } + export interface PositionedObjectProperties { + embeddedObject?: Docs.Schema.EmbeddedObject; + positioning?: Docs.Schema.PositionedObjectPositioning; + } + export interface PositionedObjectPropertiesSuggestionState { + embeddedObjectSuggestionState?: Docs.Schema.EmbeddedObjectSuggestionState; + positioningSuggestionState?: Docs.Schema.PositionedObjectPositioningSuggestionState; + } + export interface Range { + endIndex?: number; + segmentId?: string; + startIndex?: number; + } + export interface ReplaceAllTextRequest { + containsText?: Docs.Schema.SubstringMatchCriteria; + replaceText?: string; + } + export interface ReplaceAllTextResponse { + occurrencesChanged?: number; + } + export interface Request { + createNamedRange?: Docs.Schema.CreateNamedRangeRequest; + createParagraphBullets?: Docs.Schema.CreateParagraphBulletsRequest; + deleteContentRange?: Docs.Schema.DeleteContentRangeRequest; + deleteNamedRange?: Docs.Schema.DeleteNamedRangeRequest; + deleteParagraphBullets?: Docs.Schema.DeleteParagraphBulletsRequest; + deletePositionedObject?: Docs.Schema.DeletePositionedObjectRequest; + deleteTableColumn?: Docs.Schema.DeleteTableColumnRequest; + deleteTableRow?: Docs.Schema.DeleteTableRowRequest; + insertInlineImage?: Docs.Schema.InsertInlineImageRequest; + insertPageBreak?: Docs.Schema.InsertPageBreakRequest; + insertTable?: Docs.Schema.InsertTableRequest; + insertTableRow?: Docs.Schema.InsertTableRowRequest; + insertText?: Docs.Schema.InsertTextRequest; + replaceAllText?: Docs.Schema.ReplaceAllTextRequest; + updateParagraphStyle?: Docs.Schema.UpdateParagraphStyleRequest; + updateTextStyle?: Docs.Schema.UpdateTextStyleRequest; + } + export interface Response { + createNamedRange?: Docs.Schema.CreateNamedRangeResponse; + insertInlineImage?: Docs.Schema.InsertInlineImageResponse; + insertInlineSheetsChart?: Docs.Schema.InsertInlineSheetsChartResponse; + replaceAllText?: Docs.Schema.ReplaceAllTextResponse; + } + export interface RgbColor { + blue?: Number; + green?: Number; + red?: Number; + } + export interface SectionBreak { + sectionStyle?: Docs.Schema.SectionStyle; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + } + export interface SectionColumnProperties { + paddingEnd?: Docs.Schema.Dimension; + width?: Docs.Schema.Dimension; + } + export interface SectionStyle { + columnProperties?: Docs.Schema.SectionColumnProperties[]; + columnSeparatorStyle?: string; + contentDirection?: string; + } + export interface Shading { + backgroundColor?: Docs.Schema.OptionalColor; + } + export interface ShadingSuggestionState { + backgroundColorSuggested?: boolean; + } + export interface SheetsChartReference { + chartId?: number; + spreadsheetId?: string; + } + export interface SheetsChartReferenceSuggestionState { + chartIdSuggested?: boolean; + spreadsheetIdSuggested?: boolean; + } + export interface Size { + height?: Docs.Schema.Dimension; + width?: Docs.Schema.Dimension; + } + export interface SizeSuggestionState { + heightSuggested?: boolean; + widthSuggested?: boolean; + } + export interface StructuralElement { + endIndex?: number; + paragraph?: Docs.Schema.Paragraph; + sectionBreak?: Docs.Schema.SectionBreak; + startIndex?: number; + table?: Docs.Schema.Table; + tableOfContents?: Docs.Schema.TableOfContents; + } + export interface SubstringMatchCriteria { + matchCase?: boolean; + text?: string; + } + export interface SuggestedBullet { + bullet?: Docs.Schema.Bullet; + bulletSuggestionState?: Docs.Schema.BulletSuggestionState; + } + export interface SuggestedDocumentStyle { + documentStyle?: Docs.Schema.DocumentStyle; + documentStyleSuggestionState?: Docs.Schema.DocumentStyleSuggestionState; + } + export interface SuggestedInlineObjectProperties { + inlineObjectProperties?: Docs.Schema.InlineObjectProperties; + inlineObjectPropertiesSuggestionState?: Docs.Schema.InlineObjectPropertiesSuggestionState; + } + export interface SuggestedListProperties { + listProperties?: Docs.Schema.ListProperties; + listPropertiesSuggestionState?: Docs.Schema.ListPropertiesSuggestionState; + } + export interface SuggestedNamedStyles { + namedStyles?: Docs.Schema.NamedStyles; + namedStylesSuggestionState?: Docs.Schema.NamedStylesSuggestionState; + } + export interface SuggestedParagraphStyle { + paragraphStyle?: Docs.Schema.ParagraphStyle; + paragraphStyleSuggestionState?: Docs.Schema.ParagraphStyleSuggestionState; + } + export interface SuggestedPositionedObjectProperties { + positionedObjectProperties?: Docs.Schema.PositionedObjectProperties; + positionedObjectPropertiesSuggestionState?: Docs.Schema.PositionedObjectPropertiesSuggestionState; + } + export interface SuggestedTableCellStyle { + tableCellStyle?: Docs.Schema.TableCellStyle; + tableCellStyleSuggestionState?: Docs.Schema.TableCellStyleSuggestionState; + } + export interface SuggestedTableRowStyle { + tableRowStyle?: Docs.Schema.TableRowStyle; + tableRowStyleSuggestionState?: Docs.Schema.TableRowStyleSuggestionState; + } + export interface SuggestedTextStyle { + textStyle?: Docs.Schema.TextStyle; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; + } + export interface TabStop { + alignment?: string; + offset?: Docs.Schema.Dimension; + } + export interface Table { + columns?: number; + rows?: number; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + tableRows?: Docs.Schema.TableRow[]; + tableStyle?: Docs.Schema.TableStyle; + } + export interface TableCell { + content?: Docs.Schema.StructuralElement[]; + endIndex?: number; + startIndex?: number; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTableCellStyleChanges?: object; + tableCellStyle?: Docs.Schema.TableCellStyle; + } + export interface TableCellBorder { + color?: Docs.Schema.OptionalColor; + dashStyle?: string; + width?: Docs.Schema.Dimension; + } + export interface TableCellLocation { + columnIndex?: number; + rowIndex?: number; + tableStartLocation?: Docs.Schema.Location; + } + export interface TableCellStyle { + backgroundColor?: Docs.Schema.OptionalColor; + borderBottom?: Docs.Schema.TableCellBorder; + borderLeft?: Docs.Schema.TableCellBorder; + borderRight?: Docs.Schema.TableCellBorder; + borderTop?: Docs.Schema.TableCellBorder; + columnSpan?: number; + contentAlignment?: string; + paddingBottom?: Docs.Schema.Dimension; + paddingLeft?: Docs.Schema.Dimension; + paddingRight?: Docs.Schema.Dimension; + paddingTop?: Docs.Schema.Dimension; + rowSpan?: number; + } + export interface TableCellStyleSuggestionState { + backgroundColorSuggested?: boolean; + borderBottomSuggested?: boolean; + borderLeftSuggested?: boolean; + borderRightSuggested?: boolean; + borderTopSuggested?: boolean; + columnSpanSuggested?: boolean; + contentAlignmentSuggested?: boolean; + paddingBottomSuggested?: boolean; + paddingLeftSuggested?: boolean; + paddingRightSuggested?: boolean; + paddingTopSuggested?: boolean; + rowSpanSuggested?: boolean; + } + export interface TableColumnProperties { + width?: Docs.Schema.Dimension; + widthType?: string; + } + export interface TableOfContents { + content?: Docs.Schema.StructuralElement[]; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + } + export interface TableRow { + endIndex?: number; + startIndex?: number; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTableRowStyleChanges?: object; + tableCells?: Docs.Schema.TableCell[]; + tableRowStyle?: Docs.Schema.TableRowStyle; + } + export interface TableRowStyle { + minRowHeight?: Docs.Schema.Dimension; + } + export interface TableRowStyleSuggestionState { + minRowHeightSuggested?: boolean; + } + export interface TableStyle { + tableColumnProperties?: Docs.Schema.TableColumnProperties[]; + } + export interface TextRun { + content?: string; + suggestedDeletionIds?: string[]; + suggestedInsertionIds?: string[]; + suggestedTextStyleChanges?: object; + textStyle?: Docs.Schema.TextStyle; + } + export interface TextStyle { + backgroundColor?: Docs.Schema.OptionalColor; + baselineOffset?: string; + bold?: boolean; + fontSize?: Docs.Schema.Dimension; + foregroundColor?: Docs.Schema.OptionalColor; + italic?: boolean; + link?: Docs.Schema.Link; + smallCaps?: boolean; + strikethrough?: boolean; + underline?: boolean; + weightedFontFamily?: Docs.Schema.WeightedFontFamily; + } + export interface TextStyleSuggestionState { + backgroundColorSuggested?: boolean; + baselineOffsetSuggested?: boolean; + boldSuggested?: boolean; + fontSizeSuggested?: boolean; + foregroundColorSuggested?: boolean; + italicSuggested?: boolean; + linkSuggested?: boolean; + smallCapsSuggested?: boolean; + strikethroughSuggested?: boolean; + underlineSuggested?: boolean; + weightedFontFamilySuggested?: boolean; + } + export interface UpdateParagraphStyleRequest { + fields?: string; + paragraphStyle?: Docs.Schema.ParagraphStyle; + range?: Docs.Schema.Range; + } + export interface UpdateTextStyleRequest { + fields?: string; + range?: Docs.Schema.Range; + textStyle?: Docs.Schema.TextStyle; + } + export interface WeightedFontFamily { + fontFamily?: string; + weight?: number; + } + export interface WriteControl { + requiredRevisionId?: string; + targetRevisionId?: string; + } + } + } + export interface Docs { + Documents?: Docs.Collection.DocumentsCollection; + // Create a new instance of AutoText + newAutoText(): Docs.Schema.AutoText; + // Create a new instance of Background + newBackground(): Docs.Schema.Background; + // Create a new instance of BatchUpdateDocumentRequest + newBatchUpdateDocumentRequest(): Docs.Schema.BatchUpdateDocumentRequest; + // Create a new instance of Body + newBody(): Docs.Schema.Body; + // Create a new instance of Bullet + newBullet(): Docs.Schema.Bullet; + // Create a new instance of Color + newColor(): Docs.Schema.Color; + // Create a new instance of ColumnBreak + newColumnBreak(): Docs.Schema.ColumnBreak; + // Create a new instance of CreateNamedRangeRequest + newCreateNamedRangeRequest(): Docs.Schema.CreateNamedRangeRequest; + // Create a new instance of CreateParagraphBulletsRequest + newCreateParagraphBulletsRequest(): Docs.Schema.CreateParagraphBulletsRequest; + // Create a new instance of DeleteContentRangeRequest + newDeleteContentRangeRequest(): Docs.Schema.DeleteContentRangeRequest; + // Create a new instance of DeleteNamedRangeRequest + newDeleteNamedRangeRequest(): Docs.Schema.DeleteNamedRangeRequest; + // Create a new instance of DeleteParagraphBulletsRequest + newDeleteParagraphBulletsRequest(): Docs.Schema.DeleteParagraphBulletsRequest; + // Create a new instance of DeletePositionedObjectRequest + newDeletePositionedObjectRequest(): Docs.Schema.DeletePositionedObjectRequest; + // Create a new instance of DeleteTableColumnRequest + newDeleteTableColumnRequest(): Docs.Schema.DeleteTableColumnRequest; + // Create a new instance of DeleteTableRowRequest + newDeleteTableRowRequest(): Docs.Schema.DeleteTableRowRequest; + // Create a new instance of Dimension + newDimension(): Docs.Schema.Dimension; + // Create a new instance of Document + newDocument(): Docs.Schema.Document; + // Create a new instance of DocumentStyle + newDocumentStyle(): Docs.Schema.DocumentStyle; + // Create a new instance of EndOfSegmentLocation + newEndOfSegmentLocation(): Docs.Schema.EndOfSegmentLocation; + // Create a new instance of Equation + newEquation(): Docs.Schema.Equation; + // Create a new instance of FootnoteReference + newFootnoteReference(): Docs.Schema.FootnoteReference; + // Create a new instance of HorizontalRule + newHorizontalRule(): Docs.Schema.HorizontalRule; + // Create a new instance of InlineObjectElement + newInlineObjectElement(): Docs.Schema.InlineObjectElement; + // Create a new instance of InsertInlineImageRequest + newInsertInlineImageRequest(): Docs.Schema.InsertInlineImageRequest; + // Create a new instance of InsertPageBreakRequest + newInsertPageBreakRequest(): Docs.Schema.InsertPageBreakRequest; + // Create a new instance of InsertTableRequest + newInsertTableRequest(): Docs.Schema.InsertTableRequest; + // Create a new instance of InsertTableRowRequest + newInsertTableRowRequest(): Docs.Schema.InsertTableRowRequest; + // Create a new instance of InsertTextRequest + newInsertTextRequest(): Docs.Schema.InsertTextRequest; + // Create a new instance of Link + newLink(): Docs.Schema.Link; + // Create a new instance of Location + newLocation(): Docs.Schema.Location; + // Create a new instance of NamedStyle + newNamedStyle(): Docs.Schema.NamedStyle; + // Create a new instance of NamedStyles + newNamedStyles(): Docs.Schema.NamedStyles; + // Create a new instance of OptionalColor + newOptionalColor(): Docs.Schema.OptionalColor; + // Create a new instance of PageBreak + newPageBreak(): Docs.Schema.PageBreak; + // Create a new instance of Paragraph + newParagraph(): Docs.Schema.Paragraph; + // Create a new instance of ParagraphBorder + newParagraphBorder(): Docs.Schema.ParagraphBorder; + // Create a new instance of ParagraphElement + newParagraphElement(): Docs.Schema.ParagraphElement; + // Create a new instance of ParagraphStyle + newParagraphStyle(): Docs.Schema.ParagraphStyle; + // Create a new instance of Range + newRange(): Docs.Schema.Range; + // Create a new instance of ReplaceAllTextRequest + newReplaceAllTextRequest(): Docs.Schema.ReplaceAllTextRequest; + // Create a new instance of Request + newRequest(): Docs.Schema.Request; + // Create a new instance of RgbColor + newRgbColor(): Docs.Schema.RgbColor; + // Create a new instance of SectionBreak + newSectionBreak(): Docs.Schema.SectionBreak; + // Create a new instance of SectionColumnProperties + newSectionColumnProperties(): Docs.Schema.SectionColumnProperties; + // Create a new instance of SectionStyle + newSectionStyle(): Docs.Schema.SectionStyle; + // Create a new instance of Shading + newShading(): Docs.Schema.Shading; + // Create a new instance of Size + newSize(): Docs.Schema.Size; + // Create a new instance of StructuralElement + newStructuralElement(): Docs.Schema.StructuralElement; + // Create a new instance of SubstringMatchCriteria + newSubstringMatchCriteria(): Docs.Schema.SubstringMatchCriteria; + // Create a new instance of TabStop + newTabStop(): Docs.Schema.TabStop; + // Create a new instance of Table + newTable(): Docs.Schema.Table; + // Create a new instance of TableCell + newTableCell(): Docs.Schema.TableCell; + // Create a new instance of TableCellBorder + newTableCellBorder(): Docs.Schema.TableCellBorder; + // Create a new instance of TableCellLocation + newTableCellLocation(): Docs.Schema.TableCellLocation; + // Create a new instance of TableCellStyle + newTableCellStyle(): Docs.Schema.TableCellStyle; + // Create a new instance of TableColumnProperties + newTableColumnProperties(): Docs.Schema.TableColumnProperties; + // Create a new instance of TableOfContents + newTableOfContents(): Docs.Schema.TableOfContents; + // Create a new instance of TableRow + newTableRow(): Docs.Schema.TableRow; + // Create a new instance of TableRowStyle + newTableRowStyle(): Docs.Schema.TableRowStyle; + // Create a new instance of TableStyle + newTableStyle(): Docs.Schema.TableStyle; + // Create a new instance of TextRun + newTextRun(): Docs.Schema.TextRun; + // Create a new instance of TextStyle + newTextStyle(): Docs.Schema.TextStyle; + // Create a new instance of UpdateParagraphStyleRequest + newUpdateParagraphStyleRequest(): Docs.Schema.UpdateParagraphStyleRequest; + // Create a new instance of UpdateTextStyleRequest + newUpdateTextStyleRequest(): Docs.Schema.UpdateTextStyleRequest; + // Create a new instance of WeightedFontFamily + newWeightedFontFamily(): Docs.Schema.WeightedFontFamily; + // Create a new instance of WriteControl + newWriteControl(): Docs.Schema.WriteControl; + } +} + +declare var Docs: GoogleAppsScript.Docs; diff --git a/types/google-apps-script/apis/drive/v2.d.ts b/types/google-apps-script/apis/drive/v2.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/drive_v2.d.ts b/types/google-apps-script/apis/drive_v2.d.ts new file mode 100644 index 0000000000..9fd614bf16 --- /dev/null +++ b/types/google-apps-script/apis/drive_v2.d.ts @@ -0,0 +1,836 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Drive { + namespace Collection { + export interface AboutCollection { + // Gets the information about the current user along with Drive API settings + get(): Drive.Schema.About; + // Gets the information about the current user along with Drive API settings + get(optionalArgs: object): Drive.Schema.About; + } + export interface AppsCollection { + // Gets a specific app. + get(appId: string): Drive.Schema.App; + // Lists a user's installed apps. + list(): Drive.Schema.AppList; + // Lists a user's installed apps. + list(optionalArgs: object): Drive.Schema.AppList; + } + export interface ChangesCollection { + // Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes. + get(changeId: string): Drive.Schema.Change; + // Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes. + get(changeId: string, optionalArgs: object): Drive.Schema.Change; + // Gets the starting pageToken for listing future changes. + getStartPageToken(): Drive.Schema.StartPageToken; + // Gets the starting pageToken for listing future changes. + getStartPageToken(optionalArgs: object): Drive.Schema.StartPageToken; + // Lists the changes for a user or Team Drive. + list(): Drive.Schema.ChangeList; + // Lists the changes for a user or Team Drive. + list(optionalArgs: object): Drive.Schema.ChangeList; + // Subscribe to changes for a user. + watch(resource: Schema.Channel): Drive.Schema.Channel; + // Subscribe to changes for a user. + watch(resource: Schema.Channel, optionalArgs: object): Drive.Schema.Channel; + } + export interface ChannelsCollection { + // Stop watching resources through this channel + stop(resource: Schema.Channel): void; + } + export interface ChildrenCollection { + // Gets a specific child reference. + get(folderId: string, childId: string): Drive.Schema.ChildReference; + // Inserts a file into a folder. + insert(resource: Schema.ChildReference, folderId: string): Drive.Schema.ChildReference; + // Inserts a file into a folder. + insert(resource: Schema.ChildReference, folderId: string, optionalArgs: object): Drive.Schema.ChildReference; + // Lists a folder's children. + list(folderId: string): Drive.Schema.ChildList; + // Lists a folder's children. + list(folderId: string, optionalArgs: object): Drive.Schema.ChildList; + // Removes a child from a folder. + remove(folderId: string, childId: string): void; + } + export interface CommentsCollection { + // Gets a comment by ID. + get(fileId: string, commentId: string): Drive.Schema.Comment; + // Gets a comment by ID. + get(fileId: string, commentId: string, optionalArgs: object): Drive.Schema.Comment; + // Creates a new comment on the given file. + insert(resource: Schema.Comment, fileId: string): Drive.Schema.Comment; + // Lists a file's comments. + list(fileId: string): Drive.Schema.CommentList; + // Lists a file's comments. + list(fileId: string, optionalArgs: object): Drive.Schema.CommentList; + // Updates an existing comment. This method supports patch semantics. + patch(resource: Schema.Comment, fileId: string, commentId: string): Drive.Schema.Comment; + // Deletes a comment. + remove(fileId: string, commentId: string): void; + // Updates an existing comment. + update(resource: Schema.Comment, fileId: string, commentId: string): Drive.Schema.Comment; + } + export interface FilesCollection { + // Creates a copy of the specified file. + copy(resource: Schema.File, fileId: string): Drive.Schema.File; + // Creates a copy of the specified file. + copy(resource: Schema.File, fileId: string, optionalArgs: object): Drive.Schema.File; + // Permanently deletes all of the user's trashed files. + emptyTrash(): void; + // Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. + export(fileId: string, mimeType: string): void; + // Generates a set of file IDs which can be provided in insert requests. + generateIds(): Drive.Schema.GeneratedIds; + // Generates a set of file IDs which can be provided in insert requests. + generateIds(optionalArgs: object): Drive.Schema.GeneratedIds; + // Gets a file's metadata by ID. + get(fileId: string): Drive.Schema.File; + // Gets a file's metadata by ID. + get(fileId: string, optionalArgs: object): Drive.Schema.File; + // Insert a new file. + insert(resource: Schema.File): Drive.Schema.File; + // Insert a new file. + insert(resource: Schema.File, mediaData: any): Drive.Schema.File; + // Insert a new file. + insert(resource: Schema.File, mediaData: any, optionalArgs: object): Drive.Schema.File; + // Lists the user's files. + list(): Drive.Schema.FileList; + // Lists the user's files. + list(optionalArgs: object): Drive.Schema.FileList; + // Updates file metadata and/or content. This method supports patch semantics. + patch(resource: Schema.File, fileId: string): Drive.Schema.File; + // Updates file metadata and/or content. This method supports patch semantics. + patch(resource: Schema.File, fileId: string, optionalArgs: object): Drive.Schema.File; + // Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. + remove(fileId: string): void; + // Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. + remove(fileId: string, optionalArgs: object): void; + // Set the file's updated time to the current server time. + touch(fileId: string): Drive.Schema.File; + // Set the file's updated time to the current server time. + touch(fileId: string, optionalArgs: object): Drive.Schema.File; + // Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for Team Drive files. + trash(fileId: string): Drive.Schema.File; + // Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for Team Drive files. + trash(fileId: string, optionalArgs: object): Drive.Schema.File; + // Restores a file from the trash. + untrash(fileId: string): Drive.Schema.File; + // Restores a file from the trash. + untrash(fileId: string, optionalArgs: object): Drive.Schema.File; + // Updates file metadata and/or content. + update(resource: Schema.File, fileId: string): Drive.Schema.File; + // Updates file metadata and/or content. + update(resource: Schema.File, fileId: string, mediaData: any): Drive.Schema.File; + // Updates file metadata and/or content. + update(resource: Schema.File, fileId: string, mediaData: any, optionalArgs: object): Drive.Schema.File; + // Subscribe to changes on a file + watch(resource: Schema.Channel, fileId: string): Drive.Schema.Channel; + // Subscribe to changes on a file + watch(resource: Schema.Channel, fileId: string, optionalArgs: object): Drive.Schema.Channel; + } + export interface ParentsCollection { + // Gets a specific parent reference. + get(fileId: string, parentId: string): Drive.Schema.ParentReference; + // Adds a parent folder for a file. + insert(resource: Schema.ParentReference, fileId: string): Drive.Schema.ParentReference; + // Adds a parent folder for a file. + insert(resource: Schema.ParentReference, fileId: string, optionalArgs: object): Drive.Schema.ParentReference; + // Lists a file's parents. + list(fileId: string): Drive.Schema.ParentList; + // Removes a parent from a file. + remove(fileId: string, parentId: string): void; + } + export interface PermissionsCollection { + // Gets a permission by ID. + get(fileId: string, permissionId: string): Drive.Schema.Permission; + // Gets a permission by ID. + get(fileId: string, permissionId: string, optionalArgs: object): Drive.Schema.Permission; + // Returns the permission ID for an email address. + getIdForEmail(email: string): Drive.Schema.PermissionId; + // Inserts a permission for a file or Team Drive. + insert(resource: Schema.Permission, fileId: string): Drive.Schema.Permission; + // Inserts a permission for a file or Team Drive. + insert(resource: Schema.Permission, fileId: string, optionalArgs: object): Drive.Schema.Permission; + // Lists a file's or Team Drive's permissions. + list(fileId: string): Drive.Schema.PermissionList; + // Lists a file's or Team Drive's permissions. + list(fileId: string, optionalArgs: object): Drive.Schema.PermissionList; + // Updates a permission using patch semantics. + patch(resource: Schema.Permission, fileId: string, permissionId: string): Drive.Schema.Permission; + // Updates a permission using patch semantics. + patch(resource: Schema.Permission, fileId: string, permissionId: string, optionalArgs: object): Drive.Schema.Permission; + // Deletes a permission from a file or Team Drive. + remove(fileId: string, permissionId: string): void; + // Deletes a permission from a file or Team Drive. + remove(fileId: string, permissionId: string, optionalArgs: object): void; + // Updates a permission. + update(resource: Schema.Permission, fileId: string, permissionId: string): Drive.Schema.Permission; + // Updates a permission. + update(resource: Schema.Permission, fileId: string, permissionId: string, optionalArgs: object): Drive.Schema.Permission; + } + export interface PropertiesCollection { + // Gets a property by its key. + get(fileId: string, propertyKey: string): Drive.Schema.Property; + // Gets a property by its key. + get(fileId: string, propertyKey: string, optionalArgs: object): Drive.Schema.Property; + // Adds a property to a file, or updates it if it already exists. + insert(resource: Schema.Property, fileId: string): Drive.Schema.Property; + // Lists a file's properties. + list(fileId: string): Drive.Schema.PropertyList; + // Updates a property. + patch(resource: Schema.Property, fileId: string, propertyKey: string): Drive.Schema.Property; + // Updates a property. + patch(resource: Schema.Property, fileId: string, propertyKey: string, optionalArgs: object): Drive.Schema.Property; + // Deletes a property. + remove(fileId: string, propertyKey: string): void; + // Deletes a property. + remove(fileId: string, propertyKey: string, optionalArgs: object): void; + // Updates a property. + update(resource: Schema.Property, fileId: string, propertyKey: string): Drive.Schema.Property; + // Updates a property. + update(resource: Schema.Property, fileId: string, propertyKey: string, optionalArgs: object): Drive.Schema.Property; + } + export interface RealtimeCollection { + // Exports the contents of the Realtime API data model associated with this file as JSON. + get(fileId: string): void; + // Exports the contents of the Realtime API data model associated with this file as JSON. + get(fileId: string, optionalArgs: object): void; + // Overwrites the Realtime API data model associated with this file with the provided JSON data model. + update(fileId: string): void; + // Overwrites the Realtime API data model associated with this file with the provided JSON data model. + update(fileId: string, mediaData: any): void; + // Overwrites the Realtime API data model associated with this file with the provided JSON data model. + update(fileId: string, mediaData: any, optionalArgs: object): void; + } + export interface RepliesCollection { + // Gets a reply. + get(fileId: string, commentId: string, replyId: string): Drive.Schema.CommentReply; + // Gets a reply. + get(fileId: string, commentId: string, replyId: string, optionalArgs: object): Drive.Schema.CommentReply; + // Creates a new reply to the given comment. + insert(resource: Schema.CommentReply, fileId: string, commentId: string): Drive.Schema.CommentReply; + // Lists all of the replies to a comment. + list(fileId: string, commentId: string): Drive.Schema.CommentReplyList; + // Lists all of the replies to a comment. + list(fileId: string, commentId: string, optionalArgs: object): Drive.Schema.CommentReplyList; + // Updates an existing reply. This method supports patch semantics. + patch(resource: Schema.CommentReply, fileId: string, commentId: string, replyId: string): Drive.Schema.CommentReply; + // Deletes a reply. + remove(fileId: string, commentId: string, replyId: string): void; + // Updates an existing reply. + update(resource: Schema.CommentReply, fileId: string, commentId: string, replyId: string): Drive.Schema.CommentReply; + } + export interface RevisionsCollection { + // Gets a specific revision. + get(fileId: string, revisionId: string): Drive.Schema.Revision; + // Lists a file's revisions. + list(fileId: string): Drive.Schema.RevisionList; + // Lists a file's revisions. + list(fileId: string, optionalArgs: object): Drive.Schema.RevisionList; + // Updates a revision. This method supports patch semantics. + patch(resource: Schema.Revision, fileId: string, revisionId: string): Drive.Schema.Revision; + // Permanently deletes a file version. You can only delete revisions for files with binary content, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. + remove(fileId: string, revisionId: string): void; + // Updates a revision. + update(resource: Schema.Revision, fileId: string, revisionId: string): Drive.Schema.Revision; + } + export interface TeamdrivesCollection { + // Gets a Team Drive's metadata by ID. + get(teamDriveId: string): Drive.Schema.TeamDrive; + // Gets a Team Drive's metadata by ID. + get(teamDriveId: string, optionalArgs: object): Drive.Schema.TeamDrive; + // Creates a new Team Drive. + insert(resource: Schema.TeamDrive, requestId: string): Drive.Schema.TeamDrive; + // Lists the user's Team Drives. + list(): Drive.Schema.TeamDriveList; + // Lists the user's Team Drives. + list(optionalArgs: object): Drive.Schema.TeamDriveList; + // Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. + remove(teamDriveId: string): void; + // Updates a Team Drive's metadata + update(resource: Schema.TeamDrive, teamDriveId: string): Drive.Schema.TeamDrive; + // Updates a Team Drive's metadata + update(resource: Schema.TeamDrive, teamDriveId: string, optionalArgs: object): Drive.Schema.TeamDrive; + } + } + namespace Schema { + export interface About { + additionalRoleInfo?: Drive.Schema.AboutAdditionalRoleInfo[]; + canCreateTeamDrives?: boolean; + domainSharingPolicy?: string; + etag?: string; + exportFormats?: Drive.Schema.AboutExportFormats[]; + features?: Drive.Schema.AboutFeatures[]; + folderColorPalette?: string[]; + importFormats?: Drive.Schema.AboutImportFormats[]; + isCurrentAppInstalled?: boolean; + kind?: string; + languageCode?: string; + largestChangeId?: string; + maxUploadSizes?: Drive.Schema.AboutMaxUploadSizes[]; + name?: string; + permissionId?: string; + quotaBytesByService?: Drive.Schema.AboutQuotaBytesByService[]; + quotaBytesTotal?: string; + quotaBytesUsed?: string; + quotaBytesUsedAggregate?: string; + quotaBytesUsedInTrash?: string; + quotaType?: string; + remainingChangeIds?: string; + rootFolderId?: string; + selfLink?: string; + teamDriveThemes?: Drive.Schema.AboutTeamDriveThemes[]; + user?: Drive.Schema.User; + } + export interface AboutAdditionalRoleInfo { + roleSets?: Drive.Schema.AboutAdditionalRoleInfoRoleSets[]; + type?: string; + } + export interface AboutAdditionalRoleInfoRoleSets { + additionalRoles?: string[]; + primaryRole?: string; + } + export interface AboutExportFormats { + source?: string; + targets?: string[]; + } + export interface AboutFeatures { + featureName?: string; + featureRate?: Number; + } + export interface AboutImportFormats { + source?: string; + targets?: string[]; + } + export interface AboutMaxUploadSizes { + size?: string; + type?: string; + } + export interface AboutQuotaBytesByService { + bytesUsed?: string; + serviceName?: string; + } + export interface AboutTeamDriveThemes { + backgroundImageLink?: string; + colorRgb?: string; + id?: string; + } + export interface App { + authorized?: boolean; + createInFolderTemplate?: string; + createUrl?: string; + hasDriveWideScope?: boolean; + icons?: Drive.Schema.AppIcons[]; + id?: string; + installed?: boolean; + kind?: string; + longDescription?: string; + name?: string; + objectType?: string; + openUrlTemplate?: string; + primaryFileExtensions?: string[]; + primaryMimeTypes?: string[]; + productId?: string; + productUrl?: string; + secondaryFileExtensions?: string[]; + secondaryMimeTypes?: string[]; + shortDescription?: string; + supportsCreate?: boolean; + supportsImport?: boolean; + supportsMultiOpen?: boolean; + supportsOfflineCreate?: boolean; + useByDefault?: boolean; + } + export interface AppIcons { + category?: string; + iconUrl?: string; + size?: number; + } + export interface AppList { + defaultAppIds?: string[]; + etag?: string; + items?: Drive.Schema.App[]; + kind?: string; + selfLink?: string; + } + export interface Change { + deleted?: boolean; + file?: Drive.Schema.File; + fileId?: string; + id?: string; + kind?: string; + modificationDate?: string; + selfLink?: string; + teamDrive?: Drive.Schema.TeamDrive; + teamDriveId?: string; + type?: string; + } + export interface ChangeList { + etag?: string; + items?: Drive.Schema.Change[]; + kind?: string; + largestChangeId?: string; + newStartPageToken?: string; + nextLink?: string; + nextPageToken?: string; + selfLink?: string; + } + export interface Channel { + address?: string; + expiration?: string; + id?: string; + kind?: string; + params?: object; + payload?: boolean; + resourceId?: string; + resourceUri?: string; + token?: string; + type?: string; + } + export interface ChildList { + etag?: string; + items?: Drive.Schema.ChildReference[]; + kind?: string; + nextLink?: string; + nextPageToken?: string; + selfLink?: string; + } + export interface ChildReference { + childLink?: string; + id?: string; + kind?: string; + selfLink?: string; + } + export interface Comment { + anchor?: string; + author?: Drive.Schema.User; + commentId?: string; + content?: string; + context?: Drive.Schema.CommentContext; + createdDate?: string; + deleted?: boolean; + fileId?: string; + fileTitle?: string; + htmlContent?: string; + kind?: string; + modifiedDate?: string; + replies?: Drive.Schema.CommentReply[]; + selfLink?: string; + status?: string; + } + export interface CommentContext { + type?: string; + value?: string; + } + export interface CommentList { + items?: Drive.Schema.Comment[]; + kind?: string; + nextLink?: string; + nextPageToken?: string; + selfLink?: string; + } + export interface CommentReply { + author?: Drive.Schema.User; + content?: string; + createdDate?: string; + deleted?: boolean; + htmlContent?: string; + kind?: string; + modifiedDate?: string; + replyId?: string; + verb?: string; + } + export interface CommentReplyList { + items?: Drive.Schema.CommentReply[]; + kind?: string; + nextLink?: string; + nextPageToken?: string; + selfLink?: string; + } + export interface File { + alternateLink?: string; + appDataContents?: boolean; + canComment?: boolean; + canReadRevisions?: boolean; + capabilities?: Drive.Schema.FileCapabilities; + copyRequiresWriterPermission?: boolean; + copyable?: boolean; + createdDate?: string; + defaultOpenWithLink?: string; + description?: string; + downloadUrl?: string; + editable?: boolean; + embedLink?: string; + etag?: string; + explicitlyTrashed?: boolean; + exportLinks?: object; + fileExtension?: string; + fileSize?: string; + folderColorRgb?: string; + fullFileExtension?: string; + hasAugmentedPermissions?: boolean; + hasThumbnail?: boolean; + headRevisionId?: string; + iconLink?: string; + id?: string; + imageMediaMetadata?: Drive.Schema.FileImageMediaMetadata; + indexableText?: Drive.Schema.FileIndexableText; + isAppAuthorized?: boolean; + kind?: string; + labels?: Drive.Schema.FileLabels; + lastModifyingUser?: Drive.Schema.User; + lastModifyingUserName?: string; + lastViewedByMeDate?: string; + markedViewedByMeDate?: string; + md5Checksum?: string; + mimeType?: string; + modifiedByMeDate?: string; + modifiedDate?: string; + openWithLinks?: object; + originalFilename?: string; + ownedByMe?: boolean; + ownerNames?: string[]; + owners?: Drive.Schema.User[]; + parents?: Drive.Schema.ParentReference[]; + permissionIds?: string[]; + permissions?: Drive.Schema.Permission[]; + properties?: Drive.Schema.Property[]; + quotaBytesUsed?: string; + selfLink?: string; + shareable?: boolean; + shared?: boolean; + sharedWithMeDate?: string; + sharingUser?: Drive.Schema.User; + spaces?: string[]; + teamDriveId?: string; + thumbnail?: Drive.Schema.FileThumbnail; + thumbnailLink?: string; + thumbnailVersion?: string; + title?: string; + trashedDate?: string; + trashingUser?: Drive.Schema.User; + userPermission?: Drive.Schema.Permission; + version?: string; + videoMediaMetadata?: Drive.Schema.FileVideoMediaMetadata; + webContentLink?: string; + webViewLink?: string; + writersCanShare?: boolean; + } + export interface FileCapabilities { + canAddChildren?: boolean; + canChangeCopyRequiresWriterPermission?: boolean; + canChangeRestrictedDownload?: boolean; + canComment?: boolean; + canCopy?: boolean; + canDelete?: boolean; + canDeleteChildren?: boolean; + canDownload?: boolean; + canEdit?: boolean; + canListChildren?: boolean; + canMoveChildrenOutOfTeamDrive?: boolean; + canMoveChildrenWithinTeamDrive?: boolean; + canMoveItemIntoTeamDrive?: boolean; + canMoveItemOutOfTeamDrive?: boolean; + canMoveItemWithinTeamDrive?: boolean; + canMoveTeamDriveItem?: boolean; + canReadRevisions?: boolean; + canReadTeamDrive?: boolean; + canRemoveChildren?: boolean; + canRename?: boolean; + canShare?: boolean; + canTrash?: boolean; + canTrashChildren?: boolean; + canUntrash?: boolean; + } + export interface FileImageMediaMetadata { + aperture?: Number; + cameraMake?: string; + cameraModel?: string; + colorSpace?: string; + date?: string; + exposureBias?: Number; + exposureMode?: string; + exposureTime?: Number; + flashUsed?: boolean; + focalLength?: Number; + height?: number; + isoSpeed?: number; + lens?: string; + location?: Drive.Schema.FileImageMediaMetadataLocation; + maxApertureValue?: Number; + meteringMode?: string; + rotation?: number; + sensor?: string; + subjectDistance?: number; + whiteBalance?: string; + width?: number; + } + export interface FileImageMediaMetadataLocation { + altitude?: Number; + latitude?: Number; + longitude?: Number; + } + export interface FileIndexableText { + text?: string; + } + export interface FileLabels { + hidden?: boolean; + modified?: boolean; + restricted?: boolean; + starred?: boolean; + trashed?: boolean; + viewed?: boolean; + } + export interface FileList { + etag?: string; + incompleteSearch?: boolean; + items?: Drive.Schema.File[]; + kind?: string; + nextLink?: string; + nextPageToken?: string; + selfLink?: string; + } + export interface FileThumbnail { + image?: string; + mimeType?: string; + } + export interface FileVideoMediaMetadata { + durationMillis?: string; + height?: number; + width?: number; + } + export interface GeneratedIds { + ids?: string[]; + kind?: string; + space?: string; + } + export interface ParentList { + etag?: string; + items?: Drive.Schema.ParentReference[]; + kind?: string; + selfLink?: string; + } + export interface ParentReference { + id?: string; + isRoot?: boolean; + kind?: string; + parentLink?: string; + selfLink?: string; + } + export interface Permission { + additionalRoles?: string[]; + authKey?: string; + deleted?: boolean; + domain?: string; + emailAddress?: string; + etag?: string; + expirationDate?: string; + id?: string; + kind?: string; + name?: string; + photoLink?: string; + role?: string; + selfLink?: string; + teamDrivePermissionDetails?: Drive.Schema.PermissionTeamDrivePermissionDetails[]; + type?: string; + value?: string; + withLink?: boolean; + } + export interface PermissionId { + id?: string; + kind?: string; + } + export interface PermissionList { + etag?: string; + items?: Drive.Schema.Permission[]; + kind?: string; + nextPageToken?: string; + selfLink?: string; + } + export interface PermissionTeamDrivePermissionDetails { + additionalRoles?: string[]; + inherited?: boolean; + inheritedFrom?: string; + role?: string; + teamDrivePermissionType?: string; + } + export interface Property { + etag?: string; + key?: string; + kind?: string; + selfLink?: string; + value?: string; + visibility?: string; + } + export interface PropertyList { + etag?: string; + items?: Drive.Schema.Property[]; + kind?: string; + selfLink?: string; + } + export interface Revision { + downloadUrl?: string; + etag?: string; + exportLinks?: object; + fileSize?: string; + id?: string; + kind?: string; + lastModifyingUser?: Drive.Schema.User; + lastModifyingUserName?: string; + md5Checksum?: string; + mimeType?: string; + modifiedDate?: string; + originalFilename?: string; + pinned?: boolean; + publishAuto?: boolean; + published?: boolean; + publishedLink?: string; + publishedOutsideDomain?: boolean; + selfLink?: string; + } + export interface RevisionList { + etag?: string; + items?: Drive.Schema.Revision[]; + kind?: string; + nextPageToken?: string; + selfLink?: string; + } + export interface StartPageToken { + kind?: string; + startPageToken?: string; + } + export interface TeamDrive { + backgroundImageFile?: Drive.Schema.TeamDriveBackgroundImageFile; + backgroundImageLink?: string; + capabilities?: Drive.Schema.TeamDriveCapabilities; + colorRgb?: string; + createdDate?: string; + id?: string; + kind?: string; + name?: string; + restrictions?: Drive.Schema.TeamDriveRestrictions; + themeId?: string; + } + export interface TeamDriveBackgroundImageFile { + id?: string; + width?: Number; + xCoordinate?: Number; + yCoordinate?: Number; + } + export interface TeamDriveCapabilities { + canAddChildren?: boolean; + canChangeCopyRequiresWriterPermissionRestriction?: boolean; + canChangeDomainUsersOnlyRestriction?: boolean; + canChangeTeamDriveBackground?: boolean; + canChangeTeamMembersOnlyRestriction?: boolean; + canComment?: boolean; + canCopy?: boolean; + canDeleteChildren?: boolean; + canDeleteTeamDrive?: boolean; + canDownload?: boolean; + canEdit?: boolean; + canListChildren?: boolean; + canManageMembers?: boolean; + canReadRevisions?: boolean; + canRemoveChildren?: boolean; + canRename?: boolean; + canRenameTeamDrive?: boolean; + canShare?: boolean; + canTrashChildren?: boolean; + } + export interface TeamDriveList { + items?: Drive.Schema.TeamDrive[]; + kind?: string; + nextPageToken?: string; + } + export interface TeamDriveRestrictions { + adminManagedRestrictions?: boolean; + copyRequiresWriterPermission?: boolean; + domainUsersOnly?: boolean; + teamMembersOnly?: boolean; + } + export interface User { + displayName?: string; + emailAddress?: string; + isAuthenticatedUser?: boolean; + kind?: string; + permissionId?: string; + picture?: Drive.Schema.UserPicture; + } + export interface UserPicture { + url?: string; + } + } + } + export interface Drive { + About?: Drive.Collection.AboutCollection; + Apps?: Drive.Collection.AppsCollection; + Changes?: Drive.Collection.ChangesCollection; + Channels?: Drive.Collection.ChannelsCollection; + Children?: Drive.Collection.ChildrenCollection; + Comments?: Drive.Collection.CommentsCollection; + Files?: Drive.Collection.FilesCollection; + Parents?: Drive.Collection.ParentsCollection; + Permissions?: Drive.Collection.PermissionsCollection; + Properties?: Drive.Collection.PropertiesCollection; + Realtime?: Drive.Collection.RealtimeCollection; + Replies?: Drive.Collection.RepliesCollection; + Revisions?: Drive.Collection.RevisionsCollection; + Teamdrives?: Drive.Collection.TeamdrivesCollection; + // Create a new instance of Channel + newChannel(): Drive.Schema.Channel; + // Create a new instance of ChildReference + newChildReference(): Drive.Schema.ChildReference; + // Create a new instance of Comment + newComment(): Drive.Schema.Comment; + // Create a new instance of CommentContext + newCommentContext(): Drive.Schema.CommentContext; + // Create a new instance of CommentReply + newCommentReply(): Drive.Schema.CommentReply; + // Create a new instance of File + newFile(): Drive.Schema.File; + // Create a new instance of FileCapabilities + newFileCapabilities(): Drive.Schema.FileCapabilities; + // Create a new instance of FileImageMediaMetadata + newFileImageMediaMetadata(): Drive.Schema.FileImageMediaMetadata; + // Create a new instance of FileImageMediaMetadataLocation + newFileImageMediaMetadataLocation(): Drive.Schema.FileImageMediaMetadataLocation; + // Create a new instance of FileIndexableText + newFileIndexableText(): Drive.Schema.FileIndexableText; + // Create a new instance of FileLabels + newFileLabels(): Drive.Schema.FileLabels; + // Create a new instance of FileThumbnail + newFileThumbnail(): Drive.Schema.FileThumbnail; + // Create a new instance of FileVideoMediaMetadata + newFileVideoMediaMetadata(): Drive.Schema.FileVideoMediaMetadata; + // Create a new instance of ParentReference + newParentReference(): Drive.Schema.ParentReference; + // Create a new instance of Permission + newPermission(): Drive.Schema.Permission; + // Create a new instance of PermissionTeamDrivePermissionDetails + newPermissionTeamDrivePermissionDetails(): Drive.Schema.PermissionTeamDrivePermissionDetails; + // Create a new instance of Property + newProperty(): Drive.Schema.Property; + // Create a new instance of Revision + newRevision(): Drive.Schema.Revision; + // Create a new instance of TeamDrive + newTeamDrive(): Drive.Schema.TeamDrive; + // Create a new instance of TeamDriveBackgroundImageFile + newTeamDriveBackgroundImageFile(): Drive.Schema.TeamDriveBackgroundImageFile; + // Create a new instance of TeamDriveCapabilities + newTeamDriveCapabilities(): Drive.Schema.TeamDriveCapabilities; + // Create a new instance of TeamDriveRestrictions + newTeamDriveRestrictions(): Drive.Schema.TeamDriveRestrictions; + // Create a new instance of User + newUser(): Drive.Schema.User; + // Create a new instance of UserPicture + newUserPicture(): Drive.Schema.UserPicture; + } +} + +declare var Drive: GoogleAppsScript.Drive; diff --git a/types/google-apps-script/apis/driveactivity_v2.d.ts b/types/google-apps-script/apis/driveactivity_v2.d.ts new file mode 100644 index 0000000000..4f670fc108 --- /dev/null +++ b/types/google-apps-script/apis/driveactivity_v2.d.ts @@ -0,0 +1,217 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace DriveActivity { + namespace Collection { + export interface ActivityCollection { + // Query past activity in Google Drive. + query(resource: Schema.QueryDriveActivityRequest): DriveActivity.Schema.QueryDriveActivityResponse; + } + } + namespace Schema { + export interface Action { + actor?: DriveActivity.Schema.Actor; + detail?: DriveActivity.Schema.ActionDetail; + target?: DriveActivity.Schema.Target; + timeRange?: DriveActivity.Schema.TimeRange; + timestamp?: string; + } + export interface ActionDetail { + comment?: DriveActivity.Schema.Comment; + create?: DriveActivity.Schema.Create; + delete?: DriveActivity.Schema.Delete; + dlpChange?: DriveActivity.Schema.DataLeakPreventionChange; + edit?: any; + move?: DriveActivity.Schema.Move; + permissionChange?: DriveActivity.Schema.PermissionChange; + reference?: DriveActivity.Schema.ApplicationReference; + rename?: DriveActivity.Schema.Rename; + restore?: DriveActivity.Schema.Restore; + settingsChange?: DriveActivity.Schema.SettingsChange; + } + export interface Actor { + administrator?: string; + anonymous?: string; + impersonation?: DriveActivity.Schema.Impersonation; + system?: DriveActivity.Schema.SystemEvent; + user?: DriveActivity.Schema.User; + } + export interface ApplicationReference { + type?: string; + } + export interface Assignment { + subtype?: string; + } + export interface Comment { + assignment?: DriveActivity.Schema.Assignment; + mentionedUsers?: DriveActivity.Schema.User[]; + post?: DriveActivity.Schema.Post; + suggestion?: DriveActivity.Schema.Suggestion; + } + export interface ConsolidationStrategy { + legacy?: any; + none?: any; + } + export interface Copy { + originalObject?: DriveActivity.Schema.TargetReference; + } + export interface Create { + copy?: DriveActivity.Schema.Copy; + new?: any; + upload?: any; + } + export interface DataLeakPreventionChange { + type?: string; + } + export interface Delete { + type?: string; + } + export interface Domain { + legacyId?: string; + name?: string; + } + export interface DriveActivity { + actions?: DriveActivity.Schema.Action[]; + actors?: DriveActivity.Schema.Actor[]; + primaryActionDetail?: DriveActivity.Schema.ActionDetail; + targets?: DriveActivity.Schema.Target[]; + timeRange?: DriveActivity.Schema.TimeRange; + timestamp?: string; + } + export interface DriveItem { + file?: any; + folder?: DriveActivity.Schema.Folder; + mimeType?: string; + name?: string; + owner?: DriveActivity.Schema.Owner; + title?: string; + } + export interface DriveItemReference { + file?: any; + folder?: DriveActivity.Schema.Folder; + name?: string; + title?: string; + } + export interface FileComment { + legacyCommentId?: string; + legacyDiscussionId?: string; + linkToDiscussion?: string; + parent?: DriveActivity.Schema.DriveItem; + } + export interface Folder { + type?: string; + } + export interface Group { + email?: string; + title?: string; + } + export interface Impersonation { + impersonatedUser?: DriveActivity.Schema.User; + } + export interface KnownUser { + isCurrentUser?: boolean; + personName?: string; + } + export interface Move { + addedParents?: DriveActivity.Schema.TargetReference[]; + removedParents?: DriveActivity.Schema.TargetReference[]; + } + export interface Owner { + domain?: DriveActivity.Schema.Domain; + teamDrive?: DriveActivity.Schema.TeamDriveReference; + user?: DriveActivity.Schema.User; + } + export interface Permission { + allowDiscovery?: boolean; + anyone?: any; + domain?: DriveActivity.Schema.Domain; + group?: DriveActivity.Schema.Group; + role?: string; + user?: DriveActivity.Schema.User; + } + export interface PermissionChange { + addedPermissions?: DriveActivity.Schema.Permission[]; + removedPermissions?: DriveActivity.Schema.Permission[]; + } + export interface Post { + subtype?: string; + } + export interface QueryDriveActivityRequest { + ancestorName?: string; + consolidationStrategy?: DriveActivity.Schema.ConsolidationStrategy; + filter?: string; + itemName?: string; + pageSize?: number; + pageToken?: string; + } + export interface QueryDriveActivityResponse { + activities?: DriveActivity.Schema.DriveActivity[]; + nextPageToken?: string; + } + export interface Rename { + newTitle?: string; + oldTitle?: string; + } + export interface Restore { + type?: string; + } + export interface RestrictionChange { + feature?: string; + newRestriction?: string; + } + export interface SettingsChange { + restrictionChanges?: DriveActivity.Schema.RestrictionChange[]; + } + export interface Suggestion { + subtype?: string; + } + export interface SystemEvent { + type?: string; + } + export interface Target { + driveItem?: DriveActivity.Schema.DriveItem; + fileComment?: any; + teamDrive?: DriveActivity.Schema.TeamDrive; + } + export interface TargetReference { + driveItem?: DriveActivity.Schema.DriveItemReference; + teamDrive?: DriveActivity.Schema.TeamDriveReference; + } + export interface TeamDrive { + name?: string; + root?: DriveActivity.Schema.DriveItem; + title?: string; + } + export interface TeamDriveReference { + name?: string; + title?: string; + } + export interface TimeRange { + endTime?: string; + startTime?: string; + } + export interface User { + deletedUser?: any; + knownUser?: DriveActivity.Schema.KnownUser; + unknownUser?: any; + } + } + } + export interface DriveActivity { + Activity?: DriveActivity.Collection.ActivityCollection; + // Create a new instance of ConsolidationStrategy + newConsolidationStrategy(): DriveActivity.Schema.ConsolidationStrategy; + // Create a new instance of Legacy + newLegacy(): any; + // Create a new instance of NoConsolidation + newNoConsolidation(): any; + // Create a new instance of QueryDriveActivityRequest + newQueryDriveActivityRequest(): DriveActivity.Schema.QueryDriveActivityRequest; + } +} + +declare var DriveActivity: GoogleAppsScript.DriveActivity; diff --git a/types/google-apps-script/apis/fusiontables/v1.d.ts b/types/google-apps-script/apis/fusiontables/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/fusiontables/v2.d.ts b/types/google-apps-script/apis/fusiontables/v2.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/fusiontables_v2.d.ts b/types/google-apps-script/apis/fusiontables_v2.d.ts new file mode 100644 index 0000000000..23f6da5901 --- /dev/null +++ b/types/google-apps-script/apis/fusiontables_v2.d.ts @@ -0,0 +1,336 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace FusionTables { + namespace Collection { + export interface ColumnCollection { + // Retrieves a specific column by its ID. + get(tableId: string, columnId: string): FusionTables.Schema.Column; + // Adds a new column to the table. + insert(resource: Schema.Column, tableId: string): FusionTables.Schema.Column; + // Retrieves a list of columns. + list(tableId: string): FusionTables.Schema.ColumnList; + // Retrieves a list of columns. + list(tableId: string, optionalArgs: object): FusionTables.Schema.ColumnList; + // Updates the name or type of an existing column. This method supports patch semantics. + patch(resource: Schema.Column, tableId: string, columnId: string): FusionTables.Schema.Column; + // Deletes the specified column. + remove(tableId: string, columnId: string): void; + // Updates the name or type of an existing column. + update(resource: Schema.Column, tableId: string, columnId: string): FusionTables.Schema.Column; + } + export interface QueryCollection { + // Executes a Fusion Tables SQL statement, which can be any of + // - SELECT + // - INSERT + // - UPDATE + // - DELETE + // - SHOW + // - DESCRIBE + // - CREATE statement. + sql(sql: string): FusionTables.Schema.Sqlresponse; + // Executes a Fusion Tables SQL statement, which can be any of + // - SELECT + // - INSERT + // - UPDATE + // - DELETE + // - SHOW + // - DESCRIBE + // - CREATE statement. + sql(sql: string, optionalArgs: object): FusionTables.Schema.Sqlresponse; + // Executes a SQL statement which can be any of + // - SELECT + // - SHOW + // - DESCRIBE + sqlGet(sql: string): FusionTables.Schema.Sqlresponse; + // Executes a SQL statement which can be any of + // - SELECT + // - SHOW + // - DESCRIBE + sqlGet(sql: string, optionalArgs: object): FusionTables.Schema.Sqlresponse; + } + export interface StyleCollection { + // Gets a specific style. + get(tableId: string, styleId: number): FusionTables.Schema.StyleSetting; + // Adds a new style for the table. + insert(resource: Schema.StyleSetting, tableId: string): FusionTables.Schema.StyleSetting; + // Retrieves a list of styles. + list(tableId: string): FusionTables.Schema.StyleSettingList; + // Retrieves a list of styles. + list(tableId: string, optionalArgs: object): FusionTables.Schema.StyleSettingList; + // Updates an existing style. This method supports patch semantics. + patch(resource: Schema.StyleSetting, tableId: string, styleId: number): FusionTables.Schema.StyleSetting; + // Deletes a style. + remove(tableId: string, styleId: number): void; + // Updates an existing style. + update(resource: Schema.StyleSetting, tableId: string, styleId: number): FusionTables.Schema.StyleSetting; + } + export interface TableCollection { + // Copies a table. + copy(tableId: string): FusionTables.Schema.Table; + // Copies a table. + copy(tableId: string, optionalArgs: object): FusionTables.Schema.Table; + // Retrieves a specific table by its ID. + get(tableId: string): FusionTables.Schema.Table; + // Imports more rows into a table. + importRows(tableId: string): FusionTables.Schema.Import; + // Imports more rows into a table. + importRows(tableId: string, mediaData: any): FusionTables.Schema.Import; + // Imports more rows into a table. + importRows(tableId: string, mediaData: any, optionalArgs: object): FusionTables.Schema.Import; + // Imports a new table. + importTable(name: string): FusionTables.Schema.Table; + // Imports a new table. + importTable(name: string, mediaData: any): FusionTables.Schema.Table; + // Imports a new table. + importTable(name: string, mediaData: any, optionalArgs: object): FusionTables.Schema.Table; + // Creates a new table. + insert(resource: Schema.Table): FusionTables.Schema.Table; + // Retrieves a list of tables a user owns. + list(): FusionTables.Schema.TableList; + // Retrieves a list of tables a user owns. + list(optionalArgs: object): FusionTables.Schema.TableList; + // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics. + patch(resource: Schema.Table, tableId: string): FusionTables.Schema.Table; + // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics. + patch(resource: Schema.Table, tableId: string, optionalArgs: object): FusionTables.Schema.Table; + // Replaces rows of the table with the rows of the spreadsheet that is first imported from. Current rows remain visible until all replacement rows are ready. + refetchSheet(tableId: string): FusionTables.Schema.Task; + // Deletes a table. + remove(tableId: string): void; + // Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. + replaceRows(tableId: string): FusionTables.Schema.Task; + // Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. + replaceRows(tableId: string, mediaData: any): FusionTables.Schema.Task; + // Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. + replaceRows(tableId: string, mediaData: any, optionalArgs: object): FusionTables.Schema.Task; + // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. + update(resource: Schema.Table, tableId: string): FusionTables.Schema.Table; + // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. + update(resource: Schema.Table, tableId: string, optionalArgs: object): FusionTables.Schema.Table; + } + export interface TaskCollection { + // Retrieves a specific task by its ID. + get(tableId: string, taskId: string): FusionTables.Schema.Task; + // Retrieves a list of tasks. + list(tableId: string): FusionTables.Schema.TaskList; + // Retrieves a list of tasks. + list(tableId: string, optionalArgs: object): FusionTables.Schema.TaskList; + // Deletes a specific task by its ID, unless that task has already started running. + remove(tableId: string, taskId: string): void; + } + export interface TemplateCollection { + // Retrieves a specific template by its id + get(tableId: string, templateId: number): FusionTables.Schema.Template; + // Creates a new template for the table. + insert(resource: Schema.Template, tableId: string): FusionTables.Schema.Template; + // Retrieves a list of templates. + list(tableId: string): FusionTables.Schema.TemplateList; + // Retrieves a list of templates. + list(tableId: string, optionalArgs: object): FusionTables.Schema.TemplateList; + // Updates an existing template. This method supports patch semantics. + patch(resource: Schema.Template, tableId: string, templateId: number): FusionTables.Schema.Template; + // Deletes a template + remove(tableId: string, templateId: number): void; + // Updates an existing template + update(resource: Schema.Template, tableId: string, templateId: number): FusionTables.Schema.Template; + } + } + namespace Schema { + export interface Bucket { + color?: string; + icon?: string; + max?: Number; + min?: Number; + opacity?: Number; + weight?: number; + } + export interface Column { + baseColumn?: FusionTables.Schema.ColumnBaseColumn; + columnId?: number; + columnJsonSchema?: string; + columnPropertiesJson?: string; + description?: string; + formatPattern?: string; + graphPredicate?: string; + kind?: string; + name?: string; + type?: string; + validValues?: string[]; + validateData?: boolean; + } + export interface ColumnBaseColumn { + columnId?: number; + tableIndex?: number; + } + export interface ColumnList { + items?: FusionTables.Schema.Column[]; + kind?: string; + nextPageToken?: string; + totalItems?: number; + } + export interface Geometry { + geometries?: Object[]; + geometry?: object; + type?: string; + } + export interface Import { + kind?: string; + numRowsReceived?: string; + } + export interface Line { + coordinates?: Number[][]; + type?: string; + } + export interface LineStyle { + strokeColor?: string; + strokeColorStyler?: FusionTables.Schema.StyleFunction; + strokeOpacity?: Number; + strokeWeight?: number; + strokeWeightStyler?: FusionTables.Schema.StyleFunction; + } + export interface Point { + coordinates?: Number[]; + type?: string; + } + export interface PointStyle { + iconName?: string; + iconStyler?: FusionTables.Schema.StyleFunction; + } + export interface Polygon { + coordinates?: Number[][][]; + type?: string; + } + export interface PolygonStyle { + fillColor?: string; + fillColorStyler?: FusionTables.Schema.StyleFunction; + fillOpacity?: Number; + strokeColor?: string; + strokeColorStyler?: FusionTables.Schema.StyleFunction; + strokeOpacity?: Number; + strokeWeight?: number; + strokeWeightStyler?: FusionTables.Schema.StyleFunction; + } + export interface Sqlresponse { + columns?: string[]; + kind?: string; + rows?: Object[][]; + } + export interface StyleFunction { + buckets?: FusionTables.Schema.Bucket[]; + columnName?: string; + gradient?: FusionTables.Schema.StyleFunctionGradient; + kind?: string; + } + export interface StyleFunctionGradient { + colors?: FusionTables.Schema.StyleFunctionGradientColors[]; + max?: Number; + min?: Number; + } + export interface StyleFunctionGradientColors { + color?: string; + opacity?: Number; + } + export interface StyleSetting { + kind?: string; + markerOptions?: FusionTables.Schema.PointStyle; + name?: string; + polygonOptions?: FusionTables.Schema.PolygonStyle; + polylineOptions?: FusionTables.Schema.LineStyle; + styleId?: number; + tableId?: string; + } + export interface StyleSettingList { + items?: FusionTables.Schema.StyleSetting[]; + kind?: string; + nextPageToken?: string; + totalItems?: number; + } + export interface Table { + attribution?: string; + attributionLink?: string; + baseTableIds?: string[]; + columnPropertiesJsonSchema?: string; + columns?: FusionTables.Schema.Column[]; + description?: string; + isExportable?: boolean; + kind?: string; + name?: string; + sql?: string; + tableId?: string; + tablePropertiesJson?: string; + tablePropertiesJsonSchema?: string; + } + export interface TableList { + items?: FusionTables.Schema.Table[]; + kind?: string; + nextPageToken?: string; + } + export interface Task { + kind?: string; + progress?: string; + started?: boolean; + taskId?: string; + type?: string; + } + export interface TaskList { + items?: FusionTables.Schema.Task[]; + kind?: string; + nextPageToken?: string; + totalItems?: number; + } + export interface Template { + automaticColumnNames?: string[]; + body?: string; + kind?: string; + name?: string; + tableId?: string; + templateId?: number; + } + export interface TemplateList { + items?: FusionTables.Schema.Template[]; + kind?: string; + nextPageToken?: string; + totalItems?: number; + } + } + } + export interface FusionTables { + Column?: FusionTables.Collection.ColumnCollection; + Query?: FusionTables.Collection.QueryCollection; + Style?: FusionTables.Collection.StyleCollection; + Table?: FusionTables.Collection.TableCollection; + Task?: FusionTables.Collection.TaskCollection; + Template?: FusionTables.Collection.TemplateCollection; + // Create a new instance of Bucket + newBucket(): FusionTables.Schema.Bucket; + // Create a new instance of Column + newColumn(): FusionTables.Schema.Column; + // Create a new instance of ColumnBaseColumn + newColumnBaseColumn(): FusionTables.Schema.ColumnBaseColumn; + // Create a new instance of LineStyle + newLineStyle(): FusionTables.Schema.LineStyle; + // Create a new instance of PointStyle + newPointStyle(): FusionTables.Schema.PointStyle; + // Create a new instance of PolygonStyle + newPolygonStyle(): FusionTables.Schema.PolygonStyle; + // Create a new instance of StyleFunction + newStyleFunction(): FusionTables.Schema.StyleFunction; + // Create a new instance of StyleFunctionGradient + newStyleFunctionGradient(): FusionTables.Schema.StyleFunctionGradient; + // Create a new instance of StyleFunctionGradientColors + newStyleFunctionGradientColors(): FusionTables.Schema.StyleFunctionGradientColors; + // Create a new instance of StyleSetting + newStyleSetting(): FusionTables.Schema.StyleSetting; + // Create a new instance of Table + newTable(): FusionTables.Schema.Table; + // Create a new instance of Template + newTemplate(): FusionTables.Schema.Template; + } +} + +declare var FusionTables: GoogleAppsScript.FusionTables; diff --git a/types/google-apps-script/apis/gmail/v1.d.ts b/types/google-apps-script/apis/gmail/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/gmail_v1.d.ts b/types/google-apps-script/apis/gmail_v1.d.ts new file mode 100644 index 0000000000..0268d2948e --- /dev/null +++ b/types/google-apps-script/apis/gmail_v1.d.ts @@ -0,0 +1,518 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Gmail { + namespace Collection { + namespace Users { + namespace Messages { + export interface AttachmentsCollection { + // Gets the specified message attachment. + get(userId: string, messageId: string, id: string): Gmail.Schema.MessagePartBody; + } + } + namespace Settings { + namespace SendAs { + export interface SmimeInfoCollection { + // Gets the specified S/MIME config for the specified send-as alias. + get(userId: string, sendAsEmail: string, id: string): Gmail.Schema.SmimeInfo; + // Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key. + insert(resource: Schema.SmimeInfo, userId: string, sendAsEmail: string): Gmail.Schema.SmimeInfo; + // Lists S/MIME configs for the specified send-as alias. + list(userId: string, sendAsEmail: string): Gmail.Schema.ListSmimeInfoResponse; + // Deletes the specified S/MIME config for the specified send-as alias. + remove(userId: string, sendAsEmail: string, id: string): void; + // Sets the default S/MIME config for the specified send-as alias. + setDefault(userId: string, sendAsEmail: string, id: string): void; + } + } + export interface DelegatesCollection { + // Adds a delegate with its verification status set directly to accepted, without sending any verification email. The delegate user must be a member of the same G Suite organization as the delegator user. + // Gmail imposes limtations on the number of delegates and delegators each user in a G Suite organization can have. These limits depend on your organization, but in general each user can have up to 25 delegates and up to 10 delegators. + // Note that a delegate user must be referred to by their primary email address, and not an email alias. + // Also note that when a new delegate is created, there may be up to a one minute delay before the new delegate is available for use. + // This method is only available to service account clients that have been delegated domain-wide authority. + create(resource: Schema.Delegate, userId: string): Gmail.Schema.Delegate; + // Gets the specified delegate. + // Note that a delegate user must be referred to by their primary email address, and not an email alias. + // This method is only available to service account clients that have been delegated domain-wide authority. + get(userId: string, delegateEmail: string): Gmail.Schema.Delegate; + // Lists the delegates for the specified account. + // This method is only available to service account clients that have been delegated domain-wide authority. + list(userId: string): Gmail.Schema.ListDelegatesResponse; + // Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it. + // Note that a delegate user must be referred to by their primary email address, and not an email alias. + // This method is only available to service account clients that have been delegated domain-wide authority. + remove(userId: string, delegateEmail: string): void; + } + export interface FiltersCollection { + // Creates a filter. + create(resource: Schema.Filter, userId: string): Gmail.Schema.Filter; + // Gets a filter. + get(userId: string, id: string): Gmail.Schema.Filter; + // Lists the message filters of a Gmail user. + list(userId: string): Gmail.Schema.ListFiltersResponse; + // Deletes a filter. + remove(userId: string, id: string): void; + } + export interface ForwardingAddressesCollection { + // Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. + // This method is only available to service account clients that have been delegated domain-wide authority. + create(resource: Schema.ForwardingAddress, userId: string): Gmail.Schema.ForwardingAddress; + // Gets the specified forwarding address. + get(userId: string, forwardingEmail: string): Gmail.Schema.ForwardingAddress; + // Lists the forwarding addresses for the specified account. + list(userId: string): Gmail.Schema.ListForwardingAddressesResponse; + // Deletes the specified forwarding address and revokes any verification that may have been required. + // This method is only available to service account clients that have been delegated domain-wide authority. + remove(userId: string, forwardingEmail: string): void; + } + export interface SendAsCollection { + SmimeInfo?: Gmail.Collection.Users.Settings.SendAs.SmimeInfoCollection; + // Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. + // This method is only available to service account clients that have been delegated domain-wide authority. + create(resource: Schema.SendAs, userId: string): Gmail.Schema.SendAs; + // Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection. + get(userId: string, sendAsEmail: string): Gmail.Schema.SendAs; + // Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom "from" aliases. + list(userId: string): Gmail.Schema.ListSendAsResponse; + // Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. + // Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. This method supports patch semantics. + patch(resource: Schema.SendAs, userId: string, sendAsEmail: string): Gmail.Schema.SendAs; + // Deletes the specified send-as alias. Revokes any verification that may have been required for using it. + // This method is only available to service account clients that have been delegated domain-wide authority. + remove(userId: string, sendAsEmail: string): void; + // Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. + // Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. + update(resource: Schema.SendAs, userId: string, sendAsEmail: string): Gmail.Schema.SendAs; + // Sends a verification email to the specified send-as alias address. The verification status must be pending. + // This method is only available to service account clients that have been delegated domain-wide authority. + verify(userId: string, sendAsEmail: string): void; + } + } + export interface DraftsCollection { + // Creates a new draft with the DRAFT label. + create(resource: Schema.Draft, userId: string): Gmail.Schema.Draft; + // Creates a new draft with the DRAFT label. + create(resource: Schema.Draft, userId: string, mediaData: any): Gmail.Schema.Draft; + // Gets the specified draft. + get(userId: string, id: string): Gmail.Schema.Draft; + // Gets the specified draft. + get(userId: string, id: string, optionalArgs: object): Gmail.Schema.Draft; + // Lists the drafts in the user's mailbox. + list(userId: string): Gmail.Schema.ListDraftsResponse; + // Lists the drafts in the user's mailbox. + list(userId: string, optionalArgs: object): Gmail.Schema.ListDraftsResponse; + // Immediately and permanently deletes the specified draft. Does not simply trash it. + remove(userId: string, id: string): void; + // Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers. + send(resource: Schema.Draft, userId: string): Gmail.Schema.Message; + // Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers. + send(resource: Schema.Draft, userId: string, mediaData: any): Gmail.Schema.Message; + // Replaces a draft's content. + update(resource: Schema.Draft, userId: string, id: string): Gmail.Schema.Draft; + // Replaces a draft's content. + update(resource: Schema.Draft, userId: string, id: string, mediaData: any): Gmail.Schema.Draft; + } + export interface HistoryCollection { + // Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId). + list(userId: string): Gmail.Schema.ListHistoryResponse; + // Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId). + list(userId: string, optionalArgs: object): Gmail.Schema.ListHistoryResponse; + } + export interface LabelsCollection { + // Creates a new label. + create(resource: Schema.Label, userId: string): Gmail.Schema.Label; + // Gets the specified label. + get(userId: string, id: string): Gmail.Schema.Label; + // Lists all labels in the user's mailbox. + list(userId: string): Gmail.Schema.ListLabelsResponse; + // Updates the specified label. This method supports patch semantics. + patch(resource: Schema.Label, userId: string, id: string): Gmail.Schema.Label; + // Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to. + remove(userId: string, id: string): void; + // Updates the specified label. + update(resource: Schema.Label, userId: string, id: string): Gmail.Schema.Label; + } + export interface MessagesCollection { + Attachments?: Gmail.Collection.Users.Messages.AttachmentsCollection; + // Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all. + batchDelete(resource: Schema.BatchDeleteMessagesRequest, userId: string): void; + // Modifies the labels on the specified messages. + batchModify(resource: Schema.BatchModifyMessagesRequest, userId: string): void; + // Gets the specified message. + get(userId: string, id: string): Gmail.Schema.Message; + // Gets the specified message. + get(userId: string, id: string, optionalArgs: object): Gmail.Schema.Message; + // Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. + import(resource: Schema.Message, userId: string): Gmail.Schema.Message; + // Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. + import(resource: Schema.Message, userId: string, mediaData: any): Gmail.Schema.Message; + // Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. + import(resource: Schema.Message, userId: string, mediaData: any, optionalArgs: object): Gmail.Schema.Message; + // Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. + insert(resource: Schema.Message, userId: string): Gmail.Schema.Message; + // Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. + insert(resource: Schema.Message, userId: string, mediaData: any): Gmail.Schema.Message; + // Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. + insert(resource: Schema.Message, userId: string, mediaData: any, optionalArgs: object): Gmail.Schema.Message; + // Lists the messages in the user's mailbox. + list(userId: string): Gmail.Schema.ListMessagesResponse; + // Lists the messages in the user's mailbox. + list(userId: string, optionalArgs: object): Gmail.Schema.ListMessagesResponse; + // Modifies the labels on the specified message. + modify(resource: Schema.ModifyMessageRequest, userId: string, id: string): Gmail.Schema.Message; + // Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead. + remove(userId: string, id: string): void; + // Sends the specified message to the recipients in the To, Cc, and Bcc headers. + send(resource: Schema.Message, userId: string): Gmail.Schema.Message; + // Sends the specified message to the recipients in the To, Cc, and Bcc headers. + send(resource: Schema.Message, userId: string, mediaData: any): Gmail.Schema.Message; + // Moves the specified message to the trash. + trash(userId: string, id: string): Gmail.Schema.Message; + // Removes the specified message from the trash. + untrash(userId: string, id: string): Gmail.Schema.Message; + } + export interface SettingsCollection { + Delegates?: Gmail.Collection.Users.Settings.DelegatesCollection; + Filters?: Gmail.Collection.Users.Settings.FiltersCollection; + ForwardingAddresses?: Gmail.Collection.Users.Settings.ForwardingAddressesCollection; + SendAs?: Gmail.Collection.Users.Settings.SendAsCollection; + // Gets the auto-forwarding setting for the specified account. + getAutoForwarding(userId: string): Gmail.Schema.AutoForwarding; + // Gets IMAP settings. + getImap(userId: string): Gmail.Schema.ImapSettings; + // Gets POP settings. + getPop(userId: string): Gmail.Schema.PopSettings; + // Gets vacation responder settings. + getVacation(userId: string): Gmail.Schema.VacationSettings; + // Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. + // This method is only available to service account clients that have been delegated domain-wide authority. + updateAutoForwarding(resource: Schema.AutoForwarding, userId: string): Gmail.Schema.AutoForwarding; + // Updates IMAP settings. + updateImap(resource: Schema.ImapSettings, userId: string): Gmail.Schema.ImapSettings; + // Updates POP settings. + updatePop(resource: Schema.PopSettings, userId: string): Gmail.Schema.PopSettings; + // Updates vacation responder settings. + updateVacation(resource: Schema.VacationSettings, userId: string): Gmail.Schema.VacationSettings; + } + export interface ThreadsCollection { + // Gets the specified thread. + get(userId: string, id: string): Gmail.Schema.Thread; + // Gets the specified thread. + get(userId: string, id: string, optionalArgs: object): Gmail.Schema.Thread; + // Lists the threads in the user's mailbox. + list(userId: string): Gmail.Schema.ListThreadsResponse; + // Lists the threads in the user's mailbox. + list(userId: string, optionalArgs: object): Gmail.Schema.ListThreadsResponse; + // Modifies the labels applied to the thread. This applies to all messages in the thread. + modify(resource: Schema.ModifyThreadRequest, userId: string, id: string): Gmail.Schema.Thread; + // Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer threads.trash instead. + remove(userId: string, id: string): void; + // Moves the specified thread to the trash. + trash(userId: string, id: string): Gmail.Schema.Thread; + // Removes the specified thread from the trash. + untrash(userId: string, id: string): Gmail.Schema.Thread; + } + } + export interface UsersCollection { + Drafts?: Gmail.Collection.Users.DraftsCollection; + History?: Gmail.Collection.Users.HistoryCollection; + Labels?: Gmail.Collection.Users.LabelsCollection; + Messages?: Gmail.Collection.Users.MessagesCollection; + Settings?: Gmail.Collection.Users.SettingsCollection; + Threads?: Gmail.Collection.Users.ThreadsCollection; + // Gets the current user's Gmail profile. + getProfile(userId: string): Gmail.Schema.Profile; + // Stop receiving push notifications for the given user mailbox. + stop(userId: string): void; + // Set up or update a push notification watch on the given user mailbox. + watch(resource: Schema.WatchRequest, userId: string): Gmail.Schema.WatchResponse; + } + } + namespace Schema { + export interface AutoForwarding { + disposition?: string; + emailAddress?: string; + enabled?: boolean; + } + export interface BatchDeleteMessagesRequest { + ids?: string[]; + } + export interface BatchModifyMessagesRequest { + addLabelIds?: string[]; + ids?: string[]; + removeLabelIds?: string[]; + } + export interface Delegate { + delegateEmail?: string; + verificationStatus?: string; + } + export interface Draft { + id?: string; + message?: Gmail.Schema.Message; + } + export interface Filter { + action?: Gmail.Schema.FilterAction; + criteria?: Gmail.Schema.FilterCriteria; + id?: string; + } + export interface FilterAction { + addLabelIds?: string[]; + forward?: string; + removeLabelIds?: string[]; + } + export interface FilterCriteria { + excludeChats?: boolean; + from?: string; + hasAttachment?: boolean; + negatedQuery?: string; + query?: string; + size?: number; + sizeComparison?: string; + subject?: string; + to?: string; + } + export interface ForwardingAddress { + forwardingEmail?: string; + verificationStatus?: string; + } + export interface History { + id?: string; + labelsAdded?: Gmail.Schema.HistoryLabelAdded[]; + labelsRemoved?: Gmail.Schema.HistoryLabelRemoved[]; + messages?: Gmail.Schema.Message[]; + messagesAdded?: Gmail.Schema.HistoryMessageAdded[]; + messagesDeleted?: Gmail.Schema.HistoryMessageDeleted[]; + } + export interface HistoryLabelAdded { + labelIds?: string[]; + message?: Gmail.Schema.Message; + } + export interface HistoryLabelRemoved { + labelIds?: string[]; + message?: Gmail.Schema.Message; + } + export interface HistoryMessageAdded { + message?: Gmail.Schema.Message; + } + export interface HistoryMessageDeleted { + message?: Gmail.Schema.Message; + } + export interface ImapSettings { + autoExpunge?: boolean; + enabled?: boolean; + expungeBehavior?: string; + maxFolderSize?: number; + } + export interface Label { + color?: Gmail.Schema.LabelColor; + id?: string; + labelListVisibility?: string; + messageListVisibility?: string; + messagesTotal?: number; + messagesUnread?: number; + name?: string; + threadsTotal?: number; + threadsUnread?: number; + type?: string; + } + export interface LabelColor { + backgroundColor?: string; + textColor?: string; + } + export interface ListDelegatesResponse { + delegates?: Gmail.Schema.Delegate[]; + } + export interface ListDraftsResponse { + drafts?: Gmail.Schema.Draft[]; + nextPageToken?: string; + resultSizeEstimate?: number; + } + export interface ListFiltersResponse { + filter?: Gmail.Schema.Filter[]; + } + export interface ListForwardingAddressesResponse { + forwardingAddresses?: Gmail.Schema.ForwardingAddress[]; + } + export interface ListHistoryResponse { + history?: Gmail.Schema.History[]; + historyId?: string; + nextPageToken?: string; + } + export interface ListLabelsResponse { + labels?: Gmail.Schema.Label[]; + } + export interface ListMessagesResponse { + messages?: Gmail.Schema.Message[]; + nextPageToken?: string; + resultSizeEstimate?: number; + } + export interface ListSendAsResponse { + sendAs?: Gmail.Schema.SendAs[]; + } + export interface ListSmimeInfoResponse { + smimeInfo?: Gmail.Schema.SmimeInfo[]; + } + export interface ListThreadsResponse { + nextPageToken?: string; + resultSizeEstimate?: number; + threads?: Gmail.Schema.Thread[]; + } + export interface Message { + historyId?: string; + id?: string; + internalDate?: string; + labelIds?: string[]; + payload?: Gmail.Schema.MessagePart; + raw?: string; + sizeEstimate?: number; + snippet?: string; + threadId?: string; + } + export interface MessagePart { + body?: Gmail.Schema.MessagePartBody; + filename?: string; + headers?: Gmail.Schema.MessagePartHeader[]; + mimeType?: string; + partId?: string; + parts?: Gmail.Schema.MessagePart[]; + } + export interface MessagePartBody { + attachmentId?: string; + data?: string; + size?: number; + } + export interface MessagePartHeader { + name?: string; + value?: string; + } + export interface ModifyMessageRequest { + addLabelIds?: string[]; + removeLabelIds?: string[]; + } + export interface ModifyThreadRequest { + addLabelIds?: string[]; + removeLabelIds?: string[]; + } + export interface PopSettings { + accessWindow?: string; + disposition?: string; + } + export interface Profile { + emailAddress?: string; + historyId?: string; + messagesTotal?: number; + threadsTotal?: number; + } + export interface SendAs { + displayName?: string; + isDefault?: boolean; + isPrimary?: boolean; + replyToAddress?: string; + sendAsEmail?: string; + signature?: string; + smtpMsa?: Gmail.Schema.SmtpMsa; + treatAsAlias?: boolean; + verificationStatus?: string; + } + export interface SmimeInfo { + encryptedKeyPassword?: string; + expiration?: string; + id?: string; + isDefault?: boolean; + issuerCn?: string; + pem?: string; + pkcs12?: string; + } + export interface SmtpMsa { + host?: string; + password?: string; + port?: number; + securityMode?: string; + username?: string; + } + export interface Thread { + historyId?: string; + id?: string; + messages?: Gmail.Schema.Message[]; + snippet?: string; + } + export interface VacationSettings { + enableAutoReply?: boolean; + endTime?: string; + responseBodyHtml?: string; + responseBodyPlainText?: string; + responseSubject?: string; + restrictToContacts?: boolean; + restrictToDomain?: boolean; + startTime?: string; + } + export interface WatchRequest { + labelFilterAction?: string; + labelIds?: string[]; + topicName?: string; + } + export interface WatchResponse { + expiration?: string; + historyId?: string; + } + } + } + export interface Gmail { + Users?: Gmail.Collection.UsersCollection; + // Create a new instance of AutoForwarding + newAutoForwarding(): Gmail.Schema.AutoForwarding; + // Create a new instance of BatchDeleteMessagesRequest + newBatchDeleteMessagesRequest(): Gmail.Schema.BatchDeleteMessagesRequest; + // Create a new instance of BatchModifyMessagesRequest + newBatchModifyMessagesRequest(): Gmail.Schema.BatchModifyMessagesRequest; + // Create a new instance of Delegate + newDelegate(): Gmail.Schema.Delegate; + // Create a new instance of Draft + newDraft(): Gmail.Schema.Draft; + // Create a new instance of Filter + newFilter(): Gmail.Schema.Filter; + // Create a new instance of FilterAction + newFilterAction(): Gmail.Schema.FilterAction; + // Create a new instance of FilterCriteria + newFilterCriteria(): Gmail.Schema.FilterCriteria; + // Create a new instance of ForwardingAddress + newForwardingAddress(): Gmail.Schema.ForwardingAddress; + // Create a new instance of ImapSettings + newImapSettings(): Gmail.Schema.ImapSettings; + // Create a new instance of Label + newLabel(): Gmail.Schema.Label; + // Create a new instance of LabelColor + newLabelColor(): Gmail.Schema.LabelColor; + // Create a new instance of Message + newMessage(): Gmail.Schema.Message; + // Create a new instance of MessagePart + newMessagePart(): Gmail.Schema.MessagePart; + // Create a new instance of MessagePartBody + newMessagePartBody(): Gmail.Schema.MessagePartBody; + // Create a new instance of MessagePartHeader + newMessagePartHeader(): Gmail.Schema.MessagePartHeader; + // Create a new instance of ModifyMessageRequest + newModifyMessageRequest(): Gmail.Schema.ModifyMessageRequest; + // Create a new instance of ModifyThreadRequest + newModifyThreadRequest(): Gmail.Schema.ModifyThreadRequest; + // Create a new instance of PopSettings + newPopSettings(): Gmail.Schema.PopSettings; + // Create a new instance of SendAs + newSendAs(): Gmail.Schema.SendAs; + // Create a new instance of SmimeInfo + newSmimeInfo(): Gmail.Schema.SmimeInfo; + // Create a new instance of SmtpMsa + newSmtpMsa(): Gmail.Schema.SmtpMsa; + // Create a new instance of VacationSettings + newVacationSettings(): Gmail.Schema.VacationSettings; + // Create a new instance of WatchRequest + newWatchRequest(): Gmail.Schema.WatchRequest; + } +} + +declare var Gmail: GoogleAppsScript.Gmail; diff --git a/types/google-apps-script/apis/groupsmigration/v1.d.ts b/types/google-apps-script/apis/groupsmigration/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/groupsmigration_v1.d.ts b/types/google-apps-script/apis/groupsmigration_v1.d.ts new file mode 100644 index 0000000000..126afe73b8 --- /dev/null +++ b/types/google-apps-script/apis/groupsmigration_v1.d.ts @@ -0,0 +1,29 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace AdminGroupsMigration { + namespace Collection { + export interface ArchiveCollection { + // Inserts a new mail into the archive of the Google group. + insert(groupId: string): AdminGroupsMigration.Schema.Groups; + // Inserts a new mail into the archive of the Google group. + insert(groupId: string, mediaData: any): AdminGroupsMigration.Schema.Groups; + } + } + namespace Schema { + export interface Groups { + kind?: string; + responseCode?: string; + } + } + } + export interface AdminGroupsMigration { + Archive?: AdminGroupsMigration.Collection.ArchiveCollection; + } +} + +declare var AdminGroupsMigration: GoogleAppsScript.AdminGroupsMigration; diff --git a/types/google-apps-script/apis/groupssettings/v1.d.ts b/types/google-apps-script/apis/groupssettings/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/groupssettings_v1.d.ts b/types/google-apps-script/apis/groupssettings_v1.d.ts new file mode 100644 index 0000000000..abec6f480d --- /dev/null +++ b/types/google-apps-script/apis/groupssettings_v1.d.ts @@ -0,0 +1,92 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace AdminGroupsSettings { + namespace Collection { + export interface GroupsCollection { + // Gets one resource by id. + get(groupUniqueId: string): AdminGroupsSettings.Schema.Groups; + // Updates an existing resource. This method supports patch semantics. + patch(resource: Schema.Groups, groupUniqueId: string): AdminGroupsSettings.Schema.Groups; + // Updates an existing resource. + update(resource: Schema.Groups, groupUniqueId: string): AdminGroupsSettings.Schema.Groups; + } + } + namespace Schema { + export interface Groups { + allowExternalMembers?: string; + allowGoogleCommunication?: string; + allowWebPosting?: string; + archiveOnly?: string; + customFooterText?: string; + customReplyTo?: string; + customRolesEnabledForSettingsToBeMerged?: string; + defaultMessageDenyNotificationText?: string; + description?: string; + email?: string; + enableCollaborativeInbox?: string; + favoriteRepliesOnTop?: string; + includeCustomFooter?: string; + includeInGlobalAddressList?: string; + isArchived?: string; + kind?: string; + maxMessageBytes?: number; + membersCanPostAsTheGroup?: string; + messageDisplayFont?: string; + messageModerationLevel?: string; + name?: string; + primaryLanguage?: string; + replyTo?: string; + sendMessageDenyNotification?: string; + showInGroupDirectory?: string; + spamModerationLevel?: string; + whoCanAdd?: string; + whoCanAddReferences?: string; + whoCanApproveMembers?: string; + whoCanApproveMessages?: string; + whoCanAssignTopics?: string; + whoCanAssistContent?: string; + whoCanBanUsers?: string; + whoCanContactOwner?: string; + whoCanDeleteAnyPost?: string; + whoCanDeleteTopics?: string; + whoCanDiscoverGroup?: string; + whoCanEnterFreeFormTags?: string; + whoCanHideAbuse?: string; + whoCanInvite?: string; + whoCanJoin?: string; + whoCanLeaveGroup?: string; + whoCanLockTopics?: string; + whoCanMakeTopicsSticky?: string; + whoCanMarkDuplicate?: string; + whoCanMarkFavoriteReplyOnAnyTopic?: string; + whoCanMarkFavoriteReplyOnOwnTopic?: string; + whoCanMarkNoResponseNeeded?: string; + whoCanModerateContent?: string; + whoCanModerateMembers?: string; + whoCanModifyMembers?: string; + whoCanModifyTagsAndCategories?: string; + whoCanMoveTopicsIn?: string; + whoCanMoveTopicsOut?: string; + whoCanPostAnnouncements?: string; + whoCanPostMessage?: string; + whoCanTakeTopics?: string; + whoCanUnassignTopic?: string; + whoCanUnmarkFavoriteReplyOnAnyTopic?: string; + whoCanViewGroup?: string; + whoCanViewMembership?: string; + } + } + } + export interface AdminGroupsSettings { + Groups?: AdminGroupsSettings.Collection.GroupsCollection; + // Create a new instance of Groups + newGroups(): AdminGroupsSettings.Schema.Groups; + } +} + +declare var AdminGroupsSettings: GoogleAppsScript.AdminGroupsSettings; diff --git a/types/google-apps-script/apis/licensing/v1.d.ts b/types/google-apps-script/apis/licensing/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/licensing_v1.d.ts b/types/google-apps-script/apis/licensing_v1.d.ts new file mode 100644 index 0000000000..eaf0d473bc --- /dev/null +++ b/types/google-apps-script/apis/licensing_v1.d.ts @@ -0,0 +1,62 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace AdminLicenseManager { + namespace Collection { + export interface LicenseAssignmentsCollection { + // Get license assignment of a particular product and sku for a user + get(productId: string, skuId: string, userId: string): AdminLicenseManager.Schema.LicenseAssignment; + // Assign License. + insert(resource: Schema.LicenseAssignmentInsert, productId: string, skuId: string): AdminLicenseManager.Schema.LicenseAssignment; + // List license assignments for given product of the customer. + listForProduct(productId: string, customerId: string): AdminLicenseManager.Schema.LicenseAssignmentList; + // List license assignments for given product of the customer. + listForProduct(productId: string, customerId: string, optionalArgs: object): AdminLicenseManager.Schema.LicenseAssignmentList; + // List license assignments for given product and sku of the customer. + listForProductAndSku(productId: string, skuId: string, customerId: string): AdminLicenseManager.Schema.LicenseAssignmentList; + // List license assignments for given product and sku of the customer. + listForProductAndSku(productId: string, skuId: string, customerId: string, optionalArgs: object): AdminLicenseManager.Schema.LicenseAssignmentList; + // Assign License. This method supports patch semantics. + patch(resource: Schema.LicenseAssignment, productId: string, skuId: string, userId: string): AdminLicenseManager.Schema.LicenseAssignment; + // Revoke License. + remove(productId: string, skuId: string, userId: string): void; + // Assign License. + update(resource: Schema.LicenseAssignment, productId: string, skuId: string, userId: string): AdminLicenseManager.Schema.LicenseAssignment; + } + } + namespace Schema { + export interface LicenseAssignment { + etags?: string; + kind?: string; + productId?: string; + productName?: string; + selfLink?: string; + skuId?: string; + skuName?: string; + userId?: string; + } + export interface LicenseAssignmentInsert { + userId?: string; + } + export interface LicenseAssignmentList { + etag?: string; + items?: AdminLicenseManager.Schema.LicenseAssignment[]; + kind?: string; + nextPageToken?: string; + } + } + } + export interface AdminLicenseManager { + LicenseAssignments?: AdminLicenseManager.Collection.LicenseAssignmentsCollection; + // Create a new instance of LicenseAssignment + newLicenseAssignment(): AdminLicenseManager.Schema.LicenseAssignment; + // Create a new instance of LicenseAssignmentInsert + newLicenseAssignmentInsert(): AdminLicenseManager.Schema.LicenseAssignmentInsert; + } +} + +declare var AdminLicenseManager: GoogleAppsScript.AdminLicenseManager; diff --git a/types/google-apps-script/apis/mirror/v1.d.ts b/types/google-apps-script/apis/mirror/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/mirror_v1.d.ts b/types/google-apps-script/apis/mirror_v1.d.ts new file mode 100644 index 0000000000..149d738411 --- /dev/null +++ b/types/google-apps-script/apis/mirror_v1.d.ts @@ -0,0 +1,266 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Mirror { + namespace Collection { + namespace Timeline { + export interface AttachmentsCollection { + // Retrieves an attachment on a timeline item by item ID and attachment ID. + get(itemId: string, attachmentId: string): Mirror.Schema.Attachment; + // Adds a new attachment to a timeline item. + insert(itemId: string): Mirror.Schema.Attachment; + // Adds a new attachment to a timeline item. + insert(itemId: string, mediaData: any): Mirror.Schema.Attachment; + // Returns a list of attachments for a timeline item. + list(itemId: string): Mirror.Schema.AttachmentsListResponse; + // Deletes an attachment from a timeline item. + remove(itemId: string, attachmentId: string): void; + } + } + export interface AccountsCollection { + // Inserts a new account for a user + insert(resource: Schema.Account, userToken: string, accountType: string, accountName: string): Mirror.Schema.Account; + } + export interface ContactsCollection { + // Gets a single contact by ID. + get(id: string): Mirror.Schema.Contact; + // Inserts a new contact. + insert(resource: Schema.Contact): Mirror.Schema.Contact; + // Retrieves a list of contacts for the authenticated user. + list(): Mirror.Schema.ContactsListResponse; + // Updates a contact in place. This method supports patch semantics. + patch(resource: Schema.Contact, id: string): Mirror.Schema.Contact; + // Deletes a contact. + remove(id: string): void; + // Updates a contact in place. + update(resource: Schema.Contact, id: string): Mirror.Schema.Contact; + } + export interface LocationsCollection { + // Gets a single location by ID. + get(id: string): Mirror.Schema.Location; + // Retrieves a list of locations for the user. + list(): Mirror.Schema.LocationsListResponse; + } + export interface SettingsCollection { + // Gets a single setting by ID. + get(id: string): Mirror.Schema.Setting; + } + export interface SubscriptionsCollection { + // Creates a new subscription. + insert(resource: Schema.Subscription): Mirror.Schema.Subscription; + // Retrieves a list of subscriptions for the authenticated user and service. + list(): Mirror.Schema.SubscriptionsListResponse; + // Deletes a subscription. + remove(id: string): void; + // Updates an existing subscription in place. + update(resource: Schema.Subscription, id: string): Mirror.Schema.Subscription; + } + export interface TimelineCollection { + Attachments?: Mirror.Collection.Timeline.AttachmentsCollection; + // Gets a single timeline item by ID. + get(id: string): Mirror.Schema.TimelineItem; + // Inserts a new item into the timeline. + insert(resource: Schema.TimelineItem): Mirror.Schema.TimelineItem; + // Inserts a new item into the timeline. + insert(resource: Schema.TimelineItem, mediaData: any): Mirror.Schema.TimelineItem; + // Retrieves a list of timeline items for the authenticated user. + list(): Mirror.Schema.TimelineListResponse; + // Retrieves a list of timeline items for the authenticated user. + list(optionalArgs: object): Mirror.Schema.TimelineListResponse; + // Updates a timeline item in place. This method supports patch semantics. + patch(resource: Schema.TimelineItem, id: string): Mirror.Schema.TimelineItem; + // Deletes a timeline item. + remove(id: string): void; + // Updates a timeline item in place. + update(resource: Schema.TimelineItem, id: string): Mirror.Schema.TimelineItem; + // Updates a timeline item in place. + update(resource: Schema.TimelineItem, id: string, mediaData: any): Mirror.Schema.TimelineItem; + } + } + namespace Schema { + export interface Account { + authTokens?: Mirror.Schema.AuthToken[]; + features?: string[]; + password?: string; + userData?: Mirror.Schema.UserData[]; + } + export interface Attachment { + contentType?: string; + contentUrl?: string; + id?: string; + isProcessingContent?: boolean; + } + export interface AttachmentsListResponse { + items?: Mirror.Schema.Attachment[]; + kind?: string; + } + export interface AuthToken { + authToken?: string; + type?: string; + } + export interface Command { + type?: string; + } + export interface Contact { + acceptCommands?: Mirror.Schema.Command[]; + acceptTypes?: string[]; + displayName?: string; + id?: string; + imageUrls?: string[]; + kind?: string; + phoneNumber?: string; + priority?: number; + sharingFeatures?: string[]; + source?: string; + speakableName?: string; + type?: string; + } + export interface ContactsListResponse { + items?: Mirror.Schema.Contact[]; + kind?: string; + } + export interface Location { + accuracy?: Number; + address?: string; + displayName?: string; + id?: string; + kind?: string; + latitude?: Number; + longitude?: Number; + timestamp?: string; + } + export interface LocationsListResponse { + items?: Mirror.Schema.Location[]; + kind?: string; + } + export interface MenuItem { + action?: string; + contextual_command?: string; + id?: string; + payload?: string; + removeWhenSelected?: boolean; + values?: Mirror.Schema.MenuValue[]; + } + export interface MenuValue { + displayName?: string; + iconUrl?: string; + state?: string; + } + export interface Notification { + collection?: string; + itemId?: string; + operation?: string; + userActions?: Mirror.Schema.UserAction[]; + userToken?: string; + verifyToken?: string; + } + export interface NotificationConfig { + deliveryTime?: string; + level?: string; + } + export interface Setting { + id?: string; + kind?: string; + value?: string; + } + export interface Subscription { + callbackUrl?: string; + collection?: string; + id?: string; + kind?: string; + notification?: Mirror.Schema.Notification; + operation?: string[]; + updated?: string; + userToken?: string; + verifyToken?: string; + } + export interface SubscriptionsListResponse { + items?: Mirror.Schema.Subscription[]; + kind?: string; + } + export interface TimelineItem { + attachments?: Mirror.Schema.Attachment[]; + bundleId?: string; + canonicalUrl?: string; + created?: string; + creator?: Mirror.Schema.Contact; + displayTime?: string; + etag?: string; + html?: string; + id?: string; + inReplyTo?: string; + isBundleCover?: boolean; + isDeleted?: boolean; + isPinned?: boolean; + kind?: string; + location?: Mirror.Schema.Location; + menuItems?: Mirror.Schema.MenuItem[]; + notification?: Mirror.Schema.NotificationConfig; + pinScore?: number; + recipients?: Mirror.Schema.Contact[]; + selfLink?: string; + sourceItemId?: string; + speakableText?: string; + speakableType?: string; + text?: string; + title?: string; + updated?: string; + } + export interface TimelineListResponse { + items?: Mirror.Schema.TimelineItem[]; + kind?: string; + nextPageToken?: string; + } + export interface UserAction { + payload?: string; + type?: string; + } + export interface UserData { + key?: string; + value?: string; + } + } + } + export interface Mirror { + Accounts?: Mirror.Collection.AccountsCollection; + Contacts?: Mirror.Collection.ContactsCollection; + Locations?: Mirror.Collection.LocationsCollection; + Settings?: Mirror.Collection.SettingsCollection; + Subscriptions?: Mirror.Collection.SubscriptionsCollection; + Timeline?: Mirror.Collection.TimelineCollection; + // Create a new instance of Account + newAccount(): Mirror.Schema.Account; + // Create a new instance of Attachment + newAttachment(): Mirror.Schema.Attachment; + // Create a new instance of AuthToken + newAuthToken(): Mirror.Schema.AuthToken; + // Create a new instance of Command + newCommand(): Mirror.Schema.Command; + // Create a new instance of Contact + newContact(): Mirror.Schema.Contact; + // Create a new instance of Location + newLocation(): Mirror.Schema.Location; + // Create a new instance of MenuItem + newMenuItem(): Mirror.Schema.MenuItem; + // Create a new instance of MenuValue + newMenuValue(): Mirror.Schema.MenuValue; + // Create a new instance of Notification + newNotification(): Mirror.Schema.Notification; + // Create a new instance of NotificationConfig + newNotificationConfig(): Mirror.Schema.NotificationConfig; + // Create a new instance of Subscription + newSubscription(): Mirror.Schema.Subscription; + // Create a new instance of TimelineItem + newTimelineItem(): Mirror.Schema.TimelineItem; + // Create a new instance of UserAction + newUserAction(): Mirror.Schema.UserAction; + // Create a new instance of UserData + newUserData(): Mirror.Schema.UserData; + } +} + +declare var Mirror: GoogleAppsScript.Mirror; diff --git a/types/google-apps-script/apis/peopleapi_v1.d.ts b/types/google-apps-script/apis/peopleapi_v1.d.ts new file mode 100644 index 0000000000..21a54ca715 --- /dev/null +++ b/types/google-apps-script/apis/peopleapi_v1.d.ts @@ -0,0 +1,518 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace People { + namespace Collection { + namespace ContactGroups { + export interface MembersCollection { + // Modify the members of a contact group owned by the authenticated user. + //
+ // The only system contact groups that can have members added are + // `contactGroups/myContacts` and `contactGroups/starred`. Other system + // contact groups are deprecated and can only have contacts removed. + modify(resource: Schema.ModifyContactGroupMembersRequest, resourceName: string): Schema.ModifyContactGroupMembersResponse; + } + } + namespace People { + export interface ConnectionsCollection { + // Provides a list of the authenticated user's contacts merged with any + // connected profiles. + //
+ // The request throws a 400 error if 'personFields' is not specified. + list(resourceName: string): Schema.ListConnectionsResponse; + // Provides a list of the authenticated user's contacts merged with any + // connected profiles. + //
+ // The request throws a 400 error if 'personFields' is not specified. + list(resourceName: string, optionalArgs: object): Schema.ListConnectionsResponse; + } + } + export interface ContactGroupsCollection { + Members?: Collection.ContactGroups.MembersCollection; + // Get a list of contact groups owned by the authenticated user by specifying + // a list of contact group resource names. + batchGet(): Schema.BatchGetContactGroupsResponse; + // Get a list of contact groups owned by the authenticated user by specifying + // a list of contact group resource names. + batchGet(optionalArgs: object): Schema.BatchGetContactGroupsResponse; + // Create a new contact group owned by the authenticated user. + create(resource: Schema.CreateContactGroupRequest): Schema.ContactGroup; + // Get a specific contact group owned by the authenticated user by specifying + // a contact group resource name. + get(resourceName: string): Schema.ContactGroup; + // Get a specific contact group owned by the authenticated user by specifying + // a contact group resource name. + get(resourceName: string, optionalArgs: object): Schema.ContactGroup; + // List all contact groups owned by the authenticated user. Members of the + // contact groups are not populated. + list(): Schema.ListContactGroupsResponse; + // List all contact groups owned by the authenticated user. Members of the + // contact groups are not populated. + list(optionalArgs: object): Schema.ListContactGroupsResponse; + // Delete an existing contact group owned by the authenticated user by + // specifying a contact group resource name. + remove(resourceName: string): void; + // Delete an existing contact group owned by the authenticated user by + // specifying a contact group resource name. + remove(resourceName: string, optionalArgs: object): void; + // Update the name of an existing contact group owned by the authenticated + // user. + update(resource: Schema.UpdateContactGroupRequest, resourceName: string): Schema.ContactGroup; + } + export interface PeopleCollection { + Connections?: Collection.People.ConnectionsCollection; + // Create a new contact and return the person resource for that contact. + createContact(resource: Schema.Person): Schema.Person; + // Create a new contact and return the person resource for that contact. + createContact(resource: Schema.Person, optionalArgs: object): Schema.Person; + // Delete a contact person. Any non-contact data will not be deleted. + deleteContact(resourceName: string): void; + // Provides information about a person by specifying a resource name. Use + // `people/me` to indicate the authenticated user. + //
+ // The request throws a 400 error if 'personFields' is not specified. + get(resourceName: string): Schema.Person; + // Provides information about a person by specifying a resource name. Use + // `people/me` to indicate the authenticated user. + //
+ // The request throws a 400 error if 'personFields' is not specified. + get(resourceName: string, optionalArgs: object): Schema.Person; + // Provides information about a list of specific people by specifying a list + // of requested resource names. Use `people/me` to indicate the authenticated + // user. + //
+ // The request throws a 400 error if 'personFields' is not specified. + getBatchGet(): Schema.GetPeopleResponse; + // Provides information about a list of specific people by specifying a list + // of requested resource names. Use `people/me` to indicate the authenticated + // user. + //
+ // The request throws a 400 error if 'personFields' is not specified. + getBatchGet(optionalArgs: object): Schema.GetPeopleResponse; + // Update contact data for an existing contact person. Any non-contact data + // will not be modified. + // The request throws a 400 error if `updatePersonFields` is not specified. + //
+ // The request throws a 400 error if `person.metadata.sources` is not + // specified for the contact to be updated. + //
+ // The request throws a 412 error if `person.metadata.sources.etag` is + // different than the contact's etag, which indicates the contact has changed + // since its data was read. Clients should get the latest person and re-apply + // their updates to the latest person. + updateContact(resource: Schema.Person, resourceName: string): Schema.Person; + // Update contact data for an existing contact person. Any non-contact data + // will not be modified. + // The request throws a 400 error if `updatePersonFields` is not specified. + //
+ // The request throws a 400 error if `person.metadata.sources` is not + // specified for the contact to be updated. + //
+ // The request throws a 412 error if `person.metadata.sources.etag` is + // different than the contact's etag, which indicates the contact has changed + // since its data was read. Clients should get the latest person and re-apply + // their updates to the latest person. + updateContact(resource: Schema.Person, resourceName: string, optionalArgs: object): Schema.Person; + } + } + namespace Schema { + export interface Address { + city?: string; + country?: string; + countryCode?: string; + extendedAddress?: string; + formattedType?: string; + formattedValue?: string; + metadata?: People.Schema.FieldMetadata; + poBox?: string; + postalCode?: string; + region?: string; + streetAddress?: string; + type?: string; + } + export interface AgeRangeType { + ageRange?: string; + metadata?: People.Schema.FieldMetadata; + } + export interface BatchGetContactGroupsResponse { + responses?: People.Schema.ContactGroupResponse[]; + } + export interface Biography { + contentType?: string; + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface Birthday { + date?: People.Schema.Date; + metadata?: People.Schema.FieldMetadata; + text?: string; + } + export interface BraggingRights { + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface ContactGroup { + etag?: string; + formattedName?: string; + groupType?: string; + memberCount?: number; + memberResourceNames?: string[]; + metadata?: People.Schema.ContactGroupMetadata; + name?: string; + resourceName?: string; + } + export interface ContactGroupMembership { + contactGroupId?: string; + } + export interface ContactGroupMetadata { + deleted?: boolean; + updateTime?: string; + } + export interface ContactGroupResponse { + contactGroup?: People.Schema.ContactGroup; + requestedResourceName?: string; + status?: People.Schema.Status; + } + export interface CoverPhoto { + default?: boolean; + metadata?: People.Schema.FieldMetadata; + url?: string; + } + export interface CreateContactGroupRequest { + contactGroup?: People.Schema.ContactGroup; + } + export interface Date { + day?: number; + month?: number; + year?: number; + } + export interface DomainMembership { + inViewerDomain?: boolean; + } + export interface EmailAddress { + displayName?: string; + formattedType?: string; + metadata?: People.Schema.FieldMetadata; + type?: string; + value?: string; + } + export interface Event { + date?: People.Schema.Date; + formattedType?: string; + metadata?: People.Schema.FieldMetadata; + type?: string; + } + export interface FieldMetadata { + primary?: boolean; + source?: People.Schema.Source; + verified?: boolean; + } + export interface Gender { + formattedValue?: string; + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface GetPeopleResponse { + responses?: People.Schema.PersonResponse[]; + } + export interface ImClient { + formattedProtocol?: string; + formattedType?: string; + metadata?: People.Schema.FieldMetadata; + protocol?: string; + type?: string; + username?: string; + } + export interface Interest { + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface ListConnectionsResponse { + connections?: People.Schema.Person[]; + nextPageToken?: string; + nextSyncToken?: string; + totalItems?: number; + totalPeople?: number; + } + export interface ListContactGroupsResponse { + contactGroups?: People.Schema.ContactGroup[]; + nextPageToken?: string; + nextSyncToken?: string; + totalItems?: number; + } + export interface Locale { + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface Membership { + contactGroupMembership?: People.Schema.ContactGroupMembership; + domainMembership?: People.Schema.DomainMembership; + metadata?: People.Schema.FieldMetadata; + } + export interface ModifyContactGroupMembersRequest { + resourceNamesToAdd?: string[]; + resourceNamesToRemove?: string[]; + } + export interface ModifyContactGroupMembersResponse { + notFoundResourceNames?: string[]; + } + export interface Name { + displayName?: string; + displayNameLastFirst?: string; + familyName?: string; + givenName?: string; + honorificPrefix?: string; + honorificSuffix?: string; + metadata?: People.Schema.FieldMetadata; + middleName?: string; + phoneticFamilyName?: string; + phoneticFullName?: string; + phoneticGivenName?: string; + phoneticHonorificPrefix?: string; + phoneticHonorificSuffix?: string; + phoneticMiddleName?: string; + } + export interface Nickname { + metadata?: People.Schema.FieldMetadata; + type?: string; + value?: string; + } + export interface Occupation { + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface Organization { + current?: boolean; + department?: string; + domain?: string; + endDate?: People.Schema.Date; + formattedType?: string; + jobDescription?: string; + location?: string; + metadata?: People.Schema.FieldMetadata; + name?: string; + phoneticName?: string; + startDate?: People.Schema.Date; + symbol?: string; + title?: string; + type?: string; + } + export interface Person { + addresses?: People.Schema.Address[]; + ageRange?: string; + ageRanges?: People.Schema.AgeRangeType[]; + biographies?: People.Schema.Biography[]; + birthdays?: People.Schema.Birthday[]; + braggingRights?: People.Schema.BraggingRights[]; + coverPhotos?: People.Schema.CoverPhoto[]; + emailAddresses?: People.Schema.EmailAddress[]; + etag?: string; + events?: People.Schema.Event[]; + genders?: People.Schema.Gender[]; + imClients?: People.Schema.ImClient[]; + interests?: People.Schema.Interest[]; + locales?: People.Schema.Locale[]; + memberships?: People.Schema.Membership[]; + metadata?: People.Schema.PersonMetadata; + names?: People.Schema.Name[]; + nicknames?: People.Schema.Nickname[]; + occupations?: People.Schema.Occupation[]; + organizations?: People.Schema.Organization[]; + phoneNumbers?: People.Schema.PhoneNumber[]; + photos?: People.Schema.Photo[]; + relations?: People.Schema.Relation[]; + relationshipInterests?: People.Schema.RelationshipInterest[]; + relationshipStatuses?: People.Schema.RelationshipStatus[]; + residences?: People.Schema.Residence[]; + resourceName?: string; + sipAddresses?: People.Schema.SipAddress[]; + skills?: People.Schema.Skill[]; + taglines?: People.Schema.Tagline[]; + urls?: People.Schema.Url[]; + userDefined?: People.Schema.UserDefined[]; + } + export interface PersonMetadata { + deleted?: boolean; + linkedPeopleResourceNames?: string[]; + objectType?: string; + previousResourceNames?: string[]; + sources?: People.Schema.Source[]; + } + export interface PersonResponse { + httpStatusCode?: number; + person?: People.Schema.Person; + requestedResourceName?: string; + status?: People.Schema.Status; + } + export interface PhoneNumber { + canonicalForm?: string; + formattedType?: string; + metadata?: People.Schema.FieldMetadata; + type?: string; + value?: string; + } + export interface Photo { + default?: boolean; + metadata?: People.Schema.FieldMetadata; + url?: string; + } + export interface ProfileMetadata { + objectType?: string; + userTypes?: string[]; + } + export interface Relation { + formattedType?: string; + metadata?: People.Schema.FieldMetadata; + person?: string; + type?: string; + } + export interface RelationshipInterest { + formattedValue?: string; + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface RelationshipStatus { + formattedValue?: string; + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface Residence { + current?: boolean; + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface SipAddress { + formattedType?: string; + metadata?: People.Schema.FieldMetadata; + type?: string; + value?: string; + } + export interface Skill { + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface Source { + etag?: string; + id?: string; + profileMetadata?: People.Schema.ProfileMetadata; + type?: string; + updateTime?: string; + } + export interface Status { + code?: number; + details?: Object[]; + message?: string; + } + export interface Tagline { + metadata?: People.Schema.FieldMetadata; + value?: string; + } + export interface UpdateContactGroupRequest { + contactGroup?: People.Schema.ContactGroup; + } + export interface Url { + formattedType?: string; + metadata?: People.Schema.FieldMetadata; + type?: string; + value?: string; + } + export interface UserDefined { + key?: string; + metadata?: People.Schema.FieldMetadata; + value?: string; + } + } + } + export interface People { + ContactGroups?: People.Collection.ContactGroupsCollection; + People?: People.Collection.PeopleCollection; + // Create a new instance of Address + newAddress(): People.Schema.Address; + // Create a new instance of AgeRangeType + newAgeRangeType(): People.Schema.AgeRangeType; + // Create a new instance of Biography + newBiography(): People.Schema.Biography; + // Create a new instance of Birthday + newBirthday(): People.Schema.Birthday; + // Create a new instance of BraggingRights + newBraggingRights(): People.Schema.BraggingRights; + // Create a new instance of ContactGroup + newContactGroup(): People.Schema.ContactGroup; + // Create a new instance of ContactGroupMembership + newContactGroupMembership(): People.Schema.ContactGroupMembership; + // Create a new instance of ContactGroupMetadata + newContactGroupMetadata(): People.Schema.ContactGroupMetadata; + // Create a new instance of CoverPhoto + newCoverPhoto(): People.Schema.CoverPhoto; + // Create a new instance of CreateContactGroupRequest + newCreateContactGroupRequest(): People.Schema.CreateContactGroupRequest; + // Create a new instance of Date + newDate(): People.Schema.Date; + // Create a new instance of DomainMembership + newDomainMembership(): People.Schema.DomainMembership; + // Create a new instance of EmailAddress + newEmailAddress(): People.Schema.EmailAddress; + // Create a new instance of Event + newEvent(): People.Schema.Event; + // Create a new instance of FieldMetadata + newFieldMetadata(): People.Schema.FieldMetadata; + // Create a new instance of Gender + newGender(): People.Schema.Gender; + // Create a new instance of ImClient + newImClient(): People.Schema.ImClient; + // Create a new instance of Interest + newInterest(): People.Schema.Interest; + // Create a new instance of Locale + newLocale(): People.Schema.Locale; + // Create a new instance of Membership + newMembership(): People.Schema.Membership; + // Create a new instance of ModifyContactGroupMembersRequest + newModifyContactGroupMembersRequest(): People.Schema.ModifyContactGroupMembersRequest; + // Create a new instance of Name + newName(): People.Schema.Name; + // Create a new instance of Nickname + newNickname(): People.Schema.Nickname; + // Create a new instance of Occupation + newOccupation(): People.Schema.Occupation; + // Create a new instance of Organization + newOrganization(): People.Schema.Organization; + // Create a new instance of Person + newPerson(): People.Schema.Person; + // Create a new instance of PersonMetadata + newPersonMetadata(): People.Schema.PersonMetadata; + // Create a new instance of PhoneNumber + newPhoneNumber(): People.Schema.PhoneNumber; + // Create a new instance of Photo + newPhoto(): People.Schema.Photo; + // Create a new instance of ProfileMetadata + newProfileMetadata(): People.Schema.ProfileMetadata; + // Create a new instance of Relation + newRelation(): People.Schema.Relation; + // Create a new instance of RelationshipInterest + newRelationshipInterest(): People.Schema.RelationshipInterest; + // Create a new instance of RelationshipStatus + newRelationshipStatus(): People.Schema.RelationshipStatus; + // Create a new instance of Residence + newResidence(): People.Schema.Residence; + // Create a new instance of SipAddress + newSipAddress(): People.Schema.SipAddress; + // Create a new instance of Skill + newSkill(): People.Schema.Skill; + // Create a new instance of Source + newSource(): People.Schema.Source; + // Create a new instance of Tagline + newTagline(): People.Schema.Tagline; + // Create a new instance of UpdateContactGroupRequest + newUpdateContactGroupRequest(): People.Schema.UpdateContactGroupRequest; + // Create a new instance of Url + newUrl(): People.Schema.Url; + // Create a new instance of UserDefined + newUserDefined(): People.Schema.UserDefined; + } +} + +declare var People: GoogleAppsScript.People; diff --git a/types/google-apps-script/apis/plus/v1.d.ts b/types/google-apps-script/apis/plus/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/plusDomains/v1.d.ts b/types/google-apps-script/apis/plusDomains/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/reports_v1.d.ts b/types/google-apps-script/apis/reports_v1.d.ts new file mode 100644 index 0000000000..21a91855b6 --- /dev/null +++ b/types/google-apps-script/apis/reports_v1.d.ts @@ -0,0 +1,147 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace AdminReports { + namespace Collection { + export interface ActivitiesCollection { + // Retrieves a list of activities for a specific customer and application. + list(userKey: string, applicationName: string): AdminReports.Schema.Activities; + // Retrieves a list of activities for a specific customer and application. + list(userKey: string, applicationName: string, optionalArgs: object): AdminReports.Schema.Activities; + // Push changes to activities + watch(resource: Schema.Channel, userKey: string, applicationName: string): AdminReports.Schema.Channel; + // Push changes to activities + watch(resource: Schema.Channel, userKey: string, applicationName: string, optionalArgs: object): AdminReports.Schema.Channel; + } + export interface ChannelsCollection { + // Stop watching resources through this channel + stop(resource: Schema.Channel): void; + } + export interface CustomerUsageReportsCollection { + // Retrieves a report which is a collection of properties / statistics for a specific customer. + get(date: string): AdminReports.Schema.UsageReports; + // Retrieves a report which is a collection of properties / statistics for a specific customer. + get(date: string, optionalArgs: object): AdminReports.Schema.UsageReports; + } + export interface EntityUsageReportsCollection { + // Retrieves a report which is a collection of properties / statistics for a set of objects. + get(entityType: string, entityKey: string, date: string): AdminReports.Schema.UsageReports; + // Retrieves a report which is a collection of properties / statistics for a set of objects. + get(entityType: string, entityKey: string, date: string, optionalArgs: object): AdminReports.Schema.UsageReports; + } + export interface UserUsageReportCollection { + // Retrieves a report which is a collection of properties / statistics for a set of users. + get(userKey: string, date: string): AdminReports.Schema.UsageReports; + // Retrieves a report which is a collection of properties / statistics for a set of users. + get(userKey: string, date: string, optionalArgs: object): AdminReports.Schema.UsageReports; + } + } + namespace Schema { + export interface Activities { + etag?: string; + items?: AdminReports.Schema.Activity[]; + kind?: string; + nextPageToken?: string; + } + export interface Activity { + actor?: AdminReports.Schema.ActivityActor; + etag?: string; + events?: AdminReports.Schema.ActivityEvents[]; + id?: AdminReports.Schema.ActivityId; + ipAddress?: string; + kind?: string; + ownerDomain?: string; + } + export interface ActivityActor { + callerType?: string; + email?: string; + key?: string; + profileId?: string; + } + export interface ActivityEvents { + name?: string; + parameters?: AdminReports.Schema.ActivityEventsParameters[]; + type?: string; + } + export interface ActivityEventsParameters { + boolValue?: boolean; + intValue?: string; + multiIntValue?: string[]; + multiValue?: string[]; + name?: string; + value?: string; + } + export interface ActivityId { + applicationName?: string; + customerId?: string; + time?: string; + uniqueQualifier?: string; + } + export interface Channel { + address?: string; + expiration?: string; + id?: string; + kind?: string; + params?: object; + payload?: boolean; + resourceId?: string; + resourceUri?: string; + token?: string; + type?: string; + } + export interface UsageReport { + date?: string; + entity?: AdminReports.Schema.UsageReportEntity; + etag?: string; + kind?: string; + parameters?: AdminReports.Schema.UsageReportParameters[]; + } + export interface UsageReportEntity { + customerId?: string; + entityId?: string; + profileId?: string; + type?: string; + userEmail?: string; + } + export interface UsageReportParameters { + boolValue?: boolean; + datetimeValue?: string; + intValue?: string; + msgValue?: Object[]; + name?: string; + stringValue?: string; + } + export interface UsageReports { + etag?: string; + kind?: string; + nextPageToken?: string; + usageReports?: AdminReports.Schema.UsageReport[]; + warnings?: AdminReports.Schema.UsageReportsWarnings[]; + } + export interface UsageReportsWarnings { + code?: string; + data?: AdminReports.Schema.UsageReportsWarningsData[]; + message?: string; + } + export interface UsageReportsWarningsData { + key?: string; + value?: string; + } + } + } + export interface AdminReports { + Activities?: AdminReports.Collection.ActivitiesCollection; + Channels?: AdminReports.Collection.ChannelsCollection; + CustomerUsageReports?: AdminReports.Collection.CustomerUsageReportsCollection; + EntityUsageReports?: AdminReports.Collection.EntityUsageReportsCollection; + UserUsageReport?: AdminReports.Collection.UserUsageReportCollection; + // Create a new instance of Channel + newChannel(): AdminReports.Schema.Channel; + } +} + +declare var AdminReports: GoogleAppsScript.AdminReports; diff --git a/types/google-apps-script/apis/reseller/v1.d.ts b/types/google-apps-script/apis/reseller/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/reseller_v1.d.ts b/types/google-apps-script/apis/reseller_v1.d.ts new file mode 100644 index 0000000000..4a3d7de349 --- /dev/null +++ b/types/google-apps-script/apis/reseller_v1.d.ts @@ -0,0 +1,179 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace AdminReseller { + namespace Collection { + export interface CustomersCollection { + // Get a customer account. + get(customerId: string): AdminReseller.Schema.Customer; + // Order a new customer's account. + insert(resource: Schema.Customer): AdminReseller.Schema.Customer; + // Order a new customer's account. + insert(resource: Schema.Customer, optionalArgs: object): AdminReseller.Schema.Customer; + // Update a customer account's settings. This method supports patch semantics. + patch(resource: Schema.Customer, customerId: string): AdminReseller.Schema.Customer; + // Update a customer account's settings. + update(resource: Schema.Customer, customerId: string): AdminReseller.Schema.Customer; + } + export interface ResellernotifyCollection { + // Returns all the details of the watch corresponding to the reseller. + getwatchdetails(): AdminReseller.Schema.ResellernotifyGetwatchdetailsResponse; + // Registers a Reseller for receiving notifications. + register(): AdminReseller.Schema.ResellernotifyResource; + // Registers a Reseller for receiving notifications. + register(optionalArgs: object): AdminReseller.Schema.ResellernotifyResource; + // Unregisters a Reseller for receiving notifications. + unregister(): AdminReseller.Schema.ResellernotifyResource; + // Unregisters a Reseller for receiving notifications. + unregister(optionalArgs: object): AdminReseller.Schema.ResellernotifyResource; + } + export interface SubscriptionsCollection { + // Activates a subscription previously suspended by the reseller + activate(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; + // Update a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments. + changePlan(resource: Schema.ChangePlanRequest, customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; + // Update a user license's renewal settings. This is applicable for accounts with annual commitment plans only. + changeRenewalSettings(resource: Schema.RenewalSettings, customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; + // Update a subscription's user license settings. + changeSeats(resource: Schema.Seats, customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; + // Get a specific subscription. + get(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; + // Create or transfer a subscription. + insert(resource: Schema.Subscription, customerId: string): AdminReseller.Schema.Subscription; + // Create or transfer a subscription. + insert(resource: Schema.Subscription, customerId: string, optionalArgs: object): AdminReseller.Schema.Subscription; + // List of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions. + list(): AdminReseller.Schema.Subscriptions; + // List of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions. + list(optionalArgs: object): AdminReseller.Schema.Subscriptions; + // Cancel or transfer a subscription to direct. + remove(customerId: string, subscriptionId: string, deletionType: string): void; + // Immediately move a 30-day free trial subscription to a paid service subscription. + startPaidService(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; + // Suspends an active subscription. + suspend(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; + } + } + namespace Schema { + export interface Address { + addressLine1?: string; + addressLine2?: string; + addressLine3?: string; + contactName?: string; + countryCode?: string; + kind?: string; + locality?: string; + organizationName?: string; + postalCode?: string; + region?: string; + } + export interface ChangePlanRequest { + dealCode?: string; + kind?: string; + planName?: string; + purchaseOrderId?: string; + seats?: AdminReseller.Schema.Seats; + } + export interface Customer { + alternateEmail?: string; + customerDomain?: string; + customerDomainVerified?: boolean; + customerId?: string; + kind?: string; + phoneNumber?: string; + postalAddress?: AdminReseller.Schema.Address; + resourceUiUrl?: string; + } + export interface RenewalSettings { + kind?: string; + renewalType?: string; + } + export interface ResellernotifyGetwatchdetailsResponse { + serviceAccountEmailAddresses?: string[]; + topicName?: string; + } + export interface ResellernotifyResource { + topicName?: string; + } + export interface Seats { + kind?: string; + licensedNumberOfSeats?: number; + maximumNumberOfSeats?: number; + numberOfSeats?: number; + } + export interface Subscription { + billingMethod?: string; + creationTime?: string; + customerDomain?: string; + customerId?: string; + dealCode?: string; + kind?: string; + plan?: AdminReseller.Schema.SubscriptionPlan; + purchaseOrderId?: string; + renewalSettings?: AdminReseller.Schema.RenewalSettings; + resourceUiUrl?: string; + seats?: AdminReseller.Schema.Seats; + skuId?: string; + skuName?: string; + status?: string; + subscriptionId?: string; + suspensionReasons?: string[]; + transferInfo?: AdminReseller.Schema.SubscriptionTransferInfo; + trialSettings?: AdminReseller.Schema.SubscriptionTrialSettings; + } + export interface SubscriptionPlan { + commitmentInterval?: AdminReseller.Schema.SubscriptionPlanCommitmentInterval; + isCommitmentPlan?: boolean; + planName?: string; + } + export interface SubscriptionPlanCommitmentInterval { + endTime?: string; + startTime?: string; + } + export interface SubscriptionTransferInfo { + minimumTransferableSeats?: number; + transferabilityExpirationTime?: string; + } + export interface SubscriptionTrialSettings { + isInTrial?: boolean; + trialEndTime?: string; + } + export interface Subscriptions { + kind?: string; + nextPageToken?: string; + subscriptions?: AdminReseller.Schema.Subscription[]; + } + } + } + export interface AdminReseller { + Customers?: AdminReseller.Collection.CustomersCollection; + Resellernotify?: AdminReseller.Collection.ResellernotifyCollection; + Subscriptions?: AdminReseller.Collection.SubscriptionsCollection; + // Create a new instance of Address + newAddress(): AdminReseller.Schema.Address; + // Create a new instance of ChangePlanRequest + newChangePlanRequest(): AdminReseller.Schema.ChangePlanRequest; + // Create a new instance of Customer + newCustomer(): AdminReseller.Schema.Customer; + // Create a new instance of RenewalSettings + newRenewalSettings(): AdminReseller.Schema.RenewalSettings; + // Create a new instance of Seats + newSeats(): AdminReseller.Schema.Seats; + // Create a new instance of Subscription + newSubscription(): AdminReseller.Schema.Subscription; + // Create a new instance of SubscriptionPlan + newSubscriptionPlan(): AdminReseller.Schema.SubscriptionPlan; + // Create a new instance of SubscriptionPlanCommitmentInterval + newSubscriptionPlanCommitmentInterval(): AdminReseller.Schema.SubscriptionPlanCommitmentInterval; + // Create a new instance of SubscriptionTransferInfo + newSubscriptionTransferInfo(): AdminReseller.Schema.SubscriptionTransferInfo; + // Create a new instance of SubscriptionTrialSettings + newSubscriptionTrialSettings(): AdminReseller.Schema.SubscriptionTrialSettings; + } +} + +declare var AdminReseller: GoogleAppsScript.AdminReseller; diff --git a/types/google-apps-script/apis/sheets/v4.d.ts b/types/google-apps-script/apis/sheets/v4.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/sheets_v4.d.ts b/types/google-apps-script/apis/sheets_v4.d.ts new file mode 100644 index 0000000000..5d2bef8429 --- /dev/null +++ b/types/google-apps-script/apis/sheets_v4.d.ts @@ -0,0 +1,1524 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Sheets { + namespace Collection { + namespace Spreadsheets { + export interface DeveloperMetadataCollection { + // Returns the developer metadata with the specified ID. + // The caller must specify the spreadsheet ID and the developer metadata's + // unique metadataId. + get(spreadsheetId: string, metadataId: number): Sheets.Schema.DeveloperMetadata; + // Returns all developer metadata matching the specified DataFilter. + // If the provided DataFilter represents a DeveloperMetadataLookup object, + // this will return all DeveloperMetadata entries selected by it. If the + // DataFilter represents a location in a spreadsheet, this will return all + // developer metadata associated with locations intersecting that region. + search(resource: Schema.SearchDeveloperMetadataRequest, spreadsheetId: string): Sheets.Schema.SearchDeveloperMetadataResponse; + } + export interface SheetsCollection { + // Copies a single sheet from a spreadsheet to another spreadsheet. + // Returns the properties of the newly created sheet. + copyTo(resource: Schema.CopySheetToAnotherSpreadsheetRequest, spreadsheetId: string, sheetId: number): Sheets.Schema.SheetProperties; + } + export interface ValuesCollection { + // Appends values to a spreadsheet. The input range is used to search for + // existing data and find a "table" within that range. Values will be + // appended to the next row of the table, starting with the first column of + // the table. See the + // [guide](/sheets/api/guides/values#appending_values) + // and + // [sample code](/sheets/api/samples/writing#append_values) + // for specific details of how tables are detected and data is appended. + // The caller must specify the spreadsheet ID, range, and + // a valueInputOption. The `valueInputOption` only + // controls how the input data will be added to the sheet (column-wise or + // row-wise), it does not influence what cell the data starts being written + // to. + append(resource: Schema.ValueRange, spreadsheetId: string, range: string): Sheets.Schema.AppendValuesResponse; + // Appends values to a spreadsheet. The input range is used to search for + // existing data and find a "table" within that range. Values will be + // appended to the next row of the table, starting with the first column of + // the table. See the + // [guide](/sheets/api/guides/values#appending_values) + // and + // [sample code](/sheets/api/samples/writing#append_values) + // for specific details of how tables are detected and data is appended. + // The caller must specify the spreadsheet ID, range, and + // a valueInputOption. The `valueInputOption` only + // controls how the input data will be added to the sheet (column-wise or + // row-wise), it does not influence what cell the data starts being written + // to. + append(resource: Schema.ValueRange, spreadsheetId: string, range: string, optionalArgs: object): Sheets.Schema.AppendValuesResponse; + // Clears one or more ranges of values from a spreadsheet. + // The caller must specify the spreadsheet ID and one or more ranges. + // Only values are cleared -- all other properties of the cell (such as + // formatting, data validation, etc..) are kept. + batchClear(resource: Schema.BatchClearValuesRequest, spreadsheetId: string): Sheets.Schema.BatchClearValuesResponse; + // Clears one or more ranges of values from a spreadsheet. + // The caller must specify the spreadsheet ID and one or more + // DataFilters. Ranges matching any of the specified data + // filters will be cleared. Only values are cleared -- all other properties + // of the cell (such as formatting, data validation, etc..) are kept. + batchClearByDataFilter(resource: Schema.BatchClearValuesByDataFilterRequest, spreadsheetId: string): Sheets.Schema.BatchClearValuesByDataFilterResponse; + // Returns one or more ranges of values from a spreadsheet. + // The caller must specify the spreadsheet ID and one or more ranges. + batchGet(spreadsheetId: string): Sheets.Schema.BatchGetValuesResponse; + // Returns one or more ranges of values from a spreadsheet. + // The caller must specify the spreadsheet ID and one or more ranges. + batchGet(spreadsheetId: string, optionalArgs: object): Sheets.Schema.BatchGetValuesResponse; + // Returns one or more ranges of values that match the specified data filters. + // The caller must specify the spreadsheet ID and one or more + // DataFilters. Ranges that match any of the data filters in + // the request will be returned. + batchGetByDataFilter(resource: Schema.BatchGetValuesByDataFilterRequest, spreadsheetId: string): Sheets.Schema.BatchGetValuesByDataFilterResponse; + // Sets values in one or more ranges of a spreadsheet. + // The caller must specify the spreadsheet ID, + // a valueInputOption, and one or more + // ValueRanges. + batchUpdate(resource: Schema.BatchUpdateValuesRequest, spreadsheetId: string): Sheets.Schema.BatchUpdateValuesResponse; + // Sets values in one or more ranges of a spreadsheet. + // The caller must specify the spreadsheet ID, + // a valueInputOption, and one or more + // DataFilterValueRanges. + batchUpdateByDataFilter(resource: Schema.BatchUpdateValuesByDataFilterRequest, spreadsheetId: string): Sheets.Schema.BatchUpdateValuesByDataFilterResponse; + // Clears values from a spreadsheet. + // The caller must specify the spreadsheet ID and range. + // Only values are cleared -- all other properties of the cell (such as + // formatting, data validation, etc..) are kept. + clear(resource: any, /* Schema.ClearValuesRequest */ spreadsheetId: string, range: string): Sheets.Schema.ClearValuesResponse; + // Returns a range of values from a spreadsheet. + // The caller must specify the spreadsheet ID and a range. + get(spreadsheetId: string, range: string): Sheets.Schema.ValueRange; + // Returns a range of values from a spreadsheet. + // The caller must specify the spreadsheet ID and a range. + get(spreadsheetId: string, range: string, optionalArgs: object): Sheets.Schema.ValueRange; + // Sets values in a range of a spreadsheet. + // The caller must specify the spreadsheet ID, range, and + // a valueInputOption. + update(resource: Schema.ValueRange, spreadsheetId: string, range: string): Sheets.Schema.UpdateValuesResponse; + // Sets values in a range of a spreadsheet. + // The caller must specify the spreadsheet ID, range, and + // a valueInputOption. + update(resource: Schema.ValueRange, spreadsheetId: string, range: string, optionalArgs: object): Sheets.Schema.UpdateValuesResponse; + } + } + export interface SpreadsheetsCollection { + DeveloperMetadata?: Sheets.Collection.Spreadsheets.DeveloperMetadataCollection; + Sheets?: Sheets.Collection.Spreadsheets.SheetsCollection; + Values?: Sheets.Collection.Spreadsheets.ValuesCollection; + // Applies one or more updates to the spreadsheet. + // Each request is validated before + // being applied. If any request is not valid then the entire request will + // fail and nothing will be applied. + // Some requests have replies to + // give you some information about how + // they are applied. The replies will mirror the requests. For example, + // if you applied 4 updates and the 3rd one had a reply, then the + // response will have 2 empty replies, the actual reply, and another empty + // reply, in that order. + // Due to the collaborative nature of spreadsheets, it is not guaranteed that + // the spreadsheet will reflect exactly your changes after this completes, + // however it is guaranteed that the updates in the request will be + // applied together atomically. Your changes may be altered with respect to + // collaborator changes. If there are no collaborators, the spreadsheet + // should reflect your changes. + batchUpdate(resource: Schema.BatchUpdateSpreadsheetRequest, spreadsheetId: string): Sheets.Schema.BatchUpdateSpreadsheetResponse; + // Creates a spreadsheet, returning the newly created spreadsheet. + create(resource: Schema.Spreadsheet): Sheets.Schema.Spreadsheet; + // Returns the spreadsheet at the given ID. + // The caller must specify the spreadsheet ID. + // By default, data within grids will not be returned. + // You can include grid data one of two ways: + // * Specify a field mask listing your desired fields using the `fields` URL + // parameter in HTTP + // * Set the includeGridData + // URL parameter to true. If a field mask is set, the `includeGridData` + // parameter is ignored + // For large spreadsheets, it is recommended to retrieve only the specific + // fields of the spreadsheet that you want. + // To retrieve only subsets of the spreadsheet, use the + // ranges URL parameter. + // Multiple ranges can be specified. Limiting the range will + // return only the portions of the spreadsheet that intersect the requested + // ranges. Ranges are specified using A1 notation. + get(spreadsheetId: string): Sheets.Schema.Spreadsheet; + // Returns the spreadsheet at the given ID. + // The caller must specify the spreadsheet ID. + // By default, data within grids will not be returned. + // You can include grid data one of two ways: + // * Specify a field mask listing your desired fields using the `fields` URL + // parameter in HTTP + // * Set the includeGridData + // URL parameter to true. If a field mask is set, the `includeGridData` + // parameter is ignored + // For large spreadsheets, it is recommended to retrieve only the specific + // fields of the spreadsheet that you want. + // To retrieve only subsets of the spreadsheet, use the + // ranges URL parameter. + // Multiple ranges can be specified. Limiting the range will + // return only the portions of the spreadsheet that intersect the requested + // ranges. Ranges are specified using A1 notation. + get(spreadsheetId: string, optionalArgs: object): Sheets.Schema.Spreadsheet; + // Returns the spreadsheet at the given ID. + // The caller must specify the spreadsheet ID. + // This method differs from GetSpreadsheet in that it allows selecting + // which subsets of spreadsheet data to return by specifying a + // dataFilters parameter. + // Multiple DataFilters can be specified. Specifying one or + // more data filters will return the portions of the spreadsheet that + // intersect ranges matched by any of the filters. + // By default, data within grids will not be returned. + // You can include grid data one of two ways: + // * Specify a field mask listing your desired fields using the `fields` URL + // parameter in HTTP + // * Set the includeGridData + // parameter to true. If a field mask is set, the `includeGridData` + // parameter is ignored + // For large spreadsheets, it is recommended to retrieve only the specific + // fields of the spreadsheet that you want. + getByDataFilter(resource: Schema.GetSpreadsheetByDataFilterRequest, spreadsheetId: string): Sheets.Schema.Spreadsheet; + } + } + namespace Schema { + export interface AddBandingRequest { + bandedRange?: Sheets.Schema.BandedRange; + } + export interface AddBandingResponse { + bandedRange?: Sheets.Schema.BandedRange; + } + export interface AddChartRequest { + chart?: Sheets.Schema.EmbeddedChart; + } + export interface AddChartResponse { + chart?: Sheets.Schema.EmbeddedChart; + } + export interface AddConditionalFormatRuleRequest { + index?: number; + rule?: Sheets.Schema.ConditionalFormatRule; + } + export interface AddDimensionGroupRequest { + range?: Sheets.Schema.DimensionRange; + } + export interface AddDimensionGroupResponse { + dimensionGroups?: Sheets.Schema.DimensionGroup[]; + } + export interface AddFilterViewRequest { + filter?: Sheets.Schema.FilterView; + } + export interface AddFilterViewResponse { + filter?: Sheets.Schema.FilterView; + } + export interface AddNamedRangeRequest { + namedRange?: Sheets.Schema.NamedRange; + } + export interface AddNamedRangeResponse { + namedRange?: Sheets.Schema.NamedRange; + } + export interface AddProtectedRangeRequest { + protectedRange?: Sheets.Schema.ProtectedRange; + } + export interface AddProtectedRangeResponse { + protectedRange?: Sheets.Schema.ProtectedRange; + } + export interface AddSheetRequest { + properties?: Sheets.Schema.SheetProperties; + } + export interface AddSheetResponse { + properties?: Sheets.Schema.SheetProperties; + } + export interface AppendCellsRequest { + fields?: string; + rows?: Sheets.Schema.RowData[]; + sheetId?: number; + } + export interface AppendDimensionRequest { + dimension?: string; + length?: number; + sheetId?: number; + } + export interface AppendValuesResponse { + spreadsheetId?: string; + tableRange?: string; + updates?: Sheets.Schema.UpdateValuesResponse; + } + export interface AutoFillRequest { + range?: Sheets.Schema.GridRange; + sourceAndDestination?: Sheets.Schema.SourceAndDestination; + useAlternateSeries?: boolean; + } + export interface AutoResizeDimensionsRequest { + dimensions?: Sheets.Schema.DimensionRange; + } + export interface BandedRange { + bandedRangeId?: number; + columnProperties?: Sheets.Schema.BandingProperties; + range?: Sheets.Schema.GridRange; + rowProperties?: Sheets.Schema.BandingProperties; + } + export interface BandingProperties { + firstBandColor?: Sheets.Schema.Color; + footerColor?: Sheets.Schema.Color; + headerColor?: Sheets.Schema.Color; + secondBandColor?: Sheets.Schema.Color; + } + export interface BasicChartAxis { + format?: Sheets.Schema.TextFormat; + position?: string; + title?: string; + titleTextPosition?: Sheets.Schema.TextPosition; + } + export interface BasicChartDomain { + domain?: Sheets.Schema.ChartData; + reversed?: boolean; + } + export interface BasicChartSeries { + color?: Sheets.Schema.Color; + lineStyle?: Sheets.Schema.LineStyle; + series?: Sheets.Schema.ChartData; + targetAxis?: string; + type?: string; + } + export interface BasicChartSpec { + axis?: Sheets.Schema.BasicChartAxis[]; + chartType?: string; + compareMode?: string; + domains?: Sheets.Schema.BasicChartDomain[]; + headerCount?: number; + interpolateNulls?: boolean; + legendPosition?: string; + lineSmoothing?: boolean; + series?: Sheets.Schema.BasicChartSeries[]; + stackedType?: string; + threeDimensional?: boolean; + } + export interface BasicFilter { + criteria?: object; + range?: Sheets.Schema.GridRange; + sortSpecs?: Sheets.Schema.SortSpec[]; + } + export interface BatchClearValuesByDataFilterRequest { + dataFilters?: Sheets.Schema.DataFilter[]; + } + export interface BatchClearValuesByDataFilterResponse { + clearedRanges?: string[]; + spreadsheetId?: string; + } + export interface BatchClearValuesRequest { + ranges?: string[]; + } + export interface BatchClearValuesResponse { + clearedRanges?: string[]; + spreadsheetId?: string; + } + export interface BatchGetValuesByDataFilterRequest { + dataFilters?: Sheets.Schema.DataFilter[]; + dateTimeRenderOption?: string; + majorDimension?: string; + valueRenderOption?: string; + } + export interface BatchGetValuesByDataFilterResponse { + spreadsheetId?: string; + valueRanges?: Sheets.Schema.MatchedValueRange[]; + } + export interface BatchGetValuesResponse { + spreadsheetId?: string; + valueRanges?: Sheets.Schema.ValueRange[]; + } + export interface BatchUpdateSpreadsheetRequest { + includeSpreadsheetInResponse?: boolean; + requests?: Sheets.Schema.Request[]; + responseIncludeGridData?: boolean; + responseRanges?: string[]; + } + export interface BatchUpdateSpreadsheetResponse { + replies?: Sheets.Schema.Response[]; + spreadsheetId?: string; + updatedSpreadsheet?: Sheets.Schema.Spreadsheet; + } + export interface BatchUpdateValuesByDataFilterRequest { + data?: Sheets.Schema.DataFilterValueRange[]; + includeValuesInResponse?: boolean; + responseDateTimeRenderOption?: string; + responseValueRenderOption?: string; + valueInputOption?: string; + } + export interface BatchUpdateValuesByDataFilterResponse { + responses?: Sheets.Schema.UpdateValuesByDataFilterResponse[]; + spreadsheetId?: string; + totalUpdatedCells?: number; + totalUpdatedColumns?: number; + totalUpdatedRows?: number; + totalUpdatedSheets?: number; + } + export interface BatchUpdateValuesRequest { + data?: Sheets.Schema.ValueRange[]; + includeValuesInResponse?: boolean; + responseDateTimeRenderOption?: string; + responseValueRenderOption?: string; + valueInputOption?: string; + } + export interface BatchUpdateValuesResponse { + responses?: Sheets.Schema.UpdateValuesResponse[]; + spreadsheetId?: string; + totalUpdatedCells?: number; + totalUpdatedColumns?: number; + totalUpdatedRows?: number; + totalUpdatedSheets?: number; + } + export interface BooleanCondition { + type?: string; + values?: Sheets.Schema.ConditionValue[]; + } + export interface BooleanRule { + condition?: Sheets.Schema.BooleanCondition; + format?: Sheets.Schema.CellFormat; + } + export interface Border { + color?: Sheets.Schema.Color; + style?: string; + width?: number; + } + export interface Borders { + bottom?: Sheets.Schema.Border; + left?: Sheets.Schema.Border; + right?: Sheets.Schema.Border; + top?: Sheets.Schema.Border; + } + export interface BubbleChartSpec { + bubbleBorderColor?: Sheets.Schema.Color; + bubbleLabels?: Sheets.Schema.ChartData; + bubbleMaxRadiusSize?: number; + bubbleMinRadiusSize?: number; + bubbleOpacity?: Number; + bubbleSizes?: Sheets.Schema.ChartData; + bubbleTextStyle?: Sheets.Schema.TextFormat; + domain?: Sheets.Schema.ChartData; + groupIds?: Sheets.Schema.ChartData; + legendPosition?: string; + series?: Sheets.Schema.ChartData; + } + export interface CandlestickChartSpec { + data?: Sheets.Schema.CandlestickData[]; + domain?: Sheets.Schema.CandlestickDomain; + } + export interface CandlestickData { + closeSeries?: Sheets.Schema.CandlestickSeries; + highSeries?: Sheets.Schema.CandlestickSeries; + lowSeries?: Sheets.Schema.CandlestickSeries; + openSeries?: Sheets.Schema.CandlestickSeries; + } + export interface CandlestickDomain { + data?: Sheets.Schema.ChartData; + reversed?: boolean; + } + export interface CandlestickSeries { + data?: Sheets.Schema.ChartData; + } + export interface CellData { + dataValidation?: Sheets.Schema.DataValidationRule; + effectiveFormat?: Sheets.Schema.CellFormat; + effectiveValue?: Sheets.Schema.ExtendedValue; + formattedValue?: string; + hyperlink?: string; + note?: string; + pivotTable?: Sheets.Schema.PivotTable; + textFormatRuns?: Sheets.Schema.TextFormatRun[]; + userEnteredFormat?: Sheets.Schema.CellFormat; + userEnteredValue?: Sheets.Schema.ExtendedValue; + } + export interface CellFormat { + backgroundColor?: Sheets.Schema.Color; + borders?: Sheets.Schema.Borders; + horizontalAlignment?: string; + hyperlinkDisplayType?: string; + numberFormat?: Sheets.Schema.NumberFormat; + padding?: Sheets.Schema.Padding; + textDirection?: string; + textFormat?: Sheets.Schema.TextFormat; + textRotation?: Sheets.Schema.TextRotation; + verticalAlignment?: string; + wrapStrategy?: string; + } + export interface ChartData { + sourceRange?: Sheets.Schema.ChartSourceRange; + } + export interface ChartSourceRange { + sources?: Sheets.Schema.GridRange[]; + } + export interface ChartSpec { + altText?: string; + backgroundColor?: Sheets.Schema.Color; + basicChart?: Sheets.Schema.BasicChartSpec; + bubbleChart?: Sheets.Schema.BubbleChartSpec; + candlestickChart?: Sheets.Schema.CandlestickChartSpec; + fontName?: string; + hiddenDimensionStrategy?: string; + histogramChart?: Sheets.Schema.HistogramChartSpec; + maximized?: boolean; + orgChart?: Sheets.Schema.OrgChartSpec; + pieChart?: Sheets.Schema.PieChartSpec; + subtitle?: string; + subtitleTextFormat?: Sheets.Schema.TextFormat; + subtitleTextPosition?: Sheets.Schema.TextPosition; + title?: string; + titleTextFormat?: Sheets.Schema.TextFormat; + titleTextPosition?: Sheets.Schema.TextPosition; + treemapChart?: Sheets.Schema.TreemapChartSpec; + waterfallChart?: Sheets.Schema.WaterfallChartSpec; + } + export interface ClearBasicFilterRequest { + sheetId?: number; + } + export interface ClearValuesResponse { + clearedRange?: string; + spreadsheetId?: string; + } + export interface Color { + alpha?: Number; + blue?: Number; + green?: Number; + red?: Number; + } + export interface ConditionValue { + relativeDate?: string; + userEnteredValue?: string; + } + export interface ConditionalFormatRule { + booleanRule?: Sheets.Schema.BooleanRule; + gradientRule?: Sheets.Schema.GradientRule; + ranges?: Sheets.Schema.GridRange[]; + } + export interface CopyPasteRequest { + destination?: Sheets.Schema.GridRange; + pasteOrientation?: string; + pasteType?: string; + source?: Sheets.Schema.GridRange; + } + export interface CopySheetToAnotherSpreadsheetRequest { + destinationSpreadsheetId?: string; + } + export interface CreateDeveloperMetadataRequest { + developerMetadata?: Sheets.Schema.DeveloperMetadata; + } + export interface CreateDeveloperMetadataResponse { + developerMetadata?: Sheets.Schema.DeveloperMetadata; + } + export interface CutPasteRequest { + destination?: Sheets.Schema.GridCoordinate; + pasteType?: string; + source?: Sheets.Schema.GridRange; + } + export interface DataFilter { + a1Range?: string; + developerMetadataLookup?: Sheets.Schema.DeveloperMetadataLookup; + gridRange?: Sheets.Schema.GridRange; + } + export interface DataFilterValueRange { + dataFilter?: Sheets.Schema.DataFilter; + majorDimension?: string; + values?: Object[][]; + } + export interface DataValidationRule { + condition?: Sheets.Schema.BooleanCondition; + inputMessage?: string; + showCustomUi?: boolean; + strict?: boolean; + } + export interface DateTimeRule { + type?: string; + } + export interface DeleteBandingRequest { + bandedRangeId?: number; + } + export interface DeleteConditionalFormatRuleRequest { + index?: number; + sheetId?: number; + } + export interface DeleteConditionalFormatRuleResponse { + rule?: Sheets.Schema.ConditionalFormatRule; + } + export interface DeleteDeveloperMetadataRequest { + dataFilter?: Sheets.Schema.DataFilter; + } + export interface DeleteDeveloperMetadataResponse { + deletedDeveloperMetadata?: Sheets.Schema.DeveloperMetadata[]; + } + export interface DeleteDimensionGroupRequest { + range?: Sheets.Schema.DimensionRange; + } + export interface DeleteDimensionGroupResponse { + dimensionGroups?: Sheets.Schema.DimensionGroup[]; + } + export interface DeleteDimensionRequest { + range?: Sheets.Schema.DimensionRange; + } + export interface DeleteEmbeddedObjectRequest { + objectId?: number; + } + export interface DeleteFilterViewRequest { + filterId?: number; + } + export interface DeleteNamedRangeRequest { + namedRangeId?: string; + } + export interface DeleteProtectedRangeRequest { + protectedRangeId?: number; + } + export interface DeleteRangeRequest { + range?: Sheets.Schema.GridRange; + shiftDimension?: string; + } + export interface DeleteSheetRequest { + sheetId?: number; + } + export interface DeveloperMetadata { + location?: Sheets.Schema.DeveloperMetadataLocation; + metadataId?: number; + metadataKey?: string; + metadataValue?: string; + visibility?: string; + } + export interface DeveloperMetadataLocation { + dimensionRange?: Sheets.Schema.DimensionRange; + locationType?: string; + sheetId?: number; + spreadsheet?: boolean; + } + export interface DeveloperMetadataLookup { + locationMatchingStrategy?: string; + locationType?: string; + metadataId?: number; + metadataKey?: string; + metadataLocation?: Sheets.Schema.DeveloperMetadataLocation; + metadataValue?: string; + visibility?: string; + } + export interface DimensionGroup { + collapsed?: boolean; + depth?: number; + range?: Sheets.Schema.DimensionRange; + } + export interface DimensionProperties { + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; + hiddenByFilter?: boolean; + hiddenByUser?: boolean; + pixelSize?: number; + } + export interface DimensionRange { + dimension?: string; + endIndex?: number; + sheetId?: number; + startIndex?: number; + } + export interface DuplicateFilterViewRequest { + filterId?: number; + } + export interface DuplicateFilterViewResponse { + filter?: Sheets.Schema.FilterView; + } + export interface DuplicateSheetRequest { + insertSheetIndex?: number; + newSheetId?: number; + newSheetName?: string; + sourceSheetId?: number; + } + export interface DuplicateSheetResponse { + properties?: Sheets.Schema.SheetProperties; + } + export interface Editors { + domainUsersCanEdit?: boolean; + groups?: string[]; + users?: string[]; + } + export interface EmbeddedChart { + chartId?: number; + position?: Sheets.Schema.EmbeddedObjectPosition; + spec?: Sheets.Schema.ChartSpec; + } + export interface EmbeddedObjectPosition { + newSheet?: boolean; + overlayPosition?: Sheets.Schema.OverlayPosition; + sheetId?: number; + } + export interface ErrorValue { + message?: string; + type?: string; + } + export interface ExtendedValue { + boolValue?: boolean; + errorValue?: Sheets.Schema.ErrorValue; + formulaValue?: string; + numberValue?: Number; + stringValue?: string; + } + export interface FilterCriteria { + condition?: Sheets.Schema.BooleanCondition; + hiddenValues?: string[]; + } + export interface FilterView { + criteria?: object; + filterViewId?: number; + namedRangeId?: string; + range?: Sheets.Schema.GridRange; + sortSpecs?: Sheets.Schema.SortSpec[]; + title?: string; + } + export interface FindReplaceRequest { + allSheets?: boolean; + find?: string; + includeFormulas?: boolean; + matchCase?: boolean; + matchEntireCell?: boolean; + range?: Sheets.Schema.GridRange; + replacement?: string; + searchByRegex?: boolean; + sheetId?: number; + } + export interface FindReplaceResponse { + formulasChanged?: number; + occurrencesChanged?: number; + rowsChanged?: number; + sheetsChanged?: number; + valuesChanged?: number; + } + export interface GetSpreadsheetByDataFilterRequest { + dataFilters?: Sheets.Schema.DataFilter[]; + includeGridData?: boolean; + } + export interface GradientRule { + maxpoint?: Sheets.Schema.InterpolationPoint; + midpoint?: Sheets.Schema.InterpolationPoint; + minpoint?: Sheets.Schema.InterpolationPoint; + } + export interface GridCoordinate { + columnIndex?: number; + rowIndex?: number; + sheetId?: number; + } + export interface GridData { + columnMetadata?: Sheets.Schema.DimensionProperties[]; + rowData?: Sheets.Schema.RowData[]; + rowMetadata?: Sheets.Schema.DimensionProperties[]; + startColumn?: number; + startRow?: number; + } + export interface GridProperties { + columnCount?: number; + columnGroupControlAfter?: boolean; + frozenColumnCount?: number; + frozenRowCount?: number; + hideGridlines?: boolean; + rowCount?: number; + rowGroupControlAfter?: boolean; + } + export interface GridRange { + endColumnIndex?: number; + endRowIndex?: number; + sheetId?: number; + startColumnIndex?: number; + startRowIndex?: number; + } + export interface HistogramChartSpec { + bucketSize?: Number; + legendPosition?: string; + outlierPercentile?: Number; + series?: Sheets.Schema.HistogramSeries[]; + showItemDividers?: boolean; + } + export interface HistogramRule { + end?: Number; + interval?: Number; + start?: Number; + } + export interface HistogramSeries { + barColor?: Sheets.Schema.Color; + data?: Sheets.Schema.ChartData; + } + export interface InsertDimensionRequest { + inheritFromBefore?: boolean; + range?: Sheets.Schema.DimensionRange; + } + export interface InsertRangeRequest { + range?: Sheets.Schema.GridRange; + shiftDimension?: string; + } + export interface InterpolationPoint { + color?: Sheets.Schema.Color; + type?: string; + value?: string; + } + export interface IterativeCalculationSettings { + convergenceThreshold?: Number; + maxIterations?: number; + } + export interface LineStyle { + type?: string; + width?: number; + } + export interface ManualRule { + groups?: Sheets.Schema.ManualRuleGroup[]; + } + export interface ManualRuleGroup { + groupName?: Sheets.Schema.ExtendedValue; + items?: Sheets.Schema.ExtendedValue[]; + } + export interface MatchedDeveloperMetadata { + dataFilters?: Sheets.Schema.DataFilter[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata; + } + export interface MatchedValueRange { + dataFilters?: Sheets.Schema.DataFilter[]; + valueRange?: Sheets.Schema.ValueRange; + } + export interface MergeCellsRequest { + mergeType?: string; + range?: Sheets.Schema.GridRange; + } + export interface MoveDimensionRequest { + destinationIndex?: number; + source?: Sheets.Schema.DimensionRange; + } + export interface NamedRange { + name?: string; + namedRangeId?: string; + range?: Sheets.Schema.GridRange; + } + export interface NumberFormat { + pattern?: string; + type?: string; + } + export interface OrgChartSpec { + labels?: Sheets.Schema.ChartData; + nodeColor?: Sheets.Schema.Color; + nodeSize?: string; + parentLabels?: Sheets.Schema.ChartData; + selectedNodeColor?: Sheets.Schema.Color; + tooltips?: Sheets.Schema.ChartData; + } + export interface OverlayPosition { + anchorCell?: Sheets.Schema.GridCoordinate; + heightPixels?: number; + offsetXPixels?: number; + offsetYPixels?: number; + widthPixels?: number; + } + export interface Padding { + bottom?: number; + left?: number; + right?: number; + top?: number; + } + export interface PasteDataRequest { + coordinate?: Sheets.Schema.GridCoordinate; + data?: string; + delimiter?: string; + html?: boolean; + type?: string; + } + export interface PieChartSpec { + domain?: Sheets.Schema.ChartData; + legendPosition?: string; + pieHole?: Number; + series?: Sheets.Schema.ChartData; + threeDimensional?: boolean; + } + export interface PivotFilterCriteria { + visibleValues?: string[]; + } + export interface PivotGroup { + groupRule?: Sheets.Schema.PivotGroupRule; + label?: string; + repeatHeadings?: boolean; + showTotals?: boolean; + sortOrder?: string; + sourceColumnOffset?: number; + valueBucket?: Sheets.Schema.PivotGroupSortValueBucket; + valueMetadata?: Sheets.Schema.PivotGroupValueMetadata[]; + } + export interface PivotGroupRule { + dateTimeRule?: Sheets.Schema.DateTimeRule; + histogramRule?: Sheets.Schema.HistogramRule; + manualRule?: Sheets.Schema.ManualRule; + } + export interface PivotGroupSortValueBucket { + buckets?: Sheets.Schema.ExtendedValue[]; + valuesIndex?: number; + } + export interface PivotGroupValueMetadata { + collapsed?: boolean; + value?: Sheets.Schema.ExtendedValue; + } + export interface PivotTable { + columns?: Sheets.Schema.PivotGroup[]; + criteria?: object; + rows?: Sheets.Schema.PivotGroup[]; + source?: Sheets.Schema.GridRange; + valueLayout?: string; + values?: Sheets.Schema.PivotValue[]; + } + export interface PivotValue { + calculatedDisplayType?: string; + formula?: string; + name?: string; + sourceColumnOffset?: number; + summarizeFunction?: string; + } + export interface ProtectedRange { + description?: string; + editors?: Sheets.Schema.Editors; + namedRangeId?: string; + protectedRangeId?: number; + range?: Sheets.Schema.GridRange; + requestingUserCanEdit?: boolean; + unprotectedRanges?: Sheets.Schema.GridRange[]; + warningOnly?: boolean; + } + export interface RandomizeRangeRequest { + range?: Sheets.Schema.GridRange; + } + export interface RepeatCellRequest { + cell?: Sheets.Schema.CellData; + fields?: string; + range?: Sheets.Schema.GridRange; + } + export interface Request { + addBanding?: Sheets.Schema.AddBandingRequest; + addChart?: Sheets.Schema.AddChartRequest; + addConditionalFormatRule?: Sheets.Schema.AddConditionalFormatRuleRequest; + addDimensionGroup?: Sheets.Schema.AddDimensionGroupRequest; + addFilterView?: Sheets.Schema.AddFilterViewRequest; + addNamedRange?: Sheets.Schema.AddNamedRangeRequest; + addProtectedRange?: Sheets.Schema.AddProtectedRangeRequest; + addSheet?: Sheets.Schema.AddSheetRequest; + appendCells?: Sheets.Schema.AppendCellsRequest; + appendDimension?: Sheets.Schema.AppendDimensionRequest; + autoFill?: Sheets.Schema.AutoFillRequest; + autoResizeDimensions?: Sheets.Schema.AutoResizeDimensionsRequest; + clearBasicFilter?: Sheets.Schema.ClearBasicFilterRequest; + copyPaste?: Sheets.Schema.CopyPasteRequest; + createDeveloperMetadata?: Sheets.Schema.CreateDeveloperMetadataRequest; + cutPaste?: Sheets.Schema.CutPasteRequest; + deleteBanding?: Sheets.Schema.DeleteBandingRequest; + deleteConditionalFormatRule?: Sheets.Schema.DeleteConditionalFormatRuleRequest; + deleteDeveloperMetadata?: Sheets.Schema.DeleteDeveloperMetadataRequest; + deleteDimension?: Sheets.Schema.DeleteDimensionRequest; + deleteDimensionGroup?: Sheets.Schema.DeleteDimensionGroupRequest; + deleteEmbeddedObject?: Sheets.Schema.DeleteEmbeddedObjectRequest; + deleteFilterView?: Sheets.Schema.DeleteFilterViewRequest; + deleteNamedRange?: Sheets.Schema.DeleteNamedRangeRequest; + deleteProtectedRange?: Sheets.Schema.DeleteProtectedRangeRequest; + deleteRange?: Sheets.Schema.DeleteRangeRequest; + deleteSheet?: Sheets.Schema.DeleteSheetRequest; + duplicateFilterView?: Sheets.Schema.DuplicateFilterViewRequest; + duplicateSheet?: Sheets.Schema.DuplicateSheetRequest; + findReplace?: Sheets.Schema.FindReplaceRequest; + insertDimension?: Sheets.Schema.InsertDimensionRequest; + insertRange?: Sheets.Schema.InsertRangeRequest; + mergeCells?: Sheets.Schema.MergeCellsRequest; + moveDimension?: Sheets.Schema.MoveDimensionRequest; + pasteData?: Sheets.Schema.PasteDataRequest; + randomizeRange?: Sheets.Schema.RandomizeRangeRequest; + repeatCell?: Sheets.Schema.RepeatCellRequest; + setBasicFilter?: Sheets.Schema.SetBasicFilterRequest; + setDataValidation?: Sheets.Schema.SetDataValidationRequest; + sortRange?: Sheets.Schema.SortRangeRequest; + textToColumns?: Sheets.Schema.TextToColumnsRequest; + unmergeCells?: Sheets.Schema.UnmergeCellsRequest; + updateBanding?: Sheets.Schema.UpdateBandingRequest; + updateBorders?: Sheets.Schema.UpdateBordersRequest; + updateCells?: Sheets.Schema.UpdateCellsRequest; + updateChartSpec?: Sheets.Schema.UpdateChartSpecRequest; + updateConditionalFormatRule?: Sheets.Schema.UpdateConditionalFormatRuleRequest; + updateDeveloperMetadata?: Sheets.Schema.UpdateDeveloperMetadataRequest; + updateDimensionGroup?: Sheets.Schema.UpdateDimensionGroupRequest; + updateDimensionProperties?: Sheets.Schema.UpdateDimensionPropertiesRequest; + updateEmbeddedObjectPosition?: Sheets.Schema.UpdateEmbeddedObjectPositionRequest; + updateFilterView?: Sheets.Schema.UpdateFilterViewRequest; + updateNamedRange?: Sheets.Schema.UpdateNamedRangeRequest; + updateProtectedRange?: Sheets.Schema.UpdateProtectedRangeRequest; + updateSheetProperties?: Sheets.Schema.UpdateSheetPropertiesRequest; + updateSpreadsheetProperties?: Sheets.Schema.UpdateSpreadsheetPropertiesRequest; + } + export interface Response { + addBanding?: Sheets.Schema.AddBandingResponse; + addChart?: Sheets.Schema.AddChartResponse; + addDimensionGroup?: Sheets.Schema.AddDimensionGroupResponse; + addFilterView?: Sheets.Schema.AddFilterViewResponse; + addNamedRange?: Sheets.Schema.AddNamedRangeResponse; + addProtectedRange?: Sheets.Schema.AddProtectedRangeResponse; + addSheet?: Sheets.Schema.AddSheetResponse; + createDeveloperMetadata?: Sheets.Schema.CreateDeveloperMetadataResponse; + deleteConditionalFormatRule?: Sheets.Schema.DeleteConditionalFormatRuleResponse; + deleteDeveloperMetadata?: Sheets.Schema.DeleteDeveloperMetadataResponse; + deleteDimensionGroup?: Sheets.Schema.DeleteDimensionGroupResponse; + duplicateFilterView?: Sheets.Schema.DuplicateFilterViewResponse; + duplicateSheet?: Sheets.Schema.DuplicateSheetResponse; + findReplace?: Sheets.Schema.FindReplaceResponse; + updateConditionalFormatRule?: Sheets.Schema.UpdateConditionalFormatRuleResponse; + updateDeveloperMetadata?: Sheets.Schema.UpdateDeveloperMetadataResponse; + updateEmbeddedObjectPosition?: Sheets.Schema.UpdateEmbeddedObjectPositionResponse; + } + export interface RowData { + values?: Sheets.Schema.CellData[]; + } + export interface SearchDeveloperMetadataRequest { + dataFilters?: Sheets.Schema.DataFilter[]; + } + export interface SearchDeveloperMetadataResponse { + matchedDeveloperMetadata?: Sheets.Schema.MatchedDeveloperMetadata[]; + } + export interface SetBasicFilterRequest { + filter?: Sheets.Schema.BasicFilter; + } + export interface SetDataValidationRequest { + range?: Sheets.Schema.GridRange; + rule?: Sheets.Schema.DataValidationRule; + } + export interface Sheet { + bandedRanges?: Sheets.Schema.BandedRange[]; + basicFilter?: Sheets.Schema.BasicFilter; + charts?: Sheets.Schema.EmbeddedChart[]; + columnGroups?: Sheets.Schema.DimensionGroup[]; + conditionalFormats?: Sheets.Schema.ConditionalFormatRule[]; + data?: Sheets.Schema.GridData[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; + filterViews?: Sheets.Schema.FilterView[]; + merges?: Sheets.Schema.GridRange[]; + properties?: Sheets.Schema.SheetProperties; + protectedRanges?: Sheets.Schema.ProtectedRange[]; + rowGroups?: Sheets.Schema.DimensionGroup[]; + } + export interface SheetProperties { + gridProperties?: Sheets.Schema.GridProperties; + hidden?: boolean; + index?: number; + rightToLeft?: boolean; + sheetId?: number; + sheetType?: string; + tabColor?: Sheets.Schema.Color; + title?: string; + } + export interface SortRangeRequest { + range?: Sheets.Schema.GridRange; + sortSpecs?: Sheets.Schema.SortSpec[]; + } + export interface SortSpec { + dimensionIndex?: number; + sortOrder?: string; + } + export interface SourceAndDestination { + dimension?: string; + fillLength?: number; + source?: Sheets.Schema.GridRange; + } + export interface Spreadsheet { + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; + namedRanges?: Sheets.Schema.NamedRange[]; + properties?: Sheets.Schema.SpreadsheetProperties; + sheets?: Sheets.Schema.Sheet[]; + spreadsheetId?: string; + spreadsheetUrl?: string; + } + export interface SpreadsheetProperties { + autoRecalc?: string; + defaultFormat?: Sheets.Schema.CellFormat; + iterativeCalculationSettings?: Sheets.Schema.IterativeCalculationSettings; + locale?: string; + timeZone?: string; + title?: string; + } + export interface TextFormat { + bold?: boolean; + fontFamily?: string; + fontSize?: number; + foregroundColor?: Sheets.Schema.Color; + italic?: boolean; + strikethrough?: boolean; + underline?: boolean; + } + export interface TextFormatRun { + format?: Sheets.Schema.TextFormat; + startIndex?: number; + } + export interface TextPosition { + horizontalAlignment?: string; + } + export interface TextRotation { + angle?: number; + vertical?: boolean; + } + export interface TextToColumnsRequest { + delimiter?: string; + delimiterType?: string; + source?: Sheets.Schema.GridRange; + } + export interface TreemapChartColorScale { + maxValueColor?: Sheets.Schema.Color; + midValueColor?: Sheets.Schema.Color; + minValueColor?: Sheets.Schema.Color; + noDataColor?: Sheets.Schema.Color; + } + export interface TreemapChartSpec { + colorData?: Sheets.Schema.ChartData; + colorScale?: Sheets.Schema.TreemapChartColorScale; + headerColor?: Sheets.Schema.Color; + hideTooltips?: boolean; + hintedLevels?: number; + labels?: Sheets.Schema.ChartData; + levels?: number; + maxValue?: Number; + minValue?: Number; + parentLabels?: Sheets.Schema.ChartData; + sizeData?: Sheets.Schema.ChartData; + textFormat?: Sheets.Schema.TextFormat; + } + export interface UnmergeCellsRequest { + range?: Sheets.Schema.GridRange; + } + export interface UpdateBandingRequest { + bandedRange?: Sheets.Schema.BandedRange; + fields?: string; + } + export interface UpdateBordersRequest { + bottom?: Sheets.Schema.Border; + innerHorizontal?: Sheets.Schema.Border; + innerVertical?: Sheets.Schema.Border; + left?: Sheets.Schema.Border; + range?: Sheets.Schema.GridRange; + right?: Sheets.Schema.Border; + top?: Sheets.Schema.Border; + } + export interface UpdateCellsRequest { + fields?: string; + range?: Sheets.Schema.GridRange; + rows?: Sheets.Schema.RowData[]; + start?: Sheets.Schema.GridCoordinate; + } + export interface UpdateChartSpecRequest { + chartId?: number; + spec?: Sheets.Schema.ChartSpec; + } + export interface UpdateConditionalFormatRuleRequest { + index?: number; + newIndex?: number; + rule?: Sheets.Schema.ConditionalFormatRule; + sheetId?: number; + } + export interface UpdateConditionalFormatRuleResponse { + newIndex?: number; + newRule?: Sheets.Schema.ConditionalFormatRule; + oldIndex?: number; + oldRule?: Sheets.Schema.ConditionalFormatRule; + } + export interface UpdateDeveloperMetadataRequest { + dataFilters?: Sheets.Schema.DataFilter[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata; + fields?: string; + } + export interface UpdateDeveloperMetadataResponse { + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; + } + export interface UpdateDimensionGroupRequest { + dimensionGroup?: Sheets.Schema.DimensionGroup; + fields?: string; + } + export interface UpdateDimensionPropertiesRequest { + fields?: string; + properties?: Sheets.Schema.DimensionProperties; + range?: Sheets.Schema.DimensionRange; + } + export interface UpdateEmbeddedObjectPositionRequest { + fields?: string; + newPosition?: Sheets.Schema.EmbeddedObjectPosition; + objectId?: number; + } + export interface UpdateEmbeddedObjectPositionResponse { + position?: Sheets.Schema.EmbeddedObjectPosition; + } + export interface UpdateFilterViewRequest { + fields?: string; + filter?: Sheets.Schema.FilterView; + } + export interface UpdateNamedRangeRequest { + fields?: string; + namedRange?: Sheets.Schema.NamedRange; + } + export interface UpdateProtectedRangeRequest { + fields?: string; + protectedRange?: Sheets.Schema.ProtectedRange; + } + export interface UpdateSheetPropertiesRequest { + fields?: string; + properties?: Sheets.Schema.SheetProperties; + } + export interface UpdateSpreadsheetPropertiesRequest { + fields?: string; + properties?: Sheets.Schema.SpreadsheetProperties; + } + export interface UpdateValuesByDataFilterResponse { + dataFilter?: Sheets.Schema.DataFilter; + updatedCells?: number; + updatedColumns?: number; + updatedData?: Sheets.Schema.ValueRange; + updatedRange?: string; + updatedRows?: number; + } + export interface UpdateValuesResponse { + spreadsheetId?: string; + updatedCells?: number; + updatedColumns?: number; + updatedData?: Sheets.Schema.ValueRange; + updatedRange?: string; + updatedRows?: number; + } + export interface ValueRange { + majorDimension?: string; + range?: string; + values?: Object[][]; + } + export interface WaterfallChartColumnStyle { + color?: Sheets.Schema.Color; + label?: string; + } + export interface WaterfallChartCustomSubtotal { + dataIsSubtotal?: boolean; + label?: string; + subtotalIndex?: number; + } + export interface WaterfallChartDomain { + data?: Sheets.Schema.ChartData; + reversed?: boolean; + } + export interface WaterfallChartSeries { + customSubtotals?: Sheets.Schema.WaterfallChartCustomSubtotal[]; + data?: Sheets.Schema.ChartData; + hideTrailingSubtotal?: boolean; + negativeColumnsStyle?: Sheets.Schema.WaterfallChartColumnStyle; + positiveColumnsStyle?: Sheets.Schema.WaterfallChartColumnStyle; + subtotalColumnsStyle?: Sheets.Schema.WaterfallChartColumnStyle; + } + export interface WaterfallChartSpec { + connectorLineStyle?: Sheets.Schema.LineStyle; + domain?: Sheets.Schema.WaterfallChartDomain; + firstValueIsTotal?: boolean; + hideConnectorLines?: boolean; + series?: Sheets.Schema.WaterfallChartSeries[]; + stackedType?: string; + } + } + } + export interface Sheets { + Spreadsheets?: Sheets.Collection.SpreadsheetsCollection; + // Create a new instance of AddBandingRequest + newAddBandingRequest(): Sheets.Schema.AddBandingRequest; + // Create a new instance of AddChartRequest + newAddChartRequest(): Sheets.Schema.AddChartRequest; + // Create a new instance of AddConditionalFormatRuleRequest + newAddConditionalFormatRuleRequest(): Sheets.Schema.AddConditionalFormatRuleRequest; + // Create a new instance of AddDimensionGroupRequest + newAddDimensionGroupRequest(): Sheets.Schema.AddDimensionGroupRequest; + // Create a new instance of AddFilterViewRequest + newAddFilterViewRequest(): Sheets.Schema.AddFilterViewRequest; + // Create a new instance of AddNamedRangeRequest + newAddNamedRangeRequest(): Sheets.Schema.AddNamedRangeRequest; + // Create a new instance of AddProtectedRangeRequest + newAddProtectedRangeRequest(): Sheets.Schema.AddProtectedRangeRequest; + // Create a new instance of AddSheetRequest + newAddSheetRequest(): Sheets.Schema.AddSheetRequest; + // Create a new instance of AppendCellsRequest + newAppendCellsRequest(): Sheets.Schema.AppendCellsRequest; + // Create a new instance of AppendDimensionRequest + newAppendDimensionRequest(): Sheets.Schema.AppendDimensionRequest; + // Create a new instance of AutoFillRequest + newAutoFillRequest(): Sheets.Schema.AutoFillRequest; + // Create a new instance of AutoResizeDimensionsRequest + newAutoResizeDimensionsRequest(): Sheets.Schema.AutoResizeDimensionsRequest; + // Create a new instance of BandedRange + newBandedRange(): Sheets.Schema.BandedRange; + // Create a new instance of BandingProperties + newBandingProperties(): Sheets.Schema.BandingProperties; + // Create a new instance of BasicChartAxis + newBasicChartAxis(): Sheets.Schema.BasicChartAxis; + // Create a new instance of BasicChartDomain + newBasicChartDomain(): Sheets.Schema.BasicChartDomain; + // Create a new instance of BasicChartSeries + newBasicChartSeries(): Sheets.Schema.BasicChartSeries; + // Create a new instance of BasicChartSpec + newBasicChartSpec(): Sheets.Schema.BasicChartSpec; + // Create a new instance of BasicFilter + newBasicFilter(): Sheets.Schema.BasicFilter; + // Create a new instance of BatchClearValuesByDataFilterRequest + newBatchClearValuesByDataFilterRequest(): Sheets.Schema.BatchClearValuesByDataFilterRequest; + // Create a new instance of BatchClearValuesRequest + newBatchClearValuesRequest(): Sheets.Schema.BatchClearValuesRequest; + // Create a new instance of BatchGetValuesByDataFilterRequest + newBatchGetValuesByDataFilterRequest(): Sheets.Schema.BatchGetValuesByDataFilterRequest; + // Create a new instance of BatchUpdateSpreadsheetRequest + newBatchUpdateSpreadsheetRequest(): Sheets.Schema.BatchUpdateSpreadsheetRequest; + // Create a new instance of BatchUpdateValuesByDataFilterRequest + newBatchUpdateValuesByDataFilterRequest(): Sheets.Schema.BatchUpdateValuesByDataFilterRequest; + // Create a new instance of BatchUpdateValuesRequest + newBatchUpdateValuesRequest(): Sheets.Schema.BatchUpdateValuesRequest; + // Create a new instance of BooleanCondition + newBooleanCondition(): Sheets.Schema.BooleanCondition; + // Create a new instance of BooleanRule + newBooleanRule(): Sheets.Schema.BooleanRule; + // Create a new instance of Border + newBorder(): Sheets.Schema.Border; + // Create a new instance of Borders + newBorders(): Sheets.Schema.Borders; + // Create a new instance of BubbleChartSpec + newBubbleChartSpec(): Sheets.Schema.BubbleChartSpec; + // Create a new instance of CandlestickChartSpec + newCandlestickChartSpec(): Sheets.Schema.CandlestickChartSpec; + // Create a new instance of CandlestickData + newCandlestickData(): Sheets.Schema.CandlestickData; + // Create a new instance of CandlestickDomain + newCandlestickDomain(): Sheets.Schema.CandlestickDomain; + // Create a new instance of CandlestickSeries + newCandlestickSeries(): Sheets.Schema.CandlestickSeries; + // Create a new instance of CellData + newCellData(): Sheets.Schema.CellData; + // Create a new instance of CellFormat + newCellFormat(): Sheets.Schema.CellFormat; + // Create a new instance of ChartData + newChartData(): Sheets.Schema.ChartData; + // Create a new instance of ChartSourceRange + newChartSourceRange(): Sheets.Schema.ChartSourceRange; + // Create a new instance of ChartSpec + newChartSpec(): Sheets.Schema.ChartSpec; + // Create a new instance of ClearBasicFilterRequest + newClearBasicFilterRequest(): Sheets.Schema.ClearBasicFilterRequest; + // Create a new instance of ClearValuesRequest + newClearValuesRequest(): any; // Schema.ClearValuesRequest; + // Create a new instance of Color + newColor(): Sheets.Schema.Color; + // Create a new instance of ConditionValue + newConditionValue(): Sheets.Schema.ConditionValue; + // Create a new instance of ConditionalFormatRule + newConditionalFormatRule(): Sheets.Schema.ConditionalFormatRule; + // Create a new instance of CopyPasteRequest + newCopyPasteRequest(): Sheets.Schema.CopyPasteRequest; + // Create a new instance of CopySheetToAnotherSpreadsheetRequest + newCopySheetToAnotherSpreadsheetRequest(): Sheets.Schema.CopySheetToAnotherSpreadsheetRequest; + // Create a new instance of CreateDeveloperMetadataRequest + newCreateDeveloperMetadataRequest(): Sheets.Schema.CreateDeveloperMetadataRequest; + // Create a new instance of CutPasteRequest + newCutPasteRequest(): Sheets.Schema.CutPasteRequest; + // Create a new instance of DataFilter + newDataFilter(): Sheets.Schema.DataFilter; + // Create a new instance of DataFilterValueRange + newDataFilterValueRange(): Sheets.Schema.DataFilterValueRange; + // Create a new instance of DataValidationRule + newDataValidationRule(): Sheets.Schema.DataValidationRule; + // Create a new instance of DateTimeRule + newDateTimeRule(): Sheets.Schema.DateTimeRule; + // Create a new instance of DeleteBandingRequest + newDeleteBandingRequest(): Sheets.Schema.DeleteBandingRequest; + // Create a new instance of DeleteConditionalFormatRuleRequest + newDeleteConditionalFormatRuleRequest(): Sheets.Schema.DeleteConditionalFormatRuleRequest; + // Create a new instance of DeleteDeveloperMetadataRequest + newDeleteDeveloperMetadataRequest(): Sheets.Schema.DeleteDeveloperMetadataRequest; + // Create a new instance of DeleteDimensionGroupRequest + newDeleteDimensionGroupRequest(): Sheets.Schema.DeleteDimensionGroupRequest; + // Create a new instance of DeleteDimensionRequest + newDeleteDimensionRequest(): Sheets.Schema.DeleteDimensionRequest; + // Create a new instance of DeleteEmbeddedObjectRequest + newDeleteEmbeddedObjectRequest(): Sheets.Schema.DeleteEmbeddedObjectRequest; + // Create a new instance of DeleteFilterViewRequest + newDeleteFilterViewRequest(): Sheets.Schema.DeleteFilterViewRequest; + // Create a new instance of DeleteNamedRangeRequest + newDeleteNamedRangeRequest(): Sheets.Schema.DeleteNamedRangeRequest; + // Create a new instance of DeleteProtectedRangeRequest + newDeleteProtectedRangeRequest(): Sheets.Schema.DeleteProtectedRangeRequest; + // Create a new instance of DeleteRangeRequest + newDeleteRangeRequest(): Sheets.Schema.DeleteRangeRequest; + // Create a new instance of DeleteSheetRequest + newDeleteSheetRequest(): Sheets.Schema.DeleteSheetRequest; + // Create a new instance of DeveloperMetadata + newDeveloperMetadata(): Sheets.Schema.DeveloperMetadata; + // Create a new instance of DeveloperMetadataLocation + newDeveloperMetadataLocation(): Sheets.Schema.DeveloperMetadataLocation; + // Create a new instance of DeveloperMetadataLookup + newDeveloperMetadataLookup(): Sheets.Schema.DeveloperMetadataLookup; + // Create a new instance of DimensionGroup + newDimensionGroup(): Sheets.Schema.DimensionGroup; + // Create a new instance of DimensionProperties + newDimensionProperties(): Sheets.Schema.DimensionProperties; + // Create a new instance of DimensionRange + newDimensionRange(): Sheets.Schema.DimensionRange; + // Create a new instance of DuplicateFilterViewRequest + newDuplicateFilterViewRequest(): Sheets.Schema.DuplicateFilterViewRequest; + // Create a new instance of DuplicateSheetRequest + newDuplicateSheetRequest(): Sheets.Schema.DuplicateSheetRequest; + // Create a new instance of Editors + newEditors(): Sheets.Schema.Editors; + // Create a new instance of EmbeddedChart + newEmbeddedChart(): Sheets.Schema.EmbeddedChart; + // Create a new instance of EmbeddedObjectPosition + newEmbeddedObjectPosition(): Sheets.Schema.EmbeddedObjectPosition; + // Create a new instance of ErrorValue + newErrorValue(): Sheets.Schema.ErrorValue; + // Create a new instance of ExtendedValue + newExtendedValue(): Sheets.Schema.ExtendedValue; + // Create a new instance of FilterView + newFilterView(): Sheets.Schema.FilterView; + // Create a new instance of FindReplaceRequest + newFindReplaceRequest(): Sheets.Schema.FindReplaceRequest; + // Create a new instance of GetSpreadsheetByDataFilterRequest + newGetSpreadsheetByDataFilterRequest(): Sheets.Schema.GetSpreadsheetByDataFilterRequest; + // Create a new instance of GradientRule + newGradientRule(): Sheets.Schema.GradientRule; + // Create a new instance of GridCoordinate + newGridCoordinate(): Sheets.Schema.GridCoordinate; + // Create a new instance of GridData + newGridData(): Sheets.Schema.GridData; + // Create a new instance of GridProperties + newGridProperties(): Sheets.Schema.GridProperties; + // Create a new instance of GridRange + newGridRange(): Sheets.Schema.GridRange; + // Create a new instance of HistogramChartSpec + newHistogramChartSpec(): Sheets.Schema.HistogramChartSpec; + // Create a new instance of HistogramRule + newHistogramRule(): Sheets.Schema.HistogramRule; + // Create a new instance of HistogramSeries + newHistogramSeries(): Sheets.Schema.HistogramSeries; + // Create a new instance of InsertDimensionRequest + newInsertDimensionRequest(): Sheets.Schema.InsertDimensionRequest; + // Create a new instance of InsertRangeRequest + newInsertRangeRequest(): Sheets.Schema.InsertRangeRequest; + // Create a new instance of InterpolationPoint + newInterpolationPoint(): Sheets.Schema.InterpolationPoint; + // Create a new instance of IterativeCalculationSettings + newIterativeCalculationSettings(): Sheets.Schema.IterativeCalculationSettings; + // Create a new instance of LineStyle + newLineStyle(): Sheets.Schema.LineStyle; + // Create a new instance of ManualRule + newManualRule(): Sheets.Schema.ManualRule; + // Create a new instance of ManualRuleGroup + newManualRuleGroup(): Sheets.Schema.ManualRuleGroup; + // Create a new instance of MergeCellsRequest + newMergeCellsRequest(): Sheets.Schema.MergeCellsRequest; + // Create a new instance of MoveDimensionRequest + newMoveDimensionRequest(): Sheets.Schema.MoveDimensionRequest; + // Create a new instance of NamedRange + newNamedRange(): Sheets.Schema.NamedRange; + // Create a new instance of NumberFormat + newNumberFormat(): Sheets.Schema.NumberFormat; + // Create a new instance of OrgChartSpec + newOrgChartSpec(): Sheets.Schema.OrgChartSpec; + // Create a new instance of OverlayPosition + newOverlayPosition(): Sheets.Schema.OverlayPosition; + // Create a new instance of Padding + newPadding(): Sheets.Schema.Padding; + // Create a new instance of PasteDataRequest + newPasteDataRequest(): Sheets.Schema.PasteDataRequest; + // Create a new instance of PieChartSpec + newPieChartSpec(): Sheets.Schema.PieChartSpec; + // Create a new instance of PivotGroup + newPivotGroup(): Sheets.Schema.PivotGroup; + // Create a new instance of PivotGroupRule + newPivotGroupRule(): Sheets.Schema.PivotGroupRule; + // Create a new instance of PivotGroupSortValueBucket + newPivotGroupSortValueBucket(): Sheets.Schema.PivotGroupSortValueBucket; + // Create a new instance of PivotGroupValueMetadata + newPivotGroupValueMetadata(): Sheets.Schema.PivotGroupValueMetadata; + // Create a new instance of PivotTable + newPivotTable(): Sheets.Schema.PivotTable; + // Create a new instance of PivotValue + newPivotValue(): Sheets.Schema.PivotValue; + // Create a new instance of ProtectedRange + newProtectedRange(): Sheets.Schema.ProtectedRange; + // Create a new instance of RandomizeRangeRequest + newRandomizeRangeRequest(): Sheets.Schema.RandomizeRangeRequest; + // Create a new instance of RepeatCellRequest + newRepeatCellRequest(): Sheets.Schema.RepeatCellRequest; + // Create a new instance of Request + newRequest(): Sheets.Schema.Request; + // Create a new instance of RowData + newRowData(): Sheets.Schema.RowData; + // Create a new instance of SearchDeveloperMetadataRequest + newSearchDeveloperMetadataRequest(): Sheets.Schema.SearchDeveloperMetadataRequest; + // Create a new instance of SetBasicFilterRequest + newSetBasicFilterRequest(): Sheets.Schema.SetBasicFilterRequest; + // Create a new instance of SetDataValidationRequest + newSetDataValidationRequest(): Sheets.Schema.SetDataValidationRequest; + // Create a new instance of Sheet + newSheet(): Sheets.Schema.Sheet; + // Create a new instance of SheetProperties + newSheetProperties(): Sheets.Schema.SheetProperties; + // Create a new instance of SortRangeRequest + newSortRangeRequest(): Sheets.Schema.SortRangeRequest; + // Create a new instance of SortSpec + newSortSpec(): Sheets.Schema.SortSpec; + // Create a new instance of SourceAndDestination + newSourceAndDestination(): Sheets.Schema.SourceAndDestination; + // Create a new instance of Spreadsheet + newSpreadsheet(): Sheets.Schema.Spreadsheet; + // Create a new instance of SpreadsheetProperties + newSpreadsheetProperties(): Sheets.Schema.SpreadsheetProperties; + // Create a new instance of TextFormat + newTextFormat(): Sheets.Schema.TextFormat; + // Create a new instance of TextFormatRun + newTextFormatRun(): Sheets.Schema.TextFormatRun; + // Create a new instance of TextPosition + newTextPosition(): Sheets.Schema.TextPosition; + // Create a new instance of TextRotation + newTextRotation(): Sheets.Schema.TextRotation; + // Create a new instance of TextToColumnsRequest + newTextToColumnsRequest(): Sheets.Schema.TextToColumnsRequest; + // Create a new instance of TreemapChartColorScale + newTreemapChartColorScale(): Sheets.Schema.TreemapChartColorScale; + // Create a new instance of TreemapChartSpec + newTreemapChartSpec(): Sheets.Schema.TreemapChartSpec; + // Create a new instance of UnmergeCellsRequest + newUnmergeCellsRequest(): Sheets.Schema.UnmergeCellsRequest; + // Create a new instance of UpdateBandingRequest + newUpdateBandingRequest(): Sheets.Schema.UpdateBandingRequest; + // Create a new instance of UpdateBordersRequest + newUpdateBordersRequest(): Sheets.Schema.UpdateBordersRequest; + // Create a new instance of UpdateCellsRequest + newUpdateCellsRequest(): Sheets.Schema.UpdateCellsRequest; + // Create a new instance of UpdateChartSpecRequest + newUpdateChartSpecRequest(): Sheets.Schema.UpdateChartSpecRequest; + // Create a new instance of UpdateConditionalFormatRuleRequest + newUpdateConditionalFormatRuleRequest(): Sheets.Schema.UpdateConditionalFormatRuleRequest; + // Create a new instance of UpdateDeveloperMetadataRequest + newUpdateDeveloperMetadataRequest(): Sheets.Schema.UpdateDeveloperMetadataRequest; + // Create a new instance of UpdateDimensionGroupRequest + newUpdateDimensionGroupRequest(): Sheets.Schema.UpdateDimensionGroupRequest; + // Create a new instance of UpdateDimensionPropertiesRequest + newUpdateDimensionPropertiesRequest(): Sheets.Schema.UpdateDimensionPropertiesRequest; + // Create a new instance of UpdateEmbeddedObjectPositionRequest + newUpdateEmbeddedObjectPositionRequest(): Sheets.Schema.UpdateEmbeddedObjectPositionRequest; + // Create a new instance of UpdateFilterViewRequest + newUpdateFilterViewRequest(): Sheets.Schema.UpdateFilterViewRequest; + // Create a new instance of UpdateNamedRangeRequest + newUpdateNamedRangeRequest(): Sheets.Schema.UpdateNamedRangeRequest; + // Create a new instance of UpdateProtectedRangeRequest + newUpdateProtectedRangeRequest(): Sheets.Schema.UpdateProtectedRangeRequest; + // Create a new instance of UpdateSheetPropertiesRequest + newUpdateSheetPropertiesRequest(): Sheets.Schema.UpdateSheetPropertiesRequest; + // Create a new instance of UpdateSpreadsheetPropertiesRequest + newUpdateSpreadsheetPropertiesRequest(): Sheets.Schema.UpdateSpreadsheetPropertiesRequest; + // Create a new instance of ValueRange + newValueRange(): Sheets.Schema.ValueRange; + // Create a new instance of WaterfallChartColumnStyle + newWaterfallChartColumnStyle(): Sheets.Schema.WaterfallChartColumnStyle; + // Create a new instance of WaterfallChartCustomSubtotal + newWaterfallChartCustomSubtotal(): Sheets.Schema.WaterfallChartCustomSubtotal; + // Create a new instance of WaterfallChartDomain + newWaterfallChartDomain(): Sheets.Schema.WaterfallChartDomain; + // Create a new instance of WaterfallChartSeries + newWaterfallChartSeries(): Sheets.Schema.WaterfallChartSeries; + // Create a new instance of WaterfallChartSpec + newWaterfallChartSpec(): Sheets.Schema.WaterfallChartSpec; + } +} + +declare var Sheets: GoogleAppsScript.Sheets; diff --git a/types/google-apps-script/apis/slides/v1.d.ts b/types/google-apps-script/apis/slides/v1.d.ts deleted file mode 100644 index 101fb56029..0000000000 --- a/types/google-apps-script/apis/slides/v1.d.ts +++ /dev/null @@ -1,2072 +0,0 @@ -// Type definitions for Google Apps Script 2018-10-02 -// Project: https://developers.google.com/apps-script/ -// Definitions by: grant -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace GoogleAppsScript { - export module Slides_v1 { - //// FILE: color.proto //// - // An RGB color. - export interface RgbColor { - // The red component of the color, from 0.0 to 1.0. - red: number - // The green component of the color, from 0.0 to 1.0. - green: number - // The blue component of the color, from 0.0 to 1.0. - blue: number - } - - // A themeable solid color value. - export interface OpaqueColor { - // The kind of color value. - kind: { - // An opaque RGB color. - rgb_color: RgbColor - // An opaque theme color. - theme_color: ThemeColorType - } - } - - // A color that can either be fully opaque or fully transparent. - export interface OptionalColor { - // If set, this will be used as an opaque color. If unset, this represents - // a transparent color. - opaque_color: OpaqueColor - } - - // The palette of predefined colors for a page. - export interface ColorScheme { - // The ThemeColorType and corresponding concrete color pairs. - colors: ThemeColorPair[] - } - - // Theme color types. - // - // Contain a ColorScheme that defines a mapping of - // these theme color types to concrete colors. - export enum ThemeColorType { - // Unspecified theme color. This value should not be used. - THEME_COLOR_TYPE_UNSPECIFIED, - // Represents the first dark color. - DARK1, - // Represents the first light color. - LIGHT1, - // Represents the second dark color. - DARK2, - // Represents the second light color. - LIGHT2, - // Represents the first accent color. - ACCENT1, - // Represents the second accent color. - ACCENT2, - // Represents the third accent color. - ACCENT3, - // Represents the fourth accent color. - ACCENT4, - // Represents the fifth accent color. - ACCENT5, - // Represents the sixth accent color. - ACCENT6, - // Represents the color to use for hyperlinks. - HYPERLINK, - // Represents the color to use for visited hyperlinks. - FOLLOWED_HYPERLINK, - // Represents the first text color. - TEXT1, - // Represents the first background color. - BACKGROUND1, - // Represents the second text color. - TEXT2, - // Represents the second background color. - BACKGROUND2, - } - - // A pair mapping a theme color type to the concrete color it represents. - export interface ThemeColorPair { - // The type of the theme color. - type: ThemeColorType - // The concrete color corresponding to the theme color type above. - color: RgbColor - } - - // A color and position in a gradient band. - export interface ColorStop { - // The color of the gradient stop. - color: OpaqueColor - // The alpha value of this color in the gradient band. Defaults to 1.0, - // fully opaque. - alpha: number - // The relative position of the color stop in the gradient band measured - // in percentage. The value should be in the interval [0.0, 1.0]. - position: number - } - - //// FILE: dimension.proto //// - // Units of measurement. - export enum Unit { - // The units are unknown. - UNIT_UNSPECIFIED, - // An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter - // and thus there are 914,400 EMUs per inch, and 12,700 EMUs per point. - EMU, - // A point, 1/72 of an inch. - PT, - } - - // A magnitude in a single direction in the specified units. - export interface Dimension { - // The magnitude. - magnitude: number - // The units for magnitude. - unit: Unit - } - - // A width and height. - export interface Size { - // The width of the object. - width: Dimension - // The height of the object. - height: Dimension - } - - //// FILE: model.proto //// - // A location of a single table cell within a table. - export interface TableCellLocation { - // The 0-based row index. - row_index: number - - // The 0-based column index. - column_index: number - } - - // Common properties for a page element. - // - // Note: When you initially create a PageElement, the API may modify - // the values of both `size` and `transform`, but the - // visual size will be unchanged. - export interface PageElementProperties { - // The object ID of the page where the element is located. - page_object_id: string - - // The size of the element. - size: Size - - // The transform for the element. - transform: AffineTransform - } - - // The general text content. The text must reside in a compatible shape (e.g. - // text box or rectangle) or a table cell in a page. - export interface TextContent { - // The text contents broken down into its component parts, including styling - // information. This property is read-only. - text_elements: TextElement[] - // The bulleted lists contained in this text, keyed by list ID. - lists: string[] - } - - - // Predefined layout types. - // These are commonly found layouts in presentations. However, there is no - // guarantee that these layouts are present in the current master as they - // could have been deleted or not part of the used theme. Additionally, - // the placeholders on each layout may have been changed. - export enum PredefinedLayout { - // Unspecified layout. - PREDEFINED_LAYOUT_UNSPECIFIED, - // Blank layout, with no placeholders. - BLANK, - // Layout with a caption at the bottom. - CAPTION_ONLY, - // Layout with a title and a subtitle. - TITLE, - // Layout with a title and body. - TITLE_AND_BODY, - // Layout with a title and two columns. - TITLE_AND_TWO_COLUMNS, - // Layout with only a title. - TITLE_ONLY, - // Layout with a section title. - SECTION_HEADER, - // Layout with a title and subtitle on one side and description on the other. - SECTION_TITLE_AND_DESCRIPTION, - // Layout with one title and one body, arranged in a single column. - ONE_COLUMN_TEXT, - // Layout with a main point. - MAIN_POINT, - // Layout with a big number heading. - BIG_NUMBER, - } - - // A Google Slides presentation. - export interface Presentation { - // The ID of the presentation. - presentation_id: string - // The size of pages in the presentation. - page_size: Size - // The slides in the presentation. - // A slide inherits properties from a slide layout. - slides: Page[] - // The title of the presentation. - title: string - // The slide masters in the presentation. A slide master contains all common - // page elements and the common properties for a set of layouts. They serve - // three purposes: - // - // - Placeholder shapes on a master contain the default text styles and shape - // properties of all placeholder shapes on pages that use that master. - // - The master page properties define the common page properties inherited by - // its layouts. - // - Any other shapes on the master slide will appear on all slides using that - // master, regardless of their layout. - masters: Page[] - // The layouts in the presentation. A layout is a template that determines - // how content is arranged and styled on the slides that inherit from that - // layout. - layouts: Page[] - // The locale of the presentation, as an IETF BCP 47 language tag. - locale: string - // The revision ID of the presentation. Can be used in update requests - // to assert that the presentation revision hasn't changed since the last - // read operation. Only populated if the user has edit access to the - // presentation. - // - // The format of the revision ID may change over time, so it should be treated - // opaquely. A returned revision ID is only guaranteed to be valid for 24 - // hours after it has been returned and cannot be shared across users. If the - // revision ID is unchanged between calls, then the presentation has not - // changed. Conversely, a changed ID (for the same presentation and user) - // usually means the presentation has been updated; however, a changed ID can - // also be due to internal factors such as ID format changes. - revision_id: string - // The notes master in the presentation. It serves three purposes: - // - // - Placeholder shapes on a notes master contain the default text styles and - // shape properties of all placeholder shapes on notes pages. Specifically, - // a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a - // `BODY` placeholder shape contains the speaker notes. - // - The notes master page properties define the common page properties - // inherited by all notes pages. - // - Any other shapes on the notes master will appear on all notes pages. - // - // The notes master is read-only. - notes_master: Page - } - - // The type of a page. - enum PagePageType { - // A slide page. - SLIDE, - // A master slide page. - MASTER, - // A layout page. - LAYOUT, - // A notes page. - NOTES, - // A notes master page. - NOTES_MASTER, - } - - // A page in a presentation. - export interface Page { - // The object ID for this page. Object IDs used by - // Page and PageElement share the same namespace. - object_id: string - // The type of the page. - page_type: PagePageType - // The page elements rendered on the page. - page_elements: PageElement[] - // Properties that are specific for each page type. Masters do not require - // any additional properties. - properties: { - // Slide specific properties. Only set if page_type = SLIDE. - slide_properties: SlideProperties - // Layout specific properties. Only set if page_type = LAYOUT. - layout_properties: LayoutProperties - // Notes specific properties. Only set if page_type = NOTES. - notes_properties: NotesProperties - // Master specific properties. Only set if page_type = MASTER. - master_properties: MasterProperties - } - - // The revision ID of the presentation containing this page. Can be used in - // update requests to assert that the presentation revision hasn't changed - // since the last read operation. Only populated if the user has edit access - // to the presentation. - // - // The format of the revision ID may change over time, so it should be treated - // opaquely. A returned revision ID is only guaranteed to be valid for 24 - // hours after it has been returned and cannot be shared across users. If the - // revision ID is unchanged between calls, then the presentation has not - // changed. Conversely, a changed ID (for the same presentation and user) - // usually means the presentation has been updated; however, a changed ID can - // also be due to internal factors such as ID format changes. - revision_id: string - // The properties of the page. - page_properties: PageProperties - } - - // The page background fill. - interface PagePropertiesPageBackgroundFill { - // The background fill property state. - // - // Updating the fill on a page will implicitly update this field to - // `RENDERED`, unless another value is specified in the same request. To - // have no fill on a page, set this field to `NOT_RENDERED`. In this case, - // any other fill fields set in the same request will be ignored. - property_state: PropertyState, - // The kind of background fill. - kind: { - // Solid color fill. - solid_fill: SolidFill, - // Stretched picture fill. - stretched_picture_fill: StretchedPictureFill, - } - } - - // The properties of the Page. - // - // The page will inherit properties from the parent page. Depending on the page - // type the hierarchy is defined in either SlideProperties or - // LayoutProperties. - export interface PageProperties { - // The background fill of the page. If unset, the background fill is inherited - // from a parent page if it exists. If the page has no parent, then the - // background fill defaults to the corresponding fill in the Slides editor. - page_background_fill: PagePropertiesPageBackgroundFill, - // The color scheme of the page. If unset, the color scheme is inherited from - // a parent page. If the page has no parent, the color scheme uses a default - // Slides color scheme. This field is read-only. - color_scheme: ColorScheme, - } - - // The properties of Page that are only - // relevant for pages with page_type SLIDE. - export interface SlideProperties { - // The object ID of the layout that this slide is based on. This property is - // read-only. - layout_object_id: string - // The object ID of the master that this slide is based on. This property is - // read-only. - master_object_id: string - // The notes page that this slide is associated with. It defines the visual - // appearance of a notes page when printing or exporting slides with speaker - // notes. A notes page inherits properties from the notes master. - // The placeholder shape with type BODY on the notes page contains the speaker - // notes for this slide. The ID of this shape is identified by the speakerNotesObjectId field. - // The notes page is read-only except for the text content and styles of the - // speaker notes shape. This property is read-only. - notes_page: Page, - } - - // The properties of Page are only - // relevant for pages with page_type LAYOUT. - export interface LayoutProperties { - // The object ID of the master that this layout is based on. - master_object_id: string - // The name of the layout. - name: string - // The human-readable name of the layout. - display_name: string - } - - // The properties of Page that are only - // relevant for pages with page_type NOTES. - export interface NotesProperties { - // The object ID of the shape on this notes page that contains the speaker - // notes for the corresponding slide. - // The actual shape may not always exist on the notes page. Inserting text - // using this object ID will automatically create the shape. In this case, the - // actual shape may have different object ID. The `GetPresentation` or - // `GetPage` action will always return the latest object ID. - speaker_notes_object_id: string - } - - // The properties of Page that are only - // relevant for pages with page_type MASTER. - export interface MasterProperties { - // The human-readable name of the master. - display_name: string - } - - // A visual element rendered on a page. - // (== resource_for v1.presentations.pages.pageElements ==) - export interface PageElement { - // The object ID for this page element. Object IDs used by - // Page and PageElement share the same namespace. - object_id: string - // The size of the page element. - size: Size - // The transform of the page element. - // - // The visual appearance of the page element is determined by its absolute - // transform. To compute the absolute transform, preconcatenate a page - // element's transform with the transforms of all of its parent groups. If the - // page element is not in a group, its absolute transform is the same as the - // value in this field. - // - // The initial transform for the newly created Group is always the identity transform. - transform: AffineTransform - // The title of the page element. Combined with description to display alt - // text. - title: string - // The description of the page element. Combined with title to display alt - // text. - description: string - // The kind of element that this PageElement represents. Each message - // contains any properties that are specific to that kind of page element. - element_kind: { - // A collection of page elements joined as a single unit. - element_group: Group - // A generic shape. - shape: Shape - // An image page element. - image: Image - // A video page element. - video: Video - // A line page element. - line: Line - // A table page element. - table: Table - // A word art page element. - word_art: WordArt - // A linked chart embedded from Google Sheets. Unlinked charts are - // represented as images. - sheets_chart: SheetsChart - } - } - - // A PageElement kind representing a joined collection of PageElements. - export interface Group { - // The collection of elements in the group. The minimum size of a group is 2. - children: PageElement[] - } - - // The shape types. - export enum ShapeType { - // The shape type that is not predefined. - TYPE_UNSPECIFIED, - // Text box shape. - TEXT_BOX, - // Rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'rect'. - RECTANGLE, - // Round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType - // 'roundRect' - ROUND_RECTANGLE, - // Ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'ellipse' - ELLIPSE, - // Curved arc shape. Corresponds to ECMA-376 ST_ShapeType 'arc' - ARC, - // Bent arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentArrow' - BENT_ARROW, - // Bent up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentUpArrow' - BENT_UP_ARROW, - // Bevel shape. Corresponds to ECMA-376 ST_ShapeType 'bevel' - BEVEL, - // Block arc shape. Corresponds to ECMA-376 ST_ShapeType 'blockArc' - BLOCK_ARC, - // Brace pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracePair' - BRACE_PAIR, - // Bracket pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracketPair' - BRACKET_PAIR, - // Can shape. Corresponds to ECMA-376 ST_ShapeType 'can' - CAN, - // Chevron shape. Corresponds to ECMA-376 ST_ShapeType 'chevron' - CHEVRON, - // Chord shape. Corresponds to ECMA-376 ST_ShapeType 'chord' - CHORD, - // Cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloud' - CLOUD, - // Corner shape. Corresponds to ECMA-376 ST_ShapeType 'corner' - CORNER, - // Cube shape. Corresponds to ECMA-376 ST_ShapeType 'cube' - CUBE, - // Curved down arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'curvedDownArrow' - CURVED_DOWN_ARROW, - // Curved left arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'curvedLeftArrow' - CURVED_LEFT_ARROW, - // Curved right arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'curvedRightArrow' - CURVED_RIGHT_ARROW, - // Curved up arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'curvedUpArrow' - CURVED_UP_ARROW, - // Decagon shape. Corresponds to ECMA-376 ST_ShapeType 'decagon' - DECAGON, - // Diagonal stripe shape. Corresponds to ECMA-376 ST_ShapeType 'diagStripe' - DIAGONAL_STRIPE, - // Diamond shape. Corresponds to ECMA-376 ST_ShapeType 'diamond' - DIAMOND, - // Dodecagon shape. Corresponds to ECMA-376 ST_ShapeType 'dodecagon' - DODECAGON, - // Donut shape. Corresponds to ECMA-376 ST_ShapeType 'donut' - DONUT, - // Double wave shape. Corresponds to ECMA-376 ST_ShapeType 'doubleWave' - DOUBLE_WAVE, - // Down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrow' - DOWN_ARROW, - // Callout down arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'downArrowCallout' - DOWN_ARROW_CALLOUT, - // Folded corner shape. Corresponds to ECMA-376 ST_ShapeType 'foldedCorner' - FOLDED_CORNER, - // Frame shape. Corresponds to ECMA-376 ST_ShapeType 'frame' - FRAME, - // Half frame shape. Corresponds to ECMA-376 ST_ShapeType 'halfFrame' - HALF_FRAME, - // Heart shape. Corresponds to ECMA-376 ST_ShapeType 'heart' - HEART, - // Heptagon shape. Corresponds to ECMA-376 ST_ShapeType 'heptagon' - HEPTAGON, - // Hexagon shape. Corresponds to ECMA-376 ST_ShapeType 'hexagon' - HEXAGON, - // Home plate shape. Corresponds to ECMA-376 ST_ShapeType 'homePlate' - HOME_PLATE, - // Horizontal scroll shape. Corresponds to ECMA-376 ST_ShapeType - // 'horizontalScroll' - HORIZONTAL_SCROLL, - // Irregular seal 1 shape. Corresponds to ECMA-376 ST_ShapeType - // 'irregularSeal1' - IRREGULAR_SEAL_1, - // Irregular seal 2 shape. Corresponds to ECMA-376 ST_ShapeType - // 'irregularSeal2' - IRREGULAR_SEAL_2, - // Left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrow' - LEFT_ARROW, - // Callout left arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'leftArrowCallout' - LEFT_ARROW_CALLOUT, - // Left brace shape. Corresponds to ECMA-376 ST_ShapeType 'leftBrace' - LEFT_BRACE, - // Left bracket shape. Corresponds to ECMA-376 ST_ShapeType 'leftBracket' - LEFT_BRACKET, - // Left right arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'leftRightArrow' - LEFT_RIGHT_ARROW, - // Callout left right arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'leftRightArrowCallout' - LEFT_RIGHT_ARROW_CALLOUT, - // Left right up arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'leftRightUpArrow' - LEFT_RIGHT_UP_ARROW, - // Left up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftUpArrow' - LEFT_UP_ARROW, - // Lightning bolt shape. Corresponds to ECMA-376 ST_ShapeType - // 'lightningBolt' - LIGHTNING_BOLT, - // Divide math shape. Corresponds to ECMA-376 ST_ShapeType 'mathDivide' - MATH_DIVIDE, - // Equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathEqual' - MATH_EQUAL, - // Minus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMinus' - MATH_MINUS, - // Multiply math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMultiply' - MATH_MULTIPLY, - // Not equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathNotEqual' - MATH_NOT_EQUAL, - // Plus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathPlus' - MATH_PLUS, - // Moon shape. Corresponds to ECMA-376 ST_ShapeType 'moon' - MOON, - // No smoking shape. Corresponds to ECMA-376 ST_ShapeType 'noSmoking' - NO_SMOKING, - // Notched right arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'notchedRightArrow' - NOTCHED_RIGHT_ARROW, - // Octagon shape. Corresponds to ECMA-376 ST_ShapeType 'octagon' - OCTAGON, - // Parallelogram shape. Corresponds to ECMA-376 ST_ShapeType 'parallelogram' - PARALLELOGRAM, - // Pentagon shape. Corresponds to ECMA-376 ST_ShapeType 'pentagon' - PENTAGON, - // Pie shape. Corresponds to ECMA-376 ST_ShapeType 'pie' - PIE, - // Plaque shape. Corresponds to ECMA-376 ST_ShapeType 'plaque' - PLAQUE, - // Plus shape. Corresponds to ECMA-376 ST_ShapeType 'plus' - PLUS, - // Quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrow' - QUAD_ARROW, - // Callout quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'quadArrowCallout' - QUAD_ARROW_CALLOUT, - // Ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon' - RIBBON, - // Ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon2' - RIBBON_2, - // Right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrow' - RIGHT_ARROW, - // Callout right arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'rightArrowCallout' - RIGHT_ARROW_CALLOUT, - // Right brace shape. Corresponds to ECMA-376 ST_ShapeType 'rightBrace' - RIGHT_BRACE, - // Right bracket shape. Corresponds to ECMA-376 ST_ShapeType 'rightBracket' - RIGHT_BRACKET, - // One round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType - // 'round1Rect' - ROUND_1_RECTANGLE, - // Two diagonal round corner rectangle shape. Corresponds to ECMA-376 - // ST_ShapeType 'round2DiagRect' - ROUND_2_DIAGONAL_RECTANGLE, - // Two same-side round corner rectangle shape. Corresponds to ECMA-376 - // ST_ShapeType 'round2SameRect' - ROUND_2_SAME_RECTANGLE, - // Right triangle shape. Corresponds to ECMA-376 ST_ShapeType 'rtTriangle' - RIGHT_TRIANGLE, - // Smiley face shape. Corresponds to ECMA-376 ST_ShapeType 'smileyFace' - SMILEY_FACE, - // One snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType - // 'snip1Rect' - SNIP_1_RECTANGLE, - // Two diagonal snip corner rectangle shape. Corresponds to ECMA-376 - // ST_ShapeType 'snip2DiagRect' - SNIP_2_DIAGONAL_RECTANGLE, - // Two same-side snip corner rectangle shape. Corresponds to ECMA-376 - // ST_ShapeType 'snip2SameRect' - SNIP_2_SAME_RECTANGLE, - // One snip one round corner rectangle shape. Corresponds to ECMA-376 - // ST_ShapeType 'snipRoundRect' - SNIP_ROUND_RECTANGLE, - // Ten pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star10' - STAR_10, - // Twelve pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star12' - STAR_12, - // Sixteen pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star16' - STAR_16, - // Twenty four pointed star shape. Corresponds to ECMA-376 ST_ShapeType - // 'star24' - STAR_24, - // Thirty two pointed star shape. Corresponds to ECMA-376 ST_ShapeType - // 'star32' - STAR_32, - // Four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star4' - STAR_4, - // Five pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star5' - STAR_5, - // Six pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star6' - STAR_6, - // Seven pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star7' - STAR_7, - // Eight pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star8' - STAR_8, - // Striped right arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'stripedRightArrow' - STRIPED_RIGHT_ARROW, - // Sun shape. Corresponds to ECMA-376 ST_ShapeType 'sun' - SUN, - // Trapezoid shape. Corresponds to ECMA-376 ST_ShapeType 'trapezoid' - TRAPEZOID, - // Triangle shape. Corresponds to ECMA-376 ST_ShapeType 'triangle' - TRIANGLE, - // Up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrow' - UP_ARROW, - // Callout up arrow shape. Corresponds to ECMA-376 ST_ShapeType - // 'upArrowCallout' - UP_ARROW_CALLOUT, - // Up down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upDownArrow' - UP_DOWN_ARROW, - // U-turn arrow shape. Corresponds to ECMA-376 ST_ShapeType 'uturnArrow' - UTURN_ARROW, - // Vertical scroll shape. Corresponds to ECMA-376 ST_ShapeType - // 'verticalScroll' - VERTICAL_SCROLL, - // Wave shape. Corresponds to ECMA-376 ST_ShapeType 'wave' - WAVE, - // Callout wedge ellipse shape. Corresponds to ECMA-376 ST_ShapeType - // 'wedgeEllipseCallout' - WEDGE_ELLIPSE_CALLOUT, - // Callout wedge rectangle shape. Corresponds to ECMA-376 ST_ShapeType - // 'wedgeRectCallout' - WEDGE_RECTANGLE_CALLOUT, - // Callout wedge round rectangle shape. Corresponds to ECMA-376 ST_ShapeType - // 'wedgeRoundRectCallout' - WEDGE_ROUND_RECTANGLE_CALLOUT, - // Alternate process flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartAlternateProcess' - FLOW_CHART_ALTERNATE_PROCESS, - // Collate flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartCollate' - FLOW_CHART_COLLATE, - // Connector flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartConnector' - FLOW_CHART_CONNECTOR, - // Decision flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartDecision' - FLOW_CHART_DECISION, - // Delay flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDelay' - FLOW_CHART_DELAY, - // Display flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartDisplay' - FLOW_CHART_DISPLAY, - // Document flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartDocument' - FLOW_CHART_DOCUMENT, - // Extract flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartExtract' - FLOW_CHART_EXTRACT, - // Input output flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartInputOutput' - FLOW_CHART_INPUT_OUTPUT, - // Internal storage flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartInternalStorage' - FLOW_CHART_INTERNAL_STORAGE, - // Magnetic disk flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartMagneticDisk' - FLOW_CHART_MAGNETIC_DISK, - // Magnetic drum flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartMagneticDrum' - FLOW_CHART_MAGNETIC_DRUM, - // Magnetic tape flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartMagneticTape' - FLOW_CHART_MAGNETIC_TAPE, - // Manual input flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartManualInput' - FLOW_CHART_MANUAL_INPUT, - // Manual operation flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartManualOperation' - FLOW_CHART_MANUAL_OPERATION, - // Merge flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMerge' - FLOW_CHART_MERGE, - // Multi-document flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartMultidocument' - FLOW_CHART_MULTIDOCUMENT, - // Offline storage flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartOfflineStorage' - FLOW_CHART_OFFLINE_STORAGE, - // Off-page connector flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartOffpageConnector' - FLOW_CHART_OFFPAGE_CONNECTOR, - // Online storage flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartOnlineStorage' - FLOW_CHART_ONLINE_STORAGE, - // Or flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOr' - FLOW_CHART_OR, - // Predefined process flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartPredefinedProcess' - FLOW_CHART_PREDEFINED_PROCESS, - // Preparation flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartPreparation' - FLOW_CHART_PREPARATION, - // Process flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartProcess' - FLOW_CHART_PROCESS, - // Punched card flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartPunchedCard' - FLOW_CHART_PUNCHED_CARD, - // Punched tape flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartPunchedTape' - FLOW_CHART_PUNCHED_TAPE, - // Sort flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSort' - FLOW_CHART_SORT, - // Summing junction flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartSummingJunction' - FLOW_CHART_SUMMING_JUNCTION, - // Terminator flow shape. Corresponds to ECMA-376 ST_ShapeType - // 'flowChartTerminator' - FLOW_CHART_TERMINATOR, - // East arrow shape. - ARROW_EAST, - // Northeast arrow shape. - ARROW_NORTH_EAST, - // North arrow shape. - ARROW_NORTH, - // Speech shape. - SPEECH, - // Star burst shape. - STARBURST, - // Teardrop shape. Corresponds to ECMA-376 ST_ShapeType 'teardrop' - TEARDROP, - // Ellipse ribbon shape. Corresponds to ECMA-376 ST_ShapeType - // 'ellipseRibbon' - ELLIPSE_RIBBON, - // Ellipse ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType - // 'ellipseRibbon2' - ELLIPSE_RIBBON_2, - // Callout cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloudCallout' - CLOUD_CALLOUT, - // Custom shape. - CUSTOM, - } - - // A PageElement kind representing a - // generic shape that does not have a more specific classification. - interface Shape { - // The shape types. - // - // Many of these shapes correspond to predefined shapes from the ECMA-376 - // standard. More information on those shapes can be found in the description - // of the "ST_ShapeType" simple type in section 20.1.10.55 of "Office Open XML - // File Formats - Fundamentals and Markup Language Reference", part 1 of - // [ECMA-376 4th - // edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm). - - // The type of the shape. - shape_type: ShapeType - // The text content of the shape. - text: TextContent - // The properties of the shape. - shape_properties: ShapeProperties - // Placeholders are shapes that are inherit from corresponding placeholders on - // layouts and masters. - // - // If set, the shape is a placeholder shape and any inherited properties - // can be resolved by looking at the parent placeholder identified by the - // parent_object_id field. - placeholder: Placeholder - } - - // The type of the placeholder. - export enum PlaceholderType { - // Default value, signifies it is not a placeholder. - NONE, - // Body text. - BODY, - // Chart or graph. - CHART, - // Clip art image. - CLIP_ART, - // Title centered. - CENTERED_TITLE, - // Diagram. - DIAGRAM, - // Date and time. - DATE_AND_TIME, - // Footer text. - FOOTER, - // Header text. - HEADER, - // Multimedia. - MEDIA, - // Any content type. - OBJECT, - // Picture. - PICTURE, - // Number of a slide. - SLIDE_NUMBER, - // Subtitle. - SUBTITLE, - // Table. - TABLE, - // Slide title. - TITLE, - // Slide image. - SLIDE_IMAGE, - } - - // The placeholder information that uniquely identifies a placeholder shape. - export interface Placeholder { - // The type of a placeholder shape. - // - // Many of these placeholder types correspond to placeholder ids from the - // ECMA-376 standard. More information on those shapes can be found in the - // description of the "ST_PlaceholderType" type in section 19.7.10 of "Office - // Open XML File Formats - Fundamentals and Markup Language Reference", part - // 1 of [ECMA-376 4th - // edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm). - // The type of the placeholder. - type: PlaceholderType - // The index of the placeholder. If the same placeholder types are present in - // the same page, they would have different index values. - index: number - // The object ID of this shape's parent placeholder. - // If unset, the parent placeholder shape does not exist, so the shape does - // not inherit properties from any other shape. - parent_object_id: string - } - - // The shape background fill. - interface ShapePropertiesShapeBackgroundFill { - // The background fill property state. - // - // Updating the fill on a shape will implicitly update this field to - // `RENDERED`, unless another value is specified in the same request. To - // have no fill on a shape, set this field to `NOT_RENDERED`. In this case, - // any other fill fields set in the same request will be ignored. - property_state: PropertyState - // The kind of background fill. - kind: { - // Solid color fill. - solid_fill: SolidFill - } - } - - // The properties of a Shape. - // - // If the shape is a placeholder shape as determined by the - // placeholder field, then these - // properties may be inherited from a parent placeholder shape. - // Determining the rendered value of the property depends on the corresponding - // property_state field value. - export interface ShapeProperties { - // The background fill of the shape. If unset, the background fill is - // inherited from a parent placeholder if it exists. If the shape has no - // parent, then the default background fill depends on the shape type, - // matching the defaults for new shapes created in the Slides editor. - shape_background_fill: ShapePropertiesShapeBackgroundFill - // The outline of the shape. If unset, the outline is inherited from a - // parent placeholder if it exists. If the shape has no parent, then the - // default outline depends on the shape type, matching the defaults for - // new shapes created in the Slides editor. - outline: Outline - // The shadow properties of the shape. If unset, the shadow is inherited from - // a parent placeholder if it exists. If the shape has no parent, then the - // default shadow matches the defaults for new shapes created in the Slides - // editor. This property is read-only. - shadow: Shadow - // The hyperlink destination of the shape. If unset, there is no link. Links - // are not inherited from parent placeholders. - link: Link - // The alignment of the content in the shape. If unspecified, - // the alignment is inherited from a parent placeholder if it exists. If the - // shape has no parent, the default alignment matches the alignment for new - // shapes created in the Slides editor. - content_alignment: ContentAlignment - } - - // The types of content alignment. - // - // Derived from a subset of the values of the "ST_TextAnchoringType" simple type - // in section 20.1.10.59 of "Office Open XML File Formats - Fundamentals and - // Markup Language Reference", part 1 of [ECMA-376 4th edition] - // (http://www.ecma-international.org/publications/standards/Ecma-376.htm). - export enum ContentAlignment { - // An unspecified content alignment. The content alignment is inherited from - // the parent if it exists. - CONTENT_ALIGNMENT_UNSPECIFIED, - // An unsupported content alignment. - CONTENT_ALIGNMENT_UNSUPPORTED, - // An alignment that aligns the content to the top of the content holder. - // Corresponds to ECMA-376 ST_TextAnchoringType 't'. - TOP, - // An alignment that aligns the content to the middle of the content - // holder. Corresponds to ECMA-376 ST_TextAnchoringType 'ctr'. - MIDDLE, - // An alignment that aligns the content to the bottom of the content - // holder. Corresponds to ECMA-376 ST_TextAnchoringType 'b'. - BOTTOM, - } - - // A PageElement kind representing an image. - export interface Image { - // An URL to an image with a default lifetime of 30 minutes. - // This URL is tagged with the account of the requester. Anyone with the URL - // effectively accesses the image as the original requester. Access to the - // image may be lost if the presentation's sharing settings change. - content_url: string - // The properties of the image. - image_properties: ImageProperties - // The source URL is the URL used to insert the image. The source URL can be - // empty. - source_url: string - } - - // The properties of the Image. - export interface ImageProperties { - // The crop properties of the image. If not set, the image is not cropped. - // This property is read-only. - crop_properties: CropProperties - // The transparency effect of the image. The value should be in the interval - // [0.0, 1.0], where 0 means no effect and 1 means completely transparent. - // This property is read-only. - transparency: number - // The brightness effect of the image. The value should be in the interval - // [-1.0, 1.0], where 0 means no effect. This property is read-only. - brightness: number - // The contrast effect of the image. The value should be in the interval - // [-1.0, 1.0], where 0 means no effect. This property is read-only. - contrast: number - // The recolor effect of the image. If not set, the image is not recolored. - // This property is read-only. - recolor: Recolor - // The outline of the image. If not set, the image has no outline. - outline: Outline - // The shadow of the image. If not set, the image has no shadow. This property - // is read-only. - shadow: Shadow - // The hyperlink destination of the image. If unset, there is no link. - link: Link - } - - // The video sources. - enum VideoSource { - // The video source is unspecified. - SOURCE_UNSPECIFIED, - // The video source is YouTube. - YOUTUBE, - // The video source is Google Drive. - DRIVE, - } - - // A PageElement kind representing a video. - export interface Video { - // An URL to a video. The URL is valid as long as the source video exists and - // sharing settings do not change. - url: string - // The video source. - source: VideoSource - // The video source's unique identifier for this video. - id: string - // The properties of the video. - video_properties: VideoProperties - } - - // The properties of the Video. - export interface VideoProperties { - // The outline of the video. The default outline matches the defaults for new - // videos created in the Slides editor. - outline: Outline - // Whether to enable video autoplay when the page is displayed in present - // mode. Defaults to false. - auto_play: boolean - // The time at which to start playback, measured in seconds from the beginning - // of the video. - // If set, the start time should be before the end time. - // If you set this to a value that exceeds the video's length in seconds, the - // video will be played from the last second. - // If not set, the video will be played from the beginning. - start: number - // The time at which to end playback, measured in seconds from the beginning - // of the video. - // If set, the end time should be after the start time. - // If not set or if you set this to a value that exceeds the video's length, - // the video will be played until its end. - end: number - // Whether to mute the audio during video playback. Defaults to false. - mute: boolean - } - - // Derived from a subset of the values of the "ST_ShapeType" simple type in - // section 20.1.10.55 of "Office Open XML File Formats - Fundamentals and - // Markup Language Reference", part 1 of [ECMA-376 4th edition] - // (http://www.ecma-international.org/publications/standards/Ecma-376.htm). - enum LineType { - // An unspecified line type. - TYPE_UNSPECIFIED, - // Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType - // 'straightConnector1'. - STRAIGHT_CONNECTOR_1, - // Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType - // 'bentConnector2'. - BENT_CONNECTOR_2, - // Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType - // 'bentConnector3'. - BENT_CONNECTOR_3, - // Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType - // 'bentConnector4'. - BENT_CONNECTOR_4, - // Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType - // 'bentConnector5'. - BENT_CONNECTOR_5, - // Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType - // 'curvedConnector2'. - CURVED_CONNECTOR_2, - // Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType - // 'curvedConnector3'. - CURVED_CONNECTOR_3, - // Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType - // 'curvedConnector4'. - CURVED_CONNECTOR_4, - // Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType - // 'curvedConnector5'. - CURVED_CONNECTOR_5, - // Straight line. Corresponds to ECMA-376 ST_ShapeType 'line'. This line - // type is not a connector. - STRAIGHT_LINE, - } - - // A PageElement kind representing a - // non-connector line, straight connector, curved connector, or bent connector. - export interface Line { - // The properties of the line. - line_properties: LineProperties - // The type of the line. - line_type: LineType - } - - // The catgory of a Line. - export enum LineCategory { - // Unspecified line category. - LINE_CATEGORY_UNSPECIFIED, - // Straight connectors, including straight connector 1. - STRAIGHT, - // Bent connectors, including bent connector 2 to 5. - BENT, - // Curved connectors, including curved connector 2 to 5. - CURVED, - } - - // The fill of the line. - export interface LinePropertiesLineFill { - // The kind of line fill. - kind: { - // Solid color fill. - solid_fill: SolidFill - } - } - - // The kinds of start and end forms with which linear geometry can be - // rendered. Some values are based on the "ST_LineEndType" simple type - // described in section 20.1.10.33 of "Office Open XML File Formats - - // Fundamentals and Markup Language Reference", part 1 of [ECMA-376 4th - // edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm). - export enum LinePropertiesArrowStyle { - // An unspecified arrow style. - ARROW_STYLE_UNSPECIFIED, - // No arrow. - NONE, - // Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value - // 'stealth'. - STEALTH_ARROW, - // Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'. - FILL_ARROW, - // Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'. - FILL_CIRCLE, - // Filled square. - FILL_SQUARE, - // Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'. - FILL_DIAMOND, - // Hollow arrow. - OPEN_ARROW, - // Hollow circle. - OPEN_CIRCLE, - // Hollow square. - OPEN_SQUARE, - // Hollow diamond. - OPEN_DIAMOND, - } - - // The properties of the Line. - // - // When unset, these fields default to values that match the appearance of - // new lines created in the Slides editor. - export interface LineProperties { - // The fill of the line. The default line fill matches the defaults for new - // lines created in the Slides editor. - line_fill: LinePropertiesLineFill - // The thickness of the line. - weight: Dimension - // The dash style of the line. - dash_style: DashStyle - // The style of the arrow at the beginning of the line. - start_arrow: LinePropertiesArrowStyle - // The style of the arrow at the end of the line. - end_arrow: LinePropertiesArrowStyle - // The hyperlink destination of the line. If unset, there is no link. - link: Link - } - - // A PageElement kind representing a table. - export interface Table { - // Number of rows in the table. - rows: number - // Number of columns in the table. - columns: number - // Properties and contents of each row. - // - // Cells that span multiple rows are contained in only one of these rows and - // have a row_span greater than 1. - table_rows: TableRow[] - // Properties of each column. - table_columns: TableColumnProperties[] - // Properties of horizontal cell borders. - // - // A table's horizontal cell borders are represented as a grid. The grid has - // one more row than the number of rows in the table and the same number of - // columns as the table. For example, if the table is 3 x 3, its horizontal - // borders will be represented as a grid with 4 rows and 3 columns. - horizontal_border_rows: TableBorderRow[] - // Properties of vertical cell borders. - // - // A table's vertical cell borders are represented as a grid. The grid has the - // same number of rows as the table and one more column than the number of - // columns in the table. For example, if the table is 3 x 3, its vertical - // borders will be represented as a grid with 3 rows and 4 columns. - vertical_border_rows: TableBorderRow[] - } - - // Properties of each column in a table. - export interface TableColumnProperties { - // Width of a column. - column_width: Dimension - } - - // Properties and contents of each row in a table. - export interface TableRow { - // Height of a row. - row_height: Dimension - // Properties of the row. - table_row_properties: TableRowProperties - // Properties and contents of each cell. - // - // Cells that span multiple columns are represented only once with a - // column_span greater than 1. As a result, the length of this - // collection does not always match the number of columns of the entire table. - table_cells: TableCell[] - } - - // Properties of each row in a table. - export interface TableRowProperties { - // Minimum height of the row. The row will be rendered in the Slides editor at - // a height equal to or greater than this value in order to show all the text - // in the row's cell(s). - min_row_height: Dimension - } - - // Properties and contents of each table cell. - export interface TableCell { - // The location of the cell within the table. - location: TableCellLocation - // Row span of the cell. - row_span: number - // Column span of the cell. - column_span: number - // The text content of the cell. - text: TextContent - // The properties of the table cell. - table_cell_properties: TableCellProperties - } - - // The table cell background fill. - export interface TableCellPropertiesTableCellBackgroundFill { - // The background fill property state. - // - // Updating the fill on a table cell will implicitly update this field - // to `RENDERED`, unless another value is specified in the same request. To - // have no fill on a table cell, set this field to `NOT_RENDERED`. In this - // case, any other fill fields set in the same request will be ignored. - property_state: PropertyState - // The kind of background fill. - kind: { - // Solid color fill. - solid_fill: SolidFill - } - } - - // The properties of the TableCell. - export interface TableCellProperties { - // The background fill of the table cell. The default fill matches the fill - // for newly created table cells in the Slides editor. - table_cell_background_fill: TableCellPropertiesTableCellBackgroundFill - // The alignment of the content in the table cell. The default alignment - // matches the alignment for newly created table cells in the Slides editor. - content_alignment: ContentAlignment - } - - // Contents of each border row in a table. - export interface TableBorderRow { - // Properties of each border cell. When a border's adjacent table cells are - // merged, it is not included in the response. - table_border_cells: TableBorderCell[] - } - - // The properties of each border cell. - export interface TableBorderCell { - // The location of the border within the border table. - location: TableCellLocation - // The border properties. - table_border_properties: TableBorderProperties - } - - // The fill of the border. - export interface TableBorderPropertiesTableBorderFill { - // The kind of fill. - kind: { - // Solid fill. - solid_fill: SolidFill - } - } - - // The border styling properties of the TableBorderCell. - export interface TableBorderProperties { - // The fill of the table border. - table_border_fill: TableBorderPropertiesTableBorderFill - // The thickness of the border. - weight: Dimension - // The dash style of the border. - dash_style: DashStyle - } - - // A table range represents a reference to a subset of a table. - // - // It's important to note that the cells specified by a table range do not - // necessarily form a rectangle. For example, let's say we have a 3 x 3 table - // where all the cells of the last row are merged together. The table looks - // like this: - // - // [ ][ ][ ] - // [ ][ ][ ] - // [ ] - // - // A table range with location = (0, 0), row span = 3 and column span = 2 - // specifies the following cells: - // - // [ x ][ x ][ ] - // [ x ][ x ][ ] - // [ x ] - // - export interface TableRange { - // The starting location of the table range. - location: TableCellLocation - // The row span of the table range. - row_span: number - // The column span of the table range. - column_span: number - } - - // A PageElement kind representing word art. - export interface WordArt { - // The text rendered as word art. - rendered_text: string - } - - // A PageElement kind representing a linked chart embedded from Google Sheets. - export interface SheetsChart { - // The ID of the Google Sheets spreadsheet that contains the source chart. - spreadsheet_id: string - // The ID of the specific chart in the Google Sheets spreadsheet that is - // embedded. - chart_id: number - // The URL of an image of the embedded chart, with a default lifetime of 30 - // minutes. This URL is tagged with the account of the requester. Anyone with - // the URL effectively accesses the image as the original requester. Access to - // the image may be lost if the presentation's sharing settings change. - content_url: string - // The properties of the Sheets chart. - sheets_chart_properties: SheetsChartProperties - } - - // The properties of the SheetsChart. - export interface SheetsChartProperties { - // The kind of Sheets chart properties. - kind: { - // The properties of the embedded chart image. - chart_image_properties: ImageProperties - } - } - - //// FILE: properties.proto //// - // The possible states of a property. - enum PropertyState { - // If a property's state is RENDERED, then the element has the corresponding - // property when rendered on a page. If the element is a placeholder shape as - // determined by the placeholder - // field, and it inherits from a placeholder shape, the corresponding field - // may be unset, meaning that the property value is inherited from a parent - // placeholder. If the element does not inherit, then the field will contain - // the rendered value. This is the default value. - RENDERED, - // If a property's state is NOT_RENDERED, then the element does not have the - // corresponding property when rendered on a page. However, the field may - // still be set so it can be inherited by child shapes. To remove a property - // from a rendered element, set its property_state to NOT_RENDERED. - NOT_RENDERED, - // If a property's state is INHERIT, then the property state uses the value of - // corresponding `property_state` field on the parent shape. Elements that do - // not inherit will never have an INHERIT property state. - INHERIT, - } - - // The stretched picture fill. The page or page element is filled entirely with - // the specified picture. The picture is stretched to fit its container. - export interface StretchedPictureFill { - // Reading the content_url: - // - // An URL to a picture with a default lifetime of 30 minutes. - // This URL is tagged with the account of the requester. Anyone with the URL - // effectively accesses the picture as the original requester. Access to the - // picture may be lost if the presentation's sharing settings change. - // - // Writing the content_url: - // - // The picture is fetched once at insertion time and a copy is stored for - // display inside the presentation. Pictures must be less than 50MB in size, - // cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF - // format. - // - // The provided URL can be at most 2 kB in length. - // - content_url: string, - // The original size of the picture fill. This field is read-only. - size: Size, - } - - // A solid color fill. The page or page element is filled entirely with the - // specified color value. - // - // If any field is unset, its value may be inherited from a parent placeholder - // if it exists. - export interface SolidFill { - // The color value of the solid fill. - color: OpaqueColor, - // The fraction of this `color` that should be applied to the pixel. - // That is, the final pixel color is defined by the equation: - // - // pixel color = alpha * (color) + (1.0 - alpha) * (background color) - // - // This means that a value of 1.0 corresponds to a solid color, whereas - // a value of 0.0 corresponds to a completely transparent color. - alpha: number - } - - // The fill of the outline. - interface OutlineOutlineFill { - // The kind of outline fill. - kind: { - // Solid color fill. - solid_fill: SolidFill - } - } - - // The outline of a PageElement. - // - // If these fields are unset, they may be inherited from a parent placeholder - // if it exists. If there is no parent, the fields will default to the value - // used for new page elements created in the Slides editor, which may depend on - // the page element kind. - export interface Outline { - // Solid color fill. - solid_fill: SolidFill - // The fill of the outline. - outline_fill: OutlineOutlineFill - // The thickness of the outline. - weight: Dimension - // The dash style of the outline. - dash_style: DashStyle - // The outline property state. - // - // Updating the outline on a page element will implicitly update this field - // to `RENDERED`, unless another value is specified in the same request. To - // have no outline on a page element, set this field to `NOT_RENDERED`. In - // this case, any other outline fields set in the same request will be - // ignored. - property_state: PropertyState - } - - // The kinds of dashes with which linear geometry can be rendered. These - // values are based on the "ST_PresetLineDashVal" simple type described in - // section 20.1.10.48 of "Office Open XML File Formats - Fundamentals and - // Markup Language Reference", part 1 of [ECMA-376 4th - // edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm). - export enum DashStyle { - // Unspecified dash style. - DASH_STYLE_UNSPECIFIED, - // Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'. - // This is the default dash style. - SOLID, - // Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'. - DOT, - // Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'. - DASH, - // Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal - // value 'dashDot'. - DASH_DOT, - // Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal - // value 'lgDash'. - LONG_DASH, - // Alternating large dashes and dots. Corresponds to ECMA-376 - // ST_PresetLineDashVal value 'lgDashDot'. - LONG_DASH_DOT, - } - - // Defines reference positions in a rectangle. - export enum RectanglePosition { - // Unspecified. - RECTANGLE_POSITION_UNSPECIFIED, - // Top left. - TOP_LEFT, - // Top center. - TOP_CENTER, - // Top right. - TOP_RIGHT, - // Left center. - LEFT_CENTER, - // Center. - CENTER, - // Right center. - RIGHT_CENTER, - // Bottom left. - BOTTOM_LEFT, - // Bottom center. - BOTTOM_CENTER, - // Bottom right. - BOTTOM_RIGHT, - } - - // The shadow types. - export enum ShadowType { - // Unspecified shadow type. - SHADOW_TYPE_UNSPECIFIED, - // Outer shadow. - OUTER, - } - - // The shadow properties of a page element. - // - // If these fields are unset, they may be inherited from a parent placeholder - // if it exists. If there is no parent, the fields will default to the value - // used for new page elements created in the Slides editor, which may depend on - // the page element kind. - export interface Shadow { - // The type of the shadow. - type: ShadowType, - // Transform that encodes the translate, scale, and skew of the shadow, - // relative to the alignment position. - transform: AffineTransform, - // The alignment point of the shadow, that sets the origin for translate, - // scale and skew of the shadow. - alignment: RectanglePosition, - // The radius of the shadow blur. The larger the radius, the more diffuse the - // shadow becomes. - blur_radius: Dimension, - // The shadow color value. - color: OpaqueColor, - // The alpha of the shadow's color, from 0.0 to 1.0. - alpha: number - // Whether the shadow should rotate with the shape. - rotate_with_shape: boolean - // The shadow property state. - // - // Updating the shadow on a page element will implicitly update this field to - // `RENDERED`, unless another value is specified in the same request. To have - // no shadow on a page element, set this field to `NOT_RENDERED`. In this - // case, any other shadow fields set in the same request will be ignored. - property_state: PropertyState - } - - // The crop properties of an object enclosed in a container. For example, an - // Image. - // - // The crop properties is represented by the offsets of four edges which define - // a crop rectangle. The offsets are measured in percentage from the - // corresponding edges of the object's original bounding rectangle towards - // inside, relative to the object's original dimensions. - // - // - If the offset is in the interval (0, 1), the corresponding edge of crop - // rectangle is positioned inside of the object's original bounding rectangle. - // - If the offset is negative or greater than 1, the corresponding edge of crop - // rectangle is positioned outside of the object's original bounding rectangle. - // - If the left edge of the crop rectangle is on the right side of its right - // edge, the object will be flipped horizontally. - // - If the top edge of the crop rectangle is below its bottom edge, the object - // will be flipped vertically. - // - If all offsets and rotation angle is 0, the object is not cropped. - // - // After cropping, the content in the crop rectangle will be stretched to fit - // its container. - export interface CropProperties { - // The offset specifies the left edge of the crop rectangle that is located to - // the right of the original bounding rectangle left edge, relative to the - // object's original width. - left_offset: number - // The offset specifies the right edge of the crop rectangle that is located - // to the left of the original bounding rectangle right edge, relative to the - // object's original width. - right_offset: number - // The offset specifies the top edge of the crop rectangle that is located - // below the original bounding rectangle top edge, relative to the object's - // original height. - top_offset: number - // The offset specifies the bottom edge of the crop rectangle that is located - // above the original bounding rectangle bottom edge, relative to the object's - // original height. - bottom_offset: number - // The rotation angle of the crop window around its center, in radians. - // Rotation angle is applied after the offset. - angle: number - } - - // A recolor effect applied on an image. - export enum RecolorName { - // No recolor effect. The default value. - NONE, - // A recolor effect that lightens the image using the page's first available - // color from its color scheme. - LIGHT1, - // A recolor effect that lightens the image using the page's second - // available color from its color scheme. - LIGHT2, - // A recolor effect that lightens the image using the page's third available - // color from its color scheme. - LIGHT3, - // A recolor effect that lightens the image using the page's forth available - // color from its color scheme. - LIGHT4, - // A recolor effect that lightens the image using the page's fifth available - // color from its color scheme. - LIGHT5, - // A recolor effect that lightens the image using the page's sixth available - // color from its color scheme. - LIGHT6, - // A recolor effect that lightens the image using the page's seventh - // available color from its color scheme.e. - LIGHT7, - // A recolor effect that lightens the image using the page's eighth - // available color from its color scheme. - LIGHT8, - // A recolor effect that lightens the image using the page's ninth available - // color from its color scheme. - LIGHT9, - // A recolor effect that lightens the image using the page's tenth available - // color from its color scheme. - LIGHT10, - // A recolor effect that darkens the image using the page's first available - // color from its color scheme. - DARK1, - // A recolor effect that darkens the image using the page's second available - // color from its color scheme. - DARK2, - // A recolor effect that darkens the image using the page's third available - // color from its color scheme. - DARK3, - // A recolor effect that darkens the image using the page's fourth available - // color from its color scheme. - DARK4, - // A recolor effect that darkens the image using the page's fifth available - // color from its color scheme. - DARK5, - // A recolor effect that darkens the image using the page's sixth available - // color from its color scheme. - DARK6, - // A recolor effect that darkens the image using the page's seventh - // available color from its color scheme. - DARK7, - // A recolor effect that darkens the image using the page's eighth available - // color from its color scheme. - DARK8, - // A recolor effect that darkens the image using the page's ninth available - // color from its color scheme. - DARK9, - // A recolor effect that darkens the image using the page's tenth available - // color from its color scheme. - DARK10, - // A recolor effect that recolors the image to grayscale. - GRAYSCALE, - // A recolor effect that recolors the image to negative grayscale. - NEGATIVE, - // A recolor effect that recolors the image using the sepia color. - SEPIA, - // Custom recolor effect. Refer to `recolor_stops` for the concrete - // gradient. - CUSTOM, - } - - // A recolor effect applied on an image. - export interface Recolor { - // The recolor effect is represented by a gradient, which is a list of color - // stops. - // - // The colors in the gradient will replace the corresponding colors at - // the same position in the color palette and apply to the image. This - // property is read-only. - recolor_stops: ColorStop[], - // The name of the recolor effect. - // - // The name is determined from the `recolor_stops` by matching the gradient - // against the colors in the page's current color scheme. This property is - // read-only. - name: RecolorName, - } - - //// FILE: requests.proto //// - - //// FILE: slides.proto //// - // GetPage, CreatePresentation, BatchUpdatePresentation, GetPageThumbnail are not used. - // TODO export top level methods - - //// FILE: text.proto //// - // A TextElement describes the content of a range of indices in the text content - // of a Shape or TableCell. - interface TextElement { - // The zero-based start index of this text element, in Unicode code units. - start_index: number - // The zero-based end index of this text element, exclusive, in Unicode code - // units. - end_index: number - // The kind of text that this element represents. - kind: { - // A marker representing the beginning of a new paragraph. - // - // The `start_index` and `end_index` of this TextElement represent the - // range of the paragraph. Other TextElements with an index range contained - // inside this paragraph's range are considered to be part of this - // paragraph. The range of indices of two separate paragraphs will never - // overlap. - paragraph_marker: ParagraphMarker - // A TextElement representing a run of text where all of the characters - // in the run have the same TextStyle. - // - // The `start_index` and `end_index` of TextRuns will always be fully - // contained in the index range of a single `paragraph_marker` TextElement. - // In other words, a TextRun will never span multiple paragraphs. - text_run: TextRun - // A TextElement representing a spot in the text that is dynamically - // replaced with content that can change over time. - auto_text: AutoText - } - } - - // A TextElement kind that represents the beginning of a new paragraph. - interface ParagraphMarker { - // The paragraph's style - style: ParagraphStyle - // The bullet for this paragraph. If not present, the paragraph does not - // belong to a list. - bullet: Bullet - } - - // A List describes the look and feel of bullets belonging to paragraphs - // associated with a list. A paragraph that is part of a list has an implicit - // reference to that list's ID. - interface List { - // The ID of the list. - list_id: string - // A map of nesting levels to the properties of bullets at the associated - // level. A list has at most nine levels of nesting, so the possible values - // for the keys of this map are 0 through 8, inclusive. - nesting_level: Map - } - - // Describes the bullet of a paragraph. - interface Bullet { - // The ID of the list this paragraph belongs to. - list_id: string - // The nesting level of this paragraph in the list. - nesting_level: number - // The rendered bullet glyph for this paragraph. - glyph: string - // The paragraph specific text style applied to this bullet. - bullet_style: TextStyle - } - - // Contains properties describing the look and feel of a list bullet at a given - // level of nesting. - interface NestingLevel { - // The style of a bullet at this level of nesting. - bullet_style: TextStyle - } - - // A TextElement kind that represents a run of text that all has the same - // styling. - interface TextRun { - // The text of this run. - content: string - // The styling applied to this run. - style: TextStyle - } - - // The types of auto text - enum AutoTextType { - // An unspecified autotext type. - TYPE_UNSPECIFIED, - // Type for autotext that represents the current slide number. - SLIDE_NUMBER - } - - // A TextElement kind that represents auto text. - interface AutoText { - // The type of this auto text. - type: AutoTextType - // The rendered content of this auto text, if available. - content: string, - // The styling applied to this auto text. - style: TextStyle - } - - // The types of text alignment for a paragraph. - enum ParagraphStyleAlignment { - // The paragraph alignment is inherited from the parent. - ALIGNMENT_UNSPECIFIED, - // The paragraph is aligned to the start of the line. Left-aligned for - // LTR text, right-aligned otherwise. - START, - // The paragraph is centered. - CENTER, - // The paragraph is aligned to the end of the line. Right-aligned for - // LTR text, left-aligned otherwise. - END, - // The paragraph is justified. - JUSTIFIED, - } - - // The directions text can flow in. - enum ParagraphStyleTextDirection { - // The text direction is inherited from the parent. - TEXT_DIRECTION_UNSPECIFIED, - // The text goes from left to right. - LEFT_TO_RIGHT, - // The text goes from right to left. - RIGHT_TO_LEFT, - } - - // The different modes for paragraph spacing. - enum ParagraphStyleSpacingMode { - // The spacing mode is inherited from the parent. - SPACING_MODE_UNSPECIFIED, - // Paragraph spacing is always rendered. - NEVER_COLLAPSE, - // Paragraph spacing is skipped between list elements. - COLLAPSE_LISTS, - } - - // Styles that apply to a whole paragraph. - // - // If this text is contained in a shape with a parent placeholder, then these - // paragraph styles may be inherited from the parent. Which paragraph styles - // are inherited depend on the nesting level of lists: - // - // * A paragraph not in a list will inherit its paragraph style from the - // paragraph at the 0 nesting level of the list inside the parent placeholder. - // * A paragraph in a list will inherit its paragraph style from the paragraph - // at its corresponding nesting level of the list inside the parent - // placeholder. - // - // Inherited paragraph styles are represented as unset fields in this message. - interface ParagraphStyle { - // The amount of space between lines, as a percentage of normal, where normal - // is represented as 100.0. If unset, the value is inherited from the parent. - line_spacing: number, - - // The text alignment for this paragraph. - alignment: ParagraphStyleAlignment - - // The amount indentation for the paragraph on the side that corresponds to - // the start of the text, based on the current text direction. If unset, the - // value is inherited from the parent. - indent_start: Dimension, - - // The amount indentation for the paragraph on the side that corresponds to - // the end of the text, based on the current text direction. If unset, the - // value is inherited from the parent. - indent_end: Dimension, - - // The amount of extra space above the paragraph. If unset, the value is - // inherited from the parent. - space_above: Dimension, - - // The amount of extra space below the paragraph. If unset, the value is - // inherited from the parent. - space_below: Dimension, - - // The amount of indentation for the start of the first line of the paragraph. - // If unset, the value is inherited from the parent. - indent_first_line: Dimension, - - // The text direction of this paragraph. If unset, the value defaults to - // LEFT_TO_RIGHT] since text direction is not inherited. - direction: ParagraphStyleTextDirection - - // The spacing mode for the paragraph. - spacing_mode: ParagraphStyleSpacingMode - } - - // The ways in which text can be vertically offset from its normal position. - enum TextStyleBaselineOffset { - // The text's baseline offset is inherited from the parent. - BASELINE_OFFSET_UNSPECIFIED, - // The text is not vertically offset. - NONE, - // The text is vertically offset upwards (superscript). - SUPERSCRIPT, - // The text is vertically offset downwards (subscript). - SUBSCRIPT, - } - - // Represents a font family and weight used to style a TextRun. - interface TextStyleWeightedFontFamily { - // The font family of the text. - // - // The font family can be any font from the Font menu in Slides or from - // [Google Fonts](https://fonts.google.com/). If the font name is - // unrecognized, the text is rendered in `Arial`. - font_family: string - - // The rendered weight of the text. This field can have any value that is a - // multiple of `100` between `100` and `900`, inclusive. This range - // corresponds to the numerical values described in the CSS 2.1 - // Specification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness), - // with non-numerical values disallowed. Weights greater than or equal to - // `700` are considered bold, and weights less than `700`are not bold. The - // default value is `400` ("normal"). - weight: number - } - - // Represents the styling that can be applied to a TextRun. - // - // If this text is contained in a shape with a parent placeholder, then these text styles may be - // inherited from the parent. Which text styles are inherited depend on the - // nesting level of lists: - // - // * A text run in a paragraph that is not in a list will inherit its text style - // from the the newline character in the paragraph at the 0 nesting level of - // the list inside the parent placeholder. - // * A text run in a paragraph that is in a list will inherit its text style - // from the newline character in the paragraph at its corresponding nesting - // level of the list inside the parent placeholder. - // - // Inherited text styles are represented as unset fields in this message. If - // text is contained in a shape without a parent placeholder, unsetting these - // fields will revert the style to a value matching the defaults in the Slides - // editor. - interface TextStyle { - // The background color of the text. If set, the color is either opaque or - // transparent, depending on if the `opaque_color` field in it is set. - background_color: OptionalColor, - - // The color of the text itself. If set, the color is either opaque or - // transparent, depending on if the `opaque_color` field in it is set. - foreground_color: OptionalColor, - - // Whether or not the text is rendered as bold. - bold: boolean, - - // Whether or not the text is italicized. - italic: boolean, - - // The font family of the text. - // - // The font family can be any font from the Font menu in Slides or from - // [Google Fonts] (https://fonts.google.com/). If the font name is - // unrecognized, the text is rendered in `Arial`. - // - // Some fonts can affect the weight of the text. If an update request - // specifies values for both `font_family` and `bold`, the explicitly-set - // `bold` value is used. - font_family: string, - - // The size of the text's font. When read, the `font_size` will specified in - // points. - font_size: Dimension - - // The hyperlink destination of the text. If unset, there is no link. Links - // are not inherited from parent text. - // - // Changing the link in an update request causes some other changes to the - // text style of the range: - // - // * When setting a link, the text foreground color will be set to - // ThemeColorType.HYPERLINK and the text will - // be underlined. If these fields are modified in the same - // request, those values will be used instead of the link defaults. - // * Setting a link on a text range that overlaps with an existing link will - // also update the existing link to point to the new URL. - // * Links are not settable on newline characters. As a result, setting a link - // on a text range that crosses a paragraph boundary, such as `"ABC\n123"`, - // will separate the newline character(s) into their own text runs. The - // link will be applied separately to the runs before and after the newline. - // * Removing a link will update the text style of the range to match the - // style of the preceding text (or the default text styles if the preceding - // text is another link) unless different styles are being set in the same - // request. - link: Link - - // The text's vertical offset from its normal position. - // - // Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically - // rendered in a smaller font size, computed based on the `font_size` field. - // The `font_size` itself is not affected by changes in this field. - baseline_offset: TextStyleBaselineOffset - - // Whether or not the text is in small capital letters. - small_caps: boolean, - - // Whether or not the text is struck through. - strikethrough: boolean, - - // Whether or not the text is underlined. - underline: boolean, - - // The font family and rendered weight of the text. - // - // This field is an extension of `font_family` meant to support explicit font - // weights without breaking backwards compatibility. As such, when reading the - // style of a range of text, the value of `weighted_font_family#font_family` - // will always be equal to that of `font_family`. However, when writing, if - // both fields are included in the field mask (either explicitly or through - // the wildcard `"*"`), their values are reconciled as follows: - // - // * If `font_family` is set and `weighted_font_family` is not, the value of - // `font_family` is applied with weight `400` ("normal"). - // * If both fields are set, the value of `font_family` must match that of - // `weighted_font_family#font_family`. If so, the font family and weight of - // `weighted_font_family` is applied. Otherwise, a 400 bad request error is - // returned. - // * If `weighted_font_family` is set and `font_family` is not, the font - // family and weight of `weighted_font_family` is applied. - // * If neither field is set, the font family and weight of the text inherit - // from the parent. Note that these properties cannot inherit separately - // from each other. - // - // If an update request specifies values for both `weighted_font_family` and - // `bold`, the `weighted_font_family` is applied first, then `bold`. - // - // If `weighted_font_family#weight` is not set, it defaults to `400`. - // - // If `weighted_font_family` is set, then `weighted_font_family#font_family` - // must also be set with a non-empty value. Otherwise, a 400 bad request error - // is returned. - weighted_font_family: TextStyleWeightedFontFamily - } - - // The kinds of relative links. - enum RelativeSlideLinkLink { - // An unspecified relative slide link. - RELATIVE_SLIDE_LINK_UNSPECIFIED, - // A link to the next slide. - NEXT_SLIDE, - // A link to the previous slide. - PREVIOUS_SLIDE, - // A link to the first slide in the presentation. - FIRST_SLIDE, - // A link to the last slide in the presentation. - LAST_SLIDE, - } - - // The kinds of links. - interface LinkKind { - // If set, indicates this is a link to the external web page at this URL. - url: string - // If set, indicates this is a link to a slide in this presentation, - // addressed by its position. - relative_link: RelativeSlideLinkLink - // If set, indicates this is a link to the specific page in this - // presentation with this ID. A page with this ID may not exist. - page_object_id: string - // If set, indicates this is a link to the slide at this zero-based index - // in the presentation. There may not be a slide at this index. - slide_index: number - } - - // A hypertext link. - interface Link { - // The kinds of links. - kind: LinkKind - } - - //// FILE: transform.proto //// - interface AffineTransform { - // The X coordinate scaling element. - scale_x: number - - // The Y coordinate scaling element. - scale_y: number - - // The X coordinate shearing element. - shear_x: number - - // The Y coordinate shearing element. - shear_y: number - - // The X coordinate translation element. - translate_x: number - - // The Y coordinate translation element. - translate_y: number - - // The units for translate elements. - unit: Unit - } - } -} diff --git a/types/google-apps-script/apis/slides_v1.d.ts b/types/google-apps-script/apis/slides_v1.d.ts new file mode 100644 index 0000000000..dfe7e5321d --- /dev/null +++ b/types/google-apps-script/apis/slides_v1.d.ts @@ -0,0 +1,1008 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Slides { + namespace Collection { + namespace Presentations { + export interface PagesCollection { + // Gets the latest version of the specified page in the presentation. + get(presentationId: string, pageObjectId: string): Slides.Schema.Page; + // Generates a thumbnail of the latest version of the specified page in the + // presentation and returns a URL to the thumbnail image. + // This request counts as an [expensive read request](/slides/limits) for + // quota purposes. + getThumbnail(presentationId: string, pageObjectId: string): Slides.Schema.Thumbnail; + // Generates a thumbnail of the latest version of the specified page in the + // presentation and returns a URL to the thumbnail image. + // This request counts as an [expensive read request](/slides/limits) for + // quota purposes. + getThumbnail(presentationId: string, pageObjectId: string, optionalArgs: object): Slides.Schema.Thumbnail; + } + } + export interface PresentationsCollection { + Pages?: Slides.Collection.Presentations.PagesCollection; + // Applies one or more updates to the presentation. + // Each request is validated before + // being applied. If any request is not valid, then the entire request will + // fail and nothing will be applied. + // Some requests have replies to + // give you some information about how they are applied. Other requests do + // not need to return information; these each return an empty reply. + // The order of replies matches that of the requests. + // For example, suppose you call batchUpdate with four updates, and only the + // third one returns information. The response would have two empty replies: + // the reply to the third request, and another empty reply, in that order. + // Because other users may be editing the presentation, the presentation + // might not exactly reflect your changes: your changes may + // be altered with respect to collaborator changes. If there are no + // collaborators, the presentation should reflect your changes. In any case, + // the updates in your request are guaranteed to be applied together + // atomically. + batchUpdate(resource: Schema.BatchUpdatePresentationRequest, presentationId: string): Slides.Schema.BatchUpdatePresentationResponse; + // Creates a blank presentation using the title given in the request. If a + // `presentationId` is provided, it is used as the ID of the new presentation. + // Otherwise, a new ID is generated. Other fields in the request, including + // any provided content, are ignored. + // Returns the created presentation. + create(resource: Schema.Presentation): Slides.Schema.Presentation; + // Gets the latest version of the specified presentation. + get(presentationId: string): Slides.Schema.Presentation; + } + } + namespace Schema { + export interface AffineTransform { + scaleX?: Number; + scaleY?: Number; + shearX?: Number; + shearY?: Number; + translateX?: Number; + translateY?: Number; + unit?: string; + } + export interface AutoText { + content?: string; + style?: Slides.Schema.TextStyle; + type?: string; + } + export interface BatchUpdatePresentationRequest { + requests?: Slides.Schema.Request[]; + writeControl?: Slides.Schema.WriteControl; + } + export interface BatchUpdatePresentationResponse { + presentationId?: string; + replies?: Slides.Schema.Response[]; + writeControl?: Slides.Schema.WriteControl; + } + export interface Bullet { + bulletStyle?: Slides.Schema.TextStyle; + glyph?: string; + listId?: string; + nestingLevel?: number; + } + export interface ColorScheme { + colors?: Slides.Schema.ThemeColorPair[]; + } + export interface ColorStop { + alpha?: Number; + color?: Slides.Schema.OpaqueColor; + position?: Number; + } + export interface CreateImageRequest { + elementProperties?: Slides.Schema.PageElementProperties; + objectId?: string; + url?: string; + } + export interface CreateImageResponse { + objectId?: string; + } + export interface CreateLineRequest { + category?: string; + elementProperties?: Slides.Schema.PageElementProperties; + lineCategory?: string; + objectId?: string; + } + export interface CreateLineResponse { + objectId?: string; + } + export interface CreateParagraphBulletsRequest { + bulletPreset?: string; + cellLocation?: Slides.Schema.TableCellLocation; + objectId?: string; + textRange?: Slides.Schema.Range; + } + export interface CreateShapeRequest { + elementProperties?: Slides.Schema.PageElementProperties; + objectId?: string; + shapeType?: string; + } + export interface CreateShapeResponse { + objectId?: string; + } + export interface CreateSheetsChartRequest { + chartId?: number; + elementProperties?: Slides.Schema.PageElementProperties; + linkingMode?: string; + objectId?: string; + spreadsheetId?: string; + } + export interface CreateSheetsChartResponse { + objectId?: string; + } + export interface CreateSlideRequest { + insertionIndex?: number; + objectId?: string; + placeholderIdMappings?: Slides.Schema.LayoutPlaceholderIdMapping[]; + slideLayoutReference?: Slides.Schema.LayoutReference; + } + export interface CreateSlideResponse { + objectId?: string; + } + export interface CreateTableRequest { + columns?: number; + elementProperties?: Slides.Schema.PageElementProperties; + objectId?: string; + rows?: number; + } + export interface CreateTableResponse { + objectId?: string; + } + export interface CreateVideoRequest { + elementProperties?: Slides.Schema.PageElementProperties; + id?: string; + objectId?: string; + source?: string; + } + export interface CreateVideoResponse { + objectId?: string; + } + export interface CropProperties { + angle?: Number; + bottomOffset?: Number; + leftOffset?: Number; + rightOffset?: Number; + topOffset?: Number; + } + export interface DeleteObjectRequest { + objectId?: string; + } + export interface DeleteParagraphBulletsRequest { + cellLocation?: Slides.Schema.TableCellLocation; + objectId?: string; + textRange?: Slides.Schema.Range; + } + export interface DeleteTableColumnRequest { + cellLocation?: Slides.Schema.TableCellLocation; + tableObjectId?: string; + } + export interface DeleteTableRowRequest { + cellLocation?: Slides.Schema.TableCellLocation; + tableObjectId?: string; + } + export interface DeleteTextRequest { + cellLocation?: Slides.Schema.TableCellLocation; + objectId?: string; + textRange?: Slides.Schema.Range; + } + export interface Dimension { + magnitude?: Number; + unit?: string; + } + export interface DuplicateObjectRequest { + objectId?: string; + objectIds?: object; + } + export interface DuplicateObjectResponse { + objectId?: string; + } + export interface Group { + children?: Slides.Schema.PageElement[]; + } + export interface GroupObjectsRequest { + childrenObjectIds?: string[]; + groupObjectId?: string; + } + export interface GroupObjectsResponse { + objectId?: string; + } + export interface Image { + contentUrl?: string; + imageProperties?: Slides.Schema.ImageProperties; + sourceUrl?: string; + } + export interface ImageProperties { + brightness?: Number; + contrast?: Number; + cropProperties?: Slides.Schema.CropProperties; + link?: Slides.Schema.Link; + outline?: Slides.Schema.Outline; + recolor?: Slides.Schema.Recolor; + shadow?: Slides.Schema.Shadow; + transparency?: Number; + } + export interface InsertTableColumnsRequest { + cellLocation?: Slides.Schema.TableCellLocation; + insertRight?: boolean; + number?: number; + tableObjectId?: string; + } + export interface InsertTableRowsRequest { + cellLocation?: Slides.Schema.TableCellLocation; + insertBelow?: boolean; + number?: number; + tableObjectId?: string; + } + export interface InsertTextRequest { + cellLocation?: Slides.Schema.TableCellLocation; + insertionIndex?: number; + objectId?: string; + text?: string; + } + export interface LayoutPlaceholderIdMapping { + layoutPlaceholder?: Slides.Schema.Placeholder; + layoutPlaceholderObjectId?: string; + objectId?: string; + } + export interface LayoutProperties { + displayName?: string; + masterObjectId?: string; + name?: string; + } + export interface LayoutReference { + layoutId?: string; + predefinedLayout?: string; + } + export interface Line { + lineCategory?: string; + lineProperties?: Slides.Schema.LineProperties; + lineType?: string; + } + export interface LineConnection { + connectedObjectId?: string; + connectionSiteIndex?: number; + } + export interface LineFill { + solidFill?: Slides.Schema.SolidFill; + } + export interface LineProperties { + dashStyle?: string; + endArrow?: string; + endConnection?: Slides.Schema.LineConnection; + lineFill?: Slides.Schema.LineFill; + link?: Slides.Schema.Link; + startArrow?: string; + startConnection?: Slides.Schema.LineConnection; + weight?: Slides.Schema.Dimension; + } + export interface Link { + pageObjectId?: string; + relativeLink?: string; + slideIndex?: number; + url?: string; + } + export interface List { + listId?: string; + nestingLevel?: object; + } + export interface MasterProperties { + displayName?: string; + } + export interface MergeTableCellsRequest { + objectId?: string; + tableRange?: Slides.Schema.TableRange; + } + export interface NestingLevel { + bulletStyle?: Slides.Schema.TextStyle; + } + export interface NotesProperties { + speakerNotesObjectId?: string; + } + export interface OpaqueColor { + rgbColor?: Slides.Schema.RgbColor; + themeColor?: string; + } + export interface OptionalColor { + opaqueColor?: Slides.Schema.OpaqueColor; + } + export interface Outline { + dashStyle?: string; + outlineFill?: Slides.Schema.OutlineFill; + propertyState?: string; + weight?: Slides.Schema.Dimension; + } + export interface OutlineFill { + solidFill?: Slides.Schema.SolidFill; + } + export interface Page { + layoutProperties?: Slides.Schema.LayoutProperties; + masterProperties?: Slides.Schema.MasterProperties; + notesProperties?: Slides.Schema.NotesProperties; + objectId?: string; + pageElements?: Slides.Schema.PageElement[]; + pageProperties?: Slides.Schema.PageProperties; + pageType?: string; + revisionId?: string; + slideProperties?: Slides.Schema.SlideProperties; + } + export interface PageBackgroundFill { + propertyState?: string; + solidFill?: Slides.Schema.SolidFill; + stretchedPictureFill?: Slides.Schema.StretchedPictureFill; + } + export interface PageElement { + description?: string; + elementGroup?: Slides.Schema.Group; + image?: Slides.Schema.Image; + line?: Slides.Schema.Line; + objectId?: string; + shape?: Slides.Schema.Shape; + sheetsChart?: Slides.Schema.SheetsChart; + size?: Slides.Schema.Size; + table?: Slides.Schema.Table; + title?: string; + transform?: Slides.Schema.AffineTransform; + video?: Slides.Schema.Video; + wordArt?: Slides.Schema.WordArt; + } + export interface PageElementProperties { + pageObjectId?: string; + size?: Slides.Schema.Size; + transform?: Slides.Schema.AffineTransform; + } + export interface PageProperties { + colorScheme?: Slides.Schema.ColorScheme; + pageBackgroundFill?: Slides.Schema.PageBackgroundFill; + } + export interface ParagraphMarker { + bullet?: Slides.Schema.Bullet; + style?: Slides.Schema.ParagraphStyle; + } + export interface ParagraphStyle { + alignment?: string; + direction?: string; + indentEnd?: Slides.Schema.Dimension; + indentFirstLine?: Slides.Schema.Dimension; + indentStart?: Slides.Schema.Dimension; + lineSpacing?: Number; + spaceAbove?: Slides.Schema.Dimension; + spaceBelow?: Slides.Schema.Dimension; + spacingMode?: string; + } + export interface Placeholder { + index?: number; + parentObjectId?: string; + type?: string; + } + export interface Presentation { + layouts?: Slides.Schema.Page[]; + locale?: string; + masters?: Slides.Schema.Page[]; + notesMaster?: Slides.Schema.Page; + pageSize?: Slides.Schema.Size; + presentationId?: string; + revisionId?: string; + slides?: Slides.Schema.Page[]; + title?: string; + } + export interface Range { + endIndex?: number; + startIndex?: number; + type?: string; + } + export interface Recolor { + name?: string; + recolorStops?: Slides.Schema.ColorStop[]; + } + export interface RefreshSheetsChartRequest { + objectId?: string; + } + export interface ReplaceAllShapesWithImageRequest { + containsText?: Slides.Schema.SubstringMatchCriteria; + imageReplaceMethod?: string; + imageUrl?: string; + pageObjectIds?: string[]; + replaceMethod?: string; + } + export interface ReplaceAllShapesWithImageResponse { + occurrencesChanged?: number; + } + export interface ReplaceAllShapesWithSheetsChartRequest { + chartId?: number; + containsText?: Slides.Schema.SubstringMatchCriteria; + linkingMode?: string; + pageObjectIds?: string[]; + spreadsheetId?: string; + } + export interface ReplaceAllShapesWithSheetsChartResponse { + occurrencesChanged?: number; + } + export interface ReplaceAllTextRequest { + containsText?: Slides.Schema.SubstringMatchCriteria; + pageObjectIds?: string[]; + replaceText?: string; + } + export interface ReplaceAllTextResponse { + occurrencesChanged?: number; + } + export interface ReplaceImageRequest { + imageObjectId?: string; + imageReplaceMethod?: string; + url?: string; + } + export interface Request { + createImage?: Slides.Schema.CreateImageRequest; + createLine?: Slides.Schema.CreateLineRequest; + createParagraphBullets?: Slides.Schema.CreateParagraphBulletsRequest; + createShape?: Slides.Schema.CreateShapeRequest; + createSheetsChart?: Slides.Schema.CreateSheetsChartRequest; + createSlide?: Slides.Schema.CreateSlideRequest; + createTable?: Slides.Schema.CreateTableRequest; + createVideo?: Slides.Schema.CreateVideoRequest; + deleteObject?: Slides.Schema.DeleteObjectRequest; + deleteParagraphBullets?: Slides.Schema.DeleteParagraphBulletsRequest; + deleteTableColumn?: Slides.Schema.DeleteTableColumnRequest; + deleteTableRow?: Slides.Schema.DeleteTableRowRequest; + deleteText?: Slides.Schema.DeleteTextRequest; + duplicateObject?: Slides.Schema.DuplicateObjectRequest; + groupObjects?: Slides.Schema.GroupObjectsRequest; + insertTableColumns?: Slides.Schema.InsertTableColumnsRequest; + insertTableRows?: Slides.Schema.InsertTableRowsRequest; + insertText?: Slides.Schema.InsertTextRequest; + mergeTableCells?: Slides.Schema.MergeTableCellsRequest; + refreshSheetsChart?: Slides.Schema.RefreshSheetsChartRequest; + replaceAllShapesWithImage?: Slides.Schema.ReplaceAllShapesWithImageRequest; + replaceAllShapesWithSheetsChart?: Slides.Schema.ReplaceAllShapesWithSheetsChartRequest; + replaceAllText?: Slides.Schema.ReplaceAllTextRequest; + replaceImage?: Slides.Schema.ReplaceImageRequest; + rerouteLine?: Slides.Schema.RerouteLineRequest; + ungroupObjects?: Slides.Schema.UngroupObjectsRequest; + unmergeTableCells?: Slides.Schema.UnmergeTableCellsRequest; + updateImageProperties?: Slides.Schema.UpdateImagePropertiesRequest; + updateLineCategory?: Slides.Schema.UpdateLineCategoryRequest; + updateLineProperties?: Slides.Schema.UpdateLinePropertiesRequest; + updatePageElementAltText?: Slides.Schema.UpdatePageElementAltTextRequest; + updatePageElementTransform?: Slides.Schema.UpdatePageElementTransformRequest; + updatePageElementsZOrder?: Slides.Schema.UpdatePageElementsZOrderRequest; + updatePageProperties?: Slides.Schema.UpdatePagePropertiesRequest; + updateParagraphStyle?: Slides.Schema.UpdateParagraphStyleRequest; + updateShapeProperties?: Slides.Schema.UpdateShapePropertiesRequest; + updateSlidesPosition?: Slides.Schema.UpdateSlidesPositionRequest; + updateTableBorderProperties?: Slides.Schema.UpdateTableBorderPropertiesRequest; + updateTableCellProperties?: Slides.Schema.UpdateTableCellPropertiesRequest; + updateTableColumnProperties?: Slides.Schema.UpdateTableColumnPropertiesRequest; + updateTableRowProperties?: Slides.Schema.UpdateTableRowPropertiesRequest; + updateTextStyle?: Slides.Schema.UpdateTextStyleRequest; + updateVideoProperties?: Slides.Schema.UpdateVideoPropertiesRequest; + } + export interface RerouteLineRequest { + objectId?: string; + } + export interface Response { + createImage?: Slides.Schema.CreateImageResponse; + createLine?: Slides.Schema.CreateLineResponse; + createShape?: Slides.Schema.CreateShapeResponse; + createSheetsChart?: Slides.Schema.CreateSheetsChartResponse; + createSlide?: Slides.Schema.CreateSlideResponse; + createTable?: Slides.Schema.CreateTableResponse; + createVideo?: Slides.Schema.CreateVideoResponse; + duplicateObject?: Slides.Schema.DuplicateObjectResponse; + groupObjects?: Slides.Schema.GroupObjectsResponse; + replaceAllShapesWithImage?: Slides.Schema.ReplaceAllShapesWithImageResponse; + replaceAllShapesWithSheetsChart?: Slides.Schema.ReplaceAllShapesWithSheetsChartResponse; + replaceAllText?: Slides.Schema.ReplaceAllTextResponse; + } + export interface RgbColor { + blue?: Number; + green?: Number; + red?: Number; + } + export interface Shadow { + alignment?: string; + alpha?: Number; + blurRadius?: Slides.Schema.Dimension; + color?: Slides.Schema.OpaqueColor; + propertyState?: string; + rotateWithShape?: boolean; + transform?: Slides.Schema.AffineTransform; + type?: string; + } + export interface Shape { + placeholder?: Slides.Schema.Placeholder; + shapeProperties?: Slides.Schema.ShapeProperties; + shapeType?: string; + text?: Slides.Schema.TextContent; + } + export interface ShapeBackgroundFill { + propertyState?: string; + solidFill?: Slides.Schema.SolidFill; + } + export interface ShapeProperties { + contentAlignment?: string; + link?: Slides.Schema.Link; + outline?: Slides.Schema.Outline; + shadow?: Slides.Schema.Shadow; + shapeBackgroundFill?: Slides.Schema.ShapeBackgroundFill; + } + export interface SheetsChart { + chartId?: number; + contentUrl?: string; + sheetsChartProperties?: Slides.Schema.SheetsChartProperties; + spreadsheetId?: string; + } + export interface SheetsChartProperties { + chartImageProperties?: Slides.Schema.ImageProperties; + } + export interface Size { + height?: Slides.Schema.Dimension; + width?: Slides.Schema.Dimension; + } + export interface SlideProperties { + layoutObjectId?: string; + masterObjectId?: string; + notesPage?: Slides.Schema.Page; + } + export interface SolidFill { + alpha?: Number; + color?: Slides.Schema.OpaqueColor; + } + export interface StretchedPictureFill { + contentUrl?: string; + size?: Slides.Schema.Size; + } + export interface SubstringMatchCriteria { + matchCase?: boolean; + text?: string; + } + export interface Table { + columns?: number; + horizontalBorderRows?: Slides.Schema.TableBorderRow[]; + rows?: number; + tableColumns?: Slides.Schema.TableColumnProperties[]; + tableRows?: Slides.Schema.TableRow[]; + verticalBorderRows?: Slides.Schema.TableBorderRow[]; + } + export interface TableBorderCell { + location?: Slides.Schema.TableCellLocation; + tableBorderProperties?: Slides.Schema.TableBorderProperties; + } + export interface TableBorderFill { + solidFill?: Slides.Schema.SolidFill; + } + export interface TableBorderProperties { + dashStyle?: string; + tableBorderFill?: Slides.Schema.TableBorderFill; + weight?: Slides.Schema.Dimension; + } + export interface TableBorderRow { + tableBorderCells?: Slides.Schema.TableBorderCell[]; + } + export interface TableCell { + columnSpan?: number; + location?: Slides.Schema.TableCellLocation; + rowSpan?: number; + tableCellProperties?: Slides.Schema.TableCellProperties; + text?: Slides.Schema.TextContent; + } + export interface TableCellBackgroundFill { + propertyState?: string; + solidFill?: Slides.Schema.SolidFill; + } + export interface TableCellLocation { + columnIndex?: number; + rowIndex?: number; + } + export interface TableCellProperties { + contentAlignment?: string; + tableCellBackgroundFill?: Slides.Schema.TableCellBackgroundFill; + } + export interface TableColumnProperties { + columnWidth?: Slides.Schema.Dimension; + } + export interface TableRange { + columnSpan?: number; + location?: Slides.Schema.TableCellLocation; + rowSpan?: number; + } + export interface TableRow { + rowHeight?: Slides.Schema.Dimension; + tableCells?: Slides.Schema.TableCell[]; + tableRowProperties?: Slides.Schema.TableRowProperties; + } + export interface TableRowProperties { + minRowHeight?: Slides.Schema.Dimension; + } + export interface TextContent { + lists?: object; + textElements?: Slides.Schema.TextElement[]; + } + export interface TextElement { + autoText?: Slides.Schema.AutoText; + endIndex?: number; + paragraphMarker?: Slides.Schema.ParagraphMarker; + startIndex?: number; + textRun?: Slides.Schema.TextRun; + } + export interface TextRun { + content?: string; + style?: Slides.Schema.TextStyle; + } + export interface TextStyle { + backgroundColor?: Slides.Schema.OptionalColor; + baselineOffset?: string; + bold?: boolean; + fontFamily?: string; + fontSize?: Slides.Schema.Dimension; + foregroundColor?: Slides.Schema.OptionalColor; + italic?: boolean; + link?: Slides.Schema.Link; + smallCaps?: boolean; + strikethrough?: boolean; + underline?: boolean; + weightedFontFamily?: Slides.Schema.WeightedFontFamily; + } + export interface ThemeColorPair { + color?: Slides.Schema.RgbColor; + type?: string; + } + export interface Thumbnail { + contentUrl?: string; + height?: number; + width?: number; + } + export interface UngroupObjectsRequest { + objectIds?: string[]; + } + export interface UnmergeTableCellsRequest { + objectId?: string; + tableRange?: Slides.Schema.TableRange; + } + export interface UpdateImagePropertiesRequest { + fields?: string; + imageProperties?: Slides.Schema.ImageProperties; + objectId?: string; + } + export interface UpdateLineCategoryRequest { + lineCategory?: string; + objectId?: string; + } + export interface UpdateLinePropertiesRequest { + fields?: string; + lineProperties?: Slides.Schema.LineProperties; + objectId?: string; + } + export interface UpdatePageElementAltTextRequest { + description?: string; + objectId?: string; + title?: string; + } + export interface UpdatePageElementTransformRequest { + applyMode?: string; + objectId?: string; + transform?: Slides.Schema.AffineTransform; + } + export interface UpdatePageElementsZOrderRequest { + operation?: string; + pageElementObjectIds?: string[]; + } + export interface UpdatePagePropertiesRequest { + fields?: string; + objectId?: string; + pageProperties?: Slides.Schema.PageProperties; + } + export interface UpdateParagraphStyleRequest { + cellLocation?: Slides.Schema.TableCellLocation; + fields?: string; + objectId?: string; + style?: Slides.Schema.ParagraphStyle; + textRange?: Slides.Schema.Range; + } + export interface UpdateShapePropertiesRequest { + fields?: string; + objectId?: string; + shapeProperties?: Slides.Schema.ShapeProperties; + } + export interface UpdateSlidesPositionRequest { + insertionIndex?: number; + slideObjectIds?: string[]; + } + export interface UpdateTableBorderPropertiesRequest { + borderPosition?: string; + fields?: string; + objectId?: string; + tableBorderProperties?: Slides.Schema.TableBorderProperties; + tableRange?: Slides.Schema.TableRange; + } + export interface UpdateTableCellPropertiesRequest { + fields?: string; + objectId?: string; + tableCellProperties?: Slides.Schema.TableCellProperties; + tableRange?: Slides.Schema.TableRange; + } + export interface UpdateTableColumnPropertiesRequest { + columnIndices?: number[]; + fields?: string; + objectId?: string; + tableColumnProperties?: Slides.Schema.TableColumnProperties; + } + export interface UpdateTableRowPropertiesRequest { + fields?: string; + objectId?: string; + rowIndices?: number[]; + tableRowProperties?: Slides.Schema.TableRowProperties; + } + export interface UpdateTextStyleRequest { + cellLocation?: Slides.Schema.TableCellLocation; + fields?: string; + objectId?: string; + style?: Slides.Schema.TextStyle; + textRange?: Slides.Schema.Range; + } + export interface UpdateVideoPropertiesRequest { + fields?: string; + objectId?: string; + videoProperties?: Slides.Schema.VideoProperties; + } + export interface Video { + id?: string; + source?: string; + url?: string; + videoProperties?: Slides.Schema.VideoProperties; + } + export interface VideoProperties { + autoPlay?: boolean; + end?: number; + mute?: boolean; + outline?: Slides.Schema.Outline; + start?: number; + } + export interface WeightedFontFamily { + fontFamily?: string; + weight?: number; + } + export interface WordArt { + renderedText?: string; + } + export interface WriteControl { + requiredRevisionId?: string; + } + } + } + export interface Slides { + Presentations?: Slides.Collection.PresentationsCollection; + // Create a new instance of AffineTransform + newAffineTransform(): Slides.Schema.AffineTransform; + // Create a new instance of AutoText + newAutoText(): Slides.Schema.AutoText; + // Create a new instance of BatchUpdatePresentationRequest + newBatchUpdatePresentationRequest(): Slides.Schema.BatchUpdatePresentationRequest; + // Create a new instance of Bullet + newBullet(): Slides.Schema.Bullet; + // Create a new instance of ColorScheme + newColorScheme(): Slides.Schema.ColorScheme; + // Create a new instance of ColorStop + newColorStop(): Slides.Schema.ColorStop; + // Create a new instance of CreateImageRequest + newCreateImageRequest(): Slides.Schema.CreateImageRequest; + // Create a new instance of CreateLineRequest + newCreateLineRequest(): Slides.Schema.CreateLineRequest; + // Create a new instance of CreateParagraphBulletsRequest + newCreateParagraphBulletsRequest(): Slides.Schema.CreateParagraphBulletsRequest; + // Create a new instance of CreateShapeRequest + newCreateShapeRequest(): Slides.Schema.CreateShapeRequest; + // Create a new instance of CreateSheetsChartRequest + newCreateSheetsChartRequest(): Slides.Schema.CreateSheetsChartRequest; + // Create a new instance of CreateSlideRequest + newCreateSlideRequest(): Slides.Schema.CreateSlideRequest; + // Create a new instance of CreateTableRequest + newCreateTableRequest(): Slides.Schema.CreateTableRequest; + // Create a new instance of CreateVideoRequest + newCreateVideoRequest(): Slides.Schema.CreateVideoRequest; + // Create a new instance of CropProperties + newCropProperties(): Slides.Schema.CropProperties; + // Create a new instance of DeleteObjectRequest + newDeleteObjectRequest(): Slides.Schema.DeleteObjectRequest; + // Create a new instance of DeleteParagraphBulletsRequest + newDeleteParagraphBulletsRequest(): Slides.Schema.DeleteParagraphBulletsRequest; + // Create a new instance of DeleteTableColumnRequest + newDeleteTableColumnRequest(): Slides.Schema.DeleteTableColumnRequest; + // Create a new instance of DeleteTableRowRequest + newDeleteTableRowRequest(): Slides.Schema.DeleteTableRowRequest; + // Create a new instance of DeleteTextRequest + newDeleteTextRequest(): Slides.Schema.DeleteTextRequest; + // Create a new instance of Dimension + newDimension(): Slides.Schema.Dimension; + // Create a new instance of DuplicateObjectRequest + newDuplicateObjectRequest(): Slides.Schema.DuplicateObjectRequest; + // Create a new instance of Group + newGroup(): Slides.Schema.Group; + // Create a new instance of GroupObjectsRequest + newGroupObjectsRequest(): Slides.Schema.GroupObjectsRequest; + // Create a new instance of Image + newImage(): Slides.Schema.Image; + // Create a new instance of ImageProperties + newImageProperties(): Slides.Schema.ImageProperties; + // Create a new instance of InsertTableColumnsRequest + newInsertTableColumnsRequest(): Slides.Schema.InsertTableColumnsRequest; + // Create a new instance of InsertTableRowsRequest + newInsertTableRowsRequest(): Slides.Schema.InsertTableRowsRequest; + // Create a new instance of InsertTextRequest + newInsertTextRequest(): Slides.Schema.InsertTextRequest; + // Create a new instance of LayoutPlaceholderIdMapping + newLayoutPlaceholderIdMapping(): Slides.Schema.LayoutPlaceholderIdMapping; + // Create a new instance of LayoutProperties + newLayoutProperties(): Slides.Schema.LayoutProperties; + // Create a new instance of LayoutReference + newLayoutReference(): Slides.Schema.LayoutReference; + // Create a new instance of Line + newLine(): Slides.Schema.Line; + // Create a new instance of LineConnection + newLineConnection(): Slides.Schema.LineConnection; + // Create a new instance of LineFill + newLineFill(): Slides.Schema.LineFill; + // Create a new instance of LineProperties + newLineProperties(): Slides.Schema.LineProperties; + // Create a new instance of Link + newLink(): Slides.Schema.Link; + // Create a new instance of MasterProperties + newMasterProperties(): Slides.Schema.MasterProperties; + // Create a new instance of MergeTableCellsRequest + newMergeTableCellsRequest(): Slides.Schema.MergeTableCellsRequest; + // Create a new instance of NotesProperties + newNotesProperties(): Slides.Schema.NotesProperties; + // Create a new instance of OpaqueColor + newOpaqueColor(): Slides.Schema.OpaqueColor; + // Create a new instance of OptionalColor + newOptionalColor(): Slides.Schema.OptionalColor; + // Create a new instance of Outline + newOutline(): Slides.Schema.Outline; + // Create a new instance of OutlineFill + newOutlineFill(): Slides.Schema.OutlineFill; + // Create a new instance of Page + newPage(): Slides.Schema.Page; + // Create a new instance of PageBackgroundFill + newPageBackgroundFill(): Slides.Schema.PageBackgroundFill; + // Create a new instance of PageElement + newPageElement(): Slides.Schema.PageElement; + // Create a new instance of PageElementProperties + newPageElementProperties(): Slides.Schema.PageElementProperties; + // Create a new instance of PageProperties + newPageProperties(): Slides.Schema.PageProperties; + // Create a new instance of ParagraphMarker + newParagraphMarker(): Slides.Schema.ParagraphMarker; + // Create a new instance of ParagraphStyle + newParagraphStyle(): Slides.Schema.ParagraphStyle; + // Create a new instance of Placeholder + newPlaceholder(): Slides.Schema.Placeholder; + // Create a new instance of Presentation + newPresentation(): Slides.Schema.Presentation; + // Create a new instance of Range + newRange(): Slides.Schema.Range; + // Create a new instance of Recolor + newRecolor(): Slides.Schema.Recolor; + // Create a new instance of RefreshSheetsChartRequest + newRefreshSheetsChartRequest(): Slides.Schema.RefreshSheetsChartRequest; + // Create a new instance of ReplaceAllShapesWithImageRequest + newReplaceAllShapesWithImageRequest(): Slides.Schema.ReplaceAllShapesWithImageRequest; + // Create a new instance of ReplaceAllShapesWithSheetsChartRequest + newReplaceAllShapesWithSheetsChartRequest(): Slides.Schema.ReplaceAllShapesWithSheetsChartRequest; + // Create a new instance of ReplaceAllTextRequest + newReplaceAllTextRequest(): Slides.Schema.ReplaceAllTextRequest; + // Create a new instance of ReplaceImageRequest + newReplaceImageRequest(): Slides.Schema.ReplaceImageRequest; + // Create a new instance of Request + newRequest(): Slides.Schema.Request; + // Create a new instance of RerouteLineRequest + newRerouteLineRequest(): Slides.Schema.RerouteLineRequest; + // Create a new instance of RgbColor + newRgbColor(): Slides.Schema.RgbColor; + // Create a new instance of Shadow + newShadow(): Slides.Schema.Shadow; + // Create a new instance of Shape + newShape(): Slides.Schema.Shape; + // Create a new instance of ShapeBackgroundFill + newShapeBackgroundFill(): Slides.Schema.ShapeBackgroundFill; + // Create a new instance of ShapeProperties + newShapeProperties(): Slides.Schema.ShapeProperties; + // Create a new instance of SheetsChart + newSheetsChart(): Slides.Schema.SheetsChart; + // Create a new instance of SheetsChartProperties + newSheetsChartProperties(): Slides.Schema.SheetsChartProperties; + // Create a new instance of Size + newSize(): Slides.Schema.Size; + // Create a new instance of SlideProperties + newSlideProperties(): Slides.Schema.SlideProperties; + // Create a new instance of SolidFill + newSolidFill(): Slides.Schema.SolidFill; + // Create a new instance of StretchedPictureFill + newStretchedPictureFill(): Slides.Schema.StretchedPictureFill; + // Create a new instance of SubstringMatchCriteria + newSubstringMatchCriteria(): Slides.Schema.SubstringMatchCriteria; + // Create a new instance of Table + newTable(): Slides.Schema.Table; + // Create a new instance of TableBorderCell + newTableBorderCell(): Slides.Schema.TableBorderCell; + // Create a new instance of TableBorderFill + newTableBorderFill(): Slides.Schema.TableBorderFill; + // Create a new instance of TableBorderProperties + newTableBorderProperties(): Slides.Schema.TableBorderProperties; + // Create a new instance of TableBorderRow + newTableBorderRow(): Slides.Schema.TableBorderRow; + // Create a new instance of TableCell + newTableCell(): Slides.Schema.TableCell; + // Create a new instance of TableCellBackgroundFill + newTableCellBackgroundFill(): Slides.Schema.TableCellBackgroundFill; + // Create a new instance of TableCellLocation + newTableCellLocation(): Slides.Schema.TableCellLocation; + // Create a new instance of TableCellProperties + newTableCellProperties(): Slides.Schema.TableCellProperties; + // Create a new instance of TableColumnProperties + newTableColumnProperties(): Slides.Schema.TableColumnProperties; + // Create a new instance of TableRange + newTableRange(): Slides.Schema.TableRange; + // Create a new instance of TableRow + newTableRow(): Slides.Schema.TableRow; + // Create a new instance of TableRowProperties + newTableRowProperties(): Slides.Schema.TableRowProperties; + // Create a new instance of TextContent + newTextContent(): Slides.Schema.TextContent; + // Create a new instance of TextElement + newTextElement(): Slides.Schema.TextElement; + // Create a new instance of TextRun + newTextRun(): Slides.Schema.TextRun; + // Create a new instance of TextStyle + newTextStyle(): Slides.Schema.TextStyle; + // Create a new instance of ThemeColorPair + newThemeColorPair(): Slides.Schema.ThemeColorPair; + // Create a new instance of UngroupObjectsRequest + newUngroupObjectsRequest(): Slides.Schema.UngroupObjectsRequest; + // Create a new instance of UnmergeTableCellsRequest + newUnmergeTableCellsRequest(): Slides.Schema.UnmergeTableCellsRequest; + // Create a new instance of UpdateImagePropertiesRequest + newUpdateImagePropertiesRequest(): Slides.Schema.UpdateImagePropertiesRequest; + // Create a new instance of UpdateLineCategoryRequest + newUpdateLineCategoryRequest(): Slides.Schema.UpdateLineCategoryRequest; + // Create a new instance of UpdateLinePropertiesRequest + newUpdateLinePropertiesRequest(): Slides.Schema.UpdateLinePropertiesRequest; + // Create a new instance of UpdatePageElementAltTextRequest + newUpdatePageElementAltTextRequest(): Slides.Schema.UpdatePageElementAltTextRequest; + // Create a new instance of UpdatePageElementTransformRequest + newUpdatePageElementTransformRequest(): Slides.Schema.UpdatePageElementTransformRequest; + // Create a new instance of UpdatePageElementsZOrderRequest + newUpdatePageElementsZOrderRequest(): Slides.Schema.UpdatePageElementsZOrderRequest; + // Create a new instance of UpdatePagePropertiesRequest + newUpdatePagePropertiesRequest(): Slides.Schema.UpdatePagePropertiesRequest; + // Create a new instance of UpdateParagraphStyleRequest + newUpdateParagraphStyleRequest(): Slides.Schema.UpdateParagraphStyleRequest; + // Create a new instance of UpdateShapePropertiesRequest + newUpdateShapePropertiesRequest(): Slides.Schema.UpdateShapePropertiesRequest; + // Create a new instance of UpdateSlidesPositionRequest + newUpdateSlidesPositionRequest(): Slides.Schema.UpdateSlidesPositionRequest; + // Create a new instance of UpdateTableBorderPropertiesRequest + newUpdateTableBorderPropertiesRequest(): Slides.Schema.UpdateTableBorderPropertiesRequest; + // Create a new instance of UpdateTableCellPropertiesRequest + newUpdateTableCellPropertiesRequest(): Slides.Schema.UpdateTableCellPropertiesRequest; + // Create a new instance of UpdateTableColumnPropertiesRequest + newUpdateTableColumnPropertiesRequest(): Slides.Schema.UpdateTableColumnPropertiesRequest; + // Create a new instance of UpdateTableRowPropertiesRequest + newUpdateTableRowPropertiesRequest(): Slides.Schema.UpdateTableRowPropertiesRequest; + // Create a new instance of UpdateTextStyleRequest + newUpdateTextStyleRequest(): Slides.Schema.UpdateTextStyleRequest; + // Create a new instance of UpdateVideoPropertiesRequest + newUpdateVideoPropertiesRequest(): Slides.Schema.UpdateVideoPropertiesRequest; + // Create a new instance of Video + newVideo(): Slides.Schema.Video; + // Create a new instance of VideoProperties + newVideoProperties(): Slides.Schema.VideoProperties; + // Create a new instance of WeightedFontFamily + newWeightedFontFamily(): Slides.Schema.WeightedFontFamily; + // Create a new instance of WordArt + newWordArt(): Slides.Schema.WordArt; + // Create a new instance of WriteControl + newWriteControl(): Slides.Schema.WriteControl; + } +} + +declare var Slides: GoogleAppsScript.Slides; diff --git a/types/google-apps-script/apis/tagmanager/v1.d.ts b/types/google-apps-script/apis/tagmanager/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/tagmanager_v2.d.ts b/types/google-apps-script/apis/tagmanager_v2.d.ts new file mode 100644 index 0000000000..c96308812e --- /dev/null +++ b/types/google-apps-script/apis/tagmanager_v2.d.ts @@ -0,0 +1,710 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace TagManager { + namespace Collection { + namespace Accounts { + namespace Containers { + namespace Workspaces { + export interface Built_in_variablesCollection { + // Creates one or more GTM Built-In Variables. + create(parent: string): TagManager.Schema.CreateBuiltInVariableResponse; + // Creates one or more GTM Built-In Variables. + create(parent: string, optionalArgs: object): TagManager.Schema.CreateBuiltInVariableResponse; + // Lists all the enabled Built-In Variables of a GTM Container. + list(parent: string): TagManager.Schema.ListEnabledBuiltInVariablesResponse; + // Lists all the enabled Built-In Variables of a GTM Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListEnabledBuiltInVariablesResponse; + // Deletes one or more GTM Built-In Variables. + remove(path: string): void; + // Deletes one or more GTM Built-In Variables. + remove(path: string, optionalArgs: object): void; + // Reverts changes to a GTM Built-In Variables in a GTM Workspace. + revert(path: string): TagManager.Schema.RevertBuiltInVariableResponse; + // Reverts changes to a GTM Built-In Variables in a GTM Workspace. + revert(path: string, optionalArgs: object): TagManager.Schema.RevertBuiltInVariableResponse; + } + export interface FoldersCollection { + // Creates a GTM Folder. + create(resource: Schema.Folder, parent: string): TagManager.Schema.Folder; + // List all entities in a GTM Folder. + entities(path: string): TagManager.Schema.FolderEntities; + // List all entities in a GTM Folder. + entities(path: string, optionalArgs: object): TagManager.Schema.FolderEntities; + // Gets a GTM Folder. + get(path: string): TagManager.Schema.Folder; + // Lists all GTM Folders of a Container. + list(parent: string): TagManager.Schema.ListFoldersResponse; + // Lists all GTM Folders of a Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListFoldersResponse; + // Moves entities to a GTM Folder. + move_entities_to_folder(resource: Schema.Folder, path: string): void; + // Moves entities to a GTM Folder. + move_entities_to_folder(resource: Schema.Folder, path: string, optionalArgs: object): void; + // Deletes a GTM Folder. + remove(path: string): void; + // Reverts changes to a GTM Folder in a GTM Workspace. + revert(path: string): TagManager.Schema.RevertFolderResponse; + // Reverts changes to a GTM Folder in a GTM Workspace. + revert(path: string, optionalArgs: object): TagManager.Schema.RevertFolderResponse; + // Updates a GTM Folder. + update(resource: Schema.Folder, path: string): TagManager.Schema.Folder; + // Updates a GTM Folder. + update(resource: Schema.Folder, path: string, optionalArgs: object): TagManager.Schema.Folder; + } + export interface TagsCollection { + // Creates a GTM Tag. + create(resource: Schema.Tag, parent: string): TagManager.Schema.Tag; + // Gets a GTM Tag. + get(path: string): TagManager.Schema.Tag; + // Lists all GTM Tags of a Container. + list(parent: string): TagManager.Schema.ListTagsResponse; + // Lists all GTM Tags of a Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListTagsResponse; + // Deletes a GTM Tag. + remove(path: string): void; + // Reverts changes to a GTM Tag in a GTM Workspace. + revert(path: string): TagManager.Schema.RevertTagResponse; + // Reverts changes to a GTM Tag in a GTM Workspace. + revert(path: string, optionalArgs: object): TagManager.Schema.RevertTagResponse; + // Updates a GTM Tag. + update(resource: Schema.Tag, path: string): TagManager.Schema.Tag; + // Updates a GTM Tag. + update(resource: Schema.Tag, path: string, optionalArgs: object): TagManager.Schema.Tag; + } + export interface TriggersCollection { + // Creates a GTM Trigger. + create(resource: Schema.Trigger, parent: string): TagManager.Schema.Trigger; + // Gets a GTM Trigger. + get(path: string): TagManager.Schema.Trigger; + // Lists all GTM Triggers of a Container. + list(parent: string): TagManager.Schema.ListTriggersResponse; + // Lists all GTM Triggers of a Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListTriggersResponse; + // Deletes a GTM Trigger. + remove(path: string): void; + // Reverts changes to a GTM Trigger in a GTM Workspace. + revert(path: string): TagManager.Schema.RevertTriggerResponse; + // Reverts changes to a GTM Trigger in a GTM Workspace. + revert(path: string, optionalArgs: object): TagManager.Schema.RevertTriggerResponse; + // Updates a GTM Trigger. + update(resource: Schema.Trigger, path: string): TagManager.Schema.Trigger; + // Updates a GTM Trigger. + update(resource: Schema.Trigger, path: string, optionalArgs: object): TagManager.Schema.Trigger; + } + export interface VariablesCollection { + // Creates a GTM Variable. + create(resource: Schema.Variable, parent: string): TagManager.Schema.Variable; + // Gets a GTM Variable. + get(path: string): TagManager.Schema.Variable; + // Lists all GTM Variables of a Container. + list(parent: string): TagManager.Schema.ListVariablesResponse; + // Lists all GTM Variables of a Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListVariablesResponse; + // Deletes a GTM Variable. + remove(path: string): void; + // Reverts changes to a GTM Variable in a GTM Workspace. + revert(path: string): TagManager.Schema.RevertVariableResponse; + // Reverts changes to a GTM Variable in a GTM Workspace. + revert(path: string, optionalArgs: object): TagManager.Schema.RevertVariableResponse; + // Updates a GTM Variable. + update(resource: Schema.Variable, path: string): TagManager.Schema.Variable; + // Updates a GTM Variable. + update(resource: Schema.Variable, path: string, optionalArgs: object): TagManager.Schema.Variable; + } + export interface ZonesCollection { + // Creates a GTM Zone. + create(resource: Schema.Zone, parent: string): TagManager.Schema.Zone; + // Gets a GTM Zone. + get(path: string): TagManager.Schema.Zone; + // Lists all GTM Zones of a GTM container workspace. + list(parent: string): TagManager.Schema.ListZonesResponse; + // Lists all GTM Zones of a GTM container workspace. + list(parent: string, optionalArgs: object): TagManager.Schema.ListZonesResponse; + // Deletes a GTM Zone. + remove(path: string): void; + // Reverts changes to a GTM Zone in a GTM Workspace. + revert(path: string): TagManager.Schema.RevertZoneResponse; + // Reverts changes to a GTM Zone in a GTM Workspace. + revert(path: string, optionalArgs: object): TagManager.Schema.RevertZoneResponse; + // Updates a GTM Zone. + update(resource: Schema.Zone, path: string): TagManager.Schema.Zone; + // Updates a GTM Zone. + update(resource: Schema.Zone, path: string, optionalArgs: object): TagManager.Schema.Zone; + } + } + export interface EnvironmentsCollection { + // Creates a GTM Environment. + create(resource: Schema.Environment, parent: string): TagManager.Schema.Environment; + // Gets a GTM Environment. + get(path: string): TagManager.Schema.Environment; + // Lists all GTM Environments of a GTM Container. + list(parent: string): TagManager.Schema.ListEnvironmentsResponse; + // Lists all GTM Environments of a GTM Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListEnvironmentsResponse; + // Re-generates the authorization code for a GTM Environment. + reauthorize(resource: Schema.Environment, path: string): TagManager.Schema.Environment; + // Deletes a GTM Environment. + remove(path: string): void; + // Updates a GTM Environment. + update(resource: Schema.Environment, path: string): TagManager.Schema.Environment; + // Updates a GTM Environment. + update(resource: Schema.Environment, path: string, optionalArgs: object): TagManager.Schema.Environment; + } + export interface Version_headersCollection { + // Gets the latest container version header + latest(parent: string): TagManager.Schema.ContainerVersionHeader; + // Lists all Container Versions of a GTM Container. + list(parent: string): TagManager.Schema.ListContainerVersionsResponse; + // Lists all Container Versions of a GTM Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListContainerVersionsResponse; + } + export interface VersionsCollection { + // Gets a Container Version. + get(path: string): TagManager.Schema.ContainerVersion; + // Gets a Container Version. + get(path: string, optionalArgs: object): TagManager.Schema.ContainerVersion; + // Gets the live (i.e. published) container version + live(parent: string): TagManager.Schema.ContainerVersion; + // Publishes a Container Version. + publish(path: string): TagManager.Schema.PublishContainerVersionResponse; + // Publishes a Container Version. + publish(path: string, optionalArgs: object): TagManager.Schema.PublishContainerVersionResponse; + // Deletes a Container Version. + remove(path: string): void; + // Sets the latest version used for synchronization of workspaces when detecting conflicts and errors. + set_latest(path: string): TagManager.Schema.ContainerVersion; + // Undeletes a Container Version. + undelete(path: string): TagManager.Schema.ContainerVersion; + // Updates a Container Version. + update(resource: Schema.ContainerVersion, path: string): TagManager.Schema.ContainerVersion; + // Updates a Container Version. + update(resource: Schema.ContainerVersion, path: string, optionalArgs: object): TagManager.Schema.ContainerVersion; + } + export interface WorkspacesCollection { + Built_in_variables?: TagManager.Collection.Accounts.Containers.Workspaces.Built_in_variablesCollection; + Folders?: TagManager.Collection.Accounts.Containers.Workspaces.FoldersCollection; + Tags?: TagManager.Collection.Accounts.Containers.Workspaces.TagsCollection; + Triggers?: TagManager.Collection.Accounts.Containers.Workspaces.TriggersCollection; + Variables?: TagManager.Collection.Accounts.Containers.Workspaces.VariablesCollection; + Zones?: TagManager.Collection.Accounts.Containers.Workspaces.ZonesCollection; + // Creates a Workspace. + create(resource: Schema.Workspace, parent: string): TagManager.Schema.Workspace; + // Creates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version. + create_version(resource: Schema.CreateContainerVersionRequestVersionOptions, path: string): TagManager.Schema.CreateContainerVersionResponse; + // Gets a Workspace. + get(path: string): TagManager.Schema.Workspace; + // Finds conflicting and modified entities in the workspace. + getStatus(path: string): TagManager.Schema.GetWorkspaceStatusResponse; + // Lists all Workspaces that belong to a GTM Container. + list(parent: string): TagManager.Schema.ListWorkspacesResponse; + // Lists all Workspaces that belong to a GTM Container. + list(parent: string, optionalArgs: object): TagManager.Schema.ListWorkspacesResponse; + // Quick previews a workspace by creating a fake container version from all entities in the provided workspace. + quick_preview(path: string): TagManager.Schema.QuickPreviewResponse; + // Deletes a Workspace. + remove(path: string): void; + // Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request. + resolve_conflict(resource: Schema.Entity, path: string): void; + // Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request. + resolve_conflict(resource: Schema.Entity, path: string, optionalArgs: object): void; + // Syncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities. + sync(path: string): TagManager.Schema.SyncWorkspaceResponse; + // Updates a Workspace. + update(resource: Schema.Workspace, path: string): TagManager.Schema.Workspace; + // Updates a Workspace. + update(resource: Schema.Workspace, path: string, optionalArgs: object): TagManager.Schema.Workspace; + } + } + export interface ContainersCollection { + Environments?: TagManager.Collection.Accounts.Containers.EnvironmentsCollection; + Version_headers?: TagManager.Collection.Accounts.Containers.Version_headersCollection; + Versions?: TagManager.Collection.Accounts.Containers.VersionsCollection; + Workspaces?: TagManager.Collection.Accounts.Containers.WorkspacesCollection; + // Creates a Container. + create(resource: Schema.Container, parent: string): TagManager.Schema.Container; + // Gets a Container. + get(path: string): TagManager.Schema.Container; + // Lists all Containers that belongs to a GTM Account. + list(parent: string): TagManager.Schema.ListContainersResponse; + // Lists all Containers that belongs to a GTM Account. + list(parent: string, optionalArgs: object): TagManager.Schema.ListContainersResponse; + // Deletes a Container. + remove(path: string): void; + // Updates a Container. + update(resource: Schema.Container, path: string): TagManager.Schema.Container; + // Updates a Container. + update(resource: Schema.Container, path: string, optionalArgs: object): TagManager.Schema.Container; + } + export interface User_permissionsCollection { + // Creates a user's Account & Container access. + create(resource: Schema.UserPermission, parent: string): TagManager.Schema.UserPermission; + // Gets a user's Account & Container access. + get(path: string): TagManager.Schema.UserPermission; + // List all users that have access to the account along with Account and Container user access granted to each of them. + list(parent: string): TagManager.Schema.ListUserPermissionsResponse; + // List all users that have access to the account along with Account and Container user access granted to each of them. + list(parent: string, optionalArgs: object): TagManager.Schema.ListUserPermissionsResponse; + // Removes a user from the account, revoking access to it and all of its containers. + remove(path: string): void; + // Updates a user's Account & Container access. + update(resource: Schema.UserPermission, path: string): TagManager.Schema.UserPermission; + } + } + export interface AccountsCollection { + Containers?: TagManager.Collection.Accounts.ContainersCollection; + User_permissions?: TagManager.Collection.Accounts.User_permissionsCollection; + // Gets a GTM Account. + get(path: string): TagManager.Schema.Account; + // Lists all GTM Accounts that a user has access to. + list(): TagManager.Schema.ListAccountsResponse; + // Lists all GTM Accounts that a user has access to. + list(optionalArgs: object): TagManager.Schema.ListAccountsResponse; + // Updates a GTM Account. + update(resource: Schema.Account, path: string): TagManager.Schema.Account; + // Updates a GTM Account. + update(resource: Schema.Account, path: string, optionalArgs: object): TagManager.Schema.Account; + } + } + namespace Schema { + export interface Account { + accountId?: string; + fingerprint?: string; + name?: string; + path?: string; + shareData?: boolean; + tagManagerUrl?: string; + } + export interface AccountAccess { + permission?: string; + } + export interface BuiltInVariable { + accountId?: string; + containerId?: string; + name?: string; + path?: string; + type?: string; + workspaceId?: string; + } + export interface Condition { + parameter?: TagManager.Schema.Parameter[]; + type?: string; + } + export interface Container { + accountId?: string; + containerId?: string; + domainName?: string[]; + fingerprint?: string; + name?: string; + notes?: string; + path?: string; + publicId?: string; + tagManagerUrl?: string; + usageContext?: string[]; + } + export interface ContainerAccess { + containerId?: string; + permission?: string; + } + export interface ContainerVersion { + accountId?: string; + builtInVariable?: TagManager.Schema.BuiltInVariable[]; + container?: TagManager.Schema.Container; + containerId?: string; + containerVersionId?: string; + customTemplate?: TagManager.Schema.CustomTemplate[]; + deleted?: boolean; + description?: string; + fingerprint?: string; + folder?: TagManager.Schema.Folder[]; + name?: string; + path?: string; + tag?: TagManager.Schema.Tag[]; + tagManagerUrl?: string; + trigger?: TagManager.Schema.Trigger[]; + variable?: TagManager.Schema.Variable[]; + zone?: TagManager.Schema.Zone[]; + } + export interface ContainerVersionHeader { + accountId?: string; + containerId?: string; + containerVersionId?: string; + deleted?: boolean; + name?: string; + numCustomTemplates?: string; + numMacros?: string; + numRules?: string; + numTags?: string; + numTriggers?: string; + numVariables?: string; + numZones?: string; + path?: string; + } + export interface CreateBuiltInVariableResponse { + builtInVariable?: TagManager.Schema.BuiltInVariable[]; + } + export interface CreateContainerVersionRequestVersionOptions { + name?: string; + notes?: string; + } + export interface CreateContainerVersionResponse { + compilerError?: boolean; + containerVersion?: TagManager.Schema.ContainerVersion; + newWorkspacePath?: string; + syncStatus?: TagManager.Schema.SyncStatus; + } + export interface CustomTemplate { + accountId?: string; + containerId?: string; + fingerprint?: string; + name?: string; + path?: string; + tagManagerUrl?: string; + templateData?: string; + templateId?: string; + workspaceId?: string; + } + export interface Entity { + changeStatus?: string; + folder?: TagManager.Schema.Folder; + tag?: TagManager.Schema.Tag; + trigger?: TagManager.Schema.Trigger; + variable?: TagManager.Schema.Variable; + } + export interface Environment { + accountId?: string; + authorizationCode?: string; + authorizationTimestamp?: TagManager.Schema.Timestamp; + containerId?: string; + containerVersionId?: string; + description?: string; + enableDebug?: boolean; + environmentId?: string; + fingerprint?: string; + name?: string; + path?: string; + tagManagerUrl?: string; + type?: string; + url?: string; + workspaceId?: string; + } + export interface Folder { + accountId?: string; + containerId?: string; + fingerprint?: string; + folderId?: string; + name?: string; + notes?: string; + path?: string; + tagManagerUrl?: string; + workspaceId?: string; + } + export interface FolderEntities { + nextPageToken?: string; + tag?: TagManager.Schema.Tag[]; + trigger?: TagManager.Schema.Trigger[]; + variable?: TagManager.Schema.Variable[]; + } + export interface GetWorkspaceStatusResponse { + mergeConflict?: TagManager.Schema.MergeConflict[]; + workspaceChange?: TagManager.Schema.Entity[]; + } + export interface ListAccountsResponse { + account?: TagManager.Schema.Account[]; + nextPageToken?: string; + } + export interface ListContainerVersionsResponse { + containerVersionHeader?: TagManager.Schema.ContainerVersionHeader[]; + nextPageToken?: string; + } + export interface ListContainersResponse { + container?: TagManager.Schema.Container[]; + nextPageToken?: string; + } + export interface ListEnabledBuiltInVariablesResponse { + builtInVariable?: TagManager.Schema.BuiltInVariable[]; + nextPageToken?: string; + } + export interface ListEnvironmentsResponse { + environment?: TagManager.Schema.Environment[]; + nextPageToken?: string; + } + export interface ListFoldersResponse { + folder?: TagManager.Schema.Folder[]; + nextPageToken?: string; + } + export interface ListTagsResponse { + nextPageToken?: string; + tag?: TagManager.Schema.Tag[]; + } + export interface ListTriggersResponse { + nextPageToken?: string; + trigger?: TagManager.Schema.Trigger[]; + } + export interface ListUserPermissionsResponse { + nextPageToken?: string; + userPermission?: TagManager.Schema.UserPermission[]; + } + export interface ListVariablesResponse { + nextPageToken?: string; + variable?: TagManager.Schema.Variable[]; + } + export interface ListWorkspacesResponse { + nextPageToken?: string; + workspace?: TagManager.Schema.Workspace[]; + } + export interface ListZonesResponse { + nextPageToken?: string; + zone?: TagManager.Schema.Zone[]; + } + export interface MergeConflict { + entityInBaseVersion?: TagManager.Schema.Entity; + entityInWorkspace?: TagManager.Schema.Entity; + } + export interface Parameter { + key?: string; + list?: TagManager.Schema.Parameter[]; + map?: TagManager.Schema.Parameter[]; + type?: string; + value?: string; + } + export interface PublishContainerVersionResponse { + compilerError?: boolean; + containerVersion?: TagManager.Schema.ContainerVersion; + } + export interface QuickPreviewResponse { + compilerError?: boolean; + containerVersion?: TagManager.Schema.ContainerVersion; + syncStatus?: TagManager.Schema.SyncStatus; + } + export interface RevertBuiltInVariableResponse { + enabled?: boolean; + } + export interface RevertFolderResponse { + folder?: TagManager.Schema.Folder; + } + export interface RevertTagResponse { + tag?: TagManager.Schema.Tag; + } + export interface RevertTriggerResponse { + trigger?: TagManager.Schema.Trigger; + } + export interface RevertVariableResponse { + variable?: TagManager.Schema.Variable; + } + export interface RevertZoneResponse { + zone?: TagManager.Schema.Zone; + } + export interface SetupTag { + stopOnSetupFailure?: boolean; + tagName?: string; + } + export interface SyncStatus { + mergeConflict?: boolean; + syncError?: boolean; + } + export interface SyncWorkspaceResponse { + mergeConflict?: TagManager.Schema.MergeConflict[]; + syncStatus?: TagManager.Schema.SyncStatus; + } + export interface Tag { + accountId?: string; + blockingRuleId?: string[]; + blockingTriggerId?: string[]; + containerId?: string; + fingerprint?: string; + firingRuleId?: string[]; + firingTriggerId?: string[]; + liveOnly?: boolean; + name?: string; + notes?: string; + parameter?: TagManager.Schema.Parameter[]; + parentFolderId?: string; + path?: string; + paused?: boolean; + priority?: TagManager.Schema.Parameter; + scheduleEndMs?: string; + scheduleStartMs?: string; + setupTag?: TagManager.Schema.SetupTag[]; + tagFiringOption?: string; + tagId?: string; + tagManagerUrl?: string; + teardownTag?: TagManager.Schema.TeardownTag[]; + type?: string; + workspaceId?: string; + } + export interface TeardownTag { + stopTeardownOnFailure?: boolean; + tagName?: string; + } + export interface Timestamp { + nanos?: number; + seconds?: string; + } + export interface Trigger { + accountId?: string; + autoEventFilter?: TagManager.Schema.Condition[]; + checkValidation?: TagManager.Schema.Parameter; + containerId?: string; + continuousTimeMinMilliseconds?: TagManager.Schema.Parameter; + customEventFilter?: TagManager.Schema.Condition[]; + eventName?: TagManager.Schema.Parameter; + filter?: TagManager.Schema.Condition[]; + fingerprint?: string; + horizontalScrollPercentageList?: TagManager.Schema.Parameter; + interval?: TagManager.Schema.Parameter; + intervalSeconds?: TagManager.Schema.Parameter; + limit?: TagManager.Schema.Parameter; + maxTimerLengthSeconds?: TagManager.Schema.Parameter; + name?: string; + notes?: string; + parameter?: TagManager.Schema.Parameter[]; + parentFolderId?: string; + path?: string; + selector?: TagManager.Schema.Parameter; + tagManagerUrl?: string; + totalTimeMinMilliseconds?: TagManager.Schema.Parameter; + triggerId?: string; + type?: string; + uniqueTriggerId?: TagManager.Schema.Parameter; + verticalScrollPercentageList?: TagManager.Schema.Parameter; + visibilitySelector?: TagManager.Schema.Parameter; + visiblePercentageMax?: TagManager.Schema.Parameter; + visiblePercentageMin?: TagManager.Schema.Parameter; + waitForTags?: TagManager.Schema.Parameter; + waitForTagsTimeout?: TagManager.Schema.Parameter; + workspaceId?: string; + } + export interface UserPermission { + accountAccess?: TagManager.Schema.AccountAccess; + accountId?: string; + containerAccess?: TagManager.Schema.ContainerAccess[]; + emailAddress?: string; + path?: string; + } + export interface Variable { + accountId?: string; + containerId?: string; + disablingTriggerId?: string[]; + enablingTriggerId?: string[]; + fingerprint?: string; + formatValue?: TagManager.Schema.VariableFormatValue; + name?: string; + notes?: string; + parameter?: TagManager.Schema.Parameter[]; + parentFolderId?: string; + path?: string; + scheduleEndMs?: string; + scheduleStartMs?: string; + tagManagerUrl?: string; + type?: string; + variableId?: string; + workspaceId?: string; + } + export interface VariableFormatValue { + caseConversionType?: string; + convertFalseToValue?: TagManager.Schema.Parameter; + convertNullToValue?: TagManager.Schema.Parameter; + convertTrueToValue?: TagManager.Schema.Parameter; + convertUndefinedToValue?: TagManager.Schema.Parameter; + } + export interface Workspace { + accountId?: string; + containerId?: string; + description?: string; + fingerprint?: string; + name?: string; + path?: string; + tagManagerUrl?: string; + workspaceId?: string; + } + export interface Zone { + accountId?: string; + boundary?: TagManager.Schema.ZoneBoundary; + childContainer?: TagManager.Schema.ZoneChildContainer[]; + containerId?: string; + fingerprint?: string; + name?: string; + notes?: string; + path?: string; + tagManagerUrl?: string; + typeRestriction?: TagManager.Schema.ZoneTypeRestriction; + workspaceId?: string; + zoneId?: string; + } + export interface ZoneBoundary { + condition?: TagManager.Schema.Condition[]; + customEvaluationTriggerId?: string[]; + } + export interface ZoneChildContainer { + nickname?: string; + publicId?: string; + } + export interface ZoneTypeRestriction { + enable?: boolean; + whitelistedTypeId?: string[]; + } + } + } + export interface TagManager { + Accounts?: TagManager.Collection.AccountsCollection; + // Create a new instance of Account + newAccount(): TagManager.Schema.Account; + // Create a new instance of AccountAccess + newAccountAccess(): TagManager.Schema.AccountAccess; + // Create a new instance of BuiltInVariable + newBuiltInVariable(): TagManager.Schema.BuiltInVariable; + // Create a new instance of Condition + newCondition(): TagManager.Schema.Condition; + // Create a new instance of Container + newContainer(): TagManager.Schema.Container; + // Create a new instance of ContainerAccess + newContainerAccess(): TagManager.Schema.ContainerAccess; + // Create a new instance of ContainerVersion + newContainerVersion(): TagManager.Schema.ContainerVersion; + // Create a new instance of CreateContainerVersionRequestVersionOptions + newCreateContainerVersionRequestVersionOptions(): TagManager.Schema.CreateContainerVersionRequestVersionOptions; + // Create a new instance of CustomTemplate + newCustomTemplate(): TagManager.Schema.CustomTemplate; + // Create a new instance of Entity + newEntity(): TagManager.Schema.Entity; + // Create a new instance of Environment + newEnvironment(): TagManager.Schema.Environment; + // Create a new instance of Folder + newFolder(): TagManager.Schema.Folder; + // Create a new instance of Parameter + newParameter(): TagManager.Schema.Parameter; + // Create a new instance of SetupTag + newSetupTag(): TagManager.Schema.SetupTag; + // Create a new instance of Tag + newTag(): TagManager.Schema.Tag; + // Create a new instance of TeardownTag + newTeardownTag(): TagManager.Schema.TeardownTag; + // Create a new instance of Timestamp + newTimestamp(): TagManager.Schema.Timestamp; + // Create a new instance of Trigger + newTrigger(): TagManager.Schema.Trigger; + // Create a new instance of UserPermission + newUserPermission(): TagManager.Schema.UserPermission; + // Create a new instance of Variable + newVariable(): TagManager.Schema.Variable; + // Create a new instance of VariableFormatValue + newVariableFormatValue(): TagManager.Schema.VariableFormatValue; + // Create a new instance of Workspace + newWorkspace(): TagManager.Schema.Workspace; + // Create a new instance of Zone + newZone(): TagManager.Schema.Zone; + // Create a new instance of ZoneBoundary + newZoneBoundary(): TagManager.Schema.ZoneBoundary; + // Create a new instance of ZoneChildContainer + newZoneChildContainer(): TagManager.Schema.ZoneChildContainer; + // Create a new instance of ZoneTypeRestriction + newZoneTypeRestriction(): TagManager.Schema.ZoneTypeRestriction; + } +} + +declare var TagManager: GoogleAppsScript.TagManager; diff --git a/types/google-apps-script/apis/tasks/v1.d.ts b/types/google-apps-script/apis/tasks/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/tasks_v1.d.ts b/types/google-apps-script/apis/tasks_v1.d.ts new file mode 100644 index 0000000000..205dc31855 --- /dev/null +++ b/types/google-apps-script/apis/tasks_v1.d.ts @@ -0,0 +1,108 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace Tasks { + namespace Collection { + export interface TasklistsCollection { + // Returns the authenticated user's specified task list. + get(tasklist: string): Tasks.Schema.TaskList; + // Creates a new task list and adds it to the authenticated user's task lists. + insert(resource: Schema.TaskList): Tasks.Schema.TaskList; + // Returns all the authenticated user's task lists. + list(): Tasks.Schema.TaskLists; + // Returns all the authenticated user's task lists. + list(optionalArgs: object): Tasks.Schema.TaskLists; + // Updates the authenticated user's specified task list. This method supports patch semantics. + patch(resource: Schema.TaskList, tasklist: string): Tasks.Schema.TaskList; + // Deletes the authenticated user's specified task list. + remove(tasklist: string): void; + // Updates the authenticated user's specified task list. + update(resource: Schema.TaskList, tasklist: string): Tasks.Schema.TaskList; + } + export interface TasksCollection { + // Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list. + clear(tasklist: string): void; + // Returns the specified task. + get(tasklist: string, task: string): Tasks.Schema.Task; + // Creates a new task on the specified task list. + insert(resource: Schema.Task, tasklist: string): Tasks.Schema.Task; + // Creates a new task on the specified task list. + insert(resource: Schema.Task, tasklist: string, optionalArgs: object): Tasks.Schema.Task; + // Returns all tasks in the specified task list. + list(tasklist: string): Tasks.Schema.Tasks; + // Returns all tasks in the specified task list. + list(tasklist: string, optionalArgs: object): Tasks.Schema.Tasks; + // Moves the specified task to another position in the task list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. + move(tasklist: string, task: string): Tasks.Schema.Task; + // Moves the specified task to another position in the task list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. + move(tasklist: string, task: string, optionalArgs: object): Tasks.Schema.Task; + // Updates the specified task. This method supports patch semantics. + patch(resource: Schema.Task, tasklist: string, task: string): Tasks.Schema.Task; + // Deletes the specified task from the task list. + remove(tasklist: string, task: string): void; + // Updates the specified task. + update(resource: Schema.Task, tasklist: string, task: string): Tasks.Schema.Task; + } + } + namespace Schema { + export interface Task { + completed?: string; + deleted?: boolean; + due?: string; + etag?: string; + hidden?: boolean; + id?: string; + kind?: string; + links?: Tasks.Schema.TaskLinks[]; + notes?: string; + parent?: string; + position?: string; + selfLink?: string; + status?: string; + title?: string; + updated?: string; + } + export interface TaskLinks { + description?: string; + link?: string; + type?: string; + } + export interface TaskList { + etag?: string; + id?: string; + kind?: string; + selfLink?: string; + title?: string; + updated?: string; + } + export interface TaskLists { + etag?: string; + items?: Tasks.Schema.TaskList[]; + kind?: string; + nextPageToken?: string; + } + export interface Tasks { + etag?: string; + items?: Tasks.Schema.Task[]; + kind?: string; + nextPageToken?: string; + } + } + } + export interface Tasks { + Tasklists?: Tasks.Collection.TasklistsCollection; + Tasks?: Tasks.Collection.TasksCollection; + // Create a new instance of Task + newTask(): Tasks.Schema.Task; + // Create a new instance of TaskLinks + newTaskLinks(): Tasks.Schema.TaskLinks; + // Create a new instance of TaskList + newTaskList(): Tasks.Schema.TaskList; + } +} + +declare var Tasks: GoogleAppsScript.Tasks; diff --git a/types/google-apps-script/apis/urlshortener/v1.d.ts b/types/google-apps-script/apis/urlshortener/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/urlshortener_v1.d.ts b/types/google-apps-script/apis/urlshortener_v1.d.ts new file mode 100644 index 0000000000..bb8b5ff7b9 --- /dev/null +++ b/types/google-apps-script/apis/urlshortener_v1.d.ts @@ -0,0 +1,73 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace UrlShortener { + namespace Collection { + export interface UrlCollection { + // Expands a short URL or gets creation time and analytics. + get(shortUrl: string): UrlShortener.Schema.Url; + // Expands a short URL or gets creation time and analytics. + get(shortUrl: string, optionalArgs: object): UrlShortener.Schema.Url; + // Creates a new short URL. + insert(resource: Schema.Url): UrlShortener.Schema.Url; + // Retrieves a list of URLs shortened by a user. + list(): UrlShortener.Schema.UrlHistory; + // Retrieves a list of URLs shortened by a user. + list(optionalArgs: object): UrlShortener.Schema.UrlHistory; + } + } + namespace Schema { + export interface AnalyticsSnapshot { + browsers?: UrlShortener.Schema.StringCount[]; + countries?: UrlShortener.Schema.StringCount[]; + longUrlClicks?: string; + platforms?: UrlShortener.Schema.StringCount[]; + referrers?: UrlShortener.Schema.StringCount[]; + shortUrlClicks?: string; + } + export interface AnalyticsSummary { + allTime?: UrlShortener.Schema.AnalyticsSnapshot; + day?: UrlShortener.Schema.AnalyticsSnapshot; + month?: UrlShortener.Schema.AnalyticsSnapshot; + twoHours?: UrlShortener.Schema.AnalyticsSnapshot; + week?: UrlShortener.Schema.AnalyticsSnapshot; + } + export interface StringCount { + count?: string; + id?: string; + } + export interface Url { + analytics?: UrlShortener.Schema.AnalyticsSummary; + created?: string; + id?: string; + kind?: string; + longUrl?: string; + status?: string; + } + export interface UrlHistory { + items?: UrlShortener.Schema.Url[]; + itemsPerPage?: number; + kind?: string; + nextPageToken?: string; + totalItems?: number; + } + } + } + export interface UrlShortener { + Url?: UrlShortener.Collection.UrlCollection; + // Create a new instance of AnalyticsSnapshot + newAnalyticsSnapshot(): UrlShortener.Schema.AnalyticsSnapshot; + // Create a new instance of AnalyticsSummary + newAnalyticsSummary(): UrlShortener.Schema.AnalyticsSummary; + // Create a new instance of StringCount + newStringCount(): UrlShortener.Schema.StringCount; + // Create a new instance of Url + newUrl(): UrlShortener.Schema.Url; + } +} + +declare var UrlShortener: GoogleAppsScript.UrlShortener; diff --git a/types/google-apps-script/apis/youtube/v3.d.ts b/types/google-apps-script/apis/youtube/v3.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/youtubeAnalytics/v1.d.ts b/types/google-apps-script/apis/youtubeAnalytics/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/youtubePartner/v1.d.ts b/types/google-apps-script/apis/youtubePartner/v1.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/google-apps-script/apis/youtube_v3.d.ts b/types/google-apps-script/apis/youtube_v3.d.ts new file mode 100644 index 0000000000..0585a8da07 --- /dev/null +++ b/types/google-apps-script/apis/youtube_v3.d.ts @@ -0,0 +1,1911 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace YouTube { + namespace Collection { + export interface ActivitiesCollection { + // Posts a bulletin for a specific channel. (The user submitting the request must be authorized to act on the channel's behalf.) + // Note: Even though an activity resource can contain information about actions like a user rating a video or marking a video as a favorite, you need to use other API methods to generate those activity resources. For example, you would use the API's videos.rate() method to rate a video and the playlistItems.insert() method to mark a video as a favorite. + insert(resource: Schema.Activity, part: string): YouTube.Schema.Activity; + // Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user. + list(part: string): YouTube.Schema.ActivityListResponse; + // Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user. + list(part: string, optionalArgs: object): YouTube.Schema.ActivityListResponse; + } + export interface CaptionsCollection { + // Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter. + download(id: string): void; + // Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter. + download(id: string, optionalArgs: object): void; + // Uploads a caption track. + insert(resource: Schema.Caption, part: string): YouTube.Schema.Caption; + // Uploads a caption track. + insert(resource: Schema.Caption, part: string, mediaData: any): YouTube.Schema.Caption; + // Uploads a caption track. + insert(resource: Schema.Caption, part: string, mediaData: any, optionalArgs: object): YouTube.Schema.Caption; + // Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track. + list(part: string, videoId: string): YouTube.Schema.CaptionListResponse; + // Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track. + list(part: string, videoId: string, optionalArgs: object): YouTube.Schema.CaptionListResponse; + // Deletes a specified caption track. + remove(id: string): void; + // Deletes a specified caption track. + remove(id: string, optionalArgs: object): void; + // Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. + update(resource: Schema.Caption, part: string): YouTube.Schema.Caption; + // Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. + update(resource: Schema.Caption, part: string, mediaData: any): YouTube.Schema.Caption; + // Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. + update(resource: Schema.Caption, part: string, mediaData: any, optionalArgs: object): YouTube.Schema.Caption; + } + export interface ChannelBannersCollection { + // Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel: + // - Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels. + // - Extract the url property's value from the response that the API returns for step 1. + // - Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2. + insert(resource: Schema.ChannelBannerResource): YouTube.Schema.ChannelBannerResource; + // Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel: + // - Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels. + // - Extract the url property's value from the response that the API returns for step 1. + // - Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2. + insert(resource: Schema.ChannelBannerResource, mediaData: any): YouTube.Schema.ChannelBannerResource; + // Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel: + // - Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels. + // - Extract the url property's value from the response that the API returns for step 1. + // - Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2. + insert(resource: Schema.ChannelBannerResource, mediaData: any, optionalArgs: object): YouTube.Schema.ChannelBannerResource; + } + export interface ChannelSectionsCollection { + // Adds a channelSection for the authenticated user's channel. + insert(resource: Schema.ChannelSection, part: string): YouTube.Schema.ChannelSection; + // Adds a channelSection for the authenticated user's channel. + insert(resource: Schema.ChannelSection, part: string, optionalArgs: object): YouTube.Schema.ChannelSection; + // Returns channelSection resources that match the API request criteria. + list(part: string): YouTube.Schema.ChannelSectionListResponse; + // Returns channelSection resources that match the API request criteria. + list(part: string, optionalArgs: object): YouTube.Schema.ChannelSectionListResponse; + // Deletes a channelSection. + remove(id: string): void; + // Deletes a channelSection. + remove(id: string, optionalArgs: object): void; + // Update a channelSection. + update(resource: Schema.ChannelSection, part: string): YouTube.Schema.ChannelSection; + // Update a channelSection. + update(resource: Schema.ChannelSection, part: string, optionalArgs: object): YouTube.Schema.ChannelSection; + } + export interface ChannelsCollection { + // Returns a collection of zero or more channel resources that match the request criteria. + list(part: string): YouTube.Schema.ChannelListResponse; + // Returns a collection of zero or more channel resources that match the request criteria. + list(part: string, optionalArgs: object): YouTube.Schema.ChannelListResponse; + // Updates a channel's metadata. Note that this method currently only supports updates to the channel resource's brandingSettings and invideoPromotion objects and their child properties. + update(resource: Schema.Channel, part: string): YouTube.Schema.Channel; + // Updates a channel's metadata. Note that this method currently only supports updates to the channel resource's brandingSettings and invideoPromotion objects and their child properties. + update(resource: Schema.Channel, part: string, optionalArgs: object): YouTube.Schema.Channel; + } + export interface CommentThreadsCollection { + // Creates a new top-level comment. To add a reply to an existing comment, use the comments.insert method instead. + insert(resource: Schema.CommentThread, part: string): YouTube.Schema.CommentThread; + // Returns a list of comment threads that match the API request parameters. + list(part: string): YouTube.Schema.CommentThreadListResponse; + // Returns a list of comment threads that match the API request parameters. + list(part: string, optionalArgs: object): YouTube.Schema.CommentThreadListResponse; + // Modifies the top-level comment in a comment thread. + update(resource: Schema.CommentThread, part: string): YouTube.Schema.CommentThread; + } + export interface CommentsCollection { + // Creates a reply to an existing comment. Note: To create a top-level comment, use the commentThreads.insert method. + insert(resource: Schema.Comment, part: string): YouTube.Schema.Comment; + // Returns a list of comments that match the API request parameters. + list(part: string): YouTube.Schema.CommentListResponse; + // Returns a list of comments that match the API request parameters. + list(part: string, optionalArgs: object): YouTube.Schema.CommentListResponse; + // Expresses the caller's opinion that one or more comments should be flagged as spam. + markAsSpam(id: string): void; + // Deletes a comment. + remove(id: string): void; + // Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments. + setModerationStatus(id: string, moderationStatus: string): void; + // Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments. + setModerationStatus(id: string, moderationStatus: string, optionalArgs: object): void; + // Modifies a comment. + update(resource: Schema.Comment, part: string): YouTube.Schema.Comment; + } + export interface GuideCategoriesCollection { + // Returns a list of categories that can be associated with YouTube channels. + list(part: string): YouTube.Schema.GuideCategoryListResponse; + // Returns a list of categories that can be associated with YouTube channels. + list(part: string, optionalArgs: object): YouTube.Schema.GuideCategoryListResponse; + } + export interface I18nLanguagesCollection { + // Returns a list of application languages that the YouTube website supports. + list(part: string): YouTube.Schema.I18nLanguageListResponse; + // Returns a list of application languages that the YouTube website supports. + list(part: string, optionalArgs: object): YouTube.Schema.I18nLanguageListResponse; + } + export interface I18nRegionsCollection { + // Returns a list of content regions that the YouTube website supports. + list(part: string): YouTube.Schema.I18nRegionListResponse; + // Returns a list of content regions that the YouTube website supports. + list(part: string, optionalArgs: object): YouTube.Schema.I18nRegionListResponse; + } + export interface LiveBroadcastsCollection { + // Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream, though a video stream may be bound to more than one broadcast. + bind(id: string, part: string): YouTube.Schema.LiveBroadcast; + // Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream, though a video stream may be bound to more than one broadcast. + bind(id: string, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; + // Controls the settings for a slate that can be displayed in the broadcast stream. + control(id: string, part: string): YouTube.Schema.LiveBroadcast; + // Controls the settings for a slate that can be displayed in the broadcast stream. + control(id: string, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; + // Creates a broadcast. + insert(resource: Schema.LiveBroadcast, part: string): YouTube.Schema.LiveBroadcast; + // Creates a broadcast. + insert(resource: Schema.LiveBroadcast, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; + // Returns a list of YouTube broadcasts that match the API request parameters. + list(part: string): YouTube.Schema.LiveBroadcastListResponse; + // Returns a list of YouTube broadcasts that match the API request parameters. + list(part: string, optionalArgs: object): YouTube.Schema.LiveBroadcastListResponse; + // Deletes a broadcast. + remove(id: string): void; + // Deletes a broadcast. + remove(id: string, optionalArgs: object): void; + // Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. + transition(broadcastStatus: string, id: string, part: string): YouTube.Schema.LiveBroadcast; + // Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. + transition(broadcastStatus: string, id: string, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; + // Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object. + update(resource: Schema.LiveBroadcast, part: string): YouTube.Schema.LiveBroadcast; + // Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object. + update(resource: Schema.LiveBroadcast, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; + } + export interface LiveChatBansCollection { + // Adds a new ban to the chat. + insert(resource: Schema.LiveChatBan, part: string): YouTube.Schema.LiveChatBan; + // Removes a chat ban. + remove(id: string): void; + } + export interface LiveChatMessagesCollection { + // Adds a message to a live chat. + insert(resource: Schema.LiveChatMessage, part: string): YouTube.Schema.LiveChatMessage; + // Lists live chat messages for a specific chat. + list(liveChatId: string, part: string): YouTube.Schema.LiveChatMessageListResponse; + // Lists live chat messages for a specific chat. + list(liveChatId: string, part: string, optionalArgs: object): YouTube.Schema.LiveChatMessageListResponse; + // Deletes a chat message. + remove(id: string): void; + } + export interface LiveChatModeratorsCollection { + // Adds a new moderator for the chat. + insert(resource: Schema.LiveChatModerator, part: string): YouTube.Schema.LiveChatModerator; + // Lists moderators for a live chat. + list(liveChatId: string, part: string): YouTube.Schema.LiveChatModeratorListResponse; + // Lists moderators for a live chat. + list(liveChatId: string, part: string, optionalArgs: object): YouTube.Schema.LiveChatModeratorListResponse; + // Removes a chat moderator. + remove(id: string): void; + } + export interface LiveStreamsCollection { + // Creates a video stream. The stream enables you to send your video to YouTube, which can then broadcast the video to your audience. + insert(resource: Schema.LiveStream, part: string): YouTube.Schema.LiveStream; + // Creates a video stream. The stream enables you to send your video to YouTube, which can then broadcast the video to your audience. + insert(resource: Schema.LiveStream, part: string, optionalArgs: object): YouTube.Schema.LiveStream; + // Returns a list of video streams that match the API request parameters. + list(part: string): YouTube.Schema.LiveStreamListResponse; + // Returns a list of video streams that match the API request parameters. + list(part: string, optionalArgs: object): YouTube.Schema.LiveStreamListResponse; + // Deletes a video stream. + remove(id: string): void; + // Deletes a video stream. + remove(id: string, optionalArgs: object): void; + // Updates a video stream. If the properties that you want to change cannot be updated, then you need to create a new stream with the proper settings. + update(resource: Schema.LiveStream, part: string): YouTube.Schema.LiveStream; + // Updates a video stream. If the properties that you want to change cannot be updated, then you need to create a new stream with the proper settings. + update(resource: Schema.LiveStream, part: string, optionalArgs: object): YouTube.Schema.LiveStream; + } + export interface PlaylistItemsCollection { + // Adds a resource to a playlist. + insert(resource: Schema.PlaylistItem, part: string): YouTube.Schema.PlaylistItem; + // Adds a resource to a playlist. + insert(resource: Schema.PlaylistItem, part: string, optionalArgs: object): YouTube.Schema.PlaylistItem; + // Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs. + list(part: string): YouTube.Schema.PlaylistItemListResponse; + // Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs. + list(part: string, optionalArgs: object): YouTube.Schema.PlaylistItemListResponse; + // Deletes a playlist item. + remove(id: string): void; + // Deletes a playlist item. + remove(id: string, optionalArgs: object): void; + // Modifies a playlist item. For example, you could update the item's position in the playlist. + update(resource: Schema.PlaylistItem, part: string): YouTube.Schema.PlaylistItem; + // Modifies a playlist item. For example, you could update the item's position in the playlist. + update(resource: Schema.PlaylistItem, part: string, optionalArgs: object): YouTube.Schema.PlaylistItem; + } + export interface PlaylistsCollection { + // Creates a playlist. + insert(resource: Schema.Playlist, part: string): YouTube.Schema.Playlist; + // Creates a playlist. + insert(resource: Schema.Playlist, part: string, optionalArgs: object): YouTube.Schema.Playlist; + // Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs. + list(part: string): YouTube.Schema.PlaylistListResponse; + // Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs. + list(part: string, optionalArgs: object): YouTube.Schema.PlaylistListResponse; + // Deletes a playlist. + remove(id: string): void; + // Deletes a playlist. + remove(id: string, optionalArgs: object): void; + // Modifies a playlist. For example, you could change a playlist's title, description, or privacy status. + update(resource: Schema.Playlist, part: string): YouTube.Schema.Playlist; + // Modifies a playlist. For example, you could change a playlist's title, description, or privacy status. + update(resource: Schema.Playlist, part: string, optionalArgs: object): YouTube.Schema.Playlist; + } + export interface SearchCollection { + // Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource. + list(part: string): YouTube.Schema.SearchListResponse; + // Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource. + list(part: string, optionalArgs: object): YouTube.Schema.SearchListResponse; + } + export interface SponsorsCollection { + // Lists sponsors for a channel. + list(part: string): YouTube.Schema.SponsorListResponse; + // Lists sponsors for a channel. + list(part: string, optionalArgs: object): YouTube.Schema.SponsorListResponse; + } + export interface SubscriptionsCollection { + // Adds a subscription for the authenticated user's channel. + insert(resource: Schema.Subscription, part: string): YouTube.Schema.Subscription; + // Returns subscription resources that match the API request criteria. + list(part: string): YouTube.Schema.SubscriptionListResponse; + // Returns subscription resources that match the API request criteria. + list(part: string, optionalArgs: object): YouTube.Schema.SubscriptionListResponse; + // Deletes a subscription. + remove(id: string): void; + } + export interface SuperChatEventsCollection { + // Lists Super Chat events for a channel. + list(part: string): YouTube.Schema.SuperChatEventListResponse; + // Lists Super Chat events for a channel. + list(part: string, optionalArgs: object): YouTube.Schema.SuperChatEventListResponse; + } + export interface ThumbnailsCollection { + // Uploads a custom video thumbnail to YouTube and sets it for a video. + set(videoId: string): YouTube.Schema.ThumbnailSetResponse; + // Uploads a custom video thumbnail to YouTube and sets it for a video. + set(videoId: string, mediaData: any): YouTube.Schema.ThumbnailSetResponse; + // Uploads a custom video thumbnail to YouTube and sets it for a video. + set(videoId: string, mediaData: any, optionalArgs: object): YouTube.Schema.ThumbnailSetResponse; + } + export interface VideoAbuseReportReasonsCollection { + // Returns a list of abuse reasons that can be used for reporting abusive videos. + list(part: string): YouTube.Schema.VideoAbuseReportReasonListResponse; + // Returns a list of abuse reasons that can be used for reporting abusive videos. + list(part: string, optionalArgs: object): YouTube.Schema.VideoAbuseReportReasonListResponse; + } + export interface VideoCategoriesCollection { + // Returns a list of categories that can be associated with YouTube videos. + list(part: string): YouTube.Schema.VideoCategoryListResponse; + // Returns a list of categories that can be associated with YouTube videos. + list(part: string, optionalArgs: object): YouTube.Schema.VideoCategoryListResponse; + } + export interface VideosCollection { + // Retrieves the ratings that the authorized user gave to a list of specified videos. + getRating(id: string): YouTube.Schema.VideoGetRatingResponse; + // Retrieves the ratings that the authorized user gave to a list of specified videos. + getRating(id: string, optionalArgs: object): YouTube.Schema.VideoGetRatingResponse; + // Uploads a video to YouTube and optionally sets the video's metadata. + insert(resource: Schema.Video, part: string): YouTube.Schema.Video; + // Uploads a video to YouTube and optionally sets the video's metadata. + insert(resource: Schema.Video, part: string, mediaData: any): YouTube.Schema.Video; + // Uploads a video to YouTube and optionally sets the video's metadata. + insert(resource: Schema.Video, part: string, mediaData: any, optionalArgs: object): YouTube.Schema.Video; + // Returns a list of videos that match the API request parameters. + list(part: string): YouTube.Schema.VideoListResponse; + // Returns a list of videos that match the API request parameters. + list(part: string, optionalArgs: object): YouTube.Schema.VideoListResponse; + // Add a like or dislike rating to a video or remove a rating from a video. + rate(id: string, rating: string): void; + // Deletes a YouTube video. + remove(id: string): void; + // Deletes a YouTube video. + remove(id: string, optionalArgs: object): void; + // Report abuse for a video. + reportAbuse(resource: Schema.VideoAbuseReport): void; + // Report abuse for a video. + reportAbuse(resource: Schema.VideoAbuseReport, optionalArgs: object): void; + // Updates a video's metadata. + update(resource: Schema.Video, part: string): YouTube.Schema.Video; + // Updates a video's metadata. + update(resource: Schema.Video, part: string, optionalArgs: object): YouTube.Schema.Video; + } + export interface WatermarksCollection { + // Uploads a watermark image to YouTube and sets it for a channel. + set(resource: Schema.InvideoBranding, channelId: string): void; + // Uploads a watermark image to YouTube and sets it for a channel. + set(resource: Schema.InvideoBranding, channelId: string, mediaData: any): void; + // Uploads a watermark image to YouTube and sets it for a channel. + set(resource: Schema.InvideoBranding, channelId: string, mediaData: any, optionalArgs: object): void; + // Deletes a channel's watermark image. + unset(channelId: string): void; + // Deletes a channel's watermark image. + unset(channelId: string, optionalArgs: object): void; + } + } + namespace Schema { + export interface AccessPolicy { + allowed?: boolean; + exception?: string[]; + } + export interface Activity { + contentDetails?: YouTube.Schema.ActivityContentDetails; + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.ActivitySnippet; + } + export interface ActivityContentDetails { + bulletin?: YouTube.Schema.ActivityContentDetailsBulletin; + channelItem?: YouTube.Schema.ActivityContentDetailsChannelItem; + comment?: YouTube.Schema.ActivityContentDetailsComment; + favorite?: YouTube.Schema.ActivityContentDetailsFavorite; + like?: YouTube.Schema.ActivityContentDetailsLike; + playlistItem?: YouTube.Schema.ActivityContentDetailsPlaylistItem; + promotedItem?: YouTube.Schema.ActivityContentDetailsPromotedItem; + recommendation?: YouTube.Schema.ActivityContentDetailsRecommendation; + social?: YouTube.Schema.ActivityContentDetailsSocial; + subscription?: YouTube.Schema.ActivityContentDetailsSubscription; + upload?: YouTube.Schema.ActivityContentDetailsUpload; + } + export interface ActivityContentDetailsBulletin { + resourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsChannelItem { + resourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsComment { + resourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsFavorite { + resourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsLike { + resourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsPlaylistItem { + playlistId?: string; + playlistItemId?: string; + resourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsPromotedItem { + adTag?: string; + clickTrackingUrl?: string; + creativeViewUrl?: string; + ctaType?: string; + customCtaButtonText?: string; + descriptionText?: string; + destinationUrl?: string; + forecastingUrl?: string[]; + impressionUrl?: string[]; + videoId?: string; + } + export interface ActivityContentDetailsRecommendation { + reason?: string; + resourceId?: YouTube.Schema.ResourceId; + seedResourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsSocial { + author?: string; + imageUrl?: string; + referenceUrl?: string; + resourceId?: YouTube.Schema.ResourceId; + type?: string; + } + export interface ActivityContentDetailsSubscription { + resourceId?: YouTube.Schema.ResourceId; + } + export interface ActivityContentDetailsUpload { + videoId?: string; + } + export interface ActivityListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Activity[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface ActivitySnippet { + channelId?: string; + channelTitle?: string; + description?: string; + groupId?: string; + publishedAt?: string; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + type?: string; + } + export interface Caption { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.CaptionSnippet; + } + export interface CaptionListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Caption[]; + kind?: string; + visitorId?: string; + } + export interface CaptionSnippet { + audioTrackType?: string; + failureReason?: string; + isAutoSynced?: boolean; + isCC?: boolean; + isDraft?: boolean; + isEasyReader?: boolean; + isLarge?: boolean; + language?: string; + lastUpdated?: string; + name?: string; + status?: string; + trackKind?: string; + videoId?: string; + } + export interface CdnSettings { + format?: string; + frameRate?: string; + ingestionInfo?: YouTube.Schema.IngestionInfo; + ingestionType?: string; + resolution?: string; + } + export interface Channel { + auditDetails?: YouTube.Schema.ChannelAuditDetails; + brandingSettings?: YouTube.Schema.ChannelBrandingSettings; + contentDetails?: YouTube.Schema.ChannelContentDetails; + contentOwnerDetails?: YouTube.Schema.ChannelContentOwnerDetails; + conversionPings?: YouTube.Schema.ChannelConversionPings; + etag?: string; + id?: string; + invideoPromotion?: YouTube.Schema.InvideoPromotion; + kind?: string; + localizations?: object; + snippet?: YouTube.Schema.ChannelSnippet; + statistics?: YouTube.Schema.ChannelStatistics; + status?: YouTube.Schema.ChannelStatus; + topicDetails?: YouTube.Schema.ChannelTopicDetails; + } + export interface ChannelAuditDetails { + communityGuidelinesGoodStanding?: boolean; + contentIdClaimsGoodStanding?: boolean; + copyrightStrikesGoodStanding?: boolean; + } + export interface ChannelBannerResource { + etag?: string; + kind?: string; + url?: string; + } + export interface ChannelBrandingSettings { + channel?: YouTube.Schema.ChannelSettings; + hints?: YouTube.Schema.PropertyValue[]; + image?: YouTube.Schema.ImageSettings; + watch?: YouTube.Schema.WatchSettings; + } + export interface ChannelContentDetails { + relatedPlaylists?: YouTube.Schema.ChannelContentDetailsRelatedPlaylists; + } + export interface ChannelContentDetailsRelatedPlaylists { + favorites?: string; + likes?: string; + uploads?: string; + watchHistory?: string; + watchLater?: string; + } + export interface ChannelContentOwnerDetails { + contentOwner?: string; + timeLinked?: string; + } + export interface ChannelConversionPing { + context?: string; + conversionUrl?: string; + } + export interface ChannelConversionPings { + pings?: YouTube.Schema.ChannelConversionPing[]; + } + export interface ChannelListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Channel[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface ChannelLocalization { + description?: string; + title?: string; + } + export interface ChannelProfileDetails { + channelId?: string; + channelUrl?: string; + displayName?: string; + profileImageUrl?: string; + } + export interface ChannelSection { + contentDetails?: YouTube.Schema.ChannelSectionContentDetails; + etag?: string; + id?: string; + kind?: string; + localizations?: object; + snippet?: YouTube.Schema.ChannelSectionSnippet; + targeting?: YouTube.Schema.ChannelSectionTargeting; + } + export interface ChannelSectionContentDetails { + channels?: string[]; + playlists?: string[]; + } + export interface ChannelSectionListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.ChannelSection[]; + kind?: string; + visitorId?: string; + } + export interface ChannelSectionLocalization { + title?: string; + } + export interface ChannelSectionSnippet { + channelId?: string; + defaultLanguage?: string; + localized?: YouTube.Schema.ChannelSectionLocalization; + position?: number; + style?: string; + title?: string; + type?: string; + } + export interface ChannelSectionTargeting { + countries?: string[]; + languages?: string[]; + regions?: string[]; + } + export interface ChannelSettings { + country?: string; + defaultLanguage?: string; + defaultTab?: string; + description?: string; + featuredChannelsTitle?: string; + featuredChannelsUrls?: string[]; + keywords?: string; + moderateComments?: boolean; + profileColor?: string; + showBrowseView?: boolean; + showRelatedChannels?: boolean; + title?: string; + trackingAnalyticsAccountId?: string; + unsubscribedTrailer?: string; + } + export interface ChannelSnippet { + country?: string; + customUrl?: string; + defaultLanguage?: string; + description?: string; + localized?: YouTube.Schema.ChannelLocalization; + publishedAt?: string; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface ChannelStatistics { + commentCount?: string; + hiddenSubscriberCount?: boolean; + subscriberCount?: string; + videoCount?: string; + viewCount?: string; + } + export interface ChannelStatus { + isLinked?: boolean; + longUploadsStatus?: string; + privacyStatus?: string; + } + export interface ChannelTopicDetails { + topicCategories?: string[]; + topicIds?: string[]; + } + export interface Comment { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.CommentSnippet; + } + export interface CommentListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Comment[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface CommentSnippet { + authorChannelId?: object; + authorChannelUrl?: string; + authorDisplayName?: string; + authorProfileImageUrl?: string; + canRate?: boolean; + channelId?: string; + likeCount?: number; + moderationStatus?: string; + parentId?: string; + publishedAt?: string; + textDisplay?: string; + textOriginal?: string; + updatedAt?: string; + videoId?: string; + viewerRating?: string; + } + export interface CommentThread { + etag?: string; + id?: string; + kind?: string; + replies?: YouTube.Schema.CommentThreadReplies; + snippet?: YouTube.Schema.CommentThreadSnippet; + } + export interface CommentThreadListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.CommentThread[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface CommentThreadReplies { + comments?: YouTube.Schema.Comment[]; + } + export interface CommentThreadSnippet { + canReply?: boolean; + channelId?: string; + isPublic?: boolean; + topLevelComment?: YouTube.Schema.Comment; + totalReplyCount?: number; + videoId?: string; + } + export interface ContentRating { + acbRating?: string; + agcomRating?: string; + anatelRating?: string; + bbfcRating?: string; + bfvcRating?: string; + bmukkRating?: string; + catvRating?: string; + catvfrRating?: string; + cbfcRating?: string; + cccRating?: string; + cceRating?: string; + chfilmRating?: string; + chvrsRating?: string; + cicfRating?: string; + cnaRating?: string; + cncRating?: string; + csaRating?: string; + cscfRating?: string; + czfilmRating?: string; + djctqRating?: string; + djctqRatingReasons?: string[]; + ecbmctRating?: string; + eefilmRating?: string; + egfilmRating?: string; + eirinRating?: string; + fcbmRating?: string; + fcoRating?: string; + fmocRating?: string; + fpbRating?: string; + fpbRatingReasons?: string[]; + fskRating?: string; + grfilmRating?: string; + icaaRating?: string; + ifcoRating?: string; + ilfilmRating?: string; + incaaRating?: string; + kfcbRating?: string; + kijkwijzerRating?: string; + kmrbRating?: string; + lsfRating?: string; + mccaaRating?: string; + mccypRating?: string; + mcstRating?: string; + mdaRating?: string; + medietilsynetRating?: string; + mekuRating?: string; + menaMpaaRating?: string; + mibacRating?: string; + mocRating?: string; + moctwRating?: string; + mpaaRating?: string; + mpaatRating?: string; + mtrcbRating?: string; + nbcRating?: string; + nbcplRating?: string; + nfrcRating?: string; + nfvcbRating?: string; + nkclvRating?: string; + oflcRating?: string; + pefilmRating?: string; + rcnofRating?: string; + resorteviolenciaRating?: string; + rtcRating?: string; + rteRating?: string; + russiaRating?: string; + skfilmRating?: string; + smaisRating?: string; + smsaRating?: string; + tvpgRating?: string; + ytRating?: string; + } + export interface GeoPoint { + altitude?: Number; + latitude?: Number; + longitude?: Number; + } + export interface GuideCategory { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.GuideCategorySnippet; + } + export interface GuideCategoryListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.GuideCategory[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface GuideCategorySnippet { + channelId?: string; + title?: string; + } + export interface I18nLanguage { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.I18nLanguageSnippet; + } + export interface I18nLanguageListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.I18nLanguage[]; + kind?: string; + visitorId?: string; + } + export interface I18nLanguageSnippet { + hl?: string; + name?: string; + } + export interface I18nRegion { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.I18nRegionSnippet; + } + export interface I18nRegionListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.I18nRegion[]; + kind?: string; + visitorId?: string; + } + export interface I18nRegionSnippet { + gl?: string; + name?: string; + } + export interface ImageSettings { + backgroundImageUrl?: YouTube.Schema.LocalizedProperty; + bannerExternalUrl?: string; + bannerImageUrl?: string; + bannerMobileExtraHdImageUrl?: string; + bannerMobileHdImageUrl?: string; + bannerMobileImageUrl?: string; + bannerMobileLowImageUrl?: string; + bannerMobileMediumHdImageUrl?: string; + bannerTabletExtraHdImageUrl?: string; + bannerTabletHdImageUrl?: string; + bannerTabletImageUrl?: string; + bannerTabletLowImageUrl?: string; + bannerTvHighImageUrl?: string; + bannerTvImageUrl?: string; + bannerTvLowImageUrl?: string; + bannerTvMediumImageUrl?: string; + largeBrandedBannerImageImapScript?: YouTube.Schema.LocalizedProperty; + largeBrandedBannerImageUrl?: YouTube.Schema.LocalizedProperty; + smallBrandedBannerImageImapScript?: YouTube.Schema.LocalizedProperty; + smallBrandedBannerImageUrl?: YouTube.Schema.LocalizedProperty; + trackingImageUrl?: string; + watchIconImageUrl?: string; + } + export interface IngestionInfo { + backupIngestionAddress?: string; + ingestionAddress?: string; + streamName?: string; + } + export interface InvideoBranding { + imageBytes?: string; + imageUrl?: string; + position?: YouTube.Schema.InvideoPosition; + targetChannelId?: string; + timing?: YouTube.Schema.InvideoTiming; + } + export interface InvideoPosition { + cornerPosition?: string; + type?: string; + } + export interface InvideoPromotion { + defaultTiming?: YouTube.Schema.InvideoTiming; + items?: YouTube.Schema.PromotedItem[]; + position?: YouTube.Schema.InvideoPosition; + useSmartTiming?: boolean; + } + export interface InvideoTiming { + durationMs?: string; + offsetMs?: string; + type?: string; + } + export interface LanguageTag { + value?: string; + } + export interface LiveBroadcast { + contentDetails?: YouTube.Schema.LiveBroadcastContentDetails; + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.LiveBroadcastSnippet; + statistics?: YouTube.Schema.LiveBroadcastStatistics; + status?: YouTube.Schema.LiveBroadcastStatus; + } + export interface LiveBroadcastContentDetails { + boundStreamId?: string; + boundStreamLastUpdateTimeMs?: string; + closedCaptionsType?: string; + enableAutoStart?: boolean; + enableClosedCaptions?: boolean; + enableContentEncryption?: boolean; + enableDvr?: boolean; + enableEmbed?: boolean; + enableLowLatency?: boolean; + latencyPreference?: string; + mesh?: string; + monitorStream?: YouTube.Schema.MonitorStreamInfo; + projection?: string; + recordFromStart?: boolean; + startWithSlate?: boolean; + stereoLayout?: string; + } + export interface LiveBroadcastListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.LiveBroadcast[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface LiveBroadcastSnippet { + actualEndTime?: string; + actualStartTime?: string; + channelId?: string; + description?: string; + isDefaultBroadcast?: boolean; + liveChatId?: string; + publishedAt?: string; + scheduledEndTime?: string; + scheduledStartTime?: string; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface LiveBroadcastStatistics { + concurrentViewers?: string; + totalChatCount?: string; + } + export interface LiveBroadcastStatus { + lifeCycleStatus?: string; + liveBroadcastPriority?: string; + privacyStatus?: string; + recordingStatus?: string; + } + export interface LiveChatBan { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.LiveChatBanSnippet; + } + export interface LiveChatBanSnippet { + banDurationSeconds?: string; + bannedUserDetails?: YouTube.Schema.ChannelProfileDetails; + liveChatId?: string; + type?: string; + } + export interface LiveChatFanFundingEventDetails { + amountDisplayString?: string; + amountMicros?: string; + currency?: string; + userComment?: string; + } + export interface LiveChatMessage { + authorDetails?: YouTube.Schema.LiveChatMessageAuthorDetails; + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.LiveChatMessageSnippet; + } + export interface LiveChatMessageAuthorDetails { + channelId?: string; + channelUrl?: string; + displayName?: string; + isChatModerator?: boolean; + isChatOwner?: boolean; + isChatSponsor?: boolean; + isVerified?: boolean; + profileImageUrl?: string; + } + export interface LiveChatMessageDeletedDetails { + deletedMessageId?: string; + } + export interface LiveChatMessageListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.LiveChatMessage[]; + kind?: string; + nextPageToken?: string; + offlineAt?: string; + pageInfo?: YouTube.Schema.PageInfo; + pollingIntervalMillis?: number; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface LiveChatMessageRetractedDetails { + retractedMessageId?: string; + } + export interface LiveChatMessageSnippet { + authorChannelId?: string; + displayMessage?: string; + fanFundingEventDetails?: YouTube.Schema.LiveChatFanFundingEventDetails; + hasDisplayContent?: boolean; + liveChatId?: string; + messageDeletedDetails?: YouTube.Schema.LiveChatMessageDeletedDetails; + messageRetractedDetails?: YouTube.Schema.LiveChatMessageRetractedDetails; + pollClosedDetails?: YouTube.Schema.LiveChatPollClosedDetails; + pollEditedDetails?: YouTube.Schema.LiveChatPollEditedDetails; + pollOpenedDetails?: YouTube.Schema.LiveChatPollOpenedDetails; + pollVotedDetails?: YouTube.Schema.LiveChatPollVotedDetails; + publishedAt?: string; + superChatDetails?: YouTube.Schema.LiveChatSuperChatDetails; + superStickerDetails?: YouTube.Schema.LiveChatSuperStickerDetails; + textMessageDetails?: YouTube.Schema.LiveChatTextMessageDetails; + type?: string; + userBannedDetails?: YouTube.Schema.LiveChatUserBannedMessageDetails; + } + export interface LiveChatModerator { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.LiveChatModeratorSnippet; + } + export interface LiveChatModeratorListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.LiveChatModerator[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface LiveChatModeratorSnippet { + liveChatId?: string; + moderatorDetails?: YouTube.Schema.ChannelProfileDetails; + } + export interface LiveChatPollClosedDetails { + pollId?: string; + } + export interface LiveChatPollEditedDetails { + id?: string; + items?: YouTube.Schema.LiveChatPollItem[]; + prompt?: string; + } + export interface LiveChatPollItem { + description?: string; + itemId?: string; + } + export interface LiveChatPollOpenedDetails { + id?: string; + items?: YouTube.Schema.LiveChatPollItem[]; + prompt?: string; + } + export interface LiveChatPollVotedDetails { + itemId?: string; + pollId?: string; + } + export interface LiveChatSuperChatDetails { + amountDisplayString?: string; + amountMicros?: string; + currency?: string; + tier?: number; + userComment?: string; + } + export interface LiveChatSuperStickerDetails { + amountDisplayString?: string; + amountMicros?: string; + currency?: string; + superStickerMetadata?: YouTube.Schema.SuperStickerMetadata; + tier?: number; + } + export interface LiveChatTextMessageDetails { + messageText?: string; + } + export interface LiveChatUserBannedMessageDetails { + banDurationSeconds?: string; + banType?: string; + bannedUserDetails?: YouTube.Schema.ChannelProfileDetails; + } + export interface LiveStream { + cdn?: YouTube.Schema.CdnSettings; + contentDetails?: YouTube.Schema.LiveStreamContentDetails; + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.LiveStreamSnippet; + status?: YouTube.Schema.LiveStreamStatus; + } + export interface LiveStreamConfigurationIssue { + description?: string; + reason?: string; + severity?: string; + type?: string; + } + export interface LiveStreamContentDetails { + closedCaptionsIngestionUrl?: string; + isReusable?: boolean; + } + export interface LiveStreamHealthStatus { + configurationIssues?: YouTube.Schema.LiveStreamConfigurationIssue[]; + lastUpdateTimeSeconds?: string; + status?: string; + } + export interface LiveStreamListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.LiveStream[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface LiveStreamSnippet { + channelId?: string; + description?: string; + isDefaultStream?: boolean; + publishedAt?: string; + title?: string; + } + export interface LiveStreamStatus { + healthStatus?: YouTube.Schema.LiveStreamHealthStatus; + streamStatus?: string; + } + export interface LocalizedProperty { + default?: string; + defaultLanguage?: YouTube.Schema.LanguageTag; + localized?: YouTube.Schema.LocalizedString[]; + } + export interface LocalizedString { + language?: string; + value?: string; + } + export interface MonitorStreamInfo { + broadcastStreamDelayMs?: number; + embedHtml?: string; + enableMonitorStream?: boolean; + } + export interface Nonprofit { + nonprofitId?: YouTube.Schema.NonprofitId; + nonprofitLegalName?: string; + } + export interface NonprofitId { + value?: string; + } + export interface PageInfo { + resultsPerPage?: number; + totalResults?: number; + } + export interface Playlist { + contentDetails?: YouTube.Schema.PlaylistContentDetails; + etag?: string; + id?: string; + kind?: string; + localizations?: object; + player?: YouTube.Schema.PlaylistPlayer; + snippet?: YouTube.Schema.PlaylistSnippet; + status?: YouTube.Schema.PlaylistStatus; + } + export interface PlaylistContentDetails { + itemCount?: number; + } + export interface PlaylistItem { + contentDetails?: YouTube.Schema.PlaylistItemContentDetails; + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.PlaylistItemSnippet; + status?: YouTube.Schema.PlaylistItemStatus; + } + export interface PlaylistItemContentDetails { + endAt?: string; + note?: string; + startAt?: string; + videoId?: string; + videoPublishedAt?: string; + } + export interface PlaylistItemListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.PlaylistItem[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface PlaylistItemSnippet { + channelId?: string; + channelTitle?: string; + description?: string; + playlistId?: string; + position?: number; + publishedAt?: string; + resourceId?: YouTube.Schema.ResourceId; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface PlaylistItemStatus { + privacyStatus?: string; + } + export interface PlaylistListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Playlist[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface PlaylistLocalization { + description?: string; + title?: string; + } + export interface PlaylistPlayer { + embedHtml?: string; + } + export interface PlaylistSnippet { + channelId?: string; + channelTitle?: string; + defaultLanguage?: string; + description?: string; + localized?: YouTube.Schema.PlaylistLocalization; + publishedAt?: string; + tags?: string[]; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface PlaylistStatus { + privacyStatus?: string; + } + export interface PromotedItem { + customMessage?: string; + id?: YouTube.Schema.PromotedItemId; + promotedByContentOwner?: boolean; + timing?: YouTube.Schema.InvideoTiming; + } + export interface PromotedItemId { + recentlyUploadedBy?: string; + type?: string; + videoId?: string; + websiteUrl?: string; + } + export interface PropertyValue { + property?: string; + value?: string; + } + export interface ResourceId { + channelId?: string; + kind?: string; + playlistId?: string; + videoId?: string; + } + export interface SearchListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.SearchResult[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + regionCode?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface SearchResult { + etag?: string; + id?: YouTube.Schema.ResourceId; + kind?: string; + snippet?: YouTube.Schema.SearchResultSnippet; + } + export interface SearchResultSnippet { + channelId?: string; + channelTitle?: string; + description?: string; + liveBroadcastContent?: string; + publishedAt?: string; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface Sponsor { + etag?: string; + kind?: string; + snippet?: YouTube.Schema.SponsorSnippet; + } + export interface SponsorListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Sponsor[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface SponsorSnippet { + channelId?: string; + cumulativeDurationMonths?: number; + sponsorDetails?: YouTube.Schema.ChannelProfileDetails; + sponsorSince?: string; + } + export interface Subscription { + contentDetails?: YouTube.Schema.SubscriptionContentDetails; + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.SubscriptionSnippet; + subscriberSnippet?: YouTube.Schema.SubscriptionSubscriberSnippet; + } + export interface SubscriptionContentDetails { + activityType?: string; + newItemCount?: number; + totalItemCount?: number; + } + export interface SubscriptionListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Subscription[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface SubscriptionSnippet { + channelId?: string; + channelTitle?: string; + description?: string; + publishedAt?: string; + resourceId?: YouTube.Schema.ResourceId; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface SubscriptionSubscriberSnippet { + channelId?: string; + description?: string; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface SuperChatEvent { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.SuperChatEventSnippet; + } + export interface SuperChatEventListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.SuperChatEvent[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface SuperChatEventSnippet { + amountMicros?: string; + channelId?: string; + commentText?: string; + createdAt?: string; + currency?: string; + displayString?: string; + isSuperChatForGood?: boolean; + isSuperStickerEvent?: boolean; + messageType?: number; + nonprofit?: YouTube.Schema.Nonprofit; + superStickerMetadata?: YouTube.Schema.SuperStickerMetadata; + supporterDetails?: YouTube.Schema.ChannelProfileDetails; + } + export interface SuperStickerMetadata { + altText?: string; + altTextLanguage?: string; + stickerId?: string; + } + export interface Thumbnail { + height?: number; + url?: string; + width?: number; + } + export interface ThumbnailDetails { + default?: YouTube.Schema.Thumbnail; + high?: YouTube.Schema.Thumbnail; + maxres?: YouTube.Schema.Thumbnail; + medium?: YouTube.Schema.Thumbnail; + standard?: YouTube.Schema.Thumbnail; + } + export interface ThumbnailSetResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.ThumbnailDetails[]; + kind?: string; + visitorId?: string; + } + export interface Video { + ageGating?: YouTube.Schema.VideoAgeGating; + contentDetails?: YouTube.Schema.VideoContentDetails; + etag?: string; + fileDetails?: YouTube.Schema.VideoFileDetails; + id?: string; + kind?: string; + liveStreamingDetails?: YouTube.Schema.VideoLiveStreamingDetails; + localizations?: object; + monetizationDetails?: YouTube.Schema.VideoMonetizationDetails; + player?: YouTube.Schema.VideoPlayer; + processingDetails?: YouTube.Schema.VideoProcessingDetails; + projectDetails?: YouTube.Schema.VideoProjectDetails; + recordingDetails?: YouTube.Schema.VideoRecordingDetails; + snippet?: YouTube.Schema.VideoSnippet; + statistics?: YouTube.Schema.VideoStatistics; + status?: YouTube.Schema.VideoStatus; + suggestions?: YouTube.Schema.VideoSuggestions; + topicDetails?: YouTube.Schema.VideoTopicDetails; + } + export interface VideoAbuseReport { + comments?: string; + language?: string; + reasonId?: string; + secondaryReasonId?: string; + videoId?: string; + } + export interface VideoAbuseReportReason { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.VideoAbuseReportReasonSnippet; + } + export interface VideoAbuseReportReasonListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.VideoAbuseReportReason[]; + kind?: string; + visitorId?: string; + } + export interface VideoAbuseReportReasonSnippet { + label?: string; + secondaryReasons?: YouTube.Schema.VideoAbuseReportSecondaryReason[]; + } + export interface VideoAbuseReportSecondaryReason { + id?: string; + label?: string; + } + export interface VideoAgeGating { + alcoholContent?: boolean; + restricted?: boolean; + videoGameRating?: string; + } + export interface VideoCategory { + etag?: string; + id?: string; + kind?: string; + snippet?: YouTube.Schema.VideoCategorySnippet; + } + export interface VideoCategoryListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.VideoCategory[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface VideoCategorySnippet { + assignable?: boolean; + channelId?: string; + title?: string; + } + export interface VideoContentDetails { + caption?: string; + contentRating?: YouTube.Schema.ContentRating; + countryRestriction?: YouTube.Schema.AccessPolicy; + definition?: string; + dimension?: string; + duration?: string; + hasCustomThumbnail?: boolean; + licensedContent?: boolean; + projection?: string; + regionRestriction?: YouTube.Schema.VideoContentDetailsRegionRestriction; + } + export interface VideoContentDetailsRegionRestriction { + allowed?: string[]; + blocked?: string[]; + } + export interface VideoFileDetails { + audioStreams?: YouTube.Schema.VideoFileDetailsAudioStream[]; + bitrateBps?: string; + container?: string; + creationTime?: string; + durationMs?: string; + fileName?: string; + fileSize?: string; + fileType?: string; + videoStreams?: YouTube.Schema.VideoFileDetailsVideoStream[]; + } + export interface VideoFileDetailsAudioStream { + bitrateBps?: string; + channelCount?: number; + codec?: string; + vendor?: string; + } + export interface VideoFileDetailsVideoStream { + aspectRatio?: Number; + bitrateBps?: string; + codec?: string; + frameRateFps?: Number; + heightPixels?: number; + rotation?: string; + vendor?: string; + widthPixels?: number; + } + export interface VideoGetRatingResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.VideoRating[]; + kind?: string; + visitorId?: string; + } + export interface VideoListResponse { + etag?: string; + eventId?: string; + items?: YouTube.Schema.Video[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YouTube.Schema.PageInfo; + prevPageToken?: string; + tokenPagination?: any; // Schema.TokenPagination + visitorId?: string; + } + export interface VideoLiveStreamingDetails { + activeLiveChatId?: string; + actualEndTime?: string; + actualStartTime?: string; + concurrentViewers?: string; + scheduledEndTime?: string; + scheduledStartTime?: string; + } + export interface VideoLocalization { + description?: string; + title?: string; + } + export interface VideoMonetizationDetails { + access?: YouTube.Schema.AccessPolicy; + } + export interface VideoPlayer { + embedHeight?: string; + embedHtml?: string; + embedWidth?: string; + } + export interface VideoProcessingDetails { + editorSuggestionsAvailability?: string; + fileDetailsAvailability?: string; + processingFailureReason?: string; + processingIssuesAvailability?: string; + processingProgress?: YouTube.Schema.VideoProcessingDetailsProcessingProgress; + processingStatus?: string; + tagSuggestionsAvailability?: string; + thumbnailsAvailability?: string; + } + export interface VideoProcessingDetailsProcessingProgress { + partsProcessed?: string; + partsTotal?: string; + timeLeftMs?: string; + } + export interface VideoProjectDetails { + tags?: string[]; + } + export interface VideoRating { + rating?: string; + videoId?: string; + } + export interface VideoRecordingDetails { + location?: YouTube.Schema.GeoPoint; + locationDescription?: string; + recordingDate?: string; + } + export interface VideoSnippet { + categoryId?: string; + channelId?: string; + channelTitle?: string; + defaultAudioLanguage?: string; + defaultLanguage?: string; + description?: string; + liveBroadcastContent?: string; + localized?: YouTube.Schema.VideoLocalization; + publishedAt?: string; + tags?: string[]; + thumbnails?: YouTube.Schema.ThumbnailDetails; + title?: string; + } + export interface VideoStatistics { + commentCount?: string; + dislikeCount?: string; + favoriteCount?: string; + likeCount?: string; + viewCount?: string; + } + export interface VideoStatus { + embeddable?: boolean; + failureReason?: string; + license?: string; + privacyStatus?: string; + publicStatsViewable?: boolean; + publishAt?: string; + rejectionReason?: string; + uploadStatus?: string; + } + export interface VideoSuggestions { + editorSuggestions?: string[]; + processingErrors?: string[]; + processingHints?: string[]; + processingWarnings?: string[]; + tagSuggestions?: YouTube.Schema.VideoSuggestionsTagSuggestion[]; + } + export interface VideoSuggestionsTagSuggestion { + categoryRestricts?: string[]; + tag?: string; + } + export interface VideoTopicDetails { + relevantTopicIds?: string[]; + topicCategories?: string[]; + topicIds?: string[]; + } + export interface WatchSettings { + backgroundColor?: string; + featuredPlaylistId?: string; + textColor?: string; + } + } + } + export interface YouTube { + Activities?: YouTube.Collection.ActivitiesCollection; + Captions?: YouTube.Collection.CaptionsCollection; + ChannelBanners?: YouTube.Collection.ChannelBannersCollection; + ChannelSections?: YouTube.Collection.ChannelSectionsCollection; + Channels?: YouTube.Collection.ChannelsCollection; + CommentThreads?: YouTube.Collection.CommentThreadsCollection; + Comments?: YouTube.Collection.CommentsCollection; + GuideCategories?: YouTube.Collection.GuideCategoriesCollection; + I18nLanguages?: YouTube.Collection.I18nLanguagesCollection; + I18nRegions?: YouTube.Collection.I18nRegionsCollection; + LiveBroadcasts?: YouTube.Collection.LiveBroadcastsCollection; + LiveChatBans?: YouTube.Collection.LiveChatBansCollection; + LiveChatMessages?: YouTube.Collection.LiveChatMessagesCollection; + LiveChatModerators?: YouTube.Collection.LiveChatModeratorsCollection; + LiveStreams?: YouTube.Collection.LiveStreamsCollection; + PlaylistItems?: YouTube.Collection.PlaylistItemsCollection; + Playlists?: YouTube.Collection.PlaylistsCollection; + Search?: YouTube.Collection.SearchCollection; + Sponsors?: YouTube.Collection.SponsorsCollection; + Subscriptions?: YouTube.Collection.SubscriptionsCollection; + SuperChatEvents?: YouTube.Collection.SuperChatEventsCollection; + Thumbnails?: YouTube.Collection.ThumbnailsCollection; + VideoAbuseReportReasons?: YouTube.Collection.VideoAbuseReportReasonsCollection; + VideoCategories?: YouTube.Collection.VideoCategoriesCollection; + Videos?: YouTube.Collection.VideosCollection; + Watermarks?: YouTube.Collection.WatermarksCollection; + // Create a new instance of AccessPolicy + newAccessPolicy(): YouTube.Schema.AccessPolicy; + // Create a new instance of Activity + newActivity(): YouTube.Schema.Activity; + // Create a new instance of ActivityContentDetails + newActivityContentDetails(): YouTube.Schema.ActivityContentDetails; + // Create a new instance of ActivityContentDetailsBulletin + newActivityContentDetailsBulletin(): YouTube.Schema.ActivityContentDetailsBulletin; + // Create a new instance of ActivityContentDetailsChannelItem + newActivityContentDetailsChannelItem(): YouTube.Schema.ActivityContentDetailsChannelItem; + // Create a new instance of ActivityContentDetailsComment + newActivityContentDetailsComment(): YouTube.Schema.ActivityContentDetailsComment; + // Create a new instance of ActivityContentDetailsFavorite + newActivityContentDetailsFavorite(): YouTube.Schema.ActivityContentDetailsFavorite; + // Create a new instance of ActivityContentDetailsLike + newActivityContentDetailsLike(): YouTube.Schema.ActivityContentDetailsLike; + // Create a new instance of ActivityContentDetailsPlaylistItem + newActivityContentDetailsPlaylistItem(): YouTube.Schema.ActivityContentDetailsPlaylistItem; + // Create a new instance of ActivityContentDetailsPromotedItem + newActivityContentDetailsPromotedItem(): YouTube.Schema.ActivityContentDetailsPromotedItem; + // Create a new instance of ActivityContentDetailsRecommendation + newActivityContentDetailsRecommendation(): YouTube.Schema.ActivityContentDetailsRecommendation; + // Create a new instance of ActivityContentDetailsSocial + newActivityContentDetailsSocial(): YouTube.Schema.ActivityContentDetailsSocial; + // Create a new instance of ActivityContentDetailsSubscription + newActivityContentDetailsSubscription(): YouTube.Schema.ActivityContentDetailsSubscription; + // Create a new instance of ActivityContentDetailsUpload + newActivityContentDetailsUpload(): YouTube.Schema.ActivityContentDetailsUpload; + // Create a new instance of ActivitySnippet + newActivitySnippet(): YouTube.Schema.ActivitySnippet; + // Create a new instance of Caption + newCaption(): YouTube.Schema.Caption; + // Create a new instance of CaptionSnippet + newCaptionSnippet(): YouTube.Schema.CaptionSnippet; + // Create a new instance of CdnSettings + newCdnSettings(): YouTube.Schema.CdnSettings; + // Create a new instance of Channel + newChannel(): YouTube.Schema.Channel; + // Create a new instance of ChannelAuditDetails + newChannelAuditDetails(): YouTube.Schema.ChannelAuditDetails; + // Create a new instance of ChannelBannerResource + newChannelBannerResource(): YouTube.Schema.ChannelBannerResource; + // Create a new instance of ChannelBrandingSettings + newChannelBrandingSettings(): YouTube.Schema.ChannelBrandingSettings; + // Create a new instance of ChannelContentDetails + newChannelContentDetails(): YouTube.Schema.ChannelContentDetails; + // Create a new instance of ChannelContentDetailsRelatedPlaylists + newChannelContentDetailsRelatedPlaylists(): YouTube.Schema.ChannelContentDetailsRelatedPlaylists; + // Create a new instance of ChannelContentOwnerDetails + newChannelContentOwnerDetails(): YouTube.Schema.ChannelContentOwnerDetails; + // Create a new instance of ChannelConversionPing + newChannelConversionPing(): YouTube.Schema.ChannelConversionPing; + // Create a new instance of ChannelConversionPings + newChannelConversionPings(): YouTube.Schema.ChannelConversionPings; + // Create a new instance of ChannelLocalization + newChannelLocalization(): YouTube.Schema.ChannelLocalization; + // Create a new instance of ChannelProfileDetails + newChannelProfileDetails(): YouTube.Schema.ChannelProfileDetails; + // Create a new instance of ChannelSection + newChannelSection(): YouTube.Schema.ChannelSection; + // Create a new instance of ChannelSectionContentDetails + newChannelSectionContentDetails(): YouTube.Schema.ChannelSectionContentDetails; + // Create a new instance of ChannelSectionLocalization + newChannelSectionLocalization(): YouTube.Schema.ChannelSectionLocalization; + // Create a new instance of ChannelSectionSnippet + newChannelSectionSnippet(): YouTube.Schema.ChannelSectionSnippet; + // Create a new instance of ChannelSectionTargeting + newChannelSectionTargeting(): YouTube.Schema.ChannelSectionTargeting; + // Create a new instance of ChannelSettings + newChannelSettings(): YouTube.Schema.ChannelSettings; + // Create a new instance of ChannelSnippet + newChannelSnippet(): YouTube.Schema.ChannelSnippet; + // Create a new instance of ChannelStatistics + newChannelStatistics(): YouTube.Schema.ChannelStatistics; + // Create a new instance of ChannelStatus + newChannelStatus(): YouTube.Schema.ChannelStatus; + // Create a new instance of ChannelTopicDetails + newChannelTopicDetails(): YouTube.Schema.ChannelTopicDetails; + // Create a new instance of Comment + newComment(): YouTube.Schema.Comment; + // Create a new instance of CommentSnippet + newCommentSnippet(): YouTube.Schema.CommentSnippet; + // Create a new instance of CommentThread + newCommentThread(): YouTube.Schema.CommentThread; + // Create a new instance of CommentThreadReplies + newCommentThreadReplies(): YouTube.Schema.CommentThreadReplies; + // Create a new instance of CommentThreadSnippet + newCommentThreadSnippet(): YouTube.Schema.CommentThreadSnippet; + // Create a new instance of ContentRating + newContentRating(): YouTube.Schema.ContentRating; + // Create a new instance of GeoPoint + newGeoPoint(): YouTube.Schema.GeoPoint; + // Create a new instance of ImageSettings + newImageSettings(): YouTube.Schema.ImageSettings; + // Create a new instance of IngestionInfo + newIngestionInfo(): YouTube.Schema.IngestionInfo; + // Create a new instance of InvideoBranding + newInvideoBranding(): YouTube.Schema.InvideoBranding; + // Create a new instance of InvideoPosition + newInvideoPosition(): YouTube.Schema.InvideoPosition; + // Create a new instance of InvideoPromotion + newInvideoPromotion(): YouTube.Schema.InvideoPromotion; + // Create a new instance of InvideoTiming + newInvideoTiming(): YouTube.Schema.InvideoTiming; + // Create a new instance of LanguageTag + newLanguageTag(): YouTube.Schema.LanguageTag; + // Create a new instance of LiveBroadcast + newLiveBroadcast(): YouTube.Schema.LiveBroadcast; + // Create a new instance of LiveBroadcastContentDetails + newLiveBroadcastContentDetails(): YouTube.Schema.LiveBroadcastContentDetails; + // Create a new instance of LiveBroadcastSnippet + newLiveBroadcastSnippet(): YouTube.Schema.LiveBroadcastSnippet; + // Create a new instance of LiveBroadcastStatistics + newLiveBroadcastStatistics(): YouTube.Schema.LiveBroadcastStatistics; + // Create a new instance of LiveBroadcastStatus + newLiveBroadcastStatus(): YouTube.Schema.LiveBroadcastStatus; + // Create a new instance of LiveChatBan + newLiveChatBan(): YouTube.Schema.LiveChatBan; + // Create a new instance of LiveChatBanSnippet + newLiveChatBanSnippet(): YouTube.Schema.LiveChatBanSnippet; + // Create a new instance of LiveChatFanFundingEventDetails + newLiveChatFanFundingEventDetails(): YouTube.Schema.LiveChatFanFundingEventDetails; + // Create a new instance of LiveChatMessage + newLiveChatMessage(): YouTube.Schema.LiveChatMessage; + // Create a new instance of LiveChatMessageAuthorDetails + newLiveChatMessageAuthorDetails(): YouTube.Schema.LiveChatMessageAuthorDetails; + // Create a new instance of LiveChatMessageDeletedDetails + newLiveChatMessageDeletedDetails(): YouTube.Schema.LiveChatMessageDeletedDetails; + // Create a new instance of LiveChatMessageRetractedDetails + newLiveChatMessageRetractedDetails(): YouTube.Schema.LiveChatMessageRetractedDetails; + // Create a new instance of LiveChatMessageSnippet + newLiveChatMessageSnippet(): YouTube.Schema.LiveChatMessageSnippet; + // Create a new instance of LiveChatModerator + newLiveChatModerator(): YouTube.Schema.LiveChatModerator; + // Create a new instance of LiveChatModeratorSnippet + newLiveChatModeratorSnippet(): YouTube.Schema.LiveChatModeratorSnippet; + // Create a new instance of LiveChatPollClosedDetails + newLiveChatPollClosedDetails(): YouTube.Schema.LiveChatPollClosedDetails; + // Create a new instance of LiveChatPollEditedDetails + newLiveChatPollEditedDetails(): YouTube.Schema.LiveChatPollEditedDetails; + // Create a new instance of LiveChatPollItem + newLiveChatPollItem(): YouTube.Schema.LiveChatPollItem; + // Create a new instance of LiveChatPollOpenedDetails + newLiveChatPollOpenedDetails(): YouTube.Schema.LiveChatPollOpenedDetails; + // Create a new instance of LiveChatPollVotedDetails + newLiveChatPollVotedDetails(): YouTube.Schema.LiveChatPollVotedDetails; + // Create a new instance of LiveChatSuperChatDetails + newLiveChatSuperChatDetails(): YouTube.Schema.LiveChatSuperChatDetails; + // Create a new instance of LiveChatSuperStickerDetails + newLiveChatSuperStickerDetails(): YouTube.Schema.LiveChatSuperStickerDetails; + // Create a new instance of LiveChatTextMessageDetails + newLiveChatTextMessageDetails(): YouTube.Schema.LiveChatTextMessageDetails; + // Create a new instance of LiveChatUserBannedMessageDetails + newLiveChatUserBannedMessageDetails(): YouTube.Schema.LiveChatUserBannedMessageDetails; + // Create a new instance of LiveStream + newLiveStream(): YouTube.Schema.LiveStream; + // Create a new instance of LiveStreamConfigurationIssue + newLiveStreamConfigurationIssue(): YouTube.Schema.LiveStreamConfigurationIssue; + // Create a new instance of LiveStreamContentDetails + newLiveStreamContentDetails(): YouTube.Schema.LiveStreamContentDetails; + // Create a new instance of LiveStreamHealthStatus + newLiveStreamHealthStatus(): YouTube.Schema.LiveStreamHealthStatus; + // Create a new instance of LiveStreamSnippet + newLiveStreamSnippet(): YouTube.Schema.LiveStreamSnippet; + // Create a new instance of LiveStreamStatus + newLiveStreamStatus(): YouTube.Schema.LiveStreamStatus; + // Create a new instance of LocalizedProperty + newLocalizedProperty(): YouTube.Schema.LocalizedProperty; + // Create a new instance of LocalizedString + newLocalizedString(): YouTube.Schema.LocalizedString; + // Create a new instance of MonitorStreamInfo + newMonitorStreamInfo(): YouTube.Schema.MonitorStreamInfo; + // Create a new instance of Playlist + newPlaylist(): YouTube.Schema.Playlist; + // Create a new instance of PlaylistContentDetails + newPlaylistContentDetails(): YouTube.Schema.PlaylistContentDetails; + // Create a new instance of PlaylistItem + newPlaylistItem(): YouTube.Schema.PlaylistItem; + // Create a new instance of PlaylistItemContentDetails + newPlaylistItemContentDetails(): YouTube.Schema.PlaylistItemContentDetails; + // Create a new instance of PlaylistItemSnippet + newPlaylistItemSnippet(): YouTube.Schema.PlaylistItemSnippet; + // Create a new instance of PlaylistItemStatus + newPlaylistItemStatus(): YouTube.Schema.PlaylistItemStatus; + // Create a new instance of PlaylistLocalization + newPlaylistLocalization(): YouTube.Schema.PlaylistLocalization; + // Create a new instance of PlaylistPlayer + newPlaylistPlayer(): YouTube.Schema.PlaylistPlayer; + // Create a new instance of PlaylistSnippet + newPlaylistSnippet(): YouTube.Schema.PlaylistSnippet; + // Create a new instance of PlaylistStatus + newPlaylistStatus(): YouTube.Schema.PlaylistStatus; + // Create a new instance of PromotedItem + newPromotedItem(): YouTube.Schema.PromotedItem; + // Create a new instance of PromotedItemId + newPromotedItemId(): YouTube.Schema.PromotedItemId; + // Create a new instance of PropertyValue + newPropertyValue(): YouTube.Schema.PropertyValue; + // Create a new instance of ResourceId + newResourceId(): YouTube.Schema.ResourceId; + // Create a new instance of Subscription + newSubscription(): YouTube.Schema.Subscription; + // Create a new instance of SubscriptionContentDetails + newSubscriptionContentDetails(): YouTube.Schema.SubscriptionContentDetails; + // Create a new instance of SubscriptionSnippet + newSubscriptionSnippet(): YouTube.Schema.SubscriptionSnippet; + // Create a new instance of SubscriptionSubscriberSnippet + newSubscriptionSubscriberSnippet(): YouTube.Schema.SubscriptionSubscriberSnippet; + // Create a new instance of SuperStickerMetadata + newSuperStickerMetadata(): YouTube.Schema.SuperStickerMetadata; + // Create a new instance of Thumbnail + newThumbnail(): YouTube.Schema.Thumbnail; + // Create a new instance of ThumbnailDetails + newThumbnailDetails(): YouTube.Schema.ThumbnailDetails; + // Create a new instance of Video + newVideo(): YouTube.Schema.Video; + // Create a new instance of VideoAbuseReport + newVideoAbuseReport(): YouTube.Schema.VideoAbuseReport; + // Create a new instance of VideoAgeGating + newVideoAgeGating(): YouTube.Schema.VideoAgeGating; + // Create a new instance of VideoContentDetails + newVideoContentDetails(): YouTube.Schema.VideoContentDetails; + // Create a new instance of VideoContentDetailsRegionRestriction + newVideoContentDetailsRegionRestriction(): YouTube.Schema.VideoContentDetailsRegionRestriction; + // Create a new instance of VideoFileDetails + newVideoFileDetails(): YouTube.Schema.VideoFileDetails; + // Create a new instance of VideoFileDetailsAudioStream + newVideoFileDetailsAudioStream(): YouTube.Schema.VideoFileDetailsAudioStream; + // Create a new instance of VideoFileDetailsVideoStream + newVideoFileDetailsVideoStream(): YouTube.Schema.VideoFileDetailsVideoStream; + // Create a new instance of VideoLiveStreamingDetails + newVideoLiveStreamingDetails(): YouTube.Schema.VideoLiveStreamingDetails; + // Create a new instance of VideoLocalization + newVideoLocalization(): YouTube.Schema.VideoLocalization; + // Create a new instance of VideoMonetizationDetails + newVideoMonetizationDetails(): YouTube.Schema.VideoMonetizationDetails; + // Create a new instance of VideoPlayer + newVideoPlayer(): YouTube.Schema.VideoPlayer; + // Create a new instance of VideoProcessingDetails + newVideoProcessingDetails(): YouTube.Schema.VideoProcessingDetails; + // Create a new instance of VideoProcessingDetailsProcessingProgress + newVideoProcessingDetailsProcessingProgress(): YouTube.Schema.VideoProcessingDetailsProcessingProgress; + // Create a new instance of VideoProjectDetails + newVideoProjectDetails(): YouTube.Schema.VideoProjectDetails; + // Create a new instance of VideoRecordingDetails + newVideoRecordingDetails(): YouTube.Schema.VideoRecordingDetails; + // Create a new instance of VideoSnippet + newVideoSnippet(): YouTube.Schema.VideoSnippet; + // Create a new instance of VideoStatistics + newVideoStatistics(): YouTube.Schema.VideoStatistics; + // Create a new instance of VideoStatus + newVideoStatus(): YouTube.Schema.VideoStatus; + // Create a new instance of VideoSuggestions + newVideoSuggestions(): YouTube.Schema.VideoSuggestions; + // Create a new instance of VideoSuggestionsTagSuggestion + newVideoSuggestionsTagSuggestion(): YouTube.Schema.VideoSuggestionsTagSuggestion; + // Create a new instance of VideoTopicDetails + newVideoTopicDetails(): YouTube.Schema.VideoTopicDetails; + // Create a new instance of WatchSettings + newWatchSettings(): YouTube.Schema.WatchSettings; + } +} + +declare var YouTube: GoogleAppsScript.YouTube; diff --git a/types/google-apps-script/apis/youtubeanalytics_v2.d.ts b/types/google-apps-script/apis/youtubeanalytics_v2.d.ts new file mode 100644 index 0000000000..4b3319a337 --- /dev/null +++ b/types/google-apps-script/apis/youtubeanalytics_v2.d.ts @@ -0,0 +1,146 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace YouTubeAnalytics { + namespace Collection { + export interface GroupItemsCollection { + // Creates a group item. + insert(resource: Schema.GroupItem): YouTubeAnalytics.Schema.GroupItem; + // Creates a group item. + insert(resource: Schema.GroupItem, optionalArgs: object): YouTubeAnalytics.Schema.GroupItem; + // Returns a collection of group items that match the API request parameters. + list(): YouTubeAnalytics.Schema.ListGroupItemsResponse; + // Returns a collection of group items that match the API request parameters. + list(optionalArgs: object): YouTubeAnalytics.Schema.ListGroupItemsResponse; + // Removes an item from a group. + remove(): YouTubeAnalytics.Schema.EmptyResponse; + // Removes an item from a group. + remove(optionalArgs: object): YouTubeAnalytics.Schema.EmptyResponse; + } + export interface GroupsCollection { + // Creates a group. + insert(resource: Schema.Group): YouTubeAnalytics.Schema.Group; + // Creates a group. + insert(resource: Schema.Group, optionalArgs: object): YouTubeAnalytics.Schema.Group; + // Returns a collection of groups that match the API request parameters. For + // example, you can retrieve all groups that the authenticated user owns, + // or you can retrieve one or more groups by their unique IDs. + list(): YouTubeAnalytics.Schema.ListGroupsResponse; + // Returns a collection of groups that match the API request parameters. For + // example, you can retrieve all groups that the authenticated user owns, + // or you can retrieve one or more groups by their unique IDs. + list(optionalArgs: object): YouTubeAnalytics.Schema.ListGroupsResponse; + // Deletes a group. + remove(): YouTubeAnalytics.Schema.EmptyResponse; + // Deletes a group. + remove(optionalArgs: object): YouTubeAnalytics.Schema.EmptyResponse; + // Modifies a group. For example, you could change a group's title. + update(resource: Schema.Group): YouTubeAnalytics.Schema.Group; + // Modifies a group. For example, you could change a group's title. + update(resource: Schema.Group, optionalArgs: object): YouTubeAnalytics.Schema.Group; + } + export interface ReportsCollection { + // Retrieve your YouTube Analytics reports. + query(): YouTubeAnalytics.Schema.QueryResponse; + // Retrieve your YouTube Analytics reports. + query(optionalArgs: object): YouTubeAnalytics.Schema.QueryResponse; + } + } + namespace Schema { + export interface EmptyResponse { + errors?: YouTubeAnalytics.Schema.Errors; + } + export interface ErrorProto { + argument?: string[]; + code?: string; + debugInfo?: string; + domain?: string; + externalErrorMessage?: string; + location?: string; + locationType?: string; + } + export interface Errors { + code?: string; + error?: YouTubeAnalytics.Schema.ErrorProto[]; + requestId?: string; + } + export interface Group { + contentDetails?: YouTubeAnalytics.Schema.GroupContentDetails; + errors?: YouTubeAnalytics.Schema.Errors; + etag?: string; + id?: string; + kind?: string; + snippet?: YouTubeAnalytics.Schema.GroupSnippet; + } + export interface GroupContentDetails { + itemCount?: string; + itemType?: string; + } + export interface GroupItem { + errors?: YouTubeAnalytics.Schema.Errors; + etag?: string; + groupId?: string; + id?: string; + kind?: string; + resource?: YouTubeAnalytics.Schema.GroupItemResource; + } + export interface GroupItemResource { + id?: string; + kind?: string; + } + export interface GroupSnippet { + publishedAt?: string; + title?: string; + } + export interface ListGroupItemsResponse { + errors?: YouTubeAnalytics.Schema.Errors; + etag?: string; + items?: YouTubeAnalytics.Schema.GroupItem[]; + kind?: string; + } + export interface ListGroupsResponse { + errors?: YouTubeAnalytics.Schema.Errors; + etag?: string; + items?: YouTubeAnalytics.Schema.Group[]; + kind?: string; + nextPageToken?: string; + } + export interface QueryResponse { + columnHeaders?: YouTubeAnalytics.Schema.ResultTableColumnHeader[]; + errors?: YouTubeAnalytics.Schema.Errors; + kind?: string; + rows?: Object[][]; + } + export interface ResultTableColumnHeader { + columnType?: string; + dataType?: string; + name?: string; + } + } + } + export interface YouTubeAnalytics { + GroupItems?: YouTubeAnalytics.Collection.GroupItemsCollection; + Groups?: YouTubeAnalytics.Collection.GroupsCollection; + Reports?: YouTubeAnalytics.Collection.ReportsCollection; + // Create a new instance of ErrorProto + newErrorProto(): YouTubeAnalytics.Schema.ErrorProto; + // Create a new instance of Errors + newErrors(): YouTubeAnalytics.Schema.Errors; + // Create a new instance of Group + newGroup(): YouTubeAnalytics.Schema.Group; + // Create a new instance of GroupContentDetails + newGroupContentDetails(): YouTubeAnalytics.Schema.GroupContentDetails; + // Create a new instance of GroupItem + newGroupItem(): YouTubeAnalytics.Schema.GroupItem; + // Create a new instance of GroupItemResource + newGroupItemResource(): YouTubeAnalytics.Schema.GroupItemResource; + // Create a new instance of GroupSnippet + newGroupSnippet(): YouTubeAnalytics.Schema.GroupSnippet; + } +} + +declare var YouTubeAnalytics: GoogleAppsScript.YouTubeAnalytics; diff --git a/types/google-apps-script/apis/youtubepartner_v1.d.ts b/types/google-apps-script/apis/youtubepartner_v1.d.ts new file mode 100644 index 0000000000..f940cf2268 --- /dev/null +++ b/types/google-apps-script/apis/youtubepartner_v1.d.ts @@ -0,0 +1,1142 @@ +// Type definitions for Google Apps Script 2019-03-25 +// Project: https://developers.google.com/apps-script/ +// Generator: https://github.com/grant/google-apps-script-dts +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GoogleAppsScript { + namespace YoutubePartner { + namespace Collection { + export interface AssetLabelsCollection { + // Insert an asset label for an owner. + insert(resource: Schema.AssetLabel): YoutubePartner.Schema.AssetLabel; + // Insert an asset label for an owner. + insert(resource: Schema.AssetLabel, optionalArgs: object): YoutubePartner.Schema.AssetLabel; + // Retrieves a list of all asset labels for an owner. + list(): YoutubePartner.Schema.AssetLabelListResponse; + // Retrieves a list of all asset labels for an owner. + list(optionalArgs: object): YoutubePartner.Schema.AssetLabelListResponse; + } + export interface AssetMatchPolicyCollection { + // Retrieves the match policy assigned to the specified asset by the content owner associated with the authenticated user. This information is only accessible to an owner of the asset. + get(assetId: string): YoutubePartner.Schema.AssetMatchPolicy; + // Retrieves the match policy assigned to the specified asset by the content owner associated with the authenticated user. This information is only accessible to an owner of the asset. + get(assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetMatchPolicy; + // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. This method supports patch semantics. + patch(resource: Schema.AssetMatchPolicy, assetId: string): YoutubePartner.Schema.AssetMatchPolicy; + // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. This method supports patch semantics. + patch(resource: Schema.AssetMatchPolicy, assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetMatchPolicy; + // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. + update(resource: Schema.AssetMatchPolicy, assetId: string): YoutubePartner.Schema.AssetMatchPolicy; + // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. + update(resource: Schema.AssetMatchPolicy, assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetMatchPolicy; + } + export interface AssetRelationshipsCollection { + // Creates a relationship that links two assets. + insert(resource: Schema.AssetRelationship): YoutubePartner.Schema.AssetRelationship; + // Creates a relationship that links two assets. + insert(resource: Schema.AssetRelationship, optionalArgs: object): YoutubePartner.Schema.AssetRelationship; + // Retrieves a list of relationships for a given asset. The list contains relationships where the specified asset is either the parent (embedding) or child (embedded) asset in the relationship. + list(assetId: string): YoutubePartner.Schema.AssetRelationshipListResponse; + // Retrieves a list of relationships for a given asset. The list contains relationships where the specified asset is either the parent (embedding) or child (embedded) asset in the relationship. + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetRelationshipListResponse; + // Deletes a relationship between two assets. + remove(assetRelationshipId: string): void; + // Deletes a relationship between two assets. + remove(assetRelationshipId: string, optionalArgs: object): void; + } + export interface AssetSearchCollection { + // Searches for assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. This method mimics the functionality of the advanced search feature on the Assets page in CMS. + list(): YoutubePartner.Schema.AssetSearchResponse; + // Searches for assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. This method mimics the functionality of the advanced search feature on the Assets page in CMS. + list(optionalArgs: object): YoutubePartner.Schema.AssetSearchResponse; + } + export interface AssetSharesCollection { + // This method either retrieves a list of asset shares the partner owns and that map to a specified asset view ID or it retrieves a list of asset views associated with a specified asset share ID owned by the partner. + list(assetId: string): YoutubePartner.Schema.AssetShareListResponse; + // This method either retrieves a list of asset shares the partner owns and that map to a specified asset view ID or it retrieves a list of asset views associated with a specified asset share ID owned by the partner. + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetShareListResponse; + } + export interface AssetsCollection { + // Retrieves the metadata for the specified asset. Note that if the request identifies an asset that has been merged with another asset, meaning that YouTube identified the requested asset as a duplicate, then the request retrieves the merged, or synthesized, asset. + get(assetId: string): YoutubePartner.Schema.Asset; + // Retrieves the metadata for the specified asset. Note that if the request identifies an asset that has been merged with another asset, meaning that YouTube identified the requested asset as a duplicate, then the request retrieves the merged, or synthesized, asset. + get(assetId: string, optionalArgs: object): YoutubePartner.Schema.Asset; + // Inserts an asset with the specified metadata. After inserting an asset, you can set its ownership data and match policy. + insert(resource: Schema.Asset): YoutubePartner.Schema.Asset; + // Inserts an asset with the specified metadata. After inserting an asset, you can set its ownership data and match policy. + insert(resource: Schema.Asset, optionalArgs: object): YoutubePartner.Schema.Asset; + // Retrieves a list of assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. + // Note that in cases where duplicate assets have been merged, the API response only contains the synthesized asset. (It does not contain the constituent assets that were merged into the synthesized asset.) + list(id: string): YoutubePartner.Schema.AssetListResponse; + // Retrieves a list of assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. + // Note that in cases where duplicate assets have been merged, the API response only contains the synthesized asset. (It does not contain the constituent assets that were merged into the synthesized asset.) + list(id: string, optionalArgs: object): YoutubePartner.Schema.AssetListResponse; + // Updates the metadata for the specified asset. This method supports patch semantics. + patch(resource: Schema.Asset, assetId: string): YoutubePartner.Schema.Asset; + // Updates the metadata for the specified asset. This method supports patch semantics. + patch(resource: Schema.Asset, assetId: string, optionalArgs: object): YoutubePartner.Schema.Asset; + // Updates the metadata for the specified asset. + update(resource: Schema.Asset, assetId: string): YoutubePartner.Schema.Asset; + // Updates the metadata for the specified asset. + update(resource: Schema.Asset, assetId: string, optionalArgs: object): YoutubePartner.Schema.Asset; + } + export interface CampaignsCollection { + // Retrieves a particular campaign for an owner. + get(campaignId: string): YoutubePartner.Schema.Campaign; + // Retrieves a particular campaign for an owner. + get(campaignId: string, optionalArgs: object): YoutubePartner.Schema.Campaign; + // Insert a new campaign for an owner using the specified campaign data. + insert(resource: Schema.Campaign): YoutubePartner.Schema.Campaign; + // Insert a new campaign for an owner using the specified campaign data. + insert(resource: Schema.Campaign, optionalArgs: object): YoutubePartner.Schema.Campaign; + // Retrieves a list of campaigns for an owner. + list(): YoutubePartner.Schema.CampaignList; + // Retrieves a list of campaigns for an owner. + list(optionalArgs: object): YoutubePartner.Schema.CampaignList; + // Update the data for a specific campaign. This method supports patch semantics. + patch(resource: Schema.Campaign, campaignId: string): YoutubePartner.Schema.Campaign; + // Update the data for a specific campaign. This method supports patch semantics. + patch(resource: Schema.Campaign, campaignId: string, optionalArgs: object): YoutubePartner.Schema.Campaign; + // Deletes a specified campaign for an owner. + remove(campaignId: string): void; + // Deletes a specified campaign for an owner. + remove(campaignId: string, optionalArgs: object): void; + // Update the data for a specific campaign. + update(resource: Schema.Campaign, campaignId: string): YoutubePartner.Schema.Campaign; + // Update the data for a specific campaign. + update(resource: Schema.Campaign, campaignId: string, optionalArgs: object): YoutubePartner.Schema.Campaign; + } + export interface ClaimHistoryCollection { + // Retrieves the claim history for a specified claim. + get(claimId: string): YoutubePartner.Schema.ClaimHistory; + // Retrieves the claim history for a specified claim. + get(claimId: string, optionalArgs: object): YoutubePartner.Schema.ClaimHistory; + } + export interface ClaimSearchCollection { + // Retrieves a list of claims that match the search criteria. You can search for claims that are associated with a specific asset or video or that match a specified query string. + list(): YoutubePartner.Schema.ClaimSearchResponse; + // Retrieves a list of claims that match the search criteria. You can search for claims that are associated with a specific asset or video or that match a specified query string. + list(optionalArgs: object): YoutubePartner.Schema.ClaimSearchResponse; + } + export interface ClaimsCollection { + // Retrieves a specific claim by ID. + get(claimId: string): YoutubePartner.Schema.Claim; + // Retrieves a specific claim by ID. + get(claimId: string, optionalArgs: object): YoutubePartner.Schema.Claim; + // Creates a claim. The video being claimed must have been uploaded to a channel associated with the same content owner as the API user sending the request. You can set the claim's policy in any of the following ways: + // - Use the claim resource's policy property to identify a saved policy by its unique ID. + // - Use the claim resource's policy property to specify a custom set of rules. + insert(resource: Schema.Claim): YoutubePartner.Schema.Claim; + // Creates a claim. The video being claimed must have been uploaded to a channel associated with the same content owner as the API user sending the request. You can set the claim's policy in any of the following ways: + // - Use the claim resource's policy property to identify a saved policy by its unique ID. + // - Use the claim resource's policy property to specify a custom set of rules. + insert(resource: Schema.Claim, optionalArgs: object): YoutubePartner.Schema.Claim; + // Retrieves a list of claims administered by the content owner associated with the currently authenticated user. Results are sorted in descending order of creation time. + list(): YoutubePartner.Schema.ClaimListResponse; + // Retrieves a list of claims administered by the content owner associated with the currently authenticated user. Results are sorted in descending order of creation time. + list(optionalArgs: object): YoutubePartner.Schema.ClaimListResponse; + // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. This method supports patch semantics. + patch(resource: Schema.Claim, claimId: string): YoutubePartner.Schema.Claim; + // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. This method supports patch semantics. + patch(resource: Schema.Claim, claimId: string, optionalArgs: object): YoutubePartner.Schema.Claim; + // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. + update(resource: Schema.Claim, claimId: string): YoutubePartner.Schema.Claim; + // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. + update(resource: Schema.Claim, claimId: string, optionalArgs: object): YoutubePartner.Schema.Claim; + } + export interface ContentOwnerAdvertisingOptionsCollection { + // Retrieves advertising options for the content owner associated with the authenticated user. + get(): YoutubePartner.Schema.ContentOwnerAdvertisingOption; + // Retrieves advertising options for the content owner associated with the authenticated user. + get(optionalArgs: object): YoutubePartner.Schema.ContentOwnerAdvertisingOption; + // Updates advertising options for the content owner associated with the authenticated API user. This method supports patch semantics. + patch(resource: Schema.ContentOwnerAdvertisingOption): YoutubePartner.Schema.ContentOwnerAdvertisingOption; + // Updates advertising options for the content owner associated with the authenticated API user. This method supports patch semantics. + patch(resource: Schema.ContentOwnerAdvertisingOption, optionalArgs: object): YoutubePartner.Schema.ContentOwnerAdvertisingOption; + // Updates advertising options for the content owner associated with the authenticated API user. + update(resource: Schema.ContentOwnerAdvertisingOption): YoutubePartner.Schema.ContentOwnerAdvertisingOption; + // Updates advertising options for the content owner associated with the authenticated API user. + update(resource: Schema.ContentOwnerAdvertisingOption, optionalArgs: object): YoutubePartner.Schema.ContentOwnerAdvertisingOption; + } + export interface ContentOwnersCollection { + // Retrieves information about the specified content owner. + get(contentOwnerId: string): YoutubePartner.Schema.ContentOwner; + // Retrieves information about the specified content owner. + get(contentOwnerId: string, optionalArgs: object): YoutubePartner.Schema.ContentOwner; + // Retrieves a list of content owners that match the request criteria. + list(): YoutubePartner.Schema.ContentOwnerListResponse; + // Retrieves a list of content owners that match the request criteria. + list(optionalArgs: object): YoutubePartner.Schema.ContentOwnerListResponse; + } + export interface LiveCuepointsCollection { + // Inserts a cuepoint into a live broadcast. + insert(resource: Schema.LiveCuepoint, channelId: string): YoutubePartner.Schema.LiveCuepoint; + // Inserts a cuepoint into a live broadcast. + insert(resource: Schema.LiveCuepoint, channelId: string, optionalArgs: object): YoutubePartner.Schema.LiveCuepoint; + } + export interface MetadataHistoryCollection { + // Retrieves a list of all metadata provided for an asset, regardless of which content owner provided the data. + list(assetId: string): YoutubePartner.Schema.MetadataHistoryListResponse; + // Retrieves a list of all metadata provided for an asset, regardless of which content owner provided the data. + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.MetadataHistoryListResponse; + } + export interface OrdersCollection { + // Retrieve the details of an existing order. + get(orderId: string): YoutubePartner.Schema.Order; + // Retrieve the details of an existing order. + get(orderId: string, optionalArgs: object): YoutubePartner.Schema.Order; + // Creates a new basic order entry in the YouTube premium asset order management system. You must supply at least a country and channel in the new order. + insert(resource: Schema.Order): YoutubePartner.Schema.Order; + // Creates a new basic order entry in the YouTube premium asset order management system. You must supply at least a country and channel in the new order. + insert(resource: Schema.Order, optionalArgs: object): YoutubePartner.Schema.Order; + // Return a list of orders, filtered by the parameters below, may return more than a single page of results. + list(): YoutubePartner.Schema.OrderListResponse; + // Return a list of orders, filtered by the parameters below, may return more than a single page of results. + list(optionalArgs: object): YoutubePartner.Schema.OrderListResponse; + // Update the values in an existing order. This method supports patch semantics. + patch(resource: Schema.Order, orderId: string): YoutubePartner.Schema.Order; + // Update the values in an existing order. This method supports patch semantics. + patch(resource: Schema.Order, orderId: string, optionalArgs: object): YoutubePartner.Schema.Order; + // Delete an order, which moves orders to inactive state and removes any associated video. + remove(orderId: string): void; + // Delete an order, which moves orders to inactive state and removes any associated video. + remove(orderId: string, optionalArgs: object): void; + // Update the values in an existing order. + update(resource: Schema.Order, orderId: string): YoutubePartner.Schema.Order; + // Update the values in an existing order. + update(resource: Schema.Order, orderId: string, optionalArgs: object): YoutubePartner.Schema.Order; + } + export interface OwnershipCollection { + // Retrieves the ownership data provided for the specified asset by the content owner associated with the authenticated user. + get(assetId: string): YoutubePartner.Schema.RightsOwnership; + // Retrieves the ownership data provided for the specified asset by the content owner associated with the authenticated user. + get(assetId: string, optionalArgs: object): YoutubePartner.Schema.RightsOwnership; + // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. This method supports patch semantics. + patch(resource: Schema.RightsOwnership, assetId: string): YoutubePartner.Schema.RightsOwnership; + // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. This method supports patch semantics. + patch(resource: Schema.RightsOwnership, assetId: string, optionalArgs: object): YoutubePartner.Schema.RightsOwnership; + // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. + update(resource: Schema.RightsOwnership, assetId: string): YoutubePartner.Schema.RightsOwnership; + // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. + update(resource: Schema.RightsOwnership, assetId: string, optionalArgs: object): YoutubePartner.Schema.RightsOwnership; + } + export interface OwnershipHistoryCollection { + // Retrieves a list of the ownership data for an asset, regardless of which content owner provided the data. The list only includes the most recent ownership data for each content owner. However, if the content owner has submitted ownership data through multiple data sources (API, content feeds, etc.), the list will contain the most recent data for each content owner and data source. + list(assetId: string): YoutubePartner.Schema.OwnershipHistoryListResponse; + // Retrieves a list of the ownership data for an asset, regardless of which content owner provided the data. The list only includes the most recent ownership data for each content owner. However, if the content owner has submitted ownership data through multiple data sources (API, content feeds, etc.), the list will contain the most recent data for each content owner and data source. + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.OwnershipHistoryListResponse; + } + export interface PackageCollection { + // Retrieves information for the specified package. + get(packageId: string): YoutubePartner.Schema.Package; + // Retrieves information for the specified package. + get(packageId: string, optionalArgs: object): YoutubePartner.Schema.Package; + // Inserts a metadata-only package. + insert(resource: Schema.Package): YoutubePartner.Schema.PackageInsertResponse; + // Inserts a metadata-only package. + insert(resource: Schema.Package, optionalArgs: object): YoutubePartner.Schema.PackageInsertResponse; + } + export interface PoliciesCollection { + // Retrieves the specified saved policy. + get(policyId: string): YoutubePartner.Schema.Policy; + // Retrieves the specified saved policy. + get(policyId: string, optionalArgs: object): YoutubePartner.Schema.Policy; + // Creates a saved policy. + insert(resource: Schema.Policy): YoutubePartner.Schema.Policy; + // Creates a saved policy. + insert(resource: Schema.Policy, optionalArgs: object): YoutubePartner.Schema.Policy; + // Retrieves a list of the content owner's saved policies. + list(): YoutubePartner.Schema.PolicyList; + // Retrieves a list of the content owner's saved policies. + list(optionalArgs: object): YoutubePartner.Schema.PolicyList; + // Updates the specified saved policy. This method supports patch semantics. + patch(resource: Schema.Policy, policyId: string): YoutubePartner.Schema.Policy; + // Updates the specified saved policy. This method supports patch semantics. + patch(resource: Schema.Policy, policyId: string, optionalArgs: object): YoutubePartner.Schema.Policy; + // Updates the specified saved policy. + update(resource: Schema.Policy, policyId: string): YoutubePartner.Schema.Policy; + // Updates the specified saved policy. + update(resource: Schema.Policy, policyId: string, optionalArgs: object): YoutubePartner.Schema.Policy; + } + export interface PublishersCollection { + // Retrieves information about the specified publisher. + get(publisherId: string): YoutubePartner.Schema.Publisher; + // Retrieves information about the specified publisher. + get(publisherId: string, optionalArgs: object): YoutubePartner.Schema.Publisher; + // Retrieves a list of publishers that match the request criteria. This method is analogous to a publisher search function. + list(): YoutubePartner.Schema.PublisherList; + // Retrieves a list of publishers that match the request criteria. This method is analogous to a publisher search function. + list(optionalArgs: object): YoutubePartner.Schema.PublisherList; + } + export interface ReferenceConflictsCollection { + // Retrieves information about the specified reference conflict. + get(referenceConflictId: string): YoutubePartner.Schema.ReferenceConflict; + // Retrieves information about the specified reference conflict. + get(referenceConflictId: string, optionalArgs: object): YoutubePartner.Schema.ReferenceConflict; + // Retrieves a list of unresolved reference conflicts. + list(): YoutubePartner.Schema.ReferenceConflictListResponse; + // Retrieves a list of unresolved reference conflicts. + list(optionalArgs: object): YoutubePartner.Schema.ReferenceConflictListResponse; + } + export interface ReferencesCollection { + // Retrieves information about the specified reference. + get(referenceId: string): YoutubePartner.Schema.Reference; + // Retrieves information about the specified reference. + get(referenceId: string, optionalArgs: object): YoutubePartner.Schema.Reference; + // Creates a reference in one of the following ways: + // - If your request is uploading a reference file, YouTube creates the reference from the provided content. You can provide either a video/audio file or a pre-generated fingerprint. If you are providing a pre-generated fingerprint, set the reference resource's fpDirect property to true in the request body. In this flow, you can use either the multipart or resumable upload flows to provide the reference content. + // - If you want to create a reference using a claimed video as the reference content, use the claimId parameter to identify the claim. + insert(resource: Schema.Reference): YoutubePartner.Schema.Reference; + // Creates a reference in one of the following ways: + // - If your request is uploading a reference file, YouTube creates the reference from the provided content. You can provide either a video/audio file or a pre-generated fingerprint. If you are providing a pre-generated fingerprint, set the reference resource's fpDirect property to true in the request body. In this flow, you can use either the multipart or resumable upload flows to provide the reference content. + // - If you want to create a reference using a claimed video as the reference content, use the claimId parameter to identify the claim. + insert(resource: Schema.Reference, mediaData: any): YoutubePartner.Schema.Reference; + // Creates a reference in one of the following ways: + // - If your request is uploading a reference file, YouTube creates the reference from the provided content. You can provide either a video/audio file or a pre-generated fingerprint. If you are providing a pre-generated fingerprint, set the reference resource's fpDirect property to true in the request body. In this flow, you can use either the multipart or resumable upload flows to provide the reference content. + // - If you want to create a reference using a claimed video as the reference content, use the claimId parameter to identify the claim. + insert(resource: Schema.Reference, mediaData: any, optionalArgs: object): YoutubePartner.Schema.Reference; + // Retrieves a list of references by ID or the list of references for the specified asset. + list(): YoutubePartner.Schema.ReferenceListResponse; + // Retrieves a list of references by ID or the list of references for the specified asset. + list(optionalArgs: object): YoutubePartner.Schema.ReferenceListResponse; + // Updates a reference. This method supports patch semantics. + patch(resource: Schema.Reference, referenceId: string): YoutubePartner.Schema.Reference; + // Updates a reference. This method supports patch semantics. + patch(resource: Schema.Reference, referenceId: string, optionalArgs: object): YoutubePartner.Schema.Reference; + // Updates a reference. + update(resource: Schema.Reference, referenceId: string): YoutubePartner.Schema.Reference; + // Updates a reference. + update(resource: Schema.Reference, referenceId: string, optionalArgs: object): YoutubePartner.Schema.Reference; + } + export interface SpreadsheetTemplateCollection { + // Retrieves a list of spreadsheet templates for a content owner. + list(): YoutubePartner.Schema.SpreadsheetTemplateListResponse; + // Retrieves a list of spreadsheet templates for a content owner. + list(optionalArgs: object): YoutubePartner.Schema.SpreadsheetTemplateListResponse; + } + export interface UploaderCollection { + // Retrieves a list of uploaders for a content owner. + list(): YoutubePartner.Schema.UploaderListResponse; + // Retrieves a list of uploaders for a content owner. + list(optionalArgs: object): YoutubePartner.Schema.UploaderListResponse; + } + export interface ValidatorCollection { + // Validate a metadata file. + validate(resource: Schema.ValidateRequest): YoutubePartner.Schema.ValidateResponse; + // Validate a metadata file. + validate(resource: Schema.ValidateRequest, optionalArgs: object): YoutubePartner.Schema.ValidateResponse; + // Validate a metadata file asynchronously. + validateAsync(resource: Schema.ValidateAsyncRequest): YoutubePartner.Schema.ValidateAsyncResponse; + // Validate a metadata file asynchronously. + validateAsync(resource: Schema.ValidateAsyncRequest, optionalArgs: object): YoutubePartner.Schema.ValidateAsyncResponse; + // Get the asynchronous validation status. + validateAsyncStatus(resource: Schema.ValidateStatusRequest): YoutubePartner.Schema.ValidateStatusResponse; + // Get the asynchronous validation status. + validateAsyncStatus(resource: Schema.ValidateStatusRequest, optionalArgs: object): YoutubePartner.Schema.ValidateStatusResponse; + } + export interface VideoAdvertisingOptionsCollection { + // Retrieves advertising settings for the specified video. + get(videoId: string): YoutubePartner.Schema.VideoAdvertisingOption; + // Retrieves advertising settings for the specified video. + get(videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOption; + // Retrieves details about the types of allowed ads for a specified partner- or user-uploaded video. + getEnabledAds(videoId: string): YoutubePartner.Schema.VideoAdvertisingOptionGetEnabledAdsResponse; + // Retrieves details about the types of allowed ads for a specified partner- or user-uploaded video. + getEnabledAds(videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOptionGetEnabledAdsResponse; + // Updates the advertising settings for the specified video. This method supports patch semantics. + patch(resource: Schema.VideoAdvertisingOption, videoId: string): YoutubePartner.Schema.VideoAdvertisingOption; + // Updates the advertising settings for the specified video. This method supports patch semantics. + patch(resource: Schema.VideoAdvertisingOption, videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOption; + // Updates the advertising settings for the specified video. + update(resource: Schema.VideoAdvertisingOption, videoId: string): YoutubePartner.Schema.VideoAdvertisingOption; + // Updates the advertising settings for the specified video. + update(resource: Schema.VideoAdvertisingOption, videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOption; + } + export interface WhitelistsCollection { + // Retrieves a specific whitelisted channel by ID. + get(id: string): YoutubePartner.Schema.Whitelist; + // Retrieves a specific whitelisted channel by ID. + get(id: string, optionalArgs: object): YoutubePartner.Schema.Whitelist; + // Whitelist a YouTube channel for your content owner. Whitelisted channels are channels that are not owned or managed by you, but you would like to whitelist so that no claims from your assets are placed on videos uploaded to these channels. + insert(resource: Schema.Whitelist): YoutubePartner.Schema.Whitelist; + // Whitelist a YouTube channel for your content owner. Whitelisted channels are channels that are not owned or managed by you, but you would like to whitelist so that no claims from your assets are placed on videos uploaded to these channels. + insert(resource: Schema.Whitelist, optionalArgs: object): YoutubePartner.Schema.Whitelist; + // Retrieves a list of whitelisted channels for a content owner. + list(): YoutubePartner.Schema.WhitelistListResponse; + // Retrieves a list of whitelisted channels for a content owner. + list(optionalArgs: object): YoutubePartner.Schema.WhitelistListResponse; + // Removes a whitelisted channel for a content owner. + remove(id: string): void; + // Removes a whitelisted channel for a content owner. + remove(id: string, optionalArgs: object): void; + } + } + namespace Schema { + export interface AdBreak { + midrollSeconds?: number; + position?: string; + slot?: YoutubePartner.Schema.AdSlot[]; + } + export interface AdSlot { + id?: string; + type?: string; + } + export interface AllowedAdvertisingOptions { + adsOnEmbeds?: boolean; + kind?: string; + licAdFormats?: string[]; + ugcAdFormats?: string[]; + } + export interface Asset { + aliasId?: string[]; + id?: string; + kind?: string; + label?: string[]; + matchPolicy?: YoutubePartner.Schema.AssetMatchPolicy; + matchPolicyEffective?: YoutubePartner.Schema.AssetMatchPolicy; + matchPolicyMine?: YoutubePartner.Schema.AssetMatchPolicy; + metadata?: YoutubePartner.Schema.Metadata; + metadataEffective?: YoutubePartner.Schema.Metadata; + metadataMine?: YoutubePartner.Schema.Metadata; + ownership?: YoutubePartner.Schema.RightsOwnership; + ownershipConflicts?: YoutubePartner.Schema.OwnershipConflicts; + ownershipEffective?: YoutubePartner.Schema.RightsOwnership; + ownershipMine?: YoutubePartner.Schema.RightsOwnership; + status?: string; + timeCreated?: string; + type?: string; + } + export interface AssetLabel { + kind?: string; + labelName?: string; + } + export interface AssetLabelListResponse { + items?: YoutubePartner.Schema.AssetLabel[]; + kind?: string; + } + export interface AssetListResponse { + items?: YoutubePartner.Schema.Asset[]; + kind?: string; + } + export interface AssetMatchPolicy { + kind?: string; + policyId?: string; + rules?: YoutubePartner.Schema.PolicyRule[]; + } + export interface AssetRelationship { + childAssetId?: string; + id?: string; + kind?: string; + parentAssetId?: string; + } + export interface AssetRelationshipListResponse { + items?: YoutubePartner.Schema.AssetRelationship[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + } + export interface AssetSearchResponse { + items?: YoutubePartner.Schema.AssetSnippet[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + } + export interface AssetShare { + kind?: string; + shareId?: string; + viewId?: string; + } + export interface AssetShareListResponse { + items?: YoutubePartner.Schema.AssetShare[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + } + export interface AssetSnippet { + customId?: string; + id?: string; + isrc?: string; + iswc?: string; + kind?: string; + timeCreated?: string; + title?: string; + type?: string; + } + export interface Campaign { + campaignData?: YoutubePartner.Schema.CampaignData; + id?: string; + kind?: string; + status?: string; + timeCreated?: string; + timeLastModified?: string; + } + export interface CampaignData { + campaignSource?: YoutubePartner.Schema.CampaignSource; + expireTime?: string; + name?: string; + promotedContent?: YoutubePartner.Schema.PromotedContent[]; + startTime?: string; + } + export interface CampaignList { + items?: YoutubePartner.Schema.Campaign[]; + kind?: string; + } + export interface CampaignSource { + sourceType?: string; + sourceValue?: string[]; + } + export interface CampaignTargetLink { + targetId?: string; + targetType?: string; + } + export interface Claim { + appliedPolicy?: YoutubePartner.Schema.Policy; + assetId?: string; + blockOutsideOwnership?: boolean; + contentType?: string; + id?: string; + isPartnerUploaded?: boolean; + kind?: string; + matchInfo?: YoutubePartner.Schema.ClaimMatchInfo; + origin?: YoutubePartner.Schema.ClaimOrigin; + policy?: YoutubePartner.Schema.Policy; + status?: string; + timeCreated?: string; + videoId?: string; + } + export interface ClaimEvent { + kind?: string; + reason?: string; + source?: YoutubePartner.Schema.ClaimEventSource; + time?: string; + type?: string; + typeDetails?: YoutubePartner.Schema.ClaimEventTypeDetails; + } + export interface ClaimEventSource { + contentOwnerId?: string; + type?: string; + userEmail?: string; + } + export interface ClaimEventTypeDetails { + appealExplanation?: string; + disputeNotes?: string; + disputeReason?: string; + updateStatus?: string; + } + export interface ClaimHistory { + event?: YoutubePartner.Schema.ClaimEvent[]; + id?: string; + kind?: string; + uploaderChannelId?: string; + } + export interface ClaimListResponse { + items?: YoutubePartner.Schema.Claim[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + previousPageToken?: string; + } + export interface ClaimMatchInfo { + longestMatch?: YoutubePartner.Schema.ClaimMatchInfoLongestMatch; + matchSegments?: YoutubePartner.Schema.MatchSegment[]; + referenceId?: string; + totalMatch?: YoutubePartner.Schema.ClaimMatchInfoTotalMatch; + } + export interface ClaimMatchInfoLongestMatch { + durationSecs?: string; + referenceOffset?: string; + userVideoOffset?: string; + } + export interface ClaimMatchInfoTotalMatch { + referenceDurationSecs?: string; + userVideoDurationSecs?: string; + } + export interface ClaimOrigin { + source?: string; + } + export interface ClaimSearchResponse { + items?: YoutubePartner.Schema.ClaimSnippet[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + previousPageToken?: string; + } + export interface ClaimSnippet { + assetId?: string; + contentType?: string; + id?: string; + isPartnerUploaded?: boolean; + kind?: string; + origin?: YoutubePartner.Schema.ClaimSnippetOrigin; + status?: string; + thirdPartyClaim?: boolean; + timeCreated?: string; + timeStatusLastModified?: string; + videoId?: string; + videoTitle?: string; + videoViews?: string; + } + export interface ClaimSnippetOrigin { + source?: string; + } + export interface ClaimedVideoDefaults { + autoGeneratedBreaks?: boolean; + channelOverride?: boolean; + kind?: string; + newVideoDefaults?: string[]; + } + export interface Conditions { + contentMatchType?: string[]; + matchDuration?: YoutubePartner.Schema.IntervalCondition[]; + matchPercent?: YoutubePartner.Schema.IntervalCondition[]; + referenceDuration?: YoutubePartner.Schema.IntervalCondition[]; + referencePercent?: YoutubePartner.Schema.IntervalCondition[]; + requiredTerritories?: YoutubePartner.Schema.TerritoryCondition; + } + export interface ConflictingOwnership { + owner?: string; + ratio?: Number; + } + export interface ContentOwner { + conflictNotificationEmail?: string; + displayName?: string; + disputeNotificationEmails?: string[]; + fingerprintReportNotificationEmails?: string[]; + id?: string; + kind?: string; + primaryNotificationEmails?: string[]; + } + export interface ContentOwnerAdvertisingOption { + allowedOptions?: YoutubePartner.Schema.AllowedAdvertisingOptions; + claimedVideoOptions?: YoutubePartner.Schema.ClaimedVideoDefaults; + id?: string; + kind?: string; + } + export interface ContentOwnerListResponse { + items?: YoutubePartner.Schema.ContentOwner[]; + kind?: string; + } + export interface CountriesRestriction { + adFormats?: string[]; + territories?: string[]; + } + export interface CuepointSettings { + cueType?: string; + durationSecs?: number; + offsetTimeMs?: string; + walltime?: string; + } + export interface Date { + day?: number; + month?: number; + year?: number; + } + export interface DateRange { + end?: YoutubePartner.Schema.Date; + kind?: string; + start?: YoutubePartner.Schema.Date; + } + export interface ExcludedInterval { + high?: Number; + low?: Number; + origin?: string; + timeCreated?: string; + } + export interface IntervalCondition { + high?: Number; + low?: Number; + } + export interface LiveCuepoint { + broadcastId?: string; + id?: string; + kind?: string; + settings?: YoutubePartner.Schema.CuepointSettings; + } + export interface MatchSegment { + channel?: string; + reference_segment?: YoutubePartner.Schema.Segment; + video_segment?: YoutubePartner.Schema.Segment; + } + export interface Metadata { + actor?: string[]; + album?: string; + artist?: string[]; + broadcaster?: string[]; + category?: string; + contentType?: string; + copyrightDate?: YoutubePartner.Schema.Date; + customId?: string; + description?: string; + director?: string[]; + eidr?: string; + endYear?: number; + episodeNumber?: string; + episodesAreUntitled?: boolean; + genre?: string[]; + grid?: string; + hfa?: string; + infoUrl?: string; + isan?: string; + isrc?: string; + iswc?: string; + keyword?: string[]; + label?: string; + notes?: string; + originalReleaseMedium?: string; + producer?: string[]; + ratings?: YoutubePartner.Schema.Rating[]; + releaseDate?: YoutubePartner.Schema.Date; + seasonNumber?: string; + showCustomId?: string; + showTitle?: string; + spokenLanguage?: string; + startYear?: number; + subtitledLanguage?: string[]; + title?: string; + tmsId?: string; + totalEpisodesExpected?: number; + upc?: string; + writer?: string[]; + } + export interface MetadataHistory { + kind?: string; + metadata?: YoutubePartner.Schema.Metadata; + origination?: YoutubePartner.Schema.Origination; + timeProvided?: string; + } + export interface MetadataHistoryListResponse { + items?: YoutubePartner.Schema.MetadataHistory[]; + kind?: string; + } + export interface Order { + availGroupId?: string; + channelId?: string; + contentType?: string; + country?: string; + customId?: string; + dvdReleaseDate?: YoutubePartner.Schema.Date; + estDates?: YoutubePartner.Schema.DateRange; + events?: YoutubePartner.Schema.StateCompleted[]; + id?: string; + kind?: string; + movie?: string; + originalReleaseDate?: YoutubePartner.Schema.Date; + priority?: string; + productionHouse?: string; + purchaseOrder?: string; + requirements?: YoutubePartner.Schema.Requirements; + show?: YoutubePartner.Schema.ShowDetails; + status?: string; + videoId?: string; + vodDates?: YoutubePartner.Schema.DateRange; + } + export interface OrderListResponse { + items?: YoutubePartner.Schema.Order[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + previousPageToken?: string; + } + export interface Origination { + owner?: string; + source?: string; + } + export interface OwnershipConflicts { + general?: YoutubePartner.Schema.TerritoryConflicts[]; + kind?: string; + mechanical?: YoutubePartner.Schema.TerritoryConflicts[]; + performance?: YoutubePartner.Schema.TerritoryConflicts[]; + synchronization?: YoutubePartner.Schema.TerritoryConflicts[]; + } + export interface OwnershipHistoryListResponse { + items?: YoutubePartner.Schema.RightsOwnershipHistory[]; + kind?: string; + } + export interface Package { + content?: string; + customIds?: string[]; + id?: string; + kind?: string; + locale?: string; + name?: string; + status?: string; + statusReports?: YoutubePartner.Schema.StatusReport[]; + timeCreated?: string; + type?: string; + uploaderName?: string; + } + export interface PackageInsertResponse { + errors?: YoutubePartner.Schema.ValidateError[]; + kind?: string; + resource?: YoutubePartner.Schema.Package; + status?: string; + } + export interface PageInfo { + resultsPerPage?: number; + startIndex?: number; + totalResults?: number; + } + export interface Policy { + description?: string; + id?: string; + kind?: string; + name?: string; + rules?: YoutubePartner.Schema.PolicyRule[]; + timeUpdated?: string; + } + export interface PolicyList { + items?: YoutubePartner.Schema.Policy[]; + kind?: string; + } + export interface PolicyRule { + action?: string; + conditions?: YoutubePartner.Schema.Conditions; + subaction?: string[]; + } + export interface PromotedContent { + link?: YoutubePartner.Schema.CampaignTargetLink[]; + } + export interface Publisher { + caeNumber?: string; + id?: string; + ipiNumber?: string; + kind?: string; + name?: string; + } + export interface PublisherList { + items?: YoutubePartner.Schema.Publisher[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + } + export interface Rating { + rating?: string; + ratingSystem?: string; + } + export interface Reference { + assetId?: string; + audioswapEnabled?: boolean; + claimId?: string; + contentType?: string; + duplicateLeader?: string; + excludedIntervals?: YoutubePartner.Schema.ExcludedInterval[]; + fpDirect?: boolean; + hashCode?: string; + id?: string; + ignoreFpMatch?: boolean; + kind?: string; + length?: Number; + origination?: YoutubePartner.Schema.Origination; + status?: string; + statusReason?: string; + urgent?: boolean; + videoId?: string; + } + export interface ReferenceConflict { + conflictingReferenceId?: string; + expiryTime?: string; + id?: string; + kind?: string; + matches?: YoutubePartner.Schema.ReferenceConflictMatch[]; + originalReferenceId?: string; + status?: string; + } + export interface ReferenceConflictListResponse { + items?: YoutubePartner.Schema.ReferenceConflict[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + } + export interface ReferenceConflictMatch { + conflicting_reference_offset_ms?: string; + length_ms?: string; + original_reference_offset_ms?: string; + type?: string; + } + export interface ReferenceListResponse { + items?: YoutubePartner.Schema.Reference[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + } + export interface Requirements { + caption?: boolean; + hdTranscode?: boolean; + posterArt?: boolean; + spotlightArt?: boolean; + spotlightReview?: boolean; + trailer?: boolean; + } + export interface RightsOwnership { + general?: YoutubePartner.Schema.TerritoryOwners[]; + kind?: string; + mechanical?: YoutubePartner.Schema.TerritoryOwners[]; + performance?: YoutubePartner.Schema.TerritoryOwners[]; + synchronization?: YoutubePartner.Schema.TerritoryOwners[]; + } + export interface RightsOwnershipHistory { + kind?: string; + origination?: YoutubePartner.Schema.Origination; + ownership?: YoutubePartner.Schema.RightsOwnership; + timeProvided?: string; + } + export interface Segment { + duration?: string; + kind?: string; + start?: string; + } + export interface ShowDetails { + episodeNumber?: string; + episodeTitle?: string; + seasonNumber?: string; + title?: string; + } + export interface SpreadsheetTemplate { + kind?: string; + status?: string; + templateContent?: string; + templateName?: string; + templateType?: string; + } + export interface SpreadsheetTemplateListResponse { + items?: YoutubePartner.Schema.SpreadsheetTemplate[]; + kind?: string; + status?: string; + } + export interface StateCompleted { + state?: string; + timeCompleted?: string; + } + export interface StatusReport { + statusContent?: string; + statusFileName?: string; + } + export interface TerritoryCondition { + territories?: string[]; + type?: string; + } + export interface TerritoryConflicts { + conflictingOwnership?: YoutubePartner.Schema.ConflictingOwnership[]; + territory?: string; + } + export interface TerritoryOwners { + owner?: string; + publisher?: string; + ratio?: Number; + territories?: string[]; + type?: string; + } + export interface Uploader { + kind?: string; + uploaderName?: string; + } + export interface UploaderListResponse { + items?: YoutubePartner.Schema.Uploader[]; + kind?: string; + } + export interface ValidateAsyncRequest { + content?: string; + kind?: string; + uploaderName?: string; + } + export interface ValidateAsyncResponse { + kind?: string; + status?: string; + validationId?: string; + } + export interface ValidateError { + columnName?: string; + columnNumber?: number; + lineNumber?: number; + message?: string; + messageCode?: number; + severity?: string; + } + export interface ValidateRequest { + content?: string; + kind?: string; + locale?: string; + uploaderName?: string; + } + export interface ValidateResponse { + errors?: YoutubePartner.Schema.ValidateError[]; + kind?: string; + status?: string; + } + export interface ValidateStatusRequest { + kind?: string; + locale?: string; + validationId?: string; + } + export interface ValidateStatusResponse { + errors?: YoutubePartner.Schema.ValidateError[]; + isMetadataOnly?: boolean; + kind?: string; + status?: string; + } + export interface VideoAdvertisingOption { + adBreaks?: YoutubePartner.Schema.AdBreak[]; + adFormats?: string[]; + autoGeneratedBreaks?: boolean; + breakPosition?: string[]; + id?: string; + kind?: string; + tpAdServerVideoId?: string; + tpTargetingUrl?: string; + tpUrlParameters?: string; + } + export interface VideoAdvertisingOptionGetEnabledAdsResponse { + adBreaks?: YoutubePartner.Schema.AdBreak[]; + adsOnEmbeds?: boolean; + countriesRestriction?: YoutubePartner.Schema.CountriesRestriction[]; + id?: string; + kind?: string; + } + export interface Whitelist { + id?: string; + kind?: string; + title?: string; + } + export interface WhitelistListResponse { + items?: YoutubePartner.Schema.Whitelist[]; + kind?: string; + nextPageToken?: string; + pageInfo?: YoutubePartner.Schema.PageInfo; + } + } + } + export interface YoutubePartner { + AssetLabels?: YoutubePartner.Collection.AssetLabelsCollection; + AssetMatchPolicy?: YoutubePartner.Collection.AssetMatchPolicyCollection; + AssetRelationships?: YoutubePartner.Collection.AssetRelationshipsCollection; + AssetSearch?: YoutubePartner.Collection.AssetSearchCollection; + AssetShares?: YoutubePartner.Collection.AssetSharesCollection; + Assets?: YoutubePartner.Collection.AssetsCollection; + Campaigns?: YoutubePartner.Collection.CampaignsCollection; + ClaimHistory?: YoutubePartner.Collection.ClaimHistoryCollection; + ClaimSearch?: YoutubePartner.Collection.ClaimSearchCollection; + Claims?: YoutubePartner.Collection.ClaimsCollection; + ContentOwnerAdvertisingOptions?: YoutubePartner.Collection.ContentOwnerAdvertisingOptionsCollection; + ContentOwners?: YoutubePartner.Collection.ContentOwnersCollection; + LiveCuepoints?: YoutubePartner.Collection.LiveCuepointsCollection; + MetadataHistory?: YoutubePartner.Collection.MetadataHistoryCollection; + Orders?: YoutubePartner.Collection.OrdersCollection; + Ownership?: YoutubePartner.Collection.OwnershipCollection; + OwnershipHistory?: YoutubePartner.Collection.OwnershipHistoryCollection; + Package?: YoutubePartner.Collection.PackageCollection; + Policies?: YoutubePartner.Collection.PoliciesCollection; + Publishers?: YoutubePartner.Collection.PublishersCollection; + ReferenceConflicts?: YoutubePartner.Collection.ReferenceConflictsCollection; + References?: YoutubePartner.Collection.ReferencesCollection; + SpreadsheetTemplate?: YoutubePartner.Collection.SpreadsheetTemplateCollection; + Uploader?: YoutubePartner.Collection.UploaderCollection; + Validator?: YoutubePartner.Collection.ValidatorCollection; + VideoAdvertisingOptions?: YoutubePartner.Collection.VideoAdvertisingOptionsCollection; + Whitelists?: YoutubePartner.Collection.WhitelistsCollection; + // Create a new instance of AdBreak + newAdBreak(): YoutubePartner.Schema.AdBreak; + // Create a new instance of AdSlot + newAdSlot(): YoutubePartner.Schema.AdSlot; + // Create a new instance of AllowedAdvertisingOptions + newAllowedAdvertisingOptions(): YoutubePartner.Schema.AllowedAdvertisingOptions; + // Create a new instance of Asset + newAsset(): YoutubePartner.Schema.Asset; + // Create a new instance of AssetLabel + newAssetLabel(): YoutubePartner.Schema.AssetLabel; + // Create a new instance of AssetMatchPolicy + newAssetMatchPolicy(): YoutubePartner.Schema.AssetMatchPolicy; + // Create a new instance of AssetRelationship + newAssetRelationship(): YoutubePartner.Schema.AssetRelationship; + // Create a new instance of Campaign + newCampaign(): YoutubePartner.Schema.Campaign; + // Create a new instance of CampaignData + newCampaignData(): YoutubePartner.Schema.CampaignData; + // Create a new instance of CampaignSource + newCampaignSource(): YoutubePartner.Schema.CampaignSource; + // Create a new instance of CampaignTargetLink + newCampaignTargetLink(): YoutubePartner.Schema.CampaignTargetLink; + // Create a new instance of Claim + newClaim(): YoutubePartner.Schema.Claim; + // Create a new instance of ClaimMatchInfo + newClaimMatchInfo(): YoutubePartner.Schema.ClaimMatchInfo; + // Create a new instance of ClaimMatchInfoLongestMatch + newClaimMatchInfoLongestMatch(): YoutubePartner.Schema.ClaimMatchInfoLongestMatch; + // Create a new instance of ClaimMatchInfoTotalMatch + newClaimMatchInfoTotalMatch(): YoutubePartner.Schema.ClaimMatchInfoTotalMatch; + // Create a new instance of ClaimOrigin + newClaimOrigin(): YoutubePartner.Schema.ClaimOrigin; + // Create a new instance of ClaimedVideoDefaults + newClaimedVideoDefaults(): YoutubePartner.Schema.ClaimedVideoDefaults; + // Create a new instance of Conditions + newConditions(): YoutubePartner.Schema.Conditions; + // Create a new instance of ConflictingOwnership + newConflictingOwnership(): YoutubePartner.Schema.ConflictingOwnership; + // Create a new instance of ContentOwnerAdvertisingOption + newContentOwnerAdvertisingOption(): YoutubePartner.Schema.ContentOwnerAdvertisingOption; + // Create a new instance of CuepointSettings + newCuepointSettings(): YoutubePartner.Schema.CuepointSettings; + // Create a new instance of Date + newDate(): YoutubePartner.Schema.Date; + // Create a new instance of DateRange + newDateRange(): YoutubePartner.Schema.DateRange; + // Create a new instance of ExcludedInterval + newExcludedInterval(): YoutubePartner.Schema.ExcludedInterval; + // Create a new instance of IntervalCondition + newIntervalCondition(): YoutubePartner.Schema.IntervalCondition; + // Create a new instance of LiveCuepoint + newLiveCuepoint(): YoutubePartner.Schema.LiveCuepoint; + // Create a new instance of MatchSegment + newMatchSegment(): YoutubePartner.Schema.MatchSegment; + // Create a new instance of Metadata + newMetadata(): YoutubePartner.Schema.Metadata; + // Create a new instance of Order + newOrder(): YoutubePartner.Schema.Order; + // Create a new instance of Origination + newOrigination(): YoutubePartner.Schema.Origination; + // Create a new instance of OwnershipConflicts + newOwnershipConflicts(): YoutubePartner.Schema.OwnershipConflicts; + // Create a new instance of Package + newPackage(): YoutubePartner.Schema.Package; + // Create a new instance of Policy + newPolicy(): YoutubePartner.Schema.Policy; + // Create a new instance of PolicyRule + newPolicyRule(): YoutubePartner.Schema.PolicyRule; + // Create a new instance of PromotedContent + newPromotedContent(): YoutubePartner.Schema.PromotedContent; + // Create a new instance of Rating + newRating(): YoutubePartner.Schema.Rating; + // Create a new instance of Reference + newReference(): YoutubePartner.Schema.Reference; + // Create a new instance of Requirements + newRequirements(): YoutubePartner.Schema.Requirements; + // Create a new instance of RightsOwnership + newRightsOwnership(): YoutubePartner.Schema.RightsOwnership; + // Create a new instance of Segment + newSegment(): YoutubePartner.Schema.Segment; + // Create a new instance of ShowDetails + newShowDetails(): YoutubePartner.Schema.ShowDetails; + // Create a new instance of StateCompleted + newStateCompleted(): YoutubePartner.Schema.StateCompleted; + // Create a new instance of StatusReport + newStatusReport(): YoutubePartner.Schema.StatusReport; + // Create a new instance of TerritoryCondition + newTerritoryCondition(): YoutubePartner.Schema.TerritoryCondition; + // Create a new instance of TerritoryConflicts + newTerritoryConflicts(): YoutubePartner.Schema.TerritoryConflicts; + // Create a new instance of TerritoryOwners + newTerritoryOwners(): YoutubePartner.Schema.TerritoryOwners; + // Create a new instance of ValidateAsyncRequest + newValidateAsyncRequest(): YoutubePartner.Schema.ValidateAsyncRequest; + // Create a new instance of ValidateRequest + newValidateRequest(): YoutubePartner.Schema.ValidateRequest; + // Create a new instance of ValidateStatusRequest + newValidateStatusRequest(): YoutubePartner.Schema.ValidateStatusRequest; + // Create a new instance of VideoAdvertisingOption + newVideoAdvertisingOption(): YoutubePartner.Schema.VideoAdvertisingOption; + // Create a new instance of Whitelist + newWhitelist(): YoutubePartner.Schema.Whitelist; + } +} + +declare var YoutubePartner: GoogleAppsScript.YoutubePartner; diff --git a/types/google-apps-script/google-apps-script-events.d.ts b/types/google-apps-script/google-apps-script-events.d.ts new file mode 100644 index 0000000000..cfbf8f8b06 --- /dev/null +++ b/types/google-apps-script/google-apps-script-events.d.ts @@ -0,0 +1,67 @@ +// Type definitions for Google Apps Script 2019-04-02 +// Project: https://developers.google.com/apps-script/ +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// + +declare namespace GoogleAppsScript { + /** + * Google Apps Script Events + * @see https://developers.google.com/apps-script/guides/triggers/events + */ + export module Events { + // Internal interfaces + interface AppsScriptEvent { + authMode: Script.AuthMode, + triggerUid: string, + user: Base.User, + } + + // External interfaces + export interface SheetsOnOpen extends AppsScriptEvent { + source: Spreadsheet.Spreadsheet, + } + + enum SheetsOnChangeChangeType { EDIT, INSERT_ROW, INSERT_COLUMN, REMOVE_ROW, REMOVE_COLUMN, INSERT_GRID, REMOVE_GRID, FORMAT, OTHER } + export interface SheetsOnChange extends AppsScriptEvent { + changeType: SheetsOnChangeChangeType, + } + + export interface SheetsOnEdit extends AppsScriptEvent { + oldValue: string, + range: Spreadsheet.Range, + source: Spreadsheet.Spreadsheet, + value: string, + } + + export interface FormsOnSubmit extends AppsScriptEvent { + namedValues: { [key: string]: string[]; }, + range: Spreadsheet.Range, + values: string[], + } + + export interface DocsOnOpen extends AppsScriptEvent { + source: Document.Document, + } + + export interface SlidesOnOpen extends AppsScriptEvent { + source: Slides.Presentation, + } + + export interface FormsOnOpen extends AppsScriptEvent { + source: Forms.Form, + } + + // TODO: Is there a `user` attribute? + export interface CalendarEventUpdated extends AppsScriptEvent { + calendarId: string, + } + + export interface AddonOnInstall { + authMode: Script.AuthMode, + } + } +} \ No newline at end of file diff --git a/types/google-apps-script/google-apps-script-tests.ts b/types/google-apps-script/google-apps-script-tests.ts index 183a753e5f..67a960a87f 100644 --- a/types/google-apps-script/google-apps-script-tests.ts +++ b/types/google-apps-script/google-apps-script-tests.ts @@ -37,15 +37,17 @@ const postTest = (payload: Object): string => { return UrlFetchApp.fetch(url, params).getContentText(); }; +// Advanced Services +Slides.Presentations.Pages.getThumbnail('presentationId', 'pageId'); + // Calendar (Advanced service) -declare const Calendar: GoogleAppsScript.Calendar_v3; const createEvent = (): void => { const calendarId = 'primary'; const start = new Date(); const end = new Date(); start.setHours(10); end.setHours(11); - let event: GoogleAppsScript.Calendar_v3.Schema.Event = { + let event: GoogleAppsScript.Calendar.Schema.Event = { summary: 'Lunch Meeting', location: 'The Deli', description: 'To discuss our plans for the presentation next week.', @@ -67,10 +69,9 @@ const createEvent = (): void => { } // Admin Directory (Advanced service) -declare const AdminDirectory: GoogleAppsScript.Admin_directory_v1; const listAllUsers = () => { let pageToken: string; - let page: GoogleAppsScript.Admin_directory_v1.Schema.Users; + let page: GoogleAppsScript.AdminDirectory.Schema.Users; do { page = AdminDirectory.Users.list({ domain: 'example.com', @@ -78,7 +79,7 @@ const listAllUsers = () => { maxResults: 100, pageToken: pageToken }); - const users: GoogleAppsScript.Admin_directory_v1.Schema.User[] = page.users; + const users: GoogleAppsScript.AdminDirectory.Schema.User[] = page.users; if (users) { for (const user of users) { Logger.log('%s (%s)', user.name.fullName, user.primaryEmail); diff --git a/types/google-apps-script/google-apps-script.calendar.d.ts b/types/google-apps-script/google-apps-script.calendar.d.ts index 3665b30e9e..888add81f5 100644 --- a/types/google-apps-script/google-apps-script.calendar.d.ts +++ b/types/google-apps-script/google-apps-script.calendar.d.ts @@ -7,7 +7,7 @@ /// declare namespace GoogleAppsScript { - export module Calendar { + export module CalendarApp { /** * Represents a calendar that the user owns or is subscribed to. */ @@ -308,4 +308,4 @@ declare namespace GoogleAppsScript { } } -declare var CalendarApp: GoogleAppsScript.Calendar.CalendarApp; +declare var CalendarApp: GoogleAppsScript.CalendarApp.CalendarApp; diff --git a/types/google-apps-script/index.d.ts b/types/google-apps-script/index.d.ts index 8e565f334f..c6361f929a 100644 --- a/types/google-apps-script/index.d.ts +++ b/types/google-apps-script/index.d.ts @@ -40,37 +40,37 @@ /// /// +// Events +/// + // API Types (Advanced Google Services) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/types/google__maps/index.d.ts b/types/google__maps/index.d.ts index 2745cafe62..9a6b65ec0d 100644 --- a/types/google__maps/index.d.ts +++ b/types/google__maps/index.d.ts @@ -1687,7 +1687,7 @@ export interface PlaceSearchResult { * contains a feature name of a nearby location. Often this feature refers to a street or neighborhood within the given results. * The `vicinity` property is only returned for a Nearby Search. */ - vicinity: number; + vicinity?: string; /** * is a string containing the human-readable address of this place. Often this address is equivalent to the "postal address". * The `formatted_address` property is only returned for a Text Search. diff --git a/types/graphql-api-koa/graphql-api-koa-tests.ts b/types/graphql-api-koa/graphql-api-koa-tests.ts new file mode 100644 index 0000000000..4f8ddca3df --- /dev/null +++ b/types/graphql-api-koa/graphql-api-koa-tests.ts @@ -0,0 +1,21 @@ +import Koa from "koa"; +import { GraphQLSchema, GraphQLObjectType, GraphQLString } from "graphql"; +import { errorHandler, execute } from "graphql-api-koa"; + +const app = new Koa() + .use(errorHandler()) + .use( + execute({ schema: new GraphQLSchema({ + query: new GraphQLObjectType({ + name: "Query", + fields: () => ({ + hello: { + type: GraphQLString, + resolve() { + return "world"; + } + } + }) + }) + }) + })); diff --git a/types/graphql-api-koa/index.d.ts b/types/graphql-api-koa/index.d.ts new file mode 100644 index 0000000000..5ba96fb723 --- /dev/null +++ b/types/graphql-api-koa/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for graphql-api-koa 2.0 +// Project: https://github.com/jaydenseric/graphql-api-koa#readme +// Definitions by: Mike Marcacci +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.3 + +import { GraphQLSchema } from "graphql"; +import { Middleware, ParameterizedContext } from "koa"; + +export interface ExecuteOptions { + schema?: GraphQLSchema; + rootValue?: any; + contextValue?: any; + fieldResolver?: any; +} + +export function errorHandler(): Middleware; + +export function execute( + options: ExecuteOptions & { + override?: (ctx: ParameterizedContext) => ExecuteOptions; + } +): Middleware; diff --git a/types/graphql-api-koa/tsconfig.json b/types/graphql-api-koa/tsconfig.json new file mode 100644 index 0000000000..88980bdfc7 --- /dev/null +++ b/types/graphql-api-koa/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "graphql-api-koa-tests.ts" + ] +} diff --git a/types/graphql-api-koa/tslint.json b/types/graphql-api-koa/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-api-koa/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/graphql-react/graphql-react-tests.tsx b/types/graphql-react/graphql-react-tests.tsx new file mode 100644 index 0000000000..a1c80d7995 --- /dev/null +++ b/types/graphql-react/graphql-react-tests.tsx @@ -0,0 +1,47 @@ +import React from "react"; +import { GraphQL, GraphQLContext, useGraphQL } from "graphql-react"; + +const graphql = new GraphQL(); + +function App() { + const { loading, cacheValue } = useGraphQL< + {node: null | {id: string}}, + {id: string} + >({ + fetchOptionsOverride(options) { + options.url = "/graphql"; + }, + operation: { + variables: { + id: "123456" + }, + query: ` + query($id: !String) { + node(id: $id) { + id + } + } + ` + } + }); + + if (loading) { + return
Loading...
; + } + + return ( +
{ + cacheValue && cacheValue.data && cacheValue.data.node + ? "exists" + : "does not exist" + }
+ ); +} + +function Root() { + return ( + + + + ); +} diff --git a/types/graphql-react/index.d.ts b/types/graphql-react/index.d.ts new file mode 100644 index 0000000000..9ee919bd16 --- /dev/null +++ b/types/graphql-react/index.d.ts @@ -0,0 +1,139 @@ +// Type definitions for graphql-react 8.1 +// Project: https://github.com/jaydenseric/graphql-react#readme +// Definitions by: Mike Marcacci +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.3 + +// The no-unnecessary-generics rule is stupid and overrestrictive. It is a +// perfectly valid and often useful to type-constrain a wrapping object. +/* tslint:disable:no-unnecessary-generics */ + +import { ReactNode, Context } from "react"; + +export const GraphQLContext: Context; + +export interface HttpError { + status: number; + statusText: string; +} + +export type GraphQLCacheKey = string; +export interface GraphQLCacheValue { + fetchError: null | string; + httpError: null | HttpError; + parseError: null | string; + graphQLErrors: + | null + | Array<{ + message: string; + path: string[]; + locations: Array<{ column: number; line: number }>; + }>; + data: T; +} + +export interface GraphQLCache { + [key: string]: GraphQLCacheValue; +} + +export interface GraphQLFetchOptions { + url: string; + body: string | FormData; + headers: Headers; + credentials: null | string; +} + +export type GraphQLFetchOptionsOverride = ( + options: GraphQLFetchOptions +) => void; + +export type GraphQLOperation = { + query: string; +} & (V extends undefined ? {} : { variables: V }); + +export interface GraphQLOperationLoading { + cacheKey: GraphQLCacheKey; + cacheValue: undefined | GraphQLCacheValue; + cacheValuePromise: Promise>; +} + +export interface GraphQLOperationStatus { + load: () => void; + loading: boolean; + cacheKey: GraphQLCacheKey; + cacheValue?: GraphQLCacheValue; +} + +export class GraphQL { + constructor(options?: { cache?: GraphQLCache }); + + on( + type: "reset", + handler: (event: { exceptCacheKey: GraphQLCacheKey }) => void + ): void; + + on( + type: "cache", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValue: GraphQLCacheValue; + }) => void + ): void; + + on( + type: "fetch", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValuePromise: Promise>; + }) => void + ): void; + + off( + type: "reset", + handler: (event: { exceptCacheKey: GraphQLCacheKey }) => void + ): void; + + off( + type: "cache", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValue: GraphQLCacheValue; + }) => void + ): void; + + off( + type: "fetch", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValuePromise: Promise>; + }) => void + ): void; + + reset(exceptCacheKey?: string): void; + operate(options: { + operation: GraphQLOperation; + fetchOptionsOverride?: GraphQLFetchOptionsOverride; + reloadOnLoad?: boolean; + resetOnLoad?: boolean; + }): GraphQLOperationLoading; + + cache: GraphQLCache; +} + +export function reportCacheErrors(event: any): void; + +export function ssr( + grapphql: GraphQL, + node: ReactNode, + render?: (element: ReactNode) => string +): void; + +export function useGraphQL(options: { + fetchOptionsOverride?: GraphQLFetchOptionsOverride; + loadOnMount?: boolean; + loadOnReload?: boolean; + loadOnReset?: boolean; + reloadOnLoad?: boolean; + resetOnLoad?: boolean; + operation: GraphQLOperation; +}): GraphQLOperationStatus; diff --git a/types/graphql-react/tsconfig.json b/types/graphql-react/tsconfig.json new file mode 100644 index 0000000000..16a784d5cc --- /dev/null +++ b/types/graphql-react/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "graphql-react-tests.tsx" + ] +} diff --git a/types/graphql-react/tslint.json b/types/graphql-react/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-react/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/graphql/execution/execute.d.ts b/types/graphql/execution/execute.d.ts index fc6ad898d1..1791ed9222 100644 --- a/types/graphql/execution/execute.d.ts +++ b/types/graphql/execution/execute.d.ts @@ -17,7 +17,7 @@ import { InlineFragmentNode, FragmentDefinitionNode, } from "../language/ast"; -import { MaybePromise } from "../jsutils/MaybePromise"; +import { PromiseOrValue } from "../jsutils/PromiseOrValue"; /** * Data that must be available at all points during query execution. @@ -37,7 +37,7 @@ export interface ExecutionContext { } export interface ExecutionResultDataDefault { - [key: string]: any + [key: string]: any; } /** @@ -73,7 +73,9 @@ export type ExecutionArgs = { * * Accepts either an object with named arguments, or individual arguments. */ -export function execute(args: ExecutionArgs): MaybePromise>; +export function execute( + args: ExecutionArgs +): PromiseOrValue>; export function execute( schema: GraphQLSchema, document: DocumentNode, @@ -82,7 +84,7 @@ export function execute( variableValues?: Maybe<{ [key: string]: any }>, operationName?: Maybe, fieldResolver?: Maybe> -): MaybePromise>; +): PromiseOrValue>; /** * Given a ResponsePath (found in the `path` entry in the information provided diff --git a/types/graphql/graphql-tests.ts b/types/graphql/graphql-tests.ts index e75fecb329..77787aa436 100644 --- a/types/graphql/graphql-tests.ts +++ b/types/graphql/graphql-tests.ts @@ -1,4 +1,4 @@ -import { assertInputType, isInputType, isOutputType } from 'graphql'; +import { assertInputType, isInputType, isOutputType } from "graphql"; /////////////////////////// // graphql // diff --git a/types/graphql/index.d.ts b/types/graphql/index.d.ts index 0206859643..d152dba8c5 100644 --- a/types/graphql/index.d.ts +++ b/types/graphql/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for graphql 14.0 +// Type definitions for graphql 14.2 // Project: https://github.com/graphql/graphql-js // Definitions by: TonyYang // Caleb Meredith @@ -18,6 +18,7 @@ // Jonathan Cardoso // Pavel Lang // Mark Caudill +// Martijn Walraven // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 diff --git a/types/graphql/jsutils/MaybePromise.d.ts b/types/graphql/jsutils/MaybePromise.d.ts deleted file mode 100644 index 5eb85a3f92..0000000000 --- a/types/graphql/jsutils/MaybePromise.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type MaybePromise = Promise | T; diff --git a/types/graphql/jsutils/PromiseOrValue.d.ts b/types/graphql/jsutils/PromiseOrValue.d.ts new file mode 100644 index 0000000000..6b2517ee62 --- /dev/null +++ b/types/graphql/jsutils/PromiseOrValue.d.ts @@ -0,0 +1 @@ +export type PromiseOrValue = Promise | T; diff --git a/types/graphql/language/blockStringValue.d.ts b/types/graphql/language/blockString.d.ts similarity index 78% rename from types/graphql/language/blockStringValue.d.ts rename to types/graphql/language/blockString.d.ts index 64fb87dafd..a6bf5f6f0c 100644 --- a/types/graphql/language/blockStringValue.d.ts +++ b/types/graphql/language/blockString.d.ts @@ -4,4 +4,4 @@ * * This implements the GraphQL spec's BlockStringValue() static algorithm. */ -export default function blockStringValue(rawString: string): string; +export function dedentBlockStringValue(rawString: string): string; diff --git a/types/graphql/language/printer.d.ts b/types/graphql/language/printer.d.ts index de823b5b3e..6b5635a06a 100644 --- a/types/graphql/language/printer.d.ts +++ b/types/graphql/language/printer.d.ts @@ -1,5 +1,7 @@ +import { ASTNode } from "./ast"; + /** * Converts an AST into a string, using one set of reasonable * formatting rules. */ -export function print(ast: any): string; +export function print(ast: ASTNode): string; diff --git a/types/graphql/tsutils/Maybe.d.ts b/types/graphql/tsutils/Maybe.d.ts index 7ad0bc85a4..6a3391138f 100644 --- a/types/graphql/tsutils/Maybe.d.ts +++ b/types/graphql/tsutils/Maybe.d.ts @@ -1,4 +1,4 @@ // Conveniently represents flow's "Maybe" type https://flow.org/en/docs/types/maybe/ -type Maybe = null | undefined | T +type Maybe = null | undefined | T; -export default Maybe +export default Maybe; diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index f491919a13..b36c75539c 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -1,5 +1,5 @@ import Maybe from "../tsutils/Maybe"; -import { MaybePromise } from "../jsutils/MaybePromise"; +import { PromiseOrValue } from "../jsutils/PromiseOrValue"; import { ScalarTypeDefinitionNode, ObjectTypeDefinitionNode, @@ -161,7 +161,6 @@ interface GraphQLList { inspect(): string; } - interface _GraphQLList { (type: T): GraphQLList; new (type: T): GraphQLList; @@ -280,6 +279,12 @@ export class GraphQLScalarType { extensionASTNodes: Maybe>; constructor(config: GraphQLScalarTypeConfig); + toConfig(): GraphQLScalarTypeConfig & { + parseValue: GraphQLScalarValueParser; + parseLiteral: GraphQLScalarLiteralParser; + extensionASTNodes: ReadonlyArray; + }; + toString(): string; toJSON(): string; inspect(): string; @@ -342,11 +347,7 @@ export interface GraphQLScalarTypeConfig { * }); * */ -export class GraphQLObjectType< - TSource = any, - TContext = any, - TArgs = { [key: string]: any } -> { +export class GraphQLObjectType { name: string; description: Maybe; astNode: Maybe; @@ -356,16 +357,19 @@ export class GraphQLObjectType< constructor(config: GraphQLObjectTypeConfig); getFields(): GraphQLFieldMap; getInterfaces(): GraphQLInterfaceType[]; + + toConfig(): GraphQLObjectTypeConfig & { + interfaces: GraphQLInterfaceType[]; + fields: GraphQLFieldConfigMap; + extensionASTNodes: ReadonlyArray; + }; + toString(): string; toJSON(): string; inspect(): string; } -export interface GraphQLObjectTypeConfig< - TSource, - TContext, - TArgs = { [key: string]: any } -> { +export interface GraphQLObjectTypeConfig { name: string; interfaces?: Thunk>; fields: Thunk>; @@ -375,21 +379,17 @@ export interface GraphQLObjectTypeConfig< extensionASTNodes?: Maybe>; } -export type GraphQLTypeResolver< - TSource, - TContext, - TArgs = { [key: string]: any } -> = ( +export type GraphQLTypeResolver = ( value: TSource, context: TContext, info: GraphQLResolveInfo -) => MaybePromise | string>>; +) => PromiseOrValue | string>>; export type GraphQLIsTypeOfFn = ( source: TSource, context: TContext, info: GraphQLResolveInfo -) => MaybePromise; +) => PromiseOrValue; export type GraphQLFieldResolver = ( source: TSource, @@ -461,11 +461,7 @@ export interface GraphQLArgument { export function isRequiredArgument(arg: GraphQLArgument): boolean; -export type GraphQLFieldMap< - TSource, - TContext, - TArgs = { [key: string]: any } -> = { +export type GraphQLFieldMap = { [key: string]: GraphQLField; }; @@ -498,16 +494,17 @@ export class GraphQLInterfaceType { getFields(): GraphQLFieldMap; + toConfig(): GraphQLInterfaceTypeConfig & { + fields: GraphQLFieldConfigMap; + extensionASTNodes: ReadonlyArray; + }; + toString(): string; toJSON(): string; inspect(): string; } -export interface GraphQLInterfaceTypeConfig< - TSource, - TContext, - TArgs = { [key: string]: any } -> { +export interface GraphQLInterfaceTypeConfig { name: string; fields: Thunk>; /** @@ -555,6 +552,11 @@ export class GraphQLUnionType { getTypes(): GraphQLObjectType[]; + toConfig(): GraphQLUnionTypeConfig & { + types: GraphQLObjectType[]; + extensionASTNodes: ReadonlyArray; + }; + toString(): string; toJSON(): string; inspect(): string; @@ -607,6 +609,11 @@ export class GraphQLEnumType { serialize(value: any): Maybe; parseValue(value: any): Maybe; parseLiteral(valueNode: ValueNode, _variables: Maybe<{ [key: string]: any }>): Maybe; + + toConfig(): GraphQLEnumTypeConfig & { + extensionASTNodes: ReadonlyArray; + }; + toString(): string; toJSON(): string; inspect(): string; @@ -665,6 +672,12 @@ export class GraphQLInputObjectType { extensionASTNodes: Maybe>; constructor(config: GraphQLInputObjectTypeConfig); getFields(): GraphQLInputFieldMap; + + toConfig(): GraphQLInputObjectTypeConfig & { + fields: GraphQLInputFieldConfigMap; + extensionASTNodes: ReadonlyArray; + }; + toString(): string; toJSON(): string; inspect(): string; diff --git a/types/graphql/type/directives.d.ts b/types/graphql/type/directives.d.ts index ca9e947640..b3995704a7 100644 --- a/types/graphql/type/directives.d.ts +++ b/types/graphql/type/directives.d.ts @@ -20,6 +20,10 @@ export class GraphQLDirective { astNode: Maybe; constructor(config: GraphQLDirectiveConfig); + + toConfig(): GraphQLDirectiveConfig & { + args: GraphQLFieldConfigArgumentMap; + }; } export interface GraphQLDirectiveConfig { diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index 7ccb390dbe..a1722844e4 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -52,6 +52,12 @@ export class GraphQLSchema { getDirectives(): ReadonlyArray; getDirective(name: string): Maybe; + + toConfig(): GraphQLSchemaConfig & { + types: GraphQLNamedType[]; + directives: GraphQLDirective[]; + extensionASTNodes: ReadonlyArray; + }; } type TypeMap = { [key: string]: GraphQLNamedType }; diff --git a/types/graphql/utilities/buildASTSchema.d.ts b/types/graphql/utilities/buildASTSchema.d.ts index 1390601f65..8b7a725ec8 100644 --- a/types/graphql/utilities/buildASTSchema.d.ts +++ b/types/graphql/utilities/buildASTSchema.d.ts @@ -15,7 +15,7 @@ import { GraphQLDirective } from "../type/directives"; import { Source } from "../language/source"; import { GraphQLSchema, GraphQLSchemaValidationOptions } from "../type/schema"; import { ParseOptions } from "../language/parser"; -import blockStringValue from "../language/blockStringValue"; +import { dedentBlockStringValue } from "../language/blockString"; interface BuildSchemaOptions extends GraphQLSchemaValidationOptions { /** diff --git a/types/graphql/validation/validate.d.ts b/types/graphql/validation/validate.d.ts index 6c0e644ea3..aee901bbb5 100644 --- a/types/graphql/validation/validate.d.ts +++ b/types/graphql/validation/validate.d.ts @@ -2,7 +2,7 @@ import { GraphQLError } from "../error"; import { DocumentNode } from "../language/ast"; import { GraphQLSchema } from "../type/schema"; import { TypeInfo } from "../utilities/TypeInfo"; -import { ValidationRule } from "./ValidationContext"; +import { ValidationRule, SDLValidationRule } from "./ValidationContext"; /** * Implements the "Validation" section of the spec. @@ -27,6 +27,13 @@ export function validate( typeInfo?: TypeInfo ): ReadonlyArray; +// @internal +export function validateSDL( + documentAST: DocumentNode, + schemaToExtend?: GraphQLSchema | null, + rules?: ReadonlyArray +): GraphQLError[]; + /** * Utility function which asserts a SDL document is valid by throwing an error * if it is invalid. diff --git a/types/grecaptcha/tslint.json b/types/grecaptcha/tslint.json index bafaae7817..f6fabe4180 100644 --- a/types/grecaptcha/tslint.json +++ b/types/grecaptcha/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO + "npm-naming": false, "dt-header": false } } diff --git a/types/gtag.js/gtag.js-tests.ts b/types/gtag.js/gtag.js-tests.ts new file mode 100644 index 0000000000..c25db26c5f --- /dev/null +++ b/types/gtag.js/gtag.js-tests.ts @@ -0,0 +1,12 @@ +gtag('config', 'GA-TRACKING_ID'); +gtag('config', 'GA-TRACKING_ID', {send_page_view: false}); + +gtag('event', 'login', { + method: 'Google' +}); + +gtag('set', {currency: 'USD'}); +gtag('set', { + country: 'US', + currency: 'USD' +}); diff --git a/types/gtag.js/index.d.ts b/types/gtag.js/index.d.ts new file mode 100644 index 0000000000..6f7715b1b1 --- /dev/null +++ b/types/gtag.js/index.d.ts @@ -0,0 +1,93 @@ +// Type definitions for Google gtag.js API +// Project: https://developers.google.com/gtagjs +// Definitions by: Junyoung Choi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var gtag: Gtag.Gtag; +declare namespace Gtag { + interface Gtag { + (command: 'config', targetId: string, config?: ControlParams | EventParams | CustomParams): void; + (command: 'set', config: CustomParams): void; + (command: 'event', eventName: EventNames | string, eventParams?: ControlParams | EventParams | CustomParams): void; + } + + interface CustomParams { + [key: string]: any; + } + + interface ControlParams { + groups?: string | string[]; + send_to?: string | string[]; + event_callback?: () => void; + event_timeout?: number; + } + + type EventNames = 'add_payment_info' + | 'add_payment_info' + | 'add_to_cart' + | 'add_to_wishlist' + | 'begin_checkout' + | 'checkout_progress' + | 'exception' + | 'generate_lead' + | 'login' + | 'page_view' + | 'purchase' + | 'refund' + | 'remove_from_cart' + | 'screen_view' + | 'search' + | 'select_content' + | 'set_checkout_option' + | 'share' + | 'sign_up' + | 'timing_complete' + | 'view_item' + | 'view_item_list' + | 'view_promotion' + | 'view_search_results'; + + interface EventParams { + checkout_option?: string; + checkout_step?: number; + content_id?: string; + content_type?: string; + coupon?: string; + currency?: string; + description?: string; + fatal?: boolean; + items?: Item[]; + method?: string; + number?: string; + promotions?: Promotion[]; + screen_name?: string; + search_term?: string; + shipping?: Currency; + tax?: Currency; + transaction_id?: string; + value?: number; + event_label?: string; + event_category: string; + } + + type Currency = string | number; + + interface Item { + brand?: string; + category?: string; + creative_name?: string; + creative_slot?: string; + id?: string; + location_id?: string; + name?: string; + price?: Currency; + quantity?: number; + } + + interface Promotion { + creative_name?: string; + creative_slot?: string; + id?: string; + name?: string; + } +} diff --git a/types/gtag.js/tsconfig.json b/types/gtag.js/tsconfig.json new file mode 100644 index 0000000000..4e8cd26f3f --- /dev/null +++ b/types/gtag.js/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gtag.js-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gtag.js/tslint.json b/types/gtag.js/tslint.json new file mode 100644 index 0000000000..035c359a3d --- /dev/null +++ b/types/gtag.js/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "dt-header": false + } +} diff --git a/types/gulp-intercept/gulp-intercept-tests.ts b/types/gulp-intercept/gulp-intercept-tests.ts new file mode 100644 index 0000000000..36952e438f --- /dev/null +++ b/types/gulp-intercept/gulp-intercept-tests.ts @@ -0,0 +1,14 @@ +import gulpIntercept = require('gulp-intercept'); +import gulp = require('gulp'); +import Vinyl = require('vinyl'); + +gulp.task('testTask', () => { + return gulp.src(['src/*.html']) + + .pipe(gulpIntercept((sourceFile: Vinyl) => { + console.log(sourceFile.path); + return sourceFile; + })) + + .pipe(gulp.dest('dist/')); +}); diff --git a/types/gulp-intercept/index.d.ts b/types/gulp-intercept/index.d.ts new file mode 100644 index 0000000000..1a73d899ae --- /dev/null +++ b/types/gulp-intercept/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for gulp-intercept 0.1 +// Project: https://github.com/khilnani/gulp-intercept +// Definitions by: Takesi Tokugawa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import Vinyl = require('vinyl'); + +declare namespace intercept { + interface Intercept { + (interceptFunction: InterceptFunction): NodeJS.ReadWriteStream; + } + + interface InterceptFunction { + (file: Vinyl): Vinyl; + } +} + +declare var intercept: intercept.Intercept; + +export = intercept; diff --git a/types/gulp-intercept/tsconfig.json b/types/gulp-intercept/tsconfig.json new file mode 100644 index 0000000000..07acf8c416 --- /dev/null +++ b/types/gulp-intercept/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-intercept-tests.ts" + ] +} diff --git a/types/gulp-intercept/tslint.json b/types/gulp-intercept/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gulp-intercept/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/gulp-msbuild/tslint.json b/types/gulp-msbuild/tslint.json index 65c83fb1e3..1c56ba06b6 100644 --- a/types/gulp-msbuild/tslint.json +++ b/types/gulp-msbuild/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { + "npm-naming": false, "dt-header": false } } diff --git a/types/gulp-mustache/tslint.json b/types/gulp-mustache/tslint.json index 946c3b6691..0831709701 100644 --- a/types/gulp-mustache/tslint.json +++ b/types/gulp-mustache/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO - "dt-header": false + "npm-naming": false, + "dt-header": false } } diff --git a/types/gulp-nunit-runner/tslint.json b/types/gulp-nunit-runner/tslint.json index bafaae7817..f6fabe4180 100644 --- a/types/gulp-nunit-runner/tslint.json +++ b/types/gulp-nunit-runner/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO + "npm-naming": false, "dt-header": false } } diff --git a/types/gulp-tap/gulp-tap-tests.ts b/types/gulp-tap/gulp-tap-tests.ts new file mode 100644 index 0000000000..7d89c50ba0 --- /dev/null +++ b/types/gulp-tap/gulp-tap-tests.ts @@ -0,0 +1,11 @@ +import gulpTap = require('gulp-tap'); +import gulp = require('gulp'); +import Vinyl = require('vinyl'); + +gulp.task('testTask', () => { + return gulp.src(['src/*.html']) + .pipe(gulpTap((sourceFile: Vinyl) => { + console.log(sourceFile.path); + })) + .pipe(gulp.dest('dist/')); +}); diff --git a/types/gulp-tap/index.d.ts b/types/gulp-tap/index.d.ts new file mode 100644 index 0000000000..30af7663f8 --- /dev/null +++ b/types/gulp-tap/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for gulp-tap 1.0 +// Project: https://github.com/geejs/gulp-tap +// Definitions by: Takesi Tokugawa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import Vinyl = require('vinyl'); + +declare namespace tap { + interface Tap { + (tapFunction: TapFunction, t?: any): NodeJS.ReadWriteStream; + } + + interface TapFunction { + (file: Vinyl): any; + } +} + +declare function tap(tapFunction: (file: Vinyl, t?: {}) => void): NodeJS.ReadWriteStream; + +export = tap; diff --git a/types/gulp-tap/tsconfig.json b/types/gulp-tap/tsconfig.json new file mode 100644 index 0000000000..d48ac90475 --- /dev/null +++ b/types/gulp-tap/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-tap-tests.ts" + ] +} diff --git a/types/gulp-tap/tslint.json b/types/gulp-tap/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gulp-tap/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/hogan.js/hogan.js-tests.ts b/types/hogan.js/hogan.js-tests.ts new file mode 100644 index 0000000000..56cd314aab --- /dev/null +++ b/types/hogan.js/hogan.js-tests.ts @@ -0,0 +1,24 @@ +import Hogan = require('hogan.js'); + +// $ExpectType HoganTemplate +const compiled = Hogan.compile("{{#if}}{{value}}{{/if}}"); + +// $ExpectType string +Hogan.compile("<%_foo%><%value%><%/foo%>", { + asString: true, + sectionTags: [{ + o: '_foo', + c: 'foo' + }], + delimiters: '<% %>', + disableLambda: true +}); + +// $ExpectType string +compiled.render({ value: "test" }); + +// $ExpectType Token[] +const scanned = Hogan.scan("{{#if}}{{value}}{{/if}}"); + +// $ExpectType Leaf[] +Hogan.parse(scanned); diff --git a/types/hogan.js/index.d.ts b/types/hogan.js/index.d.ts new file mode 100644 index 0000000000..27f4d967aa --- /dev/null +++ b/types/hogan.js/index.d.ts @@ -0,0 +1,95 @@ +// Type definitions for hogan.js 3.0 +// Project: http://twitter.github.com/hogan.js/ +// Definitions by: Andrew Leedham +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export interface Context { + [key: string]: any; +} + +export interface SectionTags { + o: string; + c: string; +} + +export interface HoganOptions { + asString?: boolean; + sectionTags?: ReadonlyArray; + delimiters?: string; + disableLambda?: boolean; +} + +export interface Token { + tag: string; + otag?: string; + ctag?: string; + i?: number; + n?: string; + text?: string; +} + +export interface Leaf extends Token { + end: number; + nodes: Token[]; +} + +export type Tree = Leaf[]; + +export interface Partials { + [symbol: string]: HoganTemplate; +} +declare class HoganTemplate { + /** + * Renders the template to a string. + * + * @param context - The data to render the template with. + * @param partials - The partials to render the template with. + * @param indent - The string to indent when rendering the template. + * @returns A rendered template. + */ + render(context: Context, partials?: Partials, indent?: string): string; +} + +export { HoganTemplate as Template, HoganTemplate as template }; + +export function compile( + text: string, + options?: HoganOptions & { asString: false } +): HoganTemplate; +export function compile( + text: string, + options?: HoganOptions & { asString: true } +): string; +/** + * Compiles templates to HoganTemplate objects, which have a render method. + * + * @param text - Raw mustache string to compile. + * @param options - Options to use when compiling. See https://github.com/twitter/hogan.js#compilation-options. + * @returns A HoganTemplate. + */ +export function compile( + text: string, + options?: HoganOptions +): HoganTemplate | string; +/** + * Scans templates returning an array of found tokens. + * + * @param text - Raw mustache string to scan. + * @param delimiters - A string that overrides the default delimiters. Example: "<% %>". + * @returns Found tokens. + */ +export function scan(text: string, delimiters?: string): Token[]; +/** + * Structures tokens into a tree. + * + * @param tokens - An array of scanned tokens. + * @param text - Unused pass undefined. + * @param options - Options to use when parsing. See https://github.com/twitter/hogan.js#compilation-options. + * @returns The tree structure of the given tokens. + */ +export function parse( + tokens: ReadonlyArray, + text?: undefined, + options?: HoganOptions +): Tree; diff --git a/types/hogan.js/tsconfig.json b/types/hogan.js/tsconfig.json new file mode 100644 index 0000000000..cc84847867 --- /dev/null +++ b/types/hogan.js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "hogan.js-tests.ts" + ] +} diff --git a/types/hogan.js/tslint.json b/types/hogan.js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hogan.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/hoist-non-react-statics/package.json b/types/hoist-non-react-statics/package.json new file mode 100644 index 0000000000..833c6ee977 --- /dev/null +++ b/types/hoist-non-react-statics/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "hoist-non-react-statics": "^3.3.0" + } +} diff --git a/types/html5-to-pdf/html5-to-pdf-tests.ts b/types/html5-to-pdf/html5-to-pdf-tests.ts new file mode 100644 index 0000000000..1081f5fa12 --- /dev/null +++ b/types/html5-to-pdf/html5-to-pdf-tests.ts @@ -0,0 +1,9 @@ +import * as HTML5ToPDF from "html5-to-pdf"; + +const options = { inputBody: "Hello World" }; +const converter = new HTML5ToPDF(options); +converter.parseOptions(options); // $ExpectType ParsedOptions +converter.build(); // $ExpectType Promise +converter.includeAssets(); // $ExpectType Promise +converter.start(); // $ExpectType Promise +converter.close(); // $ExpectType Promise diff --git a/types/html5-to-pdf/index.d.ts b/types/html5-to-pdf/index.d.ts new file mode 100644 index 0000000000..a4967ed199 --- /dev/null +++ b/types/html5-to-pdf/index.d.ts @@ -0,0 +1,118 @@ +// Type definitions for html5-to-pdf 3.1 +// Project: https://github.com/peterdemartini/html5-to-pdf +// Definitions by: Sam Alexander +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { LaunchOptions, PDFOptions, Page } from "puppeteer"; + +declare class HTML5ToPDF { + constructor(options: HTML5ToPDF.Options); + + build(): Promise; + + close(): Promise; + + includeAssets(): Promise; + + parseOptions(options: HTML5ToPDF.Options): HTML5ToPDF.ParsedOptions; + + start(): Promise; +} + +declare namespace HTML5ToPDF { + interface FileDef { + /** + * File type + */ + type: "css" | "js"; + /** + * File path + */ + filePath: string; + } + + interface ParsedOptions { + body: string | Buffer; + pdf: PDFOptions; + templatePath: string; + templateUrl: string; + launchOptions: LaunchOptions; + include: FileDef[]; + renderDelay: number; + } + + interface LegacyOptions { + /** + * [COMPATIBLE]\ + * Page size + */ + pageSize?: "A3" | "A4" | "Legal" | "Tabloid"; + /** + * [COMPATIBLE]\ + * True for landscape, false for portrait. + */ + landscape?: boolean; + /** + * [NOT COMPATIBLE]\ + * 0 - default\ + * 1 - none\ + * 2 - minimum + */ + marginsType?: number; + /** + * [COMPATIBLE]\ + * Whether to print CSS backgrounds. + */ + printBackground?: boolean; + } + + interface Options { + /** + * Path to the input HTML. + */ + inputPath?: string; + /** + * Path to the input html as a String, or Buffer. If specified this will override inputPath. + */ + inputBody?: string | Buffer; + /** + * Path to the output pdf file. + */ + outputPath?: string; + /** + * Delay in milliseconds before rendering the PDF (give HTML and CSS a chance to load). + */ + rendererDelay?: number; + /** + * A list of CSS or JS assets to include. + */ + include?: Array; + /** + * The template to use when rendering the html. + */ + template?: string; + /** + * The template to use for rendering the html. If this is set, it will use this instead of the template path. + */ + templateUrl?: string; + /** + * This object will be passed directly to `puppeteer`. + */ + pdf?: PDFOptions; + /** + * This object will be passed directly to `puppeteer`. + */ + launchOptions?: LaunchOptions; + /** + * @deprecated Legacy Options. + * See `options.pdf` for pdf options. Since some of these options are converted over to work with `puppeteer`, + * this is automatically done if `options.pdf` is left empty. + */ + options?: LegacyOptions; + } +} + +export = HTML5ToPDF; + +export as namespace HTML5ToPDF; diff --git a/types/html5-to-pdf/tsconfig.json b/types/html5-to-pdf/tsconfig.json new file mode 100644 index 0000000000..a2ee9070de --- /dev/null +++ b/types/html5-to-pdf/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom", + "es2017" + ], + "target": "es2017", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "html5-to-pdf-tests.ts" + ] +} diff --git a/types/html5-to-pdf/tslint.json b/types/html5-to-pdf/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/html5-to-pdf/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/htmlparser2/htmlparser2-tests.ts b/types/htmlparser2/htmlparser2-tests.ts index 21289b96f5..807f2fe904 100644 --- a/types/htmlparser2/htmlparser2-tests.ts +++ b/types/htmlparser2/htmlparser2-tests.ts @@ -1,23 +1,30 @@ /** * Created by staticfunction on 8/4/14. */ -import htmlparser = require("htmlparser2"); +import htmlparser = require('htmlparser2'); -var parser = new htmlparser.Parser({ - onopentag: (name:string, attribs:{[s:string]:string}) => { - if(name === "script" && attribs['type'] === "text/javascript"){ - console.log("JS! Hooray!"); - } - }, - ontext: (text: string) => { - console.log("-->", text); - }, - onclosetag: (tagname:string) => { - if(tagname === "script"){ - console.log("That's it?!"); - } +const options: htmlparser.DomHandlerOptions = { withEndIndices: false, withDomLvl1: true } +const dh = new htmlparser.DomHandler((err: Error, dom: htmlparser.DomElement[]) => { + if(err) { + throw err; } -}); + + // Use DomUtils to get name of first element in dom + console.log(htmlparser.DomUtils.getName(dom[0])); +}, options); +dh.onopentag = (name:string, attribs:{[s:string]:string}) => { + if(name === "script" && attribs['type'] === "text/javascript"){ + console.log("JS! Hooray!"); + } +}; +dh.ontext = (text: string) => { + console.log("-->", text); +}; +dh.onclosetag = () => { + console.log("That's it?!"); +}; + +var parser = new htmlparser.Parser(dh); parser.write("Xyz "); parser.end(); diff --git a/types/htmlparser2/index.d.ts b/types/htmlparser2/index.d.ts index 313ff56a96..c10dea047e 100644 --- a/types/htmlparser2/index.d.ts +++ b/types/htmlparser2/index.d.ts @@ -1,30 +1,20 @@ -// Type definitions for htmlparser2 v3.7.x +// Type definitions for htmlparser2 v3.10.x // Project: https://github.com/fb55/htmlparser2/ // Definitions by: James Roland Cabresos // Linus Unnebäck +// Johan Davidsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +/// +/// import { Writable } from 'stream' +import { DomHandler } from 'domhandler'; +import * as DomUtils from 'domutils'; +export { DomElement, DomHandlerOptions, DomHandler, Element, Node } from 'domhandler'; -export interface Handler { - onopentag?: (name: string, attribs: { [type: string]: string }) => void; - onopentagname?: (name: string) => void; - onattribute?: (name: string, value: string) => void; - ontext?: (text: string) => void; - onclosetag?: (text: string) => void; - onprocessinginstruction?: (name: string, data: string) => void; - oncomment?: (data: string) => void; - oncommentend?: () => void; - oncdatastart?: () => void; - oncdataend?: () => void; - onerror?: (error: Error) => void; - onreset?: () => void; - onend?: () => void; -} - -export interface Options { +export interface ParserOptions { /*** * Indicates whether special tags (